From 9878ebbf3bf982bbbb74ca8655fe8b829dc6a048 Mon Sep 17 00:00:00 2001 From: colorfulgray0 Date: Wed, 21 Feb 2024 15:24:02 +0800 Subject: [PATCH 0001/1557] =?UTF-8?q?fix:=20=E9=94=99=E8=AF=AF=E7=A0=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 51eebda236..a9219ca692 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -53,7 +53,7 @@ public interface ErrorCodeConstants { ErrorCode TASK_ADD_SIGN_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签:选择的用户不存在"); ErrorCode TASK_ADD_SIGN_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签:当前任务已经{},不能{}"); ErrorCode TASK_ADD_SIGN_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复"); - ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_011, "任务减签失败,被减签的任务必须是通过加签生成的任务"); + ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); // ========== 流程任务分配规则 1-009-006-000 ========== ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1_009_006_000, "流程({}) 的任务({}) 已经存在分配规则"); -- Gitee From 462a4ee8230b05b1fb4a9b15382ce84446e7cabf Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 25 Feb 2024 22:32:12 +0800 Subject: [PATCH 0002/1557] =?UTF-8?q?=E9=87=8D=E6=9E=84=20excel=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E7=89=88=E4=B8=8B=E6=8B=89=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=80=BB=E8=BE=91=E4=BD=BF=E7=94=A8=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3=E7=9A=84=E6=96=B9=E5=BC=8F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/annotations/ExcelColumnSelect.java | 20 ++++ .../excel/core/enums/ExcelColumn.java | 27 ----- .../core/handler/SelectSheetWriteHandler.java | 100 ++++++++++++++---- .../service/ExcelColumnSelectDataService.java | 38 +++++++ .../framework/excel/core/util/ExcelUtils.java | 20 +--- .../admin/customer/CrmCustomerController.java | 25 +---- .../vo/customer/CrmCustomerImportExcelVO.java | 9 ++ .../crm/framework/excel/package-info.java | 1 + .../AreaExcelColumnSelectDataServiceImpl.java | 38 +++++++ ...ustryExcelColumnSelectDataServiceImpl.java | 35 ++++++ ...LevelExcelColumnSelectDataServiceImpl.java | 35 ++++++ ...ourceExcelColumnSelectDataServiceImpl.java | 35 ++++++ 12 files changed, 291 insertions(+), 92 deletions(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/enums/ExcelColumn.java create mode 100644 yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java new file mode 100644 index 0000000000..2c519523b9 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.framework.excel.core.annotations; + +import java.lang.annotation.*; + +/** + * 给列添加下拉选择数据 + * + * @author HUIHUI + */ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +public @interface ExcelColumnSelect { + + /** + * @return 获取下拉数据源的方法名称 + */ + String value(); + +} diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/enums/ExcelColumn.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/enums/ExcelColumn.java deleted file mode 100644 index dd8a8374c1..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/enums/ExcelColumn.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.yudao.framework.excel.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -// TODO @puhui999:列表有办法通过 field name 么?主要考虑一个点,可能导入模版的顺序可能会变 -/** - * Excel 列名枚举 - * 默认枚举 26 列列名如果有需求更多的列名请自行补充 - * - * @author HUIHUI - */ -@Getter -@AllArgsConstructor -public enum ExcelColumn { - - A(0), B(1), C(2), D(3), E(4), F(5), G(6), H(7), I(8), - J(9), K(10), L(11), M(12), N(13), O(14), P(15), Q(16), - R(17), S(18), T(19), U(20), V(21), W(22), X(23), Y(24), - Z(25); - - /** - * 列索引 - */ - private final int colNum; - -} diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index 38d01bd879..421c592009 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -1,9 +1,12 @@ package cn.iocoder.yudao.framework.excel.core.handler; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.Assert; +import cn.hutool.core.map.MapUtil; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; +import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; +import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.write.handler.SheetWriteHandler; import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; @@ -11,10 +14,11 @@ import org.apache.poi.hssf.usermodel.HSSFDataValidation; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddressList; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.util.*; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; /** * 基于固定 sheet 实现下拉框 @@ -23,6 +27,9 @@ import java.util.stream.Collectors; */ public class SelectSheetWriteHandler implements SheetWriteHandler { + private static final List ALPHABET = getExcelColumnNameList(); + private static final List EXCEL_COLUMN_SELECT_DATA_SERVICES = new ArrayList<>(); + /** * 数据起始行从 0 开始 * @@ -36,21 +43,46 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { private static final String DICT_SHEET_NAME = "字典sheet"; - // TODO @puhui999:Map> 可以么?之前用 keyvalue 的原因,返回给前端,无法用 linkedhashmap,默认 key 会乱序 - private final List>> selectMap; + private final List>> selectMap = new ArrayList<>(); // 使用 List + KeyValue 组合方便排序 - public SelectSheetWriteHandler(List>> selectMap) { - if (CollUtil.isEmpty(selectMap)) { - this.selectMap = null; + public SelectSheetWriteHandler(Class head) { + // 加载下拉数据获取接口 + Map beansMap = SpringUtil.getBeanFactory().getBeansOfType(ExcelColumnSelectDataService.class); + if (MapUtil.isEmpty(beansMap)) { return; } - // 校验一下 key 是否唯一 - Map nameCounts = selectMap.stream() - .collect(Collectors.groupingBy(item -> item.getKey().name(), Collectors.counting())); - Assert.isFalse(nameCounts.entrySet().stream().allMatch(entry -> entry.getValue() > 1), "下拉数据 key 重复请排查!!!"); - + if (CollUtil.isEmpty(EXCEL_COLUMN_SELECT_DATA_SERVICES) || EXCEL_COLUMN_SELECT_DATA_SERVICES.size() != beansMap.values().size()) { + EXCEL_COLUMN_SELECT_DATA_SERVICES.clear(); + EXCEL_COLUMN_SELECT_DATA_SERVICES.addAll(convertList(beansMap.values(), b -> b)); + } + // 解析下拉数据 + Map excelPropertyFields = getFieldsWithAnnotation(head, ExcelProperty.class); + Map excelColumnSelectFields = getFieldsWithAnnotation(head, ExcelColumnSelect.class); + int colIndex = 0; + for (String fieldName : excelPropertyFields.keySet()) { + Field field = excelColumnSelectFields.get(fieldName); + if (field != null) { + getSelectDataList(colIndex, field); + } + colIndex++; + } selectMap.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 - this.selectMap = selectMap; + } + + /** + * 获得下拉数据 + * + * @param colIndex 列索引 + * @param field 字段 + */ + private void getSelectDataList(int colIndex, Field field) { + EXCEL_COLUMN_SELECT_DATA_SERVICES.forEach(selectDataService -> { + List stringList = selectDataService.handle(field.getAnnotation(ExcelColumnSelect.class).value()); + if (CollUtil.isEmpty(stringList)) { + return; + } + selectMap.add(new KeyValue<>(colIndex, stringList)); + }); } @Override @@ -65,7 +97,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { // 2. 创建数据字典的 sheet 页 Sheet dictSheet = workbook.createSheet(DICT_SHEET_NAME); - for (KeyValue> keyValue : selectMap) { + for (KeyValue> keyValue : selectMap) { int rowLength = keyValue.getValue().size(); // 2.1 设置字典 sheet 页的值 每一列一个字典项 for (int i = 0; i < rowLength; i++) { @@ -73,7 +105,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { if (row == null) { row = dictSheet.createRow(i); } - row.createCell(keyValue.getKey().getColNum()).setCellValue(keyValue.getValue().get(i)); + row.createCell(keyValue.getKey()).setCellValue(keyValue.getValue().get(i)); } // 2.2 设置单元格下拉选择 setColumnSelect(writeSheetHolder, workbook, helper, keyValue); @@ -84,10 +116,10 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { * 设置单元格下拉选择 */ private static void setColumnSelect(WriteSheetHolder writeSheetHolder, Workbook workbook, DataValidationHelper helper, - KeyValue> keyValue) { + KeyValue> keyValue) { // 1.1 创建可被其他单元格引用的名称 Name name = workbook.createName(); - String excelColumn = keyValue.getKey().name(); + String excelColumn = ALPHABET.get(keyValue.getKey()); // 1.2 下拉框数据来源 eg:字典sheet!$B1:$B2 String refers = DICT_SHEET_NAME + "!$" + excelColumn + "$1:$" + excelColumn + "$" + keyValue.getValue().size(); name.setNameName("dict" + keyValue.getKey()); // 设置名称的名字 @@ -97,7 +129,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { DataValidationConstraint constraint = helper.createFormulaListConstraint("dict" + keyValue.getKey()); // 设置引用约束 // 设置下拉单元格的首行、末行、首列、末列 CellRangeAddressList rangeAddressList = new CellRangeAddressList(FIRST_ROW, LAST_ROW, - keyValue.getKey().getColNum(), keyValue.getKey().getColNum()); + keyValue.getKey(), keyValue.getKey()); DataValidation validation = helper.createValidation(constraint, rangeAddressList); if (validation instanceof HSSFDataValidation) { validation.setSuppressDropDownArrow(false); @@ -112,4 +144,28 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { writeSheetHolder.getSheet().addValidationData(validation); } + public static Map getFieldsWithAnnotation(Class clazz, Class annotationClass) { + Map annotatedFields = new LinkedHashMap<>(); + Field[] fields = clazz.getDeclaredFields(); + for (Field field : fields) { + if (field.isAnnotationPresent(annotationClass)) { + annotatedFields.put(field.getName(), field); + } + } + return annotatedFields; + } + + + private static List getExcelColumnNameList() { + ArrayList strings = new ArrayList<>(); + for (int i = 1; i <= 52; i++) { // 生成 52 列名称,需要更多请重写此方法 + if (i <= 26) { + strings.add(String.valueOf((char) ('A' + i - 1))); // 使用 ASCII 码值转字母 + } else { + strings.add(String.valueOf((char) ('A' + (i - 1) / 26 - 1)) + (char) ('A' + (i - 1) % 26)); + } + } + return strings; + } + } \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java new file mode 100644 index 0000000000..987cf79298 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.framework.excel.core.service; + +import cn.hutool.core.util.StrUtil; + +import java.util.Collections; +import java.util.List; + +/** + * Excel 列下拉数据源获取接口 + * + * 为什么不直接解析字典还搞个接口?考虑到有的下拉数据不是从字典中获取的所有需要做一个兼容 + * + * @author HUIHUI + */ +public interface ExcelColumnSelectDataService { + + /** + * 获得方法名称 + * + * @return 方法名称 + */ + String getFunctionName(); + + /** + * 获得列下拉数据源 + * + * @return 下拉数据源 + */ + List getSelectDataList(); + + default List handle(String funcName) { + if (StrUtil.isEmptyIfStr(funcName) || !StrUtil.equals(getFunctionName(), funcName)) { + return Collections.emptyList(); + } + return getSelectDataList(); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java index 81d9a8a978..f5c4b83139 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java @@ -1,7 +1,5 @@ package cn.iocoder.yudao.framework.excel.core.util; -import cn.iocoder.yudao.framework.common.core.KeyValue; -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; import cn.iocoder.yudao.framework.excel.core.handler.SelectSheetWriteHandler; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.converters.longconverter.LongStringConverter; @@ -34,27 +32,11 @@ public class ExcelUtils { */ public static void write(HttpServletResponse response, String filename, String sheetName, Class head, List data) throws IOException { - write(response, filename, sheetName, head, data, null); - } - - /** - * 将列表以 Excel 响应给前端 - * - * @param response 响应 - * @param filename 文件名 - * @param sheetName Excel sheet 名 - * @param head Excel head 头 - * @param data 数据列表哦 - * @param selectMap 下拉选择数据 Map<下拉所对应的列表名,下拉数据> - * @throws IOException 写入失败的情况 - */ - public static void write(HttpServletResponse response, String filename, String sheetName, - Class head, List data, List>> selectMap) throws IOException { // 输出 Excel EasyExcel.write(response.getOutputStream(), head) .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 基于 column 长度,自动适配。最大 255 宽度 - .registerWriteHandler(new SelectSheetWriteHandler(selectMap)) // 基于固定 sheet 实现下拉框 + .registerWriteHandler(new SelectSheetWriteHandler(head)) // 基于固定 sheet 实现下拉框 .registerConverter(new LongStringConverter()) // 避免 Long 类型丢失精度 .sheet(sheetName).doWrite(data); // 设置 header 和 contentType。写在最后的原因是,避免报错时,响应 contentType 已经被修改了 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index e784447b25..eea4ed147e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.common.core.KeyValue; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -10,9 +9,7 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer.*; @@ -38,7 +35,6 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.time.LocalDateTime; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -49,7 +45,6 @@ import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; import static java.util.Collections.singletonList; @Tag(name = "管理后台 - CRM 客户") @@ -266,25 +261,7 @@ public class CrmCustomerController { .areaId(null).detailAddress("").remark("").build() ); // 输出 - ExcelUtils.write(response, "客户导入模板.xls", "客户列表", CrmCustomerImportExcelVO.class, list, builderSelectMap()); - } - - private List>> builderSelectMap() { - List>> selectMap = new ArrayList<>(); - // 获取地区下拉数据 - // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? - Area area = AreaUtils.parseArea(Area.ID_CHINA); - selectMap.add(new KeyValue<>(ExcelColumn.G, AreaUtils.getAreaNodePathList(area.getChildren()))); - // 获取客户所属行业 - List customerIndustries = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); - selectMap.add(new KeyValue<>(ExcelColumn.I, customerIndustries)); - // 获取客户等级 - List customerLevels = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_LEVEL); - selectMap.add(new KeyValue<>(ExcelColumn.J, customerLevels)); - // 获取客户来源 - List customerSources = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_SOURCE); - selectMap.add(new KeyValue<>(ExcelColumn.K, customerSources)); - return selectMap; + ExcelUtils.write(response, "客户导入模板.xls", "客户列表", CrmCustomerImportExcelVO.class, list); } @PostMapping("/import") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java index 2c39472fd6..4b5fbefbd7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java @@ -1,8 +1,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; import cn.iocoder.yudao.framework.excel.core.convert.AreaConvert; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.crm.framework.excel.service.AreaExcelColumnSelectDataServiceImpl; +import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerIndustryExcelColumnSelectDataServiceImpl; +import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerLevelExcelColumnSelectDataServiceImpl; +import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerSourceExcelColumnSelectDataServiceImpl; import com.alibaba.excel.annotation.ExcelProperty; import lombok.AllArgsConstructor; import lombok.Builder; @@ -41,6 +46,7 @@ public class CrmCustomerImportExcelVO { private String email; @ExcelProperty(value = "地区", converter = AreaConvert.class) + @ExcelColumnSelect(AreaExcelColumnSelectDataServiceImpl.FUNCTION_NAME) private Integer areaId; @ExcelProperty("详细地址") @@ -48,14 +54,17 @@ public class CrmCustomerImportExcelVO { @ExcelProperty(value = "所属行业", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_INDUSTRY) + @ExcelColumnSelect(CrmCustomerIndustryExcelColumnSelectDataServiceImpl.FUNCTION_NAME) private Integer industryId; @ExcelProperty(value = "客户等级", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_LEVEL) + @ExcelColumnSelect(CrmCustomerLevelExcelColumnSelectDataServiceImpl.FUNCTION_NAME) private Integer level; @ExcelProperty(value = "客户来源", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_SOURCE) + @ExcelColumnSelect(CrmCustomerSourceExcelColumnSelectDataServiceImpl.FUNCTION_NAME) private Integer source; @ExcelProperty("备注") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java new file mode 100644 index 0000000000..8b54b9f555 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.crm.framework.excel; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java new file mode 100644 index 0000000000..c6a6534498 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.crm.framework.excel.service; + +import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Excel 所属地区列下拉数据源获取接口实现类 + * + * @author HUIHUI + */ +@Service +public class AreaExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { + + public static final String FUNCTION_NAME = "getCrmAreaNameList"; // 防止和别的模块重名 + + @Resource + private DictDataApi dictDataApi; + + @Override + public String getFunctionName() { + return FUNCTION_NAME; + } + + @Override + public List getSelectDataList() { + // 获取地区下拉数据 + // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? + Area area = AreaUtils.parseArea(Area.ID_CHINA); + return AreaUtils.getAreaNodePathList(area.getChildren()); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java new file mode 100644 index 0000000000..8a78104bf3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.crm.framework.excel.service; + +import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; + +import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_INDUSTRY; + +/** + * Excel 客户所属行业列下拉数据源获取接口实现类 + * + * @author HUIHUI + */ +@Service +public class CrmCustomerIndustryExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { + + public static final String FUNCTION_NAME = "getCrmCustomerIndustryList"; + + @Resource + private DictDataApi dictDataApi; + + @Override + public String getFunctionName() { + return FUNCTION_NAME; + } + + @Override + public List getSelectDataList() { + return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java new file mode 100644 index 0000000000..5948aa4270 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.crm.framework.excel.service; + +import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; + +import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_LEVEL; + +/** + * Excel 客户等级列下拉数据源获取接口实现类 + * + * @author HUIHUI + */ +@Service +public class CrmCustomerLevelExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { + + public static final String FUNCTION_NAME = "getCrmCustomerLevelList"; + + @Resource + private DictDataApi dictDataApi; + + @Override + public String getFunctionName() { + return FUNCTION_NAME; + } + + @Override + public List getSelectDataList() { + return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_LEVEL); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java new file mode 100644 index 0000000000..c160ed90fd --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.crm.framework.excel.service; + +import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; + +import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_SOURCE; + +/** + * Excel 客户来源列下拉数据源获取接口实现类 + * + * @author HUIHUI + */ +@Service +public class CrmCustomerSourceExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { + + public static final String FUNCTION_NAME = "getCrmCustomerSourceList"; + + @Resource + private DictDataApi dictDataApi; + + @Override + public String getFunctionName() { + return FUNCTION_NAME; + } + + @Override + public List getSelectDataList() { + return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_SOURCE); + } + +} -- Gitee From c3337f21cebf86eae18b1ad9186e3d03b98840c4 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 28 Feb 2024 00:07:25 +0800 Subject: [PATCH 0003/1557] =?UTF-8?q?fix=EF=BC=9A=E4=B8=BB=E5=AD=90?= =?UTF-8?q?=E8=A1=A8=20props?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codegen/vue3/views/components/list_sub_erp.vue.vm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/components/list_sub_erp.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/components/list_sub_erp.vue.vm index 71a7511beb..3f0710e01c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/components/list_sub_erp.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/components/list_sub_erp.vue.vm @@ -94,7 +94,7 @@ const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 const props = defineProps<{ - ${subJoinColumn.javaField}: undefined // ${subJoinColumn.columnComment}(主表的关联字段) + ${subJoinColumn.javaField}?: number // ${subJoinColumn.columnComment}(主表的关联字段) }>() const loading = ref(false) // 列表的加载中 const list = ref([]) // 列表的数据 @@ -103,17 +103,20 @@ const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, pageSize: 10, - ${subJoinColumn.javaField}: undefined + ${subJoinColumn.javaField}: undefined as unknown }) /** 监听主表的关联字段的变化,加载对应的子表数据 */ watch( () => props.${subJoinColumn.javaField}, - (val) => { + (val: number) => { + if (!val) { + return + } queryParams.${subJoinColumn.javaField} = val handleQuery() }, - { immediate: false } + { immediate: true, deep: true } ) #end -- Gitee From 720b54c353cc199d86aae346ecacce7c471070f0 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 28 Feb 2024 11:25:06 +0800 Subject: [PATCH 0004/1557] =?UTF-8?q?CRM:=20=E5=AE=8C=E5=96=84=E5=9B=9E?= =?UTF-8?q?=E6=AC=BE=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/crm/enums/ErrorCodeConstants.java | 2 + .../module/crm/enums/LogRecordConstants.java | 6 +-- .../vo/plan/CrmReceivablePlanRespVO.java | 19 ++++++++- .../vo/receivable/CrmReceivableRespVO.java | 21 +++++++++- .../contract/CrmContractServiceImpl.java | 11 ++++- .../receivable/CrmReceivableService.java | 8 ++++ .../receivable/CrmReceivableServiceImpl.java | 40 +++++++++++++------ 7 files changed, 87 insertions(+), 20 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java index a15a3211b4..5d942d8754 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java @@ -15,6 +15,7 @@ public interface ErrorCodeConstants { ErrorCode CONTRACT_SUBMIT_FAIL_NOT_DRAFT = new ErrorCode(1_020_000_002, "合同提交审核失败,原因:合同没处在未提交状态"); ErrorCode CONTRACT_UPDATE_AUDIT_STATUS_FAIL_NOT_PROCESS = new ErrorCode(1_020_000_003, "更新合同审核状态失败,原因:合同不是审核中状态"); ErrorCode CONTRACT_NO_EXISTS = new ErrorCode(1_020_000_004, "生成合同序列号重复,请重试"); + ErrorCode CONTRACT_DELETE_FAIL = new ErrorCode(1_020_000_005, "删除合同失败,原因:有被回款所使用"); // ========== 线索管理 1-020-001-000 ========== ErrorCode CLUE_NOT_EXISTS = new ErrorCode(1_020_001_000, "线索不存在"); @@ -40,6 +41,7 @@ public interface ErrorCodeConstants { ErrorCode RECEIVABLE_NO_EXISTS = new ErrorCode(1_020_004_005, "生成回款序列号重复,请重试"); ErrorCode RECEIVABLE_CREATE_FAIL_CONTRACT_NOT_APPROVE = new ErrorCode(1_020_004_006, "创建回款失败,原因:合同不是审核通过状态"); ErrorCode RECEIVABLE_CREATE_FAIL_PRICE_EXCEEDS_LIMIT = new ErrorCode(1_020_004_007, "创建回款失败,原因:回款金额超出合同金额,目前剩余可退:{} 元"); + ErrorCode RECEIVABLE_DELETE_FAIL_IS_APPROVE = new ErrorCode(1_020_004_008, "删除回款失败,原因:回款审批已通过"); // ========== 回款计划 1-020-005-000 ========== ErrorCode RECEIVABLE_PLAN_NOT_EXISTS = new ErrorCode(1_020_005_000, "回款计划不存在"); diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/LogRecordConstants.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/LogRecordConstants.java index c2c835b7f1..aeeed316dd 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/LogRecordConstants.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/LogRecordConstants.java @@ -142,11 +142,11 @@ public interface LogRecordConstants { String CRM_RECEIVABLE_TYPE = "CRM 回款"; String CRM_RECEIVABLE_CREATE_SUB_TYPE = "创建回款"; - String CRM_RECEIVABLE_CREATE_SUCCESS = "创建了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款"; + String CRM_RECEIVABLE_CREATE_SUCCESS = "创建了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款"; String CRM_RECEIVABLE_UPDATE_SUB_TYPE = "更新回款"; - String CRM_RECEIVABLE_UPDATE_SUCCESS = "更新了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款: {_DIFF{#updateReqVO}}"; + String CRM_RECEIVABLE_UPDATE_SUCCESS = "更新了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款: {_DIFF{#updateReqVO}}"; String CRM_RECEIVABLE_DELETE_SUB_TYPE = "删除回款"; - String CRM_RECEIVABLE_DELETE_SUCCESS = "删除了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款"; + String CRM_RECEIVABLE_DELETE_SUCCESS = "删除了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款"; String CRM_RECEIVABLE_SUBMIT_SUB_TYPE = "提交回款审批"; String CRM_RECEIVABLE_SUBMIT_SUCCESS = "提交编号为【{{#receivableNo}}】的回款审批成功"; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanRespVO.java index 1c58766e1e..ad1ce3a7b7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanRespVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -8,53 +9,69 @@ import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; -// TODO @puhui999:缺导出 @Schema(description = "管理后台 - CRM 回款计划 Response VO") @Data +@ExcelIgnoreUnannotated public class CrmReceivablePlanRespVO { @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("编号") private Long id; @Schema(description = "期数", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("期数") private Integer period; @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("客户编号") private Long customerId; @Schema(description = "客户名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "test") + @ExcelProperty("客户名字") private String customerName; @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("合同编号") private Long contractId; @Schema(description = "合同编号", example = "Q110") + @ExcelProperty("合同编号") private String contractNo; @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("负责人编号") private Long ownerUserId; @Schema(description = "负责人", example = "test") + @ExcelProperty("负责人") private String ownerUserName; @Schema(description = "计划回款日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02") + @ExcelProperty("计划回款日期") private LocalDateTime returnTime; @Schema(description = "计划回款方式", example = "1") + @ExcelProperty("计划回款方式") private Integer returnType; @Schema(description = "计划回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000") + @ExcelProperty("计划回款金额") private BigDecimal price; @Schema(description = "回款编号", example = "19852") + @ExcelProperty("回款编号") private Long receivableId; @Schema(description = "回款信息") + @ExcelProperty("回款信息") private CrmReceivableRespVO receivable; @Schema(description = "提前几天提醒", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("提前几天提醒") private Integer remindDays; @Schema(description = "提醒日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02") + @ExcelProperty("提醒日期") private LocalDateTime remindTime; @Schema(description = "备注", example = "备注") + @ExcelProperty("备注") private String remark; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableRespVO.java index a9fcb1b8b1..12dcbaa026 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableRespVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable; import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -8,37 +9,47 @@ import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; -// TODO 芋艿:导出的 VO,可以考虑使用 @Excel 注解,实现导出功能 @Schema(description = "管理后台 - CRM 回款 Response VO") @Data +@ExcelIgnoreUnannotated public class CrmReceivableRespVO { @Schema(description = "编号", example = "25787") + @ExcelProperty("编号") private Long id; @Schema(description = "回款编号", example = "31177") + @ExcelProperty("回款编号") private String no; @Schema(description = "回款计划编号", example = "1024") + @ExcelProperty("回款计划编号") private Long planId; @Schema(description = "回款方式", example = "2") + @ExcelProperty("回款方式") private Integer returnType; @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000") + @ExcelProperty("回款金额") private BigDecimal price; @Schema(description = "计划回款日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02") + @ExcelProperty("计划回款日期") private LocalDateTime returnTime; @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("客户编号") private Long customerId; @Schema(description = "客户名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "test") + @ExcelProperty("客户名字") private String customerName; @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("合同编号") private Long contractId; @Schema(description = "合同信息") + @ExcelProperty("合同信息") private CrmContractRespVO contract; @Schema(description = "负责人的用户编号", example = "25682") @@ -56,20 +67,26 @@ public class CrmReceivableRespVO { private String processInstanceId; @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") + @ExcelProperty("审批状态") private Integer auditStatus; - @Schema(description = "备注", example = "备注") + @Schema(description = "工作流编号", example = "备注") + @ExcelProperty("工作流编号") private String remark; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") private LocalDateTime createTime; @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("更新时间") private LocalDateTime updateTime; @Schema(description = "创建人", example = "25682") + @ExcelProperty("创建人") private String creator; @Schema(description = "创建人名字", example = "test") + @ExcelProperty("创建人名字") private String creatorName; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index e8a8dbf59f..8ef0d84bb5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -30,12 +30,14 @@ import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; import cn.iocoder.yudao.module.crm.service.product.CrmProductService; +import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import com.mzt.logapi.context.LogRecordContext; import com.mzt.logapi.service.impl.DiffParseFunction; import com.mzt.logapi.starter.annotation.LogRecord; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -86,7 +88,9 @@ public class CrmContractServiceImpl implements CrmContractService { private CrmContactService contactService; @Resource private CrmContractConfigService contractConfigService; - + @Resource + @Lazy // 延迟加载,避免循环依赖 + private CrmReceivableService receivableService; @Resource private AdminUserApi adminUserApi; @Resource @@ -222,9 +226,12 @@ public class CrmContractServiceImpl implements CrmContractService { success = CRM_CONTRACT_DELETE_SUCCESS) @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#id", level = CrmPermissionLevelEnum.OWNER) public void deleteContract(Long id) { - // TODO @puhui999:如果被 CrmReceivableDO 所使用,则不允许删除 // 校验存在 CrmContractDO contract = validateContractExists(id); + // 如果被 CrmReceivableDO 所使用,则不允许删除 + if (CollUtil.isNotEmpty(receivableService.getReceivableByContractId(contract.getId()))) { + throw exception(CONTRACT_DELETE_FAIL); + } // 删除 contractMapper.deleteById(id); // 删除数据权限 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java index c0ca645b2b..a07f33a750 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java @@ -122,4 +122,12 @@ public interface CrmReceivableService { */ Map getReceivablePriceMapByContractId(Collection contractIds); + /** + * 更具合同编号查询回款列表 + * + * @param contractId 合同编号 + * @return 回款 + */ + List getReceivableByContractId(Long contractId); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java index 7ef96effa4..516556bc96 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java @@ -37,10 +37,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.*; @@ -81,7 +78,6 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { @Resource private BpmProcessInstanceApi bpmProcessInstanceApi; - // TODO @puhui999:操作日志没记录上 @Override @Transactional(rollbackFor = Exception.class) @LogRecord(type = CRM_RECEIVABLE_TYPE, subType = CRM_RECEIVABLE_CREATE_SUB_TYPE, bizNo = "{{#receivable.id}}", @@ -115,6 +111,7 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { // 5. 记录操作日志上下文 LogRecordContext.putVariable("receivable", receivable); + LogRecordContext.putVariable("period", getReceivablePeriod(receivable.getPlanId())); return receivable.getId(); } @@ -156,7 +153,6 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { } } - // TODO @puhui999:操作日志没记录上 @Override @Transactional(rollbackFor = Exception.class) @LogRecord(type = CRM_RECEIVABLE_TYPE, subType = CRM_RECEIVABLE_UPDATE_SUB_TYPE, bizNo = "{{#updateReqVO.id}}", @@ -165,10 +161,13 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { public void updateReceivable(CrmReceivableSaveReqVO updateReqVO) { Assert.notNull(updateReqVO.getId(), "回款编号不能为空"); updateReqVO.setOwnerUserId(null).setCustomerId(null).setContractId(null).setPlanId(null); // 不允许修改的字段 - // 1.1 校验可回款金额超过上限 - validateReceivablePriceExceedsLimit(updateReqVO); - // 1.2 校验存在 + // 1.1 校验存在 CrmReceivableDO receivable = validateReceivableExists(updateReqVO.getId()); + updateReqVO.setOwnerUserId(receivable.getOwnerUserId()).setCustomerId(receivable.getCustomerId()) + .setContractId(receivable.getContractId()).setPlanId(receivable.getPlanId()); // 设置已存在的值 + // 1.2 校验可回款金额超过上限 + validateReceivablePriceExceedsLimit(updateReqVO); + // 1.3 只有草稿、审批中,可以编辑; if (!ObjectUtils.equalsAny(receivable.getAuditStatus(), CrmAuditStatusEnum.DRAFT.getStatus(), CrmAuditStatusEnum.PROCESS.getStatus())) { @@ -180,8 +179,17 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { receivableMapper.updateById(updateObj); // 3. 记录操作日志上下文 - LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(receivable, CrmReceivableSaveReqVO.class)); LogRecordContext.putVariable("receivable", receivable); + LogRecordContext.putVariable("period", getReceivablePeriod(receivable.getPlanId())); + LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(receivable, CrmReceivableSaveReqVO.class)); + } + + private Integer getReceivablePeriod(Long planId) { + if (Objects.isNull(planId)) { + return null; + } + CrmReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(planId); + return receivablePlan.getPeriod(); } @Override @@ -212,8 +220,10 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { if (receivable.getPlanId() != null && receivablePlanService.getReceivablePlan(receivable.getPlanId()) != null) { throw exception(RECEIVABLE_DELETE_FAIL); } - // TODO @puhui999:审批通过时,不允许删除; - + // 1.3 审批通过时,不允许删除 + if (ObjUtil.equal(receivable.getAuditStatus(), CrmAuditStatusEnum.APPROVE.getStatus())) { + throw exception(RECEIVABLE_DELETE_FAIL_IS_APPROVE); + } // 2. 删除 receivableMapper.deleteById(id); // 3. 删除数据权限 @@ -221,6 +231,7 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { // 4. 记录操作日志上下文 LogRecordContext.putVariable("receivable", receivable); + LogRecordContext.putVariable("period", getReceivablePeriod(receivable.getPlanId())); } @Override @@ -289,4 +300,9 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { return receivableMapper.selectReceivablePriceMapByContractId(contractIds); } + @Override + public List getReceivableByContractId(Long contractId) { + return receivableMapper.selectList(CrmReceivableDO::getContractId, contractId); + } + } -- Gitee From 7d120a2f3699d402c6f1d1424c57bee8fb27a78d Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 28 Feb 2024 21:41:10 +0800 Subject: [PATCH 0005/1557] =?UTF-8?q?feat:=20CRM/=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1/=E5=AE=A2=E6=88=B7=E6=80=BB=E9=87=8F?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.http | 19 +++ .../CrmStatisticsCustomerController.java | 44 +++++++ .../CrmStatisticsCustomerCountVO.java | 28 ++++ .../customer/CrmStatisticsCustomerReqVO.java | 47 +++++++ .../CrmStatisticsCustomerMapper.java | 21 +++ .../CrmStatisticsCustomerService.java | 31 +++++ .../CrmStatisticsCustomerServiceImpl.java | 124 ++++++++++++++++++ .../CrmStatisticsCustomerMapper.xml | 46 +++++++ 8 files changed, 360 insertions(+) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http new file mode 100644 index 0000000000..70a4fd43d3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -0,0 +1,19 @@ +### 新建客户总量分析(按日) +GET {{baseUrl}}/crm/statistics-customer/get-total-customer-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 新建客户总量分析(按月) +GET {{baseUrl}}/crm/statistics-customer/get-total-customer-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 成交客户总量分析(按日) +GET {{baseUrl}}/crm/statistics-customer/get-deal-total-customer-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 成交客户总量分析(按月) +GET {{baseUrl}}/crm/statistics-customer/get-deal-total-customer-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java new file mode 100644 index 0000000000..cecddd294c --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsCustomerService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - CRM 数据统计 员工客户分析") +@RestController +@RequestMapping("/crm/statistics-customer") +@Validated +public class CrmStatisticsCustomerController { + + @Resource + private CrmStatisticsCustomerService customerService; + + @GetMapping("/get-total-customer-count") + @Operation(summary = "获得新建客户数量") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getTotalCustomerCount(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getTotalCustomerCount(reqVO)); + } + + @GetMapping("/get-deal-total-customer-count") + @Operation(summary = "获得成交客户数量") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getDealTotalCustomerCount(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getDealTotalCustomerCount(reqVO)); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java new file mode 100644 index 0000000000..01dbd6fc2b --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + + +@Schema(description = "管理后台 - CRM 数据统计 员工客户分析 VO") +@Data +public class CrmStatisticsCustomerCountVO { + + /** + * 时间轴 + *

+ * group by DATE_FORMAT(create_date, '%Y%m') + */ + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String category; + + /** + * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 + *

+ * 1. 金额:合同金额排行、回款金额排行 + * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 + */ + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer count; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java new file mode 100644 index 0000000000..62828162b3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - CRM 数据统计 员工客户分析 Request VO") +@Data +public class CrmStatisticsCustomerReqVO { + + @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "部门 id 不能为空") + private Long deptId; + + /** + * 负责人用户 id, 当用户为空, 则计算部门下用户 + */ + @Schema(description = "负责人用户 id", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + private Long userId; + + /** + * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 + *

+ * 后续,可能会支持选择部分用户进行查询 + */ + @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") + private List userIds; + + @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @NotEmpty(message = "时间范围不能为空") + private LocalDateTime[] times; + + /** + * group by DATE_FORMAT(field, #{dateFormat}) + */ + @Schema(description = "Group By 日期格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "%Y%m") + private String sqlDateFormat; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java new file mode 100644 index 0000000000..062110db8a --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * CRM 数据统计 员工客户分析 Mapper + * + * @author dhb52 + */ +@Mapper +public interface CrmStatisticsCustomerMapper { + + List selectCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + + List selectDealCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java new file mode 100644 index 0000000000..b1688b55be --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; + +import java.util.List; + +/** + * CRM 数据统计 员工客户分析 Service 接口 + * + * @author dhb52 + */ +public interface CrmStatisticsCustomerService { + + /** + * 获取新建客户数量 + * + * @param reqVO 请求参数 + * @return 新建客户数量统计 + */ + List getTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取成交客户数量 + * + * @param reqVO 请求参数 + * @return 成交客户数量统计 + */ + List getDealTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java new file mode 100644 index 0000000000..e154382bee --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -0,0 +1,124 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.time.LocalDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; + +/** + * CRM 数据统计 员工客户分析 Service 实现类 + * + * @author dhb52 + */ +@Service +@Validated +public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerService { + + @Resource + private CrmStatisticsCustomerMapper customerMapper; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + + @Override + public List getTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO) { + return getStat(reqVO, customerMapper::selectCustomerCountGroupbyDate); + } + + @Override + public List getDealTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO) { + return getStat(reqVO, customerMapper::selectDealCustomerCountGroupbyDate); + } + + /** + * 获得统计数据 + * + * @param reqVO 参数 + * @param statFunction 统计方法 + * @return 统计数据 + */ + private List getStat(CrmStatisticsCustomerReqVO reqVO, Function> statFunction) { + // 1. 获得用户编号数组: 如果用户编号为空, 则获得部门下的用户编号数组 + if (ObjUtil.isNotNull(reqVO.getUserId())) { + reqVO.setUserIds(List.of(reqVO.getUserId())); + } else { + reqVO.setUserIds(getUserIds(reqVO.getDeptId())); + } + if (CollUtil.isEmpty(reqVO.getUserIds())) { + return Collections.emptyList(); + } + + // 2. 生成日期格式 + LocalDateTime startTime = reqVO.getTimes()[0]; + final LocalDateTime endTime = reqVO.getTimes()[1]; + final long days = LocalDateTimeUtil.between(startTime, endTime).toDays(); + boolean byMonth = days > 31; + if (byMonth) { + // 按月 + reqVO.setSqlDateFormat("%Y%m"); + } else { + // 按日 + reqVO.setSqlDateFormat("%Y%m%d"); + } + + // 3. 获得排行数据 + List stats = statFunction.apply(reqVO); + + // 4. 生成时间序列 + List result = CollUtil.newArrayList(); + while (startTime.compareTo(endTime) <= 0) { + final String category = LocalDateTimeUtil.format(startTime, byMonth ? "yyyyMM" : "yyyyMMdd"); + result.add(new CrmStatisticsCustomerCountVO().setCategory(category).setCount(0)); + if (byMonth) + startTime = startTime.plusMonths(1); + else + startTime = startTime.plusDays(1); + } + + // 5. 使用时间序列填充结果 + final Map statMap = convertMap(stats, + CrmStatisticsCustomerCountVO::getCategory, + CrmStatisticsCustomerCountVO::getCount); + result.forEach(r -> { + if (statMap.containsKey(r.getCategory())) { + r.setCount(statMap.get(r.getCategory())); + } + }); + + return result; + } + + + /** + * 获得部门下的用户编号数组,包括子部门的 + * + * @param deptId 部门编号 + * @return 用户编号数组 + */ + public List getUserIds(Long deptId) { + // 1. 获得部门列表 + List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); + deptIds.add(deptId); + // 2. 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); + } +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml new file mode 100644 index 0000000000..e4d2487ce6 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + -- Gitee From a0b413b3a3cf42dc1ba3c238b436a2da3be7ed04 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 28 Feb 2024 21:41:53 +0800 Subject: [PATCH 0006/1557] =?UTF-8?q?refactor:=20CRM/=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1/=E6=8E=92=E8=A1=8C=E6=A6=9C=20=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsRankController.java | 42 +++++++++---------- .../vo/{ => rank}/CrmStatisticsRankReqVO.java | 6 +-- .../CrmStatisticsRankRespVO.java} | 8 ++-- ...pper.java => CrmStatisticsRankMapper.java} | 24 +++++------ ...ice.java => CrmStatisticsRankService.java} | 24 +++++------ ...java => CrmStatisticsRankServiceImpl.java} | 40 +++++++++--------- .../CrmStatisticsRankMapper.xml} | 18 ++++---- 7 files changed, 81 insertions(+), 81 deletions(-) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{ => rank}/CrmStatisticsRankReqVO.java (92%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{CrmStatisticsRanKRespVO.java => rank/CrmStatisticsRankRespVO.java} (87%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/{CrmStatisticsRankingMapper.java => CrmStatisticsRankMapper.java} (70%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/{CrmStatisticsRankingService.java => CrmStatisticsRankService.java} (69%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/{CrmStatisticsRankingServiceImpl.java => CrmStatisticsRankServiceImpl.java} (77%) rename yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/{bi/CrmBiRankingMapper.xml => statistics/CrmStatisticsRankMapper.xml} (92%) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java index e4cf61f7a3..fe79b1d3c5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; -import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsRankingService; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankReqVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsRankService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; @@ -19,69 +19,69 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Tag(name = "管理后台 - CRM 排行榜统计") +@Tag(name = "管理后台 - CRM 数据统计 排行榜统计") @RestController @RequestMapping("/crm/statistics-rank") @Validated public class CrmStatisticsRankController { @Resource - private CrmStatisticsRankingService rankingService; + private CrmStatisticsRankService rankService; @GetMapping("/get-contract-price-rank") @Operation(summary = "获得合同金额排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getContractPriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getContractPriceRank(rankingReqVO)); + public CommonResult> getContractPriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getContractPriceRank(rankingReqVO)); } @GetMapping("/get-receivable-price-rank") @Operation(summary = "获得回款金额排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getReceivablePriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getReceivablePriceRank(rankingReqVO)); + public CommonResult> getReceivablePriceRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getReceivablePriceRank(rankingReqVO)); } @GetMapping("/get-contract-count-rank") @Operation(summary = "获得签约合同数量排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getContractCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getContractCountRank(rankingReqVO)); + public CommonResult> getContractCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getContractCountRank(rankingReqVO)); } @GetMapping("/get-product-sales-rank") @Operation(summary = "获得产品销量排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getProductSalesRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getProductSalesRank(rankingReqVO)); + public CommonResult> getProductSalesRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getProductSalesRank(rankingReqVO)); } @GetMapping("/get-customer-count-rank") @Operation(summary = "获得新增客户数排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getCustomerCountRank(rankingReqVO)); + public CommonResult> getCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getCustomerCountRank(rankingReqVO)); } @GetMapping("/get-contacts-count-rank") @Operation(summary = "获得新增联系人数排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getContactsCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getContactsCountRank(rankingReqVO)); + public CommonResult> getContactsCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getContactsCountRank(rankingReqVO)); } @GetMapping("/get-follow-count-rank") @Operation(summary = "获得跟进次数排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getFollowCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getFollowCountRank(rankingReqVO)); + public CommonResult> getFollowCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getFollowCountRank(rankingReqVO)); } @GetMapping("/get-follow-customer-count-rank") @Operation(summary = "获得跟进客户数排行榜") @PreAuthorize("@ss.hasPermission('crm:statistics-rank:query')") - public CommonResult> getFollowCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { - return success(rankingService.getFollowCustomerCountRank(rankingReqVO)); + public CommonResult> getFollowCustomerCountRank(@Valid CrmStatisticsRankReqVO rankingReqVO) { + return success(rankService.getFollowCustomerCountRank(rankingReqVO)); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRankReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java similarity index 92% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRankReqVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java index 487921957c..5bd5ec295e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRankReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; @@ -11,7 +11,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = "管理后台 - CRM 排行榜统计 Request VO") +@Schema(description = "管理后台 - CRM 数据统计 排行榜统计 Request VO") @Data public class CrmStatisticsRankReqVO { @@ -21,7 +21,7 @@ public class CrmStatisticsRankReqVO { /** * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 - * + *

* 后续,可能会支持选择部分用户进行查询 */ @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRanKRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java similarity index 87% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRanKRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java index d5c865fd34..86260e74ef 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsRanKRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = "管理后台 - CRM BI 排行榜统计 Response VO") +@Schema(description = "管理后台 - CRM 数据统计 排行榜统计 Response VO") @Data -public class CrmStatisticsRanKRespVO { +public class CrmStatisticsRankRespVO { @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long ownerUserId; @@ -19,7 +19,7 @@ public class CrmStatisticsRanKRespVO { /** * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 - * + *

* 1. 金额:合同金额排行、回款金额排行 * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankingMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java similarity index 70% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankingMapper.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java index 4b51ab2fe9..b63e42ab83 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankingMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java @@ -1,18 +1,18 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankReqVO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** - * CRM 排行榜统计 Mapper + * CRM 数据统计 排行榜统计 Mapper * * @author anhaohao */ @Mapper -public interface CrmStatisticsRankingMapper { +public interface CrmStatisticsRankMapper { /** * 查询合同金额排行榜 @@ -20,7 +20,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 合同金额排行榜 */ - List selectContractPriceRank(CrmStatisticsRankReqVO rankReqVO); + List selectContractPriceRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询回款金额排行榜 @@ -28,7 +28,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 回款金额排行榜 */ - List selectReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); + List selectReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询签约合同数量排行榜 @@ -36,7 +36,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 签约合同数量排行榜 */ - List selectContractCountRank(CrmStatisticsRankReqVO rankReqVO); + List selectContractCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询产品销量排行榜 @@ -44,7 +44,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 产品销量排行榜 */ - List selectProductSalesRank(CrmStatisticsRankReqVO rankReqVO); + List selectProductSalesRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询新增客户数排行榜 @@ -52,7 +52,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 新增客户数排行榜 */ - List selectCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); + List selectCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询联系人数量排行榜 @@ -60,7 +60,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 联系人数量排行榜 */ - List selectContactsCountRank(CrmStatisticsRankReqVO rankReqVO); + List selectContactsCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询跟进次数排行榜 @@ -68,7 +68,7 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 跟进次数排行榜 */ - List selectFollowCountRank(CrmStatisticsRankReqVO rankReqVO); + List selectFollowCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 查询跟进客户数排行榜 @@ -76,6 +76,6 @@ public interface CrmStatisticsRankingMapper { * @param rankReqVO 参数 * @return 跟进客户数排行榜 */ - List selectFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); + List selectFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java similarity index 69% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingService.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java index c9455708c1..f985f53f9d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.crm.service.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankReqVO; import java.util.List; /** - * CRM 排行榜统计 Service 接口 + * CRM 数据统计 排行榜统计 Service 接口 * * @author anhaohao */ -public interface CrmStatisticsRankingService { +public interface CrmStatisticsRankService { /** * 获得合同金额排行榜 @@ -19,7 +19,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 合同金额排行榜 */ - List getContractPriceRank(CrmStatisticsRankReqVO rankReqVO); + List getContractPriceRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得回款金额排行榜 @@ -27,7 +27,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 回款金额排行榜 */ - List getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); + List getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得签约合同数量排行榜 @@ -35,7 +35,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 签约合同数量排行榜 */ - List getContractCountRank(CrmStatisticsRankReqVO rankReqVO); + List getContractCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得产品销量排行榜 @@ -43,7 +43,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 产品销量排行榜 */ - List getProductSalesRank(CrmStatisticsRankReqVO rankReqVO); + List getProductSalesRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得新增客户数排行榜 @@ -51,7 +51,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 新增客户数排行榜 */ - List getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); + List getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得联系人数量排行榜 @@ -59,7 +59,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 联系人数量排行榜 */ - List getContactsCountRank(CrmStatisticsRankReqVO rankReqVO); + List getContactsCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得跟进次数排行榜 @@ -67,7 +67,7 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 跟进次数排行榜 */ - List getFollowCountRank(CrmStatisticsRankReqVO rankReqVO); + List getFollowCountRank(CrmStatisticsRankReqVO rankReqVO); /** * 获得跟进客户数排行榜 @@ -75,6 +75,6 @@ public interface CrmStatisticsRankingService { * @param rankReqVO 排行参数 * @return 跟进客户数排行榜 */ - List getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); + List getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java similarity index 77% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingServiceImpl.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java index 428ec17637..ff2acfef5d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankingServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRanKRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsRankReqVO; -import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsRankingMapper; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankRespVO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsRankMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; @@ -23,16 +23,16 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; /** - * CRM 排行榜统计 Service 实现类 + * CRM 数据统计 排行榜统计 Service 实现类 * * @author anhaohao */ @Service @Validated -public class CrmStatisticsRankingServiceImpl implements CrmStatisticsRankingService { +public class CrmStatisticsRankServiceImpl implements CrmStatisticsRankService { @Resource - private CrmStatisticsRankingMapper rankMapper; + private CrmStatisticsRankMapper rankMapper; @Resource private AdminUserApi adminUserApi; @@ -40,64 +40,64 @@ public class CrmStatisticsRankingServiceImpl implements CrmStatisticsRankingServ private DeptApi deptApi; @Override - public List getContractPriceRank(CrmStatisticsRankReqVO rankReqVO) { + public List getContractPriceRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectContractPriceRank); } @Override - public List getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO) { + public List getReceivablePriceRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectReceivablePriceRank); } @Override - public List getContractCountRank(CrmStatisticsRankReqVO rankReqVO) { + public List getContractCountRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectContractCountRank); } @Override - public List getProductSalesRank(CrmStatisticsRankReqVO rankReqVO) { + public List getProductSalesRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectProductSalesRank); } @Override - public List getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { + public List getCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectCustomerCountRank); } @Override - public List getContactsCountRank(CrmStatisticsRankReqVO rankReqVO) { + public List getContactsCountRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectContactsCountRank); } @Override - public List getFollowCountRank(CrmStatisticsRankReqVO rankReqVO) { + public List getFollowCountRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectFollowCountRank); } @Override - public List getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { + public List getFollowCustomerCountRank(CrmStatisticsRankReqVO rankReqVO) { return getRank(rankReqVO, rankMapper::selectFollowCustomerCountRank); } /** * 获得排行版数据 * - * @param rankReqVO 参数 + * @param rankReqVO 参数 * @param rankFunction 排行榜方法 * @return 排行版数据 */ - private List getRank(CrmStatisticsRankReqVO rankReqVO, Function> rankFunction) { + private List getRank(CrmStatisticsRankReqVO rankReqVO, Function> rankFunction) { // 1. 获得用户编号数组 rankReqVO.setUserIds(getUserIds(rankReqVO.getDeptId())); if (CollUtil.isEmpty(rankReqVO.getUserIds())) { return Collections.emptyList(); } // 2. 获得排行数据 - List ranks = rankFunction.apply(rankReqVO); + List ranks = rankFunction.apply(rankReqVO); if (CollUtil.isEmpty(ranks)) { return Collections.emptyList(); } - ranks.sort(Comparator.comparing(CrmStatisticsRanKRespVO::getCount).reversed()); + ranks.sort(Comparator.comparing(CrmStatisticsRankRespVO::getCount).reversed()); // 3. 拼接用户信息 appendUserInfo(ranks); return ranks; @@ -108,8 +108,8 @@ public class CrmStatisticsRankingServiceImpl implements CrmStatisticsRankingServ * * @param ranks 排行榜数据 */ - private void appendUserInfo(List ranks) { - Map userMap = adminUserApi.getUserMap(convertSet(ranks, CrmStatisticsRanKRespVO::getOwnerUserId)); + private void appendUserInfo(List ranks) { + Map userMap = adminUserApi.getUserMap(convertSet(ranks, CrmStatisticsRankRespVO::getOwnerUserId)); Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); ranks.forEach(rank -> MapUtils.findAndThen(userMap, rank.getOwnerUserId(), user -> { rank.setNickname(user.getNickname()); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiRankingMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml similarity index 92% rename from yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiRankingMapper.xml rename to yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml index c193873ce0..c82c554120 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiRankingMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml @@ -1,9 +1,9 @@ - + + resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatisticsRankRespVO"> SELECT COUNT(1) AS count, owner_user_id FROM crm_contract WHERE deleted = 0 @@ -64,7 +64,7 @@ + + + + -- Gitee From 34f68ce4c63876b02484ba30aab5b37364663232 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 1 Mar 2024 00:10:23 +0800 Subject: [PATCH 0008/1557] =?UTF-8?q?feat:=20CRM/=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1/=E5=91=98=E5=B7=A5=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=88=86=E6=9E=90=20=E5=88=9D=E7=A8=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.java | 14 +++++ .../CrmStatisticsCustomerCountVO.java | 8 ++- .../CrmStatisticsCustomerMapper.java | 4 ++ .../CrmStatisticsCustomerService.java | 16 ++++++ .../CrmStatisticsCustomerServiceImpl.java | 53 +++++++++++++++--- .../CrmStatisticsCustomerMapper.xml | 55 +++++++++++++++---- 6 files changed, 130 insertions(+), 20 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index ffd88e97ae..5644c512bd 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -55,4 +55,18 @@ public class CrmStatisticsCustomerController { return success(customerService.getDistinctRecordCount(reqVO)); } + @GetMapping("/get-record-type-count") + @Operation(summary = "获取客户跟进方式统计数") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getRecordTypeCount(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getRecordTypeCount(reqVO)); + } + + @GetMapping("/get-customer-cycle") + @Operation(summary = "获取客户成交周期") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerCycle(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerCycle(reqVO)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java index 01dbd6fc2b..a2537db9aa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java @@ -23,6 +23,12 @@ public class CrmStatisticsCustomerCountVO { * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 */ @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer count; + private Integer count = 0; + + /** + * 成交周期(天) + */ + @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") + private Double cycle = 0.0; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 1be2dc1ff8..464c521c61 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -22,4 +22,8 @@ public interface CrmStatisticsCustomerMapper { List selectDistinctRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectRecordCountGroupbyType(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerCycleGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 908f02c99a..e568816d6a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -45,4 +45,20 @@ public interface CrmStatisticsCustomerService { */ List getDistinctRecordCount(CrmStatisticsCustomerReqVO reqVO); + /** + * 获取客户跟进方式统计数 + * + * @param reqVO 请求参数 + * @return 客户跟进方式统计数 + */ + List getRecordTypeCount(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户成交周期 + * + * @param reqVO 请求参数 + * @return 客户成交周期 + */ + List getCustomerCycle(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index 08cd1c4809..94eb560d1e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -3,12 +3,14 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; @@ -21,7 +23,8 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; /** * CRM 数据统计 员工客户分析 Service 实现类 @@ -39,6 +42,8 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; + @Resource + private DictDataApi dictDataApi; @Override public List getTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO) { @@ -62,6 +67,37 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return getStat(reqVO, customerMapper::selectDistinctRecordCountGroupbyDate); } + @Override + public List getRecordTypeCount(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组: 如果用户编号为空, 则获得部门下的用户编号数组 + if (ObjUtil.isNotNull(reqVO.getUserId())) { + reqVO.setUserIds(List.of(reqVO.getUserId())); + } else { + reqVO.setUserIds(getUserIds(reqVO.getDeptId())); + } + if (CollUtil.isEmpty(reqVO.getUserIds())) { + return Collections.emptyList(); + } + + // 2. 获得排行数据 + reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); + List stats = customerMapper.selectRecordCountGroupbyType(reqVO); + + // 3. 获取字典数据 + List followUpTypes = dictDataApi.getDictDataList("crm_follow_up_type"); + final Map followUpTypeMap = convertMap(followUpTypes, DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + stats.forEach(stat -> { + stat.setCategory(followUpTypeMap.get(stat.getCategory())); + }); + + return stats; + } + + @Override + public List getCustomerCycle(CrmStatisticsCustomerReqVO reqVO) { + return getStat(reqVO, customerMapper::selectCustomerCycleGroupbyDate); + } + /** * 获得统计数据 * @@ -98,9 +134,9 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 4. 生成时间序列 List result = CollUtil.newArrayList(); - while (startTime.compareTo(endTime) <= 0) { + while (!startTime.isAfter(endTime)) { final String category = LocalDateTimeUtil.format(startTime, byMonth ? "yyyyMM" : "yyyyMMdd"); - result.add(new CrmStatisticsCustomerCountVO().setCategory(category).setCount(0)); + result.add(new CrmStatisticsCustomerCountVO().setCategory(category)); if (byMonth) startTime = startTime.plusMonths(1); else @@ -108,12 +144,13 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } // 5. 使用时间序列填充结果 - final Map statMap = convertMap(stats, - CrmStatisticsCustomerCountVO::getCategory, - CrmStatisticsCustomerCountVO::getCount); + final Map statMap = convertMap(stats, + CrmStatisticsCustomerCountVO::getCategory, + Function.identity()); result.forEach(r -> { if (statMap.containsKey(r.getCategory())) { - r.setCount(statMap.get(r.getCategory())); + r.setCount(statMap.get(r.getCategory()).getCount()) + .setCycle(statMap.get(r.getCategory()).getCycle()); } }); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index cbc87f59f3..06affccabb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -6,8 +6,8 @@ + + + + -- Gitee From a787f2a0cd17164f6cb72b417ba6dc150657bd3a Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 18:57:12 +0800 Subject: [PATCH 0009/1557] =?UTF-8?q?fix:=E7=A7=AF=E6=9C=A8=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BAExcel=E6=8A=A5=E9=94=99=EF=BC=88?= =?UTF-8?q?=E5=8C=85=E5=86=B2=E7=AA=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 16 ++++++++-------- .../yudao-module-report-biz/pom.xml | 10 ++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 3a66524bc1..8933d64a10 100644 --- a/pom.xml +++ b/pom.xml @@ -15,14 +15,14 @@ yudao-module-system yudao-module-infra - - - - - - - - + yudao-module-member + yudao-module-bpm + yudao-module-report + yudao-module-mp + yudao-module-pay + yudao-module-mall + yudao-module-crm + yudao-module-erp diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index 62aeb3ee01..f38b38e751 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -77,6 +77,16 @@ com.bstek.ureport ureport2-console + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + -- Gitee From 01695567a1ed9f27357b70b0e61f95a3be533b85 Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 18:59:11 +0800 Subject: [PATCH 0010/1557] re --- pom.xml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 8933d64a10..094dc5433b 100644 --- a/pom.xml +++ b/pom.xml @@ -15,16 +15,16 @@ yudao-module-system yudao-module-infra - yudao-module-member - yudao-module-bpm - yudao-module-report - yudao-module-mp - yudao-module-pay - yudao-module-mall - yudao-module-crm - yudao-module-erp + + + + + + + + - + ${project.artifactId} @@ -32,17 +32,17 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-snapshot + 2.0.1-jdk8-snapshot - 21 + 1.8 ${java.version} ${java.version} - 3.2.2 - 3.11.0 + 3.0.0-M5 + 3.8.1 1.5.0 1.18.30 - 3.2.2 + 2.7.18 1.5.5.Final UTF-8 @@ -93,11 +93,6 @@ ${mapstruct.version} - - false - - -parameters - -- Gitee From 6846d429c0c0fab746c588e02769194567cc2fad Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 18:59:49 +0800 Subject: [PATCH 0011/1557] re --- yudao-module-report/yudao-module-report-biz/pom.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index f38b38e751..62aeb3ee01 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -77,16 +77,6 @@ com.bstek.ureport ureport2-console - - - org.apache.poi - poi - - - org.apache.poi - poi-ooxml - - -- Gitee From 7841fba59bb70071ead10de00bc413a409d9fea2 Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 19:00:10 +0800 Subject: [PATCH 0012/1557] =?UTF-8?q?fix:=E7=A7=AF=E6=9C=A8=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BAExcel=E6=8A=A5=E9=94=99=EF=BC=88?= =?UTF-8?q?=E5=8C=85=E5=86=B2=E7=AA=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-report/yudao-module-report-biz/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index 62aeb3ee01..f38b38e751 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -77,6 +77,16 @@ com.bstek.ureport ureport2-console + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + -- Gitee From 0bd7d310a18d66df2d1b24bf7414ef2d65313262 Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 19:05:54 +0800 Subject: [PATCH 0013/1557] pom --- pom.xml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 094dc5433b..439120219a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,17 +32,17 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-jdk8-snapshot + 2.0.1-snapshot - 1.8 + 21 ${java.version} ${java.version} - 3.0.0-M5 - 3.8.1 + 3.2.2 + 3.11.0 1.5.0 1.18.30 - 2.7.18 + 3.2.2 1.5.5.Final UTF-8 @@ -93,6 +93,11 @@ ${mapstruct.version} + + false + + -parameters + -- Gitee From ca7b19c40b3f2723678c005745cde611b2e8112a Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Fri, 1 Mar 2024 19:06:24 +0800 Subject: [PATCH 0014/1557] pom --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 439120219a..3a66524bc1 100644 --- a/pom.xml +++ b/pom.xml @@ -15,16 +15,16 @@ yudao-module-system yudao-module-infra - - - - - - - - + + + + + + + + - + ${project.artifactId} -- Gitee From 379bd958400c43c3f4844b15b0ec1f4f91fd9ae2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 1 Mar 2024 23:37:07 +0800 Subject: [PATCH 0015/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=88=86=E6=9E=90=EF=BC=88=E5=AE=A2=E6=88=B7=E6=80=BB?= =?UTF-8?q?=E9=87=8F=E5=88=86=E6=9E=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/statistics/CrmStatisticsCustomerController.java | 5 +++++ .../admin/statistics/CrmStatisticsRankController.java | 2 +- .../admin/statistics/vo/rank/CrmStatisticsRankReqVO.java | 2 +- .../admin/statistics/vo/rank/CrmStatisticsRankRespVO.java | 2 +- .../crm/dal/mysql/statistics/CrmStatisticsRankMapper.java | 2 +- .../crm/service/statistics/CrmStatisticsRankService.java | 2 +- .../crm/service/statistics/CrmStatisticsRankServiceImpl.java | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 5644c512bd..b51740dafa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -18,6 +18,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +// TODO @dhb52:数据统计 员工客户分析,改成“客户统计” @Tag(name = "管理后台 - CRM 数据统计 员工客户分析") @RestController @RequestMapping("/crm/statistics-customer") @@ -27,6 +28,10 @@ public class CrmStatisticsCustomerController { @Resource private CrmStatisticsCustomerService customerService; + // TODO @dhb52:建议 getCustomerCount 和 getDealTotalCustomerCount 搞成一个接口; + // 1. 数量接口:【方法:getCustomerSummaryByDate】,VO:CrmStatisticsCustomerSummaryByDateRespVO,然后里面是 time、customerCreateCount customerDealCount + // 2. 按人统计:【方法:getCustomerSummaryByUser】,VO:CrmStatisticsCustomerSummaryByOwnerRespVO,然后里面是 ownerUserId、ownerUserName、customerCreateCount customerDealCount、contractPrice、receivablePrice;客户成交率、未回款金额、回款完成率,交给前端计算; + @GetMapping("/get-total-customer-count") @Operation(summary = "获得新建客户数量") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java index fe79b1d3c5..f3757ea28c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Tag(name = "管理后台 - CRM 数据统计 排行榜统计") +@Tag(name = "管理后台 - CRM 排行榜统计") @RestController @RequestMapping("/crm/statistics-rank") @Validated diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java index 5bd5ec295e..c9b1ae7e76 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankReqVO.java @@ -11,7 +11,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = "管理后台 - CRM 数据统计 排行榜统计 Request VO") +@Schema(description = "管理后台 - CRM 排行榜统计 Request VO") @Data public class CrmStatisticsRankReqVO { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java index 86260e74ef..101cd8bccf 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java @@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = "管理后台 - CRM 数据统计 排行榜统计 Response VO") +@Schema(description = "管理后台 - CRM 排行榜统计 Response VO") @Data public class CrmStatisticsRankRespVO { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java index b63e42ab83..d58241cf87 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsRankMapper.java @@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper; import java.util.List; /** - * CRM 数据统计 排行榜统计 Mapper + * CRM 排行榜统计 Mapper * * @author anhaohao */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java index f985f53f9d..2fc8a5be9d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankService.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank.CrmStatis import java.util.List; /** - * CRM 数据统计 排行榜统计 Service 接口 + * CRM 排行榜统计 Service 接口 * * @author anhaohao */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java index ff2acfef5d..e591c35c0c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsRankServiceImpl.java @@ -23,7 +23,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; /** - * CRM 数据统计 排行榜统计 Service 实现类 + * CRM 排行榜统计 Service 实现类 * * @author anhaohao */ -- Gitee From 1f35ef59d11a1c1d96a102aa770d5f88d79ddbfc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Mar 2024 00:25:51 +0800 Subject: [PATCH 0016/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=20excel=20?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=9A=84=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/core/handler/SelectSheetWriteHandler.java | 8 ++++++++ .../core/service/ExcelColumnSelectDataService.java | 5 +++++ .../module/crm/framework/excel/package-info.java | 1 + .../service/AreaExcelColumnSelectDataServiceImpl.java | 7 +------ .../crm/service/contract/CrmContractServiceImpl.java | 11 ++++++----- .../crm/service/receivable/CrmReceivableService.java | 1 + .../service/receivable/CrmReceivableServiceImpl.java | 7 ++++--- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index 421c592009..c50158de31 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.framework.excel.core.handler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.extra.spring.SpringUtil; +import cn.hutool.poi.excel.ExcelUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; @@ -27,7 +28,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. */ public class SelectSheetWriteHandler implements SheetWriteHandler { + // TODO @puhui999:注释哈; private static final List ALPHABET = getExcelColumnNameList(); + private static final List EXCEL_COLUMN_SELECT_DATA_SERVICES = new ArrayList<>(); /** @@ -43,6 +46,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { private static final String DICT_SHEET_NAME = "字典sheet"; + // TODO @puhui999:这个 selectMap 可以改成 Map>,然后在 afterSheetCreate 里面进行排序。这样整体的理解成本会更简单 private final List>> selectMap = new ArrayList<>(); // 使用 List + KeyValue 组合方便排序 public SelectSheetWriteHandler(Class head) { @@ -51,11 +55,14 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { if (MapUtil.isEmpty(beansMap)) { return; } + // TODO @puhui999:static 是共享。如果并发情况下,会不会存在问题? 其实 EXCEL_COLUMN_SELECT_DATA_SERVICES 不用全局声明,直接 按照 ExcelColumnSelect 去拿下就好了; if (CollUtil.isEmpty(EXCEL_COLUMN_SELECT_DATA_SERVICES) || EXCEL_COLUMN_SELECT_DATA_SERVICES.size() != beansMap.values().size()) { EXCEL_COLUMN_SELECT_DATA_SERVICES.clear(); EXCEL_COLUMN_SELECT_DATA_SERVICES.addAll(convertList(beansMap.values(), b -> b)); } + // 解析下拉数据 + // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的 Map excelPropertyFields = getFieldsWithAnnotation(head, ExcelProperty.class); Map excelColumnSelectFields = getFieldsWithAnnotation(head, ExcelColumnSelect.class); int colIndex = 0; @@ -157,6 +164,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { private static List getExcelColumnNameList() { + // TODO @puhui999:是不是可以使用 ExcelUtil.indexToColName() 替代 ArrayList strings = new ArrayList<>(); for (int i = 1; i <= 52; i++) { // 生成 52 列名称,需要更多请重写此方法 if (i <= 26) { diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java index 987cf79298..c4dc6e3bc1 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java @@ -9,11 +9,14 @@ import java.util.List; * Excel 列下拉数据源获取接口 * * 为什么不直接解析字典还搞个接口?考虑到有的下拉数据不是从字典中获取的所有需要做一个兼容 + * TODO @puhui999:是不是 @ExcelColumnSelect 可以搞两个属性,一个 dictType,一个 functionName;如果 dictType,则默认走字典,否则走 functionName + * 这样的话,ExcelColumnSelectDataService 改成 ExcelColumnSelectFunction 用于获取数据。 * * @author HUIHUI */ public interface ExcelColumnSelectDataService { + // TODO @puhui999:可以考虑改成 getName /** * 获得方法名称 * @@ -21,6 +24,7 @@ public interface ExcelColumnSelectDataService { */ String getFunctionName(); + // TODO @puhui999:可以考虑改成 getOptions;因为 select 下面是 option 哈,和前端 html 类似的标签; /** * 获得列下拉数据源 * @@ -28,6 +32,7 @@ public interface ExcelColumnSelectDataService { */ List getSelectDataList(); + // TODO @puhui999:这个建议放到 SelectSheetWriteHandler 里 default List handle(String funcName) { if (StrUtil.isEmptyIfStr(funcName) || !StrUtil.equals(getFunctionName(), funcName)) { return Collections.emptyList(); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java index 8b54b9f555..bd9cb957a7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java @@ -1 +1,2 @@ +// TODO @puhui999:在 framework 目录,保持 config 和 core 目录的风格哈; package cn.iocoder.yudao.module.crm.framework.excel; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java index c6a6534498..bd2bbd9e99 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.crm.framework.excel.service; import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import java.util.List; @@ -19,9 +17,6 @@ public class AreaExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDa public static final String FUNCTION_NAME = "getCrmAreaNameList"; // 防止和别的模块重名 - @Resource - private DictDataApi dictDataApi; - @Override public String getFunctionName() { return FUNCTION_NAME; @@ -31,7 +26,7 @@ public class AreaExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDa public List getSelectDataList() { // 获取地区下拉数据 // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? - Area area = AreaUtils.parseArea(Area.ID_CHINA); + Area area = AreaUtils.getArea(Area.ID_CHINA); return AreaUtils.getAreaNodePathList(area.getChildren()); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index ec12acfd53..1a8772415b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -226,18 +226,19 @@ public class CrmContractServiceImpl implements CrmContractService { success = CRM_CONTRACT_DELETE_SUCCESS) @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#id", level = CrmPermissionLevelEnum.OWNER) public void deleteContract(Long id) { - // 校验存在 + // 1.1 校验存在 CrmContractDO contract = validateContractExists(id); - // 如果被 CrmReceivableDO 所使用,则不允许删除 + // 1.2 如果被 CrmReceivableDO 所使用,则不允许删除 if (CollUtil.isNotEmpty(receivableService.getReceivableByContractId(contract.getId()))) { throw exception(CONTRACT_DELETE_FAIL); } - // 删除 + + // 2.1 删除合同 contractMapper.deleteById(id); - // 删除数据权限 + // 2.2 删除数据权限 crmPermissionService.deletePermission(CrmBizTypeEnum.CRM_CONTRACT.getType(), id); - // 记录操作日志上下文 + // 3. 记录操作日志上下文 LogRecordContext.putVariable("contractName", contract.getName()); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java index a07f33a750..ed84ad03f9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java @@ -122,6 +122,7 @@ public interface CrmReceivableService { */ Map getReceivablePriceMapByContractId(Collection contractIds); + // TODO @puhui999:这个搞成根据数量判断,会更好一点哈; /** * 更具合同编号查询回款列表 * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java index 516556bc96..52db93273e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java @@ -224,12 +224,13 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { if (ObjUtil.equal(receivable.getAuditStatus(), CrmAuditStatusEnum.APPROVE.getStatus())) { throw exception(RECEIVABLE_DELETE_FAIL_IS_APPROVE); } - // 2. 删除 + + // 2.1 删除回款 receivableMapper.deleteById(id); - // 3. 删除数据权限 + // 2.2 删除数据权限 permissionService.deletePermission(CrmBizTypeEnum.CRM_RECEIVABLE.getType(), id); - // 4. 记录操作日志上下文 + // 3. 记录操作日志上下文 LogRecordContext.putVariable("receivable", receivable); LogRecordContext.putVariable("period", getReceivablePeriod(receivable.getPlanId())); } -- Gitee From 1e13365ef4fee023ff119b92b7b5e2defa6f5158 Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Sat, 2 Mar 2024 13:23:54 +0800 Subject: [PATCH 0017/1557] pom --- yudao-module-report/yudao-module-report-biz/pom.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index f38b38e751..62aeb3ee01 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -77,16 +77,6 @@ com.bstek.ureport ureport2-console - - - org.apache.poi - poi - - - org.apache.poi - poi-ooxml - - -- Gitee From 29b7106985719aa727364236eff6a1185c9680fb Mon Sep 17 00:00:00 2001 From: zhanhong <283456800@qq.com> Date: Sat, 2 Mar 2024 13:26:05 +0800 Subject: [PATCH 0018/1557] =?UTF-8?q?fix:=E5=8C=85=E5=86=B2=E7=AA=81=20?= =?UTF-8?q?=E7=A7=AF=E6=9C=A8=E6=8A=A5=E8=A1=A8=20=E5=AF=BC=E5=87=BAExcel?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 7c7ca609be..c9667aea2d 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -626,6 +626,16 @@ com.bstek.ureport ureport2-console ${ureport2.version} + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + -- Gitee From f56fab932a34369b49457de7ab1569cd966710e9 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 2 Mar 2024 23:24:42 +0800 Subject: [PATCH 0019/1557] =?UTF-8?q?CRM=EF=BC=9A=E5=AE=8C=E5=96=84=20exce?= =?UTF-8?q?l=20=E5=AF=BC=E5=87=BA=20review=20=E6=8F=90=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dict/core/DictFrameworkUtils.java | 22 ++++++ .../core/annotations/ExcelColumnSelect.java | 7 +- .../function/ExcelColumnSelectFunction.java | 28 +++++++ .../core/handler/SelectSheetWriteHandler.java | 75 ++++++++++--------- .../service/ExcelColumnSelectDataService.java | 43 ----------- .../vo/customer/CrmCustomerImportExcelVO.java | 13 ++-- .../AreaExcelColumnSelectFunctionImpl.java} | 14 ++-- .../crm/framework/excel/package-info.java | 1 - ...ustryExcelColumnSelectDataServiceImpl.java | 35 --------- ...LevelExcelColumnSelectDataServiceImpl.java | 35 --------- ...ourceExcelColumnSelectDataServiceImpl.java | 35 --------- .../contract/CrmContractServiceImpl.java | 2 +- .../receivable/CrmReceivableService.java | 3 +- .../receivable/CrmReceivableServiceImpl.java | 4 +- 14 files changed, 110 insertions(+), 207 deletions(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/function/ExcelColumnSelectFunction.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/{service/AreaExcelColumnSelectDataServiceImpl.java => core/AreaExcelColumnSelectFunctionImpl.java} (56%) delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java index 9fb0f692ef..e51ef16e7f 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java @@ -11,6 +11,9 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import java.time.Duration; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; /** * 字典工具类 @@ -38,6 +41,20 @@ public class DictFrameworkUtils { }); + /** + * 针对 {@link #getDictDataLabelList(String)} 的缓存 + */ + private static final LoadingCache> GET_DICT_DATA_LIST_CACHE = CacheUtils.buildAsyncReloadingCache( + Duration.ofMinutes(1L), // 过期时间 1 分钟 + new CacheLoader>() { + + @Override + public List load(String dictType) { + return dictDataApi.getDictDataLabelList(dictType); + } + + }); + /** * 针对 {@link #parseDictDataValue(String, String)} 的缓存 */ @@ -67,6 +84,11 @@ public class DictFrameworkUtils { return GET_DICT_DATA_CACHE.get(new KeyValue<>(dictType, value)).getLabel(); } + @SneakyThrows + public static List getDictDataLabelList(String dictType) { + return GET_DICT_DATA_LIST_CACHE.get(dictType); + } + @SneakyThrows public static String parseDictDataValue(String dictType, String label) { return PARSE_DICT_DATA_CACHE.get(new KeyValue<>(dictType, label)).getValue(); diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java index 2c519523b9..5daa1e0642 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java @@ -12,9 +12,14 @@ import java.lang.annotation.*; @Inherited public @interface ExcelColumnSelect { + /** + * @return 字典类型 + */ + String dictType() default ""; + /** * @return 获取下拉数据源的方法名称 */ - String value(); + String functionName() default ""; } diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/function/ExcelColumnSelectFunction.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/function/ExcelColumnSelectFunction.java new file mode 100644 index 0000000000..51953c4631 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/function/ExcelColumnSelectFunction.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.framework.excel.core.function; + +import java.util.List; + +/** + * Excel 列下拉数据源获取接口 + * + * 为什么不直接解析字典还搞个接口?考虑到有的下拉数据不是从字典中获取的所有需要做一个兼容 + + * @author HUIHUI + */ +public interface ExcelColumnSelectFunction { + + /** + * 获得方法名称 + * + * @return 方法名称 + */ + String getName(); + + /** + * 获得列下拉数据源 + * + * @return 下拉数据源 + */ + List getOptions(); + +} diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index c50158de31..df4601b94c 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -2,15 +2,19 @@ package cn.iocoder.yudao.framework.excel.core.handler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import cn.hutool.poi.excel.ExcelUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; +import cn.iocoder.yudao.framework.dict.core.DictFrameworkUtils; import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; -import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.framework.excel.core.function.ExcelColumnSelectFunction; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.write.handler.SheetWriteHandler; import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFDataValidation; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddressList; @@ -26,13 +30,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. * * @author HUIHUI */ +@Slf4j public class SelectSheetWriteHandler implements SheetWriteHandler { - // TODO @puhui999:注释哈; - private static final List ALPHABET = getExcelColumnNameList(); - - private static final List EXCEL_COLUMN_SELECT_DATA_SERVICES = new ArrayList<>(); - /** * 数据起始行从 0 开始 * @@ -46,34 +46,35 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { private static final String DICT_SHEET_NAME = "字典sheet"; - // TODO @puhui999:这个 selectMap 可以改成 Map>,然后在 afterSheetCreate 里面进行排序。这样整体的理解成本会更简单 - private final List>> selectMap = new ArrayList<>(); // 使用 List + KeyValue 组合方便排序 + /** + * key: 列 value: 下拉数据源 + */ + private final Map> selectMap = new HashMap<>(); public SelectSheetWriteHandler(Class head) { // 加载下拉数据获取接口 - Map beansMap = SpringUtil.getBeanFactory().getBeansOfType(ExcelColumnSelectDataService.class); + Map beansMap = SpringUtil.getBeanFactory().getBeansOfType(ExcelColumnSelectFunction.class); if (MapUtil.isEmpty(beansMap)) { return; } - // TODO @puhui999:static 是共享。如果并发情况下,会不会存在问题? 其实 EXCEL_COLUMN_SELECT_DATA_SERVICES 不用全局声明,直接 按照 ExcelColumnSelect 去拿下就好了; - if (CollUtil.isEmpty(EXCEL_COLUMN_SELECT_DATA_SERVICES) || EXCEL_COLUMN_SELECT_DATA_SERVICES.size() != beansMap.values().size()) { - EXCEL_COLUMN_SELECT_DATA_SERVICES.clear(); - EXCEL_COLUMN_SELECT_DATA_SERVICES.addAll(convertList(beansMap.values(), b -> b)); - } // 解析下拉数据 - // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的 + // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的。回答:主要是用于定位到列索引 Map excelPropertyFields = getFieldsWithAnnotation(head, ExcelProperty.class); Map excelColumnSelectFields = getFieldsWithAnnotation(head, ExcelColumnSelect.class); int colIndex = 0; for (String fieldName : excelPropertyFields.keySet()) { Field field = excelColumnSelectFields.get(fieldName); if (field != null) { + // ExcelProperty 有一个自定义列索引的属性 index 兼容这个字段 + int index = field.getAnnotation(ExcelProperty.class).index(); + if (index != -1) { + colIndex = index; + } getSelectDataList(colIndex, field); } colIndex++; } - selectMap.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 } /** @@ -83,12 +84,25 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { * @param field 字段 */ private void getSelectDataList(int colIndex, Field field) { - EXCEL_COLUMN_SELECT_DATA_SERVICES.forEach(selectDataService -> { - List stringList = selectDataService.handle(field.getAnnotation(ExcelColumnSelect.class).value()); - if (CollUtil.isEmpty(stringList)) { + // 获得下拉注解信息 + ExcelColumnSelect columnSelect = field.getAnnotation(ExcelColumnSelect.class); + String dictType = columnSelect.dictType(); + if (StrUtil.isNotEmpty(dictType)) { // 情况一: 字典数据 (默认) + selectMap.put(colIndex, DictFrameworkUtils.getDictDataLabelList(dictType)); + return; + } + String functionName = columnSelect.functionName(); + if (StrUtil.isEmpty(functionName)) { // 情况二: 获取自定义数据 + log.warn("[getSelectDataList]解析下拉数据失败,参数信息 dictType[{}] functionName[{}]", dictType, functionName); + return; + } + // 获得所有的下拉数据源获取方法 + Map functionMap = SpringUtil.getApplicationContext().getBeansOfType(ExcelColumnSelectFunction.class); + functionMap.values().forEach(func -> { + if (ObjUtil.notEqual(func.getName(), functionName)) { return; } - selectMap.add(new KeyValue<>(colIndex, stringList)); + selectMap.put(colIndex, func.getOptions()); }); } @@ -101,10 +115,11 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { // 1. 获取相应操作对象 DataValidationHelper helper = writeSheetHolder.getSheet().getDataValidationHelper(); // 需要设置下拉框的 sheet 页的数据验证助手 Workbook workbook = writeWorkbookHolder.getWorkbook(); // 获得工作簿 - + List>> keyValues = convertList(selectMap.entrySet(), entry -> new KeyValue<>(entry.getKey(), entry.getValue())); + keyValues.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 // 2. 创建数据字典的 sheet 页 Sheet dictSheet = workbook.createSheet(DICT_SHEET_NAME); - for (KeyValue> keyValue : selectMap) { + for (KeyValue> keyValue : keyValues) { int rowLength = keyValue.getValue().size(); // 2.1 设置字典 sheet 页的值 每一列一个字典项 for (int i = 0; i < rowLength; i++) { @@ -126,7 +141,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { KeyValue> keyValue) { // 1.1 创建可被其他单元格引用的名称 Name name = workbook.createName(); - String excelColumn = ALPHABET.get(keyValue.getKey()); + String excelColumn = ExcelUtil.indexToColName(keyValue.getKey()); // 1.2 下拉框数据来源 eg:字典sheet!$B1:$B2 String refers = DICT_SHEET_NAME + "!$" + excelColumn + "$1:$" + excelColumn + "$" + keyValue.getValue().size(); name.setNameName("dict" + keyValue.getKey()); // 设置名称的名字 @@ -162,18 +177,4 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { return annotatedFields; } - - private static List getExcelColumnNameList() { - // TODO @puhui999:是不是可以使用 ExcelUtil.indexToColName() 替代 - ArrayList strings = new ArrayList<>(); - for (int i = 1; i <= 52; i++) { // 生成 52 列名称,需要更多请重写此方法 - if (i <= 26) { - strings.add(String.valueOf((char) ('A' + i - 1))); // 使用 ASCII 码值转字母 - } else { - strings.add(String.valueOf((char) ('A' + (i - 1) / 26 - 1)) + (char) ('A' + (i - 1) % 26)); - } - } - return strings; - } - } \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java deleted file mode 100644 index c4dc6e3bc1..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/service/ExcelColumnSelectDataService.java +++ /dev/null @@ -1,43 +0,0 @@ -package cn.iocoder.yudao.framework.excel.core.service; - -import cn.hutool.core.util.StrUtil; - -import java.util.Collections; -import java.util.List; - -/** - * Excel 列下拉数据源获取接口 - * - * 为什么不直接解析字典还搞个接口?考虑到有的下拉数据不是从字典中获取的所有需要做一个兼容 - * TODO @puhui999:是不是 @ExcelColumnSelect 可以搞两个属性,一个 dictType,一个 functionName;如果 dictType,则默认走字典,否则走 functionName - * 这样的话,ExcelColumnSelectDataService 改成 ExcelColumnSelectFunction 用于获取数据。 - * - * @author HUIHUI - */ -public interface ExcelColumnSelectDataService { - - // TODO @puhui999:可以考虑改成 getName - /** - * 获得方法名称 - * - * @return 方法名称 - */ - String getFunctionName(); - - // TODO @puhui999:可以考虑改成 getOptions;因为 select 下面是 option 哈,和前端 html 类似的标签; - /** - * 获得列下拉数据源 - * - * @return 下拉数据源 - */ - List getSelectDataList(); - - // TODO @puhui999:这个建议放到 SelectSheetWriteHandler 里 - default List handle(String funcName) { - if (StrUtil.isEmptyIfStr(funcName) || !StrUtil.equals(getFunctionName(), funcName)) { - return Collections.emptyList(); - } - return getSelectDataList(); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java index 4b5fbefbd7..f06122c3b4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java @@ -4,10 +4,7 @@ import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; import cn.iocoder.yudao.framework.excel.core.convert.AreaConvert; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; -import cn.iocoder.yudao.module.crm.framework.excel.service.AreaExcelColumnSelectDataServiceImpl; -import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerIndustryExcelColumnSelectDataServiceImpl; -import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerLevelExcelColumnSelectDataServiceImpl; -import cn.iocoder.yudao.module.crm.framework.excel.service.CrmCustomerSourceExcelColumnSelectDataServiceImpl; +import cn.iocoder.yudao.module.crm.framework.excel.core.AreaExcelColumnSelectFunctionImpl; import com.alibaba.excel.annotation.ExcelProperty; import lombok.AllArgsConstructor; import lombok.Builder; @@ -46,7 +43,7 @@ public class CrmCustomerImportExcelVO { private String email; @ExcelProperty(value = "地区", converter = AreaConvert.class) - @ExcelColumnSelect(AreaExcelColumnSelectDataServiceImpl.FUNCTION_NAME) + @ExcelColumnSelect(functionName = AreaExcelColumnSelectFunctionImpl.NAME) private Integer areaId; @ExcelProperty("详细地址") @@ -54,17 +51,17 @@ public class CrmCustomerImportExcelVO { @ExcelProperty(value = "所属行业", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_INDUSTRY) - @ExcelColumnSelect(CrmCustomerIndustryExcelColumnSelectDataServiceImpl.FUNCTION_NAME) + @ExcelColumnSelect(dictType = CRM_CUSTOMER_INDUSTRY) private Integer industryId; @ExcelProperty(value = "客户等级", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_LEVEL) - @ExcelColumnSelect(CrmCustomerLevelExcelColumnSelectDataServiceImpl.FUNCTION_NAME) + @ExcelColumnSelect(dictType = CRM_CUSTOMER_LEVEL) private Integer level; @ExcelProperty(value = "客户来源", converter = DictConvert.class) @DictFormat(CRM_CUSTOMER_SOURCE) - @ExcelColumnSelect(CrmCustomerSourceExcelColumnSelectDataServiceImpl.FUNCTION_NAME) + @ExcelColumnSelect(dictType = CRM_CUSTOMER_SOURCE) private Integer source; @ExcelProperty("备注") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java similarity index 56% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java index bd2bbd9e99..9df93ac6d0 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/AreaExcelColumnSelectDataServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.module.crm.framework.excel.service; +package cn.iocoder.yudao.module.crm.framework.excel.core; -import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; +import cn.iocoder.yudao.framework.excel.core.function.ExcelColumnSelectFunction; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import org.springframework.stereotype.Service; @@ -13,17 +13,17 @@ import java.util.List; * @author HUIHUI */ @Service -public class AreaExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { +public class AreaExcelColumnSelectFunctionImpl implements ExcelColumnSelectFunction { - public static final String FUNCTION_NAME = "getCrmAreaNameList"; // 防止和别的模块重名 + public static final String NAME = "getCrmAreaNameList"; // 防止和别的模块重名 @Override - public String getFunctionName() { - return FUNCTION_NAME; + public String getName() { + return NAME; } @Override - public List getSelectDataList() { + public List getOptions() { // 获取地区下拉数据 // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? Area area = AreaUtils.getArea(Area.ID_CHINA); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java index bd9cb957a7..8b54b9f555 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java @@ -1,2 +1 @@ -// TODO @puhui999:在 framework 目录,保持 config 和 core 目录的风格哈; package cn.iocoder.yudao.module.crm.framework.excel; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java deleted file mode 100644 index 8a78104bf3..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerIndustryExcelColumnSelectDataServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.excel.service; - -import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.util.List; - -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_INDUSTRY; - -/** - * Excel 客户所属行业列下拉数据源获取接口实现类 - * - * @author HUIHUI - */ -@Service -public class CrmCustomerIndustryExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { - - public static final String FUNCTION_NAME = "getCrmCustomerIndustryList"; - - @Resource - private DictDataApi dictDataApi; - - @Override - public String getFunctionName() { - return FUNCTION_NAME; - } - - @Override - public List getSelectDataList() { - return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java deleted file mode 100644 index 5948aa4270..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerLevelExcelColumnSelectDataServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.excel.service; - -import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.util.List; - -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_LEVEL; - -/** - * Excel 客户等级列下拉数据源获取接口实现类 - * - * @author HUIHUI - */ -@Service -public class CrmCustomerLevelExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { - - public static final String FUNCTION_NAME = "getCrmCustomerLevelList"; - - @Resource - private DictDataApi dictDataApi; - - @Override - public String getFunctionName() { - return FUNCTION_NAME; - } - - @Override - public List getSelectDataList() { - return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_LEVEL); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java deleted file mode 100644 index c160ed90fd..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/service/CrmCustomerSourceExcelColumnSelectDataServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.crm.framework.excel.service; - -import cn.iocoder.yudao.framework.excel.core.service.ExcelColumnSelectDataService; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.util.List; - -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_SOURCE; - -/** - * Excel 客户来源列下拉数据源获取接口实现类 - * - * @author HUIHUI - */ -@Service -public class CrmCustomerSourceExcelColumnSelectDataServiceImpl implements ExcelColumnSelectDataService { - - public static final String FUNCTION_NAME = "getCrmCustomerSourceList"; - - @Resource - private DictDataApi dictDataApi; - - @Override - public String getFunctionName() { - return FUNCTION_NAME; - } - - @Override - public List getSelectDataList() { - return dictDataApi.getDictDataLabelList(CRM_CUSTOMER_SOURCE); - } - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index 1a8772415b..fdab61428d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -229,7 +229,7 @@ public class CrmContractServiceImpl implements CrmContractService { // 1.1 校验存在 CrmContractDO contract = validateContractExists(id); // 1.2 如果被 CrmReceivableDO 所使用,则不允许删除 - if (CollUtil.isNotEmpty(receivableService.getReceivableByContractId(contract.getId()))) { + if (receivableService.getReceivableByContractId(contract.getId()) != 0) { throw exception(CONTRACT_DELETE_FAIL); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java index ed84ad03f9..c4a68fd708 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java @@ -122,13 +122,12 @@ public interface CrmReceivableService { */ Map getReceivablePriceMapByContractId(Collection contractIds); - // TODO @puhui999:这个搞成根据数量判断,会更好一点哈; /** * 更具合同编号查询回款列表 * * @param contractId 合同编号 * @return 回款 */ - List getReceivableByContractId(Long contractId); + Long getReceivableByContractId(Long contractId); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java index 52db93273e..889d94e1f4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java @@ -302,8 +302,8 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { } @Override - public List getReceivableByContractId(Long contractId) { - return receivableMapper.selectList(CrmReceivableDO::getContractId, contractId); + public Long getReceivableByContractId(Long contractId) { + return receivableMapper.selectCount(CrmReceivableDO::getContractId, contractId); } } -- Gitee From 79c51c6433eb3e1eacbc22002f07eb5f26fb5a06 Mon Sep 17 00:00:00 2001 From: E1 <876394202@qq.com> Date: Sun, 3 Mar 2024 10:26:28 +0000 Subject: [PATCH 0020/1557] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Java21=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=8Bdocker-compose=E4=B8=ADRedis=20Host=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=90=8D=E7=A7=B0=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: E1 <876394202@qq.com> --- script/docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index e440d96c38..ae977dd971 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -50,7 +50,7 @@ services: --spring.datasource.dynamic.datasource.slave.url=${SLAVE_DATASOURCE_URL:-jdbc:mysql://yudao-mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true} --spring.datasource.dynamic.datasource.slave.username=${SLAVE_DATASOURCE_USERNAME:-root} --spring.datasource.dynamic.datasource.slave.password=${SLAVE_DATASOURCE_PASSWORD:-123456} - --spring.redis.host=${REDIS_HOST:-yudao-redis} + --spring.data.redis.host=${REDIS_HOST:-yudao-redis} depends_on: - mysql - redis -- Gitee From ba1b02800187705b09d043a6dc772aafd19f5e90 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 3 Mar 2024 20:10:30 +0800 Subject: [PATCH 0021/1557] =?UTF-8?q?CRM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=EF=BC=8C=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E5=90=8C=E6=97=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E3=80=81=E5=90=8C=E6=97=B6=E8=BD=AC=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/business/CrmBusinessTransferReqVO.java | 6 +- .../admin/clue/vo/CrmClueTransferReqVO.java | 2 +- .../contact/vo/CrmContactTransferReqVO.java | 6 +- .../vo/contract/CrmContractTransferReqVO.java | 6 +- .../admin/customer/CrmCustomerController.java | 2 - .../vo/customer/CrmCustomerTransferReqVO.java | 10 +++- .../permission/CrmPermissionController.java | 58 ++++++++++++++++--- .../vo/CrmPermissionCreateReqVO.java | 14 ----- .../permission/vo/CrmPermissionRespVO.java | 24 +++++++- ...aseVO.java => CrmPermissionSaveReqVO.java} | 17 +++--- .../dal/mysql/business/CrmBusinessMapper.java | 8 +++ .../dal/mysql/contact/CrmContactMapper.java | 6 ++ .../dal/mysql/contract/CrmContractMapper.java | 6 ++ .../service/business/CrmBusinessService.java | 15 ++++- .../business/CrmBusinessServiceImpl.java | 21 ++++--- .../crm/service/clue/CrmClueServiceImpl.java | 10 ++-- .../service/contact/CrmContactService.java | 13 ++++- .../contact/CrmContactServiceImpl.java | 17 ++++-- .../service/contract/CrmContractService.java | 15 ++++- .../contract/CrmContractServiceImpl.java | 17 ++++-- .../customer/CrmCustomerServiceImpl.java | 52 +++++++++++++++-- 21 files changed, 253 insertions(+), 72 deletions(-) delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionCreateReqVO.java rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/{CrmPermissionBaseVO.java => CrmPermissionSaveReqVO.java} (74%) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java index a76c48cae9..083ea35706 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java @@ -3,15 +3,19 @@ package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; @Schema(description = "管理后台 - 商机转移 Request VO") @Data +@NoArgsConstructor +@AllArgsConstructor public class CrmBusinessTransferReqVO { @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "商机编号不能为空") - private Long id; + private Long bizId; /** * 新负责人的用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java index 63bdc1838f..7e6b8f0dd4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java @@ -12,7 +12,7 @@ public class CrmClueTransferReqVO { @Schema(description = "线索编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "线索编号不能为空") - private Long id; + private Long bizId; @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "新负责人的用户编号不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java index c65b205c8b..8b5a6a6f4b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java @@ -2,17 +2,21 @@ package cn.iocoder.yudao.module.crm.controller.admin.contact.vo; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Data; import jakarta.validation.constraints.NotNull; +import lombok.NoArgsConstructor; @Schema(description = "管理后台 - CRM 联系人转移 Request VO") @Data +@NoArgsConstructor +@AllArgsConstructor public class CrmContactTransferReqVO { @Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "联系人编号不能为空") - private Long id; + private Long bizId; /** * 新负责人的用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java index 4b8245c409..b59e21e160 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java @@ -3,17 +3,21 @@ package cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Data; import jakarta.validation.constraints.NotNull; +import lombok.NoArgsConstructor; @Schema(description = "管理后台 - CRM 合同转移 Request VO") @Data +@NoArgsConstructor +@AllArgsConstructor public class CrmContractTransferReqVO { @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "联系人编号不能为空") - private Long id; + private Long bizId; @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "新负责人的用户编号不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index 7745a6e6cb..9111c26f7c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -62,8 +62,6 @@ public class CrmCustomerController { private DeptApi deptApi; @Resource private AdminUserApi adminUserApi; - @Resource - private DictDataApi dictDataApi; @PostMapping("/create") @Operation(summary = "创建客户") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java index e62a84fd7a..98d0d4a647 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java @@ -5,13 +5,15 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; +import java.util.List; + @Schema(description = "管理后台 - CRM 客户转移 Request VO") @Data public class CrmCustomerTransferReqVO { @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "客户编号不能为空") - private Long id; + private Long bizId; /** * 新负责人的用户编号 @@ -28,4 +30,10 @@ public class CrmCustomerTransferReqVO { @Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer oldOwnerPermissionLevel; + /** + * 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 + */ + @Schema(description = "同时转移", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") + private List toBizTypes; + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java index 428bd07ad8..1cf8d7591f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java @@ -5,12 +5,19 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionCreateReqVO; import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionSaveReqVO; import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionUpdateReqVO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; import cn.iocoder.yudao.module.crm.dal.dataobject.permission.CrmPermissionDO; +import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPermission; +import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; +import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; +import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -27,13 +34,11 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -50,7 +55,12 @@ public class CrmPermissionController { @Resource private CrmPermissionService permissionService; - + @Resource + private CrmContactService contactService; + @Resource + private CrmBusinessService businessService; + @Resource + private CrmContractService contractService; @Resource private AdminUserApi adminUserApi; @Resource @@ -60,13 +70,47 @@ public class CrmPermissionController { @PostMapping("/create") @Operation(summary = "创建数据权限") + @Transactional(rollbackFor = Exception.class) @PreAuthorize("@ss.hasPermission('crm:permission:create')") @CrmPermission(bizTypeValue = "#reqVO.bizType", bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) - public CommonResult addPermission(@Valid @RequestBody CrmPermissionCreateReqVO reqVO) { + public CommonResult addPermission(@Valid @RequestBody CrmPermissionSaveReqVO reqVO) { permissionService.createPermission(BeanUtils.toBean(reqVO, CrmPermissionCreateReqBO.class)); + if (CollUtil.isNotEmpty(reqVO.getToBizTypes())) { + createBizTypePermissions(reqVO); + } return success(true); } + + private void createBizTypePermissions(CrmPermissionSaveReqVO reqVO) { + List createPermissions = new ArrayList<>(); + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTACT.getType())) { + List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getBizId(), getLoginUserId()); + contactList.forEach(item -> { + createPermissions.add(new CrmPermissionCreateReqBO().setBizType(CrmBizTypeEnum.CRM_CONTACT.getType()) + .setBizId(item.getId()).setUserId(reqVO.getUserId()).setLevel(reqVO.getLevel())); + }); + } + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_BUSINESS.getType())) { + List businessList = businessService.getBusinessListByCustomerIdOwnerUserId(reqVO.getBizId(), getLoginUserId()); + businessList.forEach(item -> { + createPermissions.add(new CrmPermissionCreateReqBO().setBizType(CrmBizTypeEnum.CRM_BUSINESS.getType()) + .setBizId(item.getId()).setUserId(reqVO.getUserId()).setLevel(reqVO.getLevel())); + }); + } + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTRACT.getType())) { + List contractList = contractService.getContractListByCustomerIdOwnerUserId(reqVO.getBizId(), getLoginUserId()); + contractList.forEach(item -> { + createPermissions.add(new CrmPermissionCreateReqBO().setBizType(CrmBizTypeEnum.CRM_CONTRACT.getType()) + .setBizId(item.getId()).setUserId(reqVO.getUserId()).setLevel(reqVO.getLevel())); + }); + } + if (CollUtil.isEmpty(createPermissions)) { + return; + } + permissionService.createPermissionBatch(createPermissions); + } + @PutMapping("/update") @Operation(summary = "编辑数据权限") @PreAuthorize("@ss.hasPermission('crm:permission:update')") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionCreateReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionCreateReqVO.java deleted file mode 100644 index 99793389ba..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionCreateReqVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.permission.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@Schema(description = "管理后台 - CRM 数据权限创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class CrmPermissionCreateReqVO extends CrmPermissionBaseVO { - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java index 10f1ce1985..aeddf1a5de 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java @@ -1,6 +1,10 @@ package cn.iocoder.yudao.module.crm.controller.admin.permission.vo; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; +import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; import lombok.Data; import java.time.LocalDateTime; @@ -8,11 +12,29 @@ import java.util.Set; @Schema(description = "管理后台 - CRM 数据权限 Response VO") @Data -public class CrmPermissionRespVO extends CrmPermissionBaseVO { +public class CrmPermissionRespVO { @Schema(description = "数据权限编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563") private Long id; + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456") + @NotNull(message = "用户编号不能为空") + private Long userId; + + @Schema(description = "CRM 类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @InEnum(CrmBizTypeEnum.class) + @NotNull(message = "CRM 类型不能为空") + private Integer bizType; + + @Schema(description = "CRM 类型数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "CRM 类型数据编号不能为空") + private Long bizId; + + @Schema(description = "权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @InEnum(CrmPermissionLevelEnum.class) + @NotNull(message = "权限级别不能为空") + private Integer level; + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") private String nickname; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionBaseVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java similarity index 74% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionBaseVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java index 796b3cd469..9635cc627f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionBaseVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java @@ -8,14 +8,11 @@ import lombok.Data; import jakarta.validation.constraints.NotNull; -/** - * 数据权限 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - * - * @author HUIHUI - */ +import java.util.List; + +@Schema(description = "管理后台 - CRM 数据权限创建/更新 Request VO") @Data -public class CrmPermissionBaseVO { +public class CrmPermissionSaveReqVO { @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456") @NotNull(message = "用户编号不能为空") @@ -35,4 +32,10 @@ public class CrmPermissionBaseVO { @NotNull(message = "权限级别不能为空") private Integer level; + /** + * 添加客户团队成员时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 + */ + @Schema(description = "同时添加", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") + private List toBizTypes; + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java index 4718a8d7ae..fc5b070f46 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java @@ -6,12 +6,14 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessPageReqVO; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.util.CrmPermissionUtils; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; +import java.util.List; /** * 商机 Mapper @@ -57,4 +59,10 @@ public interface CrmBusinessMapper extends BaseMapperX { return selectCount(CrmBusinessDO::getStatusTypeId, statusTypeId); } + default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId){ + return selectList(new LambdaQueryWrapperX() + .eq(CrmBusinessDO::getCustomerId, customerId) + .eq(CrmBusinessDO::getOwnerUserId, ownerUserId)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java index 4a77665ad7..d4244bce0b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java @@ -73,4 +73,10 @@ public interface CrmContactMapper extends BaseMapperX { return selectList(CrmContactDO::getCustomerId, customerId); } + default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + return selectList(new LambdaQueryWrapperX() + .eq(CrmContactDO::getCustomerId, customerId) + .eq(CrmContactDO::getOwnerUserId, ownerUserId)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractMapper.java index e06afb2571..14d743291b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contract/CrmContractMapper.java @@ -117,4 +117,10 @@ public interface CrmContractMapper extends BaseMapperX { return selectCount(query); } + default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + return selectList(new LambdaQueryWrapperX() + .eq(CrmContractDO::getCustomerId, customerId) + .eq(CrmContractDO::getOwnerUserId, ownerUserId)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java index ab7982024c..7bd899b64c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java @@ -46,8 +46,8 @@ public interface CrmBusinessService { /** * 更新商机相关跟进信息 * - * @param id 编号 - * @param contactNextTime 下次联系时间 + * @param id 编号 + * @param contactNextTime 下次联系时间 * @param contactLastContent 最后联系内容 */ void updateBusinessFollowUp(Long id, LocalDateTime contactNextTime, String contactLastContent); @@ -55,7 +55,7 @@ public interface CrmBusinessService { /** * 更新商机的下次联系时间 * - * @param ids 编号数组 + * @param ids 编号数组 * @param contactNextTime 下次联系时间 */ void updateBusinessContactNextTime(Collection ids, LocalDateTime contactNextTime); @@ -185,4 +185,13 @@ public interface CrmBusinessService { return status.getName(); } + /** + * 获得商机列表 + * + * @param customerId 客户编号 + * @param ownerUserId 负责人编号 + * @return 商机列表 + */ + List getBusinessListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index e709b65472..9f2e4ceb62 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.service.business; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -23,6 +24,7 @@ import cn.iocoder.yudao.module.crm.service.contact.CrmContactBusinessService; import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; +import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -204,7 +206,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { private List validateBusinessProducts(List list) { // 1. 校验产品存在 - productService.validProductList(convertSet(list, CrmBusinessSaveReqVO.Product::getProductId)); + productService.validProductList(convertSet(list, CrmBusinessSaveReqVO.Product::getProductId)); // 2. 转化为 CrmBusinessProductDO 列表 return convertList(list, o -> BeanUtils.toBean(o, CrmBusinessProductDO.class, item -> item.setTotalPrice(MoneyUtils.priceMultiply(item.getBusinessPrice(), item.getCount())))); @@ -234,7 +236,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { } // 1.4 校验是不是状态没变更 if ((reqVO.getStatusId() != null && reqVO.getStatusId().equals(business.getStatusId())) - || (reqVO.getEndStatus() != null && reqVO.getEndStatus().equals(business.getEndStatus()))) { + || (reqVO.getEndStatus() != null && reqVO.getEndStatus().equals(business.getEndStatus()))) { throw exception(BUSINESS_UPDATE_STATUS_FAIL_STATUS_EQUALS); } @@ -292,18 +294,18 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_BUSINESS_TYPE, subType = CRM_BUSINESS_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", + @LogRecord(type = CRM_BUSINESS_TYPE, subType = CRM_BUSINESS_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", success = CRM_BUSINESS_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_BUSINESS, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_BUSINESS, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void transferBusiness(CrmBusinessTransferReqVO reqVO, Long userId) { // 1 校验商机是否存在 - CrmBusinessDO business = validateBusinessExists(reqVO.getId()); + CrmBusinessDO business = validateBusinessExists(reqVO.getBizId()); // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_BUSINESS.getType(), - reqVO.getNewOwnerUserId(), reqVO.getId(), CrmPermissionLevelEnum.OWNER.getLevel())); + reqVO.getBizId(), reqVO.getNewOwnerUserId(), CrmPermissionLevelEnum.OWNER.getLevel())); // 2.2 设置新的负责人 - businessMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); + businessMapper.updateOwnerUserIdById(reqVO.getBizId(), reqVO.getNewOwnerUserId()); // 记录操作日志上下文 LogRecordContext.putVariable("business", business); @@ -370,4 +372,9 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { return businessMapper.selectCountByStatusTypeId(statusTypeId); } + @Override + public List getBusinessListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + return businessMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java index 70ebeb44da..3b4f0bc349 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java @@ -159,18 +159,18 @@ public class CrmClueServiceImpl implements CrmClueService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", + @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", success = CRM_CLUE_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void transferClue(CrmClueTransferReqVO reqVO, Long userId) { // 1 校验线索是否存在 - CrmClueDO clue = validateClueExists(reqVO.getId()); + CrmClueDO clue = validateClueExists(reqVO.getBizId()); // 2.1 数据权限转移 crmPermissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CLUE.getType(), - reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置新的负责人 - clueMapper.updateById(new CrmClueDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + clueMapper.updateById(new CrmClueDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("clue", clue); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactService.java index 23c29d3bcd..971d413afd 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactService.java @@ -75,8 +75,8 @@ public interface CrmContactService { /** * 更新联系人的下次联系时间 * - * @param ids 编号数组 - * @param contactNextTime 下次联系时间 + * @param ids 编号数组 + * @param contactNextTime 下次联系时间 */ void updateContactContactNextTime(Collection ids, LocalDateTime contactNextTime); @@ -160,4 +160,13 @@ public interface CrmContactService { */ Long getContactCountByCustomerId(Long customerId); + /** + * 获得联系人列表 + * + * @param customerId 客户编号 + * @param ownerUserId 负责人编号 + * @return 联系人列表 + */ + List getContactListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java index d8e356124e..ea46edf112 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.service.contact; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactBusinessReqVO; @@ -17,6 +18,7 @@ import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPerm import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; +import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -177,18 +179,18 @@ public class CrmContactServiceImpl implements CrmContactService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CONTACT_TYPE, subType = CRM_CONTACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", + @LogRecord(type = CRM_CONTACT_TYPE, subType = CRM_CONTACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", success = CRM_CONTACT_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTACT, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTACT, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void transferContact(CrmContactTransferReqVO reqVO, Long userId) { // 1 校验联系人是否存在 - CrmContactDO contact = validateContactExists(reqVO.getId()); + CrmContactDO contact = validateContactExists(reqVO.getBizId()); // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CONTACT.getType(), - reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置新的负责人 - contactMapper.updateById(new CrmContactDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + contactMapper.updateById(new CrmContactDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("contact", contact); @@ -298,4 +300,9 @@ public class CrmContactServiceImpl implements CrmContactService { return contactMapper.selectCount(CrmContactDO::getCustomerId, customerId); } + @Override + public List getContactListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + return contactMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId); + } + } \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractService.java index 25f5537dc3..0d8964f189 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractService.java @@ -58,8 +58,8 @@ public interface CrmContractService { /** * 更新合同相关的更进信息 * - * @param id 合同编号 - * @param contactNextTime 下次联系时间 + * @param id 合同编号 + * @param contactNextTime 下次联系时间 * @param contactLastContent 最后联系内容 */ void updateContractFollowUp(Long id, LocalDateTime contactNextTime, String contactLastContent); @@ -75,7 +75,7 @@ public interface CrmContractService { /** * 更新合同流程审批结果 * - * @param id 合同编号 + * @param id 合同编号 * @param bpmResult BPM 审批结果 */ void updateContractAuditStatus(Long id, Integer bpmResult); @@ -193,4 +193,13 @@ public interface CrmContractService { */ Long getRemindContractCount(Long userId); + /** + * 获得合同列表 + * + * @param customerId 客户编号 + * @param ownerUserId 负责人编号 + * @return 合同列表 + */ + List getContractListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index fdab61428d..39ad8f5df4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -26,6 +27,7 @@ import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPerm import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; +import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -252,18 +254,18 @@ public class CrmContractServiceImpl implements CrmContractService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", + @LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", success = CRM_CONTRACT_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void transferContract(CrmContractTransferReqVO reqVO, Long userId) { // 1. 校验合同是否存在 - CrmContractDO contract = validateContractExists(reqVO.getId()); + CrmContractDO contract = validateContractExists(reqVO.getBizId()); // 2.1 数据权限转移 crmPermissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CONTRACT.getType(), - reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置负责人 - contractMapper.updateById(new CrmContractDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + contractMapper.updateById(new CrmContractDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("contract", contract); @@ -407,4 +409,9 @@ public class CrmContractServiceImpl implements CrmContractService { return contractMapper.selectCountByRemind(userId, config); } + @Override + public List getContractListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + return contractMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java index 314349865b..d314b823c1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java @@ -9,7 +9,13 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessTransferReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactTransferReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractTransferReqVO; import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer.*; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerLimitConfigDO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerPoolConfigDO; @@ -193,26 +199,60 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CUSTOMER_TYPE, subType = CRM_CUSTOMER_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", + @LogRecord(type = CRM_CUSTOMER_TYPE, subType = CRM_CUSTOMER_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", success = CRM_CUSTOMER_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CUSTOMER, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CUSTOMER, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void transferCustomer(CrmCustomerTransferReqVO reqVO, Long userId) { // 1.1 校验客户是否存在 - CrmCustomerDO customer = validateCustomerExists(reqVO.getId()); + CrmCustomerDO customer = validateCustomerExists(reqVO.getBizId()); // 1.2 校验拥有客户是否到达上限 validateCustomerExceedOwnerLimit(reqVO.getNewOwnerUserId(), 1); - // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CUSTOMER.getType(), - reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 转移后重新设置负责人 - customerMapper.updateById(new CrmCustomerDO().setId(reqVO.getId()) + customerMapper.updateById(new CrmCustomerDO().setId(reqVO.getBizId()) .setOwnerUserId(reqVO.getNewOwnerUserId()).setOwnerTime(LocalDateTime.now())); + // 2.3 同时转移 + if (CollUtil.isNotEmpty(reqVO.getToBizTypes())) { + transfer(reqVO, userId); + } + // 3. 记录转移日志 LogRecordContext.putVariable("customer", customer); } + /** + * 转移客户时,需要额外有【联系人】【商机】【合同】 + * + * @param reqVO 请求 + * @param userId 用户编号 + */ + private void transfer(CrmCustomerTransferReqVO reqVO, Long userId) { + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTACT.getType())) { + List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + contactList.forEach(item -> { + contactService.transferContact(new CrmContactTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), + reqVO.getOldOwnerPermissionLevel()), userId); + }); + } + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_BUSINESS.getType())) { + List businessList = businessService.getBusinessListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + businessList.forEach(item -> { + businessService.transferBusiness(new CrmBusinessTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), + reqVO.getOldOwnerPermissionLevel()), userId); + }); + } + if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTRACT.getType())) { + List contractList = contractService.getContractListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + contractList.forEach(item -> { + contractService.transferContract(new CrmContractTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), + reqVO.getOldOwnerPermissionLevel()), userId); + }); + } + } + @Override @LogRecord(type = CRM_CUSTOMER_TYPE, subType = CRM_CUSTOMER_LOCK_SUB_TYPE, bizNo = "{{#lockReqVO.id}}", success = CRM_CUSTOMER_LOCK_SUCCESS) -- Gitee From 20ac7c64510696870f0fefba043bbf2bb5d54b91 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 3 Mar 2024 20:11:00 +0800 Subject: [PATCH 0022/1557] =?UTF-8?q?=E5=88=9B=E5=BB=BA=20yudao-module-ai?= =?UTF-8?q?=20=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 1 + yudao-module-ai/pom.xml | 33 +++++++++++++++++++ yudao-module-ai/yudao-module-ai-api/pom.xml | 20 +++++++++++ .../iocoder/yudao/module/ai/package-info.java | 5 +++ yudao-module-ai/yudao-module-ai-biz/pom.xml | 28 ++++++++++++++++ .../iocoder/yudao/module/ai/package-info.java | 5 +++ .../src/main/resources/application.yaml | 0 7 files changed, 92 insertions(+) create mode 100644 yudao-module-ai/pom.xml create mode 100644 yudao-module-ai/yudao-module-ai-api/pom.xml create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/pom.xml create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml diff --git a/pom.xml b/pom.xml index 3a66524bc1..de20229faa 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,7 @@ yudao-module-system yudao-module-infra + yudao-module-ai diff --git a/yudao-module-ai/pom.xml b/yudao-module-ai/pom.xml new file mode 100644 index 0000000000..41f62ff4d6 --- /dev/null +++ b/yudao-module-ai/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao + ${revision} + + pom + yudao-module-ai + + + yudao-module-ai-api + /yudao-module-ai-biz + + + + 8 + 8 + UTF-8 + + + + + + org.springframework.ai + spring-ai-openai-spring-boot-starter + + + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-api/pom.xml b/yudao-module-ai/yudao-module-ai-api/pom.xml new file mode 100644 index 0000000000..621c05171e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao-module-ai + ${revision} + + + yudao-module-ai-api + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java new file mode 100644 index 0000000000..6fa1f167a0 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/3 18:14 + */ +package cn.iocoder.yudao.module.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml new file mode 100644 index 0000000000..865dce9121 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao-module-ai + ${revision} + + + yudao-module-ai-biz + + + 8 + 8 + UTF-8 + + + + + + + org.springframework.ai + spring-ai-openai-spring-boot-starter + + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java new file mode 100644 index 0000000000..6fa1f167a0 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/3 18:14 + */ +package cn.iocoder.yudao.module.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml new file mode 100644 index 0000000000..e69de29bb2 -- Gitee From 33d77b9b160a1c5470fe805501255489d53e9c54 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 3 Mar 2024 20:19:06 +0800 Subject: [PATCH 0023/1557] =?UTF-8?q?=E9=85=8D=E7=BD=AE=20yudao-dependenci?= =?UTF-8?q?es=20spring-ai=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 17 +++++++++++++++++ yudao-dependencies/pom.xml | 9 +++++++++ yudao-module-ai/pom.xml | 7 +------ yudao-server/pom.xml | 6 ++++++ 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index de20229faa..44f20e10e1 100644 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,23 @@ aliyun https://maven.aliyun.com/repository/public + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 7c7ca609be..6b4f135abf 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -76,6 +76,7 @@ 2.12.2 4.6.0 2.2.9 + 0.8.0 @@ -628,6 +629,14 @@ ${ureport2.version} + + + org.springframework.ai + spring-ai-bom + ${spring-ai-bom.version} + pom + import + diff --git a/yudao-module-ai/pom.xml b/yudao-module-ai/pom.xml index 41f62ff4d6..aaba1191d6 100644 --- a/yudao-module-ai/pom.xml +++ b/yudao-module-ai/pom.xml @@ -13,7 +13,7 @@ yudao-module-ai-api - /yudao-module-ai-biz + yudao-module-ai-biz @@ -23,11 +23,6 @@ - - - org.springframework.ai - spring-ai-openai-spring-boot-starter - \ No newline at end of file diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index bc850b5902..bb71ddddd3 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -32,6 +32,12 @@ ${revision} + + cn.iocoder.boot + yudao-module-ai-biz + ${revision} + + -- Gitee From f4b3bb5aaa63db3c486e6bed21fe8c5c1ffed5eb Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 4 Mar 2024 17:02:03 +0800 Subject: [PATCH 0024/1557] =?UTF-8?q?=E5=AE=9A=E4=B9=89ai=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exception/enums/ServiceErrorCodeRange.java | 2 ++ .../yudao/module/ai/ErrorCodeConstants.java | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/ServiceErrorCodeRange.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/ServiceErrorCodeRange.java index 94dd67c9ec..950ab2555c 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/ServiceErrorCodeRange.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/ServiceErrorCodeRange.java @@ -43,4 +43,6 @@ public class ServiceErrorCodeRange { // 模块 crm 错误码区间 [1-020-000-000 ~ 1-021-000-000) + // 模块 ai 错误码区间 [1-022-000-000 ~ 1-023-000-000) + } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java new file mode 100644 index 0000000000..69795ead26 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.ai; + +import cn.iocoder.yudao.framework.common.exception.ErrorCode; + +/** + * System 错误码枚举类 + * + * system 系统,使用 1-002-000-000 段 + */ +public interface ErrorCodeConstants { + + // ========== 模块 ai 错误码区间 [1-022-000-000 ~ 1-023-000-000) ========== + + ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI模型暂不支持!"); + +} -- Gitee From ebd5cbfca291b645f8843314644c30cdc1b0a9c0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 4 Mar 2024 17:03:41 +0800 Subject: [PATCH 0025/1557] =?UTF-8?q?=E5=9F=BA=E5=B1=82=20open=20ai=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20chat=20=E8=81=8A=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-api/pom.xml | 18 ++++++ .../yudao/module/ai/enums/AiModelEnum.java | 25 ++++++++ yudao-module-ai/yudao-module-ai-biz/pom.xml | 28 +++++++++ .../ai/controller/admin/ChatController.java | 60 +++++++++++++++++++ .../ai/controller/admin/vo/AiChatReqVO.java | 26 ++++++++ .../module/ai/controller/package-info.java | 5 ++ .../src/main/resources/application.properties | 6 ++ .../src/main/resources/application.yaml | 0 8 files changed, 168 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml diff --git a/yudao-module-ai/yudao-module-ai-api/pom.xml b/yudao-module-ai/yudao-module-ai-api/pom.xml index 621c05171e..ce9c415276 100644 --- a/yudao-module-ai/yudao-module-ai-api/pom.xml +++ b/yudao-module-ai/yudao-module-ai-api/pom.xml @@ -17,4 +17,22 @@ UTF-8 + + + + cn.iocoder.boot + yudao-common + + + + org.projectlombok + lombok + + + + org.springframework.boot + spring-boot-starter-validation + true + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java new file mode 100644 index 0000000000..ff1889fe72 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.Getter; + +/** + * author: fansili + * time: 2024/3/4 12:36 + */ +@Getter +public enum AiModelEnum { + + OPEN_AI_GPT_3_5("gpt-3.5-turbo", "GPT3.5"), + OPEN_AI_GPT_4("gpt-4-turbo", "GPT4") + + ; + + AiModelEnum(String value, String message) { + this.value = value; + this.message = message; + } + + private String value; + + private String message; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index 865dce9121..0281c9ece0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -19,10 +19,38 @@ + + cn.iocoder.boot + yudao-module-ai-api + ${revision} + + + cn.iocoder.boot + yudao-common + + org.springframework.ai spring-ai-openai-spring-boot-starter + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 17 + 17 + + + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java new file mode 100644 index 0000000000..b7ca740fba --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.ai.controller.admin; + +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; +import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.ai.chat.ChatClient; +import org.springframework.ai.openai.OpenAiChatClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * AI模块 + * + * author: fansili + * time: 2024/3/3 20:28 + */ +@Tag(name = "AI模块") +@RestController +@RequestMapping("/ai-api") +public class ChatController { + + @Autowired + private ApplicationContext applicationContext; + + @PostMapping("/chat") + @Operation(summary = "对话聊天", description = "简单的ai聊天") + public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { + ChatClient chatClient = getChatClient(reqVO.getAiModel()); + String res; + try { + res = chatClient.call(reqVO.getInputText()); + } catch (Exception e) { + res = e.getMessage(); + } + return CommonResult.success(res); + } + + /** + * 根据 ai模型 获取对于的 模型实现类 + * + * @param aiModelEnum + * @return + */ + private ChatClient getChatClient(AiModelEnum aiModelEnum) { + if (AiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { + return applicationContext.getBean(OpenAiChatClient.class); + } + // AI模型暂不支持 + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java new file mode 100644 index 0000000000..43b29d2833 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.ai.controller.admin.vo; + +import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +/** + * ai 聊天 req + * + * author: fansili + * time: 2024/3/4 12:33 + */ +@Schema(description = "用户 App - 上传文件 Request VO") +@Data +public class AiChatReqVO { + + @Schema(description = "输入内容", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "输入内容不能为空") + private String inputText; + + @Schema(description = "AI模型", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "AI模型不能为空") + private AiModelEnum aiModel; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java new file mode 100644 index 0000000000..f154471727 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/4 13:08 + */ +package cn.iocoder.yudao.module.ai.controller; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties new file mode 100644 index 0000000000..cb06af6ee5 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties @@ -0,0 +1,6 @@ +# open ai + +# openAI https://openai.com/ +spring.ai.openai.api-key=${OPEN_AI_KEY} +spring.ai.openai.chat.options.model=gpt-3.5-turbo +spring.ai.openai.chat.options.temperature=0.7 \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.yaml deleted file mode 100644 index e69de29bb2..0000000000 -- Gitee From a23ea45632640ec50c5472aa89796b8fcb160531 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Mon, 4 Mar 2024 23:51:25 +0800 Subject: [PATCH 0026/1557] =?UTF-8?q?fix:=20[CRM-=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1]=E6=A0=B9=E6=8D=AECode-Review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.http | 61 ++- .../CrmStatisticsCustomerController.java | 70 ++-- ...CrmStatisticsCustomerByUserBaseRespVO.java | 18 + ...atisticsCustomerContractSummaryRespVO.java | 51 +++ ...tisticsCustomerDealCycleByDateRespVO.java} | 26 +- ...atisticsCustomerDealCycleByUserRespVO.java | 16 + ...StatisticsCustomerSummaryByDateRespVO.java | 19 + ...StatisticsCustomerSummaryByUserRespVO.java | 24 ++ ...StatisticsFollowupSummaryByDateRespVO.java | 19 + ...StatisticsFollowupSummaryByTypeRespVO.java | 17 + ...StatisticsFollowupSummaryByUserRespVO.java | 16 + .../CrmStatisticsCustomerMapper.java | 31 +- .../CrmStatisticsCustomerService.java | 58 +-- .../CrmStatisticsCustomerServiceImpl.java | 349 ++++++++++++++---- .../CrmStatisticsCustomerMapper.xml | 307 ++++++++++----- 15 files changed, 812 insertions(+), 270 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/{CrmStatisticsCustomerCountVO.java => CrmStatisticsCustomerDealCycleByDateRespVO.java} (31%) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 13ae812286..0c422f9868 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -1,39 +1,68 @@ -### 新建客户总量分析(按日) -GET {{baseUrl}}/crm/statistics-customer/get-total-customer-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 +# == 1. 客户总量分析 == +### 1.1 客户总量分析(按日) +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} -### 新建客户总量分析(按月) -GET {{baseUrl}}/crm/statistics-customer/get-total-customer-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +### 1.2 客户总量分析(按月) +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} -### 成交客户总量分析(按日) -GET {{baseUrl}}/crm/statistics-customer/get-deal-total-customer-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 +### 1.3 客户总量统计(按用户) +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} -### 成交客户总量分析(按月) -GET {{baseUrl}}/crm/statistics-customer/get-deal-total-customer-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 + +# == 2. 客户跟进次数分析 == +### 2.1 客户跟进次数分析(按日) +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 2.2 客户跟进次数分析(按月) +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 2.3 客户总量统计(按用户) +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + + +# == 3. 客户跟进方式分析 == +### 3.1 客户跟进方式分析 +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-type?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} +tenant-id: {{adminTenentId}} -### 获取客户跟进次数(按日) -GET {{baseUrl}}/crm/statistics-customer/get-record-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 + +# == 4. 客户成交周期 == +### 4.1 合同摘要信息(客户转化率页面) +GET {{baseUrl}}/crm/statistics-customer/get-contract-summary?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} +tenant-id: {{adminTenentId}} -### 获取客户跟进次数(按月) -GET {{baseUrl}}/crm/statistics-customer/get-record-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 + +# == 5. 客户成交周期 == +### 5.1 客户成交周期(按日) +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} +tenant-id: {{adminTenentId}} -### 获取已跟进客户数(按日) -GET {{baseUrl}}/crm/statistics-customer/get-distinct-record-count?deptId=100×[0]=2024-12-01 00:00:00×[1]=2024-12-12 23:59:59 +### 5.2 客户成交周期(按月) +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} +tenant-id: {{adminTenentId}} -### 获取已跟进客户数(按月) -GET {{baseUrl}}/crm/statistics-customer/get-distinct-record-count?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +### 5.3 获取客户成交周期(按用户) +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index b51740dafa..4a0b2e760e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -18,8 +17,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -// TODO @dhb52:数据统计 员工客户分析,改成“客户统计” -@Tag(name = "管理后台 - CRM 数据统计 员工客户分析") +@Tag(name = "管理后台 - CRM 客户统计") @RestController @RequestMapping("/crm/statistics-customer") @Validated @@ -28,50 +26,60 @@ public class CrmStatisticsCustomerController { @Resource private CrmStatisticsCustomerService customerService; - // TODO @dhb52:建议 getCustomerCount 和 getDealTotalCustomerCount 搞成一个接口; - // 1. 数量接口:【方法:getCustomerSummaryByDate】,VO:CrmStatisticsCustomerSummaryByDateRespVO,然后里面是 time、customerCreateCount customerDealCount - // 2. 按人统计:【方法:getCustomerSummaryByUser】,VO:CrmStatisticsCustomerSummaryByOwnerRespVO,然后里面是 ownerUserId、ownerUserName、customerCreateCount customerDealCount、contractPrice、receivablePrice;客户成交率、未回款金额、回款完成率,交给前端计算; + @GetMapping("/get-customer-summary-by-date") + @Operation(summary = "获取客户总量分析(按日期)") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerSummaryByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerSummaryByDate(reqVO)); + } + + @GetMapping("/get-customer-summary-by-user") + @Operation(summary = "获取客户总量分析(按用户)") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerSummaryByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerSummaryByUser(reqVO)); + } - @GetMapping("/get-total-customer-count") - @Operation(summary = "获得新建客户数量") + @GetMapping("/get-followup-summary-by-date") + @Operation(summary = "获取客户跟进次数分析(按日期)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getTotalCustomerCount(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getTotalCustomerCount(reqVO)); + public CommonResult> getFollowupSummaryByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowupSummaryByDate(reqVO)); } - @GetMapping("/get-deal-total-customer-count") - @Operation(summary = "获得成交客户数量") + @GetMapping("/get-followup-summary-by-user") + @Operation(summary = "获取客户跟进次数分析(按用户)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getDealTotalCustomerCount(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getDealTotalCustomerCount(reqVO)); + public CommonResult> getFollowupSummaryByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowupSummaryByUser(reqVO)); } - @GetMapping("/get-record-count") - @Operation(summary = "获取客户跟进次数") + @GetMapping("/get-followup-summary-by-type") + @Operation(summary = "获取客户跟进次数分析(按类型)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getRecordCount(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getRecordCount(reqVO)); + public CommonResult> getFollowupSummaryByType(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowupSummaryByType(reqVO)); } - @GetMapping("/get-distinct-record-count") - @Operation(summary = "获取已跟进客户数") + @GetMapping("/get-contract-summary") + @Operation(summary = "获取合同摘要信息(客户转化率页面)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getDistinctRecordCount(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getDistinctRecordCount(reqVO)); + public CommonResult> getContractSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getContractSummary(reqVO)); } - @GetMapping("/get-record-type-count") - @Operation(summary = "获取客户跟进方式统计数") + @GetMapping("/get-customer-deal-cycle-by-date") + @Operation(summary = "获取客户成交周期(按日期)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getRecordTypeCount(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getRecordTypeCount(reqVO)); + public CommonResult> getCustomerDealCycleByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerDealCycleByDate(reqVO)); } - @GetMapping("/get-customer-cycle") - @Operation(summary = "获取客户成交周期") + @GetMapping("/get-customer-deal-cycle-by-user") + @Operation(summary = "获取客户成交周期(按用户)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerCycle(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerCycle(reqVO)); + public CommonResult> getCustomerDealCycleByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerDealCycleByUser(reqVO)); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java new file mode 100644 index 0000000000..82f74f2304 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * 用户客户统计响应 Base VO + */ +@Data +public class CrmStatisticsCustomerByUserBaseRespVO { + + @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long ownerUserId; + + @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") + private String ownerUserName; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java new file mode 100644 index 0000000000..7cb02e521e --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - CRM 客户转化率分析 VO") +@Data +public class CrmStatisticsCustomerContractSummaryRespVO { + + @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") + private String customerName; + + @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "演示合同") + private String contractName; + + @Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1200.00") + private BigDecimal totalPrice; + + @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1200.00") + private BigDecimal receivablePrice; + + @Schema(description = "客户行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "金融") + private String customerType; + + @Schema(description = "客户来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "外呼") + private String customerSource; + + @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long ownerUserId; + + @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") + private String ownerUserName; + + @Schema(description = "创建人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Long creatorUserId; + + @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, example = "源码") + private String creatorUserName; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-01 13:24:26") + private LocalDateTime createTime; + + @Schema(description = "下单日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02 00:00:00") + private LocalDate orderDate; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java similarity index 31% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java index a2537db9aa..44b2526e85 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerCountVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java @@ -3,32 +3,14 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; - -@Schema(description = "管理后台 - CRM 数据统计 员工客户分析 VO") +@Schema(description = "管理后台 - CRM 客户成交周期分析(按日期) VO") @Data -public class CrmStatisticsCustomerCountVO { +public class CrmStatisticsCustomerDealCycleByDateRespVO { - /** - * 时间轴 - *

- * group by DATE_FORMAT(create_date, '%Y%m') - */ @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") - private String category; - - /** - * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 - *

- * 1. 金额:合同金额排行、回款金额排行 - * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 - */ - @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer count = 0; + private String time; - /** - * 成交周期(天) - */ @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") - private Double cycle = 0.0; + private Double customerDealCycle = 0.0; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java new file mode 100644 index 0000000000..6c8137983d --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 成交周期分析(按用户) VO") +@Data +public class CrmStatisticsCustomerDealCycleByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { + + @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") + private Double customerDealCycle = 0.0; + + @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerDealCount = 0; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java new file mode 100644 index 0000000000..866a58f1e6 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户总量分析(按日期) VO") +@Data +public class CrmStatisticsCustomerSummaryByDateRespVO { + + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String time; + + @Schema(description = "新建客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCreateCount = 0; + + @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerDealCount = 0; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java new file mode 100644 index 0000000000..ffa5e21ae1 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - CRM 客户总量分析(按用户) VO") +@Data +public class CrmStatisticsCustomerSummaryByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { + + @Schema(description = "新建客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCreateCount = 0; + + @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerDealCount = 0; + + @Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") + private BigDecimal contractPrice = BigDecimal.valueOf(0); + + @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") + private BigDecimal receivablePrice = BigDecimal.valueOf(0); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java new file mode 100644 index 0000000000..6bd6f1d4db --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 跟进次数分析(按日期) VO") +@Data +public class CrmStatisticsFollowupSummaryByDateRespVO { + + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String time; + + @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer followupRecordCount = 0; + + @Schema(description = "跟进客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer followupCustomerCount = 0; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java new file mode 100644 index 0000000000..c722305a5f --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 跟进次数分析(按类型) VO") +@Data +public class CrmStatisticsFollowupSummaryByTypeRespVO { + + @Schema(description = "跟进类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private String followupType; + + @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer followupRecordCount = 0; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java new file mode 100644 index 0000000000..5cd610c360 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 跟进次数分析(按用户) VO") +@Data +public class CrmStatisticsFollowupSummaryByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { + + @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer followupRecordCount = 0; + + @Schema(description = "跟进客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer followupCustomerCount = 0; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 464c521c61..6bababa26a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -14,16 +13,32 @@ import java.util.List; @Mapper public interface CrmStatisticsCustomerMapper { - List selectCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerCreateCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); - List selectDealCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); - List selectRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerCreateCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); - List selectDistinctRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCountGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); - List selectRecordCountGroupbyType(CrmStatisticsCustomerReqVO reqVO); + List selectContractPriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); - List selectCustomerCycleGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectReceivablePriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); + + List selectFollowupRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + + List selectFollowupCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + + List selectFollowupRecordCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + + List selectFollowupCustomerCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + + List selectContractSummary(CrmStatisticsCustomerReqVO reqVO); + + List selectFollowupRecordCountGroupbyType(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerDealCycleGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerDealCycleGroupbyUser(CrmStatisticsCustomerReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index e568816d6a..546124701a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -1,64 +1,80 @@ package cn.iocoder.yudao.module.crm.service.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import java.util.List; /** - * CRM 数据统计 员工客户分析 Service 接口 + * CRM 客户分析 Service 接口 * * @author dhb52 */ public interface CrmStatisticsCustomerService { /** - * 获取新建客户数量 + * 总量分析(按日期) * * @param reqVO 请求参数 - * @return 新建客户数量统计 + * @return 统计数据 */ - List getTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryByDate(CrmStatisticsCustomerReqVO reqVO); /** - * 获取成交客户数量 + * 总量分析(按用户) * * @param reqVO 请求参数 - * @return 成交客户数量统计 + * @return 统计数据 */ - List getDealTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryByUser(CrmStatisticsCustomerReqVO reqVO); /** - * 获取客户跟进次数 + * 跟进次数分析(按日期) * * @param reqVO 请求参数 - * @return 客户跟进次数 + * @return 统计数据 */ - List getRecordCount(CrmStatisticsCustomerReqVO reqVO); + List getFollowupSummaryByDate(CrmStatisticsCustomerReqVO reqVO); /** - * 获取已跟进客户数 + * 跟进次数分析(按用户) * * @param reqVO 请求参数 - * @return 已跟进客户数 + * @return 统计数据 */ - List getDistinctRecordCount(CrmStatisticsCustomerReqVO reqVO); + List getFollowupSummaryByUser(CrmStatisticsCustomerReqVO reqVO); /** - * 获取客户跟进方式统计数 + * 客户跟进次数分析(按类型) * * @param reqVO 请求参数 - * @return 客户跟进方式统计数 + * @return 统计数据 */ - List getRecordTypeCount(CrmStatisticsCustomerReqVO reqVO); + List getFollowupSummaryByType(CrmStatisticsCustomerReqVO reqVO); + + + /** + * 获取合同摘要信息(客户转化率页面) + * + * @param reqVO 请求参数 + * @return 合同摘要列表 + */ + List getContractSummary(CrmStatisticsCustomerReqVO reqVO); + + /** + * 客户成交周期(按日期) + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerDealCycleByDate(CrmStatisticsCustomerReqVO reqVO); /** - * 获取客户成交周期 + * 客户成交周期(按用户) * * @param reqVO 请求参数 - * @return 客户成交周期 + * @return 统计数据 */ - List getCustomerCycle(CrmStatisticsCustomerReqVO reqVO); + List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index 94eb560d1e..77bd0fcf67 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerCountVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -17,17 +17,14 @@ import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.Function; +import java.util.*; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; /** - * CRM 数据统计 员工客户分析 Service 实现类 + * CRM 客户分析 Service 实现类 * * @author dhb52 */ @@ -35,6 +32,13 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. @Validated public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerService { + private static final String SQL_DATE_FORMAT_BY_MONTH = "%Y%m"; + private static final String SQL_DATE_FORMAT_BY_DAY = "%Y%m%d"; + + private static final String TIME_FORMAT_BY_MONTH = "yyyyMM"; + private static final String TIME_FORMAT_BY_DAY = "yyyyMMdd"; + + @Resource private CrmStatisticsCustomerMapper customerMapper; @@ -45,130 +49,315 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Resource private DictDataApi dictDataApi; + @Override - public List getTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO) { - return getStat(reqVO, customerMapper::selectCustomerCountGroupbyDate); + public List getCustomerSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 + reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + final List customerCreateCount = customerMapper.selectCustomerCreateCountGroupbyDate(reqVO); + final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyDate(reqVO); + + // 3. 获取时间序列 + final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + + // 4. 合并统计数据 + List result = new ArrayList<>(times.size()); + final Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); + final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); + times.forEach(time -> result.add( + new CrmStatisticsCustomerSummaryByDateRespVO().setTime(time) + .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) + .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) + )); + + return result; } @Override - public List getDealTotalCustomerCount(CrmStatisticsCustomerReqVO reqVO) { - return getStat(reqVO, customerMapper::selectDealCustomerCountGroupbyDate); + public List getCustomerSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 + final List customerCreateCount = customerMapper.selectCustomerCreateCountGroupbyUser(reqVO); + final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyUser(reqVO); + final List contractPrice = customerMapper.selectContractPriceGroupbyUser(reqVO); + final List receivablePrice = customerMapper.selectReceivablePriceGroupbyUser(reqVO); + + // 3. 合并统计数据 + final Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); + final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + final Map contractPriceMap = convertMap(contractPrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); + final Map receivablePriceMap = convertMap(receivablePrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); + List result = new ArrayList<>(userIds.size()); + userIds.forEach(userId -> { + final CrmStatisticsCustomerSummaryByUserRespVO respVO = new CrmStatisticsCustomerSummaryByUserRespVO(); + respVO.setOwnerUserId(userId); + respVO.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) + .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) + .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.valueOf(0))) + .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.valueOf(0))); + result.add(respVO); + }); + + // 4. 拼接用户信息 + appendUserInfo(result); + + return result; } @Override - public List getRecordCount(CrmStatisticsCustomerReqVO reqVO) { + public List getFollowupSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 + reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - return getStat(reqVO, customerMapper::selectRecordCountGroupbyDate); + final List followupRecordCount = customerMapper.selectFollowupRecordCountGroupbyDate(reqVO); + final List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupbyDate(reqVO); + + // 3. 获取时间序列 + final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + + // 4. 合并统计数据 + List result = new ArrayList<>(times.size()); + final Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); + final Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); + times.forEach(time -> result.add( + new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) + .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) + .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) + )); + + return result; } @Override - public List getDistinctRecordCount(CrmStatisticsCustomerReqVO reqVO) { + public List getFollowupSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - return getStat(reqVO, customerMapper::selectDistinctRecordCountGroupbyDate); + final List followupRecordCount = customerMapper.selectFollowupRecordCountGroupbyUser(reqVO); + final List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupbyUser(reqVO); + + // 3. 合并统计数据 + final Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); + final Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); + List result = new ArrayList<>(userIds.size()); + userIds.forEach(userId -> { + final CrmStatisticsFollowupSummaryByUserRespVO stat = new CrmStatisticsFollowupSummaryByUserRespVO() + .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) + .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); + stat.setOwnerUserId(userId); + result.add(stat); + }); + + // 4. 拼接用户信息 + appendUserInfo(result); + + return result; } @Override - public List getRecordTypeCount(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组: 如果用户编号为空, 则获得部门下的用户编号数组 - if (ObjUtil.isNotNull(reqVO.getUserId())) { - reqVO.setUserIds(List.of(reqVO.getUserId())); - } else { - reqVO.setUserIds(getUserIds(reqVO.getDeptId())); - } - if (CollUtil.isEmpty(reqVO.getUserIds())) { + public List getFollowupSummaryByType(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } + reqVO.setUserIds(userIds); // 2. 获得排行数据 reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - List stats = customerMapper.selectRecordCountGroupbyType(reqVO); + List stats = customerMapper.selectFollowupRecordCountGroupbyType(reqVO); // 3. 获取字典数据 List followUpTypes = dictDataApi.getDictDataList("crm_follow_up_type"); final Map followUpTypeMap = convertMap(followUpTypes, DictDataRespDTO::getValue, DictDataRespDTO::getLabel); stats.forEach(stat -> { - stat.setCategory(followUpTypeMap.get(stat.getCategory())); + stat.setFollowupType(followUpTypeMap.get(stat.getFollowupType())); }); return stats; } @Override - public List getCustomerCycle(CrmStatisticsCustomerReqVO reqVO) { - return getStat(reqVO, customerMapper::selectCustomerCycleGroupbyDate); + public List getContractSummary(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + List contractSummary = customerMapper.selectContractSummary(reqVO); + + // 2. 拼接用户信息 + final Set userIdSet = new HashSet<>(); + userIdSet.addAll(userIds); + userIdSet.addAll(convertSet(contractSummary, CrmStatisticsCustomerContractSummaryRespVO::getCreatorUserId)); + final Map userMap = adminUserApi.getUserMap(userIdSet); + contractSummary.forEach(contract -> contract.setCreatorUserName(userMap.get(contract.getCreatorUserId()).getNickname()) + .setOwnerUserName(userMap.get(contract.getOwnerUserId()).getNickname())); + + return contractSummary; + } + + @Override + public List getCustomerDealCycleByDate(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 + reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); + final List customerDealCycle = customerMapper.selectCustomerDealCycleGroupbyDate(reqVO); + + // 3. 获取时间序列 + final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + + // 4. 合并统计数据 + List result = new ArrayList<>(times.size()); + final Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByDateRespVO::getTime, CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); + times.forEach(time -> result.add( + new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) + .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, Double.valueOf(0))) + )); + + return result; + } + + @Override + public List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + final List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取分项统计数据 + reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); + final List customerDealCycle = customerMapper.selectCustomerDealCycleGroupbyUser(reqVO); + final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyUser(reqVO); + + // 3. 合并统计数据 + final Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); + final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + List result = new ArrayList<>(userIds.size()); + userIds.forEach(userId -> { + final CrmStatisticsCustomerDealCycleByUserRespVO stat = new CrmStatisticsCustomerDealCycleByUserRespVO() + .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) + .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); + stat.setOwnerUserId(userId); + result.add(stat); + }); + + // 4. 拼接用户信息 + appendUserInfo(result); + + return result; + } + + /** + * 拼接用户信息(昵称) + * + * @param stats 统计数据 + */ + private void appendUserInfo(List stats) { + Map userMap = adminUserApi.getUserMap(convertSet(stats, CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); + stats.forEach(stat -> MapUtils.findAndThen(userMap, stat.getOwnerUserId(), user -> { + stat.setOwnerUserName(user.getNickname()); + })); } /** - * 获得统计数据 + * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 * - * @param reqVO 参数 - * @param statFunction 统计方法 - * @return 统计数据 + * @param reqVO 请求参数 + * @return 用户编号数组 */ - private List getStat(CrmStatisticsCustomerReqVO reqVO, Function> statFunction) { - // 1. 获得用户编号数组: 如果用户编号为空, 则获得部门下的用户编号数组 + private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { if (ObjUtil.isNotNull(reqVO.getUserId())) { - reqVO.setUserIds(List.of(reqVO.getUserId())); + return List.of(reqVO.getUserId()); } else { - reqVO.setUserIds(getUserIds(reqVO.getDeptId())); - } - if (CollUtil.isEmpty(reqVO.getUserIds())) { - return Collections.emptyList(); + // 1. 获得部门列表 + final Long deptId = reqVO.getDeptId(); + List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); + deptIds.add(deptId); + // 2. 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); } + } - // 2. 生成日期格式 - LocalDateTime startTime = reqVO.getTimes()[0]; - final LocalDateTime endTime = reqVO.getTimes()[1]; - final long days = LocalDateTimeUtil.between(startTime, endTime).toDays(); - boolean byMonth = days > 31; - if (byMonth) { - // 按月 - reqVO.setSqlDateFormat("%Y%m"); - } else { - // 按日 - reqVO.setSqlDateFormat("%Y%m%d"); - } - // 3. 获得排行数据 - List stats = statFunction.apply(reqVO); + /** + * 判断是否按照 月粒度 统计 + * + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return 是, 按月粒度, 否则按天粒度统计。 + */ + private boolean queryByMonth(LocalDateTime startTime, LocalDateTime endTime) { + return LocalDateTimeUtil.between(startTime, endTime).toDays() > 31; + } - // 4. 生成时间序列 - List result = CollUtil.newArrayList(); + /** + * 生成时间序列 + * + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return 时间序列 + */ + private List generateTimeSeries(LocalDateTime startTime, LocalDateTime endTime) { + boolean byMonth = queryByMonth(startTime, endTime); + List times = CollUtil.newArrayList(); while (!startTime.isAfter(endTime)) { - final String category = LocalDateTimeUtil.format(startTime, byMonth ? "yyyyMM" : "yyyyMMdd"); - result.add(new CrmStatisticsCustomerCountVO().setCategory(category)); + times.add(LocalDateTimeUtil.format(startTime, byMonth ? TIME_FORMAT_BY_MONTH : TIME_FORMAT_BY_DAY)); if (byMonth) startTime = startTime.plusMonths(1); else startTime = startTime.plusDays(1); } - // 5. 使用时间序列填充结果 - final Map statMap = convertMap(stats, - CrmStatisticsCustomerCountVO::getCategory, - Function.identity()); - result.forEach(r -> { - if (statMap.containsKey(r.getCategory())) { - r.setCount(statMap.get(r.getCategory()).getCount()) - .setCycle(statMap.get(r.getCategory()).getCycle()); - } - }); - - return result; + return times; } - /** - * 获得部门下的用户编号数组,包括子部门的 + * 获取 SQL 查询 GROUP BY 的时间格式 * - * @param deptId 部门编号 - * @return 用户编号数组 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return SQL 查询 GROUP BY 的时间格式 */ - public List getUserIds(Long deptId) { - // 1. 获得部门列表 - List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); - deptIds.add(deptId); - // 2. 获得用户编号 - return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); + private String getSqlDateFormat(LocalDateTime startTime, LocalDateTime endTime) { + return queryByMonth(startTime, endTime) ? SQL_DATE_FORMAT_BY_MONTH : SQL_DATE_FORMAT_BY_DAY; } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 06affccabb..c612d4a241 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -2,115 +2,238 @@ + - SELECT - DATE_FORMAT( create_time, #{sqlDateFormat,javaType=java.lang.String} ) AS category, - count(*) AS count - FROM - crm_customer - WHERE - deleted = 0 - AND owner_user_id IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY category + DATE_FORMAT( b.order_date, #{sqlDateFormat} ) AS time, + count( DISTINCT a.id ) AS customerDealCount + FROM crm_customer AS a + LEFT JOIN crm_contract AS b ON b.customer_id = a.id + WHERE a.deleted = 0 AND b.deleted = 0 + AND b.audit_status = 20 + AND a.owner_user_id IN + + #{userId} + + AND b.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + GROUP BY time + + + + + + + + + + - + SELECT DATE_FORMAT( create_time, #{sqlDateFormat} ) AS time, + count(*) AS followup_record_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = #{bizType} + GROUP BY time + + + - + SELECT creator as owner_user_id, + count(*) AS followup_record_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = #{bizType} + GROUP BY creator + + + + + - SELECT - DATE_FORMAT( create_time, #{sqlDateFormat,javaType=java.lang.String} ) AS category, - count(DISTINCT biz_id) AS count - FROM - crm_follow_up_record - WHERE - creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = #{bizType,javaType=java.lang.Integer} - GROUP BY category + a.`name` AS customer_name, + b.`name` AS contract_name, + b.total_price AS contract_price, + IFNULL( c.price, 0 ) AS receivable_price, + a.owner_user_id, + a.creator AS creator_user_id, + a.create_time, + b.order_date + FROM + crm_customer AS a + INNER JOIN crm_contract AS b ON a.id = b.customer_id + LEFT JOIN crm_receivable AS c ON b.id = c.contract_id + WHERE a.deleted = 0 AND b.deleted = 0 AND c.deleted = 0 + AND b.audit_status = 20 + AND a.owner_user_id IN + + #{userId} + + AND b.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} - SELECT - type AS category, - count(*) AS count - FROM crm_follow_up_record - WHERE - creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = #{bizType,javaType=java.lang.Integer} - GROUP BY category + DATE_FORMAT( b.order_date, #{sqlDateFormat} ) AS time, + IFNULL( TRUNCATE ( AVG( TIMESTAMPDIFF( DAY, a.create_time, b.order_date )), 1 ), 0 ) AS customer_deal_cycle + FROM crm_customer AS a + LEFT JOIN crm_contract AS b ON b.customer_id = a.id + WHERE a.deleted = 0 AND b.deleted = 0 + AND b.audit_status = 20 + AND a.owner_user_id IN + + #{userId} + + AND b.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + GROUP BY time - SELECT - DATE_FORMAT( b.order_date, #{sqlDateFormat,javaType=java.lang.String} ) AS category, - IFNULL( TRUNCATE ( AVG( TIMESTAMPDIFF( DAY, a.create_time, b.order_date )), 1 ), 0 ) AS cycle - FROM crm_customer AS a - LEFT JOIN crm_contract AS b ON b.customer_id = a.id - WHERE - a.deleted = 0 AND b.deleted = 0 - AND b.audit_status = 20 - AND a.owner_user_id IN - - #{userId} - - AND b.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY category + a.owner_user_id, + IFNULL( TRUNCATE ( AVG( TIMESTAMPDIFF( DAY, a.create_time, b.order_date )), 1 ), 0 ) AS customer_deal_cycle + FROM crm_customer AS a + LEFT JOIN crm_contract AS b ON b.customer_id = a.id + WHERE a.deleted = 0 AND b.deleted = 0 + AND b.audit_status = 20 + AND a.owner_user_id IN + + #{userId} + + AND b.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + GROUP BY a.owner_user_id -- Gitee From 37790d5fc13571316a7fbc8e2b0b95dce5966145 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 5 Mar 2024 18:53:41 +0800 Subject: [PATCH 0027/1557] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=20=E5=AF=B9=E8=AF=9D=E8=81=8A=E5=A4=A9chatStream=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E7=94=A8=E4=BC=9A=E8=B6=85=E6=97=B6=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/ChatController.java | 43 +++++++++++++++++++ .../src/main/resources/application.properties | 7 ++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java index b7ca740fba..eb97f92e59 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -7,8 +7,13 @@ import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; import cn.iocoder.yudao.module.ai.enums.AiModelEnum; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; import org.springframework.ai.chat.ChatClient; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.prompt.Prompt; import org.springframework.ai.openai.OpenAiChatClient; +import org.springframework.ai.openai.api.OpenAiApi; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.validation.annotation.Validated; @@ -16,6 +21,10 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Flux; + +import java.util.Scanner; +import java.util.function.Consumer; /** * AI模块 @@ -26,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController; @Tag(name = "AI模块") @RestController @RequestMapping("/ai-api") +@Slf4j public class ChatController { @Autowired @@ -44,6 +54,39 @@ public class ChatController { return CommonResult.success(res); } + @PostMapping("/chatStream") + @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") + public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { + OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); + Flux chatResponse = chatClient.stream(new Prompt(reqVO.getInputText())); + chatResponse.subscribe(new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); + } + }); + return CommonResult.success("1"); + } + + public static void main(String[] args) { + OpenAiChatClient openAiChatClient = new OpenAiChatClient(new OpenAiApi("openkey")); + Flux responseFlux = openAiChatClient.stream(new Prompt("最好的编程语言!")); + long now = System.currentTimeMillis(); + responseFlux.subscribe(new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + if (chatResponse.getResults().get(0).getOutput() == null) { + return; + } + System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); + } + }); + + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } + /** * 根据 ai模型 获取对于的 模型实现类 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties index cb06af6ee5..e53f358d0f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties @@ -3,4 +3,9 @@ # openAI https://openai.com/ spring.ai.openai.api-key=${OPEN_AI_KEY} spring.ai.openai.chat.options.model=gpt-3.5-turbo -spring.ai.openai.chat.options.temperature=0.7 \ No newline at end of file +spring.ai.openai.chat.options.temperature=0.7 +#spring.ai.vectorstore.milvus.client.connect-timeout-ms=50000 +#spring.ai.vectorstore.milvus.client.keep-alive-timeout-ms=50000 +#spring.ai.vectorstore.milvus.client.keep-alive-time-ms=80000 +#spring.ai.vectorstore.pinecone.server-side-timeout=100s + -- Gitee From 06c0d865447c8065a06d5d1dfce327a195ad91f6 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Tue, 5 Mar 2024 15:08:40 +0000 Subject: [PATCH 0028/1557] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8convertSetBy?= =?UTF-8?q?FlatMap=E9=81=BF=E5=85=8D=20ID=20=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dhb52 --- .../crm/controller/admin/customer/CrmCustomerController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index 7745a6e6cb..f5a0a4e50e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -137,7 +137,7 @@ public class CrmCustomerController { return java.util.Collections.emptyList(); } // 1.1 获取创建人、负责人列表 - Map userMap = adminUserApi.getUserMap(convertListByFlatMap(list, + Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(list, contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); // 1.2 获取距离进入公海的时间 -- Gitee From f4b1e9ca4ae1a0b46cb44152c3b9fc077c4373e0 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Tue, 5 Mar 2024 15:13:53 +0000 Subject: [PATCH 0029/1557] =?UTF-8?q?feat:=20MapUtils.findAndThen=EF=BC=8C?= =?UTF-8?q?key=20=E4=B8=BA=20null=20=E6=97=B6,=20=E4=B8=8D=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dhb52 --- .../yudao/framework/common/util/collection/MapUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java index f4a17b5233..6f62573b2f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java @@ -40,6 +40,7 @@ public class MapUtils { /** * 从哈希表查找到 key 对应的 value,然后进一步处理 + * key 为 null 时, 不处理 * 注意,如果查找到的 value 为 null 时,不进行处理 * * @param map 哈希表 @@ -47,7 +48,7 @@ public class MapUtils { * @param consumer 进一步处理的逻辑 */ public static void findAndThen(Map map, K key, Consumer consumer) { - if (CollUtil.isEmpty(map)) { + if (ObjUtil.isNull(key) || CollUtil.isEmpty(map)) { return; } V value = map.get(key); -- Gitee From 0386820a1c80354917afe20e31cc5048a1f5be3d Mon Sep 17 00:00:00 2001 From: dhb52 Date: Tue, 5 Mar 2024 23:16:16 +0800 Subject: [PATCH 0030/1557] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0[=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=A1=8C=E4=B8=9A=E3=80=81=E5=AE=A2=E6=88=B7=E6=9D=A5?= =?UTF-8?q?=E6=BA=90]=E7=AD=89=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/customer/CrmCustomerController.java | 2 +- ...CrmStatisticsCustomerByUserBaseRespVO.java | 2 + ...atisticsCustomerContractSummaryRespVO.java | 22 ++- ...StatisticsCustomerSummaryByUserRespVO.java | 4 +- .../CrmStatisticsCustomerServiceImpl.java | 179 +++++++++++------- .../CrmStatisticsCustomerMapper.xml | 4 +- 6 files changed, 139 insertions(+), 74 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index 36b3ee8132..a4adeee3e3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -142,7 +142,7 @@ public class CrmCustomerController { return java.util.Collections.emptyList(); } // 1.1 获取创建人、负责人列表 - Map userMap = adminUserApi.getUserMap(convertListByFlatMap(list, + Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(list, contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); // 1.2 获取距离进入公海的时间 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java index 82f74f2304..340e930663 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -10,6 +11,7 @@ import lombok.Data; public class CrmStatisticsCustomerByUserBaseRespVO { @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @JsonIgnore private Long ownerUserId; @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java index 7cb02e521e..019309f8e0 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java @@ -1,13 +1,18 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*; + @Schema(description = "管理后台 - CRM 客户转化率分析 VO") @Data public class CrmStatisticsCustomerContractSummaryRespVO { @@ -24,20 +29,30 @@ public class CrmStatisticsCustomerContractSummaryRespVO { @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1200.00") private BigDecimal receivablePrice; + @Schema(description = "客户行业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @JsonIgnore + private String industryId; + @Schema(description = "客户行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "金融") - private String customerType; + private String industryName; + + @Schema(description = "客户来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @JsonIgnore + private String source; @Schema(description = "客户来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "外呼") - private String customerSource; + private String sourceName; @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @JsonIgnore private Long ownerUserId; @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") private String ownerUserName; @Schema(description = "创建人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Long creatorUserId; + @JsonIgnore + private String creatorUserId; @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, example = "源码") private String creatorUserName; @@ -46,6 +61,7 @@ public class CrmStatisticsCustomerContractSummaryRespVO { private LocalDateTime createTime; @Schema(description = "下单日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02 00:00:00") + @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT) private LocalDate orderDate; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java index ffa5e21ae1..bd719a1b8a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java @@ -16,9 +16,9 @@ public class CrmStatisticsCustomerSummaryByUserRespVO extends CrmStatisticsCusto private Integer customerDealCount = 0; @Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") - private BigDecimal contractPrice = BigDecimal.valueOf(0); + private BigDecimal contractPrice = BigDecimal.ZERO; @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") - private BigDecimal receivablePrice = BigDecimal.valueOf(0); + private BigDecimal receivablePrice = BigDecimal.ZERO; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index 77bd0fcf67..6b664dce55 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; @@ -19,9 +20,14 @@ import org.springframework.validation.annotation.Validated; import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; /** * CRM 客户分析 Service 实现类 @@ -68,16 +74,20 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); // 4. 合并统计数据 - List result = new ArrayList<>(times.size()); - final Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); - final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); - times.forEach(time -> result.add( + List respVoList = new ArrayList<>(times.size()); + final Map customerCreateCountMap = convertMap(customerCreateCount, + CrmStatisticsCustomerSummaryByDateRespVO::getTime, + CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); + final Map customerDealCountMap = convertMap(customerDealCount, + CrmStatisticsCustomerSummaryByDateRespVO::getTime, + CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); + times.forEach(time -> respVoList.add( new CrmStatisticsCustomerSummaryByDateRespVO().setTime(time) .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) )); - return result; + return respVoList; } @Override @@ -96,25 +106,33 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List receivablePrice = customerMapper.selectReceivablePriceGroupbyUser(reqVO); // 3. 合并统计数据 - final Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); - final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - final Map contractPriceMap = convertMap(contractPrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); - final Map receivablePriceMap = convertMap(receivablePrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); - List result = new ArrayList<>(userIds.size()); + final Map customerCreateCountMap = convertMap(customerCreateCount, + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); + final Map customerDealCountMap = convertMap(customerDealCount, + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + final Map contractPriceMap = convertMap(contractPrice, + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); + final Map receivablePriceMap = convertMap(receivablePrice, + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); + List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { - final CrmStatisticsCustomerSummaryByUserRespVO respVO = new CrmStatisticsCustomerSummaryByUserRespVO(); - respVO.setOwnerUserId(userId); - respVO.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) + final CrmStatisticsCustomerSummaryByUserRespVO vo = new CrmStatisticsCustomerSummaryByUserRespVO(); + vo.setOwnerUserId(userId); + vo.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) - .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.valueOf(0))) - .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.valueOf(0))); - result.add(respVO); + .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.ZERO)) + .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.ZERO)); + respVoList.add(vo); }); // 4. 拼接用户信息 - appendUserInfo(result); + appendUserInfo(respVoList); - return result; + return respVoList; } @Override @@ -136,16 +154,20 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); // 4. 合并统计数据 - List result = new ArrayList<>(times.size()); - final Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); - final Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); - times.forEach(time -> result.add( + List respVoList = new ArrayList<>(times.size()); + final Map followupRecordCountMap = convertMap(followupRecordCount, + CrmStatisticsFollowupSummaryByDateRespVO::getTime, + CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); + final Map followupCustomerCountMap = convertMap(followupCustomerCount, + CrmStatisticsFollowupSummaryByDateRespVO::getTime, + CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); + times.forEach(time -> respVoList.add( new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) )); - return result; + return respVoList; } @Override @@ -163,21 +185,25 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupbyUser(reqVO); // 3. 合并统计数据 - final Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); - final Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); - List result = new ArrayList<>(userIds.size()); + final Map followupRecordCountMap = convertMap(followupRecordCount, + CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); + final Map followupCustomerCountMap = convertMap(followupCustomerCount, + CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); + List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { - final CrmStatisticsFollowupSummaryByUserRespVO stat = new CrmStatisticsFollowupSummaryByUserRespVO() + final CrmStatisticsFollowupSummaryByUserRespVO vo = new CrmStatisticsFollowupSummaryByUserRespVO() .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); - stat.setOwnerUserId(userId); - result.add(stat); + vo.setOwnerUserId(userId); + respVoList.add(vo); }); // 4. 拼接用户信息 - appendUserInfo(result); + appendUserInfo(respVoList); - return result; + return respVoList; } @Override @@ -191,16 +217,17 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 2. 获得排行数据 reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - List stats = customerMapper.selectFollowupRecordCountGroupbyType(reqVO); + List respVoList = customerMapper.selectFollowupRecordCountGroupbyType(reqVO); // 3. 获取字典数据 - List followUpTypes = dictDataApi.getDictDataList("crm_follow_up_type"); - final Map followUpTypeMap = convertMap(followUpTypes, DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - stats.forEach(stat -> { - stat.setFollowupType(followUpTypeMap.get(stat.getFollowupType())); + List followUpTypes = dictDataApi.getDictDataList(CRM_FOLLOW_UP_TYPE); + final Map followUpTypeMap = convertMap(followUpTypes, + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + respVoList.forEach(vo -> { + vo.setFollowupType(followUpTypeMap.get(vo.getFollowupType())); }); - return stats; + return respVoList; } @Override @@ -212,17 +239,29 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } reqVO.setUserIds(userIds); - List contractSummary = customerMapper.selectContractSummary(reqVO); - - // 2. 拼接用户信息 - final Set userIdSet = new HashSet<>(); - userIdSet.addAll(userIds); - userIdSet.addAll(convertSet(contractSummary, CrmStatisticsCustomerContractSummaryRespVO::getCreatorUserId)); - final Map userMap = adminUserApi.getUserMap(userIdSet); - contractSummary.forEach(contract -> contract.setCreatorUserName(userMap.get(contract.getCreatorUserId()).getNickname()) - .setOwnerUserName(userMap.get(contract.getOwnerUserId()).getNickname())); + // 2. 获取统计数据 + List respVoList = customerMapper.selectContractSummary(reqVO); + + // 3. 设置 创建人、负责人、行业、来源 + // 获取客户所属行业 + Map industryMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_INDUSTRY), + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + // 获取客户来源 + Map sourceMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_SOURCE), + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + // 获取创建人、负责人列表 + Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(respVoList, + vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); + + respVoList.forEach(vo -> { + MapUtils.findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); + MapUtils.findAndThen(sourceMap, vo.getSource(), vo::setSourceName); + MapUtils.findAndThen(userMap, NumberUtils.parseLong(vo.getCreatorUserId()), + user -> vo.setCreatorUserName(user.getNickname())); + MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); + }); - return contractSummary; + return respVoList; } @Override @@ -243,14 +282,16 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); // 4. 合并统计数据 - List result = new ArrayList<>(times.size()); - final Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByDateRespVO::getTime, CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); - times.forEach(time -> result.add( + List respVoList = new ArrayList<>(times.size()); + final Map customerDealCycleMap = convertMap(customerDealCycle, + CrmStatisticsCustomerDealCycleByDateRespVO::getTime, + CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); + times.forEach(time -> respVoList.add( new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) - .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, Double.valueOf(0))) + .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) )); - return result; + return respVoList; } @Override @@ -268,33 +309,37 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyUser(reqVO); // 3. 合并统计数据 - final Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); - final Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - List result = new ArrayList<>(userIds.size()); + final Map customerDealCycleMap = convertMap(customerDealCycle, + CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); + final Map customerDealCountMap = convertMap(customerDealCount, + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { - final CrmStatisticsCustomerDealCycleByUserRespVO stat = new CrmStatisticsCustomerDealCycleByUserRespVO() + final CrmStatisticsCustomerDealCycleByUserRespVO vo = new CrmStatisticsCustomerDealCycleByUserRespVO() .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); - stat.setOwnerUserId(userId); - result.add(stat); + vo.setOwnerUserId(userId); + respVoList.add(vo); }); // 4. 拼接用户信息 - appendUserInfo(result); + appendUserInfo(respVoList); - return result; + return respVoList; } /** * 拼接用户信息(昵称) * - * @param stats 统计数据 + * @param respVoList 统计数据 */ - private void appendUserInfo(List stats) { - Map userMap = adminUserApi.getUserMap(convertSet(stats, CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); - stats.forEach(stat -> MapUtils.findAndThen(userMap, stat.getOwnerUserId(), user -> { - stat.setOwnerUserName(user.getNickname()); - })); + private void appendUserInfo(List respVoList) { + Map userMap = adminUserApi.getUserMap(convertSet(respVoList, + CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); + respVoList.forEach(vo -> MapUtils.findAndThen(userMap, + vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index c612d4a241..3fd52f3e72 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -180,8 +180,10 @@ SELECT a.`name` AS customer_name, b.`name` AS contract_name, - b.total_price AS contract_price, + b.total_price, IFNULL( c.price, 0 ) AS receivable_price, + a.industry_id, + a.source, a.owner_user_id, a.creator AS creator_user_id, a.create_time, -- Gitee From e86059ed80fd5c968f8b340248adc1a77b1110cb Mon Sep 17 00:00:00 2001 From: scholar <1145227973@qq.com> Date: Fri, 8 Mar 2024 10:11:47 +0800 Subject: [PATCH 0031/1557] =?UTF-8?q?CRM=E5=91=98=E5=B7=A5=E4=B8=9A?= =?UTF-8?q?=E7=BB=A9=E7=BB=9F=E8=AE=A1PR=20v1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/common/util/date/DateUtils.java | 6 ++ ...mStatisticsStaffPerformanceController.java | 52 ++++++++++ .../CrmStatisticsStaffPerformanceReqVO.java | 29 ++++++ .../CrmStatisticsStaffPerformanceRespVO.java | 39 ++++++++ .../CrmStatisticsStaffPerformanceMapper.java | 37 ++++++++ .../CrmStatisticsStaffPerformanceService.java | 42 ++++++++ ...StatisticsStaffPerformanceServiceImpl.java | 95 +++++++++++++++++++ .../mapper/bi/CrmBiStaffPerformanceMapper.xml | 36 +++++++ 8 files changed, 336 insertions(+) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsStaffPerformanceController.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceReqVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsStaffPerformanceMapper.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiStaffPerformanceMapper.xml diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java index 53b5574f95..00e13ef235 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java @@ -27,6 +27,12 @@ public class DateUtils { public static final String FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND = "yyyy-MM-dd HH:mm:ss"; + public static final String FORMAT_YEAR = "yyyy"; + + public static final String FORMAT_YEAR_MONTH = "yyyy-MM"; + + + public static final String FORMAT_HOUR_MINUTE_SECOND = "HH:mm:ss"; /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsStaffPerformanceController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsStaffPerformanceController.java new file mode 100644 index 0000000000..1581611fb3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsStaffPerformanceController.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceRespVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsStaffPerformanceService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + + +@Tag(name = "管理后台 - CRM 员工业绩统计") +@RestController +@RequestMapping("/crm/statistics-performance") +@Validated +public class CrmStatisticsStaffPerformanceController { + + @Resource + private CrmStatisticsStaffPerformanceService performanceService; + + @GetMapping("/get-contract-count-performance") + @Operation(summary = "员工业绩-签约合同数量") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getContractCountStaffPerformance(@Valid CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return success(performanceService.getContractCountStaffPerformance(staffPerformanceReqVO)); + } + + @GetMapping("/get-contract-price-performance") + @Operation(summary = "员工业绩-获得合同金额") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getContractPriceStaffPerformance(@Valid CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return success(performanceService.getContractPriceStaffPerformance(staffPerformanceReqVO)); + } + + @GetMapping("/get-receivable-price-performance") + @Operation(summary = "员工业绩-获得回款金额") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getReceivablePriceStaffPerformance(@Valid CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return success(performanceService.getReceivablePriceStaffPerformance(staffPerformanceReqVO)); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceReqVO.java new file mode 100644 index 0000000000..8d5d2bf5ef --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceReqVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - CRM 员工业绩统计 Request VO") +@Data +public class CrmStatisticsStaffPerformanceReqVO { + + @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "部门 id 不能为空") + private Long deptId; + + + @Schema(description = "年", requiredMode = Schema.RequiredMode.REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR) + @NotEmpty(message = "时间不能为空") + private LocalDateTime year; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceRespVO.java new file mode 100644 index 0000000000..859ce9c4f7 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/CrmStatisticsStaffPerformanceRespVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotEmpty; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH; + +@Schema(description = "管理后台 - CRM 员工业绩统计 Response VO") +@Data +public class CrmStatisticsStaffPerformanceRespVO { + + @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long ownerUserId; + + @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private String nickname; + + @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private String deptName; + + @Schema(description = "年-月", requiredMode = Schema.RequiredMode.REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH) + @NotEmpty(message = "时间不能为空") + private LocalDateTime orderDate; + + /** + * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 + * + * 1. 金额:合同金额排行、回款金额排行 + * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 + */ + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer count; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsStaffPerformanceMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsStaffPerformanceMapper.java new file mode 100644 index 0000000000..0623c78af3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsStaffPerformanceMapper.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceRespVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +@Mapper +public interface CrmStatisticsStaffPerformanceMapper { + + /** + * 员工签约合同数量 + * + * @param staffPerformanceReqVO 参数 + * @return 员工签约合同数量 + */ + List selectContractCountStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + + /** + * 员工签约合同金额 + * + * @param staffPerformanceReqVO 参数 + * @return 员工签约合同金额 + */ + List selectContractPriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + /** + * 员工回款金额 + * + * @param staffPerformanceReqVO 参数 + * @return 员工回款金额 + */ + List selectReceivablePriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceService.java new file mode 100644 index 0000000000..208095d32a --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceService.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + + + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceRespVO; + +import java.util.List; + +/** + * CRM 员工绩效统计 Service 接口 + * + * @author scholar + */ +public interface CrmStatisticsStaffPerformanceService { + + /** + * 员工签约合同数量分析 + * + * @param staffPerformanceReqVO 排行参数 + * @return 员工签约合同数量排行分析 + */ + List getContractCountStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + /** + * 员工签约合同金额分析 + * + * @param staffPerformanceReqVO 排行参数 + * @return 员工签约合同金额分析 + */ + List getContractPriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + /** + * 员工获得回款金额分析 + * + * @param staffPerformanceReqVO 排行参数 + * @return 员工获得回款金额分析 + */ + List getReceivablePriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO); + + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceServiceImpl.java new file mode 100644 index 0000000000..8dceafcde9 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsStaffPerformanceServiceImpl.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.CrmStatisticsStaffPerformanceRespVO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsStaffPerformanceMapper; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; + +/** + * CRM 员工业绩分析 Service 实现类 + * + * @author scholar + */ +@Service +@Validated +public class CrmStatisticsStaffPerformanceServiceImpl implements CrmStatisticsStaffPerformanceService { + + @Resource + private CrmStatisticsStaffPerformanceMapper staffPerformanceMapper; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + + + + @Override + public List getContractCountStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return getStaffPerformance(staffPerformanceReqVO, staffPerformanceMapper::selectContractCountStaffPerformance); + } + @Override + public List getContractPriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return getStaffPerformance(staffPerformanceReqVO, staffPerformanceMapper::selectContractPriceStaffPerformance); + } + + @Override + public List getReceivablePriceStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO) { + return getStaffPerformance(staffPerformanceReqVO, staffPerformanceMapper::selectReceivablePriceStaffPerformance); + } + + + + /** + * 获得员工业绩数据 + * + * @param staffPerformanceReqVO 参数 + * @param staffPerformanceFunction 排行榜方法 + * @return 排行版数据 + */ + private List getStaffPerformance(CrmStatisticsStaffPerformanceReqVO staffPerformanceReqVO, Function> staffPerformanceFunction) { + + // 1. 获得员工业绩数据 + List performance = staffPerformanceFunction.apply(staffPerformanceReqVO); + if (CollUtil.isEmpty(performance)) { + return Collections.emptyList(); + } + performance.sort(Comparator.comparing(CrmStatisticsStaffPerformanceRespVO::getCount).reversed()); + // 3. 拼接用户信息 + appendUserInfo(performance); + return performance; + } + + /** + * 拼接用户信息(昵称、部门) + * + * @param performances 员工业绩数据 + */ + private void appendUserInfo(List performances) { + Map userMap = adminUserApi.getUserMap(convertSet(performances, CrmStatisticsStaffPerformanceRespVO::getOwnerUserId)); + Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + performances.forEach(performance -> MapUtils.findAndThen(userMap, performance.getOwnerUserId(), user -> { + performance.setNickname(user.getNickname()); + MapUtils.findAndThen(deptMap, user.getDeptId(), dept -> performance.setDeptName(dept.getName())); + })); + } + + + +} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiStaffPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiStaffPerformanceMapper.xml new file mode 100644 index 0000000000..0f930e7d35 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiStaffPerformanceMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + -- Gitee From d30700d06003ed72dfed27b547ad2544f088c2ee Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Mar 2024 11:03:17 +0800 Subject: [PATCH 0032/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E6=97=B6=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BF=9D=E8=AF=81=E7=88=B6=E7=BA=BF=E7=A8=8B=E7=9A=84?= =?UTF-8?q?=20ThreadLocal=20=E4=BC=A0=E5=85=A5=E5=AD=90=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/common/util/cache/CacheUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java index 41f75405e8..acd48aa121 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java @@ -7,6 +7,7 @@ import com.google.common.cache.LoadingCache; import java.time.Duration; import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** @@ -17,8 +18,11 @@ import java.util.concurrent.Executors; public class CacheUtils { public static LoadingCache buildAsyncReloadingCache(Duration duration, CacheLoader loader) { - Executor executor = Executors.newCachedThreadPool( // TODO 芋艿:可能要思考下,未来要不要做成可配置 - TtlExecutors.getDefaultDisableInheritableThreadFactory()); // TTL 保证 ThreadLocal 可以透传 + // 1. 使用 TTL 包装 ExecutorService,实现 ThreadLocal 的透传 + // https://github.com/YunaiV/ruoyi-vue-pro/issues/432 + ExecutorService executorService = Executors.newCachedThreadPool(); // TODO 芋艿:可能要思考下,未来要不要做成可配置 + Executor executor = TtlExecutors.getTtlExecutorService(executorService); + // 2. 创建 Guava LoadingCache return CacheBuilder.newBuilder() // 只阻塞当前数据加载线程,其他线程返回旧值 .refreshAfterWrite(duration) -- Gitee From 89fc83c41938d0fd88337507c0190fdcaba6ff41 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Mar 2024 11:58:05 +0800 Subject: [PATCH 0033/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=9D=83=E9=99=90=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 2 +- yudao-dependencies/pom.xml | 4 +- .../common/util/collection/MapUtils.java | 4 +- .../dict/core/DictFrameworkUtils.java | 3 +- .../core/annotations/ExcelColumnSelect.java | 4 +- .../core/handler/SelectSheetWriteHandler.java | 46 +++++++++++-------- .../vo/business/CrmBusinessTransferReqVO.java | 1 + .../vo/customer/CrmCustomerImportExcelVO.java | 4 +- .../vo/customer/CrmCustomerTransferReqVO.java | 2 +- .../permission/CrmPermissionController.java | 6 ++- .../permission/vo/CrmPermissionSaveReqVO.java | 3 +- .../dal/mysql/contact/CrmContactMapper.java | 1 + .../mysql/receivable/CrmReceivableMapper.java | 4 ++ ...ava => AreaExcelColumnSelectFunction.java} | 4 +- .../crm/framework/excel/package-info.java | 3 ++ .../framework/operatelog/package-info.java | 3 ++ .../framework/permission/package-info.java | 3 ++ .../crm/framework/web/package-info.java | 2 +- .../contract/CrmContractServiceImpl.java | 4 +- .../receivable/CrmReceivableService.java | 6 +-- .../receivable/CrmReceivableServiceImpl.java | 4 +- 21 files changed, 71 insertions(+), 42 deletions(-) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/{AreaExcelColumnSelectFunctionImpl.java => AreaExcelColumnSelectFunction.java} (79%) diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 49da40058b..bdc70b63fc 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 01/03/2024 19:39:45 + Date: 05/03/2024 23:36:35 */ SET NAMES utf8mb4; diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index c9667aea2d..3a024933b6 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -627,11 +627,11 @@ ureport2-console ${ureport2.version} - + org.apache.poi poi - + org.apache.poi poi-ooxml diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java index f4a17b5233..a59b53fd4b 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.common.util.collection; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; @@ -40,6 +41,7 @@ public class MapUtils { /** * 从哈希表查找到 key 对应的 value,然后进一步处理 + * key 为 null 时, 不处理 * 注意,如果查找到的 value 为 null 时,不进行处理 * * @param map 哈希表 @@ -47,7 +49,7 @@ public class MapUtils { * @param consumer 进一步处理的逻辑 */ public static void findAndThen(Map map, K key, Consumer consumer) { - if (CollUtil.isEmpty(map)) { + if (ObjUtil.isNull(key) || CollUtil.isEmpty(map)) { return; } V value = map.get(key); diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java index e51ef16e7f..8dada3f752 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java @@ -13,8 +13,6 @@ import lombok.extern.slf4j.Slf4j; import java.time.Duration; import java.util.List; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; - /** * 字典工具类 * @@ -27,6 +25,7 @@ public class DictFrameworkUtils { private static final DictDataRespDTO DICT_DATA_NULL = new DictDataRespDTO(); + // TODO @puhui999:GET_DICT_DATA_CACHE、GET_DICT_DATA_LIST_CACHE、PARSE_DICT_DATA_CACHE 这 3 个缓存是有点重叠,可以思考下,有没可能减少 1 个。微信讨论好私聊,再具体改哈 /** * 针对 {@link #getDictDataLabel(String, String)} 的缓存 */ diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java index 5daa1e0642..b4ff140aff 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java @@ -3,7 +3,9 @@ package cn.iocoder.yudao.framework.excel.core.annotations; import java.lang.annotation.*; /** - * 给列添加下拉选择数据 + * 给 Excel 列添加下拉选择数据 + * + * 其中 {@link #dictType()} 和 {@link #functionName()} 二选一 * * @author HUIHUI */ diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index df4601b94c..fd66c40189 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.framework.excel.core.handler; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import cn.hutool.poi.excel.ExcelUtil; @@ -59,7 +60,6 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { } // 解析下拉数据 - // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的。回答:主要是用于定位到列索引 Map excelPropertyFields = getFieldsWithAnnotation(head, ExcelProperty.class); Map excelColumnSelectFields = getFieldsWithAnnotation(head, ExcelColumnSelect.class); int colIndex = 0; @@ -71,39 +71,47 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { if (index != -1) { colIndex = index; } - getSelectDataList(colIndex, field); + buildSelectDataList(colIndex, field); } colIndex++; } + // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的。回答:主要是用于定位到列索引;补充:可以看看下面这样写? +// for (Field field : head.getDeclaredFields()) { +// if (field.isAnnotationPresent(ExcelColumnSelect.class)) { +// ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); +// if (excelProperty != null) { +// colIndex = excelProperty.index(); +// } +// getSelectDataList(colIndex, field); +// } +// colIndex++; +// } } /** - * 获得下拉数据 + * 获得下拉数据,并添加到 {@link #selectMap} 中 * * @param colIndex 列索引 * @param field 字段 */ - private void getSelectDataList(int colIndex, Field field) { - // 获得下拉注解信息 + private void buildSelectDataList(int colIndex, Field field) { ExcelColumnSelect columnSelect = field.getAnnotation(ExcelColumnSelect.class); String dictType = columnSelect.dictType(); + String functionName = columnSelect.functionName(); + Assert.isTrue(ObjectUtil.isNotEmpty(dictType) || ObjectUtil.isNotEmpty(functionName), + "Field({}) 的 @ExcelColumnSelect 注解,dictType 和 functionName 不能同时为空", field.getName()); + + // 情况一:使用 dictType 获得下拉数据 if (StrUtil.isNotEmpty(dictType)) { // 情况一: 字典数据 (默认) selectMap.put(colIndex, DictFrameworkUtils.getDictDataLabelList(dictType)); return; } - String functionName = columnSelect.functionName(); - if (StrUtil.isEmpty(functionName)) { // 情况二: 获取自定义数据 - log.warn("[getSelectDataList]解析下拉数据失败,参数信息 dictType[{}] functionName[{}]", dictType, functionName); - return; - } - // 获得所有的下拉数据源获取方法 + + // 情况二:使用 functionName 获得下拉数据 Map functionMap = SpringUtil.getApplicationContext().getBeansOfType(ExcelColumnSelectFunction.class); - functionMap.values().forEach(func -> { - if (ObjUtil.notEqual(func.getName(), functionName)) { - return; - } - selectMap.put(colIndex, func.getOptions()); - }); + ExcelColumnSelectFunction function = CollUtil.findOne(functionMap.values(), item -> item.getName().equals(functionName)); + Assert.notNull(function, "未找到对应的 function({})", functionName); + selectMap.put(colIndex, function.getOptions()); } @Override @@ -121,7 +129,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { Sheet dictSheet = workbook.createSheet(DICT_SHEET_NAME); for (KeyValue> keyValue : keyValues) { int rowLength = keyValue.getValue().size(); - // 2.1 设置字典 sheet 页的值 每一列一个字典项 + // 2.1 设置字典 sheet 页的值,每一列一个字典项 for (int i = 0; i < rowLength; i++) { Row row = dictSheet.getRow(i); if (row == null) { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java index 083ea35706..9fe7e23169 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java @@ -13,6 +13,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class CrmBusinessTransferReqVO { + // TODO @puhui999:这里最好还是用 id 哈,主要还是在 Business 业务里 @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "商机编号不能为空") private Long bizId; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java index f06122c3b4..a45e9115fe 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; import cn.iocoder.yudao.framework.excel.core.convert.AreaConvert; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; -import cn.iocoder.yudao.module.crm.framework.excel.core.AreaExcelColumnSelectFunctionImpl; +import cn.iocoder.yudao.module.crm.framework.excel.core.AreaExcelColumnSelectFunction; import com.alibaba.excel.annotation.ExcelProperty; import lombok.AllArgsConstructor; import lombok.Builder; @@ -43,7 +43,7 @@ public class CrmCustomerImportExcelVO { private String email; @ExcelProperty(value = "地区", converter = AreaConvert.class) - @ExcelColumnSelect(functionName = AreaExcelColumnSelectFunctionImpl.NAME) + @ExcelColumnSelect(functionName = AreaExcelColumnSelectFunction.NAME) private Integer areaId; @ExcelProperty("详细地址") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java index 98d0d4a647..38f6f1756f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java @@ -31,7 +31,7 @@ public class CrmCustomerTransferReqVO { private Integer oldOwnerPermissionLevel; /** - * 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 + * 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择。选中时,也一起转移 */ @Schema(description = "同时转移", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") private List toBizTypes; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java index 1cf8d7591f..11289b0ed9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java @@ -68,22 +68,24 @@ public class CrmPermissionController { @Resource private PostApi postApi; + // TODO @puhui999:是不是还是叫 create 好点哈。 @PostMapping("/create") @Operation(summary = "创建数据权限") @Transactional(rollbackFor = Exception.class) @PreAuthorize("@ss.hasPermission('crm:permission:create')") @CrmPermission(bizTypeValue = "#reqVO.bizType", bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) - public CommonResult addPermission(@Valid @RequestBody CrmPermissionSaveReqVO reqVO) { + public CommonResult savePermission(@Valid @RequestBody CrmPermissionSaveReqVO reqVO) { permissionService.createPermission(BeanUtils.toBean(reqVO, CrmPermissionCreateReqBO.class)); + // 处理【同时添加至】的权限 if (CollUtil.isNotEmpty(reqVO.getToBizTypes())) { createBizTypePermissions(reqVO); } return success(true); } - private void createBizTypePermissions(CrmPermissionSaveReqVO reqVO) { List createPermissions = new ArrayList<>(); + // TODO @puhui999:需要考虑,被添加人,是不是应该有对应的权限了; if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTACT.getType())) { List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getBizId(), getLoginUserId()); contactList.forEach(item -> { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java index 9635cc627f..2ec7ed8db6 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionSaveReqVO.java @@ -33,7 +33,8 @@ public class CrmPermissionSaveReqVO { private Integer level; /** - * 添加客户团队成员时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 + * 添加客户团队成员时,需要额外有【联系人】【商机】【合同】的 checkbox 选择。 + * 选中时,同时添加对应的权限 */ @Schema(description = "同时添加", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") private List toBizTypes; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java index d4244bce0b..f94b50f490 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java @@ -74,6 +74,7 @@ public interface CrmContactMapper extends BaseMapperX { } default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { + // TODO @puhui999:父类有 selectList,查询 2 个字段的简化方法哈,可以用下 return selectList(new LambdaQueryWrapperX() .eq(CrmContactDO::getCustomerId, customerId) .eq(CrmContactDO::getOwnerUserId, ownerUserId)); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivableMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivableMapper.java index 5a5e9ce2b6..0c821c8c23 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivableMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivableMapper.java @@ -99,4 +99,8 @@ public interface CrmReceivableMapper extends BaseMapperX { return convertMap(result, obj -> (Long) obj.get("contract_id"), obj -> (BigDecimal) obj.get("total_price")); } + default Long selectCountByContractId(Long contractId) { + return selectCount(CrmReceivableDO::getContractId, contractId); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java similarity index 79% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java index 9df93ac6d0..b407ed4702 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunctionImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java @@ -10,10 +10,12 @@ import java.util.List; /** * Excel 所属地区列下拉数据源获取接口实现类 * + * // TODO @puhui999:类名叫:地区下拉框数据源的 {@link ExcelColumnSelectFunction} 实现类,这样看起来会更简洁一点哈 + * * @author HUIHUI */ @Service -public class AreaExcelColumnSelectFunctionImpl implements ExcelColumnSelectFunction { +public class AreaExcelColumnSelectFunction implements ExcelColumnSelectFunction { public static final String NAME = "getCrmAreaNameList"; // 防止和别的模块重名 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java index 8b54b9f555..c2deef8b8b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/package-info.java @@ -1 +1,4 @@ +/** + * crm 模块的 excel 拓展封装 + */ package cn.iocoder.yudao.module.crm.framework.excel; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/package-info.java index 975a2eb51d..413b652c1f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/operatelog/package-info.java @@ -1 +1,4 @@ +/** + * crm 模块的 operatelog 拓展封装 + */ package cn.iocoder.yudao.module.crm.framework.operatelog; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/permission/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/permission/package-info.java index 44f4080160..97f76dbe12 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/permission/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/permission/package-info.java @@ -1 +1,4 @@ +/** + * crm 模块的 permission 拓展封装 + */ package cn.iocoder.yudao.module.crm.framework.permission; \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java index e18c3cdb51..09de7263c5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java @@ -1,4 +1,4 @@ /** - * trade 模块的 web 配置 + * crm 模块的 web 拓展封装 */ package cn.iocoder.yudao.module.crm.framework.web; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index 39ad8f5df4..beb3ef1a8f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; -import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -27,7 +26,6 @@ import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPerm import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; -import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -231,7 +229,7 @@ public class CrmContractServiceImpl implements CrmContractService { // 1.1 校验存在 CrmContractDO contract = validateContractExists(id); // 1.2 如果被 CrmReceivableDO 所使用,则不允许删除 - if (receivableService.getReceivableByContractId(contract.getId()) != 0) { + if (receivableService.getReceivableCountByContractId(contract.getId()) > 0) { throw exception(CONTRACT_DELETE_FAIL); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java index c4a68fd708..f6ac8c3fd4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java @@ -123,11 +123,11 @@ public interface CrmReceivableService { Map getReceivablePriceMapByContractId(Collection contractIds); /** - * 更具合同编号查询回款列表 + * 根据合同编号查询回款数量 * * @param contractId 合同编号 - * @return 回款 + * @return 回款数量 */ - Long getReceivableByContractId(Long contractId); + Long getReceivableCountByContractId(Long contractId); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java index 889d94e1f4..94e1bfb412 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java @@ -302,8 +302,8 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { } @Override - public Long getReceivableByContractId(Long contractId) { - return receivableMapper.selectCount(CrmReceivableDO::getContractId, contractId); + public Long getReceivableCountByContractId(Long contractId) { + return receivableMapper.selectCountByContractId(contractId); } } -- Gitee From 0043d02d0a10027ba0151a6e7ff4aef51c55e64c Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 9 Mar 2024 14:31:43 +0800 Subject: [PATCH 0034/1557] =?UTF-8?q?fix=EF=BC=9A=E5=95=86=E6=9C=BA=20api?= =?UTF-8?q?=20=E6=96=87=E6=A1=A3=E7=94=9F=E6=88=90=E4=B8=8D=E5=AF=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/vo/business/CrmBusinessSaveReqVO.java | 4 ++-- .../crm/service/business/CrmBusinessServiceImpl.java | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java index a9ebaae05e..fa86692e7b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java @@ -66,13 +66,13 @@ public class CrmBusinessSaveReqVO { private Long contactId; // 使用场景,在【联系人详情】添加商机时,如果需要关联两者,需要传递 contactId 字段 @Schema(description = "产品列表") - private List products; + private List businessProducts; @Schema(description = "产品列表") @Data @NoArgsConstructor @AllArgsConstructor - public static class Product { + public static class BusinessProduct { @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20529") @NotNull(message = "产品编号不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index 9f2e4ceb62..5ec0a4b417 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.crm.service.business; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; -import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -24,7 +23,6 @@ import cn.iocoder.yudao.module.crm.service.contact.CrmContactBusinessService; import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; -import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -90,7 +88,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { success = CRM_BUSINESS_CREATE_SUCCESS) public Long createBusiness(CrmBusinessSaveReqVO createReqVO, Long userId) { // 1.1 校验产品项的有效性 - List businessProducts = validateBusinessProducts(createReqVO.getProducts()); + List businessProducts = validateBusinessProducts(createReqVO.getBusinessProducts()); // 1.2 校验关联字段 validateRelationDataExists(createReqVO); @@ -131,7 +129,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { // 1.1 校验存在 CrmBusinessDO oldBusiness = validateBusinessExists(updateReqVO.getId()); // 1.2 校验产品项的有效性 - List businessProducts = validateBusinessProducts(updateReqVO.getProducts()); + List businessProducts = validateBusinessProducts(updateReqVO.getBusinessProducts()); // 1.3 校验关联字段 validateRelationDataExists(updateReqVO); @@ -204,9 +202,9 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { } } - private List validateBusinessProducts(List list) { + private List validateBusinessProducts(List list) { // 1. 校验产品存在 - productService.validProductList(convertSet(list, CrmBusinessSaveReqVO.Product::getProductId)); + productService.validProductList(convertSet(list, CrmBusinessSaveReqVO.BusinessProduct::getProductId)); // 2. 转化为 CrmBusinessProductDO 列表 return convertList(list, o -> BeanUtils.toBean(o, CrmBusinessProductDO.class, item -> item.setTotalPrice(MoneyUtils.priceMultiply(item.getBusinessPrice(), item.getCount())))); -- Gitee From 8dcc12f21560c6c3e6b617795227d87d4cb3de0c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Mar 2024 16:32:18 +0800 Subject: [PATCH 0035/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=80=BB=E9=87=8F=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +-- ...CrmStatisticsCustomerByUserBaseRespVO.java | 6 ++-- ...atisticsCustomerContractSummaryRespVO.java | 8 ++--- .../customer/CrmStatisticsCustomerReqVO.java | 6 +++- .../CrmStatisticsCustomerMapper.java | 13 ++++---- .../CrmStatisticsCustomerServiceImpl.java | 29 +++++++++--------- .../CrmStatisticsCustomerMapper.xml | 13 +++++++- yudao-server/pom.xml | 30 +++++++++---------- 8 files changed, 63 insertions(+), 46 deletions(-) diff --git a/pom.xml b/pom.xml index 3a66524bc1..9cf34eb372 100644 --- a/pom.xml +++ b/pom.xml @@ -16,12 +16,12 @@ yudao-module-system yudao-module-infra - + yudao-module-bpm - + yudao-module-crm diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java index 340e930663..41fa9152e9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java @@ -5,12 +5,14 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; /** - * 用户客户统计响应 Base VO + * 用户客户统计响应 Base Response VO + * + * 目的:可以统一拼接子 VO 的 ownerUserId、ownerUserName 属性 */ @Data public class CrmStatisticsCustomerByUserBaseRespVO { - @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @JsonIgnore private Long ownerUserId; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java index 019309f8e0..ec1d273034 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java @@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT; @Schema(description = "管理后台 - CRM 客户转化率分析 VO") @Data @@ -43,14 +43,14 @@ public class CrmStatisticsCustomerContractSummaryRespVO { @Schema(description = "客户来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "外呼") private String sourceName; - @Schema(description = "负责人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @JsonIgnore private Long ownerUserId; @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") private String ownerUserName; - @Schema(description = "创建人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @Schema(description = "创建人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @JsonIgnore private String creatorUserId; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index a7aaa4da54..c5d5acbc34 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -12,7 +12,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = "管理后台 - CRM 数据统计 员工客户分析 Request VO") +@Schema(description = "管理后台 - CRM 数据统计的员工客户分析 Request VO") @Data public class CrmStatisticsCustomerReqVO { @@ -39,12 +39,16 @@ public class CrmStatisticsCustomerReqVO { @NotEmpty(message = "时间范围不能为空") private LocalDateTime[] times; + // TODO @dhb52:这个时间间隔,建议前端传递;例如说:字段叫 interval,枚举有天、周、月、季度、年。因为一般分析类的系统,都是交给用户选择筛选时间间隔,而我们这里是默认根据日期选项,默认对应的 interval 而已 + // 然后实现上,可以在 common 包的 enums 加个 DateIntervalEnum,里面一个是 interval 字段,枚举过去,然后有个 pattern 字段,用于格式化时间格式; + // 这样的话,可以通过 interval 获取到 pattern,然后前端就可以根据 pattern 格式化时间,计算还是交给数据库 /** * group by DATE_FORMAT(field, #{dateFormat}) */ @Schema(description = "Group By 日期格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "%Y%m") private String sqlDateFormat; + // TODO @dhb52:这个字段,目前是不是没啥用呀? /** * 数据类型 {@link CrmBizTypeEnum} */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 6bababa26a..19bd76fc32 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -13,17 +13,18 @@ import java.util.List; @Mapper public interface CrmStatisticsCustomerMapper { - List selectCustomerCreateCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + // TODO @dhb52:拼写,GroupBy。一般 idea 如果出现绿色的警告,可能是单词拼写错误,建议是要修改的哈; + List selectCustomerCreateCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerDealCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerCreateCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerCreateCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerDealCountGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); + List selectCustomerDealCountGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review - List selectContractPriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); + List selectContractPriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review - List selectReceivablePriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); + List selectReceivablePriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review List selectFollowupRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index 6b664dce55..c9654a68eb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -55,7 +55,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Resource private DictDataApi dictDataApi; - @Override public List getCustomerSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 @@ -66,14 +65,17 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 + // TODO @dhb52:如果是 list 变量,要么 List 要么 s 后缀 reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); final List customerCreateCount = customerMapper.selectCustomerCreateCountGroupbyDate(reqVO); final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyDate(reqVO); // 3. 获取时间序列 + // TODO @dhb52:3 和 4 其实做的是一类事情,所以可以考虑 3.1 获取时间序列、3.2 合并统计数据 这样注释;然后中间就不空行了;就是说,一般空行的目的,是让逻辑分片,看着整体性更好,但是不能让逻辑感觉碎碎的; final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); // 4. 合并统计数据 + // TODO @dhb52:这个是不是要 add 到 respVoList 里?或者还可以 convertList(times, time -> new CrmStatisticsCustomerDealCycleByDateRespVO()...) List respVoList = new ArrayList<>(times.size()); final Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByDateRespVO::getTime, @@ -86,7 +88,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) )); - return respVoList; } @@ -131,7 +132,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 4. 拼接用户信息 appendUserInfo(respVoList); - return respVoList; } @@ -202,7 +202,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 4. 拼接用户信息 appendUserInfo(respVoList); - return respVoList; } @@ -290,7 +289,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) )); - return respVoList; } @@ -337,9 +335,8 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe */ private void appendUserInfo(List respVoList) { Map userMap = adminUserApi.getUserMap(convertSet(respVoList, - CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); - respVoList.forEach(vo -> MapUtils.findAndThen(userMap, - vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); + CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); + respVoList.forEach(vo -> MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); } /** @@ -349,16 +346,17 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe * @return 用户编号数组 */ private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { + // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { return List.of(reqVO.getUserId()); - } else { - // 1. 获得部门列表 - final Long deptId = reqVO.getDeptId(); - List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); - deptIds.add(deptId); - // 2. 获得用户编号 - return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); } + // 情况二:选中某个部门 + // 2.1 获得部门列表 + final Long deptId = reqVO.getDeptId(); + List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); + deptIds.add(deptId); + // 2.2 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); } @@ -380,6 +378,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe * @param endTime 结束时间 * @return 时间序列 */ + // TODO @dhb52:可以抽象到 DateUtils 里,开始时间、结束时间,事件间隔,然后返回这个哈; private List generateTimeSeries(LocalDateTime startTime, LocalDateTime endTime) { boolean byMonth = queryByMonth(startTime, endTime); List times = CollUtil.newArrayList(); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 3fd52f3e72..fce255651f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -2,11 +2,14 @@ + + @@ -21,6 +25,8 @@ + + + + - SELECT COUNT(1) AS count, DATE_FORMAT(order_date,'%Y-%m') AS orderDate - FROM crm_contract - WHERE deleted = 0 - AND audit_status = 20 - AND DATE_FORMAT(order_date,'%Y') in (#{year},#{year}-1) - GROUP BY DATE_FORMAT(order_date,'%Y-%m') - - - - - - - -- Gitee From af5fbb6ff426c07f5ed02ef60f537c26a7d211f1 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 9 Mar 2024 17:54:14 +0800 Subject: [PATCH 0038/1557] =?UTF-8?q?CRM:=20TransferReqVO=20bizId=20->=20i?= =?UTF-8?q?d=E3=80=81=E4=BF=AE=E5=A4=8D=E5=95=86=E6=9C=BA=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/handler/SelectSheetWriteHandler.java | 40 ++++--------------- .../vo/business/CrmBusinessTransferReqVO.java | 3 +- .../admin/clue/vo/CrmClueTransferReqVO.java | 2 +- .../contact/vo/CrmContactTransferReqVO.java | 2 +- .../vo/contract/CrmContractTransferReqVO.java | 2 +- .../vo/customer/CrmCustomerTransferReqVO.java | 2 +- .../dal/mysql/contact/CrmContactMapper.java | 5 +-- .../core/AreaExcelColumnSelectFunction.java | 4 +- .../business/CrmBusinessServiceImpl.java | 10 ++--- .../crm/service/clue/CrmClueServiceImpl.java | 10 ++--- .../contact/CrmContactServiceImpl.java | 12 +++--- .../contract/CrmContractServiceImpl.java | 10 ++--- .../customer/CrmCustomerServiceImpl.java | 16 ++++---- 13 files changed, 42 insertions(+), 76 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index fd66c40189..d3669f9e24 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -60,32 +60,17 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { } // 解析下拉数据 - Map excelPropertyFields = getFieldsWithAnnotation(head, ExcelProperty.class); - Map excelColumnSelectFields = getFieldsWithAnnotation(head, ExcelColumnSelect.class); int colIndex = 0; - for (String fieldName : excelPropertyFields.keySet()) { - Field field = excelColumnSelectFields.get(fieldName); - if (field != null) { - // ExcelProperty 有一个自定义列索引的属性 index 兼容这个字段 - int index = field.getAnnotation(ExcelProperty.class).index(); - if (index != -1) { - colIndex = index; + for (Field field : head.getDeclaredFields()) { + if (field.isAnnotationPresent(ExcelColumnSelect.class)) { + ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); + if (excelProperty != null && excelProperty.index() != -1) { + colIndex = excelProperty.index(); } - buildSelectDataList(colIndex, field); + getSelectDataList(colIndex, field); } colIndex++; } - // TODO @puhui999:感觉可以 head 循环 field,如果有 ExcelColumnSelect 则进行处理;而 ExcelProperty 可能是非必须的。回答:主要是用于定位到列索引;补充:可以看看下面这样写? -// for (Field field : head.getDeclaredFields()) { -// if (field.isAnnotationPresent(ExcelColumnSelect.class)) { -// ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); -// if (excelProperty != null) { -// colIndex = excelProperty.index(); -// } -// getSelectDataList(colIndex, field); -// } -// colIndex++; -// } } /** @@ -94,7 +79,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { * @param colIndex 列索引 * @param field 字段 */ - private void buildSelectDataList(int colIndex, Field field) { + private void getSelectDataList(int colIndex, Field field) { ExcelColumnSelect columnSelect = field.getAnnotation(ExcelColumnSelect.class); String dictType = columnSelect.dictType(); String functionName = columnSelect.functionName(); @@ -174,15 +159,4 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { writeSheetHolder.getSheet().addValidationData(validation); } - public static Map getFieldsWithAnnotation(Class clazz, Class annotationClass) { - Map annotatedFields = new LinkedHashMap<>(); - Field[] fields = clazz.getDeclaredFields(); - for (Field field : fields) { - if (field.isAnnotationPresent(annotationClass)) { - annotatedFields.put(field.getName(), field); - } - } - return annotatedFields; - } - } \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java index 9fe7e23169..e26ddfa63f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java @@ -13,10 +13,9 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class CrmBusinessTransferReqVO { - // TODO @puhui999:这里最好还是用 id 哈,主要还是在 Business 业务里 @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "商机编号不能为空") - private Long bizId; + private Long id; /** * 新负责人的用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java index 7e6b8f0dd4..63bdc1838f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java @@ -12,7 +12,7 @@ public class CrmClueTransferReqVO { @Schema(description = "线索编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "线索编号不能为空") - private Long bizId; + private Long id; @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "新负责人的用户编号不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java index 8b5a6a6f4b..0cd128cf93 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java @@ -16,7 +16,7 @@ public class CrmContactTransferReqVO { @Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "联系人编号不能为空") - private Long bizId; + private Long id; /** * 新负责人的用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java index b59e21e160..3860844f41 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java @@ -17,7 +17,7 @@ public class CrmContractTransferReqVO { @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "联系人编号不能为空") - private Long bizId; + private Long id; @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "新负责人的用户编号不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java index 38f6f1756f..547ca63665 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java @@ -13,7 +13,7 @@ public class CrmCustomerTransferReqVO { @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") @NotNull(message = "客户编号不能为空") - private Long bizId; + private Long id; /** * 新负责人的用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java index f94b50f490..2ab73fcafb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java @@ -74,10 +74,7 @@ public interface CrmContactMapper extends BaseMapperX { } default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { - // TODO @puhui999:父类有 selectList,查询 2 个字段的简化方法哈,可以用下 - return selectList(new LambdaQueryWrapperX() - .eq(CrmContactDO::getCustomerId, customerId) - .eq(CrmContactDO::getOwnerUserId, ownerUserId)); + return selectList(CrmContactDO::getCustomerId, customerId, CrmContactDO::getOwnerUserId, ownerUserId); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java index b407ed4702..8f0a889054 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/excel/core/AreaExcelColumnSelectFunction.java @@ -8,9 +8,7 @@ import org.springframework.stereotype.Service; import java.util.List; /** - * Excel 所属地区列下拉数据源获取接口实现类 - * - * // TODO @puhui999:类名叫:地区下拉框数据源的 {@link ExcelColumnSelectFunction} 实现类,这样看起来会更简洁一点哈 + * 地区下拉框数据源的 {@link ExcelColumnSelectFunction} 实现类 * * @author HUIHUI */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index 5ec0a4b417..26f02b2f00 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -292,18 +292,18 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_BUSINESS_TYPE, subType = CRM_BUSINESS_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", + @LogRecord(type = CRM_BUSINESS_TYPE, subType = CRM_BUSINESS_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", success = CRM_BUSINESS_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_BUSINESS, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_BUSINESS, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) public void transferBusiness(CrmBusinessTransferReqVO reqVO, Long userId) { // 1 校验商机是否存在 - CrmBusinessDO business = validateBusinessExists(reqVO.getBizId()); + CrmBusinessDO business = validateBusinessExists(reqVO.getId()); // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_BUSINESS.getType(), - reqVO.getBizId(), reqVO.getNewOwnerUserId(), CrmPermissionLevelEnum.OWNER.getLevel())); + reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置新的负责人 - businessMapper.updateOwnerUserIdById(reqVO.getBizId(), reqVO.getNewOwnerUserId()); + businessMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); // 记录操作日志上下文 LogRecordContext.putVariable("business", business); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java index 3b4f0bc349..70ebeb44da 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java @@ -159,18 +159,18 @@ public class CrmClueServiceImpl implements CrmClueService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", + @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", success = CRM_CLUE_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) public void transferClue(CrmClueTransferReqVO reqVO, Long userId) { // 1 校验线索是否存在 - CrmClueDO clue = validateClueExists(reqVO.getBizId()); + CrmClueDO clue = validateClueExists(reqVO.getId()); // 2.1 数据权限转移 crmPermissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CLUE.getType(), - reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置新的负责人 - clueMapper.updateById(new CrmClueDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + clueMapper.updateById(new CrmClueDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("clue", clue); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java index ea46edf112..174db9b3a2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.crm.service.contact; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; -import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactBusinessReqVO; @@ -18,7 +17,6 @@ import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPerm import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; -import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerServiceImpl; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; @@ -179,18 +177,18 @@ public class CrmContactServiceImpl implements CrmContactService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CONTACT_TYPE, subType = CRM_CONTACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", + @LogRecord(type = CRM_CONTACT_TYPE, subType = CRM_CONTACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", success = CRM_CONTACT_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTACT, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTACT, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) public void transferContact(CrmContactTransferReqVO reqVO, Long userId) { // 1 校验联系人是否存在 - CrmContactDO contact = validateContactExists(reqVO.getBizId()); + CrmContactDO contact = validateContactExists(reqVO.getId()); // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CONTACT.getType(), - reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置新的负责人 - contactMapper.updateById(new CrmContactDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + contactMapper.updateById(new CrmContactDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("contact", contact); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java index beb3ef1a8f..52b6643d71 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java @@ -252,18 +252,18 @@ public class CrmContractServiceImpl implements CrmContractService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", + @LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", success = CRM_CONTRACT_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CONTRACT, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) public void transferContract(CrmContractTransferReqVO reqVO, Long userId) { // 1. 校验合同是否存在 - CrmContractDO contract = validateContractExists(reqVO.getBizId()); + CrmContractDO contract = validateContractExists(reqVO.getId()); // 2.1 数据权限转移 crmPermissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CONTRACT.getType(), - reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 设置负责人 - contractMapper.updateById(new CrmContractDO().setId(reqVO.getBizId()).setOwnerUserId(reqVO.getNewOwnerUserId())); + contractMapper.updateById(new CrmContractDO().setId(reqVO.getId()).setOwnerUserId(reqVO.getNewOwnerUserId())); // 3. 记录转移日志 LogRecordContext.putVariable("contract", contract); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java index d314b823c1..cdb7a32d9e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java @@ -199,19 +199,19 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { @Override @Transactional(rollbackFor = Exception.class) - @LogRecord(type = CRM_CUSTOMER_TYPE, subType = CRM_CUSTOMER_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.bizId}}", + @LogRecord(type = CRM_CUSTOMER_TYPE, subType = CRM_CUSTOMER_TRANSFER_SUB_TYPE, bizNo = "{{#reqVO.id}}", success = CRM_CUSTOMER_TRANSFER_SUCCESS) - @CrmPermission(bizType = CrmBizTypeEnum.CRM_CUSTOMER, bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) + @CrmPermission(bizType = CrmBizTypeEnum.CRM_CUSTOMER, bizId = "#reqVO.id", level = CrmPermissionLevelEnum.OWNER) public void transferCustomer(CrmCustomerTransferReqVO reqVO, Long userId) { // 1.1 校验客户是否存在 - CrmCustomerDO customer = validateCustomerExists(reqVO.getBizId()); + CrmCustomerDO customer = validateCustomerExists(reqVO.getId()); // 1.2 校验拥有客户是否到达上限 validateCustomerExceedOwnerLimit(reqVO.getNewOwnerUserId(), 1); // 2.1 数据权限转移 permissionService.transferPermission(new CrmPermissionTransferReqBO(userId, CrmBizTypeEnum.CRM_CUSTOMER.getType(), - reqVO.getBizId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); + reqVO.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel())); // 2.2 转移后重新设置负责人 - customerMapper.updateById(new CrmCustomerDO().setId(reqVO.getBizId()) + customerMapper.updateById(new CrmCustomerDO().setId(reqVO.getId()) .setOwnerUserId(reqVO.getNewOwnerUserId()).setOwnerTime(LocalDateTime.now())); // 2.3 同时转移 @@ -231,21 +231,21 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { */ private void transfer(CrmCustomerTransferReqVO reqVO, Long userId) { if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTACT.getType())) { - List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getId(), userId); contactList.forEach(item -> { contactService.transferContact(new CrmContactTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel()), userId); }); } if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_BUSINESS.getType())) { - List businessList = businessService.getBusinessListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + List businessList = businessService.getBusinessListByCustomerIdOwnerUserId(reqVO.getId(), userId); businessList.forEach(item -> { businessService.transferBusiness(new CrmBusinessTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel()), userId); }); } if (reqVO.getToBizTypes().contains(CrmBizTypeEnum.CRM_CONTRACT.getType())) { - List contractList = contractService.getContractListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); + List contractList = contractService.getContractListByCustomerIdOwnerUserId(reqVO.getId(), userId); contractList.forEach(item -> { contractService.transferContract(new CrmContractTransferReqVO(item.getId(), reqVO.getNewOwnerUserId(), reqVO.getOldOwnerPermissionLevel()), userId); -- Gitee From d556b29214e12fd5c33a7bb4c5dcafba9a00b41c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Mar 2024 18:27:58 +0800 Subject: [PATCH 0039/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=20=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/common/util/date/DateUtils.java | 2 - .../core/handler/SelectSheetWriteHandler.java | 7 +++- .../dal/mysql/contact/CrmContactMapper.java | 3 +- .../permission/CrmPermissionServiceImpl.java | 40 +++++++------------ .../pickup/DeliveryPickUpStorePageReqVO.java | 3 -- .../brokerage/BrokerageRecordMapper.java | 1 + 6 files changed, 23 insertions(+), 33 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java index 53b5574f95..60b3f1e1e9 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java @@ -27,8 +27,6 @@ public class DateUtils { public static final String FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND = "yyyy-MM-dd HH:mm:ss"; - public static final String FORMAT_HOUR_MINUTE_SECOND = "HH:mm:ss"; - /** * 将 LocalDateTime 转换成 Date * diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java index d3669f9e24..22337f0668 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java @@ -20,9 +20,11 @@ import org.apache.poi.hssf.usermodel.HSSFDataValidation; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddressList; -import java.lang.annotation.Annotation; import java.lang.reflect.Field; -import java.util.*; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -110,6 +112,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { Workbook workbook = writeWorkbookHolder.getWorkbook(); // 获得工作簿 List>> keyValues = convertList(selectMap.entrySet(), entry -> new KeyValue<>(entry.getKey(), entry.getValue())); keyValues.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 + // 2. 创建数据字典的 sheet 页 Sheet dictSheet = workbook.createSheet(DICT_SHEET_NAME); for (KeyValue> keyValue : keyValues) { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java index 2ab73fcafb..75f2a750e2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/contact/CrmContactMapper.java @@ -74,7 +74,8 @@ public interface CrmContactMapper extends BaseMapperX { } default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { - return selectList(CrmContactDO::getCustomerId, customerId, CrmContactDO::getOwnerUserId, ownerUserId); + return selectList(CrmContactDO::getCustomerId, customerId, + CrmContactDO::getOwnerUserId, ownerUserId); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java index c8b918586e..e6d1c5b2b8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java @@ -63,17 +63,17 @@ public class CrmPermissionServiceImpl implements CrmPermissionService { @Transactional(rollbackFor = Exception.class) @CrmPermission(bizTypeValue = "#reqVO.bizType", bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) public void createPermission(CrmPermissionSaveReqVO reqVO, Long userId) { - // 创建数据权限 + // 1. 创建数据权限 createPermission0(BeanUtils.toBean(reqVO, CrmPermissionCreateReqBO.class)); - // 处理【同时添加至】的权限 + // 2. 处理【同时添加至】的权限 if (CollUtil.isEmpty(reqVO.getToBizTypes())) { return; } List createPermissions = new ArrayList<>(); - createContactPermissions(reqVO, userId, createPermissions); - createBusinessPermissions(reqVO, userId, createPermissions); - createContractPermissions(reqVO, userId, createPermissions); + buildContactPermissions(reqVO, userId, createPermissions); + buildBusinessPermissions(reqVO, userId, createPermissions); + buildContractPermissions(reqVO, userId, createPermissions); if (CollUtil.isEmpty(createPermissions)) { return; } @@ -87,18 +87,15 @@ public class CrmPermissionServiceImpl implements CrmPermissionService { * @param userId 操作人 * @param createPermissions 待添加权限列表 */ - private void createContactPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { + private void buildContactPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { // 1. 校验是否被同时添加 Integer type = CrmBizTypeEnum.CRM_CONTACT.getType(); if (!reqVO.getToBizTypes().contains(type)) { return; } - - // 2.1 添加数据权限 + // 2. 添加数据权限 List contactList = contactService.getContactListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); - contactList.forEach(item -> { - createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions); - }); + contactList.forEach(item -> createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions)); } /** @@ -108,18 +105,15 @@ public class CrmPermissionServiceImpl implements CrmPermissionService { * @param userId 操作人 * @param createPermissions 待添加权限列表 */ - private void createBusinessPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { + private void buildBusinessPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { // 1. 校验是否被同时添加 Integer type = CrmBizTypeEnum.CRM_BUSINESS.getType(); if (!reqVO.getToBizTypes().contains(type)) { return; } - - // 2.1 添加数据权限 + // 2. 添加数据权限 List businessList = businessService.getBusinessListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); - businessList.forEach(item -> { - createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions); - }); + businessList.forEach(item -> createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions)); } /** @@ -129,18 +123,15 @@ public class CrmPermissionServiceImpl implements CrmPermissionService { * @param userId 操作人 * @param createPermissions 待添加权限列表 */ - private void createContractPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { + private void buildContractPermissions(CrmPermissionSaveReqVO reqVO, Long userId, List createPermissions) { // 1. 校验是否被同时添加 Integer type = CrmBizTypeEnum.CRM_CONTRACT.getType(); if (!reqVO.getToBizTypes().contains(type)) { return; } - - // 2.1 添加数据权限 + // 2. 添加数据权限 List contractList = contractService.getContractListByCustomerIdOwnerUserId(reqVO.getBizId(), userId); - contractList.forEach(item -> { - createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions); - }); + contractList.forEach(item -> createBizTypePermissions(reqVO, type, item.getId(), item.getName(), createPermissions)); } private void createBizTypePermissions(CrmPermissionSaveReqVO reqVO, Integer type, Long bizId, String name, @@ -167,8 +158,7 @@ public class CrmPermissionServiceImpl implements CrmPermissionService { validatePermissionNotExists(Collections.singletonList(createReqBO)); // 1. 校验用户是否存在 adminUserApi.validateUserList(Collections.singletonList(createReqBO.getUserId())); - - // 2. 创建 + // 2. 插入权限 CrmPermissionDO permission = BeanUtils.toBean(createReqBO, CrmPermissionDO.class); permissionMapper.insert(permission); return permission.getId(); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStorePageReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStorePageReqVO.java index 45f0c87b94..ee3ce2e491 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStorePageReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStorePageReqVO.java @@ -4,14 +4,11 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; import lombok.*; -import java.time.LocalTime; -import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; import cn.iocoder.yudao.framework.common.pojo.PageParam; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @Schema(description = "管理后台 - 自提门店分页 Request VO") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java index e7a85868b6..388f927ada 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java @@ -88,6 +88,7 @@ public interface BrokerageRecordMapper extends BaseMapperX { @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); + // TODO @芋艿:收敛掉 @Select 注解操作,统一成 MyBatis-Plus 的方式,或者 xml @Select("SELECT user_id AS id, SUM(price) AS brokeragePrice FROM trade_brokerage_record " + "WHERE biz_type = #{bizType} AND status = #{status} AND deleted = FALSE " + "AND unfreeze_time BETWEEN #{beginTime} AND #{endTime} " + -- Gitee From 1794a7c230161a77d8d136a416ce2a469d19fa77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Sat, 9 Mar 2024 13:27:06 +0000 Subject: [PATCH 0040/1557] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=9C=AA=E4=B8=8A=E6=9E=B6=E7=9A=84=E5=95=86=E5=93=81=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=8A=A5=E9=94=99=E7=BC=BA=E5=B0=91=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- .../product/controller/app/spu/AppProductSpuController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java index 9e09d65325..f64e6f558d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java @@ -101,7 +101,7 @@ public class AppProductSpuController { throw exception(SPU_NOT_EXISTS); } if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) { - throw exception(SPU_NOT_ENABLE); + throw exception(SPU_NOT_ENABLE, spu.getName()); } // 获得商品 SKU List skus = productSkuService.getSkuListBySpuId(spu.getId()); -- Gitee From ee2be799875f0e4e415b5c551a2c171876d492c0 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sat, 9 Mar 2024 22:51:38 +0800 Subject: [PATCH 0041/1557] =?UTF-8?q?fix:=20[CRM-=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1]=E6=A0=B9=E6=8D=AECode-Review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customer/CrmStatisticsCustomerReqVO.java | 8 - .../CrmStatisticsCustomerMapper.java | 27 +- .../CrmStatisticsCustomerServiceImpl.java | 161 ++++---- .../CrmStatisticsCustomerMapper.xml | 372 +++++++++--------- 4 files changed, 263 insertions(+), 305 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index c5d5acbc34..13b3adda7d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; -import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; @@ -48,11 +47,4 @@ public class CrmStatisticsCustomerReqVO { @Schema(description = "Group By 日期格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "%Y%m") private String sqlDateFormat; - // TODO @dhb52:这个字段,目前是不是没啥用呀? - /** - * 数据类型 {@link CrmBizTypeEnum} - */ - @Schema(description = "数据类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") - private Integer bizType; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 19bd76fc32..7c8ed7e93c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -13,33 +13,32 @@ import java.util.List; @Mapper public interface CrmStatisticsCustomerMapper { - // TODO @dhb52:拼写,GroupBy。一般 idea 如果出现绿色的警告,可能是单词拼写错误,建议是要修改的哈; - List selectCustomerCreateCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerCreateCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerDealCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerDealCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerCreateCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerCreateCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); // 已经 review - List selectCustomerDealCountGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectCustomerDealCountGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review - List selectContractPriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectContractPriceGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review - List selectReceivablePriceGroupbyUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectReceivablePriceGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review - List selectFollowupRecordCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectFollowupRecordCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupCustomerCountGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectFollowupCustomerCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupRecordCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + List selectFollowupRecordCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupCustomerCountGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + List selectFollowupCustomerCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); List selectContractSummary(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupRecordCountGroupbyType(CrmStatisticsCustomerReqVO reqVO); + List selectFollowupRecordCountGroupByType(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCycleGroupbyDate(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCycleGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCycleGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index c9654a68eb..a4c3f4ddfa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; -import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.dict.DictDataApi; @@ -20,7 +19,6 @@ import org.springframework.validation.annotation.Validated; import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; @@ -58,87 +56,83 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Override public List getCustomerSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - // TODO @dhb52:如果是 list 变量,要么 List 要么 s 后缀 reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); - final List customerCreateCount = customerMapper.selectCustomerCreateCountGroupbyDate(reqVO); - final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyDate(reqVO); + List customerCreateCountVoList = customerMapper.selectCustomerCreateCountGroupByDate(reqVO); + List customerDealCountVoList = customerMapper.selectCustomerDealCountGroupByDate(reqVO); - // 3. 获取时间序列 - // TODO @dhb52:3 和 4 其实做的是一类事情,所以可以考虑 3.1 获取时间序列、3.2 合并统计数据 这样注释;然后中间就不空行了;就是说,一般空行的目的,是让逻辑分片,看着整体性更好,但是不能让逻辑感觉碎碎的; - final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); - - // 4. 合并统计数据 - // TODO @dhb52:这个是不是要 add 到 respVoList 里?或者还可以 convertList(times, time -> new CrmStatisticsCustomerDealCycleByDateRespVO()...) - List respVoList = new ArrayList<>(times.size()); - final Map customerCreateCountMap = convertMap(customerCreateCount, + // 3. 合并数据 + List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + Map customerCreateCountMap = convertMap(customerCreateCountVoList, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); - final Map customerDealCountMap = convertMap(customerDealCount, + Map customerDealCountMap = convertMap(customerDealCountVoList, CrmStatisticsCustomerSummaryByDateRespVO::getTime, CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); - times.forEach(time -> respVoList.add( - new CrmStatisticsCustomerSummaryByDateRespVO().setTime(time) + List respVoList = convertList(times, + time -> new CrmStatisticsCustomerSummaryByDateRespVO() + .setTime(time) .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) - )); + .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0))); + return respVoList; } @Override public List getCustomerSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - final List customerCreateCount = customerMapper.selectCustomerCreateCountGroupbyUser(reqVO); - final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyUser(reqVO); - final List contractPrice = customerMapper.selectContractPriceGroupbyUser(reqVO); - final List receivablePrice = customerMapper.selectReceivablePriceGroupbyUser(reqVO); + List customerCreateCount = customerMapper.selectCustomerCreateCountGroupByUser(reqVO); + List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); + List contractPrice = customerMapper.selectContractPriceGroupByUser(reqVO); + List receivablePrice = customerMapper.selectReceivablePriceGroupByUser(reqVO); // 3. 合并统计数据 - final Map customerCreateCountMap = convertMap(customerCreateCount, + Map customerCreateCountMap = convertMap(customerCreateCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); - final Map customerDealCountMap = convertMap(customerDealCount, + Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - final Map contractPriceMap = convertMap(contractPrice, + Map contractPriceMap = convertMap(contractPrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); - final Map receivablePriceMap = convertMap(receivablePrice, + Map receivablePriceMap = convertMap(receivablePrice, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); - List respVoList = new ArrayList<>(userIds.size()); - userIds.forEach(userId -> { - final CrmStatisticsCustomerSummaryByUserRespVO vo = new CrmStatisticsCustomerSummaryByUserRespVO(); + List respVoList = convertList(userIds, userId -> { + CrmStatisticsCustomerSummaryByUserRespVO vo = new CrmStatisticsCustomerSummaryByUserRespVO(); + // ownerUserId 为基类属性 vo.setOwnerUserId(userId); vo.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.ZERO)) .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.ZERO)); - respVoList.add(vo); + return vo; }); // 4. 拼接用户信息 appendUserInfo(respVoList); + return respVoList; } @Override public List getFollowupSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } @@ -146,26 +140,22 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 2. 获取分项统计数据 reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); - reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - final List followupRecordCount = customerMapper.selectFollowupRecordCountGroupbyDate(reqVO); - final List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupbyDate(reqVO); + List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByDate(reqVO); + List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByDate(reqVO); - // 3. 获取时间序列 - final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); - - // 4. 合并统计数据 - List respVoList = new ArrayList<>(times.size()); - final Map followupRecordCountMap = convertMap(followupRecordCount, + // 3. 合并统计数据 + List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); - final Map followupCustomerCountMap = convertMap(followupCustomerCount, + Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByDateRespVO::getTime, CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); - times.forEach(time -> respVoList.add( + List respVoList = convertList(times, time -> new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) - )); + ); return respVoList; } @@ -173,31 +163,30 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Override public List getFollowupSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - final List followupRecordCount = customerMapper.selectFollowupRecordCountGroupbyUser(reqVO); - final List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupbyUser(reqVO); + List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByUser(reqVO); + List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByUser(reqVO); // 3. 合并统计数据 - final Map followupRecordCountMap = convertMap(followupRecordCount, + Map followupRecordCountMap = convertMap(followupRecordCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); - final Map followupCustomerCountMap = convertMap(followupCustomerCount, + Map followupCustomerCountMap = convertMap(followupCustomerCount, CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); - List respVoList = new ArrayList<>(userIds.size()); - userIds.forEach(userId -> { - final CrmStatisticsFollowupSummaryByUserRespVO vo = new CrmStatisticsFollowupSummaryByUserRespVO() + List respVoList = convertList(userIds, userId -> { + CrmStatisticsFollowupSummaryByUserRespVO vo = new CrmStatisticsFollowupSummaryByUserRespVO() .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); + // ownerUserId 为基类属性 vo.setOwnerUserId(userId); - respVoList.add(vo); + return vo; }); // 4. 拼接用户信息 @@ -208,19 +197,18 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Override public List getFollowupSummaryByType(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); // 2. 获得排行数据 - reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - List respVoList = customerMapper.selectFollowupRecordCountGroupbyType(reqVO); + List respVoList = customerMapper.selectFollowupRecordCountGroupByType(reqVO); // 3. 获取字典数据 List followUpTypes = dictDataApi.getDictDataList(CRM_FOLLOW_UP_TYPE); - final Map followUpTypeMap = convertMap(followUpTypes, + Map followUpTypeMap = convertMap(followUpTypes, DictDataRespDTO::getValue, DictDataRespDTO::getLabel); respVoList.forEach(vo -> { vo.setFollowupType(followUpTypeMap.get(vo.getFollowupType())); @@ -232,7 +220,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Override public List getContractSummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } @@ -242,16 +230,16 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe List respVoList = customerMapper.selectContractSummary(reqVO); // 3. 设置 创建人、负责人、行业、来源 - // 获取客户所属行业 + // 3.1 获取客户所属行业 Map industryMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_INDUSTRY), DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - // 获取客户来源 + // 3.2 获取客户来源 Map sourceMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_SOURCE), DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - // 获取创建人、负责人列表 + // 3.3 获取创建人、负责人列表 Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(respVoList, vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); - + // 3.4 设置 创建人、负责人、行业、来源 respVoList.forEach(vo -> { MapUtils.findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); MapUtils.findAndThen(sourceMap, vo.getSource(), vo::setSourceName); @@ -266,7 +254,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe @Override public List getCustomerDealCycleByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } @@ -274,52 +262,48 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 2. 获取分项统计数据 reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); - reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - final List customerDealCycle = customerMapper.selectCustomerDealCycleGroupbyDate(reqVO); - - // 3. 获取时间序列 - final List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByDate(reqVO); - // 4. 合并统计数据 - List respVoList = new ArrayList<>(times.size()); - final Map customerDealCycleMap = convertMap(customerDealCycle, + // 3. 合并统计数据 + List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); + Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByDateRespVO::getTime, CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); - times.forEach(time -> respVoList.add( + List respVoList = convertList(times, time -> new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) - )); + ); + return respVoList; } @Override public List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - final List userIds = getUserIds(reqVO); + List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - reqVO.setBizType(CrmBizTypeEnum.CRM_CUSTOMER.getType()); - final List customerDealCycle = customerMapper.selectCustomerDealCycleGroupbyUser(reqVO); - final List customerDealCount = customerMapper.selectCustomerDealCountGroupbyUser(reqVO); + List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByUser(reqVO); + List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); // 3. 合并统计数据 - final Map customerDealCycleMap = convertMap(customerDealCycle, + Map customerDealCycleMap = convertMap(customerDealCycle, CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); - final Map customerDealCountMap = convertMap(customerDealCount, + Map customerDealCountMap = convertMap(customerDealCount, CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - List respVoList = new ArrayList<>(userIds.size()); - userIds.forEach(userId -> { - final CrmStatisticsCustomerDealCycleByUserRespVO vo = new CrmStatisticsCustomerDealCycleByUserRespVO() + List respVoList = convertList(userIds, userId -> { + CrmStatisticsCustomerDealCycleByUserRespVO vo = new CrmStatisticsCustomerDealCycleByUserRespVO() .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); + // ownerUserId 为基类属性 vo.setOwnerUserId(userId); - respVoList.add(vo); + return vo; }); // 4. 拼接用户信息 @@ -335,8 +319,9 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe */ private void appendUserInfo(List respVoList) { Map userMap = adminUserApi.getUserMap(convertSet(respVoList, - CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); - respVoList.forEach(vo -> MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); + CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); + respVoList.forEach(vo -> MapUtils.findAndThen(userMap, + vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); } /** @@ -352,7 +337,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } // 情况二:选中某个部门 // 2.1 获得部门列表 - final Long deptId = reqVO.getDeptId(); + Long deptId = reqVO.getDeptId(); List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); deptIds.add(deptId); // 2.2 获得用户编号 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index fce255651f..32a1d425e5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -2,251 +2,233 @@ - - - - - - - - - - - - - - - - - - - - -- Gitee From 4ac28603b8df276a6f402dc170e8a3330888e0cd Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 10 Mar 2024 10:30:25 +0800 Subject: [PATCH 0042/1557] =?UTF-8?q?feat:=20[CRM-=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=88=86=E6=9E=90]=E5=A2=9E=E5=8A=A0[=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=97=B4=E9=9A=94]=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/DateIntervalEnum.java | 48 ++++++++++++ .../module/crm/enums/ErrorCodeConstants.java | 3 + .../customer/CrmStatisticsCustomerReqVO.java | 19 +++-- .../CrmStatisticsCustomerServiceImpl.java | 75 ++++++++++++++++++- 4 files changed, 134 insertions(+), 11 deletions(-) create mode 100644 yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java new file mode 100644 index 0000000000..9a614ddc9d --- /dev/null +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.framework.common.enums; + +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; + +/** + * 时间间隔类型枚举 + * + * @author dhb52 + */ +@Getter +@AllArgsConstructor +public enum DateIntervalEnum implements IntArrayValuable { + + TODAY(1, "今天"), + YESTERDAY(2, "昨天"), + THIS_WEEK(3, "本周"), + LAST_WEEK(4, "上周"), + THIS_MONTH(5, "本月"), + LAST_MONTH(6, "上月"), + THIS_QUARTER(7, "本季度"), + LAST_QUARTER(8, "上季度"), + THIS_YEAR(9, "本年"), + LAST_YEAR(10, "去年"), + CUSTOMER(11, "自定义"), + ; + + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getType).toArray(); + + /** + * 类型 + */ + private final Integer type; + + /** + * 名称 + */ + private final String name; + + @Override + public int[] array() { + return ARRAYS; + } + +} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java index 4a0976bb18..d49f6068cf 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java @@ -103,4 +103,7 @@ public interface ErrorCodeConstants { ErrorCode FOLLOW_UP_RECORD_NOT_EXISTS = new ErrorCode(1_020_013_000, "跟进记录不存在"); ErrorCode FOLLOW_UP_RECORD_DELETE_DENIED = new ErrorCode(1_020_013_001, "删除跟进记录失败,原因:没有权限"); + // ========== 数据统计 1_020_014_000 ========== + ErrorCode STATISTICS_CUSTOMER_TIMES_NOT_SET = new ErrorCode(1_020_014_000, "自定义时间间隔,必须输入时间区间"); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index 13b3adda7d..38f15cf034 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -1,7 +1,8 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; +import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -27,22 +28,26 @@ public class CrmStatisticsCustomerReqVO { /** * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 - *

* 后续,可能会支持选择部分用户进行查询 */ @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") private List userIds; - @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "时间间隔类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @InEnum(value = DateIntervalEnum.class, message = "时间间隔类型,必须是 {value}") + private Integer intervalType; + + /** + * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 + * 并作为参数传递给Mapper + */ + @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @NotEmpty(message = "时间范围不能为空") private LocalDateTime[] times; - // TODO @dhb52:这个时间间隔,建议前端传递;例如说:字段叫 interval,枚举有天、周、月、季度、年。因为一般分析类的系统,都是交给用户选择筛选时间间隔,而我们这里是默认根据日期选项,默认对应的 interval 而已 - // 然后实现上,可以在 common 包的 enums 加个 DateIntervalEnum,里面一个是 interval 字段,枚举过去,然后有个 pattern 字段,用于格式化时间格式; - // 这样的话,可以通过 interval 获取到 pattern,然后前端就可以根据 pattern 格式化时间,计算还是交给数据库 /** * group by DATE_FORMAT(field, #{dateFormat}) + * 非前端传递, 由Service计算后传递给Mapper的参数 */ @Schema(description = "Group By 日期格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "%Y%m") private String sqlDateFormat; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index a4c3f4ddfa..f951e25f54 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -1,8 +1,11 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; @@ -24,8 +27,10 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; +import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.STATISTICS_CUSTOMER_TIMES_NOT_SET; /** * CRM 客户分析 Service 实现类 @@ -63,7 +68,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + initParams(reqVO); List customerCreateCountVoList = customerMapper.selectCustomerCreateCountGroupByDate(reqVO); List customerDealCountVoList = customerMapper.selectCustomerDealCountGroupByDate(reqVO); @@ -94,6 +99,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 + initParams(reqVO); List customerCreateCount = customerMapper.selectCustomerCreateCountGroupByUser(reqVO); List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); List contractPrice = customerMapper.selectContractPriceGroupByUser(reqVO); @@ -139,7 +145,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + initParams(reqVO); List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByDate(reqVO); List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByDate(reqVO); @@ -170,6 +176,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 + initParams(reqVO); List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByUser(reqVO); List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByUser(reqVO); @@ -204,6 +211,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获得排行数据 + initParams(reqVO); List respVoList = customerMapper.selectFollowupRecordCountGroupByType(reqVO); // 3. 获取字典数据 @@ -227,6 +235,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取统计数据 + initParams(reqVO); List respVoList = customerMapper.selectContractSummary(reqVO); // 3. 设置 创建人、负责人、行业、来源 @@ -261,7 +270,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 - reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + initParams(reqVO); List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByDate(reqVO); // 3. 合并统计数据 @@ -287,6 +296,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取分项统计数据 + initParams(reqVO); List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByUser(reqVO); List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); @@ -363,7 +373,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe * @param endTime 结束时间 * @return 时间序列 */ - // TODO @dhb52:可以抽象到 DateUtils 里,开始时间、结束时间,事件间隔,然后返回这个哈; private List generateTimeSeries(LocalDateTime startTime, LocalDateTime endTime) { boolean byMonth = queryByMonth(startTime, endTime); List times = CollUtil.newArrayList(); @@ -389,4 +398,62 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return queryByMonth(startTime, endTime) ? SQL_DATE_FORMAT_BY_MONTH : SQL_DATE_FORMAT_BY_DAY; } + private void initParams(CrmStatisticsCustomerReqVO reqVO) { + final Integer intervalType = reqVO.getIntervalType(); + + // 1. 自定义时间间隔,必须输入起始日期-结束日期 + if (DateIntervalEnum.CUSTOMER.getType().equals(intervalType)) { + if (ObjUtil.isEmpty(reqVO.getTimes()) || reqVO.getTimes().length != 2) { + throw exception(STATISTICS_CUSTOMER_TIMES_NOT_SET); + } + // 设置 mapper sqlDateFormat 参数 + reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); + // 自定义日期无需计算日期参数 + return; + } + + // 2. 根据时间区间类型计算时间段区间日期 + DateTime beginDate = null; + DateTime endDate = null; + if (DateIntervalEnum.TODAY.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfDay(DateUtil.date()); + endDate = DateUtil.endOfDay(DateUtil.date()); + } else if (DateIntervalEnum.YESTERDAY.getType().equals(intervalType)) { + beginDate = DateUtil.offsetDay(DateUtil.date(), -1); + endDate = DateUtil.offsetDay(DateUtil.date(), -1); + } else if (DateIntervalEnum.THIS_WEEK.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfWeek(DateUtil.date()); + endDate = DateUtil.endOfWeek(DateUtil.date()); + } else if (DateIntervalEnum.LAST_WEEK.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfWeek(DateUtil.offsetWeek(DateUtil.date(), -1)); + endDate = DateUtil.endOfWeek(DateUtil.offsetWeek(DateUtil.date(), -1)); + } else if (DateIntervalEnum.THIS_MONTH.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfMonth(DateUtil.date()); + endDate = DateUtil.endOfMonth(DateUtil.date()); + } else if (DateIntervalEnum.LAST_MONTH.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfMonth(DateUtil.offsetMonth(DateUtil.date(), -1)); + endDate = DateUtil.endOfMonth(DateUtil.offsetMonth(DateUtil.date(), -1)); + } else if (DateIntervalEnum.THIS_QUARTER.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfQuarter(DateUtil.date()); + endDate = DateUtil.endOfQuarter(DateUtil.date()); + } else if (DateIntervalEnum.LAST_QUARTER.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfQuarter(DateUtil.offsetMonth(DateUtil.date(), -3)); + endDate = DateUtil.endOfQuarter(DateUtil.offsetMonth(DateUtil.date(), -3)); + } else if (DateIntervalEnum.THIS_YEAR.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfYear(DateUtil.date()); + endDate = DateUtil.endOfYear(DateUtil.date()); + } else if (DateIntervalEnum.LAST_YEAR.getType().equals(intervalType)) { + beginDate = DateUtil.beginOfYear(DateUtil.offsetMonth(DateUtil.date(), -12)); + endDate = DateUtil.endOfYear(DateUtil.offsetMonth(DateUtil.date(), -12)); + } + + // 3. 计算开始、结束日期时间,并设置reqVo + LocalDateTime[] times = new LocalDateTime[2]; + times[0] = LocalDateTimeUtil.beginOfDay(LocalDateTimeUtil.of(beginDate)); + times[1] = LocalDateTimeUtil.endOfDay(LocalDateTimeUtil.of(endDate)); + // 3.1 设置 mapper 时间区间 参数 + reqVO.setTimes(times); + // 3.2 设置 mapper sqlDateFormat 参数 + reqVO.setSqlDateFormat(getSqlDateFormat(times[0], times[1])); + } } -- Gitee From 03213e3254a798101189a9560d1a62bf6f1587ff Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 10 Mar 2024 14:30:59 +0800 Subject: [PATCH 0043/1557] =?UTF-8?q?fix:=20[CRM-=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=88=86=E6=9E=90]=E6=9B=B4=E6=96=B0http-client=E8=84=9A?= =?UTF-8?q?=E6=9C=AC,=E5=A2=9E=E5=8A=A0intervalType=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.http | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 0c422f9868..9d96e159aa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -1,40 +1,40 @@ # == 1. 客户总量分析 == ### 1.1 客户总量分析(按日) -GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100&intervalType=11×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} ### 1.2 客户总量分析(按月) -GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} ### 1.3 客户总量统计(按用户) -GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-user?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} # == 2. 客户跟进次数分析 == ### 2.1 客户跟进次数分析(按日) -GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100&intervalType=11×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} ### 2.2 客户跟进次数分析(按月) -GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-date?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} ### 2.3 客户总量统计(按用户) -GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-user?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} # == 3. 客户跟进方式分析 == ### 3.1 客户跟进方式分析 -GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-type?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-followup-summary-by-type?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} @@ -42,7 +42,7 @@ tenant-id: {{adminTenentId}} # == 4. 客户成交周期 == ### 4.1 合同摘要信息(客户转化率页面) -GET {{baseUrl}}/crm/statistics-customer/get-contract-summary?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-contract-summary?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} @@ -50,19 +50,19 @@ tenant-id: {{adminTenentId}} # == 5. 客户成交周期 == ### 5.1 客户成交周期(按日) -GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100&intervalType=11×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} ### 5.2 客户成交周期(按月) -GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-date?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} ### 5.3 获取客户成交周期(按用户) -GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-user?deptId=100&intervalType=11×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} tenant-id: {{adminTenentId}} \ No newline at end of file -- Gitee From 0dd36f6c5c563f922d484f74b9a45df73e50e93e Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 10 Mar 2024 19:07:24 +0800 Subject: [PATCH 0044/1557] =?UTF-8?q?MALL:=20fix=20=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E5=88=86=E6=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/service/order/TradeOrderUpdateServiceImpl.java | 8 +++++--- .../price/calculator/TradePriceCalculatorHelper.java | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java index 13fe2f0c2d..4065ed05ea 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java @@ -624,7 +624,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { throw exception(ORDER_UPDATE_PRICE_FAIL_ALREADY); } // 1.3 支付价格不能为 0 - int newPayPrice = order.getPayPrice() + order.getAdjustPrice(); + int newPayPrice = order.getPayPrice() + reqVO.getAdjustPrice(); if (newPayPrice <= 0) { throw exception(ORDER_UPDATE_PRICE_FAIL_PRICE_ERROR); } @@ -635,12 +635,14 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { // 3. 更新 TradeOrderItem,需要做 adjustPrice 的分摊 List orderOrderItems = tradeOrderItemMapper.selectListByOrderId(order.getId()); - List dividePrices = TradePriceCalculatorHelper.dividePrice2(orderOrderItems, newPayPrice); + List dividePrices = TradePriceCalculatorHelper.dividePrice2(orderOrderItems, reqVO.getAdjustPrice()); List updateItems = new ArrayList<>(); for (int i = 0; i < orderOrderItems.size(); i++) { TradeOrderItemDO item = orderOrderItems.get(i); + // TODO puhui999: 已有分摊记录的情况下价格是否会不对,也就是说之前订单项 1 分摊了 10 块这次是 -100 + // 那么 setPayPrice 是否改为 (item.getPayPrice()-item.getAdjustPrice()) + dividePrices.get(i) 先减掉原来的价格再加上调价。经过验证可行,修改后订单价格增减都能正确分摊 updateItems.add(new TradeOrderItemDO().setId(item.getId()).setAdjustPrice(dividePrices.get(i)) - .setPayPrice(item.getPayPrice() + dividePrices.get(i))); + .setPayPrice((item.getPayPrice() - item.getAdjustPrice()) + dividePrices.get(i))); } tradeOrderItemMapper.updateBatch(updateItems); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java index 7def3e34ef..850226fbb9 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java @@ -254,12 +254,15 @@ public class TradePriceCalculatorHelper { TradeOrderItemDO orderItem = items.get(i); int partPrice; if (i < items.size() - 1) { // 减一的原因,是因为拆分时,如果按照比例,可能会出现.所以最后一个,使用反减 - partPrice = (int) (price * (1.0D * orderItem.getPayPrice() / total)); + // partPrice = (int) (price * (1.0D * orderItem.getPayPrice() / total)); + // pr fix: 改为了使用订单原价来计算比例 + partPrice = (int) (price * (1.0D * orderItem.getPrice() / total)); remainPrice -= partPrice; } else { partPrice = remainPrice; } - Assert.isTrue(partPrice >= 0, "分摊金额必须大于等于 0"); + // TODO puhui999: 如果是减价的情况这里过不了 + // Assert.isTrue(partPrice >= 0, "分摊金额必须大于等于 0"); prices.add(partPrice); } return prices; -- Gitee From 8d7fb08ce5468cf4a11804e93b8e844173c5d5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Tue, 12 Mar 2024 07:36:03 +0000 Subject: [PATCH 0045/1557] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E8=BF=94=E5=9B=9E=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=B7=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- .../pay/core/client/impl/weixin/AbstractWxPayClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java b/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java index a8c50cf1c4..163f97cb47 100644 --- a/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java +++ b/yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java @@ -270,7 +270,7 @@ public abstract class AbstractWxPayClient extends AbstractPayClient Date: Tue, 12 Mar 2024 21:07:09 +0800 Subject: [PATCH 0046/1557] =?UTF-8?q?=E4=BB=8Espring-ai=20=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=20chat=20=E6=A8=A1=E5=9D=97=E5=92=8C=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E6=A8=A1=E5=9D=97=E8=BF=87=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-spring-boot-starter-ai/pom.xml | 105 +++++ .../yudao/framework/ai/chat/ChatClient.java | 36 ++ .../yudao/framework/ai/chat/ChatResponse.java | 112 +++++ .../yudao/framework/ai/chat/Generation.java | 83 ++++ .../ai/chat/StreamingChatClient.java | 29 ++ .../ai/chat/messages/AbstractMessage.java | 151 +++++++ .../ai/chat/messages/AssistantMessage.java | 47 +++ .../ai/chat/messages/ChatMessage.java | 39 ++ .../ai/chat/messages/FunctionMessage.java | 37 ++ .../framework/ai/chat/messages/MediaData.java | 46 +++ .../framework/ai/chat/messages/Message.java | 32 ++ .../ai/chat/messages/MessageType.java | 52 +++ .../ai/chat/messages/SystemMessage.java | 48 +++ .../ai/chat/messages/UserMessage.java | 51 +++ .../chat/metadata/ChatGenerationMetadata.java | 75 ++++ .../chat/metadata/ChatResponseMetadata.java | 58 +++ .../ai/chat/metadata/EmptyRateLimit.java | 59 +++ .../ai/chat/metadata/EmptyUsage.java | 37 ++ .../ai/chat/metadata/PromptMetadata.java | 136 ++++++ .../framework/ai/chat/metadata/RateLimit.java | 84 ++++ .../framework/ai/chat/metadata/Usage.java | 66 +++ .../yudao/framework/ai/chat/package-info.java | 14 + .../chat/prompt/AssistantPromptTemplate.java | 55 +++ .../framework/ai/chat/prompt/ChatOptions.java | 40 ++ .../ai/chat/prompt/ChatOptionsBuilder.java | 89 ++++ .../ai/chat/prompt/ChatPromptTemplate.java | 87 ++++ .../chat/prompt/FunctionPromptTemplate.java | 27 ++ .../framework/ai/chat/prompt/Prompt.java | 99 +++++ .../ai/chat/prompt/PromptTemplate.java | 218 ++++++++++ .../ai/chat/prompt/PromptTemplateActions.java | 34 ++ .../prompt/PromptTemplateChatActions.java | 18 + .../prompt/PromptTemplateMessageActions.java | 24 ++ .../prompt/PromptTemplateStringActions.java | 14 + .../ai/chat/prompt/SystemPromptTemplate.java | 55 +++ .../ai/chat/prompt/TemplateFormat.java | 42 ++ .../yudao/framework/ai/model/ModelClient.java | 40 ++ .../framework/ai/model/ModelOptions.java | 31 ++ .../framework/ai/model/ModelOptionsUtils.java | 387 ++++++++++++++++++ .../framework/ai/model/ModelRequest.java | 51 +++ .../framework/ai/model/ModelResponse.java | 62 +++ .../yudao/framework/ai/model/ModelResult.java | 43 ++ .../framework/ai/model/ResponseMetadata.java | 34 ++ .../framework/ai/model/ResultMetadata.java | 31 ++ .../ai/model/StreamingModelClient.java | 43 ++ .../function/AbstractFunctionCallSupport.java | 158 +++++++ .../function/AbstractFunctionCallback.java | 159 +++++++ .../ai/model/function/FunctionCallback.java | 53 +++ .../function/FunctionCallbackContext.java | 124 ++++++ .../function/FunctionCallbackWrapper.java | 140 +++++++ .../function/FunctionCallingOptions.java | 66 +++ .../FunctionCallingOptionsBuilder.java | 150 +++++++ .../ai/model/function/TypeResolverHelper.java | 87 ++++ .../framework/ai/model/package-info.java | 11 + .../yudao/framework/ai/package-info.java | 5 + ...AbstractConversionServiceOutputParser.java | 42 ++ .../AbstractMessageConverterOutputParser.java | 41 ++ .../framework/ai/parser/BeanOutputParser.java | 166 ++++++++ .../framework/ai/parser/FormatProvider.java | 33 ++ .../framework/ai/parser/ListOutputParser.java | 48 +++ .../framework/ai/parser/MapOutputParser.java | 57 +++ .../framework/ai/parser/OutputParser.java | 30 ++ .../yudao/framework/ai/parser/Parser.java | 24 ++ .../yudao/framework/ai/parser/README.md | 12 + 63 files changed, 4327 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml new file mode 100644 index 0000000000..8ca4bccc38 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -0,0 +1,105 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao-module-ai + ${revision} + + + yudao-spring-boot-starter-ai + + + 21 + 21 + UTF-8 + + + + org.springframework + spring-core + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework + spring-context + + + net.jodah + typetools + 0.6.3 + compile + + + com.github.victools + jsonschema-module-jackson + 4.31.1 + compile + + + com.github.victools + jsonschema-module-swagger-2 + 4.33.1 + + + com.github.victools + jsonschema-generator + 4.31.1 + compile + + + io.projectreactor + reactor-core + + + org.springframework.cloud + spring-cloud-function-context + 4.1.0 + compile + + + org.antlr + stringtemplate + 4.0.2 + compile + + + org.projectlombok + lombok + + + org.springframework + spring-web + + + org.springframework + spring-webflux + + + org.springframework.retry + spring-retry + + + junit + junit + test + + + cn.hutool + hutool-all + test + + + com.squareup.okhttp3 + okhttp + 4.12.0 + test + + + + \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java new file mode 100644 index 0000000000..6fd8e8981b --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java @@ -0,0 +1,36 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat; + + +import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.model.ModelClient; + +@FunctionalInterface +public interface ChatClient extends ModelClient { + + default String call(String message) { + Prompt prompt = new Prompt(new UserMessage(message)); + Generation generation = call(prompt).getResult(); + return (generation != null) ? generation.getOutput().getContent() : ""; + } + + @Override + ChatResponse call(Prompt prompt); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java new file mode 100644 index 0000000000..1360336fbf --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java @@ -0,0 +1,112 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.metadata.ChatResponseMetadata; +import cn.iocoder.yudao.framework.ai.model.ModelResponse; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Objects; + +/** + * 人工智能提供商返回的聊天完成(例如生成)响应。 + * + * The chat completion (e.g. generation) response returned by an AI provider. + */ +public class ChatResponse implements ModelResponse { + + private final ChatResponseMetadata chatResponseMetadata; + + /** + * List of generated messages returned by the AI provider. + */ + private final List generations; + + /** + * Construct a new {@link ChatResponse} instance without metadata. + * @param generations the {@link List} of {@link Generation} returned by the AI + * provider. + */ + public ChatResponse(List generations) { + this(generations, ChatResponseMetadata.NULL); + } + + /** + * Construct a new {@link ChatResponse} instance. + * @param generations the {@link List} of {@link Generation} returned by the AI + * provider. + * @param chatResponseMetadata {@link ChatResponseMetadata} containing information + * about the use of the AI provider's API. + */ + public ChatResponse(List generations, ChatResponseMetadata chatResponseMetadata) { + this.chatResponseMetadata = chatResponseMetadata; + this.generations = List.copyOf(generations); + } + + /** + * The {@link List} of {@link Generation generated outputs}. + *

+ * It is a {@link List} of {@link List lists} because the Prompt could request + * multiple output {@link Generation generations}. + * @return the {@link List} of {@link Generation generated outputs}. + */ + + @Override + public List getResults() { + return this.generations; + } + + /** + * @return Returns the first {@link Generation} in the generations list. + */ + public Generation getResult() { + if (CollectionUtils.isEmpty(this.generations)) { + return null; + } + return this.generations.get(0); + } + + /** + * @return Returns {@link ChatResponseMetadata} containing information about the use + * of the AI provider's API. + */ + @Override + public ChatResponseMetadata getMetadata() { + return this.chatResponseMetadata; + } + + @Override + public String toString() { + return "ChatResponse [metadata=" + chatResponseMetadata + ", generations=" + generations + "]"; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof ChatResponse that)) + return false; + return Objects.equals(chatResponseMetadata, that.chatResponseMetadata) + && Objects.equals(generations, that.generations); + } + + @Override + public int hashCode() { + return Objects.hash(chatResponseMetadata, generations); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java new file mode 100644 index 0000000000..e84ffd4090 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.messages.AssistantMessage; +import cn.iocoder.yudao.framework.ai.chat.metadata.ChatGenerationMetadata; +import cn.iocoder.yudao.framework.ai.model.ModelResult; +import org.springframework.lang.Nullable; + +import java.util.Map; +import java.util.Objects; + +/** + * 表示AI返回的响应。 + * + * Represents a response returned by the AI. + */ +public class Generation implements ModelResult { + + private AssistantMessage assistantMessage; + + private ChatGenerationMetadata chatGenerationMetadata; + + public Generation(String text) { + this.assistantMessage = new AssistantMessage(text); + } + + public Generation(String text, Map properties) { + this.assistantMessage = new AssistantMessage(text, properties); + } + + @Override + public AssistantMessage getOutput() { + return this.assistantMessage; + } + + @Override + public ChatGenerationMetadata getMetadata() { + ChatGenerationMetadata chatGenerationMetadata = this.chatGenerationMetadata; + return chatGenerationMetadata != null ? chatGenerationMetadata : ChatGenerationMetadata.NULL; + } + + public Generation withGenerationMetadata(@Nullable ChatGenerationMetadata chatGenerationMetadata) { + this.chatGenerationMetadata = chatGenerationMetadata; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Generation that)) + return false; + return Objects.equals(assistantMessage, that.assistantMessage) + && Objects.equals(chatGenerationMetadata, that.chatGenerationMetadata); + } + + @Override + public int hashCode() { + return Objects.hash(assistantMessage, chatGenerationMetadata); + } + + @Override + public String toString() { + return "Generation{" + "assistantMessage=" + assistantMessage + ", chatGenerationMetadata=" + + chatGenerationMetadata + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java new file mode 100644 index 0000000000..fdd604f4df --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java @@ -0,0 +1,29 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.model.StreamingModelClient; +import reactor.core.publisher.Flux; + +@FunctionalInterface +public interface StreamingChatClient extends StreamingModelClient { + + @Override + Flux stream(Prompt prompt); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java new file mode 100644 index 0000000000..d622cf9f87 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java @@ -0,0 +1,151 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import org.springframework.core.io.Resource; +import org.springframework.util.Assert; +import org.springframework.util.StreamUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public abstract class AbstractMessage implements Message { + + protected final MessageType messageType; + + protected final String textContent; + + protected final List mediaData; + + /** + * Additional options for the message to influence the response, not a generative map. + */ + protected final Map properties; + + protected AbstractMessage(MessageType messageType, String content) { + this(messageType, content, Map.of()); + } + + protected AbstractMessage(MessageType messageType, String content, Map messageProperties) { + Assert.notNull(messageType, "Message type must not be null"); + // Assert.notNull(content, "Content must not be null"); + this.messageType = messageType; + this.textContent = content; + this.mediaData = new ArrayList<>(); + this.properties = messageProperties; + } + + protected AbstractMessage(MessageType messageType, String textContent, List mediaData) { + this(messageType, textContent, mediaData, Map.of()); + } + + protected AbstractMessage(MessageType messageType, String textContent, List mediaData, + Map messageProperties) { + + Assert.notNull(messageType, "Message type must not be null"); + Assert.notNull(textContent, "Content must not be null"); + Assert.notNull(mediaData, "media data must not be null"); + + this.messageType = messageType; + this.textContent = textContent; + this.mediaData = new ArrayList<>(mediaData); + this.properties = messageProperties; + } + + protected AbstractMessage(MessageType messageType, Resource resource) { + this(messageType, resource, Collections.emptyMap()); + } + + @SuppressWarnings("null") + protected AbstractMessage(MessageType messageType, Resource resource, Map messageProperties) { + Assert.notNull(messageType, "Message type must not be null"); + Assert.notNull(resource, "Resource must not be null"); + + this.messageType = messageType; + this.properties = messageProperties; + this.mediaData = new ArrayList<>(); + + try (InputStream inputStream = resource.getInputStream()) { + this.textContent = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); + } + catch (IOException ex) { + throw new RuntimeException("Failed to read resource", ex); + } + } + + @Override + public String getContent() { + return this.textContent; + } + + @Override + public List getMediaData() { + return this.mediaData; + } + + @Override + public Map getProperties() { + return this.properties; + } + + @Override + public MessageType getMessageType() { + return this.messageType; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((mediaData == null) ? 0 : mediaData.hashCode()); + result = prime * result + ((properties == null) ? 0 : properties.hashCode()); + result = prime * result + ((messageType == null) ? 0 : messageType.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + AbstractMessage other = (AbstractMessage) obj; + if (mediaData == null) { + if (other.mediaData != null) + return false; + } + else if (!mediaData.equals(other.mediaData)) + return false; + if (properties == null) { + if (other.properties != null) + return false; + } + else if (!properties.equals(other.properties)) + return false; + if (messageType != other.messageType) + return false; + return true; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java new file mode 100644 index 0000000000..6a18eeba84 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import java.util.Map; + +/** + * 让生成人员知道内容是作为对用户的响应生成的。 + * 此角色指示生成者先前在会话中生成的消息。 + * 通过包括该系列中的辅助消息,您可以为生成的关于提供上下文之前在谈话中的交流。 + * + * Lets the generative know the content was generated as a response to the user. This role + * indicates messages that the generative has previously generated in the conversation. By + * including assistant messages in the series, you provide context to the generative about + * prior exchanges in the conversation. + */ +public class AssistantMessage extends AbstractMessage { + + public AssistantMessage(String content) { + super(MessageType.ASSISTANT, content); + } + + public AssistantMessage(String content, Map properties) { + super(MessageType.ASSISTANT, content, properties); + } + + @Override + public String toString() { + return "AssistantMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" + + messageType + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java new file mode 100644 index 0000000000..16470135b2 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import java.util.Map; + +public class ChatMessage extends AbstractMessage { + + public ChatMessage(String role, String content) { + super(MessageType.valueOf(role), content); + } + + public ChatMessage(String role, String content, Map properties) { + super(MessageType.valueOf(role), content, properties); + } + + public ChatMessage(MessageType messageType, String content) { + super(messageType, content); + } + + public ChatMessage(MessageType messageType, String content, Map properties) { + super(messageType, content, properties); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java new file mode 100644 index 0000000000..d8b6fccbdb --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java @@ -0,0 +1,37 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import java.util.Map; + +public class FunctionMessage extends AbstractMessage { + + public FunctionMessage(String content) { + super(MessageType.SYSTEM, content); + } + + public FunctionMessage(String content, Map properties) { + super(MessageType.SYSTEM, content, properties); + } + + @Override + public String toString() { + return "FunctionMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" + + messageType + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java new file mode 100644 index 0000000000..fed60221f6 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import org.springframework.util.Assert; +import org.springframework.util.MimeType; + +/** + * @author Christian Tzolov + */ +public class MediaData { + + private final MimeType mimeType; + + private final Object data; + + public MediaData(MimeType mimeType, Object data) { + Assert.notNull(mimeType, "MimeType must not be null"); + // Assert.notNull(data, "Data must not be null"); + this.mimeType = mimeType; + this.data = data; + } + + public MimeType getMimeType() { + return this.mimeType; + } + + public Object getData() { + return this.data; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java new file mode 100644 index 0000000000..89c7b4fb4a --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java @@ -0,0 +1,32 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import java.util.List; +import java.util.Map; + +public interface Message { + + String getContent(); + + List getMediaData(); + + Map getProperties(); + + MessageType getMessageType(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java new file mode 100644 index 0000000000..2c803a0608 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.chat.messages; + +public enum MessageType { + + // 用户消息 + USER("user"), + + // 之前会话的消息 + ASSISTANT("assistant"), + + // 根据注释说明:您可以使用系统消息来指示具有生成性,表现得像某个角色或以特定的方式提供答案总体安排 + // 简单理解:在对话前,发送一条具有角色的信息让模型理解(如:你现在是一个10年拍摄经验的导演,拥有丰富的经验。 这样你就可以去问他,怎么拍一个短视频可以在抖音上火) + SYSTEM("system"), + + // 函数?根据引用现在不支持,会抛出一个异常 ---> throw new IllegalArgumentException("Tool execution results are not supported for Bedrock models"); + FUNCTION("function"); + + private final String value; + + MessageType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + public static MessageType fromValue(String value) { + for (MessageType messageType : MessageType.values()) { + if (messageType.getValue().equals(value)) { + return messageType; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + value); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java new file mode 100644 index 0000000000..c474f24bda --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import org.springframework.core.io.Resource; + +/** + * 作为输入传递的“system”类型的消息。系统消息给出高级别对话说明。 + * 此角色通常提供高级说明对话。 + * 例如,您可以使用系统消息来指示具有生成性,表现得像某个角色或以特定的方式提供答案总体安排 + * + * A message of the type 'system' passed as input. The system message gives high level + * instructions for the conversation. This role typically provides high-level instructions + * for the conversation. For example, you might use a system message to instruct the + * generative to behave like a certain character or to provide answers in a specific + * format. + */ +public class SystemMessage extends AbstractMessage { + + public SystemMessage(String content) { + super(MessageType.SYSTEM, content); + } + + public SystemMessage(Resource resource) { + super(MessageType.SYSTEM, resource); + } + + @Override + public String toString() { + return "SystemMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" + + messageType + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java new file mode 100644 index 0000000000..2b8f547f78 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.messages; + +import org.springframework.core.io.Resource; + +import java.util.List; + +/** + * 作为输入传递的“user”类型的消息具有用户角色的消息来自最终用户或开发者。 + * 它们表示问题、提示或您想要的任何输入产生反应的。 + * + * A message of the type 'user' passed as input Messages with the user role are from the + * end-user or developer. They represent questions, prompts, or any input that you want + * the generative to respond to. + */ +public class UserMessage extends AbstractMessage { + + public UserMessage(String message) { + super(MessageType.USER, message); + } + + public UserMessage(Resource resource) { + super(MessageType.USER, resource); + } + + public UserMessage(String textContent, List mediaDataList) { + super(MessageType.USER, textContent, mediaDataList); + } + + @Override + public String toString() { + return "UserMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" + + messageType + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java new file mode 100644 index 0000000000..a90dda5bfc --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + +import cn.iocoder.yudao.framework.ai.model.ResultMetadata; +import org.springframework.lang.Nullable; + +/** + * Abstract Data Type (ADT) encapsulating information on the completion choices in the AI + * response. + * + * @author John Blum + * @since 0.7.0 + */ +public interface ChatGenerationMetadata extends ResultMetadata { + + ChatGenerationMetadata NULL = ChatGenerationMetadata.from(null, null); + + /** + * Factory method used to construct a new {@link ChatGenerationMetadata} from the + * given {@link String finish reason} and content filter metadata. + * @param finishReason {@link String} contain the reason for the choice completion. + * @param contentFilterMetadata underlying AI provider metadata for filtering applied + * to generation content. + * @return a new {@link ChatGenerationMetadata} from the given {@link String finish + * reason} and content filter metadata. + */ + static ChatGenerationMetadata from(String finishReason, Object contentFilterMetadata) { + return new ChatGenerationMetadata() { + + @Override + @SuppressWarnings("unchecked") + public T getContentFilterMetadata() { + return (T) contentFilterMetadata; + } + + @Override + public String getFinishReason() { + return finishReason; + } + }; + } + + /** + * Returns the underlying AI provider metadata for filtering applied to generation + * content. + * @param {@link Class Type} used to cast the filtered content metadata into the + * AI provider-specific type. + * @return the underlying AI provider metadata for filtering applied to generation + * content. + */ + @Nullable + T getContentFilterMetadata(); + + /** + * Get the {@link String reason} this choice completed for the generation. + * @return the {@link String reason} this choice completed for the generation. + */ + String getFinishReason(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java new file mode 100644 index 0000000000..ebcb4ab068 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + + +import cn.iocoder.yudao.framework.ai.model.ResponseMetadata; + +/** + * Abstract Data Type (ADT) modeling common AI provider metadata returned in an AI + * response. + * + * 抽象数据类型(ADT)建模AI响应中返回的常见AI提供者元数据。 + * + * @author John Blum + * @since 0.7.0 + */ +public interface ChatResponseMetadata extends ResponseMetadata { + + ChatResponseMetadata NULL = new ChatResponseMetadata() { + }; + + /** + * Returns AI provider specific metadata on rate limits. + * @return AI provider specific metadata on rate limits. + * @see RateLimit + */ + default RateLimit getRateLimit() { + return new EmptyRateLimit(); + } + + /** + * Returns AI provider specific metadata on API usage. + * @return AI provider specific metadata on API usage. + * @see Usage + */ + default Usage getUsage() { + return new EmptyUsage(); + } + + default PromptMetadata getPromptMetadata() { + return PromptMetadata.empty(); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java new file mode 100644 index 0000000000..62aeeb531b --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + +import java.time.Duration; + +/** + * A RateLimit implementation that returns zero for all property getters + * + * @author John Blum + * @since 0.7.0 + */ +public class EmptyRateLimit implements RateLimit { + + @Override + public Long getRequestsLimit() { + return 0L; + } + + @Override + public Long getRequestsRemaining() { + return 0L; + } + + @Override + public Duration getRequestsReset() { + return Duration.ZERO; + } + + @Override + public Long getTokensLimit() { + return 0L; + } + + @Override + public Long getTokensRemaining() { + return 0L; + } + + @Override + public Duration getTokensReset() { + return Duration.ZERO; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java new file mode 100644 index 0000000000..11f0255c17 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java @@ -0,0 +1,37 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + +/** + * A EmpytUsage implementation that returns zero for all property getters + * + * @author John Blum + * @since 0.7.0 + */ +public class EmptyUsage implements Usage { + + @Override + public Long getPromptTokens() { + return 0L; + } + + @Override + public Long getGenerationTokens() { + return 0L; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java new file mode 100644 index 0000000000..94bad3aa50 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.chat.metadata; + +import org.springframework.util.Assert; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.StreamSupport; + +/** + * Abstract Data Type (ADT) modeling metadata gathered by the AI during request + * processing. + * + * @author John Blum + * @since 0.7.0 + */ +@FunctionalInterface +public interface PromptMetadata extends Iterable { + + /** + * Factory method used to create empty {@link PromptMetadata} when the information is + * not supplied by the AI provider. + * @return empty {@link PromptMetadata}. + */ + static PromptMetadata empty() { + return of(); + } + + /** + * Factory method used to create a new {@link PromptMetadata} composed of an array of + * {@link PromptFilterMetadata}. + * @param array array of {@link PromptFilterMetadata} used to compose the + * {@link PromptMetadata}. + * @return a new {@link PromptMetadata} composed of an array of + * {@link PromptFilterMetadata}. + */ + static PromptMetadata of(PromptFilterMetadata... array) { + return of(Arrays.asList(array)); + } + + /** + * Factory method used to create a new {@link PromptMetadata} composed of an + * {@link Iterable} of {@link PromptFilterMetadata}. + * @param iterable {@link Iterable} of {@link PromptFilterMetadata} used to compose + * the {@link PromptMetadata}. + * @return a new {@link PromptMetadata} composed of an {@link Iterable} of + * {@link PromptFilterMetadata}. + */ + static PromptMetadata of(Iterable iterable) { + Assert.notNull(iterable, "An Iterable of PromptFilterMetadata must not be null"); + return iterable::iterator; + } + + /** + * Returns an {@link Optional} {@link PromptFilterMetadata} at the given index. + * @param promptIndex index of the {@link PromptFilterMetadata} contained in this + * {@link PromptMetadata}. + * @return {@link Optional} {@link PromptFilterMetadata} at the given index. + * @throws IllegalArgumentException if the prompt index is less than 0. + */ + default Optional findByPromptIndex(int promptIndex) { + + Assert.isTrue(promptIndex > -1, "Prompt index [%d] must be greater than equal to 0".formatted(promptIndex)); + + return StreamSupport.stream(this.spliterator(), false) + .filter(promptFilterMetadata -> promptFilterMetadata.getPromptIndex() == promptIndex) + .findFirst(); + } + + /** + * Abstract Data Type (ADT) modeling filter metadata for all prompts sent during an AI + * request. + */ + interface PromptFilterMetadata { + + /** + * Factory method used to construct a new {@link PromptFilterMetadata} with the + * given prompt index and content filter metadata. + * @param promptIndex index of the prompt filter metadata contained in the AI + * response. + * @param contentFilterMetadata underlying AI provider metadata for filtering + * applied to prompt content. + * @return a new instance of {@link PromptFilterMetadata} with the given prompt + * index and content filter metadata. + */ + static PromptFilterMetadata from(int promptIndex, Object contentFilterMetadata) { + + return new PromptFilterMetadata() { + + @Override + public int getPromptIndex() { + return promptIndex; + } + + @Override + @SuppressWarnings("unchecked") + public T getContentFilterMetadata() { + return (T) contentFilterMetadata; + } + }; + } + + /** + * Index of the prompt filter metadata contained in the AI response. + * @return an {@link Integer index} fo the prompt filter metadata contained in the + * AI response. + */ + int getPromptIndex(); + + /** + * Returns the underlying AI provider metadata for filtering applied to prompt + * content. + * @param {@link Class Type} used to cast the filtered content metadata into + * the AI provider-specific type. + * @return the underlying AI provider metadata for filtering applied to prompt + * content. + */ + T getContentFilterMetadata(); + + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java new file mode 100644 index 0000000000..6842783bac --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java @@ -0,0 +1,84 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + +import java.time.Duration; + +/** + * Abstract Data Type (ADT) encapsulating metadata from an AI provider's API rate limits + * granted to the API key in use and the API key's current balance. + * + * @author John Blum + * @since 0.7.0 + */ +public interface RateLimit { + + /** + * Returns the maximum number of requests that are permitted before exhausting the + * rate limit. + * @return an {@link Long} with the maximum number of requests that are permitted + * before exhausting the rate limit. + * @see #getRequestsRemaining() + */ + Long getRequestsLimit(); + + /** + * Returns the remaining number of requests that are permitted before exhausting the + * {@link #getRequestsLimit() rate limit}. + * @return an {@link Long} with the remaining number of requests that are permitted + * before exhausting the {@link #getRequestsLimit() rate limit}. + * @see #getRequestsLimit() + */ + Long getRequestsRemaining(); + + /** + * Returns the {@link Duration time} until the rate limit (based on requests) resets + * to its {@link #getRequestsLimit() initial state}. + * @return a {@link Duration} representing the time until the rate limit (based on + * requests) resets to its {@link #getRequestsLimit() initial state}. + * @see #getRequestsLimit() + */ + Duration getRequestsReset(); + + /** + * Returns the maximum number of tokens that are permitted before exhausting the rate + * limit. + * @return an {@link Long} with the maximum number of tokens that are permitted before + * exhausting the rate limit. + * @see #getTokensRemaining() + */ + Long getTokensLimit(); + + /** + * Returns the remaining number of tokens that are permitted before exhausting the + * {@link #getTokensLimit() rate limit}. + * @return an {@link Long} with the remaining number of tokens that are permitted + * before exhausting the {@link #getTokensLimit() rate limit}. + * @see #getTokensLimit() + */ + Long getTokensRemaining(); + + /** + * Returns the {@link Duration time} until the rate limit (based on tokens) resets to + * its {@link #getTokensLimit() initial state}. + * @return a {@link Duration} with the time until the rate limit (based on tokens) + * resets to its {@link #getTokensLimit() initial state}. + * @see #getTokensLimit() + */ + Duration getTokensReset(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java new file mode 100644 index 0000000000..cecbc828e7 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.metadata; + +/** + * 抽象数据类型(ADT)封装关于人工智能提供商API使用的元数据根据AI请求。 + * + * Abstract Data Type (ADT) encapsulating metadata on the usage of an AI provider's API + * per AI request. + * + * @author John Blum + * @since 0.7.0 + */ +public interface Usage { + + /** + * 返回AI请求的{@literal prompt}中使用的令牌数。 + * @返回一个{@link Long},其中包含在的{@literal提示符}中使用的令牌数AI请求。 + * + * Returns the number of tokens used in the {@literal prompt} of the AI request. + * @return an {@link Long} with the number of tokens used in the {@literal prompt} of + * the AI request. + * @see #getGenerationTokens() + */ + Long getPromptTokens(); + + /** + * Returns the number of tokens returned in the {@literal generation (aka completion)} + * of the AI's response. + * @return an {@link Long} with the number of tokens returned in the + * {@literal generation (aka completion)} of the AI's response. + * @see #getPromptTokens() + */ + Long getGenerationTokens(); + + /** + * Return the total number of tokens from both the {@literal prompt} of an AI request + * and {@literal generation} of the AI's response. + * @return the total number of tokens from both the {@literal prompt} of an AI request + * and {@literal generation} of the AI's response. + * @see #getPromptTokens() + * @see #getGenerationTokens() + */ + default Long getTotalTokens() { + Long promptTokens = getPromptTokens(); + promptTokens = promptTokens != null ? promptTokens : 0; + Long completionTokens = getGenerationTokens(); + completionTokens = completionTokens != null ? completionTokens : 0; + return promptTokens + completionTokens; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java new file mode 100644 index 0000000000..17c341f007 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java @@ -0,0 +1,14 @@ +/** + * The org.sf.ai.chat package represents the bounded context for the Chat Model within the + * AI generative model domain. This package extends the core domain defined in + * org.sf.ai.generative, providing implementations specific to chat-based generative AI + * interactions. + * + * In line with Domain-Driven Design principles, this package includes implementations of + * entities and value objects specific to the chat context, such as ChatPrompt and + * ChatResponse, adhering to the ubiquitous language of chat interactions in AI models. + * + * This bounded context is designed to encapsulate all aspects of chat-based AI + * functionalities, maintaining a clear boundary from other contexts within the AI domain. + */ +package cn.iocoder.yudao.framework.ai.chat; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java new file mode 100644 index 0000000000..cfe91527e9 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.AssistantMessage; +import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import org.springframework.core.io.Resource; + +import java.util.Map; + +public class AssistantPromptTemplate extends PromptTemplate { + + public AssistantPromptTemplate(String template) { + super(template); + } + + public AssistantPromptTemplate(Resource resource) { + super(resource); + } + + @Override + public Prompt create() { + return new Prompt(new AssistantMessage(render())); + } + + @Override + public Prompt create(Map model) { + return new Prompt(new AssistantMessage(render(model))); + } + + @Override + public Message createMessage() { + return new AssistantMessage(render()); + } + + @Override + public Message createMessage(Map model) { + return new AssistantMessage(render(model)); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java new file mode 100644 index 0000000000..979ca6b201 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.model.ModelOptions; + +/** + * 聊天选项代表了常见的选项,可在不同的聊天模式中移植。 + * + * The ChatOptions represent the common options, portable across different chat models. + */ +public interface ChatOptions extends ModelOptions { + + Float getTemperature(); + + void setTemperature(Float temperature); + + Float getTopP(); + + void setTopP(Float topP); + + Integer getTopK(); + + void setTopK(Integer topK); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java new file mode 100644 index 0000000000..c3e236ea09 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +public class ChatOptionsBuilder { + + private class ChatOptionsImpl implements ChatOptions { + + private Float temperature; + + private Float topP; + + private Integer topK; + + @Override + public Float getTemperature() { + return temperature; + } + + @Override + public void setTemperature(Float temperature) { + this.temperature = temperature; + } + + @Override + public Float getTopP() { + return topP; + } + + @Override + public void setTopP(Float topP) { + this.topP = topP; + } + + @Override + public Integer getTopK() { + return topK; + } + + @Override + public void setTopK(Integer topK) { + this.topK = topK; + } + + } + + private final ChatOptionsImpl options = new ChatOptionsImpl(); + + private ChatOptionsBuilder() { + } + + public static ChatOptionsBuilder builder() { + return new ChatOptionsBuilder(); + } + + public ChatOptionsBuilder withTemperature(Float temperature) { + options.setTemperature(temperature); + return this; + } + + public ChatOptionsBuilder withTopP(Float topP) { + options.setTopP(topP); + return this; + } + + public ChatOptionsBuilder withTopK(Integer topK) { + options.setTopK(topK); + return this; + } + + public ChatOptions build() { + return options; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java new file mode 100644 index 0000000000..a06c981c70 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * PromptTemplate,用于将角色指定为字符串实现及其角色不足以满足您的需求。 + * + * A PromptTemplate that lets you specify the role as a string should the current + * implementations and their roles not suffice for your needs. + */ +public class ChatPromptTemplate implements PromptTemplateActions, PromptTemplateChatActions { + + private final List promptTemplates; + + public ChatPromptTemplate(List promptTemplates) { + this.promptTemplates = promptTemplates; + } + + @Override + public String render() { + StringBuilder sb = new StringBuilder(); + for (PromptTemplate promptTemplate : promptTemplates) { + sb.append(promptTemplate.render()); + } + return sb.toString(); + } + + @Override + public String render(Map model) { + StringBuilder sb = new StringBuilder(); + for (PromptTemplate promptTemplate : promptTemplates) { + sb.append(promptTemplate.render(model)); + } + return sb.toString(); + } + + @Override + public List createMessages() { + List messages = new ArrayList<>(); + for (PromptTemplate promptTemplate : promptTemplates) { + messages.add(promptTemplate.createMessage()); + } + return messages; + } + + @Override + public List createMessages(Map model) { + List messages = new ArrayList<>(); + for (PromptTemplate promptTemplate : promptTemplates) { + messages.add(promptTemplate.createMessage(model)); + } + return messages; + } + + @Override + public Prompt create() { + List messages = createMessages(); + return new Prompt(messages); + } + + @Override + public Prompt create(Map model) { + List messages = createMessages(model); + return new Prompt(messages); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java new file mode 100644 index 0000000000..e94545c233 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java @@ -0,0 +1,27 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +public class FunctionPromptTemplate extends PromptTemplate { + + private String name; + + public FunctionPromptTemplate(String template) { + super(template); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java new file mode 100644 index 0000000000..f9eb374098 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java @@ -0,0 +1,99 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; +import cn.iocoder.yudao.framework.ai.model.ModelOptions; +import cn.iocoder.yudao.framework.ai.model.ModelRequest; + +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +/** + * 文字内容 + */ +public class Prompt implements ModelRequest> { + + private final List messages; + + private ChatOptions modelOptions; + + public Prompt(String contents) { + this(new UserMessage(contents)); + } + + public Prompt(Message message) { + this(Collections.singletonList(message)); + } + + public Prompt(List messages) { + this.messages = messages; + } + + public Prompt(String contents, ChatOptions modelOptions) { + this(new UserMessage(contents), modelOptions); + } + + public Prompt(Message message, ChatOptions modelOptions) { + this(Collections.singletonList(message), modelOptions); + } + + public Prompt(List messages, ChatOptions modelOptions) { + this.messages = messages; + this.modelOptions = modelOptions; + } + + public String getContents() { + StringBuilder sb = new StringBuilder(); + for (Message message : getInstructions()) { + sb.append(message.getContent()); + } + return sb.toString(); + } + + @Override + public ModelOptions getOptions() { + return this.modelOptions; + } + + @Override + public List getInstructions() { + return this.messages; + } + + @Override + public String toString() { + return "Prompt{" + "messages=" + this.messages + ", modelOptions=" + this.modelOptions + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Prompt prompt)) + return false; + return Objects.equals(this.messages, prompt.messages) && Objects.equals(this.modelOptions, prompt.modelOptions); + } + + @Override + public int hashCode() { + return Objects.hash(this.messages, this.modelOptions); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java new file mode 100644 index 0000000000..7c0c0f7f36 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; +import cn.iocoder.yudao.framework.ai.parser.OutputParser; +import org.antlr.runtime.Token; +import org.antlr.runtime.TokenStream; +import org.springframework.core.io.Resource; +import org.springframework.util.StreamUtils; +import org.stringtemplate.v4.ST; +import org.stringtemplate.v4.compiler.STLexer; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.util.*; +import java.util.Map.Entry; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * 用户输入的提示内容模板 + * + * 实现:提示词模板操作 提示词模板message相关操作 + */ +public class PromptTemplate implements PromptTemplateActions, PromptTemplateMessageActions { + + private ST st; + + private Map dynamicModel = new HashMap<>(); + + protected String template; + + protected TemplateFormat templateFormat = TemplateFormat.ST; + + private OutputParser outputParser; + + public PromptTemplate(Resource resource) { + try (InputStream inputStream = resource.getInputStream()) { + this.template = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); + } + catch (IOException ex) { + throw new RuntimeException("Failed to read resource", ex); + } + try { + this.st = new ST(this.template, '{', '}'); + } + catch (Exception ex) { + throw new IllegalArgumentException("The template string is not valid.", ex); + } + } + + public PromptTemplate(String template) { + this.template = template; + // If the template string is not valid, an exception will be thrown + try { + this.st = new ST(this.template, '{', '}'); + } + catch (Exception ex) { + throw new IllegalArgumentException("The template string is not valid.", ex); + } + } + + public PromptTemplate(String template, Map model) { + this.template = template; + // If the template string is not valid, an exception will be thrown + try { + this.st = new ST(this.template, '{', '}'); + for (Entry entry : model.entrySet()) { + add(entry.getKey(), entry.getValue()); + dynamicModel.put(entry.getKey(), entry.getValue()); + } + } + catch (Exception ex) { + throw new IllegalArgumentException("The template string is not valid.", ex); + } + } + + public PromptTemplate(Resource resource, Map model) { + try (InputStream inputStream = resource.getInputStream()) { + this.template = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); + } + catch (IOException ex) { + throw new RuntimeException("Failed to read resource", ex); + } + // If the template string is not valid, an exception will be thrown + try { + this.st = new ST(this.template, '{', '}'); + for (Entry entry : model.entrySet()) { + add(entry.getKey(), entry.getValue()); + dynamicModel.put(entry.getKey(), entry.getValue()); + } + } + catch (Exception ex) { + throw new IllegalArgumentException("The template string is not valid.", ex); + } + } + + public OutputParser getOutputParser() { + return outputParser; + } + + public void setOutputParser(OutputParser outputParser) { + Objects.requireNonNull(outputParser, "Output Parser can not be null"); + this.outputParser = outputParser; + } + + public void add(String name, Object value) { + this.st.add(name, value); + this.dynamicModel.put(name, value); + } + + public String getTemplate() { + return this.template; + } + + public TemplateFormat getTemplateFormat() { + return this.templateFormat; + } + + // Render Methods + @Override + public String render() { + validate(this.dynamicModel); + return st.render(); + } + + @Override + public String render(Map model) { + validate(model); + for (Entry entry : model.entrySet()) { + if (st.getAttribute(entry.getKey()) != null) { + st.remove(entry.getKey()); + } + if (entry.getValue() instanceof Resource) { + st.add(entry.getKey(), renderResource((Resource) entry.getValue())); + } + else { + st.add(entry.getKey(), entry.getValue()); + } + + } + return st.render(); + } + + private String renderResource(Resource resource) { + try { + return resource.getContentAsString(Charset.defaultCharset()); + } + catch (IOException e) { + throw new RuntimeException(e); + } + // try (InputStream inputStream = resource.getInputStream()) { + // return StreamUtils.copyToString(inputStream, Charset.defaultCharset()); + // } + // catch (IOException ex) { + // throw new RuntimeException(ex); + // } + } + + @Override + public Message createMessage() { + return new UserMessage(render()); + } + + @Override + public Message createMessage(Map model) { + return new UserMessage(render(model)); + } + + @Override + public Prompt create() { + return new Prompt(render(new HashMap<>())); + } + + @Override + public Prompt create(Map model) { + return new Prompt(render(model)); + } + + public Set getInputVariables() { + TokenStream tokens = this.st.impl.tokens; + return IntStream.range(0, tokens.range()) + .mapToObj(tokens::get) + .filter(token -> token.getType() == STLexer.ID) + .map(Token::getText) + .collect(Collectors.toSet()); + } + + protected void validate(Map model) { + Set dynamicVariableNames = new HashSet<>(this.dynamicModel.keySet()); + Set modelVariables = new HashSet<>(model.keySet()); + modelVariables.addAll(dynamicVariableNames); + Set missingEntries = new HashSet<>(getInputVariables()); + missingEntries.removeAll(modelVariables); + if (!missingEntries.isEmpty()) { + throw new IllegalStateException( + "All template variables were not replaced. Missing variable names are " + missingEntries); + } + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java new file mode 100644 index 0000000000..bdee00acb4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java @@ -0,0 +1,34 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import java.util.Map; + +/** + * 提示词模板操作 + */ +public interface PromptTemplateActions extends PromptTemplateStringActions { + + /** + * 创建 Prompt + * @return + */ + Prompt create(); + + Prompt create(Map model); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java new file mode 100644 index 0000000000..922d57c8d7 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; + +import java.util.List; +import java.util.Map; + +/** + * 聊天操作 + * + */ +public interface PromptTemplateChatActions { + + List createMessages(); + + List createMessages(Map model); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java new file mode 100644 index 0000000000..8de851a891 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; + +import java.util.Map; + +/** + * 用户输入的提示内容 模板信息操作 + */ +public interface PromptTemplateMessageActions { + + /** + * 创建一个 message + * @return + */ + Message createMessage(); + + /** + * 创建一个 message + * @return + */ + Message createMessage(Map model); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java new file mode 100644 index 0000000000..58015b47d4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import java.util.Map; + +/** + * 提示次模板字符串操作 + */ +public interface PromptTemplateStringActions { + + String render(); + + String render(Map model); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java new file mode 100644 index 0000000000..cafade4bb4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import cn.iocoder.yudao.framework.ai.chat.messages.SystemMessage; +import org.springframework.core.io.Resource; + +import java.util.Map; + +public class SystemPromptTemplate extends PromptTemplate { + + public SystemPromptTemplate(String template) { + super(template); + } + + public SystemPromptTemplate(Resource resource) { + super(resource); + } + + @Override + public Message createMessage() { + return new SystemMessage(render()); + } + + @Override + public Message createMessage(Map model) { + return new SystemMessage(render(model)); + } + + @Override + public Prompt create() { + return new Prompt(new SystemMessage(render())); + } + + @Override + public Prompt create(Map model) { + return new Prompt(new SystemMessage(render(model))); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java new file mode 100644 index 0000000000..c22a78db33 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.chat.prompt; + +public enum TemplateFormat { + + ST("ST"); + + private final String value; + + TemplateFormat(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + public static TemplateFormat fromValue(String value) { + for (TemplateFormat templateFormat : TemplateFormat.values()) { + if (templateFormat.getValue().equals(value)) { + return templateFormat; + } + } + throw new IllegalArgumentException("Invalid TemplateFormat value: " + value); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java new file mode 100644 index 0000000000..705a7a9761 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * The ModelClient interface provides a generic API for invoking AI models. It is designed + * to handle the interaction with various types of AI models by abstracting the process of + * sending requests and receiving responses. The interface uses Java generics to + * accommodate different types of requests and responses, enhancing flexibility and + * adaptability across different AI model implementations. + * + * @param the generic type of the request to the AI model + * @param the generic type of the response from the AI model + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ModelClient, TRes extends ModelResponse> { + + /** + * Executes a method call to the AI model. + * @param request the request object to be sent to the AI model + * @return the response from the AI model + */ + TRes call(TReq request) throws Throwable; + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java new file mode 100644 index 0000000000..6a5a738fea --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java @@ -0,0 +1,31 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * Interface representing the customizable options for AI model interactions. This marker + * interface allows for the specification of various settings and parameters that can + * influence the behavior and output of AI models. It is designed to provide flexibility + * and adaptability in different AI scenarios, ensuring that the AI models can be + * fine-tuned according to specific requirements. + * + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ModelOptions { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java new file mode 100644 index 0000000000..0d6f740074 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java @@ -0,0 +1,387 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.github.victools.jsonschema.generator.*; +import com.github.victools.jsonschema.module.jackson.JacksonModule; +import com.github.victools.jsonschema.module.jackson.JacksonOption; +import com.github.victools.jsonschema.module.swagger2.Swagger2Module; +import org.springframework.beans.BeanWrapper; +import org.springframework.beans.BeanWrapperImpl; +import org.springframework.util.Assert; +import org.springframework.util.CollectionUtils; + +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * Utility class for manipulating {@link ModelOptions} objects. + * + * @author Christian Tzolov + * @since 0.8.0 + */ +public final class ModelOptionsUtils { + + private final static ObjectMapper OBJECT_MAPPER = new ObjectMapper() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + + private final static List BEAN_MERGE_FIELD_EXCISIONS = List.of("class"); + + private static ConcurrentHashMap, List> REQUEST_FIELD_NAMES_PER_CLASS = new ConcurrentHashMap, List>(); + + private static AtomicReference SCHEMA_GENERATOR_CACHE = new AtomicReference<>(); + + private ModelOptionsUtils() { + + } + + /** + * Converts the given JSON string to a Map of String and Object. + * @param json the JSON string to convert to a Map. + * @return the converted Map. + */ + public static Map jsonToMap(String json) { + try { + return OBJECT_MAPPER.readValue(json, MAP_TYPE_REF); + } + catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static TypeReference> MAP_TYPE_REF = new TypeReference>() { + }; + + /** + * Converts the given JSON string to an Object of the given type. + * @param the type of the object to return. + * @param json the JSON string to convert to an object. + * @param type the type of the object to return. + * @return Object instance of the given type. + */ + public static T jsonToObject(String json, Class type) { + try { + return OBJECT_MAPPER.readValue(json, type); + } + catch (Exception e) { + throw new RuntimeException("Failed to json: " + json, e); + } + } + + /** + * Converts the given object to a JSON string. + * @param object the object to convert to a JSON string. + * @return the JSON string. + */ + public static String toJsonString(Object object) { + try { + return OBJECT_MAPPER.writeValueAsString(object); + } + catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Merges the source object into the target object and returns an object represented + * by the given class. The JSON property names are used to match the fields to merge. + * The source non-null values override the target values with the same field name. The + * source null values are ignored. If the acceptedFieldNames is not empty, only the + * fields with the given names are merged and returned. If the acceptedFieldNames is + * empty, use the {@code @JsonProperty} names, inferred from the provided clazz. + * @param they type of the class to return. + * @param source the source object to merge. + * @param target the target object to merge into. + * @param clazz the class to return. + * @param acceptedFieldNames the list of field names accepted for the target object. + * @return the merged object represented by the given class. + */ + public static T merge(Object source, Object target, Class clazz, List acceptedFieldNames) { + + if (source == null) { + source = Map.of(); + } + + List requestFieldNames = CollectionUtils.isEmpty(acceptedFieldNames) + ? REQUEST_FIELD_NAMES_PER_CLASS.computeIfAbsent(clazz, ModelOptionsUtils::getJsonPropertyValues) + : acceptedFieldNames; + + if (CollectionUtils.isEmpty(requestFieldNames)) { + throw new IllegalArgumentException("No @JsonProperty fields found in the " + clazz.getName()); + } + + Map sourceMap = ModelOptionsUtils.objectToMap(source); + Map targetMap = ModelOptionsUtils.objectToMap(target); + + targetMap.putAll(sourceMap.entrySet() + .stream() + .filter(e -> e.getValue() != null) + .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()))); + + targetMap = targetMap.entrySet() + .stream() + .filter(e -> requestFieldNames.contains(e.getKey())) + .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); + + return ModelOptionsUtils.mapToClass(targetMap, clazz); + } + + /** + * Merges the source object into the target object and returns an object represented + * by the given class. The JSON property names are used to match the fields to merge. + * The source non-null values override the target values with the same field name. The + * source null values are ignored. Returns the only field names that match the + * {@code @JsonProperty} names, inferred from the provided clazz. + * @param they type of the class to return. + * @param source the source object to merge. + * @param target the target object to merge into. + * @param clazz the class to return. + * @return the merged object represented by the given class. + */ + public static T merge(Object source, Object target, Class clazz) { + return ModelOptionsUtils.merge(source, target, clazz, null); + } + + /** + * Converts the given object to a Map. + * @param source the object to convert to a Map. + * @return the converted Map. + */ + public static Map objectToMap(Object source) { + if (source == null) { + return new HashMap<>(); + } + try { + String json = OBJECT_MAPPER.writeValueAsString(source); + return OBJECT_MAPPER.readValue(json, new TypeReference>() { + }) + .entrySet() + .stream() + .filter(e -> e.getValue() != null) + .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); + } + catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Converts the given Map to the given class. + * @param the type of the class to return. + * @param source the Map to convert to the given class. + * @param clazz the class to convert the Map to. + * @return the converted class. + */ + public static T mapToClass(Map source, Class clazz) { + try { + String json = OBJECT_MAPPER.writeValueAsString(source); + return OBJECT_MAPPER.readValue(json, clazz); + } + catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Returns the list of name values of the {@link JsonProperty} annotations. + * @param clazz the class that contains fields annotated with {@link JsonProperty}. + * @return the list of values of the {@link JsonProperty} annotations. + */ + public static List getJsonPropertyValues(Class clazz) { + List values = new ArrayList<>(); + Field[] fields = clazz.getDeclaredFields(); + for (Field field : fields) { + JsonProperty jsonPropertyAnnotation = field.getAnnotation(JsonProperty.class); + if (jsonPropertyAnnotation != null) { + values.add(jsonPropertyAnnotation.value()); + } + } + return values; + } + + /** + * Returns a new instance of the targetBeanClazz that copies the bean values from the + * sourceBean instance. + * @param sourceBean the source bean to copy the values from. + * @param sourceInterfaceClazz the source interface class. Only the fields with the + * same name as the interface methods are copied. This allow the source object to be a + * subclass of the source interface with additional, non-interface fields. + * @param targetBeanClazz the target class, a subclass of the ChatOptions, to convert + * into. + * @param the target class type. + * @return a new instance of the targetBeanClazz with the values from the sourceBean + * instance. + */ + public static T copyToTarget(S sourceBean, Class sourceInterfaceClazz, + Class targetBeanClazz) { + + Assert.notNull(sourceInterfaceClazz, "SourceOptionsClazz must not be null"); + Assert.notNull(targetBeanClazz, "TargetOptionsClazz must not be null"); + + if (sourceBean == null) { + return null; + } + + if (sourceBean.getClass().isAssignableFrom(targetBeanClazz)) { + return (T) sourceBean; + } + + try { + T targetOptions = targetBeanClazz.getConstructor().newInstance(); + + ModelOptionsUtils.mergeBeans(sourceBean, targetOptions, sourceInterfaceClazz, true); + + return targetOptions; + } + catch (Exception e) { + throw new RuntimeException( + "Failed to convert the " + sourceInterfaceClazz.getName() + " into " + targetBeanClazz.getName(), + e); + } + } + + /** + * Merges the source object into the target object. The source null values are + * ignored. Only objects with Getter and Setter methods are supported. + * @param the type of the source and target object. + * @param source the source object to merge. + * @param target the target object to merge into. + * @param sourceInterfaceClazz the source interface class. Only the fields with the + * same name as the interface methods are merged. This allow the source object to be a + * subclass of the source interface with additional, non-interface fields. + * @param overrideNonNullTargetValues if true, the source non-null values override the + * target values with the same field name. If false, the source non-null values are + * ignored. + * @return the merged target object. + */ + public static T mergeBeans(S source, T target, Class sourceInterfaceClazz, + boolean overrideNonNullTargetValues) { + Assert.notNull(source, "Source object must not be null"); + Assert.notNull(target, "Target object must not be null"); + + BeanWrapper sourceBeanWrap = new BeanWrapperImpl(source); + BeanWrapper targetBeanWrap = new BeanWrapperImpl(target); + + List interfaceNames = Arrays.stream(sourceInterfaceClazz.getMethods()).map(m -> m.getName()).toList(); + + for (PropertyDescriptor descriptor : sourceBeanWrap.getPropertyDescriptors()) { + + if (!BEAN_MERGE_FIELD_EXCISIONS.contains(descriptor.getName()) + && interfaceNames.contains(toGetName(descriptor.getName()))) { + + String propertyName = descriptor.getName(); + Object value = sourceBeanWrap.getPropertyValue(propertyName); + + // Copy value to the target object + if (value != null) { + var targetValue = targetBeanWrap.getPropertyValue(propertyName); + + if (targetValue == null || overrideNonNullTargetValues) { + targetBeanWrap.setPropertyValue(propertyName, value); + } + } + } + } + + return target; + } + + private static String toGetName(String name) { + return "get" + name.substring(0, 1).toUpperCase() + name.substring(1); + } + + /** + * Generates JSON Schema (version 2020_12) for the given class. + * @param clazz the class to generate JSON Schema for. + * @param toUpperCaseTypeValues if true, the type values are converted to upper case. + * @return the generated JSON Schema as a String. + */ + public static String getJsonSchema(Class clazz, boolean toUpperCaseTypeValues) { + + if (SCHEMA_GENERATOR_CACHE.get() == null) { + + JacksonModule jacksonModule = new JacksonModule(JacksonOption.RESPECT_JSONPROPERTY_REQUIRED); + Swagger2Module swaggerModule = new Swagger2Module(); + + SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, + OptionPreset.PLAIN_JSON) + .with(Option.EXTRA_OPEN_API_FORMAT_VALUES) + .with(Option.PLAIN_DEFINITION_KEYS) + .with(swaggerModule) + .with(jacksonModule); + + SchemaGeneratorConfig config = configBuilder.build(); + SchemaGenerator generator = new SchemaGenerator(config); + SCHEMA_GENERATOR_CACHE.compareAndSet(null, generator); + } + + ObjectNode node = SCHEMA_GENERATOR_CACHE.get().generateSchema(clazz); + if (toUpperCaseTypeValues) { // Required for OpenAPI 3.0 (at least Vertex AI + // version of it). + toUpperCaseTypeValues(node); + } + + return node.toPrettyString(); + } + + public static void toUpperCaseTypeValues(ObjectNode node) { + if (node == null) { + return; + } + if (node.isObject()) { + node.fields().forEachRemaining(entry -> { + JsonNode value = entry.getValue(); + if (value.isObject()) { + toUpperCaseTypeValues((ObjectNode) value); + } + else if (value.isArray()) { + ((ArrayNode) value).elements().forEachRemaining(element -> { + if (element.isObject() || element.isArray()) { + toUpperCaseTypeValues((ObjectNode) element); + } + }); + } + else if (value.isTextual() && entry.getKey().equals("type")) { + String oldValue = ((ObjectNode) node).get("type").asText(); + ((ObjectNode) node).put("type", oldValue.toUpperCase()); + } + }); + } + else if (node.isArray()) { + node.elements().forEachRemaining(element -> { + if (element.isObject() || element.isArray()) { + toUpperCaseTypeValues((ObjectNode) element); + } + }); + } + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java new file mode 100644 index 0000000000..915aba26e0 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * 表示对AI模型的请求的接口。此接口封装了 与人工智能模型交互所需的必要信息,包括指令或 输入(通用类型T)和附加模型选项。它提供了一种标准化的方式 + * 向人工智能模型发送请求,确保包括所有必要的细节,并且可以易于管理。 + * + * Interface representing a request to an AI model. This interface encapsulates the + * necessary information required to interact with an AI model, including instructions or + * inputs (of generic type T) and additional model options. It provides a standardized way + * to send requests to AI models, ensuring that all necessary details are included and can + * be easily managed. + * + * @param the type of instructions or input required by the AI model + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ModelRequest { + + /** + * 检索AI模型所需的指令或输入。 返回AI模型所需的指令或输入 + * + * Retrieves the instructions or input required by the AI model. + * @return the instructions or input required by the AI model + */ + T getInstructions(); // required input + + /** + * 检索人工智能模型交互的可自定义选项。 返回AI模型交互的自定义选项 + * + * Retrieves the customizable options for AI model interactions. + * @return the customizable options for AI model interactions + */ + ModelOptions getOptions(); + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java new file mode 100644 index 0000000000..0bc0cc5939 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +import java.util.List; + +/** + * + * 表示从AI模型接收到的响应的接口。此接口提供 访问AI模型生成的主要结果或结果列表的方法,以及 以及响应元数据。它是封装和管理的标准化方式 + * 人工智能模型的输出,确保轻松检索和处理生成的信息 + * + * Interface representing the response received from an AI model. This interface provides + * methods to access the main result or a list of results generated by the AI model, along + * with the response metadata. It serves as a standardized way to encapsulate and manage + * the output from AI models, ensuring easy retrieval and processing of the generated + * information. + * + * @param the type of the result(s) provided by the AI model + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ModelResponse> { + + /** + * 检索AI模型的结果。 + * + * Retrieves the result of the AI model. + * @return the result generated by the AI model + */ + T getResult(); + + /** + * 检索AI模型生成的输出列表。 + * + * Retrieves the list of generated outputs by the AI model. + * @return the list of generated outputs + */ + List getResults(); + + /** + * 检索与AI模型的响应相关联的响应元数据。 + * + * Retrieves the response metadata associated with the AI model's response. + * @return the response metadata + */ + ResponseMetadata getMetadata(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java new file mode 100644 index 0000000000..616be18171 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * This interface provides methods to access the main output of the AI model and the + * metadata associated with this result. It is designed to offer a standardized and + * comprehensive way to handle and interpret the outputs generated by AI models, catering + * to diverse AI applications and use cases. + * + * @param the type of the output generated by the AI model + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ModelResult { + + /** + * Retrieves the output generated by the AI model. + * @return the output generated by the AI model + */ + T getOutput(); + + /** + * Retrieves the metadata associated with the result of an AI model. + * @return the metadata associated with the result + */ + ResultMetadata getMetadata(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java new file mode 100644 index 0000000000..2a85cdf7ae --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java @@ -0,0 +1,34 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * 表示与AI模型的响应相关联的元数据的接口。此接口 旨在提供有关人工智能生成反应的附加信息 模型,包括处理细节和模型特定数据。它是一种价值 + * 核心领域内的对象,增强对人工智能模型的理解和管理 在各种应用中的响应。 + * + * Interface representing metadata associated with an AI model's response. This interface + * is designed to provide additional information about the generative response from an AI + * model, including processing details and model-specific data. It serves as a value + * object within the core domain, enhancing the understanding and management of AI model + * responses in various applications. + * + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ResponseMetadata { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java new file mode 100644 index 0000000000..528b764596 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java @@ -0,0 +1,31 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +/** + * Interface representing metadata associated with the results of an AI model. This + * interface focuses on providing additional context and insights into the results + * generated by AI models. It could include information like computation time, model + * version, or other relevant details that enhance understanding and management of AI + * model outputs in various applications. + * + * @author Mark Pollack + * @since 0.8.0 + */ +public interface ResultMetadata { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java new file mode 100644 index 0000000000..abbe8598c1 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model; + +import reactor.core.publisher.Flux; + +/** + * The StreamingModelClient interface provides a generic API for invoking a AI models with + * streaming response. It abstracts the process of sending requests and receiving a + * streaming responses. The interface uses Java generics to accommodate different types of + * requests and responses, enhancing flexibility and adaptability across different AI + * model implementations. + * + * @param the generic type of the request to the AI model + * @param the generic type of a single item in the streaming response from the + * AI model + * @author Christian Tzolov + * @since 0.8.0 + */ +public interface StreamingModelClient, TResChunk extends ModelResponse> { + + /** + * Executes a method call to the AI model. + * @param request the request object to be sent to the AI model + * @return the streaming response from the AI model + */ + Flux stream(TReq request); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java new file mode 100644 index 0000000000..d5becdbb55 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java @@ -0,0 +1,158 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +import org.springframework.util.CollectionUtils; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author Christian Tzolov + */ +public abstract class AbstractFunctionCallSupport { + + protected final static boolean IS_RUNTIME_CALL = true; + + /** + * The function callback register is used to resolve the function callbacks by name. + */ + protected final Map functionCallbackRegister = new ConcurrentHashMap<>(); + + /** + * The function callback context is used to resolve the function callbacks by name + * from the Spring context. It is optional and usually used with Spring + * auto-configuration. + */ + protected final FunctionCallbackContext functionCallbackContext; + + public AbstractFunctionCallSupport(FunctionCallbackContext functionCallbackContext) { + this.functionCallbackContext = functionCallbackContext; + } + + public Map getFunctionCallbackRegister() { + return this.functionCallbackRegister; + } + + protected Set handleFunctionCallbackConfigurations(FunctionCallingOptions options, boolean isRuntimeCall) { + + Set functionToCall = new HashSet<>(); + + if (options != null) { + if (!CollectionUtils.isEmpty(options.getFunctionCallbacks())) { + options.getFunctionCallbacks().stream().forEach(functionCallback -> { + + // Register the tool callback. + if (isRuntimeCall) { + this.functionCallbackRegister.put(functionCallback.getName(), functionCallback); + } + else { + this.functionCallbackRegister.putIfAbsent(functionCallback.getName(), functionCallback); + } + + // Automatically enable the function, usually from prompt callback. + if (isRuntimeCall) { + functionToCall.add(functionCallback.getName()); + } + }); + } + + // Add the explicitly enabled functions. + if (!CollectionUtils.isEmpty(options.getFunctions())) { + functionToCall.addAll(options.getFunctions()); + } + } + + return functionToCall; + } + + /** + * Resolve the function callbacks by name. Retrieve them from the registry or try to + * resolve them from the Application Context. + * @param functionNames Name of function callbacks to retrieve. + * @return list of resolved FunctionCallbacks. + */ + protected List resolveFunctionCallbacks(Set functionNames) { + + List retrievedFunctionCallbacks = new ArrayList<>(); + + for (String functionName : functionNames) { + if (!this.functionCallbackRegister.containsKey(functionName)) { + + if (this.functionCallbackContext != null) { + FunctionCallback functionCallback = this.functionCallbackContext.getFunctionCallback(functionName, + null); + if (functionCallback != null) { + this.functionCallbackRegister.put(functionName, functionCallback); + } + else { + throw new IllegalStateException( + "No function callback [" + functionName + "] fund in tht FunctionCallbackContext"); + } + } + else { + throw new IllegalStateException("No function callback found for name: " + functionName); + } + } + FunctionCallback functionCallback = this.functionCallbackRegister.get(functionName); + + retrievedFunctionCallbacks.add(functionCallback); + } + + return retrievedFunctionCallbacks; + } + + /// + protected Resp callWithFunctionSupport(Req request) { + Resp response = this.doChatCompletion(request); + return this.handleFunctionCallOrReturn(request, response); + } + + protected Resp handleFunctionCallOrReturn(Req request, Resp response) { + + if (!this.isToolFunctionCall(response)) { + return response; + } + + // The chat completion tool call requires the complete conversation + // history. Including the initial user message. + List conversationHistory = new ArrayList<>(); + + conversationHistory.addAll(this.doGetUserMessages(request)); + + Msg responseMessage = this.doGetToolResponseMessage(response); + + // Add the assistant response to the message conversation history. + conversationHistory.add(responseMessage); + + Req newRequest = this.doCreateToolResponseRequest(request, responseMessage, conversationHistory); + + return this.callWithFunctionSupport(newRequest); + } + + abstract protected Req doCreateToolResponseRequest(Req previousRequest, Msg responseMessage, + List conversationHistory); + + abstract protected List doGetUserMessages(Req request); + + abstract protected Msg doGetToolResponseMessage(Resp response); + + abstract protected Resp doChatCompletion(Req request); + + abstract protected boolean isToolFunctionCall(Resp response); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java new file mode 100644 index 0000000000..044c1813c3 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java @@ -0,0 +1,159 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.util.Assert; + +import java.util.function.Function; + +/** + * Abstract implementation of the {@link FunctionCallback} for interacting with the + * Model's function calling protocol and a {@link Function} wrapping the interaction with + * the 3rd party service/function. + * + * Implement the {@code O apply(I request) } method to implement the interaction with the + * 3rd party service/function. + * + * The {@link #responseConverter} function is responsible to convert the 3rd party + * function's output type into a string expected by the LLM model. + * + * @param the 3rd party service input type. + * @param the 3rd party service output type. + * @author Christian Tzolov + */ +abstract class AbstractFunctionCallback implements Function, FunctionCallback { + + private final String name; + + private final String description; + + private final Class inputType; + + private final String inputTypeSchema; + + private final ObjectMapper objectMapper; + + private final Function responseConverter; + + /** + * Constructs a new {@link AbstractFunctionCallback} with the given name, description, + * input type and default object mapper. + * @param name Function name. Should be unique within the ChatClient's function + * registry. + * @param description Function description. Used as a "system prompt" by the model to + * decide if the function should be called. + * @param inputTypeSchema Used to compute, the argument's Schema (such as JSON Schema + * or OpenAPI Schema)required by the Model's function calling protocol. + * @param inputType Used to compute, the argument's JSON schema required by the + * Model's function calling protocol. + * @param responseConverter Used to convert the function's output type to a string. + * @param objectMapper Used to convert the function's input and output types to and + * from JSON. + */ + protected AbstractFunctionCallback(String name, String description, String inputTypeSchema, Class inputType, + Function responseConverter, ObjectMapper objectMapper) { + Assert.notNull(name, "Name must not be null"); + Assert.notNull(description, "Description must not be null"); + Assert.notNull(inputType, "InputType must not be null"); + Assert.notNull(inputTypeSchema, "InputTypeSchema must not be null"); + Assert.notNull(responseConverter, "ResponseConverter must not be null"); + Assert.notNull(objectMapper, "ObjectMapper must not be null"); + this.name = name; + this.description = description; + this.inputType = inputType; + this.inputTypeSchema = inputTypeSchema; + this.responseConverter = responseConverter; + this.objectMapper = objectMapper; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public String getDescription() { + return this.description; + } + + @Override + public String getInputTypeSchema() { + return this.inputTypeSchema; + } + + @Override + public String call(String functionArguments) { + + // Convert the tool calls JSON arguments into a Java function request object. + I request = fromJson(functionArguments, inputType); + + // extend conversation with function response. + return this.andThen(this.responseConverter).apply(request); + } + + private T fromJson(String json, Class targetClass) { + try { + return this.objectMapper.readValue(json, targetClass); + } + catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((inputType == null) ? 0 : inputType.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + AbstractFunctionCallback other = (AbstractFunctionCallback) obj; + if (name == null) { + if (other.name != null) + return false; + } + else if (!name.equals(other.name)) + return false; + if (description == null) { + if (other.description != null) + return false; + } + else if (!description.equals(other.description)) + return false; + if (inputType == null) { + if (other.inputType != null) + return false; + } + else if (!inputType.equals(other.inputType)) + return false; + return true; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java new file mode 100644 index 0000000000..d644d517ac --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +/** + * Represents a model function call handler. Implementations are registered with the + * Models and called on prompts that trigger the function call. + * + * @author Christian Tzolov + */ +public interface FunctionCallback { + + /** + * @return Returns the Function name. Unique within the model. + */ + public String getName(); + + /** + * @return Returns the function description. This description is used by the model do + * decide if the function should be called or not. + */ + public String getDescription(); + + /** + * @return Returns the JSON schema of the function input type. + */ + public String getInputTypeSchema(); + + /** + * Called when a model detects and triggers a function call. The model is responsible + * to pass the function arguments in the pre-configured JSON schema format. + * @param functionInput JSON string with the function arguments to be passed to the + * function. The arguments are defined as JSON schema usually registered with the the + * model. + * @return String containing the function call response. + */ + public String call(String functionInput); + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java new file mode 100644 index 0000000000..dd5b0ee7c0 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.model.function; + +import com.fasterxml.jackson.annotation.JsonClassDescription; +import org.springframework.beans.BeansException; +import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; +import org.springframework.cloud.function.context.config.FunctionContextUtils; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Description; +import org.springframework.context.support.GenericApplicationContext; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.StringUtils; + +import java.lang.reflect.Type; +import java.util.function.Function; + +/** + * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve + * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. + * + * The name of the function is determined by the bean name. + * + * The description of the function is determined by the following rules: + *

    + *
  • Provided as a default description
  • + *
  • Provided as a {@code @Description} annotation on the bean
  • + *
  • Provided as a {@code @JsonClassDescription} annotation on the input class
  • + *
+ * + * @author Christian Tzolov + * @author Christopher Smith + */ +public class FunctionCallbackContext implements ApplicationContextAware { + + private GenericApplicationContext applicationContext; + + private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; + + public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { + this.schemaType = schemaType; + } + + @Override + public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { + this.applicationContext = (GenericApplicationContext) applicationContext; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { + + Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); + + if (beanType == null) { + throw new IllegalArgumentException( + "Functional bean with name: " + beanName + " does not exist in the context."); + } + + if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { + throw new IllegalArgumentException( + "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); + } + + Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); + + Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); + String functionName = beanName; + String functionDescription = defaultDescription; + + if (!StringUtils.hasText(functionDescription)) { + // Look for a Description annotation on the bean + Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); + + if (descriptionAnnotation != null) { + functionDescription = descriptionAnnotation.value(); + } + + if (!StringUtils.hasText(functionDescription)) { + // Look for a JsonClassDescription annotation on the input class + JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass + .getAnnotation(JsonClassDescription.class); + if (jsonClassDescriptionAnnotation != null) { + functionDescription = jsonClassDescriptionAnnotation.value(); + } + } + + if (!StringUtils.hasText(functionDescription)) { + throw new IllegalStateException("Could not determine function description." + + "Please provide a description either as a default parameter, via @Description annotation on the bean " + + "or @JsonClassDescription annotation on the input class."); + } + } + + Object bean = this.applicationContext.getBean(beanName); + + if (bean instanceof Function function) { + return FunctionCallbackWrapper.builder(function) + .withName(functionName) + .withSchemaType(this.schemaType) + .withDescription(functionDescription) + .withInputType(functionInputClass) + .build(); + } + else { + throw new IllegalArgumentException("Bean must be of type Function"); + } + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java new file mode 100644 index 0000000000..d824121252 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java @@ -0,0 +1,140 @@ +package cn.iocoder.yudao.framework.ai.model.function; + +import cn.iocoder.yudao.framework.ai.model.ModelOptionsUtils; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.util.Assert; + +import java.util.function.Function; + +/** + * Note that the underlying function is responsible for converting the output into format + * that can be consumed by the Model. The default implementation converts the output into + * String before sending it to the Model. Provide a custom function responseConverter + * implementation to override this. + * + */ +public class FunctionCallbackWrapper extends AbstractFunctionCallback { + + private final Function function; + + private FunctionCallbackWrapper(String name, String description, String inputTypeSchema, Class inputType, + Function responseConverter, Function function) { + super(name, description, inputTypeSchema, inputType, responseConverter, + new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)); + Assert.notNull(function, "Function must not be null"); + this.function = function; + } + + @SuppressWarnings("unchecked") + private static Class resolveInputType(Function function) { + return (Class) TypeResolverHelper.getFunctionInputClass((Class>) function.getClass()); + } + + @Override + public O apply(I input) { + return this.function.apply(input); + } + + public static Builder builder(Function function) { + return new Builder<>(function); + } + + public static class Builder { + + public enum SchemaType { + + JSON_SCHEMA, OPEN_API_SCHEMA + + } + + private String name; + + private String description; + + private Class inputType; + + private final Function function; + + private SchemaType schemaType = SchemaType.JSON_SCHEMA; + + public Builder(Function function) { + Assert.notNull(function, "Function must not be null"); + this.function = function; + } + + // By default the response is converted to a JSON string. + private Function responseConverter = (response) -> ModelOptionsUtils.toJsonString(response); + + private String inputTypeSchema; + + private ObjectMapper objectMapper = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + public Builder withName(String name) { + Assert.hasText(name, "Name must not be empty"); + this.name = name; + return this; + } + + public Builder withDescription(String description) { + Assert.hasText(description, "Description must not be empty"); + this.description = description; + return this; + } + + @SuppressWarnings("unchecked") + public Builder withInputType(Class inputType) { + this.inputType = (Class) inputType; + return this; + } + + public Builder withResponseConverter(Function responseConverter) { + Assert.notNull(responseConverter, "ResponseConverter must not be null"); + this.responseConverter = responseConverter; + return this; + } + + public Builder withInputTypeSchema(String inputTypeSchema) { + Assert.hasText(inputTypeSchema, "InputTypeSchema must not be empty"); + this.inputTypeSchema = inputTypeSchema; + return this; + } + + public Builder withObjectMapper(ObjectMapper objectMapper) { + Assert.notNull(objectMapper, "ObjectMapper must not be null"); + this.objectMapper = objectMapper; + return this; + } + + public Builder withSchemaType(SchemaType schemaType) { + Assert.notNull(schemaType, "SchemaType must not be null"); + this.schemaType = schemaType; + return this; + } + + public FunctionCallbackWrapper build() { + + Assert.hasText(this.name, "Name must not be empty"); + Assert.hasText(this.description, "Description must not be empty"); + // Assert.notNull(this.inputType, "InputType must not be null"); + Assert.notNull(this.function, "Function must not be null"); + Assert.notNull(this.responseConverter, "ResponseConverter must not be null"); + Assert.notNull(this.objectMapper, "ObjectMapper must not be null"); + + if (this.inputType == null) { + this.inputType = resolveInputType(this.function); + } + + if (this.inputTypeSchema == null) { + boolean upperCaseTypeValues = this.schemaType == SchemaType.OPEN_API_SCHEMA; + this.inputTypeSchema = ModelOptionsUtils.getJsonSchema(this.inputType, upperCaseTypeValues); + } + + return new FunctionCallbackWrapper<>(this.name, this.description, this.inputTypeSchema, this.inputType, + this.responseConverter, this.function); + } + + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java new file mode 100644 index 0000000000..fdb42d6a4d --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java @@ -0,0 +1,66 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +import java.util.List; +import java.util.Set; + +/** + * @author Christian Tzolov + */ +public interface FunctionCallingOptions { + + /** + * Function Callbacks to be registered with the ChatClient. For Prompt Options the + * functionCallbacks are automatically enabled for the duration of the prompt + * execution. For Default Options the FunctionCallbacks are registered but disabled by + * default. You have to use "functions" property to list the function names from the + * ChatClient registry to be used in the chat completion requests. + * @return Return the Function Callbacks to be registered with the ChatClient. + */ + List getFunctionCallbacks(); + + /** + * Set the Function Callbacks to be registered with the ChatClient. + * @param functionCallbacks the Function Callbacks to be registered with the + * ChatClient. + */ + void setFunctionCallbacks(List functionCallbacks); + + /** + * @return List of function names from the ChatClient registry to be used in the next + * chat completion requests. + */ + Set getFunctions(); + + /** + * Set the list of function names from the ChatClient registry to be used in the next + * chat completion requests. + * @param functions the list of function names from the ChatClient registry to be used + * in the next chat completion requests. + */ + void setFunctions(Set functions); + + /** + * @return Returns FunctionCallingOptionsBuilder to create a new instance of + * FunctionCallingOptions. + */ + public static FunctionCallingOptionsBuilder builder() { + return new FunctionCallingOptionsBuilder(); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java new file mode 100644 index 0000000000..4fc258b4a3 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Builder for {@link FunctionCallingOptions}. Using the {@link FunctionCallingOptions} + * permits options portability between different AI providers that support + * function-calling. + * + * @author Christian Tzolov + * @since 0.8.1 + */ +public class FunctionCallingOptionsBuilder { + + private final PortableFunctionCallingOptions options; + + public FunctionCallingOptionsBuilder() { + this.options = new PortableFunctionCallingOptions(); + } + + public FunctionCallingOptionsBuilder withFunctionCallbacks(List functionCallbacks) { + this.options.setFunctionCallbacks(functionCallbacks); + return this; + } + + public FunctionCallingOptionsBuilder withFunctionCallback(FunctionCallback functionCallback) { + Assert.notNull(functionCallback, "FunctionCallback must not be null"); + this.options.getFunctionCallbacks().add(functionCallback); + return this; + } + + public FunctionCallingOptionsBuilder withFunctions(Set functions) { + this.options.setFunctions(functions); + return this; + } + + public FunctionCallingOptionsBuilder withFunction(String function) { + Assert.notNull(function, "Function must not be null"); + this.options.getFunctions().add(function); + return this; + } + + public FunctionCallingOptionsBuilder withTemperature(Float temperature) { + this.options.setTemperature(temperature); + return this; + } + + public FunctionCallingOptionsBuilder withTopP(Float topP) { + this.options.setTopP(topP); + return this; + } + + public FunctionCallingOptionsBuilder withTopK(Integer topK) { + this.options.setTopK(topK); + return this; + } + + public PortableFunctionCallingOptions build() { + return this.options; + } + + public static class PortableFunctionCallingOptions implements FunctionCallingOptions, ChatOptions { + + private List functionCallbacks = new ArrayList<>(); + + private Set functions = new HashSet<>(); + + private Float temperature; + + private Float topP; + + private Integer topK; + + @Override + public List getFunctionCallbacks() { + return this.functionCallbacks; + } + + @Override + public void setFunctionCallbacks(List functionCallbacks) { + Assert.notNull(functionCallbacks, "FunctionCallbacks must not be null"); + this.functionCallbacks = functionCallbacks; + } + + @Override + public Set getFunctions() { + return this.functions; + } + + @Override + public void setFunctions(Set functions) { + Assert.notNull(functions, "Functions must not be null"); + this.functions = functions; + } + + @Override + public Float getTemperature() { + return this.temperature; + } + + @Override + public void setTemperature(Float temperature) { + this.temperature = temperature; + } + + @Override + public Float getTopP() { + return this.topP; + } + + @Override + public void setTopP(Float topP) { + this.topP = topP; + } + + @Override + public Integer getTopK() { + return this.topK; + } + + @Override + public void setTopK(Integer topK) { + this.topK = topK; + } + + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java new file mode 100644 index 0000000000..e1c8c49325 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java @@ -0,0 +1,87 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.model.function; + +import net.jodah.typetools.TypeResolver; + +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.function.Function; + +/** + * @author Christian Tzolov + */ +public class TypeResolverHelper { + + public static Class getFunctionInputClass(Class> functionClass) { + return getFunctionArgumentClass(functionClass, 0); + } + + public static Class getFunctionOutputClass(Class> functionClass) { + return getFunctionArgumentClass(functionClass, 1); + } + + public static Class getFunctionArgumentClass(Class> functionClass, int argumentIndex) { + Type type = TypeResolver.reify(Function.class, functionClass); + + var argumentType = type instanceof ParameterizedType + ? ((ParameterizedType) type).getActualTypeArguments()[argumentIndex] : Object.class; + + return toRawClass(argumentType); + } + + public static Type getFunctionInputType(Class> functionClass) { + return getFunctionArgumentType(functionClass, 0); + } + + public static Type getFunctionOutputType(Class> functionClass) { + return getFunctionArgumentType(functionClass, 1); + } + + public static Type getFunctionArgumentType(Class> functionClass, int argumentIndex) { + Type functionType = TypeResolver.reify(Function.class, functionClass); + return getFunctionArgumentType(functionType, argumentIndex); + } + + public static Type getFunctionArgumentType(Type functionType, int argumentIndex) { + var argumentType = functionType instanceof ParameterizedType + ? ((ParameterizedType) functionType).getActualTypeArguments()[argumentIndex] : Object.class; + + return argumentType; + } + + /** + * Effectively converts {@link Type} which could be {@link ParameterizedType} to raw + * Class (no generics). + * @param type actual {@link Type} instance + * @return instance of {@link Class} as raw representation of the provided + * {@link Type} + */ + public static Class toRawClass(Type type) { + return type != null + ? TypeResolver.resolveRawClass(type instanceof GenericArrayType ? type : TypeResolver.reify(type), null) + : null; + } + + // public static void main(String[] args) { + // Class> clazz = MockWeatherService.class; + // System.out.println(getFunctionInputType(clazz)); + + // } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java new file mode 100644 index 0000000000..d2cf8e37bf --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java @@ -0,0 +1,11 @@ +/** + * Provides a set of interfaces and classes for a generic API designed to interact with + * various AI models. This package includes interfaces for handling AI model calls, + * requests, responses, results, and associated metadata. It is designed to offer a + * flexible and adaptable framework for interacting with different types of AI models, + * abstracting the complexities involved in model invocation and result processing. The + * use of generics enhances the API's capability to work with a wide range of models, + * ensuring a broad applicability across diverse AI scenarios. + * + */ +package cn.iocoder.yudao.framework.ai.model; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java new file mode 100644 index 0000000000..de43c748b8 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/12 20:29 + */ +package cn.iocoder.yudao.framework.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java new file mode 100644 index 0000000000..cee9fff425 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +import org.springframework.core.convert.support.DefaultConversionService; + +/** + * Abstract {@link OutputParser} implementation that uses a pre-configured + * {@link DefaultConversionService} to convert the LLM output into the desired type + * format. + * + * @param Specifies the desired response type. + * @author Mark Pollack + * @author Christian Tzolov + */ +public abstract class AbstractConversionServiceOutputParser implements OutputParser { + + private final DefaultConversionService conversionService; + + public AbstractConversionServiceOutputParser(DefaultConversionService conversionService) { + this.conversionService = conversionService; + } + + public DefaultConversionService getConversionService() { + return conversionService; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java new file mode 100644 index 0000000000..abe5005abc --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +import org.springframework.messaging.converter.MessageConverter; + +/** + * Abstract {@link OutputParser} implementation that uses a pre-configured + * {@link MessageConverter} to convert the LLM output into the desired type format. + * + * @param Specifies the desired response type. + * @author Mark Pollack + * @author Christian Tzolov + */ +public abstract class AbstractMessageConverterOutputParser implements OutputParser { + + private MessageConverter messageConverter; + + public AbstractMessageConverterOutputParser(MessageConverter messageConverter) { + this.messageConverter = messageConverter; + } + + public MessageConverter getMessageConverter() { + return this.messageConverter; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java new file mode 100644 index 0000000000..4eb08ce293 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java @@ -0,0 +1,166 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.util.DefaultIndenter; +import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.github.victools.jsonschema.generator.SchemaGenerator; +import com.github.victools.jsonschema.generator.SchemaGeneratorConfig; +import com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder; +import com.github.victools.jsonschema.module.jackson.JacksonModule; + +import java.util.Map; +import java.util.Objects; + +import static com.github.victools.jsonschema.generator.OptionPreset.PLAIN_JSON; +import static com.github.victools.jsonschema.generator.SchemaVersion.DRAFT_2020_12; + +/** + * An implementation of {@link OutputParser} that transforms the LLM output to a specific + * object type using JSON schema. This parser works by generating a JSON schema based on a + * given Java class, which is then used to validate and transform the LLM output into the + * desired type. + * + * @param The target type to which the output will be converted. + * @author Mark Pollack + * @author Christian Tzolov + * @author Sebastian Ullrich + * @author Kirk Lund + */ +public class BeanOutputParser implements OutputParser { + + /** Holds the generated JSON schema for the target type. */ + private String jsonSchema; + + /** The Java class representing the target type. */ + @SuppressWarnings({ "FieldMayBeFinal", "rawtypes" }) + private Class clazz; + + /** The object mapper used for deserialization and other JSON operations. */ + @SuppressWarnings("FieldMayBeFinal") + private ObjectMapper objectMapper; + + /** + * Constructor to initialize with the target type's class. + * @param clazz The target type's class. + */ + public BeanOutputParser(Class clazz) { + this(clazz, null); + } + + /** + * Constructor to initialize with the target type's class, a custom object mapper, and + * a line endings normalizer to ensure consistent line endings on any platform. + * @param clazz The target type's class. + * @param objectMapper Custom object mapper for JSON operations. endings. + */ + public BeanOutputParser(Class clazz, ObjectMapper objectMapper) { + Objects.requireNonNull(clazz, "Java Class cannot be null;"); + this.clazz = clazz; + this.objectMapper = objectMapper != null ? objectMapper : getObjectMapper(); + generateSchema(); + } + + /** + * Generates the JSON schema for the target type. + */ + private void generateSchema() { + JacksonModule jacksonModule = new JacksonModule(); + SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(DRAFT_2020_12, PLAIN_JSON) + .with(jacksonModule); + SchemaGeneratorConfig config = configBuilder.build(); + SchemaGenerator generator = new SchemaGenerator(config); + JsonNode jsonNode = generator.generateSchema(this.clazz); + ObjectWriter objectWriter = new ObjectMapper() + .writer(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter().withLinefeed("\n"))); + try { + this.jsonSchema = objectWriter.writeValueAsString(jsonNode); + } + catch (JsonProcessingException e) { + throw new RuntimeException("Could not pretty print json schema for " + this.clazz, e); + } + } + + @Override + /** + * Parses the given text to transform it to the desired target type. + * @param text The LLM output in string format. + * @return The parsed output in the desired target type. + */ + public T parse(String text) { + try { + // If the response is a JSON Schema, extract the properties and use them as + // the response. + text = this.jsonSchemaToInstance(text); + return (T) this.objectMapper.readValue(text, this.clazz); + } + catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Converts a JSON Schema to an instance based on a given text. + * @param text The JSON Schema in string format. + * @return The JSON instance generated from the JSON Schema, or the original text if + * the input is not a JSON Schema. + */ + private String jsonSchemaToInstance(String text) { + try { + Map map = this.objectMapper.readValue(text, Map.class); + if (map.containsKey("$schema")) { + return this.objectMapper.writeValueAsString(map.get("properties")); + } + } + catch (Exception e) { + } + return text; + } + + /** + * Configures and returns an object mapper for JSON operations. + * @return Configured object mapper. + */ + protected ObjectMapper getObjectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + return mapper; + } + + /** + * Provides the expected format of the response, instructing that it should adhere to + * the generated JSON schema. + * @return The instruction format string. + */ + @Override + public String getFormat() { + String template = """ + Your response should be in JSON format. + Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. + Do not include markdown code blocks in your response. + Here is the JSON Schema instance your output must adhere to: + ```%s``` + """; + return String.format(template, this.jsonSchema); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java new file mode 100644 index 0000000000..53d0017293 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java @@ -0,0 +1,33 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +/** + * Implementations of this interface provides instructions for how the output of a + * language generative should be formatted. + * + * @author Mark Pollack + */ +public interface FormatProvider { + + /** + * @return Returns a string containing instructions for how the output of a language + * generative should be formatted. + */ + String getFormat(); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java new file mode 100644 index 0000000000..1eb936eacf --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.parser; + +import org.springframework.core.convert.support.DefaultConversionService; + +import java.util.List; + +/** + * {@link OutputParser} implementation that uses a {@link DefaultConversionService} to + * convert the LLM output into a {@link List} instance. + * + * @author Mark Pollack + * @author Christian Tzolov + */ +public class ListOutputParser extends AbstractConversionServiceOutputParser> { + + public ListOutputParser(DefaultConversionService defaultConversionService) { + super(defaultConversionService); + } + + @Override + public String getFormat() { + return """ + Your response should be a list of comma separated values + eg: `foo, bar, baz` + """; + } + + @Override + public List parse(String text) { + return getConversionService().convert(text, List.class); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java new file mode 100644 index 0000000000..3aa217f2a4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +import org.springframework.messaging.Message; +import org.springframework.messaging.converter.MappingJackson2MessageConverter; +import org.springframework.messaging.support.MessageBuilder; + +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +/** + * {@link OutputParser} implementation that uses a pre-configured + * {@link MappingJackson2MessageConverter} to convert the LLM output into a + * java.util.Map<String, Object> instance. + * + * @author Mark Pollack + * @author Christian Tzolov + */ +public class MapOutputParser extends AbstractMessageConverterOutputParser> { + + public MapOutputParser() { + super(new MappingJackson2MessageConverter()); + } + + @Override + public Map parse(String text) { + Message message = MessageBuilder.withPayload(text.getBytes(StandardCharsets.UTF_8)).build(); + return (Map) getMessageConverter().fromMessage(message, HashMap.class); + } + + @Override + public String getFormat() { + String raw = """ + Your response should be in JSON format. + The data structure for the JSON should match this Java class: %s + Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. + """; + return String.format(raw, "java.util.HashMap"); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java new file mode 100644 index 0000000000..1543532b37 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java @@ -0,0 +1,30 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +/** + * Converts the (raw) LLM output into a structured responses of type. The + * {@link FormatProvider#getFormat()} method should provide the LLM prompt description of + * the desired format. + * + * @param Specifies the desired response type. + * @author Mark Pollack + * @author Christian Tzolov + */ +public interface OutputParser extends Parser, FormatProvider { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java new file mode 100644 index 0000000000..6016ee51c7 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.parser; + +@FunctionalInterface +public interface Parser { + + T parse(String text); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md new file mode 100644 index 0000000000..740e330f2c --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md @@ -0,0 +1,12 @@ +# Output Parsing + +* [Documentation](https://docs.spring.io/spring-ai/reference/concepts.html#_output_parsing) +* [Usage examples](https://github.com/spring-projects/spring-ai/blob/main/spring-ai-openai/src/test/java/org/springframework/ai/openai/client/ClientIT.java) + +The output of AI models traditionally arrives as a java.util.String, even if you ask for the reply to be in JSON. It may be the correct JSON, but it isn’t a JSON data structure. It is just a string. Also, asking "for JSON" as part of the prompt isn’t 100% accurate. + +This intricacy has led to the emergence of a specialized field involving the creation of prompts to yield the intended output, followed by parsing the resulting simple string into a usable data structure for application integration. + +Output parsing employs meticulously crafted prompts, often necessitating multiple interactions with the model to achieve the desired formatting. + +This challenge has prompted OpenAI to introduce 'OpenAI Functions' as a means to specify the desired output format from the model precisely. -- Gitee From 1828d1953ab15beb501720e2a066f7ce7d8f8069 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 12 Mar 2024 21:44:07 +0800 Subject: [PATCH 0047/1557] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=96=87=E5=BF=83?= =?UTF-8?q?=E4=B8=80=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/chatyiyan/YiYanApi.java | 97 ++++++++++ .../ai/chatyiyan/YiYanChatClient.java | 137 ++++++++++++++ .../ai/chatyiyan/YiYanChatModel.java | 35 ++++ .../ai/chatyiyan/api/YiYanAuthRes.java | 48 +++++ .../ai/chatyiyan/api/YiYanChatCompletion.java | 91 +++++++++ .../api/YiYanChatCompletionMessage.java | 8 + .../api/YiYanChatCompletionRequest.java | 176 ++++++++++++++++++ .../exception/YiYanApiException.java | 16 ++ 8 files changed, 608 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java new file mode 100644 index 0000000000..d22e8ffc94 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java @@ -0,0 +1,97 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan; + +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanAuthRes; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import lombok.Data; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * 文心一言 + *

+ * author: fansili + * time: 2024/3/8 21:47 + */ +@Data +public class YiYanApi { + + private static final String DEFAULT_BASE_URL = "https://aip.baidubce.com"; + + private static final String AUTH_2_TOKEN_URI = "/oauth/2.0/token"; + + public static final String DEFAULT_CHAT_MODEL = "ERNIE 4.0"; + + // 获取access_token流程 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5 + private String appKey; + private String secretKey; + private String token; + // token刷新时间(秒) + private int refreshTokenSecondTime; + // 发送请求 webClient + private final WebClient webClient; + // 使用的模型 + private YiYanChatModel useChatModel; + + public YiYanApi(String appKey, String secretKey, YiYanChatModel useChatModel, int refreshTokenSecondTime) { + this.appKey = appKey; + this.secretKey = secretKey; + this.useChatModel = useChatModel; + this.refreshTokenSecondTime = refreshTokenSecondTime; + + this.webClient = WebClient.builder() + .baseUrl(DEFAULT_BASE_URL) + .build(); + + token = getToken(); + } + + private String getToken() { + // 文档地址: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5 + ResponseEntity response = this.webClient.post() + .uri(uriBuilder -> uriBuilder.path(AUTH_2_TOKEN_URI) + .queryParam("grant_type", "client_credentials") + .queryParam("client_id", appKey) + .queryParam("client_secret", secretKey) + .build() + ) + .retrieve() + .toEntity(YiYanAuthRes.class) + .block(); + // 检查请求状态 + if (HttpStatusCode.valueOf(200) != response.getStatusCode()) { + throw new YiYanApiException("一言认证失败! api:https://aip.baidubce.com/oauth/2.0/token 请检查 client_id、client_secret 是否正确!"); + } + YiYanAuthRes body = response.getBody(); + return body.getAccess_token(); + } + + public ResponseEntity chatCompletionEntity(YiYanChatCompletionRequest request) { + // TODO: 2024/3/10 小范 这里错误信息返回的结构不一样 +// {"error_code":17,"error_msg":"Open api daily request limit reached"} + return this.webClient.post() + .uri(uriBuilder + -> uriBuilder.path(useChatModel.getUri()) + .queryParam("access_token", token) + .build()) + .body(Mono.just(request), YiYanChatCompletionRequest.class) + .retrieve() + .toEntity(YiYanChatCompletion.class) + .block(); + } + + public Flux chatCompletionStream(YiYanChatCompletionRequest request) { + return this.webClient.post() + .uri(uriBuilder + -> uriBuilder.path(useChatModel.getUri()) + .queryParam("access_token", token) + .build()) + .body(Mono.just(request), YiYanChatCompletionRequest.class) + .retrieve() + .bodyToFlux(YiYanChatCompletion.class); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java new file mode 100644 index 0000000000..fb7f155b48 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java @@ -0,0 +1,137 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan; + +import cn.iocoder.yudao.framework.ai.chat.ChatClient; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.Generation; +import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionMessage; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; +import cn.iocoder.yudao.framework.ai.model.function.FunctionCallbackContext; +import lombok.extern.slf4j.Slf4j; + +import org.springframework.http.ResponseEntity; +import org.springframework.retry.RetryCallback; +import org.springframework.retry.RetryContext; +import org.springframework.retry.RetryListener; +import org.springframework.retry.support.RetryTemplate; +import reactor.core.publisher.Flux; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; + +/** + * 文心一言 + * + * author: fansili + * time: 2024/3/8 19:11 + */ +@Slf4j +public class YiYanChatClient + extends AbstractFunctionCallSupport> + implements ChatClient, StreamingChatClient { + + private YiYanApi yiYanApi; + + public YiYanChatClient(YiYanApi yiYanApi) { + super(new FunctionCallbackContext()); + this.yiYanApi = yiYanApi; + } + + public final RetryTemplate retryTemplate = RetryTemplate.builder() + // 最大重试次数 10 + .maxAttempts(10) + .retryOn(YiYanApiException.class) + // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms + .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) + .withListener(new RetryListener() { + @Override + public void onError(RetryContext context, + RetryCallback callback, Throwable throwable) { + log.warn("重试异常:" + context.getRetryCount(), throwable); + }; + }) + .build(); + + @Override + public String call(String message) { + return ChatClient.super.call(message); + } + + @Override + public ChatResponse call(Prompt prompt) { + return this.retryTemplate.execute(ctx -> { + // ctx 会有重试的信息 + // 创建 request 请求,stream模式需要供应商支持 + YiYanChatCompletionRequest request = this.createRequest(prompt, false); + // 调用 callWithFunctionSupport 发送请求 + ResponseEntity response = this.callWithFunctionSupport(request); + // 获取结果封装 ChatResponse + YiYanChatCompletion chatCompletion = response.getBody(); + return new ChatResponse(List.of(new Generation(chatCompletion.getResult()))); + }); + } + + private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { + List messages = new ArrayList<>(); + List instructions = prompt.getInstructions(); + for (Message instruction : instructions) { + YiYanChatCompletionRequest.Message message = new YiYanChatCompletionRequest.Message(); + message.setContent(instruction.getContent()); + message.setRole(instruction.getMessageType().getValue()); + messages.add(message); + } + YiYanChatCompletionRequest request = new YiYanChatCompletionRequest(messages); + request.setStream(stream); + return request; + } + + @Override + public Flux stream(Prompt prompt) { + // ctx 会有重试的信息 + // 创建 request 请求,stream模式需要供应商支持 + YiYanChatCompletionRequest request = this.createRequest(prompt, true); + // 调用 callWithFunctionSupport 发送请求 + Flux response = this.yiYanApi.chatCompletionStream(request); +// response.subscribe(new Consumer() { +// @Override +// public void accept(YiYanChatCompletion chatCompletion) { +// // {"id":"as-p0nfjuuasg","object":"chat.completion","created":1710033402,"sentence_id":0,"is_end":false,"is_truncated":false,"result":"编程语","need_clear_history":false,"finish_reason":"normal","usage":{"prompt_tokens":5,"completion_tokens":0,"total_tokens":5}} +// System.err.println(chatCompletion); +// } +// }); + return response.map(res -> { + return new ChatResponse(List.of(new Generation(res.getResult()))); + }); + } + + @Override + protected YiYanChatCompletionRequest doCreateToolResponseRequest(YiYanChatCompletionRequest previousRequest, YiYanChatCompletionMessage responseMessage, List conversationHistory) { + return null; + } + + @Override + protected List doGetUserMessages(YiYanChatCompletionRequest request) { + return null; + } + + @Override + protected YiYanChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { + return null; + } + + @Override + protected ResponseEntity doChatCompletion(YiYanChatCompletionRequest request) { + return yiYanApi.chatCompletionEntity(request); + } + + @Override + protected boolean isToolFunctionCall(ResponseEntity response) { + return false; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java new file mode 100644 index 0000000000..77675430ea --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan; + +import lombok.Getter; + +/** + * 一言模型 + * + * 可参考百度文档:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t + * + * author: fansili + * time: 2024/3/9 12:01 + */ +@Getter +public enum YiYanChatModel { + + ERNIE4_0("ERNIE 4.0", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro"), + ERNIE4_3_5_8K("ERNIE-3.5-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions"), + ERNIE4_3_5_8K_0205("ERNIE-3.5-8K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-0205"), + + ERNIE4_3_5_8K_1222("ERNIE-3.5-8K-1222", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-1222"), + ERNIE4_BOT_8K("ERNIE-Bot-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie_bot_8k"), + ERNIE4_3_5_4K_0205("ERNIE-3.5-4K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-4k-0205"), + + ; + + YiYanChatModel(String value, String uri) { + this.value = value; + this.uri = uri; + } + + private String value; + + private String uri; + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java new file mode 100644 index 0000000000..e828858c23 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan.api; + +import lombok.Data; + +/** + * 一言 获取access_token + * + * author: fansili + * time: 2024/3/10 08:51 + */ +@Data +public class YiYanAuthRes { + + /** + * 访问凭证 + */ + private String access_token; + /** + * 有效期,Access Token的有效期。 + * 说明:单位是秒,有效期30天 + */ + private int expires_in; + /** + * 错误码,说明:响应失败时返回该字段,成功时不返回 + */ + private String error; + /** + * 错误描述信息,帮助理解和解决发生的错误 + * 说明:响应失败时返回该字段,成功时不返回 + */ + private String error_description; + /** + * 暂时未使用,可忽略 + */ + private String session_key; + /** + * 暂时未使用,可忽略 + */ + private String refresh_token; + /** + * 暂时未使用,可忽略 + */ + private String scope; + /** + * 暂时未使用,可忽略 + */ + private String session_secret; +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java new file mode 100644 index 0000000000..b995da82a2 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan.api; + +import lombok.Data; + +/** + * 聊天返回 + * 百度链接: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t + * + * author: fansili + * time: 2024/3/9 10:34 + */ +@Data +public class YiYanChatCompletion { + + /** + * 本轮对话的id + */ + private String id; + /** + * 回包类型,chat.completion:多轮对话返回 + */ + private String object; + /** + * 时间戳 + */ + private int created; + /** + * 表示当前子句的序号。只有在流式接口模式下会返回该字段 + */ + private int sentence_id; + /** + * 表示当前子句是否是最后一句。只有在流式接口模式下会返回该字段 + */ + private boolean is_end; + /** + * 当前生成的结果是否被截断 + */ + private boolean is_truncated; + /** + * 输出内容标识,说明: + * · normal:输出内容完全由大模型生成,未触发截断、替换 + * · stop:输出结果命中入参stop中指定的字段后被截断 + * · length:达到了最大的token数,根据EB返回结果is_truncated来截断 + * · content_filter:输出内容被截断、兜底、替换为**等 + */ + private String finish_reason; + /** + * 搜索数据,当请求参数enable_citation为true并且触发搜索时,会返回该字段 + */ + private String search_info; + /** + * 对话返回结果 + */ + private String result; + /** + * 表示用户输入是否存在安全,是否关闭当前会话,清理历史会话信息 + * true:是,表示用户输入存在安全风险,建议关闭当前会话,清理历史会话信息 + * false:否,表示用户输入无安全风险 + */ + private boolean need_clear_history; + /** + * 说明: + * · 0:正常返回 + * · 其他:非正常 + */ + private int flag; + /** + * 当need_clear_history为true时,此字段会告知第几轮对话有敏感信息,如果是当前问题,ban_round=-1 + */ + private int ban_round; + /** + * token统计信息 + */ + private Usage usage; + + @Data + public static class Usage { + /** + * 问题tokens数 + */ + private int prompt_tokens; + /** + * 回答tokens数 + */ + private int completion_tokens; + /** + * tokens总数 + */ + private int total_tokens; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java new file mode 100644 index 0000000000..ce6259c76d --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan.api; + +/** + * author: fansili + * time: 2024/3/9 10:37 + */ +public class YiYanChatCompletionMessage { +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java new file mode 100644 index 0000000000..8c80d55f74 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java @@ -0,0 +1,176 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan.api; + +import lombok.Data; + +import java.util.List; + +/** + * 一言 Completion req + * + * 百度千帆文档:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11 + * + * author: fansili + * time: 2024/3/9 10:34 + */ +@Data +public class YiYanChatCompletionRequest { + + public YiYanChatCompletionRequest(List messages) { + this.messages = messages; + } + + /** + * 聊天上下文信息。 + * 必填:是 + */ + private List messages; + /** + * 一个可触发函数的描述列表,说明: + * (1)支持的function数量无限制 + * (2)长度限制,最后一个message的content长度(即此轮对话的问题)、functions和system字段总内容不能超过20480 个字符,且不能超过5120 tokens + * 必填:否 + */ + private List functions; + /** + * 说明: + * (1)较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定 + * (2)默认0.8,范围 (0, 1.0],不能为0 + * 必填:否 + */ + private String temperature; + /** + * 说明: + * (1)影响输出文本的多样性,取值越大,生成文本的多样性越强 + * (2)默认0.8,取值范围 [0, 1.0] + * 必填:否 + */ + private String top_p; + /** + * 通过对已生成的token增加惩罚,减少重复生成的现象。说明: + * (1)值越大表示惩罚越大 + * (2)默认1.0,取值范围:[1.0, 2.0] + * + * 必填:否 + */ + private String penalty_score; + /** + * 是否以流式接口的形式返回数据,默认false + * 必填:否 + */ + private Boolean stream; + /** + * 模型人设,主要用于人设设定,例如,你是xxx公司制作的AI助手,说明: + * (1)长度限制,最后一个message的content长度(即此轮对话的问题)、functions和system字段总内容不能超过20480 个字符,且不能超过5120 tokens + * (2)如果同时使用system和functions,可能暂无法保证使用效果,持续进行优化 + * 必填:否 + */ + private String system; + /** + * 生成停止标识,当模型生成结果以stop中某个元素结尾时,停止文本生成。说明: + * (1)每个元素长度不超过20字符 + * (2)最多4个元素 + * 必填:否 + */ + private String stop; + /** + * 是否强制关闭实时搜索功能,默认false,表示不关闭 + * 必填:否 + */ + private Boolean disable_search; + /** + * 是否开启上角标返回,说明: + * (1)开启后,有概率触发搜索溯源信息search_info,search_info内容见响应参数介绍 + * (2)默认false,不开启 + * 必填:否 + */ + private Boolean enable_citation; + /** + * 指定模型最大输出token数,范围[2, 2048] + * 必填:否 + */ + private Integer max_output_tokens; + /** + * 指定响应内容的格式,说明: + * (1)可选值: + * · json_object:以json格式返回,可能出现不满足效果情况 + * · text:以文本格式返回 + * (2)如果不填写参数response_format值,默认为text + * 必填:否 + */ + private String response_format; + /** + * 表示最终用户的唯一标识符 + * 必填:否 + */ + private String user_id; + /** + * 在函数调用场景下,提示大模型选择指定的函数(非强制),说明:指定的函数名必须在functions中存在 + * 必填:否 + */ + private String tool_choice; + + + @Data + public static class Message { + private String role; + + private String content; + } + + @Data + public static class ToolChoice { + /** + * 指定工具类型,function + * 必填: 是 + */ + private String type; + /** + * 指定要使用的函数 + * 必填: 是 + */ + private Function function; + /** + * 指定要使用的函数名 + * 必填: 是 + */ + private String name; + } + + @Data + public static class Function { + /** + * 函数名 + * 必填: 是 + */ + private String name; + /** + * 函数描述 + * 必填: 是 + */ + private String description; + /** + * 函数请求参数,说明: + * (1)JSON Schema 格式,参考JSON Schema描述 + * (2)如果函数没有请求参数,parameters值格式如下: + * {"type": "object","properties": {}} + * 必填: 是 + */ + private String parameters; + /** + * 函数响应参数,JSON Schema 格式,参考JSON Schema描述 + * 必填: 否 + */ + private String responses; + /** + * function调用的一些历史示例,说明: + * (1)可以提供正例(正常触发)和反例(无需触发)的example + * ·正例:从历史请求数据中获取 + * ·反例: + * 当role = user,不会触发请求的query + * 当role = assistant,有固定的格式。function_call的name为空,arguments是空对象:"{}",thought可以填固定的:"我不需要调用任何工具" + * (2)兼容之前的 List(example) 格式 + */ + private String examples; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java new file mode 100644 index 0000000000..dbb8ed93a5 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan.exception; + +/** + * 一言 api 调用异常 + */ +public class YiYanApiException extends RuntimeException { + + public YiYanApiException(String message) { + super(message); + } + + public YiYanApiException(String message, Throwable cause) { + super(message, cause); + } + +} \ No newline at end of file -- Gitee From de32611794f0ec3282109dcc8d799b37ab8d3a7c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 13 Mar 2024 20:51:53 +0800 Subject: [PATCH 0048/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=AF=E9=A3=9E?= =?UTF-8?q?=E6=98=9F=E7=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/pom.xml | 1 + .../yudao-spring-boot-starter-ai/pom.xml | 8 + .../framework/ai/chatxinghuo/XingHuoApi.java | 154 ++++++++++++++++++ .../ai/chatxinghuo/XingHuoChatClient.java | 130 +++++++++++++++ .../ai/chatxinghuo/XingHuoChatModel.java | 44 +++++ .../api/XingHuoChatCompletion.java | 48 ++++++ .../api/XingHuoChatCompletionMessage.java | 8 + .../api/XingHuoChatCompletionRequest.java | 92 +++++++++++ .../exception/XingHuoApiException.java | 14 ++ .../ai/chat/XingHuoChatClientMainTests.java | 117 +++++++++++++ .../ai/chat/XingHuoChatClientTests.java | 56 +++++++ .../framework/ai/chat/XingHuoOkHttpTests.java | 130 +++++++++++++++ .../framework/ai/chat/YiYanChatTests.java | 54 ++++++ .../yudao/framework/ai/package-info.java | 5 + 14 files changed, 861 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/package-info.java diff --git a/yudao-module-ai/pom.xml b/yudao-module-ai/pom.xml index aaba1191d6..d7241b3ecb 100644 --- a/yudao-module-ai/pom.xml +++ b/yudao-module-ai/pom.xml @@ -14,6 +14,7 @@ yudao-module-ai-api yudao-module-ai-biz + yudao-spring-boot-starter-ai diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 8ca4bccc38..862f7fe8dd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -100,6 +100,14 @@ 4.12.0 test + + io.projectreactor.netty + reactor-netty + + + cn.hutool + hutool-all + \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java new file mode 100644 index 0000000000..58c21349bc --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java @@ -0,0 +1,154 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo; + +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import lombok.Data; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.net.URI; +import java.nio.charset.Charset; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 讯飞星火 属性、api + *

+ * 文档地址:https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E + *

+ * author: fansili + * time: 2024/3/11 10:12 + */ +@Data +public class XingHuoApi { + + private static final String DEFAULT_BASE_URL = "wss://spark-api.xf-yun.com"; + + private String appId; + private String appKey; + private String secretKey; + private WebClient webClient; + private XingHuoChatModel useChatModel; + // 创建 WebSocketClient 实例 + private ReactorNettyWebSocketClient socketClient = new ReactorNettyWebSocketClient(); + + public XingHuoApi(String appId, String appKey, String secretKey, XingHuoChatModel useChatModel) { + this.appId = appId; + this.appKey = appKey; + this.secretKey = secretKey; + this.useChatModel = useChatModel; + + } + + public ResponseEntity chatCompletionEntity(XingHuoChatCompletionRequest request) { + String authUrl; + try { + authUrl = getAuthorizationUrl("spark-api.xf-yun.com", useChatModel.getUri()); + } catch (NoSuchAlgorithmException | InvalidKeyException e) { + throw new RuntimeException(e); + } + // wss 请求的 URI + URI uri = URI.create(authUrl); + // 发起 wss 请求并处理响应 + Flux messageFlux = Flux.create(sink -> { + socketClient.execute(uri, session -> + session.send(Mono.just(session.textMessage(JSONUtil.toJsonStr(request)))) + .thenMany(session.receive() + .map(WebSocketMessage -> { + return JSONUtil.toBean(WebSocketMessage.getPayloadAsText(), XingHuoChatCompletion.class); + }) + .doOnNext(sink::next) // 将接收到的消息推送到 Flux 中 + .doOnError(sink::error) // 处理错误 + .doOnTerminate(sink::complete)) // 完成时关闭 sink + .then()) + .subscribe(); // 订阅以开始会话 + }); + // 阻塞获取所有结果 + List responseList = messageFlux.collectList().block(); + // 拼接 content + String responseContent = responseList.stream().map(item -> { + // 获取 content + return item.getPayload().getChoices().getText().stream().map(XingHuoChatCompletion.Text::getContent).collect(Collectors.joining()); + }).collect(Collectors.joining()); + // 将多个合并成一个 + XingHuoChatCompletion xingHuoChatCompletion = new XingHuoChatCompletion(); + xingHuoChatCompletion.setPayload(new XingHuoChatCompletion.Payload().setChoices(new XingHuoChatCompletion.Choices().setText(List.of(new XingHuoChatCompletion.Text().setContent(responseContent))))); + return new ResponseEntity<>(xingHuoChatCompletion, HttpStatusCode.valueOf(200)); + } + + + /** + * 获取验证请求url + * + * @return + */ + public String getAuthorizationUrl(String host, String path) throws NoSuchAlgorithmException, InvalidKeyException { + // 获取鉴权时间 date + SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + format.setTimeZone(TimeZone.getTimeZone("GMT")); + String date = format.format(new Date()); + + // 获取signature_origin字段 + StringBuilder builder = new StringBuilder("host: ").append(host).append("\n"). + append("date: ").append(date).append("\n"). + append("GET ").append(path).append(" HTTP/1.1"); + + // 获得signatue + Charset charset = Charset.forName("UTF-8"); + Mac mac = Mac.getInstance("hmacsha256"); + SecretKeySpec sp = new SecretKeySpec(secretKey.getBytes(charset), "hmacsha256"); + mac.init(sp); + byte[] basebefore = mac.doFinal(builder.toString().getBytes(charset)); + String signature = Base64.getEncoder().encodeToString(basebefore); + //获得 authorization_origin + String authorization_origin = String.format("api_key=\"%s\",algorithm=\"%s\",headers=\"%s\",signature=\"%s\"", appKey, "hmac-sha256", "host date request-line", signature); + //获得authorization + String authorization = Base64.getEncoder().encodeToString(authorization_origin.getBytes(charset)); + // 获取httpUrl + Map param = new HashMap<>(); + param.put("authorization", authorization); + param.put("date", date); + param.put("host", host); + + String toParams = HttpUtil.toParams(param); + return "wss://" + host + path + "?" + toParams; + } + + public Flux chatCompletionStream(XingHuoChatCompletionRequest request) { + String authUrl; + try { + authUrl = getAuthorizationUrl("spark-api.xf-yun.com", useChatModel.getUri()); + } catch (NoSuchAlgorithmException | InvalidKeyException e) { + throw new RuntimeException(e); + } + System.err.println(authUrl); + System.err.println(JSONUtil.toJsonPrettyStr(request)); + // wss 请求的 URI + URI uri = URI.create(authUrl); + // 发起 wss 请求并处理响应 + // 创建一个 Flux 来处理接收到的消息 + Flux messageFlux = Flux.create(sink -> { + socketClient.execute(uri, session -> + session.send(Mono.just(session.textMessage(JSONUtil.toJsonStr(request)))) + .thenMany(session.receive() + .map(WebSocketMessage -> JSONUtil.toBean(WebSocketMessage.getPayloadAsText(), XingHuoChatCompletion.class)) + .doOnNext(sink::next) // 将接收到的消息推送到 Flux 中 + .doOnError(sink::error) // 处理错误 + .doOnTerminate(sink::complete)) // 完成时关闭 sink + .then()) + .subscribe(); // 订阅以开始会话 + }); + return messageFlux; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java new file mode 100644 index 0000000000..a750e1c8f4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java @@ -0,0 +1,130 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo; + +import cn.iocoder.yudao.framework.ai.chat.ChatClient; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.Generation; +import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionMessage; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.chatxinghuo.exception.XingHuoApiException; +import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ResponseEntity; +import org.springframework.retry.RetryCallback; +import org.springframework.retry.RetryContext; +import org.springframework.retry.RetryListener; +import org.springframework.retry.support.RetryTemplate; +import reactor.core.publisher.Flux; + +import java.time.Duration; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 讯飞星火 client + *

+ * author: fansili + * time: 2024/3/11 10:19 + */ +@Slf4j +public class XingHuoChatClient extends AbstractFunctionCallSupport> + implements ChatClient, StreamingChatClient { + + private XingHuoApi xingHuoApi; + + public final RetryTemplate retryTemplate = RetryTemplate.builder() + // 最大重试次数 10 + .maxAttempts(10) + .retryOn(XingHuoApiException.class) + // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms + .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) + .withListener(new RetryListener() { + @Override + public void onError(RetryContext context, + RetryCallback callback, Throwable throwable) { + log.warn("重试异常:" + context.getRetryCount(), throwable); + } + + ; + }) + .build(); + + public XingHuoChatClient(XingHuoApi xingHuoApi) { + super(null); + this.xingHuoApi = xingHuoApi; + } + + @Override + public ChatResponse call(Prompt prompt) { + + return this.retryTemplate.execute(ctx -> { + // ctx 会有重试的信息 + // 创建 request 请求,stream模式需要供应商支持 + XingHuoChatCompletionRequest request = this.createRequest(prompt, false); + // 调用 callWithFunctionSupport 发送请求 + ResponseEntity response = this.callWithFunctionSupport(request); + // 获取结果封装 ChatResponse + return new ChatResponse(List.of(new Generation(response.getBody().getPayload().getChoices().getText().get(0).getContent()))); + }); + } + + private XingHuoChatCompletionRequest createRequest(Prompt prompt, boolean b) { + // 创建 header + XingHuoChatCompletionRequest.Header header = new XingHuoChatCompletionRequest.Header().setApp_id(xingHuoApi.getAppId()); + // 创建 params + XingHuoChatCompletionRequest.Parameter parameter = new XingHuoChatCompletionRequest.Parameter() + .setChat(new XingHuoChatCompletionRequest.Parameter.Chat().setDomain(xingHuoApi.getUseChatModel().getValue())); + // 创建 payload text 信息 + XingHuoChatCompletionRequest.Payload.Message.Text text = new XingHuoChatCompletionRequest.Payload.Message.Text(); + text.setRole(XingHuoChatCompletionRequest.Payload.Message.Text.Role.USER.getName()); + text.setContent(prompt.getContents()); + // 创建 payload + XingHuoChatCompletionRequest.Payload payload = new XingHuoChatCompletionRequest.Payload() + .setMessage(new XingHuoChatCompletionRequest.Payload.Message().setText(List.of(text))); + // 创建 request + return new XingHuoChatCompletionRequest() + .setHeader(header) + .setParameter(parameter) + .setPayload(payload); + } + + @Override + public Flux stream(Prompt prompt) { + // 创建 request 请求,stream模式需要供应商支持 + XingHuoChatCompletionRequest request = this.createRequest(prompt, false); + // 发送请求 + Flux response = this.xingHuoApi.chatCompletionStream(request); + return response.map(res -> { + String content = res.getPayload().getChoices().getText().stream() + .map(item -> item.getContent()).collect(Collectors.joining()); + return new ChatResponse(List.of(new Generation(content))); + }); + } + + @Override + protected XingHuoChatCompletionRequest doCreateToolResponseRequest(XingHuoChatCompletionRequest previousRequest, XingHuoChatCompletionMessage responseMessage, List conversationHistory) { + return null; + } + + @Override + protected List doGetUserMessages(XingHuoChatCompletionRequest request) { + return null; + } + + @Override + protected XingHuoChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { + return null; + } + + @Override + protected ResponseEntity doChatCompletion(XingHuoChatCompletionRequest request) { + return xingHuoApi.chatCompletionEntity(request); + } + + @Override + protected boolean isToolFunctionCall(ResponseEntity response) { + return false; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java new file mode 100644 index 0000000000..e00a622b08 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo; + +import lombok.Getter; + +/** + * 讯飞星火 模型 + * + * 文档地址:https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E + * + * 1tokens 约等于1.5个中文汉字 或者 0.8个英文单词 + * 星火V1.5支持[搜索]内置插件;星火V2.0、V3.0和V3.5支持[搜索]、[天气]、[日期]、[诗词]、[字词]、[股票]六个内置插件 + * 星火V3.5 现已支持system、Function Call 功能。 + * + * author: fansili + * time: 2024/3/11 10:12 + */ +@Getter +public enum XingHuoChatModel { + +// 文档地址:https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E +// general指向V1.5版本; +// generalv2指向V2版本; +// generalv3指向V3版本; +// generalv3.5指向V3.5版本; + + XING_HUO_1_5("星火大模型1.5", "general", "/v1.1/chat"), + XING_HUO_2_0("星火大模型2.0", "generalv2", "/v2.1/chat"), + XING_HUO_3_0("星火大模型3.0", "generalv3", "/v3.1/chat"), + XING_HUO_3_5("星火大模型3.5", "generalv3.5", "/v3.5/chat"), + + ; + + XingHuoChatModel(String name, String value, String uri) { + this.name = name; + this.value = value; + this.uri = uri; + } + + private String name; + + private String value; + + private String uri; +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java new file mode 100644 index 0000000000..a0f9653270 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo.api; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * author: fansili + * time: 2024/3/11 10:20 + */ +@Data +@Accessors(chain = true) +public class XingHuoChatCompletion { + private Header header; + private Payload payload; + + @Data + @Accessors(chain = true) + public static class Header { + private int code; + private String message; + private String sid; + private int status; + } + + @Data + @Accessors(chain = true) + public static class Payload { + private Choices choices; + } + + @Data + @Accessors(chain = true) + public static class Choices { + private int status; + private int seq; + private List text; + } + + @Data + @Accessors(chain = true) + public static class Text { + private String content; + private String role; + private int index; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java new file mode 100644 index 0000000000..faa3c8c737 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo.api; + +/** + * author: fansili + * time: 2024/3/11 10:20 + */ +public class XingHuoChatCompletionMessage { +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java new file mode 100644 index 0000000000..009789cb30 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java @@ -0,0 +1,92 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo.api; + +import lombok.Data; +import lombok.Getter; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 讯飞星火 request + * + * author: fansili + * time: 2024/3/11 10:20 + */ +@Data +@Accessors(chain = true) +public class XingHuoChatCompletionRequest { + + private Header header; + private Parameter parameter; + private Payload payload; + + @Data + @Accessors(chain = true) + public static class Header { + private String app_id; + private String uid; + } + + @Data + @Accessors(chain = true) + public static class Parameter { + private Chat chat; + + @Data + @Accessors(chain = true) + public static class Chat { + /** + * https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E + * + * 指定访问的领域: + * general指向V1.5版本; + * generalv2指向V2版本; + * generalv3指向V3版本; + * generalv3.5指向V3.5版本; + * 注意:不同的取值对应的url也不一样! + */ + private String domain = "general"; + private Double temperature = 0.5; + private Integer max_tokens = 2048; + } + } + + @Data + @Accessors(chain = true) + public static class Payload { + private Message message; + + @Data + @Accessors(chain = true) + public static class Message { + private List text; + + + @Data + @Accessors(chain = true) + public static class Text { + /** + * 角色 + */ + private String role; + /** + * 消息内容 + */ + private String content; + private Integer index; + + @Getter + public static enum Role { + SYSTEM("system"), + USER("user"), + ASSISTANT("assistant"); + private String name; + + private Role(String name) { + this.name = name; + } + } + } + } + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java new file mode 100644 index 0000000000..cde6147c70 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo.exception; + +/** + * 讯飞星火 exception + * + * author: fansili + * time: 2024/3/11 10:22 + */ +public class XingHuoApiException extends RuntimeException { + + public XingHuoApiException(String message) { + super(message); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java new file mode 100644 index 0000000000..674e4dc6d0 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java @@ -0,0 +1,117 @@ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; +import org.springframework.web.reactive.socket.client.WebSocketClient; +import reactor.core.publisher.Flux; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.net.MalformedURLException; +import java.net.URI; +import java.nio.charset.Charset; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * author: fansili + * time: 2024/3/13 20:47 + */ +public class XingHuoChatClientMainTests { + + + private static final String HOST_URL = "http://spark-api.xf-yun.com/v3.5/chat"; + private static final String API_KEY = "cb6415c19d6162cda07b47316fcb0416"; + private static final String API_SECRET = "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh"; + + public static void main(String[] args) throws MalformedURLException, NoSuchAlgorithmException, InvalidKeyException { + String authUrl = getAuthorizationUrl("spark-api.xf-yun.com", "/v3.5/chat"); + System.err.println(authUrl); + + XingHuoChatCompletionRequest.Header header = new XingHuoChatCompletionRequest.Header().setApp_id("13c8cca6"); + XingHuoChatCompletionRequest.Parameter parameter + = new XingHuoChatCompletionRequest.Parameter() + .setChat(new XingHuoChatCompletionRequest.Parameter.Chat().setDomain("generalv3.5")); + + + XingHuoChatCompletionRequest.Payload.Message.Text text = new XingHuoChatCompletionRequest.Payload.Message.Text(); + text.setRole(XingHuoChatCompletionRequest.Payload.Message.Text.Role.USER.getName()); + text.setContent("世界上最好的开发语言是什么?"); + XingHuoChatCompletionRequest.Payload payload = new XingHuoChatCompletionRequest.Payload() + .setMessage(new XingHuoChatCompletionRequest.Payload.Message().setText(List.of(text))); + XingHuoChatCompletionRequest request = new XingHuoChatCompletionRequest() + .setHeader(header) + .setParameter(parameter) + .setPayload(payload); + + System.err.println(JSONUtil.toJsonPrettyStr(request)); + + + // 创建 WebSocketClient 实例 + WebSocketClient client = new ReactorNettyWebSocketClient(); + + // wss 请求的 URI + URI uri = URI.create(authUrl); + + // 发起 wss 请求并处理响应 + client.execute(uri, session -> + // 使用会话发送消息,并接收回应 + session.send(Flux.just(session.textMessage(JSONUtil.toJsonStr(request)))) + .thenMany(session.receive() + .map(WebSocketMessage -> { + System.err.println(WebSocketMessage.getPayloadAsText()); + return JSONUtil.toBean(WebSocketMessage.getPayloadAsText(), XingHuoChatCompletion.class); + }) + .log()) // 打印接收到的消息 + .then()) + .block(); // 等待操作完成或超时 + + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } + + + /** + * 获取验证请求url + * + * @return + */ + public static String getAuthorizationUrl(String host, String path) throws NoSuchAlgorithmException, InvalidKeyException { + // 获取鉴权时间 date + SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + format.setTimeZone(TimeZone.getTimeZone("GMT")); + String date = format.format(new Date()); + + // 获取signature_origin字段 + StringBuilder builder = new StringBuilder("host: ").append(host).append("\n"). + append("date: ").append(date).append("\n"). + append("GET ").append(path).append(" HTTP/1.1"); + + // 获得signatue + Charset charset = Charset.forName("UTF-8"); + Mac mac = Mac.getInstance("hmacsha256"); + SecretKeySpec sp = new SecretKeySpec(API_SECRET.getBytes(charset), "hmacsha256"); + mac.init(sp); + byte[] basebefore = mac.doFinal(builder.toString().getBytes(charset)); + String signature = Base64.getEncoder().encodeToString(basebefore); + //获得 authorization_origin + String authorization_origin = String.format("api_key=\"%s\",algorithm=\"%s\",headers=\"%s\",signature=\"%s\"", API_KEY, "hmac-sha256", "host date request-line", signature); + //获得authorization + String authorization = Base64.getEncoder().encodeToString(authorization_origin.getBytes(charset)); + // 获取httpUrl + Map param = new HashMap<>(); + param.put("authorization", authorization); + param.put("date", date); + param.put("host", host); + + String toParams = HttpUtil.toParams(param); + return "wss://" + host + path + "?" + toParams; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java new file mode 100644 index 0000000000..da8bc9d5d1 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoApi; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; +import org.junit.Before; +import org.junit.Test; +import reactor.core.publisher.Flux; + +import java.util.Scanner; +import java.util.function.Consumer; + +/** + * 讯飞星火 tests + *

+ * author: fansili + * time: 2024/3/11 11:00 + */ +public class XingHuoChatClientTests { + + private XingHuoChatClient xingHuoChatClient; + + @Before + public void setup() { + // 初始化 xingHuoChatClient + xingHuoChatClient = new XingHuoChatClient( + new XingHuoApi( + "13c8cca6", + "cb6415c19d6162cda07b47316fcb0416", + "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh", + XingHuoChatModel.XING_HUO_3_5 + ) + ); + } + + @Test + public void callTest() { + ChatResponse call = xingHuoChatClient.call(new Prompt("java和go那个性能更好!")); + System.err.println(call.getResult()); + } + + @Test + public void streamTest() { + Flux stream = xingHuoChatClient.stream(new Prompt("java和go那个性能更好!")); + stream.subscribe(new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + System.err.print(chatResponse.getResult().getOutput().getContent()); + } + }); + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java new file mode 100644 index 0000000000..3f29032013 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java @@ -0,0 +1,130 @@ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import okhttp3.*; +import org.jetbrains.annotations.NotNull; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.net.MalformedURLException; +import java.nio.charset.Charset; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * 讯飞星火 tests + *

+ * author: fansili + * time: 2024/3/11 11:00 + */ +public class XingHuoOkHttpTests { + + private static final String HOST_URL = "http://spark-api.xf-yun.com/v3.5/chat"; + private static final String API_KEY = "cb6415c19d6162cda07b47316fcb0416"; + private static final String API_SECRET = "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh"; + + private XingHuoChatClient xingHuoChatClient; + + public static void main(String[] args) throws MalformedURLException, NoSuchAlgorithmException, InvalidKeyException { + String authUrl = getAuthorizationUrl("spark-api.xf-yun.com", "/v3.5/chat"); + System.err.println(authUrl); + + XingHuoChatCompletionRequest.Header header = new XingHuoChatCompletionRequest.Header().setApp_id("13c8cca6"); + XingHuoChatCompletionRequest.Parameter parameter + = new XingHuoChatCompletionRequest.Parameter() + .setChat(new XingHuoChatCompletionRequest.Parameter.Chat().setDomain("generalv3.5")); + + + XingHuoChatCompletionRequest.Payload.Message.Text text = new XingHuoChatCompletionRequest.Payload.Message.Text(); + text.setRole(XingHuoChatCompletionRequest.Payload.Message.Text.Role.USER.getName()); + text.setContent("世界上最好的开发语言是什么?"); + XingHuoChatCompletionRequest.Payload payload = new XingHuoChatCompletionRequest.Payload() + .setMessage(new XingHuoChatCompletionRequest.Payload.Message().setText(List.of(text))); + XingHuoChatCompletionRequest request = new XingHuoChatCompletionRequest() + .setHeader(header) + .setParameter(parameter) + .setPayload(payload); + + System.err.println(JSONUtil.toJsonPrettyStr(request)); + + OkHttpClient client = new OkHttpClient(); + Request request2 = new Request.Builder() + .url(authUrl) // 替换为你的 wss URL + .build(); + + WebSocketListener webSocketListener = new WebSocketListener() { + + @Override + public void onOpen(@NotNull WebSocket webSocket, @NotNull Response response) { + boolean send = webSocket.send(JSONUtil.toJsonStr(request)); + System.err.println("发送 -> " + send); + System.err.println("链接成功!"); + } + + @Override + public void onMessage(@NotNull WebSocket webSocket, @NotNull String text) { + super.onMessage(webSocket, text); +// System.err.println(text); + XingHuoChatCompletion response = JSONUtil.toBean(text, XingHuoChatCompletion.class); + for (XingHuoChatCompletion.Text text1 : response.getPayload().getChoices().getText()) { + System.err.print(text1.getContent()); + } + } + }; + + WebSocket webSocket = client.newWebSocket(request2, webSocketListener); +// webSocket.send(JSONUtil.toJsonStr(request)); + + + // Trigger shutdown of the dispatcher's executor so this process can exit cleanly. + client.dispatcher().executorService().shutdown(); + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } + + + /** + * 获取验证请求url + * + * @return + */ + public static String getAuthorizationUrl(String host, String path) throws NoSuchAlgorithmException, InvalidKeyException { + // 获取鉴权时间 date + SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + format.setTimeZone(TimeZone.getTimeZone("GMT")); + String date = format.format(new Date()); + + // 获取signature_origin字段 + StringBuilder builder = new StringBuilder("host: ").append(host).append("\n"). + append("date: ").append(date).append("\n"). + append("GET ").append(path).append(" HTTP/1.1"); + + // 获得signatue + Charset charset = Charset.forName("UTF-8"); + Mac mac = Mac.getInstance("hmacsha256"); + SecretKeySpec sp = new SecretKeySpec(API_SECRET.getBytes(charset), "hmacsha256"); + mac.init(sp); + byte[] basebefore = mac.doFinal(builder.toString().getBytes(charset)); + String signature = Base64.getEncoder().encodeToString(basebefore); + //获得 authorization_origin + String authorization_origin = String.format("api_key=\"%s\",algorithm=\"%s\",headers=\"%s\",signature=\"%s\"", API_KEY, "hmac-sha256", "host date request-line", signature); + //获得authorization + String authorization = Base64.getEncoder().encodeToString(authorization_origin.getBytes(charset)); + // 获取httpUrl + Map param = new HashMap<>(); + param.put("authorization", authorization); + param.put("date", date); + param.put("host", host); + + String toParams = HttpUtil.toParams(param); + return "wss://" + host + path + "?" + toParams; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java new file mode 100644 index 0000000000..346ffedb14 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanApi; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; +import org.junit.Before; +import org.junit.Test; +import reactor.core.publisher.Flux; + +import java.util.Scanner; +import java.util.function.Consumer; + +/** + * chat 文心一言 + * + * author: fansili + * time: 2024/3/12 20:59 + */ +public class YiYanChatTests { + + private YiYanChatClient yiYanChatClient; + + @Before + public void setup() { + YiYanApi yiYanApi = new YiYanApi( + "x0cuLZ7XsaTCU08vuJWO87Lg", + "R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK", + YiYanChatModel.ERNIE4_3_5_8K, + 86400 + ); + yiYanChatClient = new YiYanChatClient(yiYanApi); + } + + @Test + public void callTest() { + ChatResponse call = yiYanChatClient.call(new Prompt("什么编程语言最好?")); + System.err.println(call.getResult()); + } + + @Test + public void streamTest() { + Flux fluxResponse = yiYanChatClient.stream(new Prompt("用java帮我写一个快排算法?")); + fluxResponse.subscribe(new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + System.err.print(chatResponse.getResult().getOutput().getContent()); + } + }); + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/package-info.java new file mode 100644 index 0000000000..1678ee0ae8 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/12 21:03 + */ +package cn.iocoder.yudao.framework.ai; \ No newline at end of file -- Gitee From cdbcd4d673d491ad5203b8cdb05b00919deda6c9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 13 Mar 2024 21:18:07 +0800 Subject: [PATCH 0049/1557] =?UTF-8?q?BPM=EF=BC=9A=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=BA=BA=E7=9A=84=E5=88=86=E9=85=8D=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=AE=9E=E7=8E=B0=EF=BC=8C=E7=A7=BB=E9=99=A4=20bpm=5F?= =?UTF-8?q?task=5Fassign=5Frule=20=E8=A1=A8=EF=BC=8C=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E5=9C=A8=20bpmn=20=E7=9A=84=20userTask=20=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/util/number/NumberUtils.java | 4 + .../common/util/string/StrUtils.java | 6 + .../module/bpm/enums/ErrorCodeConstants.java | 2 +- .../candidate/vo/BpmTaskCandidateRuleVO.java | 3 - .../BpmTaskAssignRuleController.java | 58 ---- .../vo/rule/BpmTaskAssignRuleBaseVO.java | 24 -- .../vo/rule/BpmTaskAssignRuleCreateReqVO.java | 24 -- .../vo/rule/BpmTaskAssignRuleRespVO.java | 28 -- .../vo/rule/BpmTaskAssignRuleUpdateReqVO.java | 20 -- .../definition/BpmTaskAssignRuleConvert.java | 40 --- .../definition/BpmTaskAssignRuleDO.java | 83 ------ .../definition/BpmTaskAssignRuleMapper.java | 37 --- .../definition/BpmModelServiceImpl.java | 24 +- .../BpmProcessDefinitionServiceImpl.java | 16 +- .../definition/BpmTaskAssignRuleService.java | 71 +---- .../BpmTaskAssignRuleServiceImpl.java | 256 +++++------------- .../definition/BpmUserGroupService.java | 11 +- .../definition/BpmUserGroupServiceImpl.java | 16 +- .../flowable/core/util/BpmnModelUtils.java | 11 + 19 files changed, 110 insertions(+), 624 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmTaskAssignRuleConvert.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskAssignRuleDO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmTaskAssignRuleMapper.java diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/number/NumberUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/number/NumberUtils.java index ea131e86e4..c928e2fcfd 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/number/NumberUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/number/NumberUtils.java @@ -16,6 +16,10 @@ public class NumberUtils { return StrUtil.isNotEmpty(str) ? Long.valueOf(str) : null; } + public static Integer parseInt(String str) { + return StrUtil.isNotEmpty(str) ? Integer.valueOf(str) : null; + } + /** * 通过经纬度获取地球上两点之间的距离 * diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java index 08cea833f1..c434b2577f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; import java.util.Arrays; import java.util.Collection; import java.util.List; +import java.util.Set; import java.util.stream.Collectors; /** @@ -45,6 +46,11 @@ public class StrUtils { return Arrays.stream(longs).boxed().collect(Collectors.toList()); } + public static Set splitToLongSet(String value, CharSequence separator) { + long[] longs = StrUtil.splitToLong(value, separator); + return Arrays.stream(longs).boxed().collect(Collectors.toSet()); + } + public static List splitToInteger(String value, CharSequence separator) { int[] integers = StrUtil.splitToInt(value, separator); return Arrays.stream(integers).boxed().collect(Collectors.toList()); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 51eebda236..646841b348 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -27,7 +27,7 @@ public interface ErrorCodeConstants { ErrorCode MODEL_KEY_VALID = new ErrorCode(1_009_002_002, "流程标识格式不正确,需要以字母或下划线开头,后接任意字母、数字、中划线、下划线、句点!"); ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1_009_002_003, "部署流程失败,原因:流程表单未配置,请点击【修改流程】按钮进行配置"); ErrorCode MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败," + - "原因:用户任务({})未配置分配规则,请点击【修改流程】按钮进行配置"); + "原因:用户任务({})未配置审批人,请点击【流程设计】按钮,选择该它的【任务(审批人)】进行配置"); ErrorCode MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS = new ErrorCode(1_009_003_005, "流程定义部署失败,原因:信息未发生变化"); // ========== 流程定义 1-009-003-000 ========== diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java index 25426f6047..62b1dff1cc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleBaseVO; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -10,8 +9,6 @@ import java.util.Set; /** * 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - * - * @see BpmTaskAssignRuleBaseVO */ @Data public class BpmTaskCandidateRuleVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java deleted file mode 100644 index 3c7e404de7..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java +++ /dev/null @@ -1,58 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; -import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.Operation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.annotation.Resource; -import jakarta.validation.Valid; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - 任务分配规则") -@RestController -@RequestMapping("/bpm/task-assign-rule") -@Validated -public class BpmTaskAssignRuleController { - - @Resource - private BpmTaskAssignRuleService taskAssignRuleService; - - @GetMapping("/list") - @Operation(summary = "获得任务分配规则列表") - @Parameters({ - @Parameter(name = "modelId", description = "模型编号", example = "1024"), - @Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048") - }) - @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") - public CommonResult> getTaskAssignRuleList( - @RequestParam(value = "modelId", required = false) String modelId, - @RequestParam(value = "processDefinitionId", required = false) String processDefinitionId) { - return success(taskAssignRuleService.getTaskAssignRuleList(modelId, processDefinitionId)); - } - - @PostMapping("/create") - @Operation(summary = "创建任务分配规则") - @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") - public CommonResult createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { - return success(taskAssignRuleService.createTaskAssignRule(reqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新任务分配规则") - @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") - public CommonResult updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { - taskAssignRuleService.updateTaskAssignRule(reqVO); - return success(true); - } -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java deleted file mode 100644 index 1521abc8e0..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotNull; -import java.util.Set; - -/** - * 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -@Data -public class BpmTaskAssignRuleBaseVO { - - @Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type") - @NotNull(message = "规则类型不能为空") - private Integer type; - - @Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") - @NotNull(message = "规则值数组不能为空") - private Set options; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java deleted file mode 100644 index 90e6b7e33e..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import jakarta.validation.constraints.NotEmpty; - -@Schema(description = "管理后台 - 流程任务分配规则的创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { - - @Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotEmpty(message = "流程模型的编号不能为空") - private String modelId; - - @Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") - @NotEmpty(message = "流程任务定义的编号不能为空") - private String taskDefinitionKey; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java deleted file mode 100644 index ac4f85e789..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@Schema(description = "管理后台 - 流程任务分配规则的 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { - - @Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private Long id; - - @Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") - private String modelId; - - @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") - private String processDefinitionId; - - @Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") - private String taskDefinitionKey; - @Schema(description = "流程任务定义的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "关注芋道") - private String taskDefinitionName; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java deleted file mode 100644 index 7d13cc07ad..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import jakarta.validation.constraints.NotNull; - -@Schema(description = "管理后台 - 流程任务分配规则的更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { - - @Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "任务分配规则的编号不能为空") - private Long id; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmTaskAssignRuleConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmTaskAssignRuleConvert.java deleted file mode 100644 index c616e90b09..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmTaskAssignRuleConvert.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.definition; - -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; -import org.flowable.bpmn.model.UserTask; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; -import java.util.Map; - -@Mapper -public interface BpmTaskAssignRuleConvert { - BpmTaskAssignRuleConvert INSTANCE = Mappers.getMapper(BpmTaskAssignRuleConvert.class); - - default List convertList(List tasks, List rules) { - Map ruleMap = CollectionUtils.convertMap(rules, BpmTaskAssignRuleDO::getTaskDefinitionKey); - // 以 UserTask 为主维度,原因是:流程图编辑后,一些规则实际就没用了。 - return CollectionUtils.convertList(tasks, task -> { - BpmTaskAssignRuleRespVO respVO = convert(ruleMap.get(task.getId())); - if (respVO == null) { - respVO = new BpmTaskAssignRuleRespVO(); - respVO.setTaskDefinitionKey(task.getId()); - } - respVO.setTaskDefinitionName(task.getName()); - return respVO; - }); - } - - BpmTaskAssignRuleRespVO convert(BpmTaskAssignRuleDO bean); - - BpmTaskAssignRuleDO convert(BpmTaskAssignRuleCreateReqVO bean); - - BpmTaskAssignRuleDO convert(BpmTaskAssignRuleUpdateReqVO bean); - - List convertList2(List list); -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskAssignRuleDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskAssignRuleDO.java deleted file mode 100644 index e65764f1a8..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskAssignRuleDO.java +++ /dev/null @@ -1,83 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.*; - -import java.util.Set; - -/** - * Bpm 任务分配的规则表,用于自定义配置每个任务的负责人、候选人的分配规则。 - * 也就是说,废弃 BPMN 原本的 UserTask 设置的 assignee、candidateUsers 等配置,而是通过使用该规则进行计算对应的负责人。 - * - * 1. 默认情况下,{@link #processDefinitionId} 为 {@link #PROCESS_DEFINITION_ID_NULL} 值,表示贵改则与流程模型关联 - * 2. 在流程模型部署后,会将他的所有规则记录,复制出一份新部署出来的流程定义,通过设置 {@link #processDefinitionId} 为新的流程定义的编号进行关联 - * - * @author 芋道源码 - */ -@TableName(value = "bpm_task_assign_rule", autoResultMap = true) -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class BpmTaskAssignRuleDO extends BaseDO { - - /** - * {@link #processDefinitionId} 空串,用于标识属于流程模型,而不属于流程定义 - */ - public static final String PROCESS_DEFINITION_ID_NULL = ""; - - /** - * 编号 - */ - @TableId - private Long id; - - /** - * 流程模型编号 - * - * 关联 Model 的 id 属性 - */ - private String modelId; - /** - * 流程定义编号 - * - * 关联 ProcessDefinition 的 id 属性 - */ - private String processDefinitionId; - /** - * 流程任务的定义 Key - * - * 关联 Task 的 taskDefinitionKey 属性 - */ - private String taskDefinitionKey; - - /** - * 规则类型 - * - * 枚举 {@link BpmTaskAssignRuleTypeEnum} - */ - @TableField("`type`") - private Integer type; - /** - * 规则值数组,一般关联指定表的编号 - * 根据 type 不同,对应的值是不同的: - * - * 1. {@link BpmTaskAssignRuleTypeEnum#ROLE} 时:角色编号 - * 2. {@link BpmTaskAssignRuleTypeEnum#DEPT_MEMBER} 时:部门编号 - * 3. {@link BpmTaskAssignRuleTypeEnum#DEPT_LEADER} 时:部门编号 - * 4. {@link BpmTaskAssignRuleTypeEnum#USER} 时:用户编号 - * 5. {@link BpmTaskAssignRuleTypeEnum#USER_GROUP} 时:用户组编号 - * 6. {@link BpmTaskAssignRuleTypeEnum#SCRIPT} 时:脚本编号,目前通过 {@link BpmTaskRuleScriptEnum#getId()} 标识 - */ - @TableField(typeHandler = JsonLongSetTypeHandler.class) - private Set options; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmTaskAssignRuleMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmTaskAssignRuleMapper.java deleted file mode 100644 index c4061c0f88..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmTaskAssignRuleMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.mysql.definition; - -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.lang.Nullable; - -import java.util.List; - -@Mapper -public interface BpmTaskAssignRuleMapper extends BaseMapperX { - - default List selectListByProcessDefinitionId(String processDefinitionId, - @Nullable String taskDefinitionKey) { - return selectList(new QueryWrapperX() - .eq("process_definition_id", processDefinitionId) - .eqIfPresent("task_definition_key", taskDefinitionKey)); - } - - default List selectListByModelId(String modelId) { - return selectList(new QueryWrapperX() - .eq("model_id", modelId) - .eq("process_definition_id", BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL)); - } - - default BpmTaskAssignRuleDO selectListByModelIdAndTaskDefinitionKey(String modelId, - String taskDefinitionKey) { - return selectOne(new QueryWrapperX() - .eq("model_id", modelId) - .eq("process_definition_id", BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL) - .eq("task_definition_key", taskDefinitionKey)); - } - - - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 08f8acf6bd..7012fa9f80 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; +import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; @@ -17,10 +17,8 @@ import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCr import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; -import org.flowable.common.engine.impl.util.io.BytesStreamSource; import org.flowable.engine.RepositoryService; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Model; @@ -168,15 +166,13 @@ public class BpmModelServiceImpl implements BpmModelService { // 1.3 校验表单已配 BpmFormDO form = checkFormConfig(model.getMetaInfo()); // 1.4 校验任务分配规则已配置 - taskAssignRuleService.checkTaskAssignRuleAllConfig(id); + taskAssignRuleService.checkTaskAssignRuleAllConfig(bpmnBytes); // 1.5 校验模型是否发生修改。如果未修改,则不允许创建 - BpmProcessDefinitionCreateReqDTO definitionCreateReqDTO = BpmModelConvert.INSTANCE.convert2(model, form).setBpmnBytes(bpmnBytes); + BpmProcessDefinitionCreateReqDTO definitionCreateReqDTO = BpmModelConvert.INSTANCE.convert2(model, form) + .setBpmnBytes(bpmnBytes); if (processDefinitionService.isProcessDefinitionEquals(definitionCreateReqDTO)) { // 流程定义的信息相等 - ProcessDefinition oldProcessDefinition = processDefinitionService.getProcessDefinitionByDeploymentId(model.getDeploymentId()); - if (oldProcessDefinition != null && taskAssignRuleService.isTaskAssignRulesEquals(model.getId(), oldProcessDefinition.getId())) { - throw exception(MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS); - } + throw exception(MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS); } // 2.1 创建流程定义 @@ -189,12 +185,8 @@ public class BpmModelServiceImpl implements BpmModelService { ProcessDefinition definition = processDefinitionService.getProcessDefinition(definitionId); model.setDeploymentId(definition.getDeploymentId()); repositoryService.saveModel(model); - - // 2.4 复制任务分配规则 - taskAssignRuleService.copyTaskAssignRules(id, definition.getId()); } - @Override @Transactional(rollbackFor = Exception.class) public void deleteModel(String id) { @@ -229,11 +221,7 @@ public class BpmModelServiceImpl implements BpmModelService { @Override public BpmnModel getBpmnModel(String id) { byte[] bpmnBytes = repositoryService.getModelEditorSource(id); - if (ArrayUtil.isEmpty(bpmnBytes)) { - return null; - } - BpmnXMLConverter converter = new BpmnXMLConverter(); - return converter.convertToBpmnModel(new BytesStreamSource(bpmnBytes), true, true); + return BpmnModelUtils.getBpmnModel(bpmnBytes); } @Override diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index c9b3872cdc..dd5f035a9d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -23,7 +23,6 @@ import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; -import org.flowable.common.engine.impl.util.io.BytesStreamSource; import org.flowable.engine.RepositoryService; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; @@ -124,6 +123,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ .key(createReqDTO.getKey()).name(createReqDTO.getName()).category(createReqDTO.getCategory()) .addBytes(createReqDTO.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes()) .tenantId(TenantContextHolder.getTenantIdStr()) + .disableSchemaValidation() // 禁用 XML Schema 验证,因为有自定义的属性 .deploy(); // 设置 ProcessDefinition 的 category 分类 @@ -197,7 +197,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ return false; } // 校验 BPMN XML 信息 - BpmnModel newModel = buildBpmnModel(createReqDTO.getBpmnBytes()); + BpmnModel newModel = BpmnModelUtils.getBpmnModel(createReqDTO.getBpmnBytes()); BpmnModel oldModel = getBpmnModel(oldProcessDefinition.getId()); // 对比字节变化 if (!BpmnModelUtils.equals(oldModel, newModel)) { @@ -207,18 +207,6 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ return true; } - /** - * 构建对应的 BPMN Model - * - * @param bpmnBytes 原始的 BPMN XML 字节数组 - * @return BPMN Model - */ - private BpmnModel buildBpmnModel(byte[] bpmnBytes) { - // 转换成 BpmnModel 对象 - BpmnXMLConverter converter = new BpmnXMLConverter(); - return converter.convertToBpmnModel(new BytesStreamSource(bpmnBytes), true, true); - } - @Override public BpmProcessDefinitionExtDO getProcessDefinitionExt(String id) { return processDefinitionMapper.selectByProcessDefinitionId(id); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java index 47cf2c0ed2..012141adf9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java @@ -1,14 +1,7 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.lang.Nullable; -import jakarta.validation.Valid; -import java.util.List; import java.util.Set; /** @@ -18,73 +11,13 @@ import java.util.Set; */ public interface BpmTaskAssignRuleService { - /** - * 获得流程定义的任务分配规则数组 - * - * @param processDefinitionId 流程定义的编号 - * @param taskDefinitionKey 流程任务定义的 Key。允许空 - * @return 任务规则数组 - */ - List getTaskAssignRuleListByProcessDefinitionId(String processDefinitionId, - @Nullable String taskDefinitionKey); - - /** - * 获得流程模型的任务规则数组 - * - * @param modelId 流程模型的编号 - * @return 任务规则数组 - */ - List getTaskAssignRuleListByModelId(String modelId); - - /** - * 获得流程定义的任务分配规则数组 - * - * @param modelId 流程模型的编号 - * @param processDefinitionId 流程定义的编号 - * @return 任务规则数组 - */ - List getTaskAssignRuleList(String modelId, String processDefinitionId); - - /** - * 创建任务分配规则 - * - * @param reqVO 创建信息 - * @return 规则编号 - */ - Long createTaskAssignRule(@Valid BpmTaskAssignRuleCreateReqVO reqVO); - - /** - * 更新任务分配规则 - * - * @param reqVO 创建信息 - */ - void updateTaskAssignRule(@Valid BpmTaskAssignRuleUpdateReqVO reqVO); - - /** - * 判断指定流程模型和流程定义的分配规则是否相等 - * - * @param modelId 流程模型编号 - * @param processDefinitionId 流程定义编号 - * @return 是否相等 - */ - boolean isTaskAssignRulesEquals(String modelId, String processDefinitionId); - - /** - * 将流程流程模型的任务分配规则,复制一份给流程定义 - * 目的:每次流程模型部署时,都会生成一个新的流程定义,此时考虑到每次部署的流程不可变性,所以需要复制一份给该流程定义 - * - * @param fromModelId 流程模型编号 - * @param toProcessDefinitionId 流程定义编号 - */ - void copyTaskAssignRules(String fromModelId, String toProcessDefinitionId); - /** * 校验流程模型的任务分配规则全部都配置了 * 目的:如果有规则未配置,会导致流程任务找不到负责人,进而流程无法进行下去! * - * @param id 流程模型编号 + * @param bpmnBytes BPMN XML */ - void checkTaskAssignRuleAllConfig(String id); + void checkTaskAssignRuleAllConfig(byte[] bpmnBytes); /** * 计算当前执行任务的处理人 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java index e035be070c..b7bab57534 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java @@ -1,20 +1,16 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; +import cn.iocoder.yudao.framework.common.util.string.StrUtils; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; +import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmTaskAssignRuleConvert; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmTaskAssignRuleMapper; import cn.iocoder.yudao.module.bpm.enums.DictTypeConstants; import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; @@ -28,17 +24,16 @@ import cn.iocoder.yudao.module.system.api.permission.RoleApi; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import com.google.common.annotations.VisibleForTesting; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.UserTask; -import org.flowable.common.engine.api.FlowableException; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import java.util.*; import java.util.function.Function; @@ -46,7 +41,6 @@ import static cn.hutool.core.text.CharSequenceUtil.format; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** @@ -58,15 +52,11 @@ import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { @Resource - private BpmTaskAssignRuleMapper taskRuleMapper; - @Resource - @Lazy // 解决循环依赖 - private BpmModelService modelService; + private BpmUserGroupService userGroupService; @Resource @Lazy // 解决循环依赖 - private BpmProcessDefinitionService processDefinitionService; - @Resource - private BpmUserGroupService userGroupService; + private BpmProcessInstanceService processInstanceService; + @Resource private RoleApi roleApi; @Resource @@ -79,9 +69,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { private DictDataApi dictDataApi; @Resource private PermissionApi permissionApi; - @Resource - @Lazy // 解决循环依赖 - private BpmProcessInstanceService processInstanceService; + /** * 任务分配脚本 */ @@ -93,130 +81,23 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { } @Override - public List getTaskAssignRuleListByProcessDefinitionId(String processDefinitionId, - String taskDefinitionKey) { - return taskRuleMapper.selectListByProcessDefinitionId(processDefinitionId, taskDefinitionKey); - } - - @Override - public List getTaskAssignRuleListByModelId(String modelId) { - return taskRuleMapper.selectListByModelId(modelId); - } - - @Override - public List getTaskAssignRuleList(String modelId, String processDefinitionId) { - // 获得规则 - List rules = Collections.emptyList(); - BpmnModel model = null; - if (StrUtil.isNotEmpty(modelId)) { - rules = getTaskAssignRuleListByModelId(modelId); - model = modelService.getBpmnModel(modelId); - } else if (StrUtil.isNotEmpty(processDefinitionId)) { - rules = getTaskAssignRuleListByProcessDefinitionId(processDefinitionId, null); - model = processDefinitionService.getBpmnModel(processDefinitionId); - } - if (model == null) { - return Collections.emptyList(); - } - // 获得用户任务,只有用户任务才可以设置分配规则 - List userTasks = BpmnModelUtils.getBpmnModelElements(model, UserTask.class); - if (CollUtil.isEmpty(userTasks)) { - return Collections.emptyList(); - } - // 转换数据 - return BpmTaskAssignRuleConvert.INSTANCE.convertList(userTasks, rules); - } - - @Override - public Long createTaskAssignRule(@Valid BpmTaskAssignRuleCreateReqVO reqVO) { - // 校验参数 - validTaskAssignRuleOptions(reqVO.getType(), reqVO.getOptions()); - // 校验是否已经配置 - BpmTaskAssignRuleDO existRule = - taskRuleMapper.selectListByModelIdAndTaskDefinitionKey(reqVO.getModelId(), reqVO.getTaskDefinitionKey()); - if (existRule != null) { - throw exception(TASK_ASSIGN_RULE_EXISTS, reqVO.getModelId(), reqVO.getTaskDefinitionKey()); - } - - // 存储 - BpmTaskAssignRuleDO rule = BpmTaskAssignRuleConvert.INSTANCE.convert(reqVO) - .setProcessDefinitionId(BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL); // 只有流程模型,才允许新建 - taskRuleMapper.insert(rule); - return rule.getId(); - } - - @Override - public void updateTaskAssignRule(@Valid BpmTaskAssignRuleUpdateReqVO reqVO) { - // 校验参数 - validTaskAssignRuleOptions(reqVO.getType(), reqVO.getOptions()); - // 校验是否存在 - BpmTaskAssignRuleDO existRule = taskRuleMapper.selectById(reqVO.getId()); - if (existRule == null) { - throw exception(TASK_ASSIGN_RULE_NOT_EXISTS); - } - // 只允许修改流程模型的规则 - if (!Objects.equals(BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL, existRule.getProcessDefinitionId())) { - throw exception(TASK_UPDATE_FAIL_NOT_MODEL); - } - - // 执行更新 - taskRuleMapper.updateById(BpmTaskAssignRuleConvert.INSTANCE.convert(reqVO)); - } - - @Override - public boolean isTaskAssignRulesEquals(String modelId, String processDefinitionId) { - // 调用 VO 接口的原因是,过滤掉流程模型不需要的规则,保持和 copyTaskAssignRules 方法的一致性 - List modelRules = getTaskAssignRuleList(modelId, null); - List processInstanceRules = getTaskAssignRuleList(null, processDefinitionId); - if (modelRules.size() != processInstanceRules.size()) { - return false; - } - - // 遍历,匹配对应的规则 - Map processInstanceRuleMap = - CollectionUtils.convertMap(processInstanceRules, BpmTaskAssignRuleRespVO::getTaskDefinitionKey); - for (BpmTaskAssignRuleRespVO modelRule : modelRules) { - BpmTaskAssignRuleRespVO processInstanceRule = processInstanceRuleMap.get(modelRule.getTaskDefinitionKey()); - if (processInstanceRule == null) { - return false; - } - if (!ObjectUtil.equals(modelRule.getType(), processInstanceRule.getType()) || !ObjectUtil.equal( - modelRule.getOptions(), processInstanceRule.getOptions())) { - return false; - } - } - return true; - } - - @Override - public void copyTaskAssignRules(String fromModelId, String toProcessDefinitionId) { - List rules = getTaskAssignRuleList(fromModelId, null); - if (CollUtil.isEmpty(rules)) { - return; - } - // 开始复制 - List newRules = BpmTaskAssignRuleConvert.INSTANCE.convertList2(rules); - newRules.forEach(rule -> rule.setProcessDefinitionId(toProcessDefinitionId).setId(null).setCreateTime(null) - .setUpdateTime(null)); - taskRuleMapper.insertBatch(newRules); - } - - @Override - public void checkTaskAssignRuleAllConfig(String id) { - // 一个用户任务都没配置,所以无需配置规则 - List taskAssignRules = getTaskAssignRuleList(id, null); - if (CollUtil.isEmpty(taskAssignRules)) { - return; - } - // 校验未配置规则的任务 - taskAssignRules.forEach(rule -> { - if (CollUtil.isEmpty(rule.getOptions())) { - throw exception(MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG, rule.getTaskDefinitionName()); + public void checkTaskAssignRuleAllConfig(byte[] bpmnBytes) { + BpmnModel bpmnModel = BpmnModelUtils.getBpmnModel(bpmnBytes); + assert bpmnModel != null; + List userTaskList = BpmnModelUtils.getBpmnModelElements(bpmnModel, UserTask.class); + // 遍历所有的 UserTask,校验审批人配置 + userTaskList.forEach(userTask -> { + // TODO 芋艿:assignType/assignOptions/, 枚举 + Integer type = NumberUtils.parseInt(userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignType")); + String options = userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"); + if (type == null || StrUtil.isBlank(options)) { + throw exception(MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG, userTask.getName()); } + validTaskAssignRuleOptions(type, StrUtils.splitToLong(options, ",")); }); } - private void validTaskAssignRuleOptions(Integer type, Set options) { + private void validTaskAssignRuleOptions(Integer type, Collection options) { if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.ROLE.getType())) { roleApi.validRoleList(options); } else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), @@ -247,92 +128,83 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { return convertSet(assignee, Function.identity()); } // 2. 通过分配规则,计算审批人 - BpmTaskAssignRuleDO rule = getTaskRule(execution); - return calculateTaskCandidateUsers(execution, rule); + return calculateTaskCandidateUsers0(execution); } @VisibleForTesting - BpmTaskAssignRuleDO getTaskRule(DelegateExecution execution) { - List taskRules = getTaskAssignRuleListByProcessDefinitionId( - execution.getProcessDefinitionId(), execution.getCurrentActivityId()); - if (CollUtil.isEmpty(taskRules)) { - throw new FlowableException(format("流程任务({}/{}/{}) 找不到符合的任务规则", - execution.getId(), execution.getProcessDefinitionId(), execution.getCurrentActivityId())); - } - if (taskRules.size() > 1) { - throw new FlowableException(format("流程任务({}/{}/{}) 找到过多任务规则({})", - execution.getId(), execution.getProcessDefinitionId(), execution.getCurrentActivityId())); - } - return taskRules.get(0); - } - - @VisibleForTesting - Set calculateTaskCandidateUsers(DelegateExecution execution, BpmTaskAssignRuleDO rule) { + Set calculateTaskCandidateUsers0(DelegateExecution execution) { + // 获得审批人配置 + // TODO 芋艿:assignType/assignOptions/, 枚举 + FlowElement flowElement = execution.getCurrentFlowElement(); + Integer type = NumberUtils.parseInt(flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignType")); + Set options = StrUtils.splitToLongSet(flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"), ","); + + // 计算审批人 Set assigneeUserIds = null; - if (Objects.equals(BpmTaskAssignRuleTypeEnum.ROLE.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByRole(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByDeptMember(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByDeptLeader(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.POST.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByPost(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByUser(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByUserGroup(rule); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.SCRIPT.getType(), rule.getType())) { - assigneeUserIds = calculateTaskCandidateUsersByScript(execution, rule); + if (Objects.equals(BpmTaskAssignRuleTypeEnum.ROLE.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByRole(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByDeptMember(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByDeptLeader(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.POST.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByPost(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByUser(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByUserGroup(options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.SCRIPT.getType(), type)) { + assigneeUserIds = calculateTaskCandidateUsersByScript(execution, options); } // 移除被禁用的用户 removeDisableUsers(assigneeUserIds); // 如果候选人为空,抛出异常 if (CollUtil.isEmpty(assigneeUserIds)) { - log.error("[calculateTaskCandidateUsers][流程任务({}/{}/{}) 任务规则({}) 找不到候选人]", execution.getId(), - execution.getProcessDefinitionId(), execution.getCurrentActivityId(), toJsonString(rule)); + log.error("[calculateTaskCandidateUsers][流程任务({}/{}/{}) 任务规则({}/{}) 找不到候选人]", execution.getId(), + execution.getProcessDefinitionId(), execution.getCurrentActivityId(), type, options); throw exception(TASK_CREATE_FAIL_NO_CANDIDATE_USER); } return assigneeUserIds; } - private Set calculateTaskCandidateUsersByRole(BpmTaskAssignRuleDO rule) { - return permissionApi.getUserRoleIdListByRoleIds(rule.getOptions()); + private Set calculateTaskCandidateUsersByRole(Set roleIds) { + return permissionApi.getUserRoleIdListByRoleIds(roleIds); } - private Set calculateTaskCandidateUsersByDeptMember(BpmTaskAssignRuleDO rule) { - List users = adminUserApi.getUserListByDeptIds(rule.getOptions()); + private Set calculateTaskCandidateUsersByDeptMember(Set deptIds) { + List users = adminUserApi.getUserListByDeptIds(deptIds); return convertSet(users, AdminUserRespDTO::getId); } - private Set calculateTaskCandidateUsersByDeptLeader(BpmTaskAssignRuleDO rule) { - List depts = deptApi.getDeptList(rule.getOptions()); + private Set calculateTaskCandidateUsersByDeptLeader(Set deptIds) { + List depts = deptApi.getDeptList(deptIds); return convertSet(depts, DeptRespDTO::getLeaderUserId); } - private Set calculateTaskCandidateUsersByPost(BpmTaskAssignRuleDO rule) { - List users = adminUserApi.getUserListByPostIds(rule.getOptions()); + private Set calculateTaskCandidateUsersByPost(Set postIds) { + List users = adminUserApi.getUserListByPostIds(postIds); return convertSet(users, AdminUserRespDTO::getId); } - private Set calculateTaskCandidateUsersByUser(BpmTaskAssignRuleDO rule) { - return rule.getOptions(); + private Set calculateTaskCandidateUsersByUser(Set userIds) { + return userIds; } - private Set calculateTaskCandidateUsersByUserGroup(BpmTaskAssignRuleDO rule) { - List userGroups = userGroupService.getUserGroupList(rule.getOptions()); + private Set calculateTaskCandidateUsersByUserGroup(Set groupIds) { + List userGroups = userGroupService.getUserGroupList(groupIds); Set userIds = new HashSet<>(); userGroups.forEach(group -> userIds.addAll(group.getMemberUserIds())); return userIds; } - private Set calculateTaskCandidateUsersByScript(DelegateExecution execution, BpmTaskAssignRuleDO rule) { + private Set calculateTaskCandidateUsersByScript(DelegateExecution execution, Set scriptIds) { // 获得对应的脚本 - List scripts = new ArrayList<>(rule.getOptions().size()); - rule.getOptions().forEach(id -> { - BpmTaskAssignScript script = scriptMap.get(id); + List scripts = new ArrayList<>(scriptIds.size()); + scriptIds.forEach(scriptId -> { + BpmTaskAssignScript script = scriptMap.get(scriptId); if (script == null) { - throw exception(TASK_ASSIGN_SCRIPT_NOT_EXISTS, id); + throw exception(TASK_ASSIGN_SCRIPT_NOT_EXISTS, scriptId); } scripts.add(script); }); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java index 2ce14a2013..6ae6e06ca5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java @@ -1,13 +1,14 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import java.util.*; -import jakarta.validation.*; - +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; +import jakarta.validation.Valid; + +import java.util.Collection; +import java.util.List; /** * 用户组 Service 接口 @@ -77,6 +78,6 @@ public interface BpmUserGroupService { * * @param ids 用户组编号数组 */ - void validUserGroups(Set ids); + void validUserGroups(Collection ids); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java index d41ae4c14d..2690787614 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmUserGroupMapper; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_IS_DISABLE; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS; /** * 用户组 Service 实现类 @@ -89,7 +89,7 @@ public class BpmUserGroupServiceImpl implements BpmUserGroupService { } @Override - public void validUserGroups(Set ids) { + public void validUserGroups(Collection ids) { if (CollUtil.isEmpty(ids)) { return; } diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java index 7b23a467a0..6de30aa94f 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ArrayUtil; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; +import org.flowable.common.engine.impl.util.io.BytesStreamSource; import java.util.*; @@ -91,6 +93,15 @@ public class BpmnModelUtils { return converter.convertToXML(model); } + public static BpmnModel getBpmnModel(byte[] bpmnBytes) { + if (ArrayUtil.isEmpty(bpmnBytes)) { + return null; + } + BpmnXMLConverter converter = new BpmnXMLConverter(); + // 补充说明:由于在 Flowable 中自定义了属性,所以 validateSchema 传递 false + return converter.convertToBpmnModel(new BytesStreamSource(bpmnBytes), false, false); + } + // ========== 遍历相关的方法 ========== /** -- Gitee From 797fddfb3d495303378a4798d7934086cdedc9ae Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 14 Mar 2024 12:54:16 +0800 Subject: [PATCH 0050/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E=20flow?= =?UTF-8?q?able=20expression=20=E8=A1=A8=E8=BE=BE=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=E7=8E=B0=E6=9C=89=20BpmTaskAssignScript?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E5=8A=A0=E7=81=B5=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmTaskAssignRuleTypeEnum.java | 2 + .../behavior/script/BpmTaskAssignScript.java | 2 + .../BpmTaskAssignLeaderAbstractScript.java | 1 + .../impl/BpmTaskAssignLeaderX1Script.java | 1 + .../impl/BpmTaskAssignLeaderX2Script.java | 1 + .../impl/BpmTaskAssignStartUserScript.java | 1 + .../core/handler/MultiInstanceHandler.java | 76 ------------------- .../definition/BpmModelServiceImpl.java | 7 +- .../BpmTaskAssignRuleServiceImpl.java | 27 ++++++- .../core/enums/BpmnModelConstants.java | 5 -- .../flowable/core/util/FlowableUtils.java | 16 ++++ yudao-server/pom.xml | 10 +-- 12 files changed, 59 insertions(+), 90 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/handler/MultiInstanceHandler.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java index b7ccc7ae82..d220da7468 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java @@ -18,7 +18,9 @@ public enum BpmTaskAssignRuleTypeEnum { POST(22, "岗位"), USER(30, "用户"), USER_GROUP(40, "用户组"), + @Deprecated SCRIPT(50, "自定义脚本"), // 例如说,发起人所在部门的领导、发起人所在部门的领导的领导 + EXPRESS(60, "流程表达式"), // 表达式 ExpressionManager ; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java index b5c91ebad8..c390590481 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java @@ -14,6 +14,7 @@ import java.util.Set; * * @author 芋道源码 */ +@Deprecated public interface BpmTaskAssignScript { /** @@ -30,5 +31,6 @@ public interface BpmTaskAssignScript { * @return 枚举值 */ BpmTaskRuleScriptEnum getEnum(); + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java index 9ef7d3b30c..22ef4cde7b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java @@ -24,6 +24,7 @@ import static java.util.Collections.emptySet; * * @author 芋道源码 */ +@Deprecated public abstract class BpmTaskAssignLeaderAbstractScript implements BpmTaskAssignScript { @Resource diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java index af7d8b5a74..9c31970f76 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java @@ -11,6 +11,7 @@ import java.util.Set; * * @author 芋道源码 */ +@Deprecated @Component public class BpmTaskAssignLeaderX1Script extends BpmTaskAssignLeaderAbstractScript { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java index 068ab3d2f3..9355451008 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java @@ -11,6 +11,7 @@ import java.util.Set; * * @author 芋道源码 */ +@Deprecated @Component public class BpmTaskAssignLeaderX2Script extends BpmTaskAssignLeaderAbstractScript { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java index 8f4c2c2659..0329aec6a1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java @@ -18,6 +18,7 @@ import java.util.Set; * * @author 芋道源码 */ +@Deprecated @Component public class BpmTaskAssignStartUserScript implements BpmTaskAssignScript { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/handler/MultiInstanceHandler.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/handler/MultiInstanceHandler.java deleted file mode 100644 index ee81a9cf46..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/handler/MultiInstanceHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.handler; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; -import lombok.AllArgsConstructor; -import org.flowable.bpmn.model.FlowElement; -import org.flowable.bpmn.model.UserTask; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; - -// TODO @芋艿:bpmn 分配人融合时,需要搞下这块; -/** - * 多实例处理类 - */ -@AllArgsConstructor -@Component("multiInstanceHandler") -public class MultiInstanceHandler { - - @Resource - private AdminUserApi userApi; - - @Resource - private PermissionApi permissionApi; - - /** - * 流程发起人那种情况不需要处理, - * 由 flowable 完成 - * - * @param execution flowable的执行对象 - * @return 用户ID - */ - public Set getUserIds(DelegateExecution execution) { - Set candidateUserIds = new LinkedHashSet<>(); - FlowElement flowElement = execution.getCurrentFlowElement(); - if (ObjectUtil.isNotEmpty(flowElement) && flowElement instanceof UserTask userTask) { - String dataType = userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, BpmnModelConstants.PROCESS_CUSTOM_DATA_TYPE); - if ("USERS".equals(dataType) && CollUtil.isNotEmpty(userTask.getCandidateUsers())) { - // 添加候选用户id - candidateUserIds.addAll(userTask.getCandidateUsers()); - } else if (CollUtil.isNotEmpty(userTask.getCandidateGroups())) { - // 获取组的ID,角色ID集合或部门ID集合 - List groups = userTask.getCandidateGroups().stream() - // 例如部门DEPT100,100才是部门id - .map(item -> Long.parseLong(item.substring(4))) - .collect(Collectors.toList()); - List userIds = new ArrayList<>(); - if ("ROLES".equals(dataType)) { - // 通过角色id,获取所有用户id集合 - Set userRoleIdListByRoleIds = permissionApi.getUserRoleIdListByRoleIds(groups); - userIds = new ArrayList<>(userRoleIdListByRoleIds); - } else if ("DEPTS".equals(dataType)) { - // 通过部门id,获取所有用户id集合 - List userListByDeptIds = userApi.getUserListByDeptIds(groups); - userIds = convertList(userListByDeptIds, AdminUserRespDTO::getId); - } - // 添加候选用户id - userIds.forEach(id -> candidateUserIds.add(String.valueOf(id))); - } - } - return candidateUserIds; - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 7012fa9f80..00ba49de4c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -171,9 +171,10 @@ public class BpmModelServiceImpl implements BpmModelService { // 1.5 校验模型是否发生修改。如果未修改,则不允许创建 BpmProcessDefinitionCreateReqDTO definitionCreateReqDTO = BpmModelConvert.INSTANCE.convert2(model, form) .setBpmnBytes(bpmnBytes); - if (processDefinitionService.isProcessDefinitionEquals(definitionCreateReqDTO)) { // 流程定义的信息相等 - throw exception(MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS); - } + // TODO @芋艿:这里比较可能有点问题 +// if (processDefinitionService.isProcessDefinitionEquals(definitionCreateReqDTO)) { // 流程定义的信息相等 +// throw exception(MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS); +// } // 2.1 创建流程定义 String definitionId = processDefinitionService.createProcessDefinition(definitionCreateReqDTO); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java index b7bab57534..a1474afd0d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -10,6 +11,7 @@ import cn.iocoder.yudao.framework.common.util.string.StrUtils; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.enums.DictTypeConstants; import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; @@ -26,6 +28,7 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import com.google.common.annotations.VisibleForTesting; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.dromara.hutool.core.convert.Convert; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.UserTask; @@ -57,6 +60,9 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { @Lazy // 解决循环依赖 private BpmProcessInstanceService processInstanceService; +// @Resource +// private ExpressionManager expressionManager; + @Resource private RoleApi roleApi; @Resource @@ -93,6 +99,10 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { if (type == null || StrUtil.isBlank(options)) { throw exception(MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG, userTask.getName()); } + // TODO 芋艿:校验 options + if (ObjectUtil.equal(type, BpmTaskAssignRuleTypeEnum.EXPRESS.getType())) { + return; + } validTaskAssignRuleOptions(type, StrUtils.splitToLong(options, ",")); }); } @@ -117,6 +127,14 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { } } + public Long test(DelegateExecution execution) { + return 1L; + } + + public Long test2(DelegateExecution execution, Long id) { + return id; + } + @Override @DataPermission(enable = false) // 忽略数据权限,不然分配会存在问题 public Set calculateTaskCandidateUsers(DelegateExecution execution) { @@ -137,7 +155,11 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { // TODO 芋艿:assignType/assignOptions/, 枚举 FlowElement flowElement = execution.getCurrentFlowElement(); Integer type = NumberUtils.parseInt(flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignType")); - Set options = StrUtils.splitToLongSet(flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"), ","); + String optionStr = flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"); + Set options = null; + if (ObjectUtil.notEqual(BpmTaskAssignRuleTypeEnum.EXPRESS.getType(), type)) { + options = StrUtils.splitToLongSet(optionStr, ","); + } // 计算审批人 Set assigneeUserIds = null; @@ -155,6 +177,9 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { assigneeUserIds = calculateTaskCandidateUsersByUserGroup(options); } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.SCRIPT.getType(), type)) { assigneeUserIds = calculateTaskCandidateUsersByScript(execution, options); + } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.EXPRESS.getType(), type)) { + Object result = FlowableUtils.getExpressionValue(execution, optionStr); + assigneeUserIds = Convert.toSet(Long.class, result); } // 移除被禁用的用户 diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java index c3cce4272c..f279e95df4 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java @@ -14,9 +14,4 @@ public interface BpmnModelConstants { */ String NAMESPACE = "http://flowable.org/bpmn"; - /** - * 自定义属性 dataType - */ - String PROCESS_CUSTOM_DATA_TYPE = "dataType"; - } diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java index 2a0fc38ac5..d697989953 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java +++ b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java @@ -1,6 +1,11 @@ package cn.iocoder.yudao.framework.flowable.core.util; +import org.flowable.common.engine.api.delegate.Expression; +import org.flowable.common.engine.api.variable.VariableContainer; +import org.flowable.common.engine.impl.el.ExpressionManager; import org.flowable.common.engine.impl.identity.Authentication; +import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.flowable.engine.impl.util.CommandContextUtil; /** * Flowable 相关的工具方法 @@ -29,4 +34,15 @@ public class FlowableUtils { return activityId + "_assignee"; } + // ========== Expression 相关的工具方法 ========== + + public static Object getExpressionValue(VariableContainer variableContainer, String expressionString) { + ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(); + assert processEngineConfiguration != null; + ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager(); + assert expressionManager != null; + Expression expression = expressionManager.createExpression(expressionString); + return expression.getValue(variableContainer); + } + } diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index bc850b5902..e5b816b9b2 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -46,11 +46,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-bpm-biz + ${revision} + -- Gitee From 0f73b61db203b9ab00597eec9265abb4368ff7ea Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 14 Mar 2024 20:16:07 +0800 Subject: [PATCH 0051/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=98=BF=E9=87=8C?= =?UTF-8?q?=20=E9=80=9A=E4=B9=89=E5=8D=83=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-spring-boot-starter-ai/pom.xml | 6 + .../framework/ai/chatqianwen/QianWenApi.java | 82 +++++++++++ .../ai/chatqianwen/QianWenChatClient.java | 128 ++++++++++++++++++ .../api/QianWenChatCompletion.java | 10 ++ .../api/QianWenChatCompletionMessage.java | 8 ++ .../api/QianWenChatCompletionRequest.java | 12 ++ .../ai/chatqianwen/package-info.java | 9 ++ .../framework/ai/chatxinghuo/XingHuoApi.java | 2 - .../ai/chat/QianWenChatClientTests.java | 53 ++++++++ 9 files changed, 308 insertions(+), 2 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 862f7fe8dd..276e877330 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -108,6 +108,12 @@ cn.hutool hutool-all + + + com.aliyun + broadscope-bailian-sdk-java + 1.3.0 + \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java new file mode 100644 index 0000000000..dbf6a7d70a --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen; + +import com.aliyun.broadscope.bailian.sdk.AccessTokenClient; +import com.aliyun.broadscope.bailian.sdk.ApplicationClient; +import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; +import com.aliyun.broadscope.bailian.sdk.models.CompletionsRequest; +import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; +import lombok.Getter; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import reactor.core.publisher.Flux; + +import java.util.List; + +/** + * 阿里 通义千问 + * + * https://www.aliyun.com/search?k=%E9%80%9A%E4%B9%89%E5%A4%A7%E6%A8%A1%E5%9E%8B&scene=all + * + * author: fansili + * time: 2024/3/13 21:09 + */ +@Getter +public class QianWenApi { + + /** + * accessKeyId、accessKeySecret、agentKey、appId 获取方式如下链接 + * https://help.aliyun.com/document_detail/2587494.html?spm=a2c4g.2587492.0.0.53f33c566sXskp + */ + private String accessKeyId; + private String accessKeySecret; + private String agentKey; + private String appId; + private String endpoint = "bailian.cn-beijing.aliyuncs.com"; + private String token; + private ApplicationClient client; + + public QianWenApi(String accessKeyId, String accessKeySecret, String agentKey, String appId, String endpoint) { + this.accessKeyId = accessKeyId; + this.accessKeySecret = accessKeySecret; + this.agentKey = agentKey; + this.appId = appId; + + if (endpoint != null) { + this.endpoint = endpoint; + } + + // 获取token + AccessTokenClient accessTokenClient = new AccessTokenClient(accessKeyId, accessKeySecret, agentKey); + token = accessTokenClient.getToken(); + // 构建client + client = ApplicationClient.builder() + .token(token) + .build(); + } + + public ResponseEntity chatCompletionEntity(ChatRequestMessage message) { + // 创建request + CompletionsRequest request = new CompletionsRequest() + .setAppId(appId) + .setMessages(List.of(message)) + .setParameters(new CompletionsRequest.Parameter().setResultFormat("message")); + // + CompletionsResponse response = client.completions(request); + int httpCode = 200; + if (!response.isSuccess()) { + System.out.printf("failed to create completion, requestId: %s, code: %s, message: %s\n", + response.getRequestId(), response.getCode(), response.getMessage()); + httpCode = 500; + } + return new ResponseEntity<>(response, HttpStatusCode.valueOf(httpCode)); + } + + public Flux chatCompletionStream(ChatRequestMessage message) { + return client.streamCompletions( + new CompletionsRequest() + .setAppId(appId) + .setMessages(List.of(message)) + .setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(true)) + ); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java new file mode 100644 index 0000000000..7b4a60baf8 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen; + +import cn.iocoder.yudao.framework.ai.chat.ChatClient; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.Generation; +import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionMessage; +import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; +import cn.iocoder.yudao.framework.ai.model.function.FunctionCallbackContext; +import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; +import com.aliyun.broadscope.bailian.sdk.models.ChatUserMessage; +import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ResponseEntity; +import org.springframework.retry.RetryCallback; +import org.springframework.retry.RetryContext; +import org.springframework.retry.RetryListener; +import org.springframework.retry.support.RetryTemplate; +import reactor.core.publisher.Flux; + +import java.time.Duration; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 阿里 通义千问 client + * + * 文档地址:https://help.aliyun.com/document_detail/2587494.html?spm=a2c4g.2587492.0.0.53f33c566sXskp + * + * author: fansili + * time: 2024/3/13 21:06 + */ +@Slf4j +public class QianWenChatClient extends AbstractFunctionCallSupport> + implements ChatClient, StreamingChatClient { + + private QianWenApi qianWenApi; + + public QianWenChatClient(QianWenApi qianWenApi) { + super(null); + this.qianWenApi = qianWenApi; + } + + public final RetryTemplate retryTemplate = RetryTemplate.builder() + // 最大重试次数 10 + .maxAttempts(10) + .retryOn(YiYanApiException.class) + // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms + .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) + .withListener(new RetryListener() { + @Override + public void onError(RetryContext context, + RetryCallback callback, Throwable throwable) { + log.warn("重试异常:" + context.getRetryCount(), throwable); + }; + }) + .build(); + + public QianWenChatClient(FunctionCallbackContext functionCallbackContext) { + super(functionCallbackContext); + } + + @Override + public ChatResponse call(Prompt prompt) { + return this.retryTemplate.execute(ctx -> { + // ctx 会有重试的信息 + // 创建 request 请求,stream模式需要供应商支持 + ChatRequestMessage request = this.createRequest(prompt, false); + // 调用 callWithFunctionSupport 发送请求 + ResponseEntity responseEntity = this.callWithFunctionSupport(request); + // 获取结果封装 chatCompletion + CompletionsResponse response = responseEntity.getBody(); + if (!response.isSuccess()) { + return new ChatResponse(List.of(new Generation(String.format("failed to create completion, requestId: %s, code: %s, message: %s\n", + response.getRequestId(), response.getCode(), response.getMessage())))); + } + List generations = response.getData().getChoices().stream() + .map(item -> new Generation(item.getMessage().getContent())).collect(Collectors.toList()); + return new ChatResponse(generations); + }); + } + + private ChatRequestMessage createRequest(Prompt prompt, boolean b) { + return new ChatUserMessage(prompt.getContents()); + } + + @Override + public Flux stream(Prompt prompt) { + // ctx 会有重试的信息 + // 创建 request 请求,stream模式需要供应商支持 + ChatRequestMessage request = this.createRequest(prompt, true); + // 调用 callWithFunctionSupport 发送请求 + Flux response = this.qianWenApi.chatCompletionStream(request); + return response.map(res -> { + return new ChatResponse(List.of(new Generation(res.getData().getText()))); + }); + } + + @Override + protected QianWenChatCompletionRequest doCreateToolResponseRequest(ChatRequestMessage previousRequest, QianWenChatCompletionMessage responseMessage, List conversationHistory) { + return null; + } + + @Override + protected List doGetUserMessages(ChatRequestMessage request) { + return null; + } + + @Override + protected QianWenChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { + return null; + } + + @Override + protected ResponseEntity doChatCompletion(ChatRequestMessage request) { + return qianWenApi.chatCompletionEntity(request); + } + + @Override + protected boolean isToolFunctionCall(ResponseEntity response) { + return false; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java new file mode 100644 index 0000000000..4e646748e6 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen.api; + +import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; + +/** + * author: fansili + * time: 2024/3/13 21:07 + */ +public class QianWenChatCompletion extends CompletionsResponse { +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java new file mode 100644 index 0000000000..07680cbf4a --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen.api; + +/** + * author: fansili + * time: 2024/3/13 21:07 + */ +public class QianWenChatCompletionMessage { +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java new file mode 100644 index 0000000000..c3e27da62e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen.api; + +import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; +import com.aliyun.broadscope.bailian.sdk.models.ChatUserMessage; + +/** + * author: fansili + * time: 2024/3/13 21:07 + */ +public class QianWenChatCompletionRequest extends ChatRequestMessage { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java new file mode 100644 index 0000000000..eb46035e0c --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java @@ -0,0 +1,9 @@ +/** + * 阿里的 通义千问 + * + * 链接:https://www.aliyun.com/search?k=%E9%80%9A%E4%B9%89%E5%A4%A7%E6%A8%A1%E5%9E%8B&scene=all + * + * author: fansili + * time: 2024/3/13 21:05 + */ +package cn.iocoder.yudao.framework.ai.chatqianwen; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java index 58c21349bc..a053884a24 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java @@ -132,8 +132,6 @@ public class XingHuoApi { } catch (NoSuchAlgorithmException | InvalidKeyException e) { throw new RuntimeException(e); } - System.err.println(authUrl); - System.err.println(JSONUtil.toJsonPrettyStr(request)); // wss 请求的 URI URI uri = URI.create(authUrl); // 发起 wss 请求并处理响应 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java new file mode 100644 index 0000000000..745af82637 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -0,0 +1,53 @@ +package cn.iocoder.yudao.framework.ai.chat; + +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenApi; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; +import org.junit.Before; +import org.junit.Test; +import reactor.core.publisher.Flux; + +import java.util.Scanner; +import java.util.function.Consumer; + +/** + * author: fansili + * time: 2024/3/13 21:37 + */ +public class QianWenChatClientTests { + + private QianWenChatClient qianWenChatClient; + + @Before + public void setup() { + QianWenApi qianWenApi = new QianWenApi( + "", + "", + "", + "", + null + ); + qianWenChatClient = new QianWenChatClient(qianWenApi); + } + + @Test + public void callTest() { + ChatResponse call = qianWenChatClient.call(new Prompt("Java语言怎么样?")); + System.err.println(call.getResult()); + } + + @Test + public void streamTest() { + Flux flux = qianWenChatClient.stream(new Prompt("Java语言怎么样?")); + flux.subscribe(new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + System.err.print(chatResponse.getResult().getOutput().getContent()); + } + }); + + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } +} -- Gitee From 26afa04e80c51f108897acfbf3e2715af9b3848f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 14 Mar 2024 20:23:13 +0800 Subject: [PATCH 0052/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E9=98=BF?= =?UTF-8?q?=E9=87=8C=20=E5=8D=83=E9=97=AE=E5=8F=82=E6=95=B0=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java index dbf6a7d70a..93a92364c0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java @@ -57,8 +57,10 @@ public class QianWenApi { public ResponseEntity chatCompletionEntity(ChatRequestMessage message) { // 创建request CompletionsRequest request = new CompletionsRequest() + // 设置 appid .setAppId(appId) .setMessages(List.of(message)) + // 返回choice message结果 .setParameters(new CompletionsRequest.Parameter().setResultFormat("message")); // CompletionsResponse response = client.completions(request); @@ -74,8 +76,10 @@ public class QianWenApi { public Flux chatCompletionStream(ChatRequestMessage message) { return client.streamCompletions( new CompletionsRequest() + // 设置 appid .setAppId(appId) .setMessages(List.of(message)) + //开启增量输出模式,后面输出不会包含已经输出的内容 .setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(true)) ); } -- Gitee From f5f73adcbbe3a5b8c0636c453512d05232d41c26 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 15 Mar 2024 00:19:09 +0800 Subject: [PATCH 0053/1557] =?UTF-8?q?BPM=EF=BC=9A=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=88=86=E9=85=8D=E4=BA=BA=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E9=80=9A=E8=BF=87=20BpmTaskCandidateStrategy?= =?UTF-8?q?=20=E7=AD=96=E7=95=A5=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../common/util/string/StrUtils.java | 5 + .../module/bpm/enums/ErrorCodeConstants.java | 2 +- .../definition/BpmTaskRuleScriptEnum.java | 30 --- .../BpmCandidateProcessorConfiguration.java | 52 ---- .../config/BpmFlowableConfiguration.java | 21 +- .../behavior/BpmActivityBehaviorFactory.java | 16 +- .../BpmParallelMultiInstanceBehavior.java | 6 +- .../behavior/BpmUserTaskActivityBehavior.java | 6 +- .../impl/BpmTaskAssignLeaderX1Script.java | 28 -- .../impl/BpmTaskAssignLeaderX2Script.java | 28 -- .../candidate/BpmTaskCandidateInvoker.java | 134 +++++++++ .../BpmTaskCandidateStrategy.java} | 37 +-- .../BpmTaskAssignLeaderExpression.java} | 17 +- .../BpmTaskAssignStartUserExpression.java} | 21 +- .../BpmTaskCandidateDeptLeaderStrategy.java | 46 ++++ .../BpmTaskCandidateDeptMemberStrategy.java | 49 ++++ .../BpmTaskCandidateExpressionStrategy.java | 36 +++ .../BpmTaskCandidateGroupStrategy.java | 47 ++++ .../BpmTaskCandidatePostStrategy.java} | 39 +-- .../BpmTaskCandidateRoleStrategy.java | 44 +++ .../BpmTaskCandidateUserStrategy.java | 39 +++ .../enums/BpmTaskCandidateStrategyEnum.java} | 21 +- .../core/enums/BpmnModelConstants.java | 13 +- .../candidate/BpmCandidateSourceInfo.java | 45 ---- .../BpmCandidateSourceInfoProcessor.java | 53 ---- .../BpmCandidateSourceInfoProcessorChain.java | 107 -------- ...didateAdminUserApiSourceInfoProcessor.java | 32 --- ...pmCandidateDeptApiSourceInfoProcessor.java | 50 ---- ...pmCandidateRoleApiSourceInfoProcessor.java | 37 --- ...CandidateScriptApiSourceInfoProcessor.java | 73 ----- ...didateUserGroupApiSourceInfoProcessor.java | 41 --- .../definition/BpmModelServiceImpl.java | 6 +- .../BpmProcessDefinitionServiceImpl.java | 2 +- .../definition/BpmTaskAssignRuleService.java | 30 --- .../BpmTaskAssignRuleServiceImpl.java | 254 ------------------ .../cc/BpmProcessInstanceCopyService.java | 9 - .../cc/BpmProcessInstanceCopyServiceImpl.java | 68 ----- .../BpmTaskCandidateInvokerTest.java | 93 +++++++ .../BpmTaskAssignLeaderExpressionTest.java} | 18 +- ...pmTaskCandidateDeptLeaderStrategyTest.java | 42 +++ ...pmTaskCandidateDeptMemberStrategyTest.java | 42 +++ ...pmTaskCandidateExpressionStrategyTest.java | 39 +++ .../BpmTaskCandidateGroupStrategyTest.java | 42 +++ .../BpmTaskCandidatePostStrategyTest.java | 45 ++++ .../BpmTaskCandidateRoleStrategyTest.java | 41 +++ .../BpmTaskCandidateUserStrategyTest.java | 28 ++ ...CandidateSourceInfoProcessorChainTest.java | 244 ----------------- .../BpmTaskAssignRuleServiceImplTest.java | 227 ---------------- .../framework/flowable/core/package-info.java | 1 - .../framework/flowable/package-info.java | 1 - 51 files changed, 896 insertions(+), 1513 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskRuleScriptEnum.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCandidateProcessorConfiguration.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/{behavior/script/BpmTaskAssignScript.java => candidate/BpmTaskCandidateStrategy.java} (30%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/{behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java => candidate/expression/BpmTaskAssignLeaderExpression.java} (81%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/{behavior/script/impl/BpmTaskAssignStartUserScript.java => candidate/expression/BpmTaskAssignStartUserExpression.java} (54%) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{service/candidate/sourceInfoProcessor/BpmCandidatePostApiSourceInfoProcessor.java => framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java} (40%) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java rename yudao-module-bpm/{yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java} (42%) rename yudao-module-bpm/{yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm}/framework/flowable/core/enums/BpmnModelConstants.java (37%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfo.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChain.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateAdminUserApiSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateDeptApiSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateRoleApiSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateScriptApiSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateUserGroupApiSourceInfoProcessor.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvokerTest.java rename yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/{behavior/script/impl/BpmTaskAssignLeaderX2ScriptTest.java => candidate/expression/BpmTaskAssignLeaderExpressionTest.java} (86%) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategyTest.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategyTest.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChainTest.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java delete mode 100644 yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/package-info.java delete mode 100644 yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/package-info.java diff --git a/pom.xml b/pom.xml index 3a66524bc1..1b5fc92c15 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ yudao-module-system yudao-module-infra - + yudao-module-bpm diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java index c434b2577f..d236d1817f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/string/StrUtils.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.common.util.string; +import cn.hutool.core.text.StrPool; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; @@ -46,6 +47,10 @@ public class StrUtils { return Arrays.stream(longs).boxed().collect(Collectors.toList()); } + public static Set splitToLongSet(String value) { + return splitToLongSet(value, StrPool.COMMA); + } + public static Set splitToLongSet(String value, CharSequence separator) { long[] longs = StrUtil.splitToLong(value, separator); return Arrays.stream(longs).boxed().collect(Collectors.toSet()); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 646841b348..bdc3d17ce5 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -26,7 +26,7 @@ public interface ErrorCodeConstants { ErrorCode MODEL_NOT_EXISTS = new ErrorCode(1_009_002_001, "流程模型不存在"); ErrorCode MODEL_KEY_VALID = new ErrorCode(1_009_002_002, "流程标识格式不正确,需要以字母或下划线开头,后接任意字母、数字、中划线、下划线、句点!"); ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1_009_002_003, "部署流程失败,原因:流程表单未配置,请点击【修改流程】按钮进行配置"); - ErrorCode MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败," + + ErrorCode MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败," + "原因:用户任务({})未配置审批人,请点击【流程设计】按钮,选择该它的【任务(审批人)】进行配置"); ErrorCode MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS = new ErrorCode(1_009_003_005, "流程定义部署失败,原因:信息未发生变化"); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskRuleScriptEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskRuleScriptEnum.java deleted file mode 100644 index 7fc0e3b8bc..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskRuleScriptEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.bpm.enums.definition; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * BPM 任务规则的脚本枚举 - * 目前暂时通过 TODO 芋艿:硬编码,未来可以考虑 Groovy 动态脚本的方式 - * - * @author 芋道源码 - */ -@Getter -@AllArgsConstructor -public enum BpmTaskRuleScriptEnum { - - START_USER(10L, "流程发起人"), - - LEADER_X1(20L, "流程发起人的一级领导"), - LEADER_X2(21L, "流程发起人的二级领导"); - - /** - * 脚本编号 - */ - private final Long id; - /** - * 脚本描述 - */ - private final String desc; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCandidateProcessorConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCandidateProcessorConfiguration.java deleted file mode 100644 index cff03488b2..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCandidateProcessorConfiguration.java +++ /dev/null @@ -1,52 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.bpm.config; - -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; -import cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor.*; -import org.springframework.beans.factory.ObjectProvider; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -// TODO @芋艿:Candidate 相关还在完善中,用户可以暂时忽略,仅 yudao 开发的同学需要关注~计划是把 Candidate 和 Assign 融合成一套 -/** - * BPM 通用的 Configuration 配置类,提供给 Activiti 和 Flowable - * @author kyle - */ -@Configuration(proxyBeanMethods = false) -public class BpmCandidateProcessorConfiguration { - @Bean - public BpmCandidateAdminUserApiSourceInfoProcessor bpmCandidateAdminUserApiSourceInfoProcessor() { - return new BpmCandidateAdminUserApiSourceInfoProcessor(); - } - - @Bean - public BpmCandidateDeptApiSourceInfoProcessor bpmCandidateDeptApiSourceInfoProcessor() { - return new BpmCandidateDeptApiSourceInfoProcessor(); - } - - @Bean - public BpmCandidatePostApiSourceInfoProcessor bpmCandidatePostApiSourceInfoProcessor() { - return new BpmCandidatePostApiSourceInfoProcessor(); - } - - @Bean - public BpmCandidateRoleApiSourceInfoProcessor bpmCandidateRoleApiSourceInfoProcessor() { - return new BpmCandidateRoleApiSourceInfoProcessor(); - } - - @Bean - public BpmCandidateUserGroupApiSourceInfoProcessor bpmCandidateUserGroupApiSourceInfoProcessor() { - return new BpmCandidateUserGroupApiSourceInfoProcessor(); - } - - /** - * 可以自己定制脚本,然后通过这里设置到处理器里面去 - * @param scriptsOp 脚本包装对象 - * @return - */ - @Bean - public BpmCandidateScriptApiSourceInfoProcessor bpmCandidateScriptApiSourceInfoProcessor(ObjectProvider scriptsOp) { - BpmCandidateScriptApiSourceInfoProcessor bpmCandidateScriptApiSourceInfoProcessor = new BpmCandidateScriptApiSourceInfoProcessor(); - bpmCandidateScriptApiSourceInfoProcessor.setScripts(scriptsOp); - return bpmCandidateScriptApiSourceInfoProcessor; - } -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java index c048d9c732..9248da552b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java @@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.config; import cn.hutool.core.collection.ListUtil; import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.BpmActivityBehaviorFactory; -import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import org.flowable.common.engine.api.delegate.event.FlowableEventListener; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; @@ -10,6 +12,8 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import java.util.List; + /** * BPM 模块的 Flowable 配置类 * @@ -36,11 +40,20 @@ public class BpmFlowableConfiguration { }; } + // =========== 审批人相关的 Bean ========== + @Bean - public BpmActivityBehaviorFactory bpmActivityBehaviorFactory(BpmTaskAssignRuleService taskRuleService) { + public BpmActivityBehaviorFactory bpmActivityBehaviorFactory(BpmTaskCandidateInvoker bpmTaskCandidateInvoker) { BpmActivityBehaviorFactory bpmActivityBehaviorFactory = new BpmActivityBehaviorFactory(); - bpmActivityBehaviorFactory.setBpmTaskRuleService(taskRuleService); + bpmActivityBehaviorFactory.setTaskCandidateInvoker(bpmTaskCandidateInvoker); return bpmActivityBehaviorFactory; } -} + @Bean + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") // adminUserApi 可以注入成功 + public BpmTaskCandidateInvoker bpmTaskCandidateInvoker(List strategyList, + AdminUserApi adminUserApi) { + return new BpmTaskCandidateInvoker(strategyList, adminUserApi); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java index dced1c5bdc..e9f1f32d7c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java @@ -1,10 +1,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; -import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; -import lombok.Data; -import lombok.EqualsAndHashCode; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; -import lombok.ToString; import org.flowable.bpmn.model.Activity; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; @@ -18,25 +15,22 @@ import org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFacto * * @author 芋道源码 */ -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) +@Setter public class BpmActivityBehaviorFactory extends DefaultActivityBehaviorFactory { - @Setter - private BpmTaskAssignRuleService bpmTaskRuleService; + private BpmTaskCandidateInvoker taskCandidateInvoker; @Override public UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask) { return new BpmUserTaskActivityBehavior(userTask) - .setBpmTaskRuleService(bpmTaskRuleService); + .setTaskCandidateInvoker(taskCandidateInvoker); } @Override public ParallelMultiInstanceBehavior createParallelMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) { return new BpmParallelMultiInstanceBehavior(activity, innerActivityBehavior) - .setBpmTaskRuleService(bpmTaskRuleService); + .setTaskCandidateInvoker(taskCandidateInvoker); } // TODO @ke:SequentialMultiInstanceBehavior 这个抽空也可以看看 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java index 0b60faa067..ed51b23fa2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; -import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.Activity; @@ -23,7 +23,7 @@ import java.util.Set; public class BpmParallelMultiInstanceBehavior extends ParallelMultiInstanceBehavior { @Setter - private BpmTaskAssignRuleService bpmTaskRuleService; + private BpmTaskCandidateInvoker taskCandidateInvoker; public BpmParallelMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) { @@ -50,7 +50,7 @@ public class BpmParallelMultiInstanceBehavior extends ParallelMultiInstanceBehav super.collectionElementVariable = FlowableUtils.formatCollectionElementVariable(execution.getCurrentActivityId()); // 第二步,获取任务的所有处理人 - Set assigneeUserIds = bpmTaskRuleService.calculateTaskCandidateUsers(execution); + Set assigneeUserIds = taskCandidateInvoker.calculateUsers(execution); execution.setVariable(super.collectionVariable, assigneeUserIds); return assigneeUserIds.size(); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java index aeda4d52c4..de17502bf2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.UserTask; @@ -29,7 +29,7 @@ import java.util.Set; public class BpmUserTaskActivityBehavior extends UserTaskActivityBehavior { @Setter - private BpmTaskAssignRuleService bpmTaskRuleService; + private BpmTaskCandidateInvoker taskCandidateInvoker; public BpmUserTaskActivityBehavior(UserTask userTask) { super(userTask); @@ -54,7 +54,7 @@ public class BpmUserTaskActivityBehavior extends UserTaskActivityBehavior { // 情况二,如果非多实例的任务,则计算任务处理人 // 第一步,先计算可处理该任务的处理人们 - Set candidateUserIds = bpmTaskRuleService.calculateTaskCandidateUsers(execution); + Set candidateUserIds = taskCandidateInvoker.calculateUsers(execution); // 第二步,后随机选择一个任务的处理人 // 疑问:为什么一定要选择一个任务处理人? // 解答:项目对 bpm 的任务是责任到人,所以每个任务有且仅有一个处理人。 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java deleted file mode 100644 index 9c31970f76..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX1Script.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl; - -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.stereotype.Component; - -import java.util.Set; - -/** - * 分配给发起人的一级 Leader 审批的 Script 实现类 - * - * @author 芋道源码 - */ -@Deprecated -@Component -public class BpmTaskAssignLeaderX1Script extends BpmTaskAssignLeaderAbstractScript { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution execution) { - return calculateTaskCandidateUsers(execution, 1); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X1; - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java deleted file mode 100644 index 9355451008..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2Script.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl; - -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.stereotype.Component; - -import java.util.Set; - -/** - * 分配给发起人的二级 Leader 审批的 Script 实现类 - * - * @author 芋道源码 - */ -@Deprecated -@Component -public class BpmTaskAssignLeaderX2Script extends BpmTaskAssignLeaderAbstractScript { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution execution) { - return calculateTaskCandidateUsers(execution, 2); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X2; - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java new file mode 100644 index 0000000000..d1ba65df2b --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java @@ -0,0 +1,134 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import com.google.common.annotations.VisibleForTesting; +import lombok.extern.slf4j.Slf4j; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.FlowElement; +import org.flowable.bpmn.model.UserTask; +import org.flowable.engine.delegate.DelegateExecution; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.TASK_CREATE_FAIL_NO_CANDIDATE_USER; + +/** + * {@link BpmTaskCandidateStrategy} 的调用者,用于调用对应的策略,实现任务的候选人的计算 + * + * @author 芋道源码 + */ +@Slf4j +public class BpmTaskCandidateInvoker { + + private final Map strategyMap = new HashMap<>(); + + private final AdminUserApi adminUserApi; + + public BpmTaskCandidateInvoker(List strategyList, + AdminUserApi adminUserApi) { + strategyList.forEach(strategy -> { + BpmTaskCandidateStrategy oldStrategy = strategyMap.put(strategy.getStrategy(), strategy); + Assert.isNull(oldStrategy, "策略(%s) 重复", strategy.getStrategy()); + }); + this.adminUserApi = adminUserApi; + } + + /** + * 校验流程模型的任务分配规则全部都配置了 + * 目的:如果有规则未配置,会导致流程任务找不到负责人,进而流程无法进行下去! + * + * @param bpmnBytes BPMN XML + */ + public void validateBpmnConfig(byte[] bpmnBytes) { + BpmnModel bpmnModel = BpmnModelUtils.getBpmnModel(bpmnBytes); + assert bpmnModel != null; + List userTaskList = BpmnModelUtils.getBpmnModelElements(bpmnModel, UserTask.class); + // 遍历所有的 UserTask,校验审批人配置 + userTaskList.forEach(userTask -> { + // 1. 非空校验 + Integer strategy = parseCandidateStrategy(userTask); + String param = parseCandidateParam(userTask); + if (strategy == null || StrUtil.isBlank(param)) { + throw exception(MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG, userTask.getName()); + } + // 2. 具体策略校验 + getCandidateStrategy(strategy).validateParam(param); + }); + } + + /** + * 计算任务的候选人 + * + * @param execution 执行任务 + * @return 用户编号集合 + */ + public Set calculateUsers(DelegateExecution execution) { + // TODO 芋艿:这里需要重构 +// // 1. 先从提前选好的审批人中获取 +// List assignee = processInstanceService.getAssigneeByProcessInstanceIdAndTaskDefinitionKey( +// execution.getProcessInstanceId(), execution.getCurrentActivityId()); +// if (CollUtil.isNotEmpty(assignee)) { +// // TODO @hai:new HashSet 即可 +// return convertSet(assignee, Function.identity()); +// } + Integer strategy = parseCandidateStrategy(execution.getCurrentFlowElement()); + String param = parseCandidateParam(execution.getCurrentFlowElement()); + // 1.1 计算任务的候选人 + Set userIds = getCandidateStrategy(strategy).calculateUsers(execution, param); + // 1.2 移除被禁用的用户 + removeDisableUsers(userIds); + + // 2. 校验是否有候选人 + if (CollUtil.isEmpty(userIds)) { + log.error("[calculateUsers][流程任务({}/{}/{}) 任务规则({}/{}) 找不到候选人]", execution.getId(), + execution.getProcessDefinitionId(), execution.getCurrentActivityId(), strategy, param); + throw exception(TASK_CREATE_FAIL_NO_CANDIDATE_USER); + } + return userIds; + } + + @VisibleForTesting + void removeDisableUsers(Set assigneeUserIds) { + if (CollUtil.isEmpty(assigneeUserIds)) { + return; + } + Map userMap = adminUserApi.getUserMap(assigneeUserIds); + assigneeUserIds.removeIf(id -> { + AdminUserRespDTO user = userMap.get(id); + return user == null || !CommonStatusEnum.ENABLE.getStatus().equals(user.getStatus()); + }); + } + + private static Integer parseCandidateStrategy(FlowElement userTask) { + return NumberUtils.parseInt(userTask.getAttributeValue( + BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); + } + + private static String parseCandidateParam(FlowElement userTask) { + return userTask.getAttributeValue( + BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM); + } + + private BpmTaskCandidateStrategy getCandidateStrategy(Integer strategy) { + BpmTaskCandidateStrategyEnum strategyEnum = BpmTaskCandidateStrategyEnum.valueOf(strategy); + Assert.notNull(strategyEnum, "策略(%s) 不存在", strategy); + BpmTaskCandidateStrategy strategyObj = strategyMap.get(strategyEnum); + Assert.notNull(strategyObj, "策略(%s) 不存在", strategy); + return strategyObj; + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java similarity index 30% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java index c390590481..a5c5c9b4d9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/BpmTaskAssignScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java @@ -1,36 +1,39 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import org.flowable.engine.delegate.DelegateExecution; import java.util.Set; /** - * Bpm 任务分配的自定义 Script 脚本 - * 使用场景: - * 1. 设置审批人为发起人 - * 2. 设置审批人为发起人的 Leader - * 3. 甚至审批人为发起人的 Leader 的 Leader + * BPM 任务的候选人的策略接口 + * + * 例如说:分配审批人 * * @author 芋道源码 */ -@Deprecated -public interface BpmTaskAssignScript { +public interface BpmTaskCandidateStrategy { /** - * 基于执行任务,获得任务的候选用户们 + * 对应策略 * - * @param execution 执行任务 - * @return 候选人用户的编号数组 + * @return 策略 */ - Set calculateTaskCandidateUsers(DelegateExecution execution); + BpmTaskCandidateStrategyEnum getStrategy(); /** - * 获得枚举值 + * 校验参数 * - * @return 枚举值 + * @param param 参数 */ - BpmTaskRuleScriptEnum getEnum(); + void validateParam(String param); -} + /** + * 基于执行任务,获得任务的候选用户们 + * + * @param execution 执行任务 + * @return 用户编号集合 + */ + Set calculateUsers(DelegateExecution execution, String param); +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java similarity index 81% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java index 22ef4cde7b..cb5306548d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderAbstractScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java @@ -1,7 +1,6 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -9,7 +8,7 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.runtime.ProcessInstance; -import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; import org.springframework.util.Assert; import jakarta.annotation.Resource; @@ -19,23 +18,23 @@ import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; import static java.util.Collections.emptySet; /** - * 分配给发起人的 Leader 审批的 Script 实现类 - * 目前 Leader 的定义是, + * 分配给发起人的 Leader 审批的 Expression 流程表达式 + * 目前 Leader 的定义是,发起人所在部门的 Leader * * @author 芋道源码 */ -@Deprecated -public abstract class BpmTaskAssignLeaderAbstractScript implements BpmTaskAssignScript { +@Component +public class BpmTaskAssignLeaderExpression { @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; + @Resource - @Lazy // 解决循环依赖 private BpmProcessInstanceService bpmProcessInstanceService; - protected Set calculateTaskCandidateUsers(DelegateExecution execution, int level) { + protected Set calculateUsers(DelegateExecution execution, int level) { Assert.isTrue(level > 0, "level 必须大于 0"); // 获得发起人 ProcessInstance processInstance = bpmProcessInstanceService.getProcessInstance(execution.getProcessInstanceId()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java similarity index 54% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index 0329aec6a1..c4d8811b41 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignStartUserScript.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -1,41 +1,30 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression; import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.runtime.ProcessInstance; -import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; -import jakarta.annotation.Resource; import java.util.Set; /** - * 分配给发起人审批的 Script 实现类 + * 分配给发起人审批的 Expression 流程表达式 * * @author 芋道源码 */ -@Deprecated @Component -public class BpmTaskAssignStartUserScript implements BpmTaskAssignScript { +public class BpmTaskAssignStartUserExpression { @Resource - @Lazy // 解决循环依赖 private BpmProcessInstanceService bpmProcessInstanceService; - @Override - public Set calculateTaskCandidateUsers(DelegateExecution execution) { + public Set calculateUsers(DelegateExecution execution) { ProcessInstance processInstance = bpmProcessInstanceService.getProcessInstance(execution.getProcessInstanceId()); Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); return SetUtils.asSet(startUserId); } - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.START_USER; - } - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java new file mode 100644 index 0000000000..485552f91f --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; + +/** + * 部门的负责人 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidateDeptLeaderStrategy implements BpmTaskCandidateStrategy { + + @Resource + private DeptApi deptApi; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.DEPT_LEADER; + } + + @Override + public void validateParam(String param) { + Set deptIds = StrUtils.splitToLongSet(param); + deptApi.validateDeptList(deptIds); + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + Set deptIds = StrUtils.splitToLongSet(param); + List depts = deptApi.getDeptList(deptIds); + return convertSet(depts, DeptRespDTO::getLeaderUserId); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java new file mode 100644 index 0000000000..f60b1cc8b2 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; + +/** + * 部门的成员 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidateDeptMemberStrategy implements BpmTaskCandidateStrategy { + + @Resource + private DeptApi deptApi; + @Resource + private AdminUserApi adminUserApi; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.DEPT_MEMBER; + } + + @Override + public void validateParam(String param) { + Set deptIds = StrUtils.splitToLongSet(param); + deptApi.validateDeptList(deptIds); + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + Set deptIds = StrUtils.splitToLongSet(param); + List users = adminUserApi.getUserListByDeptIds(deptIds); + return convertSet(users, AdminUserRespDTO::getId); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java new file mode 100644 index 0000000000..f8be5fe3e4 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import org.dromara.hutool.core.convert.Convert; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.Set; + +/** + * 流程表达式 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author 芋道源码 + */ +@Component +public class BpmTaskCandidateExpressionStrategy implements BpmTaskCandidateStrategy { + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.EXPRESSION; + } + + @Override + public void validateParam(String param) { + // do nothing 因为它基本做不了校验 + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + Object result = FlowableUtils.getExpressionValue(execution, param); + return Convert.toSet(Long.class, result); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java new file mode 100644 index 0000000000..b8fa00f84d --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSetByFlatMap; + +/** + * 用户组 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidateGroupStrategy implements BpmTaskCandidateStrategy { + + @Resource + private BpmUserGroupService userGroupService; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.USER_GROUP; + } + + @Override + public void validateParam(String param) { + Set groupIds = StrUtils.splitToLongSet(param); + userGroupService.getUserGroupList(groupIds); + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + Set groupIds = StrUtils.splitToLongSet(param); + List groups = userGroupService.getUserGroupList(groupIds); + return convertSetByFlatMap(groups, BpmUserGroupDO::getMemberUserIds, Collection::stream); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidatePostApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java similarity index 40% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidatePostApiSourceInfoProcessor.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java index f924d87ef3..3f2ae58f15 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidatePostApiSourceInfoProcessor.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java @@ -1,40 +1,49 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.system.api.dept.PostApi; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; -import jakarta.annotation.Resource; import java.util.List; import java.util.Set; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -public class BpmCandidatePostApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { +/** + * 岗位 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidatePostStrategy implements BpmTaskCandidateStrategy { + @Resource - private PostApi api; + private PostApi postApi; @Resource private AdminUserApi adminUserApi; @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.POST.getType()); + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.POST; } @Override - public void validRuleOptions(Integer type, Set options) { - api.validPostList(options); + public void validateParam(String param) { + Set postIds = StrUtils.splitToLongSet(param); + postApi.validPostList(postIds); } @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - List users = adminUserApi.getUserListByPostIds(rule.getOptions()); + public Set calculateUsers(DelegateExecution execution, String param) { + Set postIds = StrUtils.splitToLongSet(param); + List users = adminUserApi.getUserListByPostIds(postIds); return convertSet(users, AdminUserRespDTO::getId); } + } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java new file mode 100644 index 0000000000..0dd1786268 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.system.api.permission.PermissionApi; +import cn.iocoder.yudao.module.system.api.permission.RoleApi; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.Set; + +/** + * 角色 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidateRoleStrategy implements BpmTaskCandidateStrategy { + + @Resource + private RoleApi roleApi; + @Resource + private PermissionApi permissionApi; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.ROLE; + } + + @Override + public void validateParam(String param) { + Set roleIds = StrUtils.splitToLongSet(param); + roleApi.validRoleList(roleIds); + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + Set roleIds = StrUtils.splitToLongSet(param); + return permissionApi.getUserRoleIdListByRoleIds(roleIds); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java new file mode 100644 index 0000000000..390e4903a0 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.string.StrUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +import java.util.Set; + +/** + * 用户 {@link BpmTaskCandidateStrategy} 实现类 + * + * @author kyle + */ +@Component +public class BpmTaskCandidateUserStrategy implements BpmTaskCandidateStrategy { + + @Resource + private AdminUserApi adminUserApi; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.USER; + } + + @Override + public void validateParam(String param) { + adminUserApi.validateUserList(StrUtils.splitToLongSet(param)); + } + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + return StrUtils.splitToLongSet(param); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java similarity index 42% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java index d220da7468..0c31998215 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTaskAssignRuleTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java @@ -1,16 +1,19 @@ -package cn.iocoder.yudao.module.bpm.enums.definition; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; +import cn.hutool.core.util.ArrayUtil; import lombok.AllArgsConstructor; import lombok.Getter; /** - * BPM 任务分配规则的类型枚举 + * BPM 任务的候选人策略枚举 + * + * 例如说:分配给指定人审批 * * @author 芋道源码 */ @Getter @AllArgsConstructor -public enum BpmTaskAssignRuleTypeEnum { +public enum BpmTaskCandidateStrategyEnum { ROLE(10, "角色"), DEPT_MEMBER(20, "部门的成员"), // 包括负责人 @@ -18,18 +21,20 @@ public enum BpmTaskAssignRuleTypeEnum { POST(22, "岗位"), USER(30, "用户"), USER_GROUP(40, "用户组"), - @Deprecated - SCRIPT(50, "自定义脚本"), // 例如说,发起人所在部门的领导、发起人所在部门的领导的领导 - EXPRESS(60, "流程表达式"), // 表达式 ExpressionManager + EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager ; /** * 类型 */ - private final Integer type; + private final Integer strategy; /** * 描述 */ - private final String desc; + private final String description; + + public static BpmTaskCandidateStrategyEnum valueOf(Integer strategy) { + return ArrayUtil.firstMatch(o -> o.getStrategy().equals(strategy), values()); + } } diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java similarity index 37% rename from yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index f279e95df4..c8fefd55b3 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.flowable.core.enums; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; /** * 流程常量信息 @@ -9,9 +9,16 @@ public interface BpmnModelConstants { /** * BPMN 中的命名空间 - * - * 这个东西有可能导致无法切换工作流程的实现 */ String NAMESPACE = "http://flowable.org/bpmn"; + /** + * BPMN UserTask 的扩展属性,用于标记候选人策略 + */ + String USER_TASK_CANDIDATE_STRATEGY = "candidateStrategy"; + /** + * BPMN UserTask 的扩展属性,用于标记候选人参数 + */ + String USER_TASK_CANDIDATE_PARAM = "candidateParam"; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfo.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfo.java deleted file mode 100644 index 0c5f099d68..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfo.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate; - -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.HashSet; -import java.util.Set; - -/** - * 获取候选人信息 - */ -@AllArgsConstructor -@NoArgsConstructor -@Data -public class BpmCandidateSourceInfo { - @Schema(description = "当前任务ID") - @NotNull - private String taskId; - /** - * 通过这些规则,生成最终需要生成的用户 - */ - @Schema(description = "当前任务预选规则") - @NotEmpty(message = "不允许空规则") - private Set rules; - - @Schema(description = "发起抄送的用户") - private String creator; - - @Schema(description = "抄送原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "请帮忙审查下!") - @NotEmpty(message = "抄送原因不能为空") - private String reason; - - public void addRule(BpmTaskCandidateRuleVO vo) { - assert vo != null; - if (rules == null) { - rules = new HashSet<>(); - } - rules.add(vo); - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessor.java deleted file mode 100644 index 0fe741c201..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessor.java +++ /dev/null @@ -1,53 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import org.flowable.engine.delegate.DelegateExecution; - -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - -public interface BpmCandidateSourceInfoProcessor { - /** - * 获取该处理器支持的类型 - * 来自 {@link BpmTaskAssignRuleTypeEnum} - * - * @return - */ - Set getSupportedTypes(); - - /** - * 对规则和人员做校验 - * - * @param type 规则 - * @param options 人员id - */ - void validRuleOptions(Integer type, Set options); - - /** - * 默认的处理 - * 如果想去操作所有的规则,则可以覆盖此方法 - * - * @param request 原始请求 - * @param delegateExecution 审批过程中的对象 - * @return 必须包含的是用户ID,而不是其他的ID - * @throws Exception - */ - default Set process(BpmCandidateSourceInfo request, DelegateExecution delegateExecution) throws Exception { - Set rules = request.getRules(); - Set results = new HashSet<>(); - for (BpmTaskCandidateRuleVO rule : rules) { - // 每个处理器都有机会处理自己支持的事件 - if (CollUtil.contains(getSupportedTypes(), rule.getType())) { - results.addAll(doProcess(request, rule, delegateExecution)); - } - } - return results; - } - - default Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - return Collections.emptySet(); - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChain.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChain.java deleted file mode 100644 index dafc0835ac..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChain.java +++ /dev/null @@ -1,107 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.ListUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.beans.factory.ObjectProvider; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.*; - -@Service -public class BpmCandidateSourceInfoProcessorChain { - - // 保存处理节点 - - private List processorList; - @Resource - private AdminUserApi adminUserApi; - - /** - * 可添加其他处理器 - * - * @param processorOp - * @return - */ - @Resource - // 动态扩展处理节点 - public BpmCandidateSourceInfoProcessorChain addProcessor(ObjectProvider processorOp) { - List processor = ListUtil.toList(processorOp.iterator()); - if (null == processorList) { - processorList = new ArrayList<>(processor.size()); - } - processorList.addAll(processor); - return this; - } - - // 获取处理器处理 - public Set process(BpmCandidateSourceInfo sourceInfo, DelegateExecution execution) throws Exception { - // Verify our parameters - if (sourceInfo == null) { - throw new IllegalArgumentException(); - } - for (BpmCandidateSourceInfoProcessor processor : processorList) { - try { - for (BpmTaskCandidateRuleVO vo : sourceInfo.getRules()) { - if (CollUtil.contains(processor.getSupportedTypes(), vo.getType())) { - processor.validRuleOptions(vo.getType(), vo.getOptions()); - } - } - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - Set saveResult = Collections.emptySet(); - Exception saveException = null; - for (BpmCandidateSourceInfoProcessor processor : processorList) { - try { - saveResult = processor.process(sourceInfo, execution); - if (CollUtil.isNotEmpty(saveResult)) { - removeDisableUsers(saveResult); - break; - } - } catch (Exception e) { - saveException = e; - break; - } - } - // Return the exception or result state from the last execute() - if ((saveException != null)) { - throw saveException; - } else { - return (saveResult); - } - } - - public Set calculateTaskCandidateUsers(DelegateExecution execution, BpmCandidateSourceInfo sourceInfo) { - Set results = Collections.emptySet(); - try { - results = process(sourceInfo, execution); - } catch (Exception e) { - e.printStackTrace(); - } - return results; - } - - /** - * 移除禁用用户 - * - * @param assigneeUserIds - */ - public void removeDisableUsers(Set assigneeUserIds) { - if (CollUtil.isEmpty(assigneeUserIds)) { - return; - } - Map userMap = adminUserApi.getUserMap(assigneeUserIds); - assigneeUserIds.removeIf(id -> { - AdminUserRespDTO user = userMap.get(id); - return user == null || !CommonStatusEnum.ENABLE.getStatus().equals(user.getStatus()); - }); - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateAdminUserApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateAdminUserApiSourceInfoProcessor.java deleted file mode 100644 index 536b3eec21..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateAdminUserApiSourceInfoProcessor.java +++ /dev/null @@ -1,32 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; - -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import org.flowable.engine.delegate.DelegateExecution; - -import jakarta.annotation.Resource; -import java.util.Set; - -public class BpmCandidateAdminUserApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { - @Resource - private AdminUserApi api; - - @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.USER.getType()); - } - - @Override - public void validRuleOptions(Integer type, Set options) { - api.validateUserList(options); - } - - @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - return rule.getOptions(); - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateDeptApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateDeptApiSourceInfoProcessor.java deleted file mode 100644 index 6fcfa23fd7..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateDeptApiSourceInfoProcessor.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; - -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import org.flowable.engine.delegate.DelegateExecution; - -import jakarta.annotation.Resource; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; - -public class BpmCandidateDeptApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { - @Resource - private DeptApi api; - @Resource - private AdminUserApi adminUserApi; - - @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), - BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType()); - } - - @Override - public void validRuleOptions(Integer type, Set options) { - api.validateDeptList(options); - } - - @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), rule.getType())) { - List users = adminUserApi.getUserListByDeptIds(rule.getOptions()); - return convertSet(users, AdminUserRespDTO::getId); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType(), rule.getType())) { - List depts = api.getDeptList(rule.getOptions()); - return convertSet(depts, DeptRespDTO::getLeaderUserId); - } - return Collections.emptySet(); - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateRoleApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateRoleApiSourceInfoProcessor.java deleted file mode 100644 index f3ba5b92bb..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateRoleApiSourceInfoProcessor.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; - -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import org.flowable.engine.delegate.DelegateExecution; - -import jakarta.annotation.Resource; -import java.util.Set; - -public class BpmCandidateRoleApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { - @Resource - private RoleApi api; - - @Resource - private PermissionApi permissionApi; - - @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.ROLE.getType()); - } - - @Override - public void validRuleOptions(Integer type, Set options) { - api.validRoleList(options); - } - - @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - return permissionApi.getUserRoleIdListByRoleIds(rule.getOptions()); - } - -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateScriptApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateScriptApiSourceInfoProcessor.java deleted file mode 100644 index 4bf25694d1..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateScriptApiSourceInfoProcessor.java +++ /dev/null @@ -1,73 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.enums.DictTypeConstants; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.beans.factory.ObjectProvider; - -import jakarta.annotation.Resource; -import java.util.*; -import java.util.stream.Collectors; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.TASK_ASSIGN_SCRIPT_NOT_EXISTS; - -public class BpmCandidateScriptApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { - @Resource - private DictDataApi dictDataApi; - - /** - * 任务分配脚本 - */ - private Map scriptMap = Collections.emptyMap(); - - public void setScripts(ObjectProvider scriptsOp) { - List scripts = scriptsOp.orderedStream().collect(Collectors.toList()); - setScripts(scripts); - } - - public void setScripts(List scripts) { - this.scriptMap = convertMap(scripts, script -> script.getEnum().getId()); - } - - @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.SCRIPT.getType()); - } - - @Override - public void validRuleOptions(Integer type, Set options) { - dictDataApi.validateDictDataList(DictTypeConstants.TASK_ASSIGN_SCRIPT, - CollectionUtils.convertSet(options, String::valueOf)); - } - - @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - return calculateTaskCandidateUsersByScript(delegateExecution, rule.getOptions()); - } - - private Set calculateTaskCandidateUsersByScript(DelegateExecution execution, Set options) { - // 获得对应的脚本 - List scripts = new ArrayList<>(options.size()); - options.forEach(id -> { - BpmTaskAssignScript script = scriptMap.get(id); - if (script == null) { - throw exception(TASK_ASSIGN_SCRIPT_NOT_EXISTS, id); - } - scripts.add(script); - }); - // 逐个计算任务 - Set userIds = new HashSet<>(); - scripts.forEach(script -> CollUtil.addAll(userIds, script.calculateTaskCandidateUsers(execution))); - return userIds; - } -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateUserGroupApiSourceInfoProcessor.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateUserGroupApiSourceInfoProcessor.java deleted file mode 100644 index b0720b0d54..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/candidate/sourceInfoProcessor/BpmCandidateUserGroupApiSourceInfoProcessor.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor; - -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor; -import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; -import org.flowable.engine.delegate.DelegateExecution; - -import jakarta.annotation.Resource; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class BpmCandidateUserGroupApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor { - @Resource - private BpmUserGroupService api; - @Resource - private BpmUserGroupService userGroupService; - - @Override - public Set getSupportedTypes() { - return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType()); - } - - @Override - public void validRuleOptions(Integer type, Set options) { - api.validUserGroups(options); - } - - @Override - public Set doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) { - List userGroups = userGroupService.getUserGroupList(rule.getOptions()); - Set userIds = new HashSet<>(); - userGroups.forEach(group -> userIds.addAll(group.getMemberUserIds())); - return userIds; - } - -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 00ba49de4c..729e176b0f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import jakarta.annotation.Resource; @@ -54,8 +55,9 @@ public class BpmModelServiceImpl implements BpmModelService { private BpmProcessDefinitionService processDefinitionService; @Resource private BpmFormService bpmFormService; + @Resource - private BpmTaskAssignRuleService taskAssignRuleService; + private BpmTaskCandidateInvoker taskCandidateInvoker; @Override public PageResult getModelPage(BpmModelPageReqVO pageVO) { @@ -166,7 +168,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 1.3 校验表单已配 BpmFormDO form = checkFormConfig(model.getMetaInfo()); // 1.4 校验任务分配规则已配置 - taskAssignRuleService.checkTaskAssignRuleAllConfig(bpmnBytes); + taskCandidateInvoker.validateBpmnConfig(bpmnBytes); // 1.5 校验模型是否发生修改。如果未修改,则不允许创建 BpmProcessDefinitionCreateReqDTO definitionCreateReqDTO = BpmModelConvert.INSTANCE.convert2(model, form) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index dd5f035a9d..82f15beecf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.PageUtils; -import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java deleted file mode 100644 index 012141adf9..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleService.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import org.flowable.engine.delegate.DelegateExecution; - -import java.util.Set; - -/** - * BPM 任务分配规则 Service 接口 - * - * @author 芋道源码 - */ -public interface BpmTaskAssignRuleService { - - /** - * 校验流程模型的任务分配规则全部都配置了 - * 目的:如果有规则未配置,会导致流程任务找不到负责人,进而流程无法进行下去! - * - * @param bpmnBytes BPMN XML - */ - void checkTaskAssignRuleAllConfig(byte[] bpmnBytes); - - /** - * 计算当前执行任务的处理人 - * - * @param execution 执行任务 - * @return 处理人的编号数组 - */ - Set calculateTaskCandidateUsers(DelegateExecution execution); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java deleted file mode 100644 index a1474afd0d..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java +++ /dev/null @@ -1,254 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; -import cn.iocoder.yudao.framework.common.util.string.StrUtils; -import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; -import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.module.bpm.enums.DictTypeConstants; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; -import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.PostApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import com.google.common.annotations.VisibleForTesting; -import jakarta.annotation.Resource; -import lombok.extern.slf4j.Slf4j; -import org.dromara.hutool.core.convert.Convert; -import org.flowable.bpmn.model.BpmnModel; -import org.flowable.bpmn.model.FlowElement; -import org.flowable.bpmn.model.UserTask; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.context.annotation.Lazy; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import java.util.*; -import java.util.function.Function; - -import static cn.hutool.core.text.CharSequenceUtil.format; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; - -/** - * BPM 任务分配规则 Service 实现类 - */ -@Service -@Validated -@Slf4j -public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { - - @Resource - private BpmUserGroupService userGroupService; - @Resource - @Lazy // 解决循环依赖 - private BpmProcessInstanceService processInstanceService; - -// @Resource -// private ExpressionManager expressionManager; - - @Resource - private RoleApi roleApi; - @Resource - private DeptApi deptApi; - @Resource - private PostApi postApi; - @Resource - private AdminUserApi adminUserApi; - @Resource - private DictDataApi dictDataApi; - @Resource - private PermissionApi permissionApi; - - /** - * 任务分配脚本 - */ - private Map scriptMap = Collections.emptyMap(); - - @Resource - public void setScripts(List scripts) { - this.scriptMap = convertMap(scripts, script -> script.getEnum().getId()); - } - - @Override - public void checkTaskAssignRuleAllConfig(byte[] bpmnBytes) { - BpmnModel bpmnModel = BpmnModelUtils.getBpmnModel(bpmnBytes); - assert bpmnModel != null; - List userTaskList = BpmnModelUtils.getBpmnModelElements(bpmnModel, UserTask.class); - // 遍历所有的 UserTask,校验审批人配置 - userTaskList.forEach(userTask -> { - // TODO 芋艿:assignType/assignOptions/, 枚举 - Integer type = NumberUtils.parseInt(userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignType")); - String options = userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"); - if (type == null || StrUtil.isBlank(options)) { - throw exception(MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG, userTask.getName()); - } - // TODO 芋艿:校验 options - if (ObjectUtil.equal(type, BpmTaskAssignRuleTypeEnum.EXPRESS.getType())) { - return; - } - validTaskAssignRuleOptions(type, StrUtils.splitToLong(options, ",")); - }); - } - - private void validTaskAssignRuleOptions(Integer type, Collection options) { - if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.ROLE.getType())) { - roleApi.validRoleList(options); - } else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), - BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType())) { - deptApi.validateDeptList(options); - } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) { - postApi.validPostList(options); - } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER.getType())) { - adminUserApi.validateUserList(options); - } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER_GROUP.getType())) { - userGroupService.validUserGroups(options); - } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.SCRIPT.getType())) { - dictDataApi.validateDictDataList(DictTypeConstants.TASK_ASSIGN_SCRIPT, - CollectionUtils.convertSet(options, String::valueOf)); - } else { - throw new IllegalArgumentException(format("未知的规则类型({})", type)); - } - } - - public Long test(DelegateExecution execution) { - return 1L; - } - - public Long test2(DelegateExecution execution, Long id) { - return id; - } - - @Override - @DataPermission(enable = false) // 忽略数据权限,不然分配会存在问题 - public Set calculateTaskCandidateUsers(DelegateExecution execution) { - // 1. 先从提前选好的审批人中获取 - List assignee = processInstanceService.getAssigneeByProcessInstanceIdAndTaskDefinitionKey( - execution.getProcessInstanceId(), execution.getCurrentActivityId()); - if (CollUtil.isNotEmpty(assignee)) { - // TODO @hai:new HashSet 即可 - return convertSet(assignee, Function.identity()); - } - // 2. 通过分配规则,计算审批人 - return calculateTaskCandidateUsers0(execution); - } - - @VisibleForTesting - Set calculateTaskCandidateUsers0(DelegateExecution execution) { - // 获得审批人配置 - // TODO 芋艿:assignType/assignOptions/, 枚举 - FlowElement flowElement = execution.getCurrentFlowElement(); - Integer type = NumberUtils.parseInt(flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignType")); - String optionStr = flowElement.getAttributeValue(BpmnModelConstants.NAMESPACE, "assignOptions"); - Set options = null; - if (ObjectUtil.notEqual(BpmTaskAssignRuleTypeEnum.EXPRESS.getType(), type)) { - options = StrUtils.splitToLongSet(optionStr, ","); - } - - // 计算审批人 - Set assigneeUserIds = null; - if (Objects.equals(BpmTaskAssignRuleTypeEnum.ROLE.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByRole(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByDeptMember(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByDeptLeader(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.POST.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByPost(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByUser(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByUserGroup(options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.SCRIPT.getType(), type)) { - assigneeUserIds = calculateTaskCandidateUsersByScript(execution, options); - } else if (Objects.equals(BpmTaskAssignRuleTypeEnum.EXPRESS.getType(), type)) { - Object result = FlowableUtils.getExpressionValue(execution, optionStr); - assigneeUserIds = Convert.toSet(Long.class, result); - } - - // 移除被禁用的用户 - removeDisableUsers(assigneeUserIds); - // 如果候选人为空,抛出异常 - if (CollUtil.isEmpty(assigneeUserIds)) { - log.error("[calculateTaskCandidateUsers][流程任务({}/{}/{}) 任务规则({}/{}) 找不到候选人]", execution.getId(), - execution.getProcessDefinitionId(), execution.getCurrentActivityId(), type, options); - throw exception(TASK_CREATE_FAIL_NO_CANDIDATE_USER); - } - return assigneeUserIds; - } - - private Set calculateTaskCandidateUsersByRole(Set roleIds) { - return permissionApi.getUserRoleIdListByRoleIds(roleIds); - } - - private Set calculateTaskCandidateUsersByDeptMember(Set deptIds) { - List users = adminUserApi.getUserListByDeptIds(deptIds); - return convertSet(users, AdminUserRespDTO::getId); - } - - private Set calculateTaskCandidateUsersByDeptLeader(Set deptIds) { - List depts = deptApi.getDeptList(deptIds); - return convertSet(depts, DeptRespDTO::getLeaderUserId); - } - - private Set calculateTaskCandidateUsersByPost(Set postIds) { - List users = adminUserApi.getUserListByPostIds(postIds); - return convertSet(users, AdminUserRespDTO::getId); - } - - private Set calculateTaskCandidateUsersByUser(Set userIds) { - return userIds; - } - - private Set calculateTaskCandidateUsersByUserGroup(Set groupIds) { - List userGroups = userGroupService.getUserGroupList(groupIds); - Set userIds = new HashSet<>(); - userGroups.forEach(group -> userIds.addAll(group.getMemberUserIds())); - return userIds; - } - - private Set calculateTaskCandidateUsersByScript(DelegateExecution execution, Set scriptIds) { - // 获得对应的脚本 - List scripts = new ArrayList<>(scriptIds.size()); - scriptIds.forEach(scriptId -> { - BpmTaskAssignScript script = scriptMap.get(scriptId); - if (script == null) { - throw exception(TASK_ASSIGN_SCRIPT_NOT_EXISTS, scriptId); - } - scripts.add(script); - }); - // 逐个计算任务 - Set userIds = new HashSet<>(); - scripts.forEach(script -> CollUtil.addAll(userIds, script.calculateTaskCandidateUsers(execution))); - return userIds; - } - - @VisibleForTesting - void removeDisableUsers(Set assigneeUserIds) { - if (CollUtil.isEmpty(assigneeUserIds)) { - return; - } - Map userMap = adminUserApi.getUserMap(assigneeUserIds); - assigneeUserIds.removeIf(id -> { - AdminUserRespDTO user = userMap.get(id); - return user == null || !CommonStatusEnum.ENABLE.getStatus().equals(user.getStatus()); - }); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java index 208749a576..4d1db29585 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java @@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; /** * 流程抄送 Service 接口 @@ -13,14 +12,6 @@ import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; */ public interface BpmProcessInstanceCopyService { - // TODO 芋艿:这块要 review 下;思考下~~ - /** - * 抄送 - * @param sourceInfo 抄送源信息,方便抄送处理 - * @return - */ - boolean makeCopy(BpmCandidateSourceInfo sourceInfo); - /** * 流程实例的抄送 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java index 50d042cdc8..d800d1932d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java @@ -1,35 +1,22 @@ package cn.iocoder.yudao.module.bpm.service.task.cc; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; import cn.iocoder.yudao.module.bpm.dal.mysql.cc.BpmProcessInstanceCopyMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo; -import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessorChain; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; -import cn.iocoder.yudao.module.bpm.service.task.cc.dto.BpmDelegateExecutionDTO; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.flowable.engine.RuntimeService; -import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -45,12 +32,6 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy @Resource private BpmProcessInstanceCopyMapper processInstanceCopyMapper; - @Resource - private RuntimeService runtimeService; - - @Resource - private BpmCandidateSourceInfoProcessorChain processorChain; - @Resource @Lazy private BpmTaskService bpmTaskService; @@ -58,55 +39,6 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy @Lazy private BpmProcessInstanceService bpmProcessInstanceService; - @Override - public boolean makeCopy(BpmCandidateSourceInfo sourceInfo) { - if (null == sourceInfo) { - return false; - } - - Task task = bpmTaskService.getTask(sourceInfo.getTaskId()); - if (ObjectUtil.isNull(task)) { - return false; - } - String processInstanceId = task.getProcessInstanceId(); - if (StrUtil.isBlank(processInstanceId)) { - return false; - } - DelegateExecution executionEntity = new BpmDelegateExecutionDTO(processInstanceId); - Set ccCandidates = processorChain.calculateTaskCandidateUsers(executionEntity, sourceInfo); - if (CollUtil.isEmpty(ccCandidates)) { - log.warn("相关抄送人不存在 {}", sourceInfo.getTaskId()); - return false; - } else { - BpmProcessInstanceCopyDO copyDO = new BpmProcessInstanceCopyDO(); - // 调用 - // 设置任务id - copyDO.setTaskId(sourceInfo.getTaskId()); - copyDO.setTaskName(task.getName()); - copyDO.setProcessInstanceId(processInstanceId); - ProcessInstance processInstance = runtimeService.createProcessInstanceQuery() - .processInstanceId(processInstanceId) - .singleResult(); - if (null == processInstance) { - log.warn("相关流程实例不存在 {}", sourceInfo.getTaskId()); - return false; - } - copyDO.setStartUserId(Long.parseLong(processInstance.getStartUserId())); - copyDO.setProcessInstanceName(processInstance.getName()); - copyDO.setCategory(processInstance.getProcessDefinitionCategory()); - copyDO.setReason(sourceInfo.getReason()); - copyDO.setCreator(sourceInfo.getCreator()); - copyDO.setCreateTime(LocalDateTime.now()); - List copyList = new ArrayList<>(ccCandidates.size()); - for (Long userId : ccCandidates) { - BpmProcessInstanceCopyDO copy = BeanUtil.copyProperties(copyDO, BpmProcessInstanceCopyDO.class); - copy.setUserId(userId); - copyList.add(copy); - } - return processInstanceCopyMapper.insertBatch(copyList); - } - } - @Override public void createProcessInstanceCopy(Long userId, BpmProcessInstanceCopyCreateReqVO reqVO) { // 1.1 校验任务存在 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvokerTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvokerTest.java new file mode 100644 index 0000000000..702dce3f17 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvokerTest.java @@ -0,0 +1,93 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate; + +import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateUserStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.flowable.bpmn.model.UserTask; +import org.flowable.engine.delegate.DelegateExecution; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Spy; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** + * {@link BpmTaskCandidateInvoker} 的单元测试 + * + * @author 芋道源码 + */ +public class BpmTaskCandidateInvokerTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateInvoker taskCandidateInvoker; + + @Mock + private AdminUserApi adminUserApi; + @Spy + private BpmTaskCandidateStrategy strategy = new BpmTaskCandidateUserStrategy(); + @Spy + private List strategyList = Collections.singletonList(strategy); + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + DelegateExecution execution = mock(DelegateExecution.class); + // mock 方法(DelegateExecution) + UserTask userTask = mock(UserTask.class); + when(execution.getCurrentFlowElement()).thenReturn(userTask); + when(userTask.getAttributeValue(eq(BpmnModelConstants.NAMESPACE), eq(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY))) + .thenReturn(BpmTaskCandidateStrategyEnum.USER.getStrategy().toString()); + when(userTask.getAttributeValue(eq(BpmnModelConstants.NAMESPACE), eq(BpmnModelConstants.USER_TASK_CANDIDATE_PARAM))) + .thenReturn(param); + // mock 方法(adminUserApi) + AdminUserRespDTO user1 = randomPojo(AdminUserRespDTO.class, o -> o.setId(1L) + .setStatus(CommonStatusEnum.ENABLE.getStatus())); + AdminUserRespDTO user2 = randomPojo(AdminUserRespDTO.class, o -> o.setId(2L) + .setStatus(CommonStatusEnum.ENABLE.getStatus())); + Map userMap = MapUtil.builder(user1.getId(), user1) + .put(user2.getId(), user2).build(); + when(adminUserApi.getUserMap(eq(asSet(1L, 2L)))).thenReturn(userMap); + + // 调用 + Set results = taskCandidateInvoker.calculateUsers(execution); + // 断言 + assertEquals(asSet(1L, 2L), results); + } + + @Test + public void testRemoveDisableUsers() { + // 准备参数. 1L 可以找到;2L 是禁用的;3L 找不到 + Set assigneeUserIds = asSet(1L, 2L, 3L); + // mock 方法 + AdminUserRespDTO user1 = randomPojo(AdminUserRespDTO.class, o -> o.setId(1L) + .setStatus(CommonStatusEnum.ENABLE.getStatus())); + AdminUserRespDTO user2 = randomPojo(AdminUserRespDTO.class, o -> o.setId(2L) + .setStatus(CommonStatusEnum.DISABLE.getStatus())); + Map userMap = MapUtil.builder(user1.getId(), user1) + .put(user2.getId(), user2).build(); + when(adminUserApi.getUserMap(eq(assigneeUserIds))).thenReturn(userMap); + + // 调用 + taskCandidateInvoker.removeDisableUsers(assigneeUserIds); + // 断言 + assertEquals(asSet(1L), assigneeUserIds); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2ScriptTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java similarity index 86% rename from yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2ScriptTest.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java index f462780835..b9a77ca79e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/script/impl/BpmTaskAssignLeaderX2ScriptTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression; import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; @@ -21,10 +21,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -public class BpmTaskAssignLeaderX2ScriptTest extends BaseMockitoUnitTest { +public class BpmTaskAssignLeaderExpressionTest extends BaseMockitoUnitTest { @InjectMocks - private BpmTaskAssignLeaderX2Script script; + private BpmTaskAssignLeaderExpression expression; @Mock private AdminUserApi adminUserApi; @@ -34,7 +34,7 @@ public class BpmTaskAssignLeaderX2ScriptTest extends BaseMockitoUnitTest { private BpmProcessInstanceService bpmProcessInstanceService; @Test - public void testCalculateTaskCandidateUsers_noDept() { + public void testCalculateUsers_noDept() { // 准备参数 DelegateExecution execution = mockDelegateExecution(1L); // mock 方法(startUser) @@ -44,13 +44,13 @@ public class BpmTaskAssignLeaderX2ScriptTest extends BaseMockitoUnitTest { when(deptApi.getDept(eq(10L))).thenReturn(null); // 调用 - Set result = script.calculateTaskCandidateUsers(execution); + Set result = expression.calculateUsers(execution, 1); // 断言 assertEquals(0, result.size()); } @Test - public void testCalculateTaskCandidateUsers_noParentDept() { + public void testCalculateUsers_noParentDept() { // 准备参数 DelegateExecution execution = mockDelegateExecution(1L); // mock 方法(startUser) @@ -63,13 +63,13 @@ public class BpmTaskAssignLeaderX2ScriptTest extends BaseMockitoUnitTest { when(deptApi.getDept(eq(100L))).thenReturn(null); // 调用 - Set result = script.calculateTaskCandidateUsers(execution); + Set result = expression.calculateUsers(execution, 2); // 断言 assertEquals(asSet(20L), result); } @Test - public void testCalculateTaskCandidateUsers_existParentDept() { + public void testCalculateUsers_existParentDept() { // 准备参数 DelegateExecution execution = mockDelegateExecution(1L); // mock 方法(startUser) @@ -84,7 +84,7 @@ public class BpmTaskAssignLeaderX2ScriptTest extends BaseMockitoUnitTest { when(deptApi.getDept(eq(100L))).thenReturn(parentDept); // 调用 - Set result = script.calculateTaskCandidateUsers(execution); + Set result = expression.calculateUsers(execution, 2); // 断言 assertEquals(asSet(200L), result); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategyTest.java new file mode 100644 index 0000000000..9b89e2bd38 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategyTest.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static java.util.Arrays.asList; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +public class BpmTaskCandidateDeptLeaderStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateDeptLeaderStrategy strategy; + + @Mock + private DeptApi deptApi; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + // mock 方法 + DeptRespDTO dept1 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(11L)); + DeptRespDTO dept2 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(22L)); + when(deptApi.getDeptList(eq(asSet(1L, 2L)))).thenReturn(asList(dept1, dept2)); + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(11L, 22L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategyTest.java new file mode 100644 index 0000000000..4e72c0281a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategyTest.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import java.util.List; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +public class BpmTaskCandidateDeptMemberStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateDeptMemberStrategy strategy; + + @Mock + private AdminUserApi adminUserApi; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "11,22"; + // mock 方法 + List users = convertList(asSet(11L, 22L), + id -> new AdminUserRespDTO().setId(id)); + when(adminUserApi.getUserListByDeptIds(eq(asSet(11L, 22L)))).thenReturn(users); + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(11L, 22L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java new file mode 100644 index 0000000000..caa668eac8 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import org.flowable.engine.delegate.DelegateExecution; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockedStatic; + +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.*; + +public class BpmTaskCandidateExpressionStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateExpressionStrategy strategy; + + @Test + public void testCalculateUsers() { + try (MockedStatic flowableUtilMockedStatic = mockStatic(FlowableUtils.class)) { + // 准备参数 + String param = "1,2"; + DelegateExecution execution = mock(DelegateExecution.class); + // mock 方法 + flowableUtilMockedStatic.when(() -> FlowableUtils.getExpressionValue(same(execution), eq(param))) + .thenReturn(asSet(1L, 2L)); + + // 调用 + Set results = strategy.calculateUsers(execution, param); + // 断言 + assertEquals(asSet(1L, 2L), results); + } + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java new file mode 100644 index 0000000000..07958a51b7 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import java.util.Arrays; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +public class BpmTaskCandidateGroupStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateGroupStrategy strategy; + + @Mock + private BpmUserGroupService userGroupService; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + // mock 方法 + BpmUserGroupDO userGroup1 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(11L, 12L))); + BpmUserGroupDO userGroup2 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(21L, 22L))); + when(userGroupService.getUserGroupList(eq(asSet(1L, 2L)))).thenReturn(Arrays.asList(userGroup1, userGroup2)); + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(11L, 12L, 21L, 22L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategyTest.java new file mode 100644 index 0000000000..a30ce28eb0 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategyTest.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.system.api.dept.PostApi; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import java.util.List; +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +public class BpmTaskCandidatePostStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidatePostStrategy strategy; + + @Mock + private PostApi postApi; + @Mock + private AdminUserApi adminUserApi; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + // mock 方法 + List users = convertList(asSet(11L, 22L), + id -> new AdminUserRespDTO().setId(id)); + when(adminUserApi.getUserListByPostIds(eq(asSet(1L, 2L)))).thenReturn(users); + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(11L, 22L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategyTest.java new file mode 100644 index 0000000000..7c4247bcd1 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategyTest.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import cn.iocoder.yudao.module.system.api.permission.PermissionApi; +import cn.iocoder.yudao.module.system.api.permission.RoleApi; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +public class BpmTaskCandidateRoleStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateRoleStrategy strategy; + + @Mock + private RoleApi roleApi; + @Mock + private PermissionApi permissionApi; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + // mock 方法 + when(permissionApi.getUserRoleIdListByRoleIds(eq(asSet(1L, 2L)))) + .thenReturn(asSet(11L, 22L)); + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(11L, 22L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategyTest.java new file mode 100644 index 0000000000..d71ccebfd7 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategyTest.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; + +import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class BpmTaskCandidateUserStrategyTest extends BaseMockitoUnitTest { + + @InjectMocks + private BpmTaskCandidateUserStrategy strategy; + + @Test + public void testCalculateUsers() { + // 准备参数 + String param = "1,2"; + + // 调用 + Set results = strategy.calculateUsers(null, param); + // 断言 + assertEquals(asSet(1L, 2L), results); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChainTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChainTest.java deleted file mode 100644 index 29caf9ced7..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/candidate/BpmCandidateSourceInfoProcessorChainTest.java +++ /dev/null @@ -1,244 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.candidate; - -import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl.BpmTaskAssignLeaderX1Script; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl.BpmTaskAssignLeaderX2Script; -import cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor.BpmCandidateScriptApiSourceInfoProcessor; -import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.PostApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; -import org.flowable.engine.delegate.DelegateExecution; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; -import static java.util.Collections.singleton; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -@Disabled // TODO 芋艿:临时禁用,暂时不修复,等重构后解决 -@Import({BpmCandidateSourceInfoProcessorChain.class, - BpmCandidateScriptApiSourceInfoProcessor.class, BpmTaskAssignLeaderX1Script.class, - BpmTaskAssignLeaderX2Script.class}) -public class BpmCandidateSourceInfoProcessorChainTest extends BaseDbUnitTest { - @Resource - private BpmCandidateSourceInfoProcessorChain processorChain; - - @MockBean - private BpmUserGroupService userGroupService; - @MockBean - private DeptApi deptApi; - @MockBean - private AdminUserApi adminUserApi; - @MockBean - private PermissionApi permissionApi; - @MockBean - private RoleApi roleApi; - @MockBean - private PostApi postApi; - @MockBean - private DictDataApi dictDataApi; - @Resource - private BpmCandidateScriptApiSourceInfoProcessor bpmCandidateScriptApiSourceInfoProcessor; - - @Test - public void testCalculateTaskCandidateUsers_Role() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.ROLE.getType()); - // mock 方法 - when(permissionApi.getUserRoleIdListByRoleIds(eq(rule.getOptions()))) - .thenReturn(asSet(11L, 22L)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_DeptMember() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType()); - // mock 方法 - List users = CollectionUtils.convertList(asSet(11L, 22L), - id -> new AdminUserRespDTO().setId(id)); - when(adminUserApi.getUserListByDeptIds(eq(rule.getOptions()))).thenReturn(users); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_DeptLeader() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType()); - // mock 方法 - DeptRespDTO dept1 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(11L)); - DeptRespDTO dept2 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(22L)); - when(deptApi.getDeptList(eq(rule.getOptions()))).thenReturn(Arrays.asList(dept1, dept2)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_Post() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.POST.getType()); - // mock 方法 - List users = CollectionUtils.convertList(asSet(11L, 22L), - id -> new AdminUserRespDTO().setId(id)); - when(adminUserApi.getUserListByPostIds(eq(rule.getOptions()))).thenReturn(users); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_User() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.USER.getType()); - // mock 方法 - mockGetUserMap(asSet(1L, 2L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(1L, 2L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_UserGroup() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType()); - // mock 方法 - BpmUserGroupDO userGroup1 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(11L, 12L))); - BpmUserGroupDO userGroup2 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(21L, 22L))); - when(userGroupService.getUserGroupList(eq(rule.getOptions()))).thenReturn(Arrays.asList(userGroup1, userGroup2)); - mockGetUserMap(asSet(11L, 12L, 21L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 12L, 21L, 22L), results); - } - - private void mockGetUserMap(Set assigneeUserIds) { - Map userMap = CollectionUtils.convertMap(assigneeUserIds, id -> id, - id -> new AdminUserRespDTO().setId(id).setStatus(CommonStatusEnum.ENABLE.getStatus())); - when(adminUserApi.getUserMap(eq(assigneeUserIds))).thenReturn(userMap); - } - - @Test - public void testCalculateTaskCandidateUsers_Script() { - // 准备参数 - BpmTaskCandidateRuleVO rule = new BpmTaskCandidateRuleVO().setOptions(asSet(20L, 21L)) - .setType(BpmTaskAssignRuleTypeEnum.SCRIPT.getType()); - // mock 方法 - BpmTaskAssignScript script1 = new BpmTaskAssignScript() { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution task) { - return singleton(11L); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X1; - } - }; - BpmTaskAssignScript script2 = new BpmTaskAssignScript() { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution task) { - return singleton(22L); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X2; - } - }; - bpmCandidateScriptApiSourceInfoProcessor.setScripts(Arrays.asList(script1, script2)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - BpmCandidateSourceInfo sourceInfo = new BpmCandidateSourceInfo(); - sourceInfo.addRule(rule); - Set results = processorChain.calculateTaskCandidateUsers(null, sourceInfo); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testRemoveDisableUsers() { - // 准备参数. 1L 可以找到;2L 是禁用的;3L 找不到 - Set assigneeUserIds = asSet(1L, 2L, 3L); - // mock 方法 - AdminUserRespDTO user1 = randomPojo(AdminUserRespDTO.class, o -> o.setId(1L) - .setStatus(CommonStatusEnum.ENABLE.getStatus())); - AdminUserRespDTO user2 = randomPojo(AdminUserRespDTO.class, o -> o.setId(2L) - .setStatus(CommonStatusEnum.DISABLE.getStatus())); - Map userMap = MapUtil.builder(user1.getId(), user1) - .put(user2.getId(), user2).build(); - when(adminUserApi.getUserMap(eq(assigneeUserIds))).thenReturn(userMap); - - // 调用 - processorChain.removeDisableUsers(assigneeUserIds); - // 断言 - assertEquals(asSet(1L), assigneeUserIds); - } - -} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java deleted file mode 100644 index 2ca2ff914c..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java +++ /dev/null @@ -1,227 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.impl.BpmTaskAssignStartUserScript; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.PostApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import org.flowable.engine.delegate.DelegateExecution; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; - -import jakarta.annotation.Resource; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; -import static java.util.Collections.singleton; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -/** - * {@link BpmTaskAssignRuleService} 的单元测试 - * - * @author 芋道源码 - */ -@Import({BpmTaskAssignRuleServiceImpl.class, BpmTaskAssignStartUserScript.class}) // Import 引入 BpmTaskAssignStartUserScript 目的是保证不报错 -public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest { - - @Resource - private BpmTaskAssignRuleServiceImpl bpmTaskRuleService; - - @MockBean - private BpmUserGroupService userGroupService; - @MockBean - private DeptApi deptApi; - @MockBean - private AdminUserApi adminUserApi; - @MockBean - private PermissionApi permissionApi; - @MockBean - private RoleApi roleApi; - @MockBean - private PostApi postApi; - @MockBean - private DictDataApi dictDataApi; - - @Test - public void testCalculateTaskCandidateUsers_Role() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.ROLE.getType()); - // mock 方法 - when(permissionApi.getUserRoleIdListByRoleIds(eq(rule.getOptions()))) - .thenReturn(asSet(11L, 22L)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_DeptMember() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType()); - // mock 方法 - List users = CollectionUtils.convertList(asSet(11L, 22L), - id -> new AdminUserRespDTO().setId(id)); - when(adminUserApi.getUserListByDeptIds(eq(rule.getOptions()))).thenReturn(users); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_DeptLeader() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType()); - // mock 方法 - DeptRespDTO dept1 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(11L)); - DeptRespDTO dept2 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(22L)); - when(deptApi.getDeptList(eq(rule.getOptions()))).thenReturn(Arrays.asList(dept1, dept2)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_Post() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.POST.getType()); - // mock 方法 - List users = CollectionUtils.convertList(asSet(11L, 22L), - id -> new AdminUserRespDTO().setId(id)); - when(adminUserApi.getUserListByPostIds(eq(rule.getOptions()))).thenReturn(users); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_User() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.USER.getType()); - // mock 方法 - mockGetUserMap(asSet(1L, 2L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(1L, 2L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_UserGroup() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(1L, 2L)) - .setType(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType()); - // mock 方法 - BpmUserGroupDO userGroup1 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(11L, 12L))); - BpmUserGroupDO userGroup2 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(21L, 22L))); - when(userGroupService.getUserGroupList(eq(rule.getOptions()))).thenReturn(Arrays.asList(userGroup1, userGroup2)); - mockGetUserMap(asSet(11L, 12L, 21L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 12L, 21L, 22L), results); - } - - @Test - public void testCalculateTaskCandidateUsers_Script() { - // 准备参数 - BpmTaskAssignRuleDO rule = new BpmTaskAssignRuleDO().setOptions(asSet(20L, 21L)) - .setType(BpmTaskAssignRuleTypeEnum.SCRIPT.getType()); - // mock 方法 - BpmTaskAssignScript script1 = new BpmTaskAssignScript() { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution task) { - return singleton(11L); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X1; - } - }; - BpmTaskAssignScript script2 = new BpmTaskAssignScript() { - - @Override - public Set calculateTaskCandidateUsers(DelegateExecution task) { - return singleton(22L); - } - - @Override - public BpmTaskRuleScriptEnum getEnum() { - return BpmTaskRuleScriptEnum.LEADER_X2; - } - }; - bpmTaskRuleService.setScripts(Arrays.asList(script1, script2)); - mockGetUserMap(asSet(11L, 22L)); - - // 调用 - Set results = bpmTaskRuleService.calculateTaskCandidateUsers(null, rule); - // 断言 - assertEquals(asSet(11L, 22L), results); - } - - @Test - public void testRemoveDisableUsers() { - // 准备参数. 1L 可以找到;2L 是禁用的;3L 找不到 - Set assigneeUserIds = asSet(1L, 2L, 3L); - // mock 方法 - AdminUserRespDTO user1 = randomPojo(AdminUserRespDTO.class, o -> o.setId(1L) - .setStatus(CommonStatusEnum.ENABLE.getStatus())); - AdminUserRespDTO user2 = randomPojo(AdminUserRespDTO.class, o -> o.setId(2L) - .setStatus(CommonStatusEnum.DISABLE.getStatus())); - Map userMap = MapUtil.builder(user1.getId(), user1) - .put(user2.getId(), user2).build(); - when(adminUserApi.getUserMap(eq(assigneeUserIds))).thenReturn(userMap); - - // 调用 - bpmTaskRuleService.removeDisableUsers(assigneeUserIds); - // 断言 - assertEquals(asSet(1L), assigneeUserIds); - } - - private void mockGetUserMap(Set assigneeUserIds) { - Map userMap = CollectionUtils.convertMap(assigneeUserIds, id -> id, - id -> new AdminUserRespDTO().setId(id).setStatus(CommonStatusEnum.ENABLE.getStatus())); - when(adminUserApi.getUserMap(eq(assigneeUserIds))).thenReturn(userMap); - } - -} diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/package-info.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/package-info.java deleted file mode 100644 index de8d6279d7..0000000000 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.framework.flowable.core; diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/package-info.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/package-info.java deleted file mode 100644 index 324d3de0ec..0000000000 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.framework.flowable; -- Gitee From c4dedf4d48f491238fcf5be2f242d3867ec070ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=8B=97?= <909275705@qq.com> Date: Fri, 15 Mar 2024 02:22:39 +0000 Subject: [PATCH 0054/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86=E5=93=81=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E4=B8=BA0=E6=88=96=E6=9B=B4=E4=BD=8E?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风狗 <909275705@qq.com> --- .../module/trade/controller/app/cart/vo/AppCartAddReqVO.java | 1 + 1 file changed, 1 insertion(+) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java index b538f6174e..67e7f03fde 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java @@ -15,6 +15,7 @@ public class AppCartAddReqVO { @Schema(description = "新增商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "数量不能为空") + @Min(value = 1, message = "商品数量必须大于等于1") private Integer count; } -- Gitee From 705a3e53cae4df60995c9e27274bcdf6e5a7607d Mon Sep 17 00:00:00 2001 From: scholar <1145227973@qq.com> Date: Fri, 15 Mar 2024 12:09:19 +0800 Subject: [PATCH 0055/1557] =?UTF-8?q?CRM=E5=91=98=E5=B7=A5=E4=B8=9A?= =?UTF-8?q?=E7=BB=A9=E7=BB=9F=E8=AE=A1PR=20v2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceController.java | 52 ++++++ .../CrmStatisticsPerformanceReqVO.java | 41 +++++ .../CrmStatisticsPerformanceRespVO.java | 24 +++ .../CrmStatisticsPerformanceMapper.java | 41 +++++ .../CrmStatisticsPerformanceService.java | 42 +++++ .../CrmStatisticsPerformanceServiceImpl.java | 99 ++++++++++++ .../CrmStatisticsPerformanceMapper.xml | 152 ++++++++++++++++++ 7 files changed, 451 insertions(+) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPerformanceMapper.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java new file mode 100644 index 0000000000..1438a12dba --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsPerformanceService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + + +@Tag(name = "管理后台 - CRM 员工业绩统计") +@RestController +@RequestMapping("/crm/statistics-performance") +@Validated +public class CrmStatisticsPerformanceController { + + @Resource + private CrmStatisticsPerformanceService performanceService; + + @GetMapping("/get-contract-count-performance") + @Operation(summary = "员工业绩-签约合同数量") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getContractCountPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) { + return success(performanceService.getContractCountPerformance(performanceReqVO)); + } + + @GetMapping("/get-contract-price-performance") + @Operation(summary = "员工业绩-获得合同金额") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getContractPriceStaffPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) { + return success(performanceService.getContractPricePerformance(performanceReqVO)); + } + + @GetMapping("/get-receivable-price-performance") + @Operation(summary = "员工业绩-获得回款金额") + @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')") + public CommonResult> getReceivablePriceStaffPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) { + return success(performanceService.getReceivablePricePerformance(performanceReqVO)); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java new file mode 100644 index 0000000000..bfb5c840f5 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - CRM 员工业绩统计 Request VO") +@Data +public class CrmStatisticsPerformanceReqVO { + + @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "部门 id 不能为空") + private Long deptId; + + /** + * 负责人用户 id, 当用户为空, 则计算部门下用户 + */ + @Schema(description = "负责人用户 id", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + private Long userId; + + /** + * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 + *

+ * 后续,可能会支持选择部分用户进行查询 + */ + @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") + private List userIds; + + @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @NotEmpty(message = "时间范围不能为空") + private LocalDateTime[] times; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceRespVO.java new file mode 100644 index 0000000000..8b217fd41c --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceRespVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import java.math.BigDecimal; + + +@Schema(description = "管理后台 - CRM 员工业绩统计 Response VO") +@Data +public class CrmStatisticsPerformanceRespVO { + + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String time; + + @Schema(description = "当月统计结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private BigDecimal currentMonthCount; + + @Schema(description = "上月统计结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private BigDecimal lastMonthCount; + + @Schema(description = "去年同期统计结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") + private BigDecimal lastYearCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPerformanceMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPerformanceMapper.java new file mode 100644 index 0000000000..09702f2904 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPerformanceMapper.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * CRM 员工业绩分析 Mapper + * + * @author scholar + */ +@Mapper +public interface CrmStatisticsPerformanceMapper { + + /** + * 员工签约合同数量 + * + * @param performanceReqVO 参数 + * @return 员工签约合同数量 + */ + List selectContractCountPerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + + /** + * 员工签约合同金额 + * + * @param performanceReqVO 参数 + * @return 员工签约合同金额 + */ + List selectContractPricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + + /** + * 员工回款金额 + * + * @param performanceReqVO 参数 + * @return 员工回款金额 + */ + List selectReceivablePricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceService.java new file mode 100644 index 0000000000..354bbab256 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceService.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + + + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; + +import java.util.List; + +/** + * CRM 员工绩效统计 Service 接口 + * + * @author scholar + */ +public interface CrmStatisticsPerformanceService { + + /** + * 员工签约合同数量分析 + * + * @param performanceReqVO 排行参数 + * @return 员工签约合同数量排行分析 + */ + List getContractCountPerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + + /** + * 员工签约合同金额分析 + * + * @param performanceReqVO 排行参数 + * @return 员工签约合同金额分析 + */ + List getContractPricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + + /** + * 员工获得回款金额分析 + * + * @param performanceReqVO 排行参数 + * @return 员工获得回款金额分析 + */ + List getReceivablePricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO); + + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java new file mode 100644 index 0000000000..067be4f431 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -0,0 +1,99 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsPerformanceMapper; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import jakarta.annotation.Resource; +import java.util.Collections; +import java.util.List; +import java.util.function.Function; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; + +/** + * CRM 员工业绩分析 Service 实现类 + * + * @author scholar + */ +@Service +@Validated +public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerformanceService { + + @Resource + private CrmStatisticsPerformanceMapper performanceMapper; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + + + @Override + public List getContractCountPerformance(CrmStatisticsPerformanceReqVO performanceReqVO) { + return getPerformance(performanceReqVO, performanceMapper::selectContractCountPerformance); + } + + @Override + public List getContractPricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO) { + return getPerformance(performanceReqVO, performanceMapper::selectContractPricePerformance); + } + + @Override + public List getReceivablePricePerformance(CrmStatisticsPerformanceReqVO performanceReqVO) { + return getPerformance(performanceReqVO, performanceMapper::selectReceivablePricePerformance); + } + + /** + * 获得员工业绩数据 + * + * @param performanceReqVO 参数 + * @param performanceFunction 排行榜方法 + * @return 排行版数据 + */ + private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, Function> performanceFunction) { + + // 1. 获得用户编号数组 + final List userIds = getUserIds(performanceReqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + performanceReqVO.setUserIds(userIds); + // 2. 获得排行数据 + List performance = performanceFunction.apply(performanceReqVO); + if (CollUtil.isEmpty(performance)) { + return Collections.emptyList(); + } + return performance; + } + + /** + * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 + * + * @param reqVO 请求参数 + * @return 用户编号数组 + */ + private List getUserIds(CrmStatisticsPerformanceReqVO reqVO) { + // 情况一:选中某个用户 + if (ObjUtil.isNotNull(reqVO.getUserId())) { + return List.of(reqVO.getUserId()); + } + // 情况二:选中某个部门 + // 2.1 获得部门列表 + final Long deptId = reqVO.getDeptId(); + List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); + deptIds.add(deptId); + // 2.2 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); + } + +} \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml new file mode 100644 index 0000000000..10b952bac2 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + -- Gitee From 711cfcb3f6f3427258b03a62f2a82fe257eb7392 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 15 Mar 2024 19:45:52 +0800 Subject: [PATCH 0056/1557] =?UTF-8?q?client=20=E7=A7=BB=E9=99=A4=20Abstrac?= =?UTF-8?q?tFunctionCallSupport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/chatqianwen/QianWenApi.java | 2 + .../ai/chatqianwen/QianWenChatClient.java | 41 +--------------- .../ai/chatxinghuo/XingHuoChatClient.java | 33 +------------ .../ai/chatyiyan/YiYanChatClient.java | 47 ++----------------- .../function/AbstractFunctionCallSupport.java | 5 ++ .../ai/model/function/FunctionCallback.java | 7 +++ 6 files changed, 21 insertions(+), 114 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java index 93a92364c0..08d3b8ca57 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java @@ -78,6 +78,8 @@ public class QianWenApi { new CompletionsRequest() // 设置 appid .setAppId(appId) + // 开启 stream + .setStream(true) .setMessages(List.of(message)) //开启增量输出模式,后面输出不会包含已经输出的内容 .setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(true)) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 7b4a60baf8..cf0eae0dd7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -5,13 +5,7 @@ import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.Generation; import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionMessage; -import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; -import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; -import cn.iocoder.yudao.framework.ai.model.function.FunctionCallbackContext; import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; import com.aliyun.broadscope.bailian.sdk.models.ChatUserMessage; import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; @@ -36,13 +30,11 @@ import java.util.stream.Collectors; * time: 2024/3/13 21:06 */ @Slf4j -public class QianWenChatClient extends AbstractFunctionCallSupport> - implements ChatClient, StreamingChatClient { +public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenApi qianWenApi; public QianWenChatClient(QianWenApi qianWenApi) { - super(null); this.qianWenApi = qianWenApi; } @@ -61,10 +53,6 @@ public class QianWenChatClient extends AbstractFunctionCallSupport { @@ -72,7 +60,7 @@ public class QianWenChatClient extends AbstractFunctionCallSupport responseEntity = this.callWithFunctionSupport(request); + ResponseEntity responseEntity = qianWenApi.chatCompletionEntity(request); // 获取结果封装 chatCompletion CompletionsResponse response = responseEntity.getBody(); if (!response.isSuccess()) { @@ -100,29 +88,4 @@ public class QianWenChatClient extends AbstractFunctionCallSupport conversationHistory) { - return null; - } - - @Override - protected List doGetUserMessages(ChatRequestMessage request) { - return null; - } - - @Override - protected QianWenChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { - return null; - } - - @Override - protected ResponseEntity doChatCompletion(ChatRequestMessage request) { - return qianWenApi.chatCompletionEntity(request); - } - - @Override - protected boolean isToolFunctionCall(ResponseEntity response) { - return false; - } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java index a750e1c8f4..23e85be6d3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java @@ -6,10 +6,8 @@ import cn.iocoder.yudao.framework.ai.chat.Generation; import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionMessage; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; import cn.iocoder.yudao.framework.ai.chatxinghuo.exception.XingHuoApiException; -import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; @@ -29,8 +27,7 @@ import java.util.stream.Collectors; * time: 2024/3/11 10:19 */ @Slf4j -public class XingHuoChatClient extends AbstractFunctionCallSupport> - implements ChatClient, StreamingChatClient { +public class XingHuoChatClient implements ChatClient, StreamingChatClient { private XingHuoApi xingHuoApi; @@ -52,7 +49,6 @@ public class XingHuoChatClient extends AbstractFunctionCallSupport response = this.callWithFunctionSupport(request); + ResponseEntity response = xingHuoApi.chatCompletionEntity(request); // 获取结果封装 ChatResponse return new ChatResponse(List.of(new Generation(response.getBody().getPayload().getChoices().getText().get(0).getContent()))); }); @@ -102,29 +98,4 @@ public class XingHuoChatClient extends AbstractFunctionCallSupport conversationHistory) { - return null; - } - - @Override - protected List doGetUserMessages(XingHuoChatCompletionRequest request) { - return null; - } - - @Override - protected XingHuoChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { - return null; - } - - @Override - protected ResponseEntity doChatCompletion(XingHuoChatCompletionRequest request) { - return xingHuoApi.chatCompletionEntity(request); - } - - @Override - protected boolean isToolFunctionCall(ResponseEntity response) { - return false; - } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java index fb7f155b48..58cc622c4c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java @@ -7,13 +7,9 @@ import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; import cn.iocoder.yudao.framework.ai.chat.messages.Message; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionMessage; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; -import cn.iocoder.yudao.framework.ai.model.function.AbstractFunctionCallSupport; -import cn.iocoder.yudao.framework.ai.model.function.FunctionCallbackContext; import lombok.extern.slf4j.Slf4j; - import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; @@ -32,14 +28,11 @@ import java.util.List; * time: 2024/3/8 19:11 */ @Slf4j -public class YiYanChatClient - extends AbstractFunctionCallSupport> - implements ChatClient, StreamingChatClient { +public class YiYanChatClient implements ChatClient, StreamingChatClient { private YiYanApi yiYanApi; public YiYanChatClient(YiYanApi yiYanApi) { - super(new FunctionCallbackContext()); this.yiYanApi = yiYanApi; } @@ -70,7 +63,7 @@ public class YiYanChatClient // 创建 request 请求,stream模式需要供应商支持 YiYanChatCompletionRequest request = this.createRequest(prompt, false); // 调用 callWithFunctionSupport 发送请求 - ResponseEntity response = this.callWithFunctionSupport(request); + ResponseEntity response = yiYanApi.chatCompletionEntity(request); // 获取结果封装 ChatResponse YiYanChatCompletion chatCompletion = response.getBody(); return new ChatResponse(List.of(new Generation(chatCompletion.getResult()))); @@ -98,40 +91,6 @@ public class YiYanChatClient YiYanChatCompletionRequest request = this.createRequest(prompt, true); // 调用 callWithFunctionSupport 发送请求 Flux response = this.yiYanApi.chatCompletionStream(request); -// response.subscribe(new Consumer() { -// @Override -// public void accept(YiYanChatCompletion chatCompletion) { -// // {"id":"as-p0nfjuuasg","object":"chat.completion","created":1710033402,"sentence_id":0,"is_end":false,"is_truncated":false,"result":"编程语","need_clear_history":false,"finish_reason":"normal","usage":{"prompt_tokens":5,"completion_tokens":0,"total_tokens":5}} -// System.err.println(chatCompletion); -// } -// }); - return response.map(res -> { - return new ChatResponse(List.of(new Generation(res.getResult()))); - }); - } - - @Override - protected YiYanChatCompletionRequest doCreateToolResponseRequest(YiYanChatCompletionRequest previousRequest, YiYanChatCompletionMessage responseMessage, List conversationHistory) { - return null; - } - - @Override - protected List doGetUserMessages(YiYanChatCompletionRequest request) { - return null; - } - - @Override - protected YiYanChatCompletionMessage doGetToolResponseMessage(ResponseEntity response) { - return null; - } - - @Override - protected ResponseEntity doChatCompletion(YiYanChatCompletionRequest request) { - return yiYanApi.chatCompletionEntity(request); - } - - @Override - protected boolean isToolFunctionCall(ResponseEntity response) { - return false; + return response.map(res -> new ChatResponse(List.of(new Generation(res.getResult())))); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java index d5becdbb55..33409f72d6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java @@ -29,11 +29,16 @@ public abstract class AbstractFunctionCallSupport { protected final static boolean IS_RUNTIME_CALL = true; /** + * 函数回调寄存器用于按名称解析函数回调。 + * * The function callback register is used to resolve the function callbacks by name. */ protected final Map functionCallbackRegister = new ConcurrentHashMap<>(); /** + * 函数回调上下文用于按名称解析函数回调来自Spring上下文。 + * 它是可选的,通常与Spring一起使用自动配置。 + * * The function callback context is used to resolve the function callbacks by name * from the Spring context. It is optional and usually used with Spring * auto-configuration. diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java index d644d517ac..a14a59b8fc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java @@ -17,6 +17,13 @@ package cn.iocoder.yudao.framework.ai.model.function; /** + * + * 表示模型函数调用处理程序。实现已向注册对触发函数调用的提示进行建模和调用。 + * + * https://blog.csdn.net/weixin_37546425/article/details/136402740 + * + * https://www.163.com/dy/article/ICE2S20P05119NPR.html + * * Represents a model function call handler. Implementations are registered with the * Models and called on prompts that trigger the function call. * -- Gitee From a1defeb48af149a3277498a41b84642560ecdb5a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 15 Mar 2024 21:08:43 +0800 Subject: [PATCH 0057/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E4=BC=9A=E7=AD=BE=E3=80=81=E6=88=96=E7=AD=BE?= =?UTF-8?q?=E7=9A=84=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../behavior/BpmActivityBehaviorFactory.java | 12 +++-- .../BpmParallelMultiInstanceBehavior.java | 6 +-- .../BpmSequentialMultiInstanceBehavior.java | 50 +++++++++++++++++++ .../behavior/BpmUserTaskActivityBehavior.java | 3 +- 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java index e9f1f32d7c..b5278f5aba 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmActivityBehaviorFactory.java @@ -6,6 +6,7 @@ import org.flowable.bpmn.model.Activity; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; import org.flowable.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior; +import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior; import org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior; import org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory; @@ -28,11 +29,16 @@ public class BpmActivityBehaviorFactory extends DefaultActivityBehaviorFactory { @Override public ParallelMultiInstanceBehavior createParallelMultiInstanceBehavior(Activity activity, - AbstractBpmnActivityBehavior innerActivityBehavior) { - return new BpmParallelMultiInstanceBehavior(activity, innerActivityBehavior) + AbstractBpmnActivityBehavior behavior) { + return new BpmParallelMultiInstanceBehavior(activity, behavior) .setTaskCandidateInvoker(taskCandidateInvoker); } - // TODO @ke:SequentialMultiInstanceBehavior 这个抽空也可以看看 + @Override + public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(Activity activity, + AbstractBpmnActivityBehavior behavior) { + return new BpmSequentialMultiInstanceBehavior(activity, behavior) + .setTaskCandidateInvoker(taskCandidateInvoker); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java index ed51b23fa2..938d04ed1d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; -import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.Activity; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; @@ -17,12 +16,11 @@ import java.util.Set; * 第二步,将【多个】任务候选人们,设置到 DelegateExecution 的 collectionVariable 变量中,以便 BpmUserTaskActivityBehavior 使用它 * * @author kemengkai - * @date 2022-04-21 16:57 + * @since 2022-04-21 16:57 */ -@Slf4j +@Setter public class BpmParallelMultiInstanceBehavior extends ParallelMultiInstanceBehavior { - @Setter private BpmTaskCandidateInvoker taskCandidateInvoker; public BpmParallelMultiInstanceBehavior(Activity activity, diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java new file mode 100644 index 0000000000..1e4ebc1416 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; + +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; +import lombok.Setter; +import org.flowable.bpmn.model.Activity; +import org.flowable.engine.delegate.DelegateExecution; +import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; +import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior; + +import java.util.LinkedHashSet; +import java.util.Set; + +/** + * 自定义的【串行】的【多个】流程任务的 assignee 负责人的分配 + * + * 本质上,实现和 {@link BpmParallelMultiInstanceBehavior} 一样,只是继承的类不一样 + * + * @author 芋道源码 + */ +@Setter +public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceBehavior { + + private BpmTaskCandidateInvoker taskCandidateInvoker; + + public BpmSequentialMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) { + super(activity, innerActivityBehavior); + } + + /** + * 逻辑和 {@link BpmParallelMultiInstanceBehavior#resolveNrOfInstances(DelegateExecution)} 类似 + * + * 差异的点:是在【第二步】的时候,需要返回 LinkedHashSet 集合!因为它需要有序! + */ + @Override + protected int resolveNrOfInstances(DelegateExecution execution) { + // 第一步,设置 collectionVariable 和 CollectionVariable + // 从 execution.getVariable() 读取所有任务处理人的 key + super.collectionExpression = null; // collectionExpression 和 collectionVariable 是互斥的 + super.collectionVariable = FlowableUtils.formatCollectionVariable(execution.getCurrentActivityId()); + // 从 execution.getVariable() 读取当前所有任务处理的人的 key + super.collectionElementVariable = FlowableUtils.formatCollectionElementVariable(execution.getCurrentActivityId()); + + // 第二步,获取任务的所有处理人 + Set assigneeUserIds = new LinkedHashSet<>(taskCandidateInvoker.calculateUsers(execution)); // 保证有序!!! + execution.setVariable(super.collectionVariable, assigneeUserIds); + return assigneeUserIds.size(); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java index de17502bf2..c494652731 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmUserTaskActivityBehavior.java @@ -47,7 +47,8 @@ public class BpmUserTaskActivityBehavior extends UserTaskActivityBehavior { } private Long calculateTaskCandidateUsers(DelegateExecution execution) { - // 情况一,如果是多实例的任务,例如说会签、或签等情况,则从 Variable 中获取。它的任务处理人在 BpmParallelMultiInstanceBehavior 中已经被分配了 + // 情况一,如果是多实例的任务,例如说会签、或签等情况,则从 Variable 中获取。 + // 顺序审批可见 BpmSequentialMultiInstanceBehavior,并发审批可见 BpmSequentialMultiInstanceBehavior if (super.multiInstanceActivityBehavior != null) { return execution.getVariable(super.multiInstanceActivityBehavior.getCollectionElementVariable(), Long.class); } -- Gitee From 7a785b1ec073171e849cd775f3bf6dfc06b8a1be Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 10:00:13 +0800 Subject: [PATCH 0058/1557] =?UTF-8?q?=E9=98=BF=E9=87=8C=E9=80=9A=E4=B9=89?= =?UTF-8?q?=E5=8D=83=E9=97=AE=EF=BC=8C=E7=BB=A7=E6=89=BF=20chat=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/chat/ChatException.java | 15 ++ .../framework/ai/chatqianwen/QianWenApi.java | 39 +----- .../ai/chatqianwen/QianWenChatClient.java | 83 ++++++++++-- .../ai/chatqianwen/QianWenOptions.java | 128 ++++++++++++++++++ .../ai/chat/QianWenChatClientTests.java | 9 +- 5 files changed, 226 insertions(+), 48 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java new file mode 100644 index 0000000000..2b96601548 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.framework.ai.chat; + +/** + * 聊天异常 + * + * author: fansili + * time: 2024/3/15 20:45 + */ +public class ChatException extends RuntimeException { + + public ChatException(String message) { + super(message); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java index 08d3b8ca57..aefabc62a4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.framework.ai.chatqianwen; import com.aliyun.broadscope.bailian.sdk.AccessTokenClient; import com.aliyun.broadscope.bailian.sdk.ApplicationClient; -import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; import com.aliyun.broadscope.bailian.sdk.models.CompletionsRequest; import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; import lombok.Getter; @@ -10,8 +9,6 @@ import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import reactor.core.publisher.Flux; -import java.util.List; - /** * 阿里 通义千问 * @@ -35,11 +32,10 @@ public class QianWenApi { private String token; private ApplicationClient client; - public QianWenApi(String accessKeyId, String accessKeySecret, String agentKey, String appId, String endpoint) { + public QianWenApi(String accessKeyId, String accessKeySecret, String agentKey, String endpoint) { this.accessKeyId = accessKeyId; this.accessKeySecret = accessKeySecret; this.agentKey = agentKey; - this.appId = appId; if (endpoint != null) { this.endpoint = endpoint; @@ -54,35 +50,14 @@ public class QianWenApi { .build(); } - public ResponseEntity chatCompletionEntity(ChatRequestMessage message) { - // 创建request - CompletionsRequest request = new CompletionsRequest() - // 设置 appid - .setAppId(appId) - .setMessages(List.of(message)) - // 返回choice message结果 - .setParameters(new CompletionsRequest.Parameter().setResultFormat("message")); - // + public ResponseEntity chatCompletionEntity(CompletionsRequest request) { + // 发送请求 CompletionsResponse response = client.completions(request); - int httpCode = 200; - if (!response.isSuccess()) { - System.out.printf("failed to create completion, requestId: %s, code: %s, message: %s\n", - response.getRequestId(), response.getCode(), response.getMessage()); - httpCode = 500; - } - return new ResponseEntity<>(response, HttpStatusCode.valueOf(httpCode)); + // 阿里云的这个 http code 随便设置,外面判断是否成功用的 CompletionsResponse.isSuccess + return new ResponseEntity<>(response, HttpStatusCode.valueOf(200)); } - public Flux chatCompletionStream(ChatRequestMessage message) { - return client.streamCompletions( - new CompletionsRequest() - // 设置 appid - .setAppId(appId) - // 开启 stream - .setStream(true) - .setMessages(List.of(message)) - //开启增量输出模式,后面输出不会包含已经输出的内容 - .setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(true)) - ); + public Flux chatCompletionStream(CompletionsRequest request) { + return client.streamCompletions(request); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index cf0eae0dd7..4be2bf03e7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -1,14 +1,13 @@ package cn.iocoder.yudao.framework.ai.chatqianwen; -import cn.iocoder.yudao.framework.ai.chat.ChatClient; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.Generation; -import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.hutool.core.util.IdUtil; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.ai.chat.*; +import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; -import com.aliyun.broadscope.bailian.sdk.models.ChatRequestMessage; -import com.aliyun.broadscope.bailian.sdk.models.ChatUserMessage; -import com.aliyun.broadscope.bailian.sdk.models.CompletionsResponse; +import com.aliyun.broadscope.bailian.sdk.models.*; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; @@ -19,6 +18,7 @@ import reactor.core.publisher.Flux; import java.time.Duration; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; /** @@ -34,10 +34,17 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenApi qianWenApi; + private ChatOptions chatOptions; + public QianWenChatClient(QianWenApi qianWenApi) { this.qianWenApi = qianWenApi; } + public QianWenChatClient(QianWenApi qianWenApi, ChatOptions chatOptions) { + this.qianWenApi = qianWenApi; + this.chatOptions = chatOptions; + } + public final RetryTemplate retryTemplate = RetryTemplate.builder() // 最大重试次数 10 .maxAttempts(10) @@ -58,7 +65,7 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { return this.retryTemplate.execute(ctx -> { // ctx 会有重试的信息 // 创建 request 请求,stream模式需要供应商支持 - ChatRequestMessage request = this.createRequest(prompt, false); + CompletionsRequest request = this.createRequest(prompt, false); // 调用 callWithFunctionSupport 发送请求 ResponseEntity responseEntity = qianWenApi.chatCompletionEntity(request); // 获取结果封装 chatCompletion @@ -67,21 +74,69 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { return new ChatResponse(List.of(new Generation(String.format("failed to create completion, requestId: %s, code: %s, message: %s\n", response.getRequestId(), response.getCode(), response.getMessage())))); } - List generations = response.getData().getChoices().stream() - .map(item -> new Generation(item.getMessage().getContent())).collect(Collectors.toList()); - return new ChatResponse(generations); + // 转换为 Generation 返回 + return new ChatResponse(List.of(new Generation(response.getData().getText()))); }); } - private ChatRequestMessage createRequest(Prompt prompt, boolean b) { - return new ChatUserMessage(prompt.getContents()); + private CompletionsRequest createRequest(Prompt prompt, boolean stream) { + // 两个都为null 则没有配置文件 + if (chatOptions == null && prompt.getOptions() == null) { + throw new ChatException("ChatOptions 未配置参数!"); + } + // 优先使用 Prompt 里面的 ChatOptions + ChatOptions options = chatOptions; + if (prompt.getOptions() != null) { + options = (ChatOptions) prompt.getOptions(); + } + QianWenOptions qianWenOptions = (QianWenOptions) options; + // 需要额外处理 + if (!stream) { + // 如果不需要 stream 输出,那么需要将这个设置为false,不然只会输出最后几个文字 + if (qianWenOptions.getParameters() == null) { + qianWenOptions.setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(false)); + } else { + qianWenOptions.getParameters().setIncrementalOutput(false); + } + } else { + // 如果不需要 stream 输出,设置为true这样不会输出累加内容 + if (qianWenOptions.getParameters() == null) { + qianWenOptions.setParameters(new CompletionsRequest.Parameter().setIncrementalOutput(true)); + } else { + qianWenOptions.getParameters().setIncrementalOutput(true); + } + } + + // 创建request + return new CompletionsRequest() + // 请求唯一标识,请确保RequestId不重复。 + .setRequestId(IdUtil.getSnowflakeNextIdStr()) + // 设置 appid + .setAppId(qianWenOptions.getAppId()) + .setMessages(prompt.getInstructions().stream().map(m -> { + // 转换成 千问 对于的请求message + if (MessageType.USER == m.getMessageType()) { + return new ChatUserMessage(m.getContent()); + } else if (MessageType.SYSTEM == m.getMessageType()) { + return new ChatSystemMessage(m.getContent()); + } else if (MessageType.ASSISTANT == m.getMessageType()) { + return new ChatAssistantMessage(m.getContent()); + } + throw new ChatException(String.format("存在不能适配的消息! %s", JSONUtil.toJsonPrettyStr(m))); + }).collect(Collectors.toList())) + // 返回choice message结果 + .setParameters(qianWenOptions.getParameters()) + // 设置 ChatOptions 里面公共的参数 + .setTopP(options.getTopP() == null ? null : options.getTopP().doubleValue()) + // 设置输出方式 + .setStream(stream); } @Override public Flux stream(Prompt prompt) { // ctx 会有重试的信息 // 创建 request 请求,stream模式需要供应商支持 - ChatRequestMessage request = this.createRequest(prompt, true); + CompletionsRequest request = this.createRequest(prompt, true); // 调用 callWithFunctionSupport 发送请求 Flux response = this.qianWenApi.chatCompletionStream(request); return response.map(res -> { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java new file mode 100644 index 0000000000..26c6ef66fe --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.framework.ai.chatqianwen; + +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import com.aliyun.broadscope.bailian.sdk.models.CompletionsRequest; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 阿里云 千问 属性 + * + * 地址:https://help.aliyun.com/document_detail/2684682.html?spm=a2c4g.2621347.0.0.195117e7Ytpkyo + * + * author: fansili + * time: 2024/3/15 19:57 + */ +@Data +@Accessors +public class QianWenOptions implements ChatOptions { + + private String appId; + /** + * 是否流式输出, 默认为否。 + */ + private Boolean stream; + /** + * 用户与模型的对话历史 + */ + private List messages; + /** + * 生成时,核采样方法的概率阈值。例如,取值为0.8时,仅保留累计概率之和大于等于0.8的概率分布中的token, + * 作为随机采样的候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的随机性越低。 + * 默认值为0.8。注意,取值不要大于等于1 + */ + private Float topP; + /** + * 模型参数设置。 + */ + private CompletionsRequest.Parameter parameters = new CompletionsRequest.Parameter(); + + // + // 适配 ChatOptions + + @Override + public Float getTemperature() { + return Float.parseFloat(this.parameters.getTemperature().toString()); + } + + @Override + public void setTemperature(Float temperature) { + this.parameters.setTemperature(Double.valueOf(temperature.toString())); + } + + @Override + public void setTopP(Float topP) { + this.topP = topP; + } + + @Override + public Integer getTopK() { + return this.parameters.getTopK(); + } + + @Override + public void setTopK(Integer topK) { + this.parameters.setTopK(topK); + } + + @Data + @Accessors + public static class Message { + /** + * 角色: system、user或assistant + */ + private String role; + /** + * 提示词或模型内容 + */ + private String content; + } + + @Data + @Accessors + public static class Parameters { + /** + * 输出格式, 默认为"text" + * "text"表示旧版本的text + * "message"表示兼容openai的message + */ + private String resultFormat; + /** + * 生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。 + * 取值越大,生成的随机性越高;取值越小,生成的确定性越高。 + * 注意:如果top_k参数为空或者top_k的值大于100,表示不启用top_k策略,此时仅有top_p策略生效,默认是空。 + */ + private Integer topK; + /** + * 生成时使用的随机数种子,用户控制模型生成内容的随机性。 + * seed支持无符号64位整数,默认值为1234。在使用seed时,模型将尽可能生成相同或相似的结果,但目前不保证每次生成的结果完全相同。 + */ + private Integer seed; + /** + * 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。 + * 较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择, + * 生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。 + * 取值范围: [0, 2),系统默认值1.0。不建议取值为0,无意义。 + */ + private Float temperature; + /** + * 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。 + * 其中qwen-turbo 最大值和默认值为1500, qwen-max、qwen-max-1201 、qwen-max-longcontext 和 qwen-plus最大值和默认值均为2000。 + */ + private Integer maxTokens; + /** + * stop参数用于实现内容生成过程的精确控制,在生成内容即将包含指定的字符串或token_ids时自动停止,生成内容不包含指定的内容。 + * 例如,如果指定stop为"你好",表示将要生成"你好"时停止;如果指定stop为[37763, 367],表示将要生成"Observation"时停止。 + */ + private List stop; + /** + * 用于控制流式输出模式,默认False,即后面内容会包含已经输出的内容;设置为True,将开启增量输出模式, + * 后面输出不会包含已经输出的内容,您需要自行拼接整体输出,参考流式输出示例代码。 + */ + private Boolean incrementalOutput; + } +} + + diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 745af82637..2c2b446853 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenApi; import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenOptions; +import com.aliyun.broadscope.bailian.sdk.models.CompletionsRequest; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; @@ -24,10 +26,13 @@ public class QianWenChatClientTests { "", "", "", - "", null ); - qianWenChatClient = new QianWenChatClient(qianWenApi); + qianWenChatClient = new QianWenChatClient( + qianWenApi, + new QianWenOptions() + .setAppId("5f14955f201a44eb8dbe0c57250a32ce") + ); } @Test -- Gitee From 7967a2a195f93e153e320ac08176dfa2e1298254 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 16 Mar 2024 16:43:53 +0800 Subject: [PATCH 0059/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E7=9A=84=20`status`=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=EF=BC=8C=E4=BD=BF=E7=94=A8=20Flowable=20?= =?UTF-8?q?=E7=9A=84=20`variables`=20=E5=AD=98=E5=82=A8=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20`bpm=5Fprocess=5Finstance=5Fext`=20=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/BpmProcessInstanceStatusEnum.java | 6 +- .../task/BpmProcessInstanceStatusOldEnum.java | 28 ++++++ .../candidate/vo/BpmTaskCandidateRuleVO.java | 24 ----- .../task/BpmProcessInstanceController.java | 28 +++++- .../BpmProcessInstancePageItemRespVO.java | 7 +- .../vo/instance/BpmProcessInstanceRespVO.java | 4 +- .../task/vo/task/BpmTaskApproveReqVO.java | 1 - .../task/BpmProcessInstanceConvert.java | 35 +++---- .../task/BpmProcessInstanceExtDO.java | 98 ------------------- .../task/BpmProcessInstanceExtMapper.java | 34 ------- .../flowable/core/enums/BpmConstants.java | 19 ++++ .../core/enums/BpmnModelConstants.java | 4 +- .../BpmProcessInstanceEventListener.java | 11 +-- .../BpmProcessDefinitionService.java | 22 +++-- .../BpmProcessDefinitionServiceImpl.java | 4 +- .../task/BpmProcessInstanceService.java | 65 ++++++------ .../task/BpmProcessInstanceServiceImpl.java | 2 +- 17 files changed, 150 insertions(+), 242 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceExtDO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceExtMapper.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java index 70a31dd342..089690457b 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java @@ -4,7 +4,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 流程实例的状态 + * 流程实例 ProcessInstance 的状态 * * @author 芋道源码 */ @@ -13,7 +13,9 @@ import lombok.Getter; public enum BpmProcessInstanceStatusEnum { RUNNING(1, "进行中"), - FINISH(2, "已完成"); + APPROVE(2, "通过"), + REJECT(3, "不通过"), + CANCEL(4, "已取消"); /** * 状态 diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java new file mode 100644 index 0000000000..1db19cf649 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.bpm.enums.task; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 流程实例的状态 + * + * @author 芋道源码 + */ +@Deprecated +@Getter +@AllArgsConstructor +public enum BpmProcessInstanceStatusOldEnum { + + RUNNING(1, "进行中"), + FINISH(2, "已完成"); + + /** + * 状态 + */ + private final Integer status; + /** + * 描述 + */ + private final String desc; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java deleted file mode 100644 index 62b1dff1cc..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/candidate/vo/BpmTaskCandidateRuleVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.util.Set; - -/** - * 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -@Data -public class BpmTaskCandidateRuleVO { - - @Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type") - @NotNull(message = "规则类型不能为空") - private Integer type; - - @Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") - @NotNull(message = "规则值数组不能为空") - private Set options; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 9d1301a277..c22ee3c6b8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -1,19 +1,31 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; +import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; +import org.flowable.engine.history.HistoricProcessInstance; +import org.flowable.engine.repository.ProcessDefinition; +import org.flowable.task.api.Task; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; +import java.util.Map; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请” @@ -24,13 +36,27 @@ public class BpmProcessInstanceController { @Resource private BpmProcessInstanceService processInstanceService; + @Resource + private BpmTaskService taskService; + @Resource + private BpmProcessDefinitionService processDefinitionService; @GetMapping("/my-page") @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") public CommonResult> getMyProcessInstancePage( @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { - return success(processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO)); + PageResult pageResult = processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty(pageResult.getTotal())); + } + + // 拼接返回 + Map> taskMap = taskService.getTaskMapByProcessInstanceIds( + convertList(pageResult.getList(), HistoricProcessInstance::getId)); + Map processDefinitionMap = processDefinitionService.getProcessDefinitionMap( + convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)); + return success(BpmProcessInstanceConvert.INSTANCE.convertPage(pageResult, processDefinitionMap, taskMap)); } @PostMapping("/create") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java index 6bb269f1d1..4cfaf171d5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java @@ -23,13 +23,10 @@ public class BpmProcessInstancePageItemRespVO { private String category; @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer status; - - @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Integer result; + private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime createTime; + private LocalDateTime startTime; @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index a9cc810f72..faa770c473 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -20,8 +20,8 @@ public class BpmProcessInstanceRespVO { @Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String category; - @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer status; + @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer result; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java index 1a79441cef..14dca13ea6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 41f2184c5c..11166c62e3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -1,13 +1,15 @@ package cn.iocoder.yudao.module.bpm.convert.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO; import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -34,25 +36,26 @@ public interface BpmProcessInstanceConvert { BpmProcessInstanceConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceConvert.class); - default PageResult convertPage(PageResult page, + default PageResult convertPage(PageResult pageResult, + Map processDefinitionMap, Map> taskMap) { - List list = convertList(page.getList()); - list.forEach(respVO -> respVO.setTasks(convertList2(taskMap.get(respVO.getId())))); - return new PageResult<>(list, page.getTotal()); + PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstancePageItemRespVO.class); + for (int i = 0; i < pageResult.getList().size(); i++) { + BpmProcessInstancePageItemRespVO respVO = vpPageResult.getList().get(i); + respVO.setStatus((Integer) pageResult.getList().get(i).getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); + MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(), + processDefinition -> respVO.setCategory(processDefinition.getCategory())); + respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstancePageItemRespVO.Task.class)); + } + return vpPageResult; } - List convertList(List list); - - @Mapping(source = "processInstanceId", target = "id") - BpmProcessInstancePageItemRespVO convert(BpmProcessInstanceExtDO bean); - - List convertList2(List tasks); - - default BpmProcessInstanceRespVO convert2(HistoricProcessInstance processInstance, BpmProcessInstanceExtDO processInstanceExt, + default BpmProcessInstanceRespVO convert2(HistoricProcessInstance processInstance, ProcessDefinition processDefinition, BpmProcessDefinitionExtDO processDefinitionExt, String bpmnXml, AdminUserRespDTO startUser, DeptRespDTO dept) { BpmProcessInstanceRespVO respVO = convert2(processInstance); - copyTo(processInstanceExt, respVO); + respVO.setStatus((Integer) processInstance.getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); + respVO.setFormVariables(processInstance.getProcessVariables()); // TODO 芋艿:真的这么搞么???formVariable 要不要换个 key 之类的 // definition respVO.setProcessDefinition(convert2(processDefinition)); copyTo(processDefinitionExt, respVO.getProcessDefinition()); @@ -69,9 +72,6 @@ public interface BpmProcessInstanceConvert { BpmProcessInstanceRespVO convert2(HistoricProcessInstance bean); - @Mapping(source = "from.id", target = "to.id", ignore = true) - void copyTo(BpmProcessInstanceExtDO from, @MappingTarget BpmProcessInstanceRespVO to); - BpmProcessInstanceRespVO.ProcessDefinition convert2(ProcessDefinition bean); @Mapping(source = "from.id", target = "to.id", ignore = true) @@ -88,6 +88,7 @@ public interface BpmProcessInstanceConvert { return event; } + // TODO @芋艿:需要改下 key! default BpmProcessInstanceResultEvent convert(Object source, ProcessInstance instance, Integer result) { BpmProcessInstanceResultEvent event = new BpmProcessInstanceResultEvent(source); event.setId(instance.getId()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceExtDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceExtDO.java deleted file mode 100644 index 5a481fff0f..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceExtDO.java +++ /dev/null @@ -1,98 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.dataobject.task; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -/** - * Bpm 流程实例的拓展表 - * 主要解决 Activiti ProcessInstance 和 HistoricProcessInstance 不支持拓展字段,所以新建拓展表 - * - * @author 芋道源码 - */ -@TableName(value = "bpm_process_instance_ext", autoResultMap = true) -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmProcessInstanceExtDO extends BaseDO { - - /** - * 编号,自增 - */ - @TableId - private Long id; - /** - * 发起流程的用户编号 - * - * 冗余 HistoricProcessInstance 的 startUserId 属性 - */ - private Long startUserId; - /** - * 流程实例的名字 - * - * 冗余 ProcessInstance 的 name 属性,用于筛选 - */ - private String name; - /** - * 流程实例的编号 - * - * 关联 ProcessInstance 的 id 属性 - */ - private String processInstanceId; - /** - * 流程定义的编号 - * - * 关联 ProcessDefinition 的 id 属性 - */ - private String processDefinitionId; - /** - * 流程分类 - * - * 冗余 ProcessDefinition 的 category 属性 - * 数据字典 bpm_model_category - */ - private String category; - /** - * 流程实例的状态 - * - * 枚举 {@link BpmProcessInstanceStatusEnum} - */ - private Integer status; - /** - * 流程实例的结果 - * - * 枚举 {@link BpmProcessInstanceResultEnum} - */ - private Integer result; - /** - * 结束时间 - * - * 冗余 HistoricProcessInstance 的 endTime 属性 - */ - private LocalDateTime endTime; - - /** - * 提交的表单值 - */ - @TableField(typeHandler = JacksonTypeHandler.class) - private Map formVariables; - - // TODO @hai:assignees 复数 - /** - * 提前设定好的审批人 - */ - @TableField(typeHandler = JacksonTypeHandler.class, exist = false) // TODO 芋艿:临时 exist = false,避免 db 报错; - private Map> assignee; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceExtMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceExtMapper.java deleted file mode 100644 index 52e66219c2..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceExtMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.mysql.task; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface BpmProcessInstanceExtMapper extends BaseMapperX { - - default PageResult selectPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId) - .likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName()) - .eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId()) - .eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory()) - .eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus()) - .eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult()) - .betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(BpmProcessInstanceExtDO::getId)); - } - - default BpmProcessInstanceExtDO selectByProcessInstanceId(String processInstanceId) { - return selectOne(BpmProcessInstanceExtDO::getProcessInstanceId, processInstanceId); - } - - default void updateByProcessInstanceId(BpmProcessInstanceExtDO updateObj) { - update(updateObj, new LambdaQueryWrapperX() - .eq(BpmProcessInstanceExtDO::getProcessInstanceId, updateObj.getProcessInstanceId())); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java new file mode 100644 index 0000000000..b2bd419e6a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; + +import org.flowable.engine.runtime.ProcessInstance; + +/** + * BPM 通用常量 + * + * @author 芋道源码 + */ +public class BpmConstants { + + /** + * 流程实例的变量 - 状态 + * + * @see ProcessInstance#getProcessVariables() + */ + public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS"; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index c8fefd55b3..3eb6981ef9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; /** - * 流程常量信息 + * BPMN XML 常量信息 + * + * @author 芋道源码 */ public interface BpmnModelConstants { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java index 9f37c9ae75..f8e5920f17 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import com.google.common.collect.ImmutableSet; +import jakarta.annotation.Resource; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; @@ -11,11 +11,10 @@ import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; -import jakarta.annotation.Resource; import java.util.Set; /** - * 监听 {@link ProcessInstance} 的开始与完成,创建与更新对应的 {@link BpmProcessInstanceExtDO} 记录 + * 监听 {@link ProcessInstance} 的状态变更,更新其对应的 status 状态 * * @author jason */ @@ -27,7 +26,6 @@ public class BpmProcessInstanceEventListener extends AbstractFlowableEngineEvent private BpmProcessInstanceService processInstanceService; public static final Set PROCESS_INSTANCE_EVENTS = ImmutableSet.builder() - .add(FlowableEngineEventType.PROCESS_CREATED) .add(FlowableEngineEventType.PROCESS_CANCELLED) .add(FlowableEngineEventType.PROCESS_COMPLETED) .build(); @@ -36,11 +34,6 @@ public class BpmProcessInstanceEventListener extends AbstractFlowableEngineEvent super(PROCESS_INSTANCE_EVENTS); } - @Override - protected void processCreated(FlowableEngineEntityEvent event) { - processInstanceService.createProcessInstanceExt((ProcessInstance)event.getEntity()); - } - @Override protected void processCancelled(FlowableCancelledEvent event) { processInstanceService.updateProcessInstanceExtCancel(event); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java index f2d5c9d0ec..5f6d5f1482 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java @@ -1,21 +1,23 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; +import jakarta.validation.Valid; import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; -import jakarta.validation.Valid; import java.util.List; import java.util.Map; import java.util.Set; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; + /** * Flowable流程定义接口 * @@ -90,14 +92,16 @@ public interface BpmProcessDefinitionService { ProcessDefinition getProcessDefinition(String id); /** - * 获得编号对应的 ProcessDefinition - * - * 相比 {@link #getProcessDefinition(String)} 方法,category 的取值是正确 + * 获得 ids 对应的 ProcessDefinition 数组 * - * @param id 编号 - * @return 流程定义 + * @param ids 编号的数组 + * @return 流程定义的数组 */ - ProcessDefinition getProcessDefinition2(String id); + List getProcessDefinitionList(Set ids); + + default Map getProcessDefinitionMap(Set ids) { + return convertMap(getProcessDefinitionList(ids), ProcessDefinition::getId); + } /** * 获得 deploymentId 对应的 ProcessDefinition @@ -130,7 +134,7 @@ public interface BpmProcessDefinitionService { * @return 流程部署 Map */ default Map getDeploymentMap(Set ids) { - return CollectionUtils.convertMap(getDeployments(ids), Deployment::getId); + return convertMap(getDeployments(ids), Deployment::getId); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 82f15beecf..ef8fd6e4d0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -66,8 +66,8 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } @Override - public ProcessDefinition getProcessDefinition2(String id) { - return repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult(); + public List getProcessDefinitionList(Set ids) { + return repositoryService.createProcessDefinitionQuery().processDefinitionIds(ids).list(); } @Override diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index 01a29c5593..ca312df812 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -4,11 +4,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; +import jakarta.validation.Valid; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; -import jakarta.validation.Valid; import java.util.List; import java.util.Map; import java.util.Set; @@ -57,6 +57,32 @@ public interface BpmProcessInstanceService { ProcessInstance::getProcessInstanceId, ProcessInstance::getName); } + /** + * 获得历史的流程实例 + * + * @param id 流程实例的编号 + * @return 历史的流程实例 + */ + HistoricProcessInstance getHistoricProcessInstance(String id); + + /** + * 获得历史的流程实例列表 + * + * @param ids 流程实例的编号集合 + * @return 历史的流程实例列表 + */ + List getHistoricProcessInstances(Set ids); + + /** + * 获得历史的流程实例 Map + * + * @param ids 流程实例的编号集合 + * @return 历史的流程实例列表 Map + */ + default Map getHistoricProcessInstanceMap(Set ids) { + return CollectionUtils.convertMap(getHistoricProcessInstances(ids), HistoricProcessInstance::getId); + } + /** * 获得流程实例的分页 * @@ -64,8 +90,8 @@ public interface BpmProcessInstanceService { * @param pageReqVO 分页请求 * @return 流程实例的分页 */ - PageResult getMyProcessInstancePage(Long userId, - @Valid BpmProcessInstanceMyPageReqVO pageReqVO); + PageResult getMyProcessInstancePage(Long userId, + @Valid BpmProcessInstanceMyPageReqVO pageReqVO); /** * 创建流程实例(提供给前端) @@ -101,39 +127,6 @@ public interface BpmProcessInstanceService { */ void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO); - /** - * 获得历史的流程实例 - * - * @param id 流程实例的编号 - * @return 历史的流程实例 - */ - HistoricProcessInstance getHistoricProcessInstance(String id); - - /** - * 获得历史的流程实例列表 - * - * @param ids 流程实例的编号集合 - * @return 历史的流程实例列表 - */ - List getHistoricProcessInstances(Set ids); - - /** - * 获得历史的流程实例 Map - * - * @param ids 流程实例的编号集合 - * @return 历史的流程实例列表 Map - */ - default Map getHistoricProcessInstanceMap(Set ids) { - return CollectionUtils.convertMap(getHistoricProcessInstances(ids), HistoricProcessInstance::getId); - } - - /** - * 创建 ProcessInstance 拓展记录 - * - * @param instance 流程任务 - */ - void createProcessInstanceExt(ProcessInstance instance); - /** * 更新 ProcessInstance 拓展记录为取消 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index 1a4b437e1c..fa92e7e6ec 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO; import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceExtMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import jakarta.annotation.Resource; import jakarta.validation.Valid; import java.time.LocalDateTime; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 *

* ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. *

* HistoricProcessInstance & ProcessInstance 的关系: * 1. *

* 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private BpmProcessInstanceExtMapper processInstanceExtMapper; @Resource @Lazy // 解决循环依赖 private BpmTaskService taskService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private HistoryService historyService; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private BpmMessageService messageService; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 PageResult pageResult = processInstanceExtMapper.selectPage(userId, pageReqVO); if (CollUtil.isEmpty(pageResult.getList())) { return new PageResult<>(pageResult.getTotal()); } // 获得流程 Task Map List processInstanceIds = convertList(pageResult.getList(), BpmProcessInstanceExtDO::getProcessInstanceId); Map> taskMap = taskService.getTaskMapByProcessInstanceIds(processInstanceIds); // 转换返回 return BpmProcessInstanceConvert.INSTANCE.convertPage(pageResult, taskMap); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } BpmProcessInstanceExtDO processInstanceExt = processInstanceExtMapper.selectByProcessInstanceId(id); Assert.notNull(processInstanceExt, "流程实例拓展({}) 不存在", id); // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processInstanceExt, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmProcessInstanceDeleteReasonEnum.CANCEL_TASK.format(cancelReqVO.getReason())); } /** * 获得历史的流程实例 * * @param id 流程实例的编号 * @return 历史的流程实例 */ @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public void createProcessInstanceExt(ProcessInstance instance) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition2(instance.getProcessDefinitionId()); // 插入 BpmProcessInstanceExtDO 对象 BpmProcessInstanceExtDO instanceExtDO = new BpmProcessInstanceExtDO() .setProcessInstanceId(instance.getId()) .setProcessDefinitionId(definition.getId()) .setName(instance.getProcessDefinitionName()) .setStartUserId(Long.valueOf(instance.getStartUserId())) .setCategory(definition.getCategory()) .setStatus(BpmProcessInstanceStatusEnum.RUNNING.getStatus()) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); processInstanceExtMapper.insert(instanceExtDO); } @Override public void updateProcessInstanceExtCancel(FlowableCancelledEvent event) { // 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceExtReject 方法,已经进行更新了 if (BpmProcessInstanceDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 更新拓展表 BpmProcessInstanceExtDO instanceExtDO = new BpmProcessInstanceExtDO() .setProcessInstanceId(event.getProcessInstanceId()) .setEndTime(LocalDateTime.now()) // 由于 ProcessInstance 里没有办法拿到 endTime,所以这里设置 .setStatus(BpmProcessInstanceStatusEnum.FINISH.getStatus()) .setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()); processInstanceExtMapper.updateByProcessInstanceId(instanceExtDO); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, instanceExtDO.getResult())); } @Override public void updateProcessInstanceExtComplete(ProcessInstance instance) { // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); // 更新拓展表 BpmProcessInstanceExtDO instanceExtDO = new BpmProcessInstanceExtDO() .setProcessInstanceId(instance.getProcessInstanceId()) .setEndTime(LocalDateTime.now()) // 由于 ProcessInstance 里没有办法拿到 endTime,所以这里设置 .setStatus(BpmProcessInstanceStatusEnum.FINISH.getStatus()) .setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()); // 如果正常完全,说明审批通过 processInstanceExtMapper.updateByProcessInstanceId(instanceExtDO); // 发送流程被通过的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, instanceExtDO.getResult())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceExtReject(String id, String reason) { // 需要主动查询,因为 instance 只有 id 属性 ProcessInstance processInstance = getProcessInstance(id); // 删除流程实例,以实现驳回任务时,取消整个审批流程 deleteProcessInstance(id, StrUtil.format(BpmProcessInstanceDeleteReasonEnum.REJECT_TASK.format(reason))); // 更新 status + result // 注意,不能和上面的逻辑更换位置。因为 deleteProcessInstance 会触发流程的取消,进而调用 updateProcessInstanceExtCancel 方法, // 设置 result 为 BpmProcessInstanceStatusEnum.CANCEL,显然和 result 不一定是一致的 BpmProcessInstanceExtDO instanceExtDO = new BpmProcessInstanceExtDO().setProcessInstanceId(id) .setStatus(BpmProcessInstanceStatusEnum.FINISH.getStatus()) .setResult(BpmProcessInstanceResultEnum.REJECT.getResult()); processInstanceExtMapper.updateByProcessInstanceId(instanceExtDO); // 发送流程被不通过的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, instanceExtDO.getResult())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); // 设置流程名字 runtimeService.setProcessInstanceName(instance.getId(), definition.getName()); // 补全流程实例的拓展表 processInstanceExtMapper.updateByProcessInstanceId(new BpmProcessInstanceExtDO().setProcessInstanceId(instance.getId()) .setFormVariables(variables).setAssignee(assignee)); return instance.getId(); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } if (CollUtil.isNotEmpty(instance.getAssignee())) { return instance.getAssignee().get(taskDefinitionKey); } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource @Lazy // 解决循环依赖 private BpmTaskService taskService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmProcessInstanceDeleteReasonEnum.CANCEL_TASK.format(cancelReqVO.getReason())); } @Override public void updateProcessInstanceExtCancel(FlowableCancelledEvent event) { // 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceExtReject 方法,已经进行更新了 if (BpmProcessInstanceDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceExtComplete(ProcessInstance instance) { // 更新拓展表 runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 发送流程被通过的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceExtReject(String id, String reason) { // 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 需要主动查询,因为 instance 只有 id 属性 ProcessInstance processInstance = getProcessInstance(id); // 删除流程实例,以实现驳回任务时,取消整个审批流程 deleteProcessInstance(id, StrUtil.format(BpmProcessInstanceDeleteReasonEnum.REJECT_TASK.format(reason))); // 发送流程被不通过的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file -- Gitee From 6415422f7dfb823fe0c5c5bf494dde1d78062f72 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 19:47:14 +0800 Subject: [PATCH 0060/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20client=20?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E6=96=B9=E6=B3=95=EF=BC=8C=E5=88=B6=E5=AE=9A?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=20QianWenOptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/chatqianwen/QianWenChatClient.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 4be2bf03e7..52b2c7b792 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -34,15 +34,15 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenApi qianWenApi; - private ChatOptions chatOptions; + private QianWenOptions qianWenOptions; public QianWenChatClient(QianWenApi qianWenApi) { this.qianWenApi = qianWenApi; } - public QianWenChatClient(QianWenApi qianWenApi, ChatOptions chatOptions) { + public QianWenChatClient(QianWenApi qianWenApi, QianWenOptions qianWenOptions) { this.qianWenApi = qianWenApi; - this.chatOptions = chatOptions; + this.qianWenOptions = qianWenOptions; } public final RetryTemplate retryTemplate = RetryTemplate.builder() @@ -81,11 +81,11 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private CompletionsRequest createRequest(Prompt prompt, boolean stream) { // 两个都为null 则没有配置文件 - if (chatOptions == null && prompt.getOptions() == null) { + if (qianWenOptions == null && prompt.getOptions() == null) { throw new ChatException("ChatOptions 未配置参数!"); } // 优先使用 Prompt 里面的 ChatOptions - ChatOptions options = chatOptions; + ChatOptions options = qianWenOptions; if (prompt.getOptions() != null) { options = (ChatOptions) prompt.getOptions(); } -- Gitee From 1fada268ac9dd4314c10085234f24f035e46adb7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 19:54:20 +0800 Subject: [PATCH 0061/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20QianWenOptions?= =?UTF-8?q?=20=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=BC=BA=E8=BD=AC=E5=A4=B1=E8=B4=A5=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/chatqianwen/QianWenChatClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 52b2c7b792..f704dee1ca 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.ai.chat.*; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; import com.aliyun.broadscope.bailian.sdk.models.*; import lombok.extern.slf4j.Slf4j; @@ -89,6 +90,10 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { if (prompt.getOptions() != null) { options = (ChatOptions) prompt.getOptions(); } + // Prompt 里面是一个 ChatOptions,用户可以随意传入,这里做一下判断 + if (!(options instanceof QianWenOptions)) { + throw new ChatException("Prompt 传入的不是 QianWenOptions!"); + } QianWenOptions qianWenOptions = (QianWenOptions) options; // 需要额外处理 if (!stream) { -- Gitee From f41e43713c9ca32bf72420f6c135b5bb7ea1e01e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 20:28:35 +0800 Subject: [PATCH 0062/1557] =?UTF-8?q?=E7=99=BE=E5=BA=A6=20=E6=96=87?= =?UTF-8?q?=E5=BF=83=E4=B8=80=E8=A8=80=20=E9=80=82=E9=85=8DchatOptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/chatyiyan/YiYanChatClient.java | 61 +++++--- .../framework/ai/chatyiyan/YiYanOptions.java | 144 ++++++++++++++++++ .../api/YiYanChatCompletionRequest.java | 10 +- .../ai/chat/QianWenChatClientTests.java | 6 +- .../framework/ai/chat/YiYanChatTests.java | 11 +- 5 files changed, 197 insertions(+), 35 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java index 58cc622c4c..c38dae4938 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java @@ -1,10 +1,8 @@ package cn.iocoder.yudao.framework.ai.chatyiyan; -import cn.iocoder.yudao.framework.ai.chat.ChatClient; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.Generation; -import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.ai.chat.*; +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; @@ -18,7 +16,6 @@ import org.springframework.retry.support.RetryTemplate; import reactor.core.publisher.Flux; import java.time.Duration; -import java.util.ArrayList; import java.util.List; /** @@ -32,10 +29,17 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { private YiYanApi yiYanApi; + private YiYanOptions yiYanOptions; + public YiYanChatClient(YiYanApi yiYanApi) { this.yiYanApi = yiYanApi; } + public YiYanChatClient(YiYanApi yiYanApi, YiYanOptions yiYanOptions) { + this.yiYanApi = yiYanApi; + this.yiYanOptions = yiYanOptions; + } + public final RetryTemplate retryTemplate = RetryTemplate.builder() // 最大重试次数 10 .maxAttempts(10) @@ -70,20 +74,6 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { }); } - private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { - List messages = new ArrayList<>(); - List instructions = prompt.getInstructions(); - for (Message instruction : instructions) { - YiYanChatCompletionRequest.Message message = new YiYanChatCompletionRequest.Message(); - message.setContent(instruction.getContent()); - message.setRole(instruction.getMessageType().getValue()); - messages.add(message); - } - YiYanChatCompletionRequest request = new YiYanChatCompletionRequest(messages); - request.setStream(stream); - return request; - } - @Override public Flux stream(Prompt prompt) { // ctx 会有重试的信息 @@ -93,4 +83,35 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { Flux response = this.yiYanApi.chatCompletionStream(request); return response.map(res -> new ChatResponse(List.of(new Generation(res.getResult())))); } + + private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { + // 两个都为null 则没有配置文件 + if (yiYanOptions == null && prompt.getOptions() == null) { + throw new ChatException("ChatOptions 未配置参数!"); + } + // 优先使用 Prompt 里面的 ChatOptions + ChatOptions options = yiYanOptions; + if (prompt.getOptions() != null) { + options = (ChatOptions) prompt.getOptions(); + } + // Prompt 里面是一个 ChatOptions,用户可以随意传入,这里做一下判断 + if (!(options instanceof YiYanOptions)) { + throw new ChatException("Prompt 传入的不是 YiYanOptions!"); + } + // 转换 YiYanOptions + YiYanOptions qianWenOptions = (YiYanOptions) options; + // 创建 request + List messageList = prompt.getInstructions().stream().map( + msg -> new YiYanChatCompletionRequest.Message() + .setRole(msg.getMessageType().getValue()) + .setContent(msg.getContent()) + ).toList(); + YiYanChatCompletionRequest request = new YiYanChatCompletionRequest(messageList); + // 复制 qianWenOptions 属性取 request(这里 options 属性和 request 基本保持一致) + // top: 由于遵循 spring-ai规范,支持在构建client的时候传入默认的 chatOptions + BeanUtil.copyProperties(qianWenOptions, request); + // 设置 stream + request.setStream(stream); + return request; + } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java new file mode 100644 index 0000000000..4b1bc3fe68 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java @@ -0,0 +1,144 @@ +package cn.iocoder.yudao.framework.ai.chatyiyan; + +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 百度 问心一言 + * + * 文档地址:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t + * + * author: fansili + * time: 2024/3/16 19:33 + */ +@Data +@Accessors(chain = true) +public class YiYanOptions implements ChatOptions { + + /** + * 一个可触发函数的描述列表,说明: + * (1)支持的function数量无限制 + * (2)长度限制,最后一个message的content长度(即此轮对话的问题)、functions和system字段总内容不能超过20480 个字符,且不能超过5120 tokens + * 必填:否 + */ + private List functions; + /** + * 说明: + * (1)较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定 + * (2)默认0.8,范围 (0, 1.0],不能为0 + * 必填:否 + */ + private Float temperature; + /** + * 说明: + * (1)影响输出文本的多样性,取值越大,生成文本的多样性越强 + * (2)默认0.8,取值范围 [0, 1.0] + * 必填:否 + */ + private Float top_p; + /** + * 通过对已生成的token增加惩罚,减少重复生成的现象。说明: + * (1)值越大表示惩罚越大 + * (2)默认1.0,取值范围:[1.0, 2.0] + * + * 必填:否 + */ + private Float penalty_score; + /** + * 是否以流式接口的形式返回数据,默认false + * 必填:否 + */ + private Boolean stream; + /** + * 模型人设,主要用于人设设定,例如,你是xxx公司制作的AI助手,说明: + * (1)长度限制,最后一个message的content长度(即此轮对话的问题)、functions和system字段总内容不能超过20480 个字符,且不能超过5120 tokens + * (2)如果同时使用system和functions,可能暂无法保证使用效果,持续进行优化 + * 必填:否 + */ + private String system; + /** + * 生成停止标识,当模型生成结果以stop中某个元素结尾时,停止文本生成。说明: + * (1)每个元素长度不超过20字符 + * (2)最多4个元素 + * 必填:否 + */ + private List stop; + /** + * 是否强制关闭实时搜索功能,默认false,表示不关闭 + * 必填:否 + */ + private Boolean disable_search; + /** + * 是否开启上角标返回,说明: + * (1)开启后,有概率触发搜索溯源信息search_info,search_info内容见响应参数介绍 + * (2)默认false,不开启 + * 必填:否 + */ + private Boolean enable_citation; + /** + * 指定模型最大输出token数,范围[2, 2048] + * 必填:否 + */ + private Integer max_output_tokens; + /** + * 指定响应内容的格式,说明: + * (1)可选值: + * · json_object:以json格式返回,可能出现不满足效果情况 + * · text:以文本格式返回 + * (2)如果不填写参数response_format值,默认为text + * 必填:否 + */ + private String response_format; + /** + * 表示最终用户的唯一标识符 + * 必填:否 + */ + private String user_id; + /** + * 在函数调用场景下,提示大模型选择指定的函数(非强制),说明:指定的函数名必须在functions中存在 + * 必填:否 + * + * ERNIE-4.0-8K 模型没有这个字段 + */ + private String tool_choice; + + // + // 以下兼容 spring-ai ChatOptions 暂时没有其他地方用到 + + @Override + public Float getTemperature() { + return this.temperature; + } + + @Override + public void setTemperature(Float temperature) { + this.temperature = temperature; + } + + @Override + public Float getTopP() { + return top_p; + } + + @Override + public void setTopP(Float topP) { + this.top_p = topP; + } + + // 百度么有 topK + + @Override + public Integer getTopK() { + return null; + } + + @Override + public void setTopK(Integer topK) { + + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java index 8c80d55f74..de6c19ee1a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java @@ -37,14 +37,14 @@ public class YiYanChatCompletionRequest { * (2)默认0.8,范围 (0, 1.0],不能为0 * 必填:否 */ - private String temperature; + private Float temperature; /** * 说明: * (1)影响输出文本的多样性,取值越大,生成文本的多样性越强 * (2)默认0.8,取值范围 [0, 1.0] * 必填:否 */ - private String top_p; + private Float top_p; /** * 通过对已生成的token增加惩罚,减少重复生成的现象。说明: * (1)值越大表示惩罚越大 @@ -52,7 +52,7 @@ public class YiYanChatCompletionRequest { * * 必填:否 */ - private String penalty_score; + private Float penalty_score; /** * 是否以流式接口的形式返回数据,默认false * 必填:否 @@ -71,7 +71,7 @@ public class YiYanChatCompletionRequest { * (2)最多4个元素 * 必填:否 */ - private String stop; + private List stop; /** * 是否强制关闭实时搜索功能,默认false,表示不关闭 * 必填:否 @@ -106,6 +106,8 @@ public class YiYanChatCompletionRequest { /** * 在函数调用场景下,提示大模型选择指定的函数(非强制),说明:指定的函数名必须在functions中存在 * 必填:否 + * + * ERNIE-4.0-8K 模型没有这个字段 */ private String tool_choice; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 2c2b446853..14b8397478 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -23,9 +23,9 @@ public class QianWenChatClientTests { @Before public void setup() { QianWenApi qianWenApi = new QianWenApi( - "", - "", - "", + "LTAI5tNTVhXW4fLKUjMrr98z", + "ZJ0JQeyjzxxm5CfeTV6k1wNE9UsvZP", + "f0c1088824594f589c8f10567ccd929f_p_efm", null ); qianWenChatClient = new QianWenChatClient( diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java index 346ffedb14..cff4caa174 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java @@ -4,12 +4,12 @@ import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanApi; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; import java.util.Scanner; -import java.util.function.Consumer; /** * chat 文心一言 @@ -29,7 +29,7 @@ public class YiYanChatTests { YiYanChatModel.ERNIE4_3_5_8K, 86400 ); - yiYanChatClient = new YiYanChatClient(yiYanApi); + yiYanChatClient = new YiYanChatClient(yiYanApi, new YiYanOptions().setMax_output_tokens(2048)); } @Test @@ -41,12 +41,7 @@ public class YiYanChatTests { @Test public void streamTest() { Flux fluxResponse = yiYanChatClient.stream(new Prompt("用java帮我写一个快排算法?")); - fluxResponse.subscribe(new Consumer() { - @Override - public void accept(ChatResponse chatResponse) { - System.err.print(chatResponse.getResult().getOutput().getContent()); - } - }); + fluxResponse.subscribe(chatResponse -> System.err.print(chatResponse.getResult().getOutput().getContent())); // 阻止退出 Scanner scanner = new Scanner(System.in); scanner.nextLine(); -- Gitee From 94e9ee959017cf8ab45c3449fe2c3da5d5687bb6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 21:24:57 +0800 Subject: [PATCH 0063/1557] =?UTF-8?q?=E9=80=82=E9=85=8D=E8=AE=AF=E9=A3=9E?= =?UTF-8?q?=E6=98=9F=E7=81=AB=20chatOptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/chatqianwen/QianWenChatClient.java | 2 - .../framework/ai/chatxinghuo/XingHuoApi.java | 14 ++-- .../ai/chatxinghuo/XingHuoChatClient.java | 80 +++++++++++++------ .../ai/chatxinghuo/XingHuoOptions.java | 76 ++++++++++++++++++ .../api/XingHuoChatCompletionRequest.java | 21 ++++- .../exception/XingHuoApiException.java | 14 ---- .../ai/chat/QianWenChatClientTests.java | 6 +- .../ai/chat/XingHuoChatClientTests.java | 7 +- 8 files changed, 162 insertions(+), 58 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index f704dee1ca..60b5335598 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.ai.chat.*; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; import com.aliyun.broadscope.bailian.sdk.models.*; import lombok.extern.slf4j.Slf4j; @@ -19,7 +18,6 @@ import reactor.core.publisher.Flux; import java.time.Duration; import java.util.List; -import java.util.Optional; import java.util.stream.Collectors; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java index a053884a24..323b8a7b7d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java @@ -39,22 +39,20 @@ public class XingHuoApi { private String appKey; private String secretKey; private WebClient webClient; - private XingHuoChatModel useChatModel; // 创建 WebSocketClient 实例 private ReactorNettyWebSocketClient socketClient = new ReactorNettyWebSocketClient(); - public XingHuoApi(String appId, String appKey, String secretKey, XingHuoChatModel useChatModel) { + public XingHuoApi(String appId, String appKey, String secretKey) { this.appId = appId; this.appKey = appKey; this.secretKey = secretKey; - this.useChatModel = useChatModel; - } - public ResponseEntity chatCompletionEntity(XingHuoChatCompletionRequest request) { + public ResponseEntity chatCompletionEntity(XingHuoChatCompletionRequest request, XingHuoChatModel xingHuoChatModel) { String authUrl; try { - authUrl = getAuthorizationUrl("spark-api.xf-yun.com", useChatModel.getUri()); +// XingHuoChatModel useChatModel; + authUrl = getAuthorizationUrl("spark-api.xf-yun.com", xingHuoChatModel.getUri()); } catch (NoSuchAlgorithmException | InvalidKeyException e) { throw new RuntimeException(e); } @@ -125,10 +123,10 @@ public class XingHuoApi { return "wss://" + host + path + "?" + toParams; } - public Flux chatCompletionStream(XingHuoChatCompletionRequest request) { + public Flux chatCompletionStream(XingHuoChatCompletionRequest request, XingHuoChatModel xingHuoChatModel) { String authUrl; try { - authUrl = getAuthorizationUrl("spark-api.xf-yun.com", useChatModel.getUri()); + authUrl = getAuthorizationUrl("spark-api.xf-yun.com", xingHuoChatModel.getUri()); } catch (NoSuchAlgorithmException | InvalidKeyException e) { throw new RuntimeException(e); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java index 23e85be6d3..eef59cac00 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.framework.ai.chatxinghuo; -import cn.iocoder.yudao.framework.ai.chat.ChatClient; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.Generation; -import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.exceptions.ExceptionUtil; +import cn.iocoder.yudao.framework.ai.chat.*; +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; -import cn.iocoder.yudao.framework.ai.chatxinghuo.exception.XingHuoApiException; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; @@ -31,16 +30,19 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { private XingHuoApi xingHuoApi; + private XingHuoOptions xingHuoOptions; + public final RetryTemplate retryTemplate = RetryTemplate.builder() // 最大重试次数 10 - .maxAttempts(10) - .retryOn(XingHuoApiException.class) + .maxAttempts(3) + .retryOn(ChatException.class) // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) .withListener(new RetryListener() { @Override public void onError(RetryContext context, RetryCallback callback, Throwable throwable) { + System.err.println("正在重试... " + ExceptionUtil.getMessage(throwable)); log.warn("重试异常:" + context.getRetryCount(), throwable); } @@ -52,26 +54,67 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { this.xingHuoApi = xingHuoApi; } + public XingHuoChatClient(XingHuoApi xingHuoApi, XingHuoOptions xingHuoOptions) { + this.xingHuoApi = xingHuoApi; + this.xingHuoOptions = xingHuoOptions; + } + @Override public ChatResponse call(Prompt prompt) { return this.retryTemplate.execute(ctx -> { // ctx 会有重试的信息 + // 获取 chatOptions 属性 + XingHuoOptions chatOptions = this.getChatOptions(prompt); // 创建 request 请求,stream模式需要供应商支持 - XingHuoChatCompletionRequest request = this.createRequest(prompt, false); + XingHuoChatCompletionRequest request = this.createRequest(prompt, chatOptions); // 调用 callWithFunctionSupport 发送请求 - ResponseEntity response = xingHuoApi.chatCompletionEntity(request); + ResponseEntity response = xingHuoApi.chatCompletionEntity(request, chatOptions.getDomain()); // 获取结果封装 ChatResponse return new ChatResponse(List.of(new Generation(response.getBody().getPayload().getChoices().getText().get(0).getContent()))); }); } - private XingHuoChatCompletionRequest createRequest(Prompt prompt, boolean b) { + @Override + public Flux stream(Prompt prompt) { + // 获取 chatOptions 属性 + XingHuoOptions chatOptions = this.getChatOptions(prompt); + // 创建 request 请求,stream模式需要供应商支持 + XingHuoChatCompletionRequest request = this.createRequest(prompt, chatOptions); + // 发送请求 + Flux response = this.xingHuoApi.chatCompletionStream(request, chatOptions.getDomain()); + return response.map(res -> { + String content = res.getPayload().getChoices().getText().stream() + .map(item -> item.getContent()).collect(Collectors.joining()); + return new ChatResponse(List.of(new Generation(content))); + }); + } + + private XingHuoOptions getChatOptions(Prompt prompt) { + // 两个都为null 则没有配置文件 + if (xingHuoOptions == null && prompt.getOptions() == null) { + throw new ChatException("ChatOptions 未配置参数!"); + } + // 优先使用 Prompt 里面的 ChatOptions + ChatOptions options = xingHuoOptions; + if (prompt.getOptions() != null) { + options = (ChatOptions) prompt.getOptions(); + } + // Prompt 里面是一个 ChatOptions,用户可以随意传入,这里做一下判断 + if (!(options instanceof XingHuoOptions)) { + throw new ChatException("Prompt 传入的不是 XingHuoOptions!"); + } + return (XingHuoOptions) options; + } + + private XingHuoChatCompletionRequest createRequest(Prompt prompt, XingHuoOptions xingHuoOptions) { // 创建 header XingHuoChatCompletionRequest.Header header = new XingHuoChatCompletionRequest.Header().setApp_id(xingHuoApi.getAppId()); // 创建 params - XingHuoChatCompletionRequest.Parameter parameter = new XingHuoChatCompletionRequest.Parameter() - .setChat(new XingHuoChatCompletionRequest.Parameter.Chat().setDomain(xingHuoApi.getUseChatModel().getValue())); + XingHuoChatCompletionRequest.Parameter.Chat chatParameter = new XingHuoChatCompletionRequest.Parameter.Chat(); + BeanUtil.copyProperties(xingHuoOptions, chatParameter); + chatParameter.setDomain(xingHuoOptions.getDomain().getValue()); + XingHuoChatCompletionRequest.Parameter parameter = new XingHuoChatCompletionRequest.Parameter().setChat(chatParameter); // 创建 payload text 信息 XingHuoChatCompletionRequest.Payload.Message.Text text = new XingHuoChatCompletionRequest.Payload.Message.Text(); text.setRole(XingHuoChatCompletionRequest.Payload.Message.Text.Role.USER.getName()); @@ -85,17 +128,4 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { .setParameter(parameter) .setPayload(payload); } - - @Override - public Flux stream(Prompt prompt) { - // 创建 request 请求,stream模式需要供应商支持 - XingHuoChatCompletionRequest request = this.createRequest(prompt, false); - // 发送请求 - Flux response = this.xingHuoApi.chatCompletionStream(request); - return response.map(res -> { - String content = res.getPayload().getChoices().getText().stream() - .map(item -> item.getContent()).collect(Collectors.joining()); - return new ChatResponse(List.of(new Generation(content))); - }); - } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java new file mode 100644 index 0000000000..5c539d4918 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.framework.ai.chatxinghuo; + +import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 讯飞星火 + * + * author: fansili + * time: 2024/3/16 20:29 + */ +@Data +@Accessors(chain = true) +public class XingHuoOptions implements ChatOptions { + + /** + * https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E + * + * 指定访问的领域: + * general指向V1.5版本; + * generalv2指向V2版本; + * generalv3指向V3版本; + * generalv3.5指向V3.5版本; + * 注意:不同的取值对应的url也不一样! + */ + private XingHuoChatModel domain = XingHuoChatModel.XING_HUO_3_5; + /** + * 取值范围 (0,1] ,默认值0.5 + */ + private Float temperature; + /** + * V1.5取值为[1,4096] + * V2.0、V3.0和V3.5取值为[1,8192],默认为2048。 + */ + private Integer max_tokens; + /** + * 取值为[1,6],默认为4 + */ + private Integer top_k; + /** + * 需要保障用户下的唯一性,用于关联用户会话 + */ + private String chat_id; + + + @Override + public Float getTemperature() { + return null; + } + + @Override + public void setTemperature(Float temperature) { + + } + + @Override + public Float getTopP() { + return null; + } + + @Override + public void setTopP(Float topP) { + + } + + @Override + public Integer getTopK() { + return null; + } + + @Override + public void setTopK(Integer topK) { + + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java index 009789cb30..a90697bfcc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java @@ -45,9 +45,24 @@ public class XingHuoChatCompletionRequest { * generalv3.5指向V3.5版本; * 注意:不同的取值对应的url也不一样! */ - private String domain = "general"; - private Double temperature = 0.5; - private Integer max_tokens = 2048; + private String domain = "generalv3.5"; + /** + * 取值范围 (0,1] ,默认值0.5 + */ + private Float temperature; + /** + * V1.5取值为[1,4096] + * V2.0、V3.0和V3.5取值为[1,8192],默认为2048。 + */ + private Integer max_tokens; + /** + * 取值为[1,6],默认为4 + */ + private Integer top_k; + /** + * 需要保障用户下的唯一性,用于关联用户会话 + */ + private String chat_id; } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java deleted file mode 100644 index cde6147c70..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/exception/XingHuoApiException.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo.exception; - -/** - * 讯飞星火 exception - * - * author: fansili - * time: 2024/3/11 10:22 - */ -public class XingHuoApiException extends RuntimeException { - - public XingHuoApiException(String message) { - super(message); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 14b8397478..2c2b446853 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -23,9 +23,9 @@ public class QianWenChatClientTests { @Before public void setup() { QianWenApi qianWenApi = new QianWenApi( - "LTAI5tNTVhXW4fLKUjMrr98z", - "ZJ0JQeyjzxxm5CfeTV6k1wNE9UsvZP", - "f0c1088824594f589c8f10567ccd929f_p_efm", + "", + "", + "", null ); qianWenChatClient = new QianWenChatClient( diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java index da8bc9d5d1..4a4b06b818 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoApi; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; @@ -28,9 +29,9 @@ public class XingHuoChatClientTests { new XingHuoApi( "13c8cca6", "cb6415c19d6162cda07b47316fcb0416", - "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh", - XingHuoChatModel.XING_HUO_3_5 - ) + "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh" + ), + new XingHuoOptions().setDomain(XingHuoChatModel.XING_HUO_3_5) ); } -- Gitee From e889b8c1e0addb87d81c9d1f2f796899852c9813 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 21:38:31 +0800 Subject: [PATCH 0064/1557] =?UTF-8?q?=E9=80=82=E9=85=8Djdk8(=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E7=BC=96=E8=AF=91=E6=B2=A1=E6=8A=A5=E9=94=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-spring-boot-starter-ai/pom.xml | 4 +- .../yudao/framework/ai/chat/ChatResponse.java | 11 +- .../yudao/framework/ai/chat/Generation.java | 5 +- .../framework/ai/chat/prompt/Prompt.java | 7 +- .../function/FunctionCallbackContext.java | 248 +++++++++--------- .../framework/ai/parser/BeanOutputParser.java | 19 +- .../framework/ai/parser/ListOutputParser.java | 10 +- .../framework/ai/parser/MapOutputParser.java | 13 +- 8 files changed, 171 insertions(+), 146 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 276e877330..a90180516a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -12,8 +12,8 @@ yudao-spring-boot-starter-ai - 21 - 21 + 8 + 8 UTF-8 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java index 1360336fbf..a6de72d7a2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java @@ -19,6 +19,8 @@ import cn.iocoder.yudao.framework.ai.chat.metadata.ChatResponseMetadata; import cn.iocoder.yudao.framework.ai.model.ModelResponse; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Objects; @@ -54,7 +56,8 @@ public class ChatResponse implements ModelResponse { */ public ChatResponse(List generations, ChatResponseMetadata chatResponseMetadata) { this.chatResponseMetadata = chatResponseMetadata; - this.generations = List.copyOf(generations); +// this.generations = List.copyOf(generations); + this.generations = Collections.unmodifiableList(generations); } /** @@ -98,8 +101,12 @@ public class ChatResponse implements ModelResponse { public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof ChatResponse that)) +// if (!(o instanceof ChatResponse that)) +// return false; + if (!(o instanceof ChatResponse)) { return false; + } + ChatResponse that = (ChatResponse) o; return Objects.equals(chatResponseMetadata, that.chatResponseMetadata) && Objects.equals(generations, that.generations); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java index e84ffd4090..1835d16d29 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java @@ -63,8 +63,11 @@ public class Generation implements ModelResult { public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof Generation that)) + + if (!(o instanceof Generation)) { return false; + } + Generation that = (Generation) o; return Objects.equals(assistantMessage, that.assistantMessage) && Objects.equals(chatGenerationMetadata, that.chatGenerationMetadata); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java index f9eb374098..95b5cd8aa4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java @@ -16,6 +16,7 @@ package cn.iocoder.yudao.framework.ai.chat.prompt; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.messages.Message; import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; import cn.iocoder.yudao.framework.ai.model.ModelOptions; @@ -86,8 +87,12 @@ public class Prompt implements ModelRequest> { public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof Prompt prompt)) +// if (!(o instanceof Prompt prompt)) +// return false; + if (!(o instanceof Prompt)) { return false; + } + Prompt prompt = (Prompt) o; return Objects.equals(this.messages, prompt.messages) && Objects.equals(this.modelOptions, prompt.modelOptions); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java index dd5b0ee7c0..9178823589 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java @@ -1,124 +1,124 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package cn.iocoder.yudao.framework.ai.model.function; - -import com.fasterxml.jackson.annotation.JsonClassDescription; -import org.springframework.beans.BeansException; -import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; -import org.springframework.cloud.function.context.config.FunctionContextUtils; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.context.annotation.Description; -import org.springframework.context.support.GenericApplicationContext; -import org.springframework.lang.NonNull; -import org.springframework.lang.Nullable; -import org.springframework.util.StringUtils; - -import java.lang.reflect.Type; -import java.util.function.Function; - -/** - * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve - * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. - * - * The name of the function is determined by the bean name. - * - * The description of the function is determined by the following rules: - *

- * - * @author Christian Tzolov - * @author Christopher Smith - */ -public class FunctionCallbackContext implements ApplicationContextAware { - - private GenericApplicationContext applicationContext; - - private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; - - public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { - this.schemaType = schemaType; - } - - @Override - public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { - this.applicationContext = (GenericApplicationContext) applicationContext; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { - - Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); - - if (beanType == null) { - throw new IllegalArgumentException( - "Functional bean with name: " + beanName + " does not exist in the context."); - } - - if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { - throw new IllegalArgumentException( - "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); - } - - Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); - - Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); - String functionName = beanName; - String functionDescription = defaultDescription; - - if (!StringUtils.hasText(functionDescription)) { - // Look for a Description annotation on the bean - Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); - - if (descriptionAnnotation != null) { - functionDescription = descriptionAnnotation.value(); - } - - if (!StringUtils.hasText(functionDescription)) { - // Look for a JsonClassDescription annotation on the input class - JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass - .getAnnotation(JsonClassDescription.class); - if (jsonClassDescriptionAnnotation != null) { - functionDescription = jsonClassDescriptionAnnotation.value(); - } - } - - if (!StringUtils.hasText(functionDescription)) { - throw new IllegalStateException("Could not determine function description." - + "Please provide a description either as a default parameter, via @Description annotation on the bean " - + "or @JsonClassDescription annotation on the input class."); - } - } - - Object bean = this.applicationContext.getBean(beanName); - - if (bean instanceof Function function) { - return FunctionCallbackWrapper.builder(function) - .withName(functionName) - .withSchemaType(this.schemaType) - .withDescription(functionDescription) - .withInputType(functionInputClass) - .build(); - } - else { - throw new IllegalArgumentException("Bean must be of type Function"); - } - } - -} +///* +// * Copyright 2024-2024 the original author or authors. +// * +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * https://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ +//package cn.iocoder.yudao.framework.ai.model.function; +// +//import com.fasterxml.jackson.annotation.JsonClassDescription; +//import org.springframework.beans.BeansException; +//import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; +//import org.springframework.cloud.function.context.config.FunctionContextUtils; +//import org.springframework.context.ApplicationContext; +//import org.springframework.context.ApplicationContextAware; +//import org.springframework.context.annotation.Description; +//import org.springframework.context.support.GenericApplicationContext; +//import org.springframework.lang.NonNull; +//import org.springframework.lang.Nullable; +//import org.springframework.util.StringUtils; +// +//import java.lang.reflect.Type; +//import java.util.function.Function; +// +///** +// * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve +// * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. +// * +// * The name of the function is determined by the bean name. +// * +// * The description of the function is determined by the following rules: +// *
    +// *
  • Provided as a default description
  • +// *
  • Provided as a {@code @Description} annotation on the bean
  • +// *
  • Provided as a {@code @JsonClassDescription} annotation on the input class
  • +// *
+// * +// * @author Christian Tzolov +// * @author Christopher Smith +// */ +//public class FunctionCallbackContext implements ApplicationContextAware { +// +// private GenericApplicationContext applicationContext; +// +// private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; +// +// public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { +// this.schemaType = schemaType; +// } +// +// @Override +// public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { +// this.applicationContext = (GenericApplicationContext) applicationContext; +// } +// +// @SuppressWarnings({ "rawtypes", "unchecked" }) +// public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { +// +// Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); +// +// if (beanType == null) { +// throw new IllegalArgumentException( +// "Functional bean with name: " + beanName + " does not exist in the context."); +// } +// +// if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { +// throw new IllegalArgumentException( +// "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); +// } +// +// Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); +// +// Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); +// String functionName = beanName; +// String functionDescription = defaultDescription; +// +// if (!StringUtils.hasText(functionDescription)) { +// // Look for a Description annotation on the bean +// Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); +// +// if (descriptionAnnotation != null) { +// functionDescription = descriptionAnnotation.value(); +// } +// +// if (!StringUtils.hasText(functionDescription)) { +// // Look for a JsonClassDescription annotation on the input class +// JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass +// .getAnnotation(JsonClassDescription.class); +// if (jsonClassDescriptionAnnotation != null) { +// functionDescription = jsonClassDescriptionAnnotation.value(); +// } +// } +// +// if (!StringUtils.hasText(functionDescription)) { +// throw new IllegalStateException("Could not determine function description." +// + "Please provide a description either as a default parameter, via @Description annotation on the bean " +// + "or @JsonClassDescription annotation on the input class."); +// } +// } +// +// Object bean = this.applicationContext.getBean(beanName); +// +// if (bean instanceof Function function) { +// return FunctionCallbackWrapper.builder(function) +// .withName(functionName) +// .withSchemaType(this.schemaType) +// .withDescription(functionDescription) +// .withInputType(functionInputClass) +// .build(); +// } +// else { +// throw new IllegalArgumentException("Bean must be of type Function"); +// } +// } +// +//} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java index 4eb08ce293..109e75fc44 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java @@ -153,13 +153,18 @@ public class BeanOutputParser implements OutputParser { */ @Override public String getFormat() { - String template = """ - Your response should be in JSON format. - Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. - Do not include markdown code blocks in your response. - Here is the JSON Schema instance your output must adhere to: - ```%s``` - """; +// String template = """ +// Your response should be in JSON format. +// Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. +// Do not include markdown code blocks in your response. +// Here is the JSON Schema instance your output must adhere to: +// ```%s``` +// """; + String template = "Your response should be in JSON format.\n" + + "\t\t\t\tDo not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation.\n" + + "\t\t\t\tDo not include markdown code blocks in your response.\n" + + "\t\t\t\tHere is the JSON Schema instance your output must adhere to:\n" + + "\t\t\t\t```%s```"; return String.format(template, this.jsonSchema); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java index 1eb936eacf..37fd49b89a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java @@ -34,10 +34,12 @@ public class ListOutputParser extends AbstractConversionServiceOutputParser Date: Sat, 16 Mar 2024 21:40:04 +0800 Subject: [PATCH 0065/1557] =?UTF-8?q?maven=20=E7=BC=96=E8=AF=91=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=2021?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/pom.xml | 4 ++-- yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/pom.xml b/yudao-module-ai/pom.xml index d7241b3ecb..ad49018f0f 100644 --- a/yudao-module-ai/pom.xml +++ b/yudao-module-ai/pom.xml @@ -18,8 +18,8 @@ - 8 - 8 + 21 + 21 UTF-8 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index a90180516a..276e877330 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -12,8 +12,8 @@ yudao-spring-boot-starter-ai - 8 - 8 + 21 + 21 UTF-8 -- Gitee From 6a3cafb41ee43b4f27d995a892a8fd013784bbe3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 21:42:31 +0800 Subject: [PATCH 0066/1557] =?UTF-8?q?=E9=80=82=E9=85=8Djdk8=20-=202?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E4=B8=AA=E5=9C=B0=E6=96=B9=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/FunctionCallbackContext.java | 228 +++++++++--------- 1 file changed, 115 insertions(+), 113 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java index 9178823589..ca24e2673d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java @@ -1,113 +1,115 @@ -///* -// * Copyright 2024-2024 the original author or authors. -// * -// * Licensed under the Apache License, Version 2.0 (the "License"); -// * you may not use this file except in compliance with the License. -// * You may obtain a copy of the License at -// * -// * https://www.apache.org/licenses/LICENSE-2.0 -// * -// * Unless required by applicable law or agreed to in writing, software -// * distributed under the License is distributed on an "AS IS" BASIS, -// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// * See the License for the specific language governing permissions and -// * limitations under the License. -// */ -//package cn.iocoder.yudao.framework.ai.model.function; -// -//import com.fasterxml.jackson.annotation.JsonClassDescription; -//import org.springframework.beans.BeansException; -//import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; -//import org.springframework.cloud.function.context.config.FunctionContextUtils; -//import org.springframework.context.ApplicationContext; -//import org.springframework.context.ApplicationContextAware; -//import org.springframework.context.annotation.Description; -//import org.springframework.context.support.GenericApplicationContext; -//import org.springframework.lang.NonNull; -//import org.springframework.lang.Nullable; -//import org.springframework.util.StringUtils; -// -//import java.lang.reflect.Type; -//import java.util.function.Function; -// -///** -// * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve -// * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. -// * -// * The name of the function is determined by the bean name. -// * -// * The description of the function is determined by the following rules: -// *
    -// *
  • Provided as a default description
  • -// *
  • Provided as a {@code @Description} annotation on the bean
  • -// *
  • Provided as a {@code @JsonClassDescription} annotation on the input class
  • -// *
-// * -// * @author Christian Tzolov -// * @author Christopher Smith -// */ -//public class FunctionCallbackContext implements ApplicationContextAware { -// -// private GenericApplicationContext applicationContext; -// -// private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; -// -// public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { -// this.schemaType = schemaType; -// } -// -// @Override -// public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { -// this.applicationContext = (GenericApplicationContext) applicationContext; -// } -// -// @SuppressWarnings({ "rawtypes", "unchecked" }) -// public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { -// -// Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); -// -// if (beanType == null) { -// throw new IllegalArgumentException( -// "Functional bean with name: " + beanName + " does not exist in the context."); -// } -// -// if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { -// throw new IllegalArgumentException( -// "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); -// } -// -// Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); -// -// Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); -// String functionName = beanName; -// String functionDescription = defaultDescription; -// -// if (!StringUtils.hasText(functionDescription)) { -// // Look for a Description annotation on the bean -// Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); -// -// if (descriptionAnnotation != null) { -// functionDescription = descriptionAnnotation.value(); -// } -// -// if (!StringUtils.hasText(functionDescription)) { -// // Look for a JsonClassDescription annotation on the input class -// JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass -// .getAnnotation(JsonClassDescription.class); -// if (jsonClassDescriptionAnnotation != null) { -// functionDescription = jsonClassDescriptionAnnotation.value(); -// } -// } -// -// if (!StringUtils.hasText(functionDescription)) { -// throw new IllegalStateException("Could not determine function description." -// + "Please provide a description either as a default parameter, via @Description annotation on the bean " -// + "or @JsonClassDescription annotation on the input class."); -// } -// } -// -// Object bean = this.applicationContext.getBean(beanName); -// +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.iocoder.yudao.framework.ai.model.function; + +import com.fasterxml.jackson.annotation.JsonClassDescription; +import org.springframework.beans.BeansException; +import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; +import org.springframework.cloud.function.context.config.FunctionContextUtils; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Description; +import org.springframework.context.support.GenericApplicationContext; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.StringUtils; + +import java.lang.reflect.Type; +import java.util.function.Function; + +/** + * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve + * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. + * + * The name of the function is determined by the bean name. + * + * The description of the function is determined by the following rules: + *
    + *
  • Provided as a default description
  • + *
  • Provided as a {@code @Description} annotation on the bean
  • + *
  • Provided as a {@code @JsonClassDescription} annotation on the input class
  • + *
+ * + * @author Christian Tzolov + * @author Christopher Smith + */ +public class FunctionCallbackContext implements ApplicationContextAware { + + private GenericApplicationContext applicationContext; + + private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; + + public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { + this.schemaType = schemaType; + } + + @Override + public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { + this.applicationContext = (GenericApplicationContext) applicationContext; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { + + Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); + + if (beanType == null) { + throw new IllegalArgumentException( + "Functional bean with name: " + beanName + " does not exist in the context."); + } + + if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { + throw new IllegalArgumentException( + "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); + } + + Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); + + Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); + String functionName = beanName; + String functionDescription = defaultDescription; + + if (!StringUtils.hasText(functionDescription)) { + // Look for a Description annotation on the bean + Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); + + if (descriptionAnnotation != null) { + functionDescription = descriptionAnnotation.value(); + } + + if (!StringUtils.hasText(functionDescription)) { + // Look for a JsonClassDescription annotation on the input class + JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass + .getAnnotation(JsonClassDescription.class); + if (jsonClassDescriptionAnnotation != null) { + functionDescription = jsonClassDescriptionAnnotation.value(); + } + } + + if (!StringUtils.hasText(functionDescription)) { + throw new IllegalStateException("Could not determine function description." + + "Please provide a description either as a default parameter, via @Description annotation on the bean " + + "or @JsonClassDescription annotation on the input class."); + } + } + + Object bean = this.applicationContext.getBean(beanName); + + // TODO: 2024/3/16 fansili 适配jdk8 + return null; // if (bean instanceof Function function) { // return FunctionCallbackWrapper.builder(function) // .withName(functionName) @@ -119,6 +121,6 @@ // else { // throw new IllegalArgumentException("Bean must be of type Function"); // } -// } -// -//} + } + +} -- Gitee From c3e36c19ead84ae4706103470c49cccb440a0ce7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 17 Mar 2024 09:46:38 +0800 Subject: [PATCH 0067/1557] =?UTF-8?q?=E5=A4=8D=E5=88=B6=20spring-ai=20imag?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/image/Image.java | 73 +++++++++++ .../yudao/framework/ai/image/ImageClient.java | 27 ++++ .../framework/ai/image/ImageGeneration.java | 52 ++++++++ .../ai/image/ImageGenerationMetadata.java | 23 ++++ .../framework/ai/image/ImageMessage.java | 63 ++++++++++ .../framework/ai/image/ImageOptions.java | 37 ++++++ .../ai/image/ImageOptionsBuilder.java | 119 ++++++++++++++++++ .../yudao/framework/ai/image/ImagePrompt.java | 84 +++++++++++++ .../framework/ai/image/ImageResponse.java | 75 +++++++++++ .../ai/image/ImageResponseMetadata.java | 31 +++++ 10 files changed, 584 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java new file mode 100644 index 0000000000..b56ceb746c --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java @@ -0,0 +1,73 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import java.util.Objects; + +public class Image { + + /** + * The URL where the image can be accessed. + */ + private String url; + + /** + * Base64 encoded image string. + */ + private String b64Json; + + public Image(String url, String b64Json) { + this.url = url; + this.b64Json = b64Json; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getB64Json() { + return b64Json; + } + + public void setB64Json(String b64Json) { + this.b64Json = b64Json; + } + + @Override + public String toString() { + return "Image{" + "url='" + url + '\'' + ", b64Json='" + b64Json + '\'' + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Image image)) + return false; + return Objects.equals(url, image.url) && Objects.equals(b64Json, image.b64Json); + } + + @Override + public int hashCode() { + return Objects.hash(url, b64Json); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java new file mode 100644 index 0000000000..3034fbf02f --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java @@ -0,0 +1,27 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + + +import cn.iocoder.yudao.framework.ai.model.ModelClient; + +@FunctionalInterface +public interface ImageClient extends ModelClient { + + ImageResponse call(ImagePrompt request); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java new file mode 100644 index 0000000000..16942fde10 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + + +import cn.iocoder.yudao.framework.ai.model.ModelResult; + +public class ImageGeneration implements ModelResult { + + private ImageGenerationMetadata imageGenerationMetadata; + + private Image image; + + public ImageGeneration(Image image) { + this.image = image; + } + + public ImageGeneration(Image image, ImageGenerationMetadata imageGenerationMetadata) { + this.image = image; + this.imageGenerationMetadata = imageGenerationMetadata; + } + + @Override + public Image getOutput() { + return image; + } + + @Override + public ImageGenerationMetadata getMetadata() { + return imageGenerationMetadata; + } + + @Override + public String toString() { + return "ImageGeneration{" + "imageGenerationMetadata=" + imageGenerationMetadata + ", image=" + image + '}'; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java new file mode 100644 index 0000000000..1d620d2c73 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java @@ -0,0 +1,23 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import cn.iocoder.yudao.framework.ai.model.ResultMetadata; + +public interface ImageGenerationMetadata extends ResultMetadata { + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java new file mode 100644 index 0000000000..6a01c6c21d --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import java.util.Objects; + +public class ImageMessage { + + private String text; + + private Float weight; + + public ImageMessage(String text) { + this.text = text; + } + + public ImageMessage(String text, Float weight) { + this.text = text; + this.weight = weight; + } + + public String getText() { + return text; + } + + public Float getWeight() { + return weight; + } + + @Override + public String toString() { + return "mageMessage{" + "text='" + text + '\'' + ", weight=" + weight + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof ImageMessage that)) + return false; + return Objects.equals(text, that.text) && Objects.equals(weight, that.weight); + } + + @Override + public int hashCode() { + return Objects.hash(text, weight); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java new file mode 100644 index 0000000000..d9cfd0e864 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import cn.iocoder.yudao.framework.ai.model.ModelOptions; + +/** + * ImageOptions represent the common options, portable across different image generation + * models. + */ +public interface ImageOptions extends ModelOptions { + + Integer getN(); + + String getModel(); + + Integer getWidth(); + + Integer getHeight(); + + String getResponseFormat(); // openai - url or base64 : stability ai byte[] or base64 + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java new file mode 100644 index 0000000000..d1bc474739 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +public class ImageOptionsBuilder { + + private class ImageModelOptionsImpl implements ImageOptions { + + private Integer n; + + private String model; + + private Integer width; + + private Integer height; + + private String responseFormat; + + @Override + public Integer getN() { + return n; + } + + public void setN(Integer n) { + this.n = n; + } + + @Override + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + @Override + public String getResponseFormat() { + return responseFormat; + } + + public void setResponseFormat(String responseFormat) { + this.responseFormat = responseFormat; + } + + @Override + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + @Override + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + } + + private final ImageModelOptionsImpl options = new ImageModelOptionsImpl(); + + private ImageOptionsBuilder() { + + } + + public static ImageOptionsBuilder builder() { + return new ImageOptionsBuilder(); + } + + public ImageOptionsBuilder withN(Integer n) { + options.setN(n); + return this; + } + + public ImageOptionsBuilder withModel(String model) { + options.setModel(model); + return this; + } + + public ImageOptionsBuilder withResponseFormat(String responseFormat) { + options.setResponseFormat(responseFormat); + return this; + } + + public ImageOptionsBuilder withWidth(Integer width) { + options.setWidth(width); + return this; + } + + public ImageOptionsBuilder withHeight(Integer height) { + options.setHeight(height); + return this; + } + + public ImageOptions build() { + return options; + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java new file mode 100644 index 0000000000..c8fac6ef67 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import cn.iocoder.yudao.framework.ai.model.ModelRequest; + +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +/** + * 图片内容 + */ +public class ImagePrompt implements ModelRequest> { + + private final List messages; + + private ImageOptions imageModelOptions; + + public ImagePrompt(List messages) { + this.messages = messages; + } + + public ImagePrompt(List messages, ImageOptions imageModelOptions) { + this.messages = messages; + this.imageModelOptions = imageModelOptions; + } + + public ImagePrompt(ImageMessage imageMessage, ImageOptions imageOptions) { + this(Collections.singletonList(imageMessage), imageOptions); + } + + public ImagePrompt(String instructions, ImageOptions imageOptions) { + this(new ImageMessage(instructions), imageOptions); + } + + public ImagePrompt(String instructions) { + this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build()); + } + + @Override + public List getInstructions() { + return messages; + } + + @Override + public ImageOptions getOptions() { + return imageModelOptions; + } + + @Override + public String toString() { + return "NewImagePrompt{" + "messages=" + messages + ", imageModelOptions=" + imageModelOptions + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof ImagePrompt that)) + return false; + return Objects.equals(messages, that.messages) && Objects.equals(imageModelOptions, that.imageModelOptions); + } + + @Override + public int hashCode() { + return Objects.hash(messages, imageModelOptions); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java new file mode 100644 index 0000000000..ca91be5c00 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java @@ -0,0 +1,75 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + +import cn.iocoder.yudao.framework.ai.model.ModelResponse; + +import java.util.List; +import java.util.Objects; + +public class ImageResponse implements ModelResponse { + + private final ImageResponseMetadata imageResponseMetadata; + + private final List imageGenerations; + + public ImageResponse(List generations) { + this(generations, ImageResponseMetadata.NULL); + } + + public ImageResponse(List generations, ImageResponseMetadata imageResponseMetadata) { + this.imageResponseMetadata = imageResponseMetadata; + this.imageGenerations = List.copyOf(generations); + } + + @Override + public ImageGeneration getResult() { + return imageGenerations.get(0); + } + + @Override + public List getResults() { + return imageGenerations; + } + + @Override + public ImageResponseMetadata getMetadata() { + return imageResponseMetadata; + } + + @Override + public String toString() { + return "ImageResponse{" + "imageResponseMetadata=" + imageResponseMetadata + ", imageGenerations=" + + imageGenerations + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof ImageResponse that)) + return false; + return Objects.equals(imageResponseMetadata, that.imageResponseMetadata) + && Objects.equals(imageGenerations, that.imageGenerations); + } + + @Override + public int hashCode() { + return Objects.hash(imageResponseMetadata, imageGenerations); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java new file mode 100644 index 0000000000..c4332c6c35 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java @@ -0,0 +1,31 @@ +/* + * Copyright 2024-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.iocoder.yudao.framework.ai.image; + + +import cn.iocoder.yudao.framework.ai.model.ResponseMetadata; + +public interface ImageResponseMetadata extends ResponseMetadata { + + ImageResponseMetadata NULL = new ImageResponseMetadata() { + }; + + default Long created() { + return System.currentTimeMillis(); + } + +} -- Gitee From 7fe1b7791992fee313bbaad6db0d41f7e65f2d9e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 17 Mar 2024 09:50:48 +0800 Subject: [PATCH 0068/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20spring=20ai=20Im?= =?UTF-8?q?age=E6=A8=A1=E5=9D=97=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/iocoder/yudao/framework/ai/image/Image.java | 4 ++++ .../cn/iocoder/yudao/framework/ai/image/ImageClient.java | 5 +++++ .../cn/iocoder/yudao/framework/ai/image/ImageGeneration.java | 1 + 3 files changed, 10 insertions(+) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java index b56ceb746c..d6fc44da09 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java @@ -21,11 +21,15 @@ import java.util.Objects; public class Image { /** + * 可以访问图像的URL。 + * * The URL where the image can be accessed. */ private String url; /** + * Base64编码的图像字符串。 + * * Base64 encoded image string. */ private String b64Json; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java index 3034fbf02f..3c9d687439 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java @@ -22,6 +22,11 @@ import cn.iocoder.yudao.framework.ai.model.ModelClient; @FunctionalInterface public interface ImageClient extends ModelClient { + /** + * 跟 chat一样 + * @param request the request object to be sent to the AI model + * @return + */ ImageResponse call(ImagePrompt request); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java index 16942fde10..5ec655de80 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java @@ -21,6 +21,7 @@ import cn.iocoder.yudao.framework.ai.model.ModelResult; public class ImageGeneration implements ModelResult { + // metadata 信息为空现在 private ImageGenerationMetadata imageGenerationMetadata; private Image image; -- Gitee From d40fa0f929224e0eb2ac55236d651487cccf6318 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Mar 2024 10:10:42 +0800 Subject: [PATCH 0069/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=20`status`=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=EF=BC=8C=E4=BD=BF=E7=94=A8=20Flowable=20?= =?UTF-8?q?=E7=9A=84=20`variables`=20=E5=AD=98=E5=82=A8=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20`bpm=5Ftask=5Fext`=20=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 6 +- .../task/BpmProcessInstanceResultEnum.java | 45 +-- .../task/BpmProcessInstanceStatusEnum.java | 6 +- .../enums/task/BpmTaskAddSignTypeEnum.java | 9 +- .../vo/task/BpmTaskDonePageItemRespVO.java | 5 +- .../task/vo/task/BpmTaskSubSignRespVO.java | 4 + .../bpm/convert/task/BpmTaskConvert.java | 43 +-- .../bpm/dal/dataobject/task/BpmTaskExtDO.java | 2 + .../bpm/dal/mysql/task/BpmTaskExtMapper.java | 44 +-- .../flowable/core/enums/BpmConstants.java | 7 + .../core/listener/BpmTaskEventListener.java | 3 +- .../bpm/service/oa/BpmOALeaveServiceImpl.java | 2 +- .../task/BpmProcessInstanceService.java | 14 +- .../bpm/service/task/BpmTaskService.java | 11 - .../bpm/service/task/BpmTaskServiceImpl.java | 361 +++++++++--------- 15 files changed, 262 insertions(+), 300 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index bdc3d17ce5..e88e27b1f2 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -55,12 +55,8 @@ public interface ErrorCodeConstants { ErrorCode TASK_ADD_SIGN_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复"); ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_011, "任务减签失败,被减签的任务必须是通过加签生成的任务"); - // ========== 流程任务分配规则 1-009-006-000 ========== - ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1_009_006_000, "流程({}) 的任务({}) 已经存在分配规则"); - ErrorCode TASK_ASSIGN_RULE_NOT_EXISTS = new ErrorCode(1_009_006_001, "流程任务分配规则不存在"); - ErrorCode TASK_UPDATE_FAIL_NOT_MODEL = new ErrorCode(1_009_006_002, "只有流程模型的任务分配规则,才允许被修改"); + // ========== 流程任务分配规则 1-009-006-000 TODO 芋艿:这里要改下 ========== ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败,原因:找不到任务的审批人!"); - ErrorCode TASK_ASSIGN_SCRIPT_NOT_EXISTS = new ErrorCode(1_009_006_004, "操作失败,原因:任务分配脚本({}) 不存在"); // ========== 动态表单模块 1-009-010-000 ========== ErrorCode FORM_NOT_EXISTS = new ErrorCode(1_009_010_000, "动态表单不存在"); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java index 615416c736..bd4f361d5c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java @@ -4,9 +4,6 @@ import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import lombok.AllArgsConstructor; import lombok.Getter; -import java.util.Arrays; -import java.util.List; - /** * 流程实例的结果 * @@ -16,38 +13,34 @@ import java.util.List; @AllArgsConstructor public enum BpmProcessInstanceResultEnum { - PROCESS(1, "处理中"), - APPROVE(2, "通过"), - REJECT(3, "不通过"), + RUNNING(1, "审批中"), + APPROVE(2, "审批通过"), + REJECT(3, "审批不通过"), CANCEL(4, "已取消"), // ========== 流程任务独有的状态 ========== - BACK(5, "驳回"), // 退回 - DELEGATE(6, "委派"), + BACK(5, "已驳回"), // 退回 + DELEGATE(6, "委派中"), + /** * 【加签】源任务已经审批完成,但是它使用了后加签,后加签的任务未完成,源任务就会是这个状态 * 相当于是 通过 APPROVE 的特殊状态 - * 例如:A审批, A 后加签了 B,并且审批通过了任务,但是 B 还未审批,则当前任务状态为“待后加签任务完成” + * 例如:A 审批,A 后加签了 B,并且审批通过了任务,但是 B 还未审批,则当前任务状态为“待后加签任务完成” */ - SIGN_AFTER(7, "待后加签任务完成"), + APPROVING(7, "审批通过中"), /** * 【加签】源任务未审批,但是向前加签了,所以源任务状态变为“待前加签任务完成” * 相当于是 处理中 PROCESS 的特殊状态 - * 例如:A 审批, A 前加签了 B,B 还未审核 - */ - SIGN_BEFORE(8, "待前加签任务完成"), - /** - * 【加签】后加签任务被创建时的初始状态 - * 相当于是 处理中 PROCESS 的特殊状态 - * 因为需要源任务先完成,才能到后加签的人来审批,所以加了一个状态区分 - */ - WAIT_BEFORE_TASK(9, "待前置任务完成"); - - /** - * 能被减签的状态 + * 例如:A 审批,A 前加签了 B,B 还未审核 */ - public static final List CAN_SUB_SIGN_STATUS_LIST = Arrays.asList(PROCESS.result, WAIT_BEFORE_TASK.result); + WAIT(0, "待审批"); +// /** +// * 【加签】后加签任务被创建时的初始状态 +// * 相当于是 处理中 PROCESS 的特殊状态 +// * 因为需要源任务先完成,才能到后加签的人来审批,所以加了一个状态区分 +// */ +// WAIT_BEFORE_TASK(9, "处理中【待前置任务完成】"); /** * 结果 @@ -69,9 +62,9 @@ public enum BpmProcessInstanceResultEnum { * @return 是否 */ public static boolean isEndResult(Integer result) { - return ObjectUtils.equalsAny(result, APPROVE.getResult(), REJECT.getResult(), - CANCEL.getResult(), BACK.getResult(), - SIGN_AFTER.getResult()); + return ObjectUtils.equalsAny(result, + APPROVE.getResult(), REJECT.getResult(), CANCEL.getResult(), + BACK.getResult(), APPROVING.getResult()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java index 089690457b..b8c05ad98c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java @@ -12,9 +12,9 @@ import lombok.Getter; @AllArgsConstructor public enum BpmProcessInstanceStatusEnum { - RUNNING(1, "进行中"), - APPROVE(2, "通过"), - REJECT(3, "不通过"), + RUNNING(1, "审批中"), + APPROVE(2, "审批通过"), + REJECT(3, "审批不通过"), CANCEL(4, "已取消"); /** diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java index 42c212e28c..47e06bf6fb 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java @@ -17,15 +17,11 @@ public enum BpmTaskAddSignTypeEnum { /** * 向后加签,需要后置任务全部审批完,才会通过原审批人节点 */ - AFTER("after", "向后加签"), - /** - * 创建后置加签时的过度状态,用于控制向后加签生成的任务状态 - */ - AFTER_CHILDREN_TASK("afterChildrenTask", "向后加签生成的子任务"); + AFTER("after", "向后加签"); private final String type; - private final String desc; + private final String desc; // TODO 芋艿:desc public static String formatDesc(String type) { for (BpmTaskAddSignTypeEnum value : values()) { @@ -37,4 +33,3 @@ public enum BpmTaskAddSignTypeEnum { } } - \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java index 8f51441587..c7fd78cacc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java @@ -18,8 +18,9 @@ public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { @Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000") private Long durationInMillis; - @Schema(description = "任务结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Integer result; + @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举 + @Schema(description = "审批建议", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!") private String reason; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java index efecbf5821..c78d8a4324 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java @@ -6,10 +6,14 @@ import lombok.Data; @Schema(description = "管理后台 - 减签流程任务的 Response VO") @Data public class BpmTaskSubSignRespVO { + @Schema(description = "审核的用户信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "小李") private BpmTaskRespVO.User assigneeUser; + @Schema(description = "任务 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12312") private String id; + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "经理审批") private String name; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 60ce840218..2f94219833 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.convert.task; -import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -8,7 +7,7 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; @@ -19,7 +18,10 @@ import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; -import org.mapstruct.*; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Mappings; +import org.mapstruct.Named; import org.mapstruct.factory.Mappers; import java.util.Date; @@ -62,12 +64,12 @@ public interface BpmTaskConvert { } default List convertList2(List tasks, - Map bpmTaskExtDOMap, Map historicProcessInstanceMap, + Map historicProcessInstanceMap, Map userMap) { return CollectionUtils.convertList(tasks, task -> { BpmTaskDonePageItemRespVO respVO = convert2(task); - BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId()); - copyTo(taskExtDO, respVO); + respVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + // 流程实例 HistoricProcessInstance processInstance = historicProcessInstanceMap.get(task.getProcessInstanceId()); if (processInstance != null) { AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); @@ -89,12 +91,12 @@ public interface BpmTaskConvert { BpmTaskTodoPageItemRespVO.ProcessInstance convert(ProcessInstance processInstance, AdminUserRespDTO startUser); default List convertList3(List tasks, - Map bpmTaskExtDOMap, HistoricProcessInstance processInstance, + HistoricProcessInstance processInstance, Map userMap, Map deptMap) { return CollectionUtils.convertList(tasks, task -> { BpmTaskRespVO respVO = convert3(task); - BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId()); - copyTo(taskExtDO, respVO); + respVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + // 流程实例 if (processInstance != null) { AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); respVO.setProcessInstance(convert(processInstance, startUser)); @@ -116,9 +118,6 @@ public interface BpmTaskConvert { BpmTaskRespVO.User convert3(AdminUserRespDTO bean); - @Mapping(target = "id", ignore = true) - void copyTo(BpmTaskExtDO from, @MappingTarget BpmTaskDonePageItemRespVO to); - @Mappings({@Mapping(source = "processInstance.id", target = "id"), @Mapping(source = "processInstance.name", target = "name"), @Mapping(source = "processInstance.startUserId", target = "startUserId"), @@ -127,14 +126,6 @@ public interface BpmTaskConvert { BpmTaskTodoPageItemRespVO.ProcessInstance convert(HistoricProcessInstance processInstance, AdminUserRespDTO startUser); - default BpmTaskExtDO convert2TaskExt(Task task) { - BpmTaskExtDO taskExtDO = new BpmTaskExtDO().setTaskId(task.getId()) - .setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setName(task.getName()) - .setProcessDefinitionId(task.getProcessDefinitionId()).setProcessInstanceId(task.getProcessInstanceId()); - taskExtDO.setCreateTime(LocalDateTimeUtil.of(task.getCreateTime())); - return taskExtDO; - } - default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser, Task task) { BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO(); @@ -161,6 +152,7 @@ public interface BpmTaskConvert { task.setParentTaskId(parentTask.getId()); task.setProcessDefinitionId(parentTask.getProcessDefinitionId()); task.setProcessInstanceId(parentTask.getProcessInstanceId()); +// task.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错) task.setTaskDefinitionKey(parentTask.getTaskDefinitionKey()); task.setTaskDefinitionId(parentTask.getTaskDefinitionId()); task.setPriority(parentTask.getPriority()); @@ -168,15 +160,14 @@ public interface BpmTaskConvert { return task; } - default List convertList(List bpmTaskExtDOList, - Map userMap, - Map idTaskMap){ + default List convertList(List bpmTaskExtDOList, + Map userMap){ return CollectionUtils.convertList(bpmTaskExtDOList, task -> { BpmTaskSubSignRespVO bpmTaskSubSignRespVO = new BpmTaskSubSignRespVO() - .setId(task.getTaskId()).setName(task.getName()); + .setId(task.getId()).setName(task.getName()); // 后加签任务不会直接设置 assignee ,所以不存在 assignee 的情况,则去取 owner - Task sourceTask = idTaskMap.get(task.getTaskId()); - String assignee = ObjectUtil.defaultIfBlank(sourceTask.getOwner(),sourceTask.getAssignee()); +// Task sourceTask = idTaskMap.get(task.getTaskId()); + String assignee = ObjectUtil.defaultIfBlank(task.getOwner(), task.getAssignee()); MapUtils.findAndThen(userMap,NumberUtils.parseLong(assignee), assignUser-> bpmTaskSubSignRespVO.setAssigneeUser(convert3(assignUser))); return bpmTaskSubSignRespVO; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java index a79fce4128..7ebe25e01e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java @@ -20,6 +20,7 @@ import java.time.LocalDateTime; @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) +@Deprecated public class BpmTaskExtDO extends BaseDO { /** @@ -61,6 +62,7 @@ public class BpmTaskExtDO extends BaseDO { /** * 审批建议 */ + @Deprecated private String reason; /** * 任务的结束时间 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java index 8108e613da..0d91545c2e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java @@ -1,39 +1,33 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.task; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; -import java.util.Collection; -import java.util.List; - @Mapper public interface BpmTaskExtMapper extends BaseMapperX { - default void updateByTaskId(BpmTaskExtDO entity) { - update(entity, new LambdaQueryWrapper().eq(BpmTaskExtDO::getTaskId, entity.getTaskId())); - } +// default void updateByTaskId(BpmTaskExtDO entity) { +// update(entity, new LambdaQueryWrapper().eq(BpmTaskExtDO::getTaskId, entity.getTaskId())); +// } - default List selectListByTaskIds(Collection taskIds) { - return selectList(BpmTaskExtDO::getTaskId, taskIds); - } +// default List selectListByTaskIds(Collection taskIds) { +// return selectList(BpmTaskExtDO::getTaskId, taskIds); +// } // TODO @海:BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST) 应该作为条件,mapper 不要有业务 - default List selectProcessListByTaskIds(Collection taskIds) { - return selectList(new LambdaQueryWrapperX() - .in(BpmTaskExtDO::getTaskId, taskIds) - .in(BpmTaskExtDO::getResult, BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST)); - } - - default BpmTaskExtDO selectByTaskId(String taskId) { - return selectOne(BpmTaskExtDO::getTaskId, taskId); - } - - default void updateBatchByTaskIdList(List taskIdList, BpmTaskExtDO updateObj) { - update(updateObj, new LambdaQueryWrapper().in(BpmTaskExtDO::getTaskId, taskIdList)); - } +// default List selectProcessListByTaskIds(Collection taskIds) { +// return selectList(new LambdaQueryWrapperX() +// .in(BpmTaskExtDO::getTaskId, taskIds) +// .in(BpmTaskExtDO::getResult, BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST)); +// } + +// default BpmTaskExtDO selectByTaskId(String taskId) { +// return selectOne(BpmTaskExtDO::getTaskId, taskId); +// } + +// default void updateBatchByTaskIdList(List taskIdList, BpmTaskExtDO updateObj) { +// update(updateObj, new LambdaQueryWrapper().in(BpmTaskExtDO::getTaskId, taskIdList)); +// } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java index b2bd419e6a..7649b0fbcb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java @@ -16,4 +16,11 @@ public class BpmConstants { */ public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS"; + /** + * 任务的变量 - 状态 + * + * @see org.flowable.task.api.Task#getTaskLocalVariables() + */ + public static final String TASK_VARIABLE_STATUS = "TASK_STATUS"; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java index 08638a9d3c..7a647c2059 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import com.google.common.collect.ImmutableSet; @@ -21,7 +20,7 @@ import java.util.List; import java.util.Set; /** - * 监听 {@link org.flowable.task.api.Task} 的开始与完成,创建与更新对应的 {@link BpmTaskExtDO} 记录 + * 监听 {@link org.flowable.task.api.Task} 的开始与完成 * * @author jason */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 76fe216696..3c786d805d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -48,7 +48,7 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { // 插入 OA 请假单 long day = LocalDateTimeUtil.between(createReqVO.getStartTime(), createReqVO.getEndTime()).toDays(); BpmOALeaveDO leave = BpmOALeaveConvert.INSTANCE.convert(createReqVO).setUserId(userId).setDay(day) - .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); + .setResult(BpmProcessInstanceResultEnum.RUNNING.getResult()); leaveMapper.insert(leave); // 发起 BPM 流程 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index ca312df812..bb94dd2e22 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.bpm.service.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import jakarta.validation.Valid; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; @@ -13,6 +15,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; + /** * 流程实例 Service 接口 * @@ -43,7 +47,7 @@ public interface BpmProcessInstanceService { * @return 流程实例列表 Map */ default Map getProcessInstanceMap(Set ids) { - return CollectionUtils.convertMap(getProcessInstances(ids), ProcessInstance::getProcessInstanceId); + return convertMap(getProcessInstances(ids), ProcessInstance::getProcessInstanceId); } /** @@ -53,7 +57,7 @@ public interface BpmProcessInstanceService { * @return 对应的映射关系 */ default Map getProcessInstanceNameMap(Set ids) { - return CollectionUtils.convertMap(getProcessInstances(ids), + return convertMap(getProcessInstances(ids), ProcessInstance::getProcessInstanceId, ProcessInstance::getName); } @@ -80,7 +84,7 @@ public interface BpmProcessInstanceService { * @return 历史的流程实例列表 Map */ default Map getHistoricProcessInstanceMap(Set ids) { - return CollectionUtils.convertMap(getHistoricProcessInstances(ids), HistoricProcessInstance::getId); + return convertMap(getHistoricProcessInstances(ids), HistoricProcessInstance::getId); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 97018451d6..08a07bdb55 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.bpm.service.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; import jakarta.validation.Valid; import org.flowable.task.api.Task; @@ -64,15 +63,6 @@ public interface BpmTaskService { */ List getTaskListByProcessInstanceId(String processInstanceId); - - /** - * 通过任务 ID 集合,获取任务扩展表信息集合 - * - * @param taskIdList 任务 ID 集合 - * @return 任务列表 - */ - List getTaskListByTaskIdList(List taskIdList); - /** * 通过任务 * @@ -151,7 +141,6 @@ public interface BpmTaskService { */ void returnTask(Long userId, BpmTaskReturnReqVO reqVO); - /** * 将指定任务委派给其他人处理,等接收人处理后再回到原审批人手中审批 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 6e9929d379..199662519c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -13,12 +13,11 @@ import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskAddSignTypeEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -39,7 +38,6 @@ import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.DelegationState; import org.flowable.task.api.Task; -import org.flowable.task.api.TaskInfo; import org.flowable.task.api.TaskQuery; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.api.history.HistoricTaskInstanceQuery; @@ -51,7 +49,6 @@ import org.springframework.transaction.support.TransactionSynchronization; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; -import java.time.LocalDateTime; import java.util.*; import java.util.stream.Stream; @@ -115,8 +112,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 获得 ProcessInstance Map - Map processInstanceMap = - processInstanceService.getProcessInstanceMap(convertSet(tasks, Task::getProcessInstanceId)); + Map processInstanceMap = processInstanceService.getProcessInstanceMap( + convertSet(tasks, Task::getProcessInstanceId)); // 获得 User Map Map userMap = adminUserApi.getUserMap( convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); @@ -129,11 +126,13 @@ public class BpmTaskServiceImpl implements BpmTaskService { public PageResult getDoneTaskPage(Long userId, BpmTaskDonePageReqVO pageVO) { // 查询已办任务 HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery().finished() // 已完成 + .includeTaskLocalVariables() .taskAssignee(String.valueOf(userId)) // 分配给自己 .orderByHistoricTaskInstanceEndTime().desc(); // 审批时间倒序 if (StrUtil.isNotBlank(pageVO.getName())) { taskQuery.taskNameLike("%" + pageVO.getName() + "%"); } + // TODO @芋艿:传参风格,统一 if (pageVO.getBeginCreateTime() != null) { taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getBeginCreateTime())); } @@ -146,20 +145,15 @@ public class BpmTaskServiceImpl implements BpmTaskService { return PageResult.empty(taskQuery.count()); } - // 获得 TaskExtDO Map - List bpmTaskExtDOs = - taskExtMapper.selectListByTaskIds(convertSet(tasks, HistoricTaskInstance::getId)); - Map bpmTaskExtDOMap = convertMap(bpmTaskExtDOs, BpmTaskExtDO::getTaskId); // 获得 ProcessInstance Map - Map historicProcessInstanceMap = - processInstanceService.getHistoricProcessInstanceMap( - convertSet(tasks, HistoricTaskInstance::getProcessInstanceId)); + Map historicProcessInstanceMap = processInstanceService.getHistoricProcessInstanceMap( + convertSet(tasks, HistoricTaskInstance::getProcessInstanceId)); // 获得 User Map Map userMap = adminUserApi.getUserMap( convertSet(historicProcessInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); // 拼接结果 return new PageResult<>( - BpmTaskConvert.INSTANCE.convertList2(tasks, bpmTaskExtDOMap, historicProcessInstanceMap, userMap), + BpmTaskConvert.INSTANCE.convertList2(tasks, historicProcessInstanceMap, userMap), taskQuery.count()); } @@ -175,6 +169,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { public List getTaskListByProcessInstanceId(String processInstanceId) { // 获得任务列表 List tasks = historyService.createHistoricTaskInstanceQuery() + .includeTaskLocalVariables() .processInstanceId(processInstanceId) .orderByHistoricTaskInstanceStartTime().desc() // 创建时间倒序 .list(); @@ -182,9 +177,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { return Collections.emptyList(); } - // 获得 TaskExtDO Map - List bpmTaskExtDOs = taskExtMapper.selectListByTaskIds(convertSet(tasks, HistoricTaskInstance::getId)); - Map bpmTaskExtDOMap = convertMap(bpmTaskExtDOs, BpmTaskExtDO::getTaskId); // 获得 ProcessInstance Map HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId); // 获得 User Map @@ -195,15 +187,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); // 拼接数据 - List result = BpmTaskConvert.INSTANCE.convertList3(tasks, bpmTaskExtDOMap, processInstance, userMap, deptMap); + List result = BpmTaskConvert.INSTANCE.convertList3(tasks, processInstance, userMap, deptMap); return BpmTaskConvert.INSTANCE.convertChildrenList(result); } - @Override - public List getTaskListByTaskIdList(List taskIdList) { - return taskExtMapper.selectListByTaskIds(taskIdList); - } - @Override @Transactional(rollbackFor = Exception.class) public void approveTask(Long userId, @Valid BpmTaskApproveReqVO reqVO) { @@ -230,16 +217,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 情况三:自己审批的任务,调用 complete 去完成任务 // 完成任务,审批通过 + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVE.getResult()); taskService.complete(task.getId(), instance.getProcessVariables()); - // 更新任务拓展表为通过 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) - .setReason(reqVO.getReason())); +// // 更新任务拓展表为通过 +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) +// .setReason(reqVO.getReason())); // 处理加签任务 - handleParentTask(task); +// handleParentTask(task); + handleParentTaskNew(task.getParentTaskId()); } - /** * 审批通过存在“后加签”的任务。 *

@@ -250,133 +238,59 @@ public class BpmTaskServiceImpl implements BpmTaskService { */ private void approveAfterSignTask(Task task, BpmTaskApproveReqVO reqVO) { // 1. 有向后加签,则该任务状态临时设置为 ADD_SIGN_AFTER 状态 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.SIGN_AFTER.getResult()) - .setReason(reqVO.getReason()).setEndTime(LocalDateTime.now())); +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.SIGN_AFTER.getResult()) +// .setReason(reqVO.getReason()).setEndTime(LocalDateTime.now())); + // TODO @芋艿:reqVO.reason??? + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVING.getResult()); // 2. 激活子任务 List childrenTaskIdList = getChildrenTaskIdList(task.getId()); for (String childrenTaskId : childrenTaskIdList) { taskService.resolveTask(childrenTaskId); + // 更新任务扩展表中子任务为进行中 + updateTaskStatus(childrenTaskId, BpmProcessInstanceResultEnum.RUNNING.getResult()); } // 2.1 更新任务扩展表中子任务为进行中 - taskExtMapper.updateBatchByTaskIdList(childrenTaskIdList, - new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.PROCESS.getResult())); +// taskExtMapper.updateBatchByTaskIdList(childrenTaskIdList, +// new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.PROCESS.getResult())); } - /** - * 处理当前任务的父任务,主要处理“加签”的情况 - * - * @param task 当前任务 - */ - private void handleParentTask(Task task) { - String parentTaskId = task.getParentTaskId(); + // TODO 芋艿:名字 + private void handleParentTaskNew(String parentTaskId) { if (StrUtil.isBlank(parentTaskId)) { return; } - // 1. 判断当前任务的父任务是否还有子任务 + // 1.1 判断是否还有子任务。如果没有,就不处理 Long childrenTaskCount = getChildrenTaskCount(parentTaskId); if (childrenTaskCount > 0) { return; } - // 2. 获取父任务 + // 1.2 只处理加签的父任务 Task parentTask = validateTaskExist(parentTaskId); - - // 3. 处理加签情况 String scopeType = parentTask.getScopeType(); - if(!validateSignType(scopeType)){ + if (!validateSignType(scopeType)){ return; } - // 3.1 情况一:处理向前加签 - if (BpmTaskAddSignTypeEnum.BEFORE.getType().equals(scopeType)) { - // 3.1.1 如果是向前加签的任务,则调用 resolveTask 指派父任务,将 owner 重新赋值给父任务的 assignee,这样它就可以被审批 - taskService.resolveTask(parentTaskId); - // 3.1.2 更新任务拓展表为处理中 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(parentTask.getId()).setResult(BpmProcessInstanceResultEnum.PROCESS.getResult())); - } else if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(scopeType)) { - // 3.2 情况二:处理向后加签 - handleParentTaskForAfterSign(parentTask); - } - // 4. 子任务已处理完成,清空 scopeType 字段,修改 parentTask 信息,方便后续可以继续向前后向后加签 - // 再查询一次的原因是避免报错:Task was updated by another transaction concurrently - // 因为前面处理后可能会导致 parentTask rev 字段被修改,需要重新获取最新的 - parentTask = getTask(parentTaskId); - if (parentTask == null) { - // 为空的情况是:已经通过 handleAfterSign 方法将任务完成了,所以 ru_task 表会查不到数据 - return; - } + // 2. 子任务已处理完成,清空 scopeType 字段,修改 parentTask 信息,方便后续可以继续向前后向后加签 clearTaskScopeTypeAndSave(parentTask); - } - - /** - * 处理后加签任务 - * - * @param parentTask 当前审批任务的父任务 - */ - // TODO @海:这个逻辑,怎么感觉可以是 parentTask 的 parent,再去调用 handleParentTask 方法;可以微信聊下; - private void handleParentTaskForAfterSign(Task parentTask) { - String parentTaskId = parentTask.getId(); - // 1. 更新 parentTask 的任务拓展表为通过,并调用 complete 完成自己 - BpmTaskExtDO currentTaskExt = taskExtMapper.selectByTaskId(parentTask.getId()); - BpmTaskExtDO currentTaskExtUpdateObj = new BpmTaskExtDO().setTaskId(parentTask.getId()) - .setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()); - if (currentTaskExt.getEndTime() == null) { - // 1.1 有这个判断是因为,以前没设置过结束时间,才去设置 - currentTaskExtUpdateObj.setEndTime(LocalDateTime.now()); - } - taskExtMapper.updateByTaskId(currentTaskExtUpdateObj); - // 1.2 完成自己(因为它已经没有子任务,所以也可以完成) - taskService.complete(parentTaskId); - - // 2. 如果有父级,递归查询上级任务是否都已经完成 - if (StrUtil.isEmpty(parentTask.getParentTaskId())) { - return; - } - // 2.1 判断整条链路的任务是否完成 - // 例如从 A 任务加签了一个 B 任务,B 任务又加签了一个 C 任务,C 任务加签了 D 任务 - // 此时,D 任务完成,要一直往上找到祖先任务 A调用 complete 方法完成 A 任务 - boolean allChildrenTaskFinish = true; - while (StrUtil.isNotBlank(parentTask.getParentTaskId())) { - parentTask = validateTaskExist(parentTask.getParentTaskId()); - BpmTaskExtDO parentTaskExt = taskExtMapper.selectByTaskId(parentTask.getId()); - if (parentTaskExt == null) { - break; - } - boolean currentTaskFinish = BpmProcessInstanceResultEnum.isEndResult(parentTaskExt.getResult()); - // 2.2 如果 allChildrenTaskFinish 已经被赋值为 false,则不会再赋值为 true,因为整个链路没有完成 - if (allChildrenTaskFinish) { - allChildrenTaskFinish = currentTaskFinish; - } - // 2.3 任务已完成则不处理 - if (currentTaskFinish) { - continue; - } - - // 3 处理非完成状态的任务 - // 3.1 判断当前任务的父任务是否还有子任务 - Long childrenTaskCount = getChildrenTaskCount(parentTaskExt.getTaskId()); - if (childrenTaskCount > 0) { - continue; - } - // 3.2 没有子任务,判断当前任务状态是否为 ADD_SIGN_BEFORE 待前加签任务完成 - if (BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult().equals(parentTaskExt.getResult())) { - // 3.3 需要修改该任务状态为处理中 - taskService.resolveTask(parentTaskExt.getTaskId()); - parentTaskExt.setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); - taskExtMapper.updateByTaskId(parentTaskExt); - } - // 3.4 清空 scopeType 字段,用于任务没有子任务时使用该方法,方便任务可以再次被不同的方式加签 - parentTask = validateTaskExist(parentTaskExt.getTaskId()); - clearTaskScopeTypeAndSave(parentTask); + // 3.1 情况一:处理向【向前】加签 + if (BpmTaskAddSignTypeEnum.BEFORE.getType().equals(scopeType)) { + // 3.1.1 owner 重新赋值给父任务的 assignee,这样它就可以被审批 + taskService.resolveTask(parentTaskId); + // 3.1.2 更新流程任务 status + updateTaskStatus(parentTaskId, BpmProcessInstanceResultEnum.RUNNING.getResult()); + // 3.2 情况二:处理向【向后】加签 + } else if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(scopeType)) { + // 3.2.1 完成自己(因为它已经没有子任务,所以也可以完成) + updateTaskStatus(parentTaskId, BpmProcessInstanceResultEnum.APPROVE.getResult()); + taskService.complete(parentTaskId); } - // 4. 完成最后的顶级祖先任务 - if (allChildrenTaskFinish) { - taskService.complete(parentTask.getId()); - } + // 4. 递归处理父任务 + handleParentTaskNew(parentTask.getParentTaskId()); } /** @@ -422,9 +336,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 底层调用 TaskHelper.changeTaskAssignee(task, task.getOwner()):将 owner 设置为 assignee taskService.resolveTask(task.getId()); // 2.2 更新任务拓展表为【处理中】 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()) - .setReason(reqVO.getReason())); +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.RUNNING.getResult()) +// .setReason(reqVO.getReason())); + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.RUNNING.getResult()); } @Override @@ -438,12 +353,13 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 更新流程实例为不通过 + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.REJECT.getResult()); processInstanceService.updateProcessInstanceExtReject(instance.getProcessInstanceId(), reqVO.getReason()); - // 更新任务拓展表为不通过 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) - .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); +// // 更新任务拓展表为不通过 +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) +// .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); } @Override @@ -459,6 +375,20 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.setAssignee(id, String.valueOf(userId)); } + /** + * 更新流程任务的 status 状态 + * + * @param id 任务编号 + * @param status 状态 + */ + private void updateTaskStatus(String id, Integer status) { +// try { +// } catch (FlowableObjectNotFoundException exception) { +// historyService. +// } + taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_STATUS, status); + } + /** * 校验任务是否存在, 并且是否是分配给自己的任务 * @@ -475,25 +405,56 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override public void createTaskExt(Task task) { - BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) - .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); +// BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) +// .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); +// // 向后加签生成的任务,状态不能为进行中,需要等前面父任务完成 +// if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { +// taskExtDO.setResult(BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult()); +// } +// taskExtMapper.insert(taskExtDO); +// Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); +// if (status != null) { +// return; +// } +// +// status = BpmProcessInstanceResultEnum.RUNNING.getResult(); // 向后加签生成的任务,状态不能为进行中,需要等前面父任务完成 - if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { - taskExtDO.setResult(BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult()); - } - taskExtMapper.insert(taskExtDO); +// if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { +// status = BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult(); +// } + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.RUNNING.getResult()); } @Override public void updateTaskExtComplete(Task task) { - BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) - .setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) // 不设置也问题不大,因为 Complete 一般是审核通过,已经设置 - .setEndTime(LocalDateTime.now()); - taskExtMapper.updateByTaskId(taskExtDO); +// BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) +// .setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) // 不设置也问题不大,因为 Complete 一般是审核通过,已经设置 +// .setEndTime(LocalDateTime.now()); +// taskExtMapper.updateByTaskId(taskExtDO); + + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVE.getResult()); } @Override public void updateTaskExtCancel(String taskId) { + Task task = getTask(taskId); + // 可能只是活动,不是任务,所以查询不到 + if (task == null) { + log.error("[updateTaskExtCancel][taskId({}) 任务不存在]", taskId); + return; + } + + Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); + if (BpmProcessInstanceResultEnum.isEndResult(status)) { + log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); + return; + } + updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult()); + + if (true) { + return; + } + // 需要在事务提交后,才进行查询。不然查询不到历史的原因 TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { @@ -505,21 +466,27 @@ public class BpmTaskServiceImpl implements BpmTaskService { return; } - // 如果任务拓展表已经是完成的状态,则跳过 - BpmTaskExtDO taskExt = taskExtMapper.selectByTaskId(taskId); - if (taskExt == null) { - log.error("[updateTaskExtCancel][taskId({}) 查找不到对应的记录,可能存在问题]", taskId); - return; - } - // 如果已经是最终的结果,则跳过 - if (BpmProcessInstanceResultEnum.isEndResult(taskExt.getResult())) { - log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, taskExt.getResult()); +// // 如果任务拓展表已经是完成的状态,则跳过 +// BpmTaskExtDO taskExt = taskExtMapper.selectByTaskId(taskId); +// if (taskExt == null) { +// log.error("[updateTaskExtCancel][taskId({}) 查找不到对应的记录,可能存在问题]", taskId); +// return; +// } +// // 如果已经是最终的结果,则跳过 +// if (BpmProcessInstanceResultEnum.isEndResult(taskExt.getResult())) { +// log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, taskExt.getResult()); +// return; +// } + Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); + if (BpmProcessInstanceResultEnum.isEndResult(status)) { + log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } // 更新任务 - taskExtMapper.updateById(new BpmTaskExtDO().setId(taskExt.getId()).setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) - .setEndTime(LocalDateTime.now()).setReason(BpmProcessInstanceDeleteReasonEnum.translateReason(task.getDeleteReason()))); +// taskExtMapper.updateById(new BpmTaskExtDO().setId(taskExt.getId()).setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) +// .setEndTime(LocalDateTime.now()).setReason(BpmProcessInstanceDeleteReasonEnum.translateReason(task.getDeleteReason()))); + updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult()); } }); @@ -527,9 +494,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override public void updateTaskExtAssign(Task task) { - BpmTaskExtDO taskExtDO = - new BpmTaskExtDO().setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setTaskId(task.getId()); - taskExtMapper.updateByTaskId(taskExtDO); +// BpmTaskExtDO taskExtDO = +// new BpmTaskExtDO().setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setTaskId(task.getId()); +// taskExtMapper.updateByTaskId(taskExtDO); + // 发送通知。在事务提交时,批量执行操作,所以直接查询会无法查询到 ProcessInstance,所以这里是通过监听事务的提交来实现。 TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { @Override @@ -555,11 +523,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override public Task getTask(String id) { - return taskService.createTaskQuery().taskId(id).singleResult(); + return taskService.createTaskQuery().taskId(id).includeTaskLocalVariables().singleResult(); } private HistoricTaskInstance getHistoricTask(String id) { - return historyService.createHistoricTaskInstanceQuery().taskId(id).singleResult(); + return historyService.createHistoricTaskInstanceQuery().taskId(id).includeTaskLocalVariables().singleResult(); } @Override @@ -594,13 +562,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 1.2 校验源头和目标节点的关系,并返回目标元素 FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), reqVO.getTargetDefinitionKey(), task.getProcessDefinitionId()); + // 3. 更新任务扩展表 TODO 芋艿:需要提前搞 + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); + // 2. 调用 flowable 框架的回退逻辑 returnTask0(task, targetElement, reqVO); // 3. 更新任务扩展表 - taskExtMapper.updateByTaskId(new BpmTaskExtDO().setTaskId(task.getId()) - .setResult(BpmProcessInstanceResultEnum.BACK.getResult()) - .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); +// updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); +// taskExtMapper.updateByTaskId(new BpmTaskExtDO().setTaskId(task.getId()) +// .setResult(BpmProcessInstanceResultEnum.BACK.getResult()) +// .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); } /** @@ -654,6 +626,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { } taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.BACK.getType().toString(), reqVO.getReason()); + + // TODO 芋艿:这里加下驳回的 + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); }); // 3. 执行驳回 @@ -688,9 +663,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 3.2 执行委派,将任务委派给 receiveId taskService.delegateTask(taskId, reqVO.getDelegateUserId().toString()); // 3.3 更新任务拓展表为【委派】 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.DELEGATE.getResult()) - .setReason(reqVO.getReason())); +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.DELEGATE.getResult()) +// .setReason(reqVO.getReason())); + updateTaskStatus(taskId, BpmProcessInstanceResultEnum.DELEGATE.getResult()); } /** @@ -729,15 +705,20 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskEntity.setOwner(taskEntity.getAssignee()); taskEntity.setAssignee(null); // 2.3 更新扩展表状态 - taskExtMapper.updateByTaskId( - new BpmTaskExtDO().setTaskId(taskEntity.getId()) - .setResult(BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()) - .setReason(reqVO.getReason())); +// taskExtMapper.updateByTaskId( +// new BpmTaskExtDO().setTaskId(taskEntity.getId()) +// .setResult(BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()) +// .setReason(reqVO.getReason())); +// taskEntity.setTransientVariableLocal(BpmConstants.TASK_VARIABLE_STATUS, BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()); +// updateTaskStatus(taskEntity.getId(), BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()); // TODO 芋艿:貌似会有实物并发的问题;所以不能用这个调用,只能 set } // 2.4 记录加签方式,完成任务时需要用到判断 taskEntity.setScopeType(reqVO.getType()); // 2.5 保存当前任务修改后的值 taskService.saveTask(taskEntity); + if (reqVO.getType().equals(BpmTaskAddSignTypeEnum.BEFORE.getType())) { + updateTaskStatus(taskEntity.getId(), BpmProcessInstanceResultEnum.WAIT.getResult()); // TODO 芋艿:貌似只能放在这个地方,不然会有并发修改的报错 + } // 3. 创建加签任务 createSignTask(convertList(reqVO.getUserIdList(), String::valueOf), taskEntity); @@ -764,12 +745,12 @@ public class BpmTaskServiceImpl implements BpmTaskService { private TaskEntityImpl validateAddSign(Long userId, BpmTaskAddSignReqVO reqVO) { TaskEntityImpl taskEntity = (TaskEntityImpl) validateTask(userId, reqVO.getId()); // 向前加签和向后加签不能同时存在 - if (StrUtil.isNotBlank(taskEntity.getScopeType()) - && ObjectUtil.notEqual(BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType(), taskEntity.getScopeType()) + if (taskEntity.getScopeType() != null && ObjectUtil.notEqual(taskEntity.getScopeType(), reqVO.getType())) { throw exception(TASK_ADD_SIGN_TYPE_ERROR, BpmTaskAddSignTypeEnum.formatDesc(taskEntity.getScopeType()), BpmTaskAddSignTypeEnum.formatDesc(reqVO.getType())); } + // 同一个 key 的任务,审批人不重复 List taskList = taskService.createTaskQuery().processInstanceId(taskEntity.getProcessInstanceId()) .taskDefinitionKey(taskEntity.getTaskDefinitionKey()).list(); @@ -819,17 +800,23 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.2.1 设置 owner 不设置 assignee 是因为不能同时审批,需要等父任务完成 task.setOwner(assignee); // 2.2.2 设置向后加签任务的 scopeType 为 afterChildrenTask,用于设置任务扩展表的状态 - task.setScopeType(BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType()); +// task.setScopeType(BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType()); +// task.setVariableLocal(BpmConstants.TASK_VARIABLE_STATUS, BpmProcessInstanceResultEnum.WAIT.getResult()); } // 2. 保存子任务 taskService.saveTask(task); + // 3. TODO + if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { + updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.WAIT.getResult()); + } } @Override @Transactional(rollbackFor = Exception.class) public void deleteSignTask(Long userId, BpmTaskSubSignReqVO reqVO) { // 1.1 校验 task 可以被减签 - Task task = validateSubSign(reqVO.getId()); +// Task task = validateSubSign(reqVO.getId()); // TODO 芋艿:这个判断,暂时有点问题!在前置加签的时候 + Task task = validateTaskExist(reqVO.getId()); // 1.2 校验取消人存在 AdminUserRespDTO cancelUser = null; if (StrUtil.isNotBlank(task.getAssignee())) { @@ -846,17 +833,18 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.2 删除任务和所有子任务 taskService.deleteTasks(allTaskIdList); // 2.3 修改扩展表状态为取消 - AdminUserRespDTO user = adminUserApi.getUser(userId); - taskExtMapper.updateBatchByTaskIdList(allTaskIdList, new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) - .setReason(StrUtil.format("由于{}操作[减签],任务被取消", user.getNickname()))); +// taskExtMapper.updateBatchByTaskIdList(allTaskIdList, new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) +// .setReason(StrUtil.format("由于{}操作[减签],任务被取消", user.getNickname()))); +// allTaskIdList.forEach(taskId -> updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult())); // TODO @芋艿:交给取消;考虑到理由,可能不能直接给; // 3. 记录日志到父任务中。先记录日志是因为,通过 handleParentTask 方法之后,任务可能被完成了,并且不存在了,会报异常,所以先记录 + AdminUserRespDTO user = adminUserApi.getUser(userId); String comment = StrUtil.format(BpmCommentTypeEnum.SUB_SIGN.getComment(), user.getNickname(), cancelUser.getNickname()); taskService.addComment(task.getParentTaskId(), task.getProcessInstanceId(), BpmCommentTypeEnum.SUB_SIGN.getType().toString(), comment); // 4. 处理当前任务的父任务 - handleParentTask(task); + handleParentTaskNew(task.getParentTaskId()); } /** @@ -954,17 +942,16 @@ public class BpmTaskServiceImpl implements BpmTaskService { if (CollUtil.isEmpty(taskList)) { return Collections.emptyList(); } - List childrenTaskIdList = convertList(taskList, Task::getId); // 2.1 将 owner 和 assignee 统一到一个集合中 List userIds = convertListByFlatMap(taskList, control -> Stream.of(NumberUtils.parseLong(control.getAssignee()), NumberUtils.parseLong(control.getOwner())) - .filter(Objects::nonNull)); + .filter(Objects::nonNull)); // TODO 芋艿:这里可能可以优化下 // 2.2 组装数据 Map userMap = adminUserApi.getUserMap(userIds); - List taskExtList = taskExtMapper.selectProcessListByTaskIds(childrenTaskIdList); - Map idTaskMap = convertMap(taskList, TaskInfo::getId); - return BpmTaskConvert.INSTANCE.convertList(taskExtList, userMap, idTaskMap); +// List taskExtList = taskExtMapper.selectProcessListByTaskIds(childrenTaskIdList); +// Map idTaskMap = convertMap(taskList, TaskInfo::getId); + return BpmTaskConvert.INSTANCE.convertList(taskList, userMap); } @Override -- Gitee From 633b1126032ac6217fe0556cdc00cd05df7625a0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 17 Mar 2024 11:19:16 +0800 Subject: [PATCH 0070/1557] =?UTF-8?q?=E4=B8=8D=E4=BC=A0=E5=85=A5options=20?= =?UTF-8?q?=E5=8F=82=E6=95=B0=EF=BC=8C=E5=B0=B1=E5=85=88=E4=B8=8Dbuilder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/framework/ai/image/ImageClient.java | 4 ++-- .../java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java index 3c9d687439..00bd3e176c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java @@ -24,9 +24,9 @@ public interface ImageClient extends ModelClient { /** * 跟 chat一样 - * @param request the request object to be sent to the AI model + * @param imagePrompt the request object to be sent to the AI model * @return */ - ImageResponse call(ImagePrompt request); + ImageResponse call(ImagePrompt imagePrompt); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java index c8fac6ef67..75ec519485 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java @@ -49,7 +49,8 @@ public class ImagePrompt implements ModelRequest> { } public ImagePrompt(String instructions) { - this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build()); +// this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build()); + this(new ImageMessage(instructions), null); } @Override -- Gitee From a14aebd5ee2a71b2548a8b71ab1cf74ea17f4efc Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 17 Mar 2024 11:19:58 +0800 Subject: [PATCH 0071/1557] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=20openai=20dall-e-?= =?UTF-8?q?3=EF=BC=8C=E5=8F=91=E9=80=81=E8=AF=B7=E6=B1=82=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=9C=B0=E5=9D=80=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E9=93=BE=E6=8E=A5=E4=B8=8D=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/imageopenai/OpenAiImageApi.java | 54 ++++++++++++ .../ai/imageopenai/OpenAiImageClient.java | 82 +++++++++++++++++++ .../ai/imageopenai/OpenAiImageOptions.java | 77 +++++++++++++++++ .../imageopenai/api/OpenAiImageRequest.java | 58 +++++++++++++ .../imageopenai/api/OpenAiImageResponse.java | 28 +++++++ .../yudao/framework/ai/util/JacksonUtil.java | 79 ++++++++++++++++++ .../ai/chat/QianWenChatClientTests.java | 6 +- .../ai/image/OpenAiImageClientTests.java | 31 +++++++ 8 files changed, 412 insertions(+), 3 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java new file mode 100644 index 0000000000..bcc03f2eed --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.framework.ai.imageopenai; + +import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; +import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; +import cn.iocoder.yudao.framework.ai.util.JacksonUtil; +import io.netty.channel.ChannelOption; +import org.springframework.http.client.reactive.ReactorClientHttpConnector; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.netty.http.client.HttpClient; + +import java.time.Duration; + +/** + * open ai image + *

+ * author: fansili + * time: 2024/3/17 09:53 + */ +public class OpenAiImageApi { + + private static final String DEFAULT_BASE_URL = "https://api.openai.com"; + private String apiKey = "your-api-key"; + // 发送请求 webClient + private final WebClient webClient; + + public OpenAiImageApi(String apiKey) { + this.apiKey = apiKey; + // 创建一个HttpClient实例并设置超时 + HttpClient httpClient = HttpClient.create() + .responseTimeout(Duration.ofSeconds(300)) // 设置响应超时时间为30秒 + .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 * 100); // 设置连接超时为5秒 + this.webClient = WebClient.builder() + .baseUrl(DEFAULT_BASE_URL) + .clientConnector(new ReactorClientHttpConnector(httpClient)) + .build(); + } + + public OpenAiImageResponse createImage(OpenAiImageRequest request) { + String res = webClient.post() + .uri(uriBuilder -> uriBuilder.path("/v1/images/generations").build()) + .header("Content-Type", "application/json") + .header("Authorization", "Bearer " + apiKey) + // 设置请求体(这里假设jsonStr是一个JSON格式的字符串) + .body(BodyInserters.fromValue(JacksonUtil.toJson(request))) + // 发送请求并获取响应体 + .retrieve() + // 转换响应体为String类型 + .bodyToMono(String.class) + .block(); + // TODO: 2024/3/17 这里发送请求会失败! + return null; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java new file mode 100644 index 0000000000..a1bb59db1c --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.framework.ai.imageopenai; + +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.ai.chat.ChatException; +import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import cn.iocoder.yudao.framework.ai.image.ImageClient; +import cn.iocoder.yudao.framework.ai.image.ImageOptions; +import cn.iocoder.yudao.framework.ai.image.ImagePrompt; +import cn.iocoder.yudao.framework.ai.image.ImageResponse; +import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; +import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; +import jdk.jfr.Frequency; +import lombok.extern.slf4j.Slf4j; +import org.springframework.retry.RetryCallback; +import org.springframework.retry.RetryContext; +import org.springframework.retry.RetryListener; +import org.springframework.retry.support.RetryTemplate; + +import java.time.Duration; + +/** + * open ai 生成 image + * + * author: fansili + * time: 2024/3/17 09:51 + */ +@Slf4j +public class OpenAiImageClient implements ImageClient { + + /** + * open image ai + */ + private OpenAiImageApi openAiImageApi; + /** + * 默认使用的 ImageOptions + */ + private OpenAiImageOptions defaultImageOptions; + + + public final RetryTemplate retryTemplate = RetryTemplate.builder() + // 最大重试次数 10 + .maxAttempts(10) + .retryOn(YiYanApiException.class) + // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms + .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) + .withListener(new RetryListener() { + @Override + public void onError(RetryContext context, + RetryCallback callback, Throwable throwable) { + log.warn("重试异常:" + context.getRetryCount(), throwable); + }; + }) + .build(); + + public OpenAiImageClient(OpenAiImageApi openAiImageApi, OpenAiImageOptions defaultImageOptions) { + this.openAiImageApi = openAiImageApi; + this.defaultImageOptions = defaultImageOptions; + } + + @Override + public ImageResponse call(ImagePrompt imagePrompt) { + return this.retryTemplate.execute(ctx -> { + // 检查是否配置了 OpenAiImageOptions + if (defaultImageOptions == null && imagePrompt.getOptions() == null) { + throw new ChatException("OpenAiImageOptions 未配置参数!"); + } + // 优先使用 request 中的 ImageOptions + ImageOptions useImageOptions = imagePrompt.getOptions() == null ? defaultImageOptions : imagePrompt.getOptions(); + if (!(useImageOptions instanceof OpenAiImageOptions)) { + throw new ChatException("配置信息不正确,传入的必须是 OpenAiImageOptions!"); + } + // 转换 OpenAiImageOptions + OpenAiImageOptions openAiImageOptions = (OpenAiImageOptions) useImageOptions; + // 创建请求 + OpenAiImageRequest request = new OpenAiImageRequest(); + BeanUtil.copyProperties(openAiImageOptions, request); + // 发送请求 + OpenAiImageResponse response = openAiImageApi.createImage(request); + return null; + }); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java new file mode 100644 index 0000000000..f18ccd2985 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java @@ -0,0 +1,77 @@ +package cn.iocoder.yudao.framework.ai.imageopenai; + +import cn.iocoder.yudao.framework.ai.image.ImageOptions; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * open ai 配置文件 + * + * 文档地址:https://platform.openai.com/docs/api-reference/images/create + * + * author: fansili + * time: 2024/3/17 09:53 + */ +@Data +@Accessors(chain = true) +public class OpenAiImageOptions implements ImageOptions { + + // 必填字段,用于描述期望生成图像的文字说明。对于dall-e-2模型最大长度为1000个字符,对于dall-e-3模型最大长度为4000个字符。 + private String prompt; + + // 可选字段,默认为dall-e-2 + // 指定用于生成图像的模型名称。 + private String model = "dall-e-2"; + + // 可选字段,默认为1 + // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 + private Integer n = 1; + + // 可选字段,默认为standard + // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 + private String quality = "standard"; + + // 可选字段,默认为url + // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 + private String responseFormat = "url"; + + // 可选字段,默认为1024x1024 + // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 + private String imageSize = "1024x1024"; + + // 可选字段,默认为vivid + // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 + private String style = "vivid"; + + // 可选字段 + // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 + private String endUserId; + + // + // 适配 spring ai + + @Override + public Integer getN() { + return this.n; + } + + @Override + public String getModel() { + return this.model; + } + + @Override + public Integer getWidth() { + return null; + } + + @Override + public Integer getHeight() { + return null; + } + + @Override + public String getResponseFormat() { + return this.responseFormat; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java new file mode 100644 index 0000000000..865dbd1362 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.framework.ai.imageopenai.api; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * open ai 配置文件 + * + * 文档地址:https://platform.openai.com/docs/api-reference/images/create + * + * author: fansili + * time: 2024/3/17 09:53 + */ +@Data +@Accessors(chain = true) +public class OpenAiImageRequest { + + // 必填字段,用于描述期望生成图像的文字说明。对于dall-e-2模型最大长度为1000个字符,对于dall-e-3模型最大长度为4000个字符。 + @JsonProperty("prompt") + private String prompt; + + // 可选字段,默认为dall-e-2、dall-e-3 + // 指定用于生成图像的模型名称。 + @JsonProperty("model") + private String model = "dall-e-2"; + + // 可选字段,默认为1 + // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 + @JsonProperty("n") + private Integer n = 1; + + // 可选字段,默认为standard + // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 + @JsonProperty("quality") + private String quality = "standard"; + + // 可选字段,默认为url + // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 + @JsonProperty("response_format") + private String responseFormat = "url"; + + // 可选字段,默认为1024x1024 + // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 + @JsonProperty("size") + private String imageSize = "1024x1024"; + + // 可选字段,默认为vivid + // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 + @JsonProperty("style") + private String style = "vivid"; + + // 可选字段 + // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 + @JsonProperty("user") + private String endUserId; + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java new file mode 100644 index 0000000000..04de1494d1 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.framework.ai.imageopenai.api; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * image 返回 + * + * author: fansili + * time: 2024/3/17 10:27 + */ +@Data +@Accessors(chain = true) +public class OpenAiImageResponse { + + private long created; + private List data; + + @Data + @Accessors(chain = true) + public static class Item { + + private String url; + + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java new file mode 100644 index 0000000000..046a481dcc --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.framework.ai.util; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +import java.io.IOException; + +/** + * Jackson工具类 + * + * author: fansili + * time: 2024/3/17 10:13 + */ +public class JacksonUtil { + + private static final ObjectMapper objectMapper = new ObjectMapper(); + + /** + * 初始化 ObjectMapper 以美化输出(即格式化JSON内容) + */ + static { + // 美化输出(缩进) + objectMapper.enable(SerializationFeature.INDENT_OUTPUT); + // 忽略值为 null 的属性 + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + // 配置一个模块来将 Long 类型转换为 String 类型 + SimpleModule module = new SimpleModule(); + module.addSerializer(Long.class, ToStringSerializer.instance); + objectMapper.registerModule(module); + } + + /** + * 将对象转换为 JSON 字符串 + * + * @param obj 需要序列化的Java对象 + * @return 序列化后的 JSON 字符串 + * @throws JsonProcessingException 当 JSON 序列化过程中出现错误时抛出异常 + */ + public static String toJson(Object obj) { + try { + return objectMapper.writeValueAsString(obj); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * 将 JSON 字符串反序列化为指定类型的对象 + * + * @param json JSON 字符串 + * @param clazz 目标类型 Class 对象 + * @param 泛型类型参数 + * @return 反序列化后的 Java 对象 + * @throws IOException 当 JSON 解析过程中出现错误时抛出异常 + */ + public static T fromJson(String json, Class clazz) { + try { + return objectMapper.readValue(json, clazz); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * 将对象转换为格式化的 JSON 字符串(已启用 INDENT_OUTPUT 功能,所以所有方法都会返回格式化后的 JSON) + * + * @param obj 需要序列化的Java对象 + * @return 格式化后的 JSON 字符串 + * @throws JsonProcessingException 当 JSON 序列化过程中出现错误时抛出异常 + */ + public static String toFormattedJson(Object obj) { + // 已在类初始化时设置了 SerializationFeature.INDENT_OUTPUT,此处无需额外操作 + return toJson(obj); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 2c2b446853..14b8397478 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -23,9 +23,9 @@ public class QianWenChatClientTests { @Before public void setup() { QianWenApi qianWenApi = new QianWenApi( - "", - "", - "", + "LTAI5tNTVhXW4fLKUjMrr98z", + "ZJ0JQeyjzxxm5CfeTV6k1wNE9UsvZP", + "f0c1088824594f589c8f10567ccd929f_p_efm", null ); qianWenChatClient = new QianWenChatClient( diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java new file mode 100644 index 0000000000..83d5569304 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.framework.ai.image; + +import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageApi; +import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; +import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; +import org.junit.Before; +import org.junit.Test; + +/** + * author: fansili + * time: 2024/3/17 10:40 + */ +public class OpenAiImageClientTests { + + + private OpenAiImageClient openAiImageClient; + + @Before + public void setup() { + // 初始化 openAiImageClient + this.openAiImageClient = new OpenAiImageClient( + new OpenAiImageApi(""), + new OpenAiImageOptions() + ); + } + + @Test + public void callTest() { + openAiImageClient.call(new ImagePrompt("我和我的小狗,一起在北极和企鹅玩排球。")); + } +} -- Gitee From 3fce482716d475d9161c071e90ba6607135654f2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Mar 2024 17:24:40 +0800 Subject: [PATCH 0072/1557] =?UTF-8?q?BPM=EF=BC=9A=E7=AE=80=E5=8C=96=20task?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E7=9A=84=20VO=EF=BC=8C=E5=81=9A=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=90=88=E5=B9=B6=E3=80=82=E8=99=BD=E7=84=B6=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=8A=E6=9C=89=E5=86=97=E4=BD=99=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E8=AF=BB=E4=BB=A3=E7=A0=81=E9=9A=BE=E5=BA=A6=E9=99=8D?= =?UTF-8?q?=E4=BD=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/BpmProcessInstanceStatusOldEnum.java | 28 ---- .../admin/task/BpmTaskController.java | 142 ++++++++++++++++-- .../vo/task/BpmTaskDonePageItemRespVO.java | 27 ---- .../task/vo/task/BpmTaskDonePageReqVO.java | 31 ---- ...doPageReqVO.java => BpmTaskPageReqVO.java} | 6 +- .../admin/task/vo/task/BpmTaskRespVO.java | 79 +++++++--- .../task/vo/task/BpmTaskReturnReqVO.java | 2 +- .../task/vo/task/BpmTaskSimpleRespVO.java | 16 -- .../task/vo/task/BpmTaskSubSignRespVO.java | 19 --- .../vo/task/BpmTaskTodoPageItemRespVO.java | 53 ------- .../bpm/convert/task/BpmTaskConvert.java | 139 ----------------- .../bpm/dal/dataobject/task/BpmTaskExtDO.java | 87 ----------- .../bpm/dal/mysql/task/BpmTaskExtMapper.java | 33 ---- .../bpm/service/task/BpmTaskService.java | 24 +-- .../bpm/service/task/BpmTaskServiceImpl.java | 133 ++++------------ 15 files changed, 231 insertions(+), 588 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/{BpmTaskTodoPageReqVO.java => BpmTaskPageReqVO.java} (74%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSimpleRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java deleted file mode 100644 index 1db19cf649..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusOldEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.bpm.enums.task; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 流程实例的状态 - * - * @author 芋道源码 - */ -@Deprecated -@Getter -@AllArgsConstructor -public enum BpmProcessInstanceStatusOldEnum { - - RUNNING(1, "进行中"), - FINISH(2, "已完成"); - - /** - * 状态 - */ - private final Integer status; - /** - * 描述 - */ - private final String desc; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index ba14b61f1d..78429ea210 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -1,21 +1,43 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.flowable.bpmn.model.UserTask; +import org.flowable.engine.history.HistoricProcessInstance; +import org.flowable.engine.runtime.ProcessInstance; +import org.flowable.task.api.Task; +import org.flowable.task.api.history.HistoricTaskInstance; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; +import java.util.Collections; import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - 流程任务实例") @@ -26,28 +48,103 @@ public class BpmTaskController { @Resource private BpmTaskService taskService; + @Resource + private BpmProcessInstanceService processInstanceService; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; @GetMapping("todo-page") @Operation(summary = "获取 Todo 待办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") - public CommonResult> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) { - return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO)); + public CommonResult> getTodoTaskPage(@Valid BpmTaskPageReqVO pageVO) { + PageResult pageResult = taskService.getTodoTaskPage(getLoginUserId(), pageVO); + // 拼接数据 + Map processInstanceMap = processInstanceService.getProcessInstanceMap( + convertSet(pageResult.getList(), Task::getProcessInstanceId)); + Map userMap = adminUserApi.getUserMap( + convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); + return success(BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> { + ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); + if (processInstance == null) { + return; + } + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + })); } @GetMapping("done-page") @Operation(summary = "获取 Done 已办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") - public CommonResult> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) { - return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO)); + public CommonResult> getDoneTaskPage(@Valid BpmTaskPageReqVO pageVO) { + PageResult pageResult = taskService.getDoneTaskPage(getLoginUserId(), pageVO); + // 拼接数据 + Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( + convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId)); + Map userMap = adminUserApi.getUserMap( + convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); + return success(BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> { + HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); + if (processInstance == null) { + return; + } + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + })); } + // TODO @芋艿:怎么优化下 @GetMapping("/list-by-process-instance-id") @Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的") @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getTaskListByProcessInstanceId( @RequestParam("processInstanceId") String processInstanceId) { - return success(taskService.getTaskListByProcessInstanceId(processInstanceId)); + List taskList = taskService.getTaskListByProcessInstanceId(processInstanceId); + if (CollUtil.isEmpty(taskList)) { + return success(Collections.emptyList()); + } + + // 拼接数据 + HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId); + // 获得 User 和 Dept Map + Set userIds = convertSet(taskList, task -> NumberUtils.parseLong(task.getAssignee())); + userIds.add(NumberUtils.parseLong(processInstance.getStartUserId())); + Map userMap = adminUserApi.getUserMap(userIds); + Map deptMap = deptApi.getDeptMap( + convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + List taskVOList = CollectionUtils.convertList(taskList, task -> { + BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); + taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + // 流程实例 + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + // 用户信息 + AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); + if (assignUser != null) { + taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); + DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); + if (dept != null) { + taskVO.getAssigneeUser().setDeptName(dept.getName()); + } + } + return taskVO; + }); + + // 拼接父子关系 + Map> childrenTaskMap = convertMultiMap( + filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())), + BpmTaskRespVO::getParentTaskId); + for (BpmTaskRespVO taskVO : taskVOList) { + taskVO.setChildren(childrenTaskMap.get(taskVO.getId())); + } + return success(filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId()))); } @PutMapping("/approve") @@ -74,12 +171,14 @@ public class BpmTaskController { return success(true); } - @GetMapping("/return-list") + @GetMapping("/list-by-return") @Operation(summary = "获取所有可回退的节点", description = "用于【流程详情】的【回退】按钮") @Parameter(name = "taskId", description = "当前任务ID", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:update')") - public CommonResult> getReturnList(@RequestParam("taskId") String taskId) { - return success(taskService.getReturnTaskList(taskId)); + public CommonResult> getTaskListByReturn(@RequestParam("id") String id) { + List userTaskList = taskService.getUserTaskListByReturn(id); + return success(convertList(userTaskList, userTask -> // 只返回 id 和 name + new BpmTaskRespVO().setName(userTask.getName()).setTaskDefinitionKey(userTask.getId()))); } @PutMapping("/return") @@ -114,12 +213,23 @@ public class BpmTaskController { return success(true); } - @GetMapping("children-list") - @Operation(summary = "获取能被减签的任务") - @Parameter(name = "parentId", description = "父级任务 ID", required = true) - @PreAuthorize("@ss.hasPermission('bpm:task:update')") - public CommonResult> getChildrenTaskList(@RequestParam("parentId") String parentId) { - return success(taskService.getChildrenTaskList(parentId)); + // TODO 芋艿:待测试 + @GetMapping("list-by-parent-task-id") + @Operation(summary = "获得指定父级任务的子任务列表") // 目前用于,减签的时候,获得子任务列表 + @Parameter(name = "parentTaskId", description = "父级任务编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:task:query')") + public CommonResult> getTaskListByParentTaskId(@RequestParam("parentTaskId") String parentTaskId) { + List taskList = taskService.getTaskListByParentTaskId(parentTaskId); + if (CollUtil.isEmpty(taskList)) { + return success(Collections.emptyList()); + } + // 拼接数据 + Map userMap = adminUserApi.getUserMap( + convertSetByFlatMap(taskList, user -> Stream.of(Long.valueOf(user.getAssignee()), Long.valueOf(user.getOwner())))); + return success(convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> { + taskVO.setAssigneeUser(BeanUtils.toBean(userMap.get(NumberUtils.parseLong(task.getAssignee())), BpmProcessInstanceRespVO.User.class)); + taskVO.setOwnerUser(BeanUtils.toBean(userMap.get(NumberUtils.parseLong(task.getOwner())), BpmProcessInstanceRespVO.User.class)); + }))); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java deleted file mode 100644 index c7fd78cacc..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { - - @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime endTime; - @Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000") - private Long durationInMillis; - - @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举 - - @Schema(description = "审批建议", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!") - private String reason; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java deleted file mode 100644 index 52daea445e..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import org.springframework.format.annotation.DateTimeFormat; - -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 流程任务的 Done 已办的分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskDonePageReqVO extends PageParam { - - @Schema(description = "流程任务名", example = "芋道") - private String name; - - @Schema(description = "开始的创建收间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime beginCreateTime; - - @Schema(description = "结束的创建时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime endCreateTime; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java similarity index 74% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java index 605007ef5c..fe115fdf06 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java @@ -10,13 +10,11 @@ import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") +@Schema(description = "管理后台 - 流程任务的的分页 Request VO") // 待办、已办,都使用该分页 @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class BpmTaskTodoPageReqVO extends PageParam { +public class BpmTaskPageReqVO extends PageParam { @Schema(description = "流程任务名", example = "芋道") private String name; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 1af839e26b..1e1bebf043 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -1,47 +1,84 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; +import java.time.LocalDateTime; import java.util.List; -@Schema(description = "管理后台 - 流程任务的 Response VO") +@Schema(description = "管理后台 - 流程任务 Response VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { +public class BpmTaskRespVO { - @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001") - private String definitionKey; + @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private String id; + + @Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String name; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + + @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime endTime; + @Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000") + private Long durationInMillis; + + @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举 + + /** + * 负责人的用户信息 + */ + private BpmProcessInstanceRespVO.User ownerUser; /** * 审核的用户信息 */ - private User assigneeUser; + private BpmProcessInstanceRespVO.User assigneeUser; + + // TODO @芋艿:这个 key 有点问题,应该是 taskDefinitionId + @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001") + private String definitionKey; + @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "Activity_one") + private String taskDefinitionKey; + + @Schema(description = "所属流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8888") + private String processInstanceId; /** - * 父任务ID + * 所属流程实例 */ + private ProcessInstance processInstance; + + @Schema(description = "父任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String parentTaskId; - @Schema(description = "子任务(由加签生成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "childrenTask") + @Schema(description = "子任务列表(由加签生成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "childrenTask") private List children; - @Schema(description = "用户信息") @Data - public static class User { + @Schema(description = "流程实例") + public static class ProcessInstance { - @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Long id; - @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") - private String nickname; + @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private String id; - @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Long deptId; - @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部") - private String deptName; + @Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String name; + + @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + + @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") + private String processDefinitionId; + + /** + * 发起人的用户信息 + */ + private BpmProcessInstanceRespVO.User startUser; } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java index ca27ff6d5d..a5c3edac2e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java @@ -15,7 +15,7 @@ public class BpmTaskReturnReqVO { @Schema(description = "回退到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotEmpty(message = "回退到的任务 Key 不能为空") - private String targetDefinitionKey; + private String targetTaskDefinitionKey; @Schema(description = "回退意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "我就是想驳回") @NotEmpty(message = "回退意见不能为空") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSimpleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSimpleRespVO.java deleted file mode 100644 index b98a25a222..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSimpleRespVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - 流程任务的精简 Response VO") -@Data -public class BpmTaskSimpleRespVO { - - @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "Activity_one") - private String definitionKey; - - @Schema(description = "任务名词", requiredMode = Schema.RequiredMode.REQUIRED, example = "经理审批") - private String name; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java deleted file mode 100644 index c78d8a4324..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignRespVO.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - 减签流程任务的 Response VO") -@Data -public class BpmTaskSubSignRespVO { - - @Schema(description = "审核的用户信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "小李") - private BpmTaskRespVO.User assigneeUser; - - @Schema(description = "任务 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12312") - private String id; - - @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "经理审批") - private String name; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java deleted file mode 100644 index 4b57f47770..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java +++ /dev/null @@ -1,53 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO") -@Data -public class BpmTaskTodoPageItemRespVO { - - @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - - @Schema(description = "接收时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime claimTime; - - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime createTime; - - @Schema(description = "激活状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer suspensionState; - - /** - * 所属流程实例 - */ - private ProcessInstance processInstance; - - @Data - @Schema(description = "流程实例") - public static class ProcessInstance { - - @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - - @Schema(description = "发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private Long startUserId; - - @Schema(description = "发起人的用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") - private String startUserNickname; - - @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") - private String processDefinitionId; - - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 2f94219833..dcc34f0de8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -1,35 +1,16 @@ package cn.iocoder.yudao.module.bpm.convert.task; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import org.flowable.bpmn.model.FlowElement; -import org.flowable.common.engine.impl.db.SuspensionState; -import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; -import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; -import org.mapstruct.Named; import org.mapstruct.factory.Mappers; import java.util.Date; -import java.util.List; -import java.util.Map; - -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; /** * Bpm 任务 Convert @@ -41,91 +22,6 @@ public interface BpmTaskConvert { BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class); - default List convertList1(List tasks, - Map processInstanceMap, - Map userMap) { - return CollectionUtils.convertList(tasks, task -> { - BpmTaskTodoPageItemRespVO respVO = convert1(task); - ProcessInstance processInstance = processInstanceMap.get(task.getProcessInstanceId()); - if (processInstance != null) { - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - respVO.setProcessInstance(convert(processInstance, startUser)); - } - return respVO; - }); - } - - @Mapping(source = "suspended", target = "suspensionState", qualifiedByName = "convertSuspendedToSuspensionState") - BpmTaskTodoPageItemRespVO convert1(Task bean); - - @Named("convertSuspendedToSuspensionState") - default Integer convertSuspendedToSuspensionState(boolean suspended) { - return suspended ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode(); - } - - default List convertList2(List tasks, - Map historicProcessInstanceMap, - Map userMap) { - return CollectionUtils.convertList(tasks, task -> { - BpmTaskDonePageItemRespVO respVO = convert2(task); - respVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); - // 流程实例 - HistoricProcessInstance processInstance = historicProcessInstanceMap.get(task.getProcessInstanceId()); - if (processInstance != null) { - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - respVO.setProcessInstance(convert(processInstance, startUser)); - } - return respVO; - }); - } - - BpmTaskDonePageItemRespVO convert2(HistoricTaskInstance bean); - - @Mappings({ - @Mapping(source = "processInstance.id", target = "id"), - @Mapping(source = "processInstance.name", target = "name"), - @Mapping(source = "processInstance.startUserId", target = "startUserId"), - @Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"), - @Mapping(source = "startUser.nickname", target = "startUserNickname") - }) - BpmTaskTodoPageItemRespVO.ProcessInstance convert(ProcessInstance processInstance, AdminUserRespDTO startUser); - - default List convertList3(List tasks, - HistoricProcessInstance processInstance, - Map userMap, Map deptMap) { - return CollectionUtils.convertList(tasks, task -> { - BpmTaskRespVO respVO = convert3(task); - respVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); - // 流程实例 - if (processInstance != null) { - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - respVO.setProcessInstance(convert(processInstance, startUser)); - } - AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); - if (assignUser != null) { - respVO.setAssigneeUser(convert3(assignUser)); - DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); - if (dept != null) { - respVO.getAssigneeUser().setDeptName(dept.getName()); - } - } - return respVO; - }); - } - - @Mapping(source = "taskDefinitionKey", target = "definitionKey") - BpmTaskRespVO convert3(HistoricTaskInstance bean); - - BpmTaskRespVO.User convert3(AdminUserRespDTO bean); - - @Mappings({@Mapping(source = "processInstance.id", target = "id"), - @Mapping(source = "processInstance.name", target = "name"), - @Mapping(source = "processInstance.startUserId", target = "startUserId"), - @Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"), - @Mapping(source = "startUser.nickname", target = "startUserNickname")}) - BpmTaskTodoPageItemRespVO.ProcessInstance convert(HistoricProcessInstance processInstance, - AdminUserRespDTO startUser); - default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser, Task task) { BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO(); @@ -136,12 +32,6 @@ public interface BpmTaskConvert { return reqDTO; } - default List convertList(List elementList) { - return CollectionUtils.convertList(elementList, element -> new BpmTaskSimpleRespVO() - .setName(element.getName()) - .setDefinitionKey(element.getId())); - } - //此处不用 mapstruct 映射,因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的 //使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题 default TaskEntityImpl convert(TaskEntityImpl task,TaskEntityImpl parentTask){ @@ -160,33 +50,4 @@ public interface BpmTaskConvert { return task; } - default List convertList(List bpmTaskExtDOList, - Map userMap){ - return CollectionUtils.convertList(bpmTaskExtDOList, task -> { - BpmTaskSubSignRespVO bpmTaskSubSignRespVO = new BpmTaskSubSignRespVO() - .setId(task.getId()).setName(task.getName()); - // 后加签任务不会直接设置 assignee ,所以不存在 assignee 的情况,则去取 owner -// Task sourceTask = idTaskMap.get(task.getTaskId()); - String assignee = ObjectUtil.defaultIfBlank(task.getOwner(), task.getAssignee()); - MapUtils.findAndThen(userMap,NumberUtils.parseLong(assignee), - assignUser-> bpmTaskSubSignRespVO.setAssigneeUser(convert3(assignUser))); - return bpmTaskSubSignRespVO; - }); - } - - /** - * 转换任务为父子级 - * - * @param sourceList 原始数据 - * @return 转换后的父子级数组 - */ - default List convertChildrenList(List sourceList) { - List childrenTaskList = filterList(sourceList, r -> StrUtil.isNotEmpty(r.getParentTaskId())); - Map> parentChildrenTaskListMap = convertMultiMap(childrenTaskList, BpmTaskRespVO::getParentTaskId); - for (BpmTaskRespVO bpmTaskRespVO : sourceList) { - bpmTaskRespVO.setChildren(parentChildrenTaskListMap.get(bpmTaskRespVO.getId())); - } - return filterList(sourceList, r -> StrUtil.isEmpty(r.getParentTaskId())); - } - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java deleted file mode 100644 index 7ebe25e01e..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java +++ /dev/null @@ -1,87 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.dataobject.task; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; - -/** - * Bpm 流程任务的拓展表 - * 主要解决 Flowable Task 和 HistoricTaskInstance 不支持拓展字段,所以新建拓展表 - * - * @author 芋道源码 - */ -@TableName(value = "bpm_task_ext", autoResultMap = true) -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Deprecated -public class BpmTaskExtDO extends BaseDO { - - /** - * 编号,自增 - */ - @TableId - private Long id; - - /** - * 任务的审批人 - * - * 冗余 Task 的 assignee 属性 - */ - private Long assigneeUserId; - /** - * 任务的名字 - * - * 冗余 Task 的 name 属性,为了筛选 - */ - private String name; - /** - * 任务的编号 - * - * 关联 Task 的 id 属性 - */ - private String taskId; -// /** -// * 任务的标识 -// * -// * 关联 {@link Task#getTaskDefinitionKey()} -// */ -// private String definitionKey; - /** - * 任务的结果 - * - * 枚举 {@link BpmProcessInstanceResultEnum} - */ - private Integer result; - /** - * 审批建议 - */ - @Deprecated - private String reason; - /** - * 任务的结束时间 - * - * 冗余 HistoricTaskInstance 的 endTime 属性 - */ - private LocalDateTime endTime; - - /** - * 流程实例的编号 - * - * 关联 ProcessInstance 的 id 属性 - */ - private String processInstanceId; - /** - * 流程定义的编号 - * - * 关联 ProcessDefinition 的 id 属性 - */ - private String processDefinitionId; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java deleted file mode 100644 index 0d91545c2e..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmTaskExtMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.mysql.task; - -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface BpmTaskExtMapper extends BaseMapperX { - -// default void updateByTaskId(BpmTaskExtDO entity) { -// update(entity, new LambdaQueryWrapper().eq(BpmTaskExtDO::getTaskId, entity.getTaskId())); -// } - -// default List selectListByTaskIds(Collection taskIds) { -// return selectList(BpmTaskExtDO::getTaskId, taskIds); -// } - - // TODO @海:BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST) 应该作为条件,mapper 不要有业务 -// default List selectProcessListByTaskIds(Collection taskIds) { -// return selectList(new LambdaQueryWrapperX() -// .in(BpmTaskExtDO::getTaskId, taskIds) -// .in(BpmTaskExtDO::getResult, BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST)); -// } - -// default BpmTaskExtDO selectByTaskId(String taskId) { -// return selectOne(BpmTaskExtDO::getTaskId, taskId); -// } - -// default void updateBatchByTaskIdList(List taskIdList, BpmTaskExtDO updateObj) { -// update(updateObj, new LambdaQueryWrapper().in(BpmTaskExtDO::getTaskId, taskIdList)); -// } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 08a07bdb55..6114a612b1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -4,7 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import jakarta.validation.Valid; +import org.flowable.bpmn.model.UserTask; import org.flowable.task.api.Task; +import org.flowable.task.api.history.HistoricTaskInstance; import java.util.Collection; import java.util.List; @@ -25,7 +27,7 @@ public interface BpmTaskService { * @param pageReqVO 分页请求 * @return 流程任务分页 */ - PageResult getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageReqVO); + PageResult getTodoTaskPage(Long userId, BpmTaskPageReqVO pageReqVO); /** * 获得已办的流程任务分页 @@ -34,7 +36,7 @@ public interface BpmTaskService { * @param pageReqVO 分页请求 * @return 流程任务分页 */ - PageResult getDoneTaskPage(Long userId, BpmTaskDonePageReqVO pageReqVO); + PageResult getDoneTaskPage(Long userId, BpmTaskPageReqVO pageReqVO); /** * 获得流程任务 Map @@ -56,12 +58,12 @@ public interface BpmTaskService { List getTasksByProcessInstanceIds(List processInstanceIds); /** - * 获得指令流程实例的流程任务列表,包括所有状态的 + * 获得指定流程实例的流程任务列表,包括所有状态的 * * @param processInstanceId 流程实例的编号 * @return 流程任务列表 */ - List getTaskListByProcessInstanceId(String processInstanceId); + List getTaskListByProcessInstanceId(String processInstanceId); /** * 通过任务 @@ -126,12 +128,12 @@ public interface BpmTaskService { Task getTask(String id); /** - * 获取当前任务的可回退的流程集合 + * 获取当前任务的可回退的 UserTask 集合 * - * @param taskId 当前的任务 ID + * @param id 当前的任务 ID * @return 可以回退的节点列表 */ - List getReturnTaskList(String taskId); + List getUserTaskListByReturn(String id); /** * 将任务回退到指定的 targetDefinitionKey 位置 @@ -158,7 +160,7 @@ public interface BpmTaskService { void createSignTask(Long userId, BpmTaskAddSignReqVO reqVO); /** - * 任务减签名 + * 任务减签 * * @param userId 当前用户ID * @param reqVO 被减签的任务 ID,理由 @@ -166,12 +168,12 @@ public interface BpmTaskService { void deleteSignTask(Long userId, BpmTaskSubSignReqVO reqVO); /** - * 获取指定任务的子任务和审批人信息 + * 获取指定任务的子任务列表 * - * @param parentId 指定任务ID + * @param parentTaskId 父任务ID * @return 子任务列表 */ - List getChildrenTaskList(String parentId); + List getTaskListByParentTaskId(String parentTaskId); /** * 通过任务 ID,查询任务名 Map diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 199662519c..9587de8236 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -13,15 +13,12 @@ import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; -import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskAddSignTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; @@ -34,7 +31,6 @@ import org.flowable.engine.HistoryService; import org.flowable.engine.ManagementService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; -import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.DelegationState; import org.flowable.task.api.Task; @@ -50,10 +46,10 @@ import org.springframework.transaction.support.TransactionSynchronizationManager import org.springframework.util.Assert; import java.util.*; -import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** @@ -82,49 +78,31 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Resource private AdminUserApi adminUserApi; - @Resource - private DeptApi deptApi; - - @Resource - private BpmTaskExtMapper taskExtMapper; @Resource private ManagementService managementService; @Override - public PageResult getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) { - // 查询待办任务 + public PageResult getTodoTaskPage(Long userId, BpmTaskPageReqVO pageVO) { TaskQuery taskQuery = taskService.createTaskQuery().taskAssignee(String.valueOf(userId)) // 分配给自己 .orderByTaskCreateTime().desc(); // 创建时间倒序 if (StrUtil.isNotBlank(pageVO.getName())) { taskQuery.taskNameLike("%" + pageVO.getName() + "%"); } - if (ArrayUtil.get(pageVO.getCreateTime(), 0) != null) { + if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); + taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1])); } - if (ArrayUtil.get(pageVO.getCreateTime(), 1) != null) { - taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); + long count = taskQuery.count(); + if (count == 0) { + return PageResult.empty(); } - // 执行查询 List tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); - if (CollUtil.isEmpty(tasks)) { - return PageResult.empty(taskQuery.count()); - } - - // 获得 ProcessInstance Map - Map processInstanceMap = processInstanceService.getProcessInstanceMap( - convertSet(tasks, Task::getProcessInstanceId)); - // 获得 User Map - Map userMap = adminUserApi.getUserMap( - convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); - // 拼接结果 - return new PageResult<>(BpmTaskConvert.INSTANCE.convertList1(tasks, processInstanceMap, userMap), - taskQuery.count()); + return new PageResult<>(tasks, count); } @Override - public PageResult getDoneTaskPage(Long userId, BpmTaskDonePageReqVO pageVO) { - // 查询已办任务 + public PageResult getDoneTaskPage(Long userId, BpmTaskPageReqVO pageVO) { HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery().finished() // 已完成 .includeTaskLocalVariables() .taskAssignee(String.valueOf(userId)) // 分配给自己 @@ -132,29 +110,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { if (StrUtil.isNotBlank(pageVO.getName())) { taskQuery.taskNameLike("%" + pageVO.getName() + "%"); } - // TODO @芋艿:传参风格,统一 - if (pageVO.getBeginCreateTime() != null) { - taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getBeginCreateTime())); - } - if (pageVO.getEndCreateTime() != null) { - taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getEndCreateTime())); + if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { + taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); + taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1])); } // 执行查询 - List tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); - if (CollUtil.isEmpty(tasks)) { - return PageResult.empty(taskQuery.count()); + long count = taskQuery.count(); + if (count == 0) { + return PageResult.empty(); } - - // 获得 ProcessInstance Map - Map historicProcessInstanceMap = processInstanceService.getHistoricProcessInstanceMap( - convertSet(tasks, HistoricTaskInstance::getProcessInstanceId)); - // 获得 User Map - Map userMap = adminUserApi.getUserMap( - convertSet(historicProcessInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); - // 拼接结果 - return new PageResult<>( - BpmTaskConvert.INSTANCE.convertList2(tasks, historicProcessInstanceMap, userMap), - taskQuery.count()); + List tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); + return new PageResult<>(tasks, count); } @Override @@ -166,8 +132,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } @Override - public List getTaskListByProcessInstanceId(String processInstanceId) { - // 获得任务列表 + public List getTaskListByProcessInstanceId(String processInstanceId) { List tasks = historyService.createHistoricTaskInstanceQuery() .includeTaskLocalVariables() .processInstanceId(processInstanceId) @@ -176,19 +141,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { if (CollUtil.isEmpty(tasks)) { return Collections.emptyList(); } - - // 获得 ProcessInstance Map - HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId); - // 获得 User Map - Set userIds = convertSet(tasks, task -> NumberUtils.parseLong(task.getAssignee())); - userIds.add(NumberUtils.parseLong(processInstance.getStartUserId())); - Map userMap = adminUserApi.getUserMap(userIds); - // 获得 Dept Map - Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); - - // 拼接数据 - List result = BpmTaskConvert.INSTANCE.convertList3(tasks, processInstance, userMap, deptMap); - return BpmTaskConvert.INSTANCE.convertChildrenList(result); + return tasks; } @Override @@ -531,10 +484,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { } @Override - public List getReturnTaskList(String taskId) { - // 1. 校验当前任务 task 存在 - Task task = validateTaskExist(taskId); - // 根据流程定义获取流程模型信息 + public List getUserTaskListByReturn(String id) { + // 1.1 校验当前任务 task 存在 + Task task = validateTaskExist(id); + // 1.2 根据流程定义获取流程模型信息 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(task.getProcessDefinitionId()); FlowElement source = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey()); if (source == null) { @@ -548,7 +501,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 2.2 过滤:只有串行可到达的节点,才可以回退。类似非串行、子流程无法退回 previousUserList.removeIf(userTask -> !BpmnModelUtils.isSequentialReachable(source, userTask, null)); - return BpmTaskConvert.INSTANCE.convertList(previousUserList); + return previousUserList; } @Override @@ -560,7 +513,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { throw exception(TASK_IS_PENDING); } // 1.2 校验源头和目标节点的关系,并返回目标元素 - FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), reqVO.getTargetDefinitionKey(), task.getProcessDefinitionId()); + FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), reqVO.getTargetTaskDefinitionKey(), task.getProcessDefinitionId()); // 3. 更新任务扩展表 TODO 芋艿:需要提前搞 updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); @@ -635,7 +588,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { runtimeService.createChangeActivityStateBuilder() .processInstanceId(currentTask.getProcessInstanceId()) .moveActivityIdsToSingleActivityId(returnTaskKeyList, // 当前要跳转的节点列表( 1 或多) - reqVO.getTargetDefinitionKey()) // targetKey 跳转到的节点(1) + reqVO.getTargetTaskDefinitionKey()) // targetKey 跳转到的节点(1) .changeState(); } @@ -877,6 +830,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { return StrUtil.equalsAny(scopeType,BpmTaskAddSignTypeEnum.BEFORE.getType(),scopeType, BpmTaskAddSignTypeEnum.AFTER.getType()); } +// TODO @海:BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST) 应该作为条件,mapper 不要有业务 /** * 获取所有要被取消的删除的任务 ID 集合 * @@ -918,42 +872,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { * @return 所有子任务的 ID 集合 */ private List getChildrenTaskIdList(String parentTaskId) { - return convertList(getChildrenTaskList0(parentTaskId), Task::getId); + return convertList(getTaskListByParentTaskId(parentTaskId), Task::getId); } - /** - * 获取指定父级任务的所有子任务 ID 集合 - * - * @param parentTaskId 父任务 ID - * @return 所有子任务的 ID 集合 - */ - private List getChildrenTaskList0(String parentTaskId) { + @Override + public List getTaskListByParentTaskId(String parentTaskId) { String tableName = managementService.getTableName(TaskEntity.class); // taskService.createTaskQuery() 没有 parentId 参数,所以写 sql 查询 String sql = "select ID_,OWNER_,ASSIGNEE_ from " + tableName + " where PARENT_TASK_ID_=#{parentTaskId}"; return taskService.createNativeTaskQuery().sql(sql).parameter("parentTaskId", parentTaskId).list(); } - - @Override - public List getChildrenTaskList(String parentId) { - // 1. 只查询进行中的任务 后加签的任务,可能不存在 assignee,所以还需要查询 owner - List taskList = getChildrenTaskList0(parentId); - if (CollUtil.isEmpty(taskList)) { - return Collections.emptyList(); - } - - // 2.1 将 owner 和 assignee 统一到一个集合中 - List userIds = convertListByFlatMap(taskList, control -> - Stream.of(NumberUtils.parseLong(control.getAssignee()), NumberUtils.parseLong(control.getOwner())) - .filter(Objects::nonNull)); // TODO 芋艿:这里可能可以优化下 - // 2.2 组装数据 - Map userMap = adminUserApi.getUserMap(userIds); -// List taskExtList = taskExtMapper.selectProcessListByTaskIds(childrenTaskIdList); -// Map idTaskMap = convertMap(taskList, TaskInfo::getId); - return BpmTaskConvert.INSTANCE.convertList(taskList, userMap); - } - @Override public Map getTaskNameByTaskIds(Collection taskIds) { if (CollUtil.isEmpty(taskIds)) { -- Gitee From ba502fc5282b7f00a731abd7f352561f7409dfcd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Mar 2024 22:14:36 +0800 Subject: [PATCH 0073/1557] =?UTF-8?q?BPM=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=8A=84=E9=80=81=E9=80=BB=E8=BE=91=E7=9A=84=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E6=88=90=E5=AE=A1=E6=89=B9=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E3=80=81=E4=B8=8D=E9=80=9A=E8=BF=87=E6=97=B6=EF=BC=8C=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=8A=84=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/task/BpmCommentTypeEnum.java | 22 +- .../BpmProcessInstanceCopyController.java | 52 ++- .../admin/task/BpmTaskController.java | 53 +-- .../BpmProcessInstanceCopyRespVO.java} | 27 +- .../BpmProcessInstanceCopyCreateReqVO.java | 20 - ...a => BpmProcessInstanceCopyPageReqVO.java} | 5 +- .../task/vo/task/BpmTaskApproveReqVO.java | 6 +- .../cc/BpmProcessInstanceCopyConvert.java | 40 -- .../bpm/convert/task/BpmTaskConvert.java | 80 ++++ .../cc/BpmProcessInstanceCopyDO.java | 23 +- .../cc/BpmProcessInstanceCopyMapper.java | 6 +- .../BpmProcessInstanceCopyService.java | 21 +- .../BpmProcessInstanceCopyServiceImpl.java | 54 ++- .../bpm/service/task/BpmTaskServiceImpl.java | 71 +-- .../task/cc/dto/BpmDelegateExecutionDTO.java | 439 ------------------ 15 files changed, 236 insertions(+), 683 deletions(-) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/{instance/BpmProcessInstanceCopyPageItemRespVO.java => cc/BpmProcessInstanceCopyRespVO.java} (48%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyCreateReqVO.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/{BpmProcessInstanceCopyMyPageReqVO.java => BpmProcessInstanceCopyPageReqVO.java} (83%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/cc/BpmProcessInstanceCopyConvert.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/{cc => }/BpmProcessInstanceCopyService.java (51%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/{cc => }/BpmProcessInstanceCopyServiceImpl.java (44%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/dto/BpmDelegateExecutionDTO.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java index 89d56b3c08..06269a31e8 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java @@ -4,25 +4,29 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 流程任务 -- comment类型枚举 + * 流程任务的 Comment 评论类型枚举 + * + * @author kehaiyou */ @Getter @AllArgsConstructor public enum BpmCommentTypeEnum { - APPROVE(1, "通过", ""), - REJECT(2, "不通过", ""), - CANCEL(3, "已取消", ""), - BACK(4, "退回", ""), - DELEGATE(5, "委派", ""), - ADD_SIGN(6, "加签", "[{}]{}给了[{}],理由为:{}"), - SUB_SIGN(7, "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), + APPROVE("1", "审批通过", ""), // 理由:直接使用用户的评论 + REJECT("2", "不通过", ""), + CANCEL("3", "已取消", ""), + BACK("4", "退回", ""), + DELEGATE("5", "委派", ""), + ADD_SIGN("6", "加签", "[{}]{}给了[{}],理由为:{}"), + SUB_SIGN("7", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), ; /** * 操作类型 + * + * 由于 BPM Comment 类型为 String,所以这里就不使用 Integer */ - private final Integer type; + private final String type; /** * 操作名字 */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java index e1ad107ab0..e86f013151 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java @@ -3,23 +3,27 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageItemRespVO; -import cn.iocoder.yudao.module.bpm.convert.cc.BpmProcessInstanceCopyConvert; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.date.DateUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.cc.BpmProcessInstanceCopyRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceCopyService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; -import cn.iocoder.yudao.module.bpm.service.task.cc.BpmProcessInstanceCopyService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; +import org.flowable.engine.history.HistoricProcessInstance; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.Map; import java.util.stream.Stream; @@ -31,35 +35,27 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti @Tag(name = "管理后台 - 流程实例抄送") @RestController -@RequestMapping("/bpm/process-instance/cc") +@RequestMapping("/bpm/process-instance/copy") @Validated public class BpmProcessInstanceCopyController { @Resource private BpmProcessInstanceCopyService processInstanceCopyService; @Resource - private BpmProcessInstanceService bpmProcessInstanceService; - - @Resource - private AdminUserApi adminUserApi; - + private BpmProcessInstanceService processInstanceService; @Resource private BpmTaskService bpmTaskService; - @PostMapping("/create") - @Operation(summary = "抄送流程") - @PreAuthorize("@ss.hasPermission('bpm:process-instance-cc:create')") - public CommonResult createProcessInstanceCopy(@Valid @RequestBody BpmProcessInstanceCopyCreateReqVO createReqVO) { - processInstanceCopyService.createProcessInstanceCopy(getLoginUserId(), createReqVO); - return success(true); - } + @Resource + private AdminUserApi adminUserApi; - @GetMapping("/my-page") + @GetMapping("/page") @Operation(summary = "获得抄送流程分页列表") @PreAuthorize("@ss.hasPermission('bpm:process-instance-cc:query')") - public CommonResult> getProcessInstanceCopyPage( - @Valid BpmProcessInstanceCopyMyPageReqVO pageReqVO) { - PageResult pageResult = processInstanceCopyService.getMyProcessInstanceCopyPage(getLoginUserId(), pageReqVO); + public CommonResult> getProcessInstanceCopyPage( + @Valid BpmProcessInstanceCopyPageReqVO pageReqVO) { + PageResult pageResult = processInstanceCopyService.getProcessInstanceCopyPage( + getLoginUserId(), pageReqVO); if (CollUtil.isEmpty(pageResult.getList())) { return success(new PageResult<>(pageResult.getTotal())); } @@ -67,11 +63,17 @@ public class BpmProcessInstanceCopyController { // 拼接返回 Map taskNameMap = bpmTaskService.getTaskNameByTaskIds( convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getTaskId)); - Map processNameMap = bpmProcessInstanceService.getProcessInstanceNameMap( + Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId)); Map userMap = adminUserApi.getUserMap(convertListByFlatMap(pageResult.getList(), copy -> Stream.of(copy.getStartUserId(), Long.parseLong(copy.getCreator())))); - return success(BpmProcessInstanceCopyConvert.INSTANCE.convertPage(pageResult, taskNameMap, processNameMap, userMap)); + return success(BeanUtils.toBean(pageResult, BpmProcessInstanceCopyRespVO.class, copyVO -> { + MapUtils.findAndThen(userMap, Long.valueOf(copyVO.getCreator()), user -> copyVO.setCreatorName(user.getNickname())); + MapUtils.findAndThen(userMap, copyVO.getStartUserId(), user -> copyVO.setStartUserName(user.getNickname())); + MapUtils.findAndThen(taskNameMap, copyVO.getTaskId(), copyVO::setTaskName); + MapUtils.findAndThen(processInstanceMap, copyVO.getProcessInstanceId(), + processInstance -> copyVO.setProcessInstanceStartTime(DateUtils.of(processInstance.getStartTime()))); + })); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 78429ea210..f18926582f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -1,15 +1,13 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; +import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -66,15 +64,7 @@ public class BpmTaskController { convertSet(pageResult.getList(), Task::getProcessInstanceId)); Map userMap = adminUserApi.getUserMap( convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); - return success(BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> { - ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); - if (processInstance == null) { - return; - } - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); - })); + return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap)); } @GetMapping("done-page") @@ -87,18 +77,9 @@ public class BpmTaskController { convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId)); Map userMap = adminUserApi.getUserMap( convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); - return success(BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> { - HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); - if (processInstance == null) { - return; - } - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); - })); + return success(BpmTaskConvert.INSTANCE.buildDoneTaskPage(pageResult, processInstanceMap, userMap)); } - // TODO @芋艿:怎么优化下 @GetMapping("/list-by-process-instance-id") @Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的") @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @@ -118,33 +99,7 @@ public class BpmTaskController { Map userMap = adminUserApi.getUserMap(userIds); Map deptMap = deptApi.getDeptMap( convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); - List taskVOList = CollectionUtils.convertList(taskList, task -> { - BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); - taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); - // 流程实例 - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); - // 用户信息 - AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); - if (assignUser != null) { - taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); - DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); - if (dept != null) { - taskVO.getAssigneeUser().setDeptName(dept.getName()); - } - } - return taskVO; - }); - - // 拼接父子关系 - Map> childrenTaskMap = convertMultiMap( - filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())), - BpmTaskRespVO::getParentTaskId); - for (BpmTaskRespVO taskVO : taskVOList) { - taskVO.setChildren(childrenTaskMap.get(taskVO.getId())); - } - return success(filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId()))); + return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, userMap, deptMap)); } @PutMapping("/approve") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java similarity index 48% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageItemRespVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java index 4b149a65e4..4b397fc1c7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; +package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.cc; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -7,37 +7,32 @@ import java.time.LocalDateTime; @Schema(description = "管理后台 - 流程实例抄送的分页 Item Response VO") @Data -public class BpmProcessInstanceCopyPageItemRespVO { +public class BpmProcessInstanceCopyRespVO { - @Schema(description = "抄送主键") + @Schema(description = "抄送主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "发起人 ID") + @Schema(description = "发起人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") private Long startUserId; + @Schema(description = "发起人昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String startUserName; - @Schema(description = "发起人别名") - private String startUserNickname; - - @Schema(description = "流程实例的主键") + @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "A233") private String processInstanceId; - @Schema(description = "流程实例的名称") private String processInstanceName; + @Schema(description = "流程实例的发起时间") + private LocalDateTime processInstanceStartTime; @Schema(description = "发起抄送的任务编号") private String taskId; - @Schema(description = "发起抄送的任务名称") private String taskName; - @Schema(description = "抄送原因") - private String reason; - @Schema(description = "抄送人") private String creator; - - @Schema(description = "抄送人别名") - private String creatorNickname; + @Schema(description = "抄送人昵称") + private String creatorName; @Schema(description = "抄送时间") private LocalDateTime createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyCreateReqVO.java deleted file mode 100644 index 3a1b1d45c2..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyCreateReqVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotEmpty; -import lombok.Data; - -@Schema(description = "管理后台 - 流程实例抄送的创建 Request VO") -@Data -public class BpmProcessInstanceCopyCreateReqVO { - - @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotEmpty(message = "任务编号不能为空") - private String taskId; - - @Schema(description = "抄送原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "请帮忙审查下!") - @NotBlank(message = "抄送原因不能为空") - private String reason; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyMyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java similarity index 83% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyMyPageReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java index 7b4effaddf..a0c431814b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyMyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java @@ -15,14 +15,11 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class BpmProcessInstanceCopyMyPageReqVO extends PageParam { +public class BpmProcessInstanceCopyPageReqVO extends PageParam { @Schema(description = "流程名称", example = "芋道") private String processInstanceName; - @Schema(description = "流程编号", example = "123456768") - private String processInstanceId; - @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java index 14dca13ea6..c5ca09b371 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java @@ -1,9 +1,10 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; import lombok.Data; -import jakarta.validation.constraints.NotEmpty; +import java.util.Collection; @Schema(description = "管理后台 - 通过流程任务的 Request VO") @Data @@ -17,4 +18,7 @@ public class BpmTaskApproveReqVO { @NotEmpty(message = "审批意见不能为空") private String reason; + @Schema(description = "抄送的用户编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2") + private Collection copyUserIds; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/cc/BpmProcessInstanceCopyConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/cc/BpmProcessInstanceCopyConvert.java deleted file mode 100644 index f482c71e6f..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/cc/BpmProcessInstanceCopyConvert.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.cc; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageItemRespVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; -import java.util.Map; - -/** - * 流程抄送 Convert - * - * @author 芋艿 - */ -@Mapper -public interface BpmProcessInstanceCopyConvert { - - BpmProcessInstanceCopyConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceCopyConvert.class); - - default PageResult convertPage(PageResult page, - Map taskNameMap, - Map processInstaneNameMap, - Map userMap) { - List list = BeanUtils.toBean(page.getList(), - BpmProcessInstanceCopyPageItemRespVO.class, - copy -> { - MapUtils.findAndThen(userMap, Long.valueOf(copy.getCreator()), user -> user.setNickname(user.getNickname())); - MapUtils.findAndThen(userMap, copy.getStartUserId(), user -> copy.setStartUserNickname(user.getNickname())); - MapUtils.findAndThen(taskNameMap, copy.getTaskId(), copy::setTaskName); - MapUtils.findAndThen(processInstaneNameMap, copy.getProcessInstanceId(), copy::setProcessInstanceName); - }); - return new PageResult<>(list, page.getTotal()); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index dcc34f0de8..8bbe10f8bd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -1,16 +1,31 @@ package cn.iocoder.yudao.module.bpm.convert.task; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; +import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import java.util.Date; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; /** * Bpm 任务 Convert @@ -22,6 +37,71 @@ public interface BpmTaskConvert { BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class); + default PageResult buildTodoTaskPage(PageResult pageResult, + Map processInstanceMap, + Map userMap) { + return BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> { + ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); + if (processInstance == null) { + return; + } + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + }); + } + + default PageResult buildDoneTaskPage(PageResult pageResult, + Map processInstanceMap, + Map userMap) { + List taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> { + BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); + taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + // 流程实例 + HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); + if (processInstance != null) { + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + } + return taskVO; + }); + return new PageResult<>(taskVOList, pageResult.getTotal()); + } + + default List buildTaskListByProcessInstanceId(List taskList, + HistoricProcessInstance processInstance, + Map userMap, + Map deptMap) { + List taskVOList = CollectionUtils.convertList(taskList, task -> { + BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); + taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + // 流程实例 + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, + processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + // 用户信息 + AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); + if (assignUser != null) { + taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); + DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); + if (dept != null) { + taskVO.getAssigneeUser().setDeptName(dept.getName()); + } + } + return taskVO; + }); + + // 拼接父子关系 + Map> childrenTaskMap = convertMultiMap( + filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())), + BpmTaskRespVO::getParentTaskId); + for (BpmTaskRespVO taskVO : taskVOList) { + taskVO.setChildren(childrenTaskMap.get(taskVO.getId())); + } + return filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId())); + } + default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser, Task task) { BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO(); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java index 7ca65f3db2..99bca609d6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java @@ -29,7 +29,7 @@ public class BpmProcessInstanceCopyDO extends BaseDO { /** * 发起人 Id * - * 关联 system_users 的 id 属性 + * 冗余 ProcessInstance 的 startUserId 字段 */ private Long startUserId; /** @@ -44,6 +44,12 @@ public class BpmProcessInstanceCopyDO extends BaseDO { * 关联 ProcessInstance 的 id 属性 */ private String processInstanceId; + /** + * 流程分类 + * + * 冗余 ProcessInstance 的 category 字段 + */ + private String category; /** * 任务主键 @@ -51,7 +57,6 @@ public class BpmProcessInstanceCopyDO extends BaseDO { * 关联 Task 的 id 属性 */ private String taskId; - /** * 任务名称 * @@ -60,22 +65,10 @@ public class BpmProcessInstanceCopyDO extends BaseDO { private String taskName; /** - * 用户编号 + * 用户编号(被抄送的用户编号) * * 关联 system_users 的 id 属性 */ private Long userId; - /** - * 抄送原因 - */ - private String reason; - - /** - * 流程分类 - * - * 冗余 ProcessInstance 的 category 字段 - */ - private String category; - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java index de6fa14f53..2179525e00 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java @@ -3,19 +3,19 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.cc; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; import org.apache.ibatis.annotations.Mapper; @Mapper public interface BpmProcessInstanceCopyMapper extends BaseMapperX { - default PageResult selectPage(Long loginUserId, BpmProcessInstanceCopyMyPageReqVO reqVO) { + default PageResult selectPage(Long loginUserId, BpmProcessInstanceCopyPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(BpmProcessInstanceCopyDO::getUserId, loginUserId) - .eqIfPresent(BpmProcessInstanceCopyDO::getProcessInstanceId, reqVO.getProcessInstanceId()) .likeIfPresent(BpmProcessInstanceCopyDO::getProcessInstanceName, reqVO.getProcessInstanceName()) .betweenIfPresent(BpmProcessInstanceCopyDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(BpmProcessInstanceCopyDO::getId)); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java similarity index 51% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java index 4d1db29585..67135167af 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java @@ -1,10 +1,11 @@ -package cn.iocoder.yudao.module.bpm.service.task.cc; +package cn.iocoder.yudao.module.bpm.service.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; +import java.util.Collection; + /** * 流程抄送 Service 接口 * @@ -15,17 +16,19 @@ public interface BpmProcessInstanceCopyService { /** * 流程实例的抄送 * - * @param userId 当前登录用户 - * @param createReqVO 创建的抄送请求 + * @param userIds 抄送的用户编号 + * @param taskId 流程任务编号 */ - void createProcessInstanceCopy(Long userId, BpmProcessInstanceCopyCreateReqVO createReqVO); + void createProcessInstanceCopy(Collection userIds, String taskId); /** - * 抄送的流程的分页 + * 获得抄送的流程的分页 + * * @param userId 当前登录用户 * @param pageReqVO 分页请求 * @return 抄送的分页结果 */ - PageResult getMyProcessInstanceCopyPage(Long userId, - BpmProcessInstanceCopyMyPageReqVO pageReqVO); + PageResult getProcessInstanceCopyPage(Long userId, + BpmProcessInstanceCopyPageReqVO pageReqVO); + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java similarity index 44% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index d800d1932d..e45ce881cd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -1,23 +1,26 @@ -package cn.iocoder.yudao.module.bpm.service.task.cc; +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyMyPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; import cn.iocoder.yudao.module.bpm.dal.mysql.cc.BpmProcessInstanceCopyMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; -import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.Collection; +import java.util.List; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; /** * 流程抄送 Service 实现类 @@ -33,38 +36,47 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy private BpmProcessInstanceCopyMapper processInstanceCopyMapper; @Resource - @Lazy - private BpmTaskService bpmTaskService; + @Lazy // 延迟加载,避免循环依赖 + private BpmTaskService taskService; + + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmProcessInstanceService processInstanceService; @Resource - @Lazy - private BpmProcessInstanceService bpmProcessInstanceService; + @Lazy // 延迟加载,避免循环依赖 + private BpmProcessDefinitionService processDefinitionService; @Override - public void createProcessInstanceCopy(Long userId, BpmProcessInstanceCopyCreateReqVO reqVO) { + public void createProcessInstanceCopy(Collection userIds, String taskId) { // 1.1 校验任务存在 - Task task = bpmTaskService.getTask(reqVO.getTaskId()); + Task task = taskService.getTask(taskId); if (ObjectUtil.isNull(task)) { throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); } - // 1.2 校验流程存在 + // 1.2 校验流程实例存在 String processInstanceId = task.getProcessInstanceId(); - ProcessInstance processInstance = bpmProcessInstanceService.getProcessInstance(processInstanceId); + ProcessInstance processInstance = processInstanceService.getProcessInstance(processInstanceId); if (processInstance == null) { - log.warn("[createProcessInstanceCopy][任务({}) 对应的流程不存在]", reqVO.getTaskId()); throw exception(ErrorCodeConstants.PROCESS_INSTANCE_NOT_EXISTS); } + // 1.3 校验流程定义存在 + ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition( + processInstance.getProcessDefinitionId()); + if (processDefinition == null) { + throw exception(ErrorCodeConstants.PROCESS_DEFINITION_NOT_EXISTS); + } // 2. 创建抄送流程 - BpmProcessInstanceCopyDO copy = new BpmProcessInstanceCopyDO() - .setTaskId(reqVO.getTaskId()).setTaskName(task.getName()) - .setProcessInstanceId(processInstanceId).setStartUserId(Long.valueOf(processInstance.getStartUserId())) - .setProcessInstanceName(processInstance.getName()).setCategory(processInstance.getProcessDefinitionCategory()) - .setReason(reqVO.getReason()); - processInstanceCopyMapper.insert(copy); + List copyList = convertList(userIds, userId -> new BpmProcessInstanceCopyDO() + .setUserId(userId).setStartUserId(Long.valueOf(processInstance.getStartUserId())) + .setProcessInstanceId(processInstanceId).setProcessInstanceName(processInstance.getName()) + .setCategory(processDefinition.getCategory()).setTaskId(taskId).setTaskName(task.getName())); + processInstanceCopyMapper.insertBatch(copyList); } @Override - public PageResult getMyProcessInstanceCopyPage(Long userId, BpmProcessInstanceCopyMyPageReqVO pageReqVO) { + public PageResult getProcessInstanceCopyPage(Long userId, + BpmProcessInstanceCopyPageReqVO pageReqVO) { return processInstanceCopyMapper.selectPage(userId, pageReqVO); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 9587de8236..a2211e6402 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -68,10 +68,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { private HistoryService historyService; @Resource private RuntimeService runtimeService; + @Resource + private ManagementService managementService; @Resource private BpmProcessInstanceService processInstanceService; @Resource + private BpmProcessInstanceCopyService processInstanceCopyService; + @Resource private BpmModelService bpmModelService; @Resource private BpmMessageService messageService; @@ -79,12 +83,12 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Resource private AdminUserApi adminUserApi; - @Resource - private ManagementService managementService; - @Override public PageResult getTodoTaskPage(Long userId, BpmTaskPageReqVO pageVO) { - TaskQuery taskQuery = taskService.createTaskQuery().taskAssignee(String.valueOf(userId)) // 分配给自己 + TaskQuery taskQuery = taskService.createTaskQuery() + .taskAssignee(String.valueOf(userId)) // 分配给自己 + .active() + .includeProcessVariables() .orderByTaskCreateTime().desc(); // 创建时间倒序 if (StrUtil.isNotBlank(pageVO.getName())) { taskQuery.taskNameLike("%" + pageVO.getName() + "%"); @@ -103,9 +107,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override public PageResult getDoneTaskPage(Long userId, BpmTaskPageReqVO pageVO) { - HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery().finished() // 已完成 - .includeTaskLocalVariables() + HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery() + .finished() // 已完成 .taskAssignee(String.valueOf(userId)) // 分配给自己 + .includeTaskLocalVariables() .orderByHistoricTaskInstanceEndTime().desc(); // 审批时间倒序 if (StrUtil.isNotBlank(pageVO.getName())) { taskQuery.taskNameLike("%" + pageVO.getName() + "%"); @@ -155,30 +160,34 @@ public class BpmTaskServiceImpl implements BpmTaskService { throw exception(PROCESS_INSTANCE_NOT_EXISTS); } + // 2. 抄送用户 + if (CollUtil.isNotEmpty(reqVO.getCopyUserIds())) { + processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), reqVO.getId()); + } + // 情况一:被委派的任务,不调用 complete 去完成任务 if (DelegationState.PENDING.equals(task.getDelegationState())) { approveDelegateTask(reqVO, task); return; } - // 情况二:后加签的任务 + // 情况二:审批有【后】加签的任务 if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(task.getScopeType())) { - // 后加签处理 approveAfterSignTask(task, reqVO); return; } - // 情况三:自己审批的任务,调用 complete 去完成任务 - // 完成任务,审批通过 + // 情况三:审批普通的任务。大多数情况下,都是这样 + // 更新流程任务 status 为审批通过 updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVE.getResult()); + // 添加评论 + taskService.addComment(task.getId(), task.getProcessInstanceId(), + BpmCommentTypeEnum.APPROVE.getType(), reqVO.getReason()); + // 调用 BPM complete 去完成任务 taskService.complete(task.getId(), instance.getProcessVariables()); -// // 更新任务拓展表为通过 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) -// .setReason(reqVO.getReason())); + // 处理加签任务 -// handleParentTask(task); - handleParentTaskNew(task.getParentTaskId()); + handleParentTaskIfSign(task.getParentTaskId()); } /** @@ -209,8 +218,15 @@ public class BpmTaskServiceImpl implements BpmTaskService { // new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.PROCESS.getResult())); } - // TODO 芋艿:名字 - private void handleParentTaskNew(String parentTaskId) { + /** + * 如果父任务是有前后【加签】的任务,如果它【加签】出来的子任务都被处理,需要处理父任务: + * + * 1. 如果是【向前】加签,则需要重新激活父任务,让它可以被审批 + * 2. 如果是【向后】加签,则需要完成父任务,让它完成审批 + * + * @param parentTaskId 父任务编号 + */ + private void handleParentTaskIfSign(String parentTaskId) { if (StrUtil.isBlank(parentTaskId)) { return; } @@ -227,7 +243,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 2. 子任务已处理完成,清空 scopeType 字段,修改 parentTask 信息,方便后续可以继续向前后向后加签 - clearTaskScopeTypeAndSave(parentTask); + TaskEntityImpl parentTaskImpl = (TaskEntityImpl) parentTask; + parentTaskImpl.setScopeType(null); + taskService.saveTask(parentTaskImpl); // 3.1 情况一:处理向【向前】加签 if (BpmTaskAddSignTypeEnum.BEFORE.getType().equals(scopeType)) { @@ -243,18 +261,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 4. 递归处理父任务 - handleParentTaskNew(parentTask.getParentTaskId()); - } - - /** - * 清空 scopeType 字段,用于任务没有子任务时使用该方法,方便任务可以再次被不同的方式加签 - * - * @param task 需要被清空的任务 - */ - private void clearTaskScopeTypeAndSave(Task task) { - TaskEntityImpl taskImpl = (TaskEntityImpl) task; - taskImpl.setScopeType(null); - taskService.saveTask(task); + handleParentTaskIfSign(parentTask.getParentTaskId()); } /** @@ -797,7 +804,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { BpmCommentTypeEnum.SUB_SIGN.getType().toString(), comment); // 4. 处理当前任务的父任务 - handleParentTaskNew(task.getParentTaskId()); + handleParentTaskIfSign(task.getParentTaskId()); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/dto/BpmDelegateExecutionDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/dto/BpmDelegateExecutionDTO.java deleted file mode 100644 index d010d89691..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/cc/dto/BpmDelegateExecutionDTO.java +++ /dev/null @@ -1,439 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.task.cc.dto; - -import org.flowable.bpmn.model.FlowElement; -import org.flowable.bpmn.model.FlowableListener; -import org.flowable.engine.delegate.DelegateExecution; -import org.flowable.engine.delegate.ReadOnlyDelegateExecution; -import org.flowable.variable.api.persistence.entity.VariableInstance; - -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * 仅为了传输processInstanceId - */ -public class BpmDelegateExecutionDTO implements DelegateExecution { - - public BpmDelegateExecutionDTO(String getProcessInstanceId) { - this.getProcessInstanceId = getProcessInstanceId; - } - - private final String getProcessInstanceId; - - @Override - public String getId() { - return null; - } - - @Override - public String getProcessInstanceId() { - return null; - } - - @Override - public String getRootProcessInstanceId() { - return null; - } - - @Override - public String getEventName() { - return null; - } - - @Override - public void setEventName(String eventName) { - - } - - @Override - public String getProcessInstanceBusinessKey() { - return null; - } - - @Override - public String getProcessInstanceBusinessStatus() { - return null; - } - - @Override - public String getProcessDefinitionId() { - return null; - } - - @Override - public String getPropagatedStageInstanceId() { - return null; - } - - @Override - public String getParentId() { - return null; - } - - @Override - public String getSuperExecutionId() { - return null; - } - - @Override - public String getCurrentActivityId() { - return null; - } - - @Override - public String getTenantId() { - return null; - } - - @Override - public FlowElement getCurrentFlowElement() { - return null; - } - - @Override - public void setCurrentFlowElement(FlowElement flowElement) { - - } - - @Override - public FlowableListener getCurrentFlowableListener() { - return null; - } - - @Override - public void setCurrentFlowableListener(FlowableListener currentListener) { - - } - - @Override - public ReadOnlyDelegateExecution snapshotReadOnly() { - return null; - } - - @Override - public DelegateExecution getParent() { - return null; - } - - @Override - public List getExecutions() { - return null; - } - - @Override - public void setActive(boolean isActive) { - - } - - @Override - public boolean isActive() { - return false; - } - - @Override - public boolean isEnded() { - return false; - } - - @Override - public void setConcurrent(boolean isConcurrent) { - - } - - @Override - public boolean isConcurrent() { - return false; - } - - @Override - public boolean isProcessInstanceType() { - return false; - } - - @Override - public void inactivate() { - - } - - @Override - public boolean isScope() { - return false; - } - - @Override - public void setScope(boolean isScope) { - - } - - @Override - public boolean isMultiInstanceRoot() { - return false; - } - - @Override - public void setMultiInstanceRoot(boolean isMultiInstanceRoot) { - - } - - @Override - public Map getVariables() { - return null; - } - - @Override - public Map getVariableInstances() { - return null; - } - - @Override - public Map getVariables(Collection collection) { - return null; - } - - @Override - public Map getVariableInstances(Collection collection) { - return null; - } - - @Override - public Map getVariables(Collection collection, boolean b) { - return null; - } - - @Override - public Map getVariableInstances(Collection collection, boolean b) { - return null; - } - - @Override - public Map getVariablesLocal() { - return null; - } - - @Override - public Map getVariableInstancesLocal() { - return null; - } - - @Override - public Map getVariablesLocal(Collection collection) { - return null; - } - - @Override - public Map getVariableInstancesLocal(Collection collection) { - return null; - } - - @Override - public Map getVariablesLocal(Collection collection, boolean b) { - return null; - } - - @Override - public Map getVariableInstancesLocal(Collection collection, boolean b) { - return null; - } - - @Override - public Object getVariable(String s) { - return null; - } - - @Override - public VariableInstance getVariableInstance(String s) { - return null; - } - - @Override - public Object getVariable(String s, boolean b) { - return null; - } - - @Override - public VariableInstance getVariableInstance(String s, boolean b) { - return null; - } - - @Override - public Object getVariableLocal(String s) { - return null; - } - - @Override - public VariableInstance getVariableInstanceLocal(String s) { - return null; - } - - @Override - public Object getVariableLocal(String s, boolean b) { - return null; - } - - @Override - public VariableInstance getVariableInstanceLocal(String s, boolean b) { - return null; - } - - @Override - public T getVariable(String s, Class aClass) { - return null; - } - - @Override - public T getVariableLocal(String s, Class aClass) { - return null; - } - - @Override - public Set getVariableNames() { - return null; - } - - @Override - public Set getVariableNamesLocal() { - return null; - } - - @Override - public void setVariable(String s, Object o) { - - } - - @Override - public void setVariable(String s, Object o, boolean b) { - - } - - @Override - public Object setVariableLocal(String s, Object o) { - return null; - } - - @Override - public Object setVariableLocal(String s, Object o, boolean b) { - return null; - } - - @Override - public void setVariables(Map map) { - - } - - @Override - public void setVariablesLocal(Map map) { - - } - - @Override - public boolean hasVariables() { - return false; - } - - @Override - public boolean hasVariablesLocal() { - return false; - } - - @Override - public boolean hasVariable(String s) { - return false; - } - - @Override - public boolean hasVariableLocal(String s) { - return false; - } - - @Override - public void removeVariable(String s) { - - } - - @Override - public void removeVariableLocal(String s) { - - } - - @Override - public void removeVariables(Collection collection) { - - } - - @Override - public void removeVariablesLocal(Collection collection) { - - } - - @Override - public void removeVariables() { - - } - - @Override - public void removeVariablesLocal() { - - } - - @Override - public void setTransientVariable(String s, Object o) { - - } - - @Override - public void setTransientVariableLocal(String s, Object o) { - - } - - @Override - public void setTransientVariables(Map map) { - - } - - @Override - public Object getTransientVariable(String s) { - return null; - } - - @Override - public Map getTransientVariables() { - return null; - } - - @Override - public void setTransientVariablesLocal(Map map) { - - } - - @Override - public Object getTransientVariableLocal(String s) { - return null; - } - - @Override - public Map getTransientVariablesLocal() { - return null; - } - - @Override - public void removeTransientVariableLocal(String s) { - - } - - @Override - public void removeTransientVariable(String s) { - - } - - @Override - public void removeTransientVariables() { - - } - - @Override - public void removeTransientVariablesLocal() { - - } -} -- Gitee From c4688d887ca4c10a8a2fbb6b5c4acde59b026c32 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 Mar 2024 18:41:04 +0800 Subject: [PATCH 0074/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0=20task?= =?UTF-8?q?=20=E7=9A=84=E5=AE=A1=E6=89=B9=E5=BB=BA=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/task/BpmCommentTypeEnum.java | 2 +- ...esultEnum.java => BpmTaskStatustEnum.java} | 28 +++---- .../admin/task/vo/task/BpmTaskRespVO.java | 5 +- .../bpm/convert/task/BpmTaskConvert.java | 2 + .../module/bpm/convert/task/package-info.java | 1 - .../bpm/dal/dataobject/oa/BpmOALeaveDO.java | 4 +- .../flowable/core/enums/BpmConstants.java | 8 ++ .../bpm/service/oa/BpmOALeaveServiceImpl.java | 4 +- .../bpm/service/task/BpmTaskServiceImpl.java | 84 +++++++++---------- .../flowable/core/util/BpmnModelUtils.java | 2 +- .../module/crm/util/CrmAuditStatusUtils.java | 8 +- 11 files changed, 80 insertions(+), 68 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/{BpmProcessInstanceResultEnum.java => BpmTaskStatustEnum.java} (71%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/package-info.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java index 06269a31e8..f2c2ded53a 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java @@ -15,7 +15,7 @@ public enum BpmCommentTypeEnum { APPROVE("1", "审批通过", ""), // 理由:直接使用用户的评论 REJECT("2", "不通过", ""), CANCEL("3", "已取消", ""), - BACK("4", "退回", ""), + BACK("4", "退回", ""), // 理由:直接使用用户的评论 DELEGATE("5", "委派", ""), ADD_SIGN("6", "加签", "[{}]{}给了[{}],理由为:{}"), SUB_SIGN("7", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java similarity index 71% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java index bd4f361d5c..ee06b08476 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceResultEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java @@ -5,13 +5,13 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 流程实例的结果 + * 流程任务 Task 的状态枚举 * * @author jason */ @Getter @AllArgsConstructor -public enum BpmProcessInstanceResultEnum { +public enum BpmTaskStatustEnum { RUNNING(1, "审批中"), APPROVE(2, "审批通过"), @@ -43,28 +43,28 @@ public enum BpmProcessInstanceResultEnum { // WAIT_BEFORE_TASK(9, "处理中【待前置任务完成】"); /** - * 结果 + * 状态 *

- * 如果新增时,注意 {@link #isEndResult(Integer)} 是否需要变更 + * 如果新增时,注意 {@link #isEndStatus(Integer)} 是否需要变更 */ - private final Integer result; + private final Integer status; /** - * 描述 + * 名字 */ - private final String desc; + private final String name; /** - * 判断该结果是否已经处于 End 最终结果 + * 判断该状态是否已经处于 End 最终状态 *

- * 主要用于一些结果更新的逻辑,如果已经是最终结果,就不再进行更新 + * 主要用于一些状态更新的逻辑,如果已经是最终状态,就不再进行更新 * - * @param result 结果 + * @param status 状态 * @return 是否 */ - public static boolean isEndResult(Integer result) { - return ObjectUtils.equalsAny(result, - APPROVE.getResult(), REJECT.getResult(), CANCEL.getResult(), - BACK.getResult(), APPROVING.getResult()); + public static boolean isEndStatus(Integer status) { + return ObjectUtils.equalsAny(status, + APPROVE.getStatus(), REJECT.getStatus(), CANCEL.getStatus(), + BACK.getStatus(), APPROVING.getStatus()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 1e1bebf043..46ac3f36d4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -27,7 +27,10 @@ public class BpmTaskRespVO { private Long durationInMillis; @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举 + private Integer status; // 参见 BpmTaskStatusEnum 枚举 + + @Schema(description = "审批理由", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String reason; /** * 负责人的用户信息 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 8bbe10f8bd..ee7b5245ce 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -57,6 +57,7 @@ public interface BpmTaskConvert { List taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + taskVO.setReason((String) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_REASON)); // 流程实例 HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); if (processInstance != null) { @@ -76,6 +77,7 @@ public interface BpmTaskConvert { List taskVOList = CollectionUtils.convertList(taskList, task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); + taskVO.setReason((String) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_REASON)); // 流程实例 AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/package-info.java deleted file mode 100644 index 6a53114a8c..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.task; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java index 4e4e68d6f7..e24ce02adf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.dal.dataobject.oa; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -59,7 +59,7 @@ public class BpmOALeaveDO extends BaseDO { /** * 请假的结果 * - * 枚举 {@link BpmProcessInstanceResultEnum} + * 枚举 {@link BpmTaskStatustEnum} * 考虑到简单,所以直接复用了 BpmProcessInstanceResultEnum 枚举,也可以自己定义一个枚举哈 */ private Integer result; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java index 7649b0fbcb..6dd5e79c7b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java @@ -22,5 +22,13 @@ public class BpmConstants { * @see org.flowable.task.api.Task#getTaskLocalVariables() */ public static final String TASK_VARIABLE_STATUS = "TASK_STATUS"; + /** + * 任务的变量 - 理由 + * + * 例如说:审批通过、不通过的理由 + * + * @see org.flowable.task.api.Task#getTaskLocalVariables() + */ + public static final String TASK_VARIABLE_REASON = "TASK_REASON"; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 3c786d805d..9477e667dd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -9,7 +9,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOALeaveConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -48,7 +48,7 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { // 插入 OA 请假单 long day = LocalDateTimeUtil.between(createReqVO.getStartTime(), createReqVO.getEndTime()).toDays(); BpmOALeaveDO leave = BpmOALeaveConvert.INSTANCE.convert(createReqVO).setUserId(userId).setDay(day) - .setResult(BpmProcessInstanceResultEnum.RUNNING.getResult()); + .setResult(BpmTaskStatustEnum.RUNNING.getStatus()); leaveMapper.insert(leave); // 发起 BPM 流程 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index a2211e6402..b0bc45e3f0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -14,7 +14,7 @@ import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskAddSignTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; @@ -178,15 +178,15 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 情况三:审批普通的任务。大多数情况下,都是这样 - // 更新流程任务 status 为审批通过 - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVE.getResult()); - // 添加评论 + // 3.1 更新 task 状态、原因 + updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus()); + // 3.2 添加评论 taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), reqVO.getReason()); - // 调用 BPM complete 去完成任务 + // 3.3 调用 BPM complete 去完成任务 taskService.complete(task.getId(), instance.getProcessVariables()); - // 处理加签任务 + // 【加签专属】处理加签任务 handleParentTaskIfSign(task.getParentTaskId()); } @@ -204,14 +204,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { // new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.SIGN_AFTER.getResult()) // .setReason(reqVO.getReason()).setEndTime(LocalDateTime.now())); // TODO @芋艿:reqVO.reason??? - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVING.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVING.getStatus()); // 2. 激活子任务 List childrenTaskIdList = getChildrenTaskIdList(task.getId()); for (String childrenTaskId : childrenTaskIdList) { taskService.resolveTask(childrenTaskId); // 更新任务扩展表中子任务为进行中 - updateTaskStatus(childrenTaskId, BpmProcessInstanceResultEnum.RUNNING.getResult()); + updateTaskStatus(childrenTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); } // 2.1 更新任务扩展表中子任务为进行中 // taskExtMapper.updateBatchByTaskIdList(childrenTaskIdList, @@ -252,11 +252,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 3.1.1 owner 重新赋值给父任务的 assignee,这样它就可以被审批 taskService.resolveTask(parentTaskId); // 3.1.2 更新流程任务 status - updateTaskStatus(parentTaskId, BpmProcessInstanceResultEnum.RUNNING.getResult()); + updateTaskStatus(parentTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); // 3.2 情况二:处理向【向后】加签 } else if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(scopeType)) { // 3.2.1 完成自己(因为它已经没有子任务,所以也可以完成) - updateTaskStatus(parentTaskId, BpmProcessInstanceResultEnum.APPROVE.getResult()); + updateTaskStatus(parentTaskId, BpmTaskStatustEnum.APPROVE.getStatus()); taskService.complete(parentTaskId); } @@ -299,7 +299,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // taskExtMapper.updateByTaskId( // new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.RUNNING.getResult()) // .setReason(reqVO.getReason())); - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.RUNNING.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); } @Override @@ -313,7 +313,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 更新流程实例为不通过 - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.REJECT.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.REJECT.getStatus()); processInstanceService.updateProcessInstanceExtReject(instance.getProcessInstanceId(), reqVO.getReason()); // // 更新任务拓展表为不通过 @@ -342,13 +342,21 @@ public class BpmTaskServiceImpl implements BpmTaskService { * @param status 状态 */ private void updateTaskStatus(String id, Integer status) { -// try { -// } catch (FlowableObjectNotFoundException exception) { -// historyService. -// } taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_STATUS, status); } + /** + * 更新流程任务的 status 状态、reason 理由 + * + * @param id 任务编号 + * @param status 状态 + * @param reason 理由(审批通过、审批不通过的理由) + */ + private void updateTaskStatus(String id, Integer status, String reason) { + taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_STATUS, status); + taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_REASON, reason); + } + /** * 校验任务是否存在, 并且是否是分配给自己的任务 * @@ -382,7 +390,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { // status = BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult(); // } - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.RUNNING.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); } @Override @@ -392,7 +400,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // .setEndTime(LocalDateTime.now()); // taskExtMapper.updateByTaskId(taskExtDO); - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.APPROVE.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus()); } @Override @@ -405,11 +413,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { } Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); - if (BpmProcessInstanceResultEnum.isEndResult(status)) { + if (BpmTaskStatustEnum.isEndStatus(status)) { log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } - updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult()); + updateTaskStatus(taskId, BpmTaskStatustEnum.CANCEL.getStatus()); if (true) { return; @@ -438,7 +446,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // return; // } Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); - if (BpmProcessInstanceResultEnum.isEndResult(status)) { + if (BpmTaskStatustEnum.isEndStatus(status)) { log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } @@ -446,7 +454,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 更新任务 // taskExtMapper.updateById(new BpmTaskExtDO().setId(taskExt.getId()).setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) // .setEndTime(LocalDateTime.now()).setReason(BpmProcessInstanceDeleteReasonEnum.translateReason(task.getDeleteReason()))); - updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult()); + updateTaskStatus(taskId, BpmTaskStatustEnum.CANCEL.getStatus()); } }); @@ -520,19 +528,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { throw exception(TASK_IS_PENDING); } // 1.2 校验源头和目标节点的关系,并返回目标元素 - FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), reqVO.getTargetTaskDefinitionKey(), task.getProcessDefinitionId()); - - // 3. 更新任务扩展表 TODO 芋艿:需要提前搞 - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); + FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), + reqVO.getTargetTaskDefinitionKey(), task.getProcessDefinitionId()); - // 2. 调用 flowable 框架的回退逻辑 - returnTask0(task, targetElement, reqVO); - - // 3. 更新任务扩展表 -// updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); -// taskExtMapper.updateByTaskId(new BpmTaskExtDO().setTaskId(task.getId()) -// .setResult(BpmProcessInstanceResultEnum.BACK.getResult()) -// .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); + // 2. 调用 Flowable 框架的回退逻辑 + returnTask(task, targetElement, reqVO); } /** @@ -568,7 +568,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { * @param targetElement 需要回退到的目标任务 * @param reqVO 前端参数封装 */ - public void returnTask0(Task currentTask, FlowElement targetElement, BpmTaskReturnReqVO reqVO) { + public void returnTask(Task currentTask, FlowElement targetElement, BpmTaskReturnReqVO reqVO) { // 1. 获得所有需要回撤的任务 taskDefinitionKey,用于稍后的 moveActivityIdsToSingleActivityId 回撤 // 1.1 获取所有正常进行的任务节点 Key List taskList = taskService.createTaskQuery().processInstanceId(currentTask.getProcessInstanceId()).list(); @@ -584,11 +584,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { if (!returnTaskKeyList.contains(task.getTaskDefinitionKey())) { return; } + // 2.1 添加评论 taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), - BpmCommentTypeEnum.BACK.getType().toString(), reqVO.getReason()); - - // TODO 芋艿:这里加下驳回的 - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.BACK.getResult()); + BpmCommentTypeEnum.BACK.getType(), reqVO.getReason()); + // 2.2 更新 task 状态 + 原因 + updateTaskStatus(task.getId(), BpmTaskStatustEnum.BACK.getStatus(), reqVO.getReason()); }); // 3. 执行驳回 @@ -626,7 +626,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // taskExtMapper.updateByTaskId( // new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.DELEGATE.getResult()) // .setReason(reqVO.getReason())); - updateTaskStatus(taskId, BpmProcessInstanceResultEnum.DELEGATE.getResult()); + updateTaskStatus(taskId, BpmTaskStatustEnum.DELEGATE.getStatus()); } /** @@ -677,7 +677,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.5 保存当前任务修改后的值 taskService.saveTask(taskEntity); if (reqVO.getType().equals(BpmTaskAddSignTypeEnum.BEFORE.getType())) { - updateTaskStatus(taskEntity.getId(), BpmProcessInstanceResultEnum.WAIT.getResult()); // TODO 芋艿:貌似只能放在这个地方,不然会有并发修改的报错 + updateTaskStatus(taskEntity.getId(), BpmTaskStatustEnum.WAIT.getStatus()); // TODO 芋艿:貌似只能放在这个地方,不然会有并发修改的报错 } // 3. 创建加签任务 @@ -767,7 +767,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.saveTask(task); // 3. TODO if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { - updateTaskStatus(task.getId(), BpmProcessInstanceResultEnum.WAIT.getResult()); + updateTaskStatus(task.getId(), BpmTaskStatustEnum.WAIT.getStatus()); } } diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java index 6de30aa94f..264dd7ec66 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java @@ -55,7 +55,7 @@ public class BpmnModelUtils { /** * 获得 BPMN 流程中,指定的元素们 * - * @param model + * @param model 模型 * @param clazz 指定元素。例如说,{@link UserTask}、{@link Gateway} 等等 * @return 元素们 */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java index 665e98fbed..43e681c5e7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.util; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum; /** @@ -17,9 +17,9 @@ public class CrmAuditStatusUtils { * @param bpmResult BPM 审批结果 */ public static Integer convertBpmResultToAuditStatus(Integer bpmResult) { - Integer auditStatus = BpmProcessInstanceResultEnum.APPROVE.getResult().equals(bpmResult) ? CrmAuditStatusEnum.APPROVE.getStatus() - : BpmProcessInstanceResultEnum.REJECT.getResult().equals(bpmResult) ? CrmAuditStatusEnum.REJECT.getStatus() - : BpmProcessInstanceResultEnum.CANCEL.getResult().equals(bpmResult) ? BpmProcessInstanceResultEnum.CANCEL.getResult() : null; + Integer auditStatus = BpmTaskStatustEnum.APPROVE.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.APPROVE.getStatus() + : BpmTaskStatustEnum.REJECT.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.REJECT.getStatus() + : BpmTaskStatustEnum.CANCEL.getStatus().equals(bpmResult) ? BpmTaskStatustEnum.CANCEL.getStatus() : null; Assert.notNull(auditStatus, "BPM 审批结果({}) 转换失败", bpmResult); return auditStatus; } -- Gitee From b2b2b497b1ab7a87163e851b33df8384dc1a7259 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 Mar 2024 19:24:07 +0800 Subject: [PATCH 0075/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84=20task?= =?UTF-8?q?=20=E5=A7=94=E6=89=98=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/task/BpmCommentTypeEnum.java | 14 +++++-- .../bpm/enums/task/BpmTaskStatustEnum.java | 6 +-- .../task/vo/task/BpmTaskDelegateReqVO.java | 3 +- .../bpm/service/task/BpmTaskServiceImpl.java | 42 +++++++------------ 4 files changed, 29 insertions(+), 36 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java index f2c2ded53a..c48b4f439c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.enums.task; +import cn.hutool.core.util.StrUtil; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,10 +16,11 @@ public enum BpmCommentTypeEnum { APPROVE("1", "审批通过", ""), // 理由:直接使用用户的评论 REJECT("2", "不通过", ""), CANCEL("3", "已取消", ""), - BACK("4", "退回", ""), // 理由:直接使用用户的评论 - DELEGATE("5", "委派", ""), - ADD_SIGN("6", "加签", "[{}]{}给了[{}],理由为:{}"), - SUB_SIGN("7", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), + BACK("4", "退回", "{}"), // 直接使用用户填写的原因 + DELEGATE_START("5", "委派发起", "[{}]将任务委派给[{}],委派理由为:{}"), + DELEGATE_END("6", "委派完成", "[{}]将任务委派给[{}],委派理由为:{}"), + ADD_SIGN("7", "加签", "[{}]{}给了[{}],理由为:{}"), + SUB_SIGN("8", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), ; /** @@ -36,4 +38,8 @@ public enum BpmCommentTypeEnum { */ private final String comment; + public String formatComment(Object... params) { + return StrUtil.format(comment, params); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java index ee06b08476..020ed3daf7 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java @@ -18,9 +18,7 @@ public enum BpmTaskStatustEnum { REJECT(3, "审批不通过"), CANCEL(4, "已取消"), - // ========== 流程任务独有的状态 ========== - - BACK(5, "已驳回"), // 退回 + RETURN(5, "已退回"), DELEGATE(6, "委派中"), /** @@ -64,7 +62,7 @@ public enum BpmTaskStatustEnum { public static boolean isEndStatus(Integer status) { return ObjectUtils.equalsAny(status, APPROVE.getStatus(), REJECT.getStatus(), CANCEL.getStatus(), - BACK.getStatus(), APPROVING.getStatus()); + RETURN.getStatus(), APPROVING.getStatus()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java index 2d16206617..cd1fce4416 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; +import lombok.Data; @Schema(description = "管理后台 - 委派流程任务的 Request VO") @Data diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index b0bc45e3f0..915bc6162c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -285,21 +285,16 @@ public class BpmTaskServiceImpl implements BpmTaskService { private void approveDelegateTask(BpmTaskApproveReqVO reqVO, Task task) { // 1. 添加审批意见 AdminUserRespDTO currentUser = adminUserApi.getUser(WebFrameworkUtils.getLoginUserId()); - AdminUserRespDTO sourceApproveUser = adminUserApi.getUser(NumberUtils.parseLong(task.getOwner())); - Assert.notNull(sourceApproveUser, "委派任务找不到原审批人,需要检查数据"); - String comment = StrUtil.format("[{}]完成委派任务,任务重新回到[{}]手中,审批意见为:{}", currentUser.getNickname(), - sourceApproveUser.getNickname(), reqVO.getReason()); - taskService.addComment(reqVO.getId(), task.getProcessInstanceId(), - BpmCommentTypeEnum.DELEGATE.getType().toString(), comment); + AdminUserRespDTO ownerUser = adminUserApi.getUser(NumberUtils.parseLong(task.getOwner())); // 发起委托的用户 + Assert.notNull(ownerUser, "委派任务找不到原审批人,需要检查数据"); + taskService.addComment(reqVO.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.DELEGATE_END.getType(), + BpmCommentTypeEnum.DELEGATE_END.formatComment(currentUser.getNickname(), ownerUser.getNickname(), reqVO.getReason())); // 2.1 调用 resolveTask 完成任务。 // 底层调用 TaskHelper.changeTaskAssignee(task, task.getOwner()):将 owner 设置为 assignee taskService.resolveTask(task.getId()); - // 2.2 更新任务拓展表为【处理中】 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.RUNNING.getResult()) -// .setReason(reqVO.getReason())); - updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); + // 2.2 更新 task 状态 + 原因 + updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus(), reqVO.getReason()); } @Override @@ -352,8 +347,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { * @param status 状态 * @param reason 理由(审批通过、审批不通过的理由) */ - private void updateTaskStatus(String id, Integer status, String reason) { - taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_STATUS, status); + private void updateTaskStatusAndReason(String id, Integer status, String reason) { + updateTaskStatus(id, status); taskService.setVariableLocal(id, BpmConstants.TASK_VARIABLE_REASON, reason); } @@ -585,10 +580,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { return; } // 2.1 添加评论 - taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), - BpmCommentTypeEnum.BACK.getType(), reqVO.getReason()); + taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.BACK.getType(), + BpmCommentTypeEnum.BACK.formatComment(reqVO.getReason())); // 2.2 更新 task 状态 + 原因 - updateTaskStatus(task.getId(), BpmTaskStatustEnum.BACK.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RETURN.getStatus(), reqVO.getReason()); }); // 3. 执行驳回 @@ -602,6 +597,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override @Transactional(rollbackFor = Exception.class) public void delegateTask(Long userId, BpmTaskDelegateReqVO reqVO) { + String taskId = reqVO.getId(); // 1.1 校验任务 Task task = validateTaskCanDelegate(userId, reqVO); // 1.2 校验目标用户存在 @@ -612,21 +608,15 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2. 添加审批意见 AdminUserRespDTO currentUser = adminUserApi.getUser(userId); - String comment = StrUtil.format("[{}]将任务委派给[{}],委派理由为:{}", currentUser.getNickname(), - delegateUser.getNickname(), reqVO.getReason()); - String taskId = reqVO.getId(); - taskService.addComment(taskId, task.getProcessInstanceId(), - BpmCommentTypeEnum.DELEGATE.getType().toString(), comment); + taskService.addComment(taskId, task.getProcessInstanceId(), BpmCommentTypeEnum.DELEGATE_START.getType(), + BpmCommentTypeEnum.DELEGATE_START.formatComment(currentUser.getNickname(), delegateUser.getNickname(), reqVO.getReason())); // 3.1 设置任务所有人 (owner) 为原任务的处理人 (assignee) taskService.setOwner(taskId, task.getAssignee()); // 3.2 执行委派,将任务委派给 receiveId taskService.delegateTask(taskId, reqVO.getDelegateUserId().toString()); - // 3.3 更新任务拓展表为【委派】 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.DELEGATE.getResult()) -// .setReason(reqVO.getReason())); - updateTaskStatus(taskId, BpmTaskStatustEnum.DELEGATE.getStatus()); + // 3.3 更新 task 状态 + 原因 + updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.DELEGATE.getStatus(), reqVO.getReason()); } /** -- Gitee From bc4427aca54755bc2661bf0254acd46e2c351482 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 Mar 2024 20:44:44 +0800 Subject: [PATCH 0076/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84=20task?= =?UTF-8?q?=20=E8=BD=AC=E6=B4=BE=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 4 +- .../bpm/enums/task/BpmCommentTypeEnum.java | 7 +- .../admin/task/BpmTaskController.java | 18 +++--- ...eeReqVO.java => BpmTaskTransferReqVO.java} | 8 ++- .../bpm/service/task/BpmTaskService.java | 10 +-- .../bpm/service/task/BpmTaskServiceImpl.java | 64 +++++++++---------- 6 files changed, 55 insertions(+), 56 deletions(-) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/{BpmTaskUpdateAssigneeReqVO.java => BpmTaskTransferReqVO.java} (66%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index e88e27b1f2..cb22e70fc1 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -53,7 +53,9 @@ public interface ErrorCodeConstants { ErrorCode TASK_ADD_SIGN_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签:选择的用户不存在"); ErrorCode TASK_ADD_SIGN_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签:当前任务已经{},不能{}"); ErrorCode TASK_ADD_SIGN_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复"); - ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_011, "任务减签失败,被减签的任务必须是通过加签生成的任务"); + ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); + ErrorCode TASK_TRANSFER_FAIL_USER_REPEAT = new ErrorCode(1_009_005_013, "任务转办失败,转办人和当前审批人为同一人"); + ErrorCode TASK_TRANSFER_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_014, "任务转办失败,转办人不存在"); // ========== 流程任务分配规则 1-009-006-000 TODO 芋艿:这里要改下 ========== ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败,原因:找不到任务的审批人!"); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java index c48b4f439c..8a7757cca0 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java @@ -18,9 +18,10 @@ public enum BpmCommentTypeEnum { CANCEL("3", "已取消", ""), BACK("4", "退回", "{}"), // 直接使用用户填写的原因 DELEGATE_START("5", "委派发起", "[{}]将任务委派给[{}],委派理由为:{}"), - DELEGATE_END("6", "委派完成", "[{}]将任务委派给[{}],委派理由为:{}"), - ADD_SIGN("7", "加签", "[{}]{}给了[{}],理由为:{}"), - SUB_SIGN("8", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), + DELEGATE_END("6", "委派完成", "[{}]完成委派任务,任务重新回到[{}]手中,审批建议为:{}"), + TRANSFER("7", "转派", "[{}]将任务转派给[{}],转派理由为:{}"), + ADD_SIGN("8", "加签", "[{}]{}给了[{}],理由为:{}"), + SUB_SIGN("9", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"), ; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index f18926582f..151610e2b7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -118,14 +118,6 @@ public class BpmTaskController { return success(true); } - @PutMapping("/update-assignee") - @Operation(summary = "更新任务的负责人", description = "用于【流程详情】的【转派】按钮") - @PreAuthorize("@ss.hasPermission('bpm:task:update')") - public CommonResult updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) { - taskService.updateTaskAssignee(getLoginUserId(), reqVO); - return success(true); - } - @GetMapping("/list-by-return") @Operation(summary = "获取所有可回退的节点", description = "用于【流程详情】的【回退】按钮") @Parameter(name = "taskId", description = "当前任务ID", required = true) @@ -145,13 +137,21 @@ public class BpmTaskController { } @PutMapping("/delegate") - @Operation(summary = "委派任务", description = "用于【流程详情】的【委派】按钮。和向前【加签】有点像,唯一区别是【委托】没有单独创立任务") + @Operation(summary = "委派任务", description = "用于【流程详情】的【委派】按钮") @PreAuthorize("@ss.hasPermission('bpm:task:update')") public CommonResult delegateTask(@Valid @RequestBody BpmTaskDelegateReqVO reqVO) { taskService.delegateTask(getLoginUserId(), reqVO); return success(true); } + @PutMapping("/transfer") + @Operation(summary = "转派任务", description = "用于【流程详情】的【转派】按钮") + @PreAuthorize("@ss.hasPermission('bpm:task:update')") + public CommonResult transferTask(@Valid @RequestBody BpmTaskTransferReqVO reqVO) { + taskService.transferTask(getLoginUserId(), reqVO); + return success(true); + } + @PutMapping("/create-sign") @Operation(summary = "加签", description = "before 前加签,after 后加签") @PreAuthorize("@ss.hasPermission('bpm:task:update')") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java similarity index 66% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java index 51c10bfc58..b388705ceb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java @@ -6,9 +6,9 @@ import lombok.Data; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; -@Schema(description = "管理后台 - 流程任务的更新负责人的 Request VO") +@Schema(description = "管理后台 - 流程任务的转办 Request VO") @Data -public class BpmTaskUpdateAssigneeReqVO { +public class BpmTaskTransferReqVO { @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotEmpty(message = "任务编号不能为空") @@ -18,4 +18,8 @@ public class BpmTaskUpdateAssigneeReqVO { @NotNull(message = "新审批人的用户编号不能为空") private Long assigneeUserId; + @Schema(description = "转办原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "做不了决定,需要你先帮忙瞅瞅") + @NotEmpty(message = "转办原因不能为空") + private String reason; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 6114a612b1..1e60ce04f3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -87,15 +87,7 @@ public interface BpmTaskService { * @param userId 用户编号 * @param reqVO 分配请求 */ - void updateTaskAssignee(Long userId, BpmTaskUpdateAssigneeReqVO reqVO); - - /** - * 将流程任务分配给指定用户 - * - * @param id 流程任务编号 - * @param userId 用户编号 - */ - void updateTaskAssignee(String id, Long userId); + void transferTask(Long userId, BpmTaskTransferReqVO reqVO); /** * 创建 Task 拓展记录 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 915bc6162c..2044d98996 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -179,7 +179,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 情况三:审批普通的任务。大多数情况下,都是这样 // 3.1 更新 task 状态、原因 - updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus(), reqVO.getReason()); // 3.2 添加评论 taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), reqVO.getReason()); @@ -317,19 +317,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { // .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); } - @Override - public void updateTaskAssignee(Long userId, BpmTaskUpdateAssigneeReqVO reqVO) { - // 校验任务存在 - Task task = validateTask(userId, reqVO.getId()); - // 更新负责人 - updateTaskAssignee(task.getId(), reqVO.getAssigneeUserId()); - } - - @Override - public void updateTaskAssignee(String id, Long userId) { - taskService.setAssignee(id, String.valueOf(userId)); - } - /** * 更新流程任务的 status 状态 * @@ -599,41 +586,54 @@ public class BpmTaskServiceImpl implements BpmTaskService { public void delegateTask(Long userId, BpmTaskDelegateReqVO reqVO) { String taskId = reqVO.getId(); // 1.1 校验任务 - Task task = validateTaskCanDelegate(userId, reqVO); + Task task = validateTask(userId, reqVO.getId()); + if (task.getAssignee().equals(reqVO.getDelegateUserId().toString())) { // 校验当前审批人和被委派人不是同一人 + throw exception(TASK_DELEGATE_FAIL_USER_REPEAT); + } // 1.2 校验目标用户存在 AdminUserRespDTO delegateUser = adminUserApi.getUser(reqVO.getDelegateUserId()); if (delegateUser == null) { throw exception(TASK_DELEGATE_FAIL_USER_NOT_EXISTS); } - // 2. 添加审批意见 + // 2. 添加委托意见 AdminUserRespDTO currentUser = adminUserApi.getUser(userId); taskService.addComment(taskId, task.getProcessInstanceId(), BpmCommentTypeEnum.DELEGATE_START.getType(), BpmCommentTypeEnum.DELEGATE_START.formatComment(currentUser.getNickname(), delegateUser.getNickname(), reqVO.getReason())); // 3.1 设置任务所有人 (owner) 为原任务的处理人 (assignee) taskService.setOwner(taskId, task.getAssignee()); - // 3.2 执行委派,将任务委派给 receiveId + // 3.2 执行委派,将任务委派给 delegateUser taskService.delegateTask(taskId, reqVO.getDelegateUserId().toString()); - // 3.3 更新 task 状态 + 原因 - updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.DELEGATE.getStatus(), reqVO.getReason()); + // 3.3 更新 task 状态。 + // 为什么不更新原因?因为原因目前主要给审批通过、不通过时使用 + updateTaskStatus(taskId, BpmTaskStatustEnum.DELEGATE.getStatus()); } - /** - * 校验任务委派参数 - * - * @param userId 用户编号 - * @param reqVO 任务编号,接收人ID - * @return 当前任务信息 - */ - private Task validateTaskCanDelegate(Long userId, BpmTaskDelegateReqVO reqVO) { - // 校验任务 + @Override + public void transferTask(Long userId, BpmTaskTransferReqVO reqVO) { + String taskId = reqVO.getId(); + // 1.1 校验任务 Task task = validateTask(userId, reqVO.getId()); - // 校验当前审批人和被委派人不是同一人 - if (task.getAssignee().equals(reqVO.getDelegateUserId().toString())) { - throw exception(TASK_DELEGATE_FAIL_USER_REPEAT); + if (task.getAssignee().equals(reqVO.getAssigneeUserId().toString())) { // 校验当前审批人和被转派人不是同一人 + throw exception(TASK_TRANSFER_FAIL_USER_REPEAT); } - return task; + // 1.2 校验目标用户存在 + AdminUserRespDTO assigneeUser = adminUserApi.getUser(reqVO.getAssigneeUserId()); + if (assigneeUser == null) { + throw exception(TASK_TRANSFER_FAIL_USER_NOT_EXISTS); + } + + // 2. 添加委托意见 + AdminUserRespDTO currentUser = adminUserApi.getUser(userId); + taskService.addComment(taskId, task.getProcessInstanceId(), BpmCommentTypeEnum.TRANSFER.getType(), + BpmCommentTypeEnum.TRANSFER.formatComment(currentUser.getNickname(), assigneeUser.getNickname(), reqVO.getReason())); + + // 3.1 设置任务所有人 (owner) 为原任务的处理人 (assignee) + taskService.setOwner(taskId, task.getAssignee()); + // 3.2 执行转派(审批人),将任务转派给 assigneeUser + // 委托( delegate)和转派(transfer)的差别,就在这块的调用!!!! + taskService.setAssignee(taskId, reqVO.getAssigneeUserId().toString()); } @Override -- Gitee From 0a7f94dd5fe94b72fd14d362efa8fd7e3441dc20 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 Mar 2024 22:43:58 +0800 Subject: [PATCH 0077/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84=20task?= =?UTF-8?q?=20=E5=9C=A8=E9=80=9A=E8=BF=87=E3=80=81=E4=B8=8D=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E3=80=81=E5=8F=96=E6=B6=88=E7=AD=89=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=20reason=20=E5=92=8C=20comment=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/task/BpmCommentTypeEnum.java | 8 +- ...asonEnum.java => BpmDeleteReasonEnum.java} | 30 ++-- .../BpmProcessInstanceEventListener.java | 4 +- .../core/listener/BpmTaskEventListener.java | 12 +- .../task/BpmProcessInstanceService.java | 6 +- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../bpm/service/task/BpmTaskService.java | 21 ++- .../bpm/service/task/BpmTaskServiceImpl.java | 130 +++++------------- 8 files changed, 64 insertions(+), 149 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/{BpmProcessInstanceDeleteReasonEnum.java => BpmDeleteReasonEnum.java} (38%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java index 8a7757cca0..8b7b7ce11f 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java @@ -13,10 +13,10 @@ import lombok.Getter; @AllArgsConstructor public enum BpmCommentTypeEnum { - APPROVE("1", "审批通过", ""), // 理由:直接使用用户的评论 - REJECT("2", "不通过", ""), - CANCEL("3", "已取消", ""), - BACK("4", "退回", "{}"), // 直接使用用户填写的原因 + APPROVE("1", "审批通过", "审批通过,原因是:{}"), + REJECT("2", "不通过", "审批不通过:原因是:{}"), + CANCEL("3", "已取消", "系统自动取消,原因是:{}"), + RETURN("4", "退回", "任务被退回,原因是:{}"), DELEGATE_START("5", "委派发起", "[{}]将任务委派给[{}],委派理由为:{}"), DELEGATE_END("6", "委派完成", "[{}]完成委派任务,任务重新回到[{}]手中,审批建议为:{}"), TRANSFER("7", "转派", "[{}]将任务转派给[{}],转派理由为:{}"), diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceDeleteReasonEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java similarity index 38% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceDeleteReasonEnum.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java index 4f99d0a3dc..ed07b330ab 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceDeleteReasonEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java @@ -5,20 +5,22 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 流程实例的删除原因 + * 流程实例/任务的删除原因枚举 * * @author 芋道源码 */ @Getter @AllArgsConstructor -public enum BpmProcessInstanceDeleteReasonEnum { +public enum BpmDeleteReasonEnum { - REJECT_TASK("不通过任务,原因:{}"), // 修改文案时,需要注意 isRejectReason 方法 - CANCEL_TASK("主动取消任务,原因:{}"), + // ========== 流程实例的独有原因 ========== + + REJECT_TASK("审批不通过任务,原因:{}"), // 场景:用户审批不通过任务。修改文案时,需要注意 isRejectReason 方法 + CANCEL_PROCESS_INSTANCE("用户主动取消流程,原因:{}"), // 场景:用户主动取消流程 // ========== 流程任务的独有原因 ========== - MULTI_TASK_END("系统自动取消,原因:多任务审批已经满足条件,无需审批该任务"), // 多实例满足 condition 而结束时,其它任务实例任务会被取消,对应的删除原因是 MI_END + CANCEL_SYSTEM("系统自动取消"), // 场景:非常多,比如说:1)多任务审批已经满足条件,无需审批该任务;2)流程实例被取消,无需审批该任务;等等 ; private final String reason; @@ -36,23 +38,7 @@ public enum BpmProcessInstanceDeleteReasonEnum { // ========== 逻辑 ========== public static boolean isRejectReason(String reason) { - return StrUtil.startWith(reason, "不通过任务,原因:"); - } - - /** - * 将 Flowable 的删除原因,翻译成对应的中文原因 - * - * @param reason 原始原因 - * @return 原因 - */ - public static String translateReason(String reason) { - if (StrUtil.isEmpty(reason)) { - return reason; - } - switch (reason) { - case "MI_END": return MULTI_TASK_END.getReason(); - default: return reason; - } + return StrUtil.startWith(reason, "审批不通过任务,原因:"); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java index f8e5920f17..cf1506e8df 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java @@ -36,12 +36,12 @@ public class BpmProcessInstanceEventListener extends AbstractFlowableEngineEvent @Override protected void processCancelled(FlowableCancelledEvent event) { - processInstanceService.updateProcessInstanceExtCancel(event); + processInstanceService.updateProcessInstanceWhenCancel(event); } @Override protected void processCompleted(FlowableEngineEntityEvent event) { - processInstanceService.updateProcessInstanceExtComplete((ProcessInstance)event.getEntity()); + processInstanceService.updateProcessInstanceWhenApprove((ProcessInstance)event.getEntity()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java index 7a647c2059..a8f1788f34 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java @@ -31,7 +31,6 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { @Resource @Lazy // 解决循环依赖 private BpmTaskService taskService; - @Resource @Lazy // 解决循环依赖 private BpmActivityService activityService; @@ -39,7 +38,7 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { public static final Set TASK_EVENTS = ImmutableSet.builder() .add(FlowableEngineEventType.TASK_CREATED) .add(FlowableEngineEventType.TASK_ASSIGNED) - .add(FlowableEngineEventType.TASK_COMPLETED) +// .add(FlowableEngineEventType.TASK_COMPLETED) // 由于审批通过时,已经记录了 task 的 status 为通过,所以不需要监听了。 .add(FlowableEngineEventType.ACTIVITY_CANCELLED) .build(); @@ -49,12 +48,7 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { @Override protected void taskCreated(FlowableEngineEntityEvent event) { - taskService.createTaskExt((Task) event.getEntity()); - } - - @Override - protected void taskCompleted(FlowableEngineEntityEvent event) { - taskService.updateTaskExtComplete((Task)event.getEntity()); + taskService.updateTaskStatusWhenCreated((Task) event.getEntity()); } @Override @@ -74,7 +68,7 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { if (StrUtil.isEmpty(activity.getTaskId())) { return; } - taskService.updateTaskExtCancel(activity.getTaskId()); + taskService.updateTaskStatusWhenCanceled(activity.getTaskId()); }); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index bb94dd2e22..1e78c271e1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -136,14 +136,14 @@ public interface BpmProcessInstanceService { * * @param event 流程取消事件 */ - void updateProcessInstanceExtCancel(FlowableCancelledEvent event); + void updateProcessInstanceWhenCancel(FlowableCancelledEvent event); /** * 更新 ProcessInstance 拓展记录为完成 * * @param instance 流程任务 */ - void updateProcessInstanceExtComplete(ProcessInstance instance); + void updateProcessInstanceWhenApprove(ProcessInstance instance); /** * 更新 ProcessInstance 拓展记录为不通过 @@ -151,7 +151,7 @@ public interface BpmProcessInstanceService { * @param id 流程编号 * @param reason 理由。例如说,审批不通过时,需要传递该值 */ - void updateProcessInstanceExtReject(String id, String reason); + void updateProcessInstanceReject(String id, String reason); // TODO @hai:改成 getProcessInstanceAssigneesByTaskDefinitionKey(String id, String taskDefinitionKey) /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index fa92e7e6ec..6b81092ace 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource @Lazy // 解决循环依赖 private BpmTaskService taskService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmProcessInstanceDeleteReasonEnum.CANCEL_TASK.format(cancelReqVO.getReason())); } @Override public void updateProcessInstanceExtCancel(FlowableCancelledEvent event) { // 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceExtReject 方法,已经进行更新了 if (BpmProcessInstanceDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceExtComplete(ProcessInstance instance) { // 更新拓展表 runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 发送流程被通过的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 需要主动查询,因为 instance 只有 id 属性 // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceExtReject(String id, String reason) { // 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 需要主动查询,因为 instance 只有 id 属性 ProcessInstance processInstance = getProcessInstance(id); // 删除流程实例,以实现驳回任务时,取消整个审批流程 deleteProcessInstance(id, StrUtil.format(BpmProcessInstanceDeleteReasonEnum.REJECT_TASK.format(reason))); // 发送流程被不通过的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 1e60ce04f3..4ec8272a57 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -90,25 +90,18 @@ public interface BpmTaskService { void transferTask(Long userId, BpmTaskTransferReqVO reqVO); /** - * 创建 Task 拓展记录 + * 更新 Task 状态,在创建时 * * @param task 任务实体 */ - void createTaskExt(Task task); + void updateTaskStatusWhenCreated(Task task); /** - * 更新 Task 拓展记录为完成 - * - * @param task 任务实体 - */ - void updateTaskExtComplete(Task task); - - /** - * 更新 Task 拓展记录为已取消 + * 更新 Task 状态,在取消时 * * @param taskId 任务的编号 */ - void updateTaskExtCancel(String taskId); + void updateTaskStatusWhenCanceled(String taskId); /** * 更新 Task 拓展记录,并发送通知 @@ -117,6 +110,12 @@ public interface BpmTaskService { */ void updateTaskExtAssign(Task task); + /** + * 获取任务 + * + * @param id 任务编号 + * @return 任务 + */ Task getTask(String id); /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 2044d98996..5c1de8a56a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -13,9 +13,7 @@ import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; -import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskAddSignTypeEnum; +import cn.iocoder.yudao.module.bpm.enums.task.*; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; @@ -181,8 +179,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 3.1 更新 task 状态、原因 updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus(), reqVO.getReason()); // 3.2 添加评论 - taskService.addComment(task.getId(), task.getProcessInstanceId(), - BpmCommentTypeEnum.APPROVE.getType(), reqVO.getReason()); + taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), + BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); // 3.3 调用 BPM complete 去完成任务 taskService.complete(task.getId(), instance.getProcessVariables()); @@ -300,21 +298,22 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override @Transactional(rollbackFor = Exception.class) public void rejectTask(Long userId, @Valid BpmTaskRejectReqVO reqVO) { + // 1.1 校验任务存在 Task task = validateTask(userId, reqVO.getId()); - // 校验流程实例存在 + // 1.2 校验流程实例存在 ProcessInstance instance = processInstanceService.getProcessInstance(task.getProcessInstanceId()); if (instance == null) { throw exception(PROCESS_INSTANCE_NOT_EXISTS); } - // 更新流程实例为不通过 - updateTaskStatus(task.getId(), BpmTaskStatustEnum.REJECT.getStatus()); - processInstanceService.updateProcessInstanceExtReject(instance.getProcessInstanceId(), reqVO.getReason()); + // 2.1 更新流程实例为不通过 + updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.REJECT.getStatus(), reqVO.getReason()); + // 2.2 添加评论 + taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.REJECT.getType(), + BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason())); -// // 更新任务拓展表为不通过 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) -// .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason())); + // 3. 更新流程实例,审批不通过! + processInstanceService.updateProcessInstanceReject(instance.getProcessInstanceId(), reqVO.getReason()); } /** @@ -354,112 +353,49 @@ public class BpmTaskServiceImpl implements BpmTaskService { } @Override - public void createTaskExt(Task task) { -// BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) -// .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); -// // 向后加签生成的任务,状态不能为进行中,需要等前面父任务完成 -// if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { -// taskExtDO.setResult(BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult()); -// } -// taskExtMapper.insert(taskExtDO); -// Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); -// if (status != null) { -// return; -// } -// -// status = BpmProcessInstanceResultEnum.RUNNING.getResult(); - // 向后加签生成的任务,状态不能为进行中,需要等前面父任务完成 -// if (BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType().equals(task.getScopeType())) { -// status = BpmProcessInstanceResultEnum.WAIT_BEFORE_TASK.getResult(); -// } + public void updateTaskStatusWhenCreated(Task task) { + Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); + if (status != null) { + log.error("[updateTaskStatusWhenCreated][taskId({}) 已经有状态({})]", task.getId(), status); + return; + } updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); } @Override - public void updateTaskExtComplete(Task task) { -// BpmTaskExtDO taskExtDO = BpmTaskConvert.INSTANCE.convert2TaskExt(task) -// .setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) // 不设置也问题不大,因为 Complete 一般是审核通过,已经设置 -// .setEndTime(LocalDateTime.now()); -// taskExtMapper.updateByTaskId(taskExtDO); - - updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus()); - } - - @Override - public void updateTaskExtCancel(String taskId) { + public void updateTaskStatusWhenCanceled(String taskId) { Task task = getTask(taskId); - // 可能只是活动,不是任务,所以查询不到 + // 1. 可能只是活动,不是任务,所以查询不到 if (task == null) { - log.error("[updateTaskExtCancel][taskId({}) 任务不存在]", taskId); + log.error("[updateTaskStatusWhenCanceled][taskId({}) 任务不存在]", taskId); return; } + // 2. 更新 task 状态 + 原因 Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); if (BpmTaskStatustEnum.isEndStatus(status)) { - log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); - return; - } - updateTaskStatus(taskId, BpmTaskStatustEnum.CANCEL.getStatus()); - - if (true) { + log.error("[updateTaskStatusWhenCanceled][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } - - // 需要在事务提交后,才进行查询。不然查询不到历史的原因 - TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { - - @Override - public void afterCommit() { - // 可能只是活动,不是任务,所以查询不到 - HistoricTaskInstance task = getHistoricTask(taskId); - if (task == null) { - return; - } - -// // 如果任务拓展表已经是完成的状态,则跳过 -// BpmTaskExtDO taskExt = taskExtMapper.selectByTaskId(taskId); -// if (taskExt == null) { -// log.error("[updateTaskExtCancel][taskId({}) 查找不到对应的记录,可能存在问题]", taskId); -// return; -// } -// // 如果已经是最终的结果,则跳过 -// if (BpmProcessInstanceResultEnum.isEndResult(taskExt.getResult())) { -// log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, taskExt.getResult()); -// return; -// } - Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); - if (BpmTaskStatustEnum.isEndStatus(status)) { - log.error("[updateTaskExtCancel][taskId({}) 处于结果({}),无需进行更新]", taskId, status); - return; - } - - // 更新任务 -// taskExtMapper.updateById(new BpmTaskExtDO().setId(taskExt.getId()).setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) -// .setEndTime(LocalDateTime.now()).setReason(BpmProcessInstanceDeleteReasonEnum.translateReason(task.getDeleteReason()))); - updateTaskStatus(taskId, BpmTaskStatustEnum.CANCEL.getStatus()); - } - - }); + updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_SYSTEM.getReason()); + // 补充说明:由于 Task 被删除成 HistoricTask 后,无法通过 taskService.addComment 添加理由,所以无法存储具体的取消理由 } @Override public void updateTaskExtAssign(Task task) { -// BpmTaskExtDO taskExtDO = -// new BpmTaskExtDO().setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setTaskId(task.getId()); -// taskExtMapper.updateByTaskId(taskExtDO); - // 发送通知。在事务提交时,批量执行操作,所以直接查询会无法查询到 ProcessInstance,所以这里是通过监听事务的提交来实现。 TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { + @Override public void afterCommit() { if (StrUtil.isNotEmpty(task.getAssignee())) { - ProcessInstance processInstance = - processInstanceService.getProcessInstance(task.getProcessInstanceId()); - AdminUserRespDTO startUser = adminUserApi.getUser(Long.valueOf(processInstance.getStartUserId())); - messageService.sendMessageWhenTaskAssigned( - BpmTaskConvert.INSTANCE.convert(processInstance, startUser, task)); + return; } + ProcessInstance processInstance = processInstanceService.getProcessInstance(task.getProcessInstanceId()); + AdminUserRespDTO startUser = adminUserApi.getUser(Long.valueOf(processInstance.getStartUserId())); + messageService.sendMessageWhenTaskAssigned(BpmTaskConvert.INSTANCE.convert(processInstance, startUser, task)); } + }); } @@ -567,8 +503,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { return; } // 2.1 添加评论 - taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.BACK.getType(), - BpmCommentTypeEnum.BACK.formatComment(reqVO.getReason())); + taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.RETURN.getType(), + BpmCommentTypeEnum.RETURN.formatComment(reqVO.getReason())); // 2.2 更新 task 状态 + 原因 updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RETURN.getStatus(), reqVO.getReason()); }); -- Gitee From 8c32eb24ec7c649660271a0cc0f6f2544c4d9978 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 19 Mar 2024 01:31:37 +0800 Subject: [PATCH 0078/1557] =?UTF-8?q?BPM=EF=BC=9A=E4=BC=98=E5=8C=96=20task?= =?UTF-8?q?=20=E5=8A=A0=E5=87=8F=E7=AD=BE=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 8 +- ...TypeEnum.java => BpmTaskSignTypeEnum.java} | 26 +- .../bpm/enums/task/BpmTaskStatustEnum.java | 17 +- .../admin/task/BpmTaskController.java | 23 +- ...ReqVO.java => BpmTaskSignCreateReqVO.java} | 19 +- ...ReqVO.java => BpmTaskSignDeleteReqVO.java} | 10 +- .../bpm/convert/task/BpmTaskConvert.java | 72 +++-- .../bpm/service/task/BpmTaskService.java | 4 +- .../bpm/service/task/BpmTaskServiceImpl.java | 277 ++++++++---------- 9 files changed, 229 insertions(+), 227 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/{BpmTaskAddSignTypeEnum.java => BpmTaskSignTypeEnum.java} (51%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/{BpmTaskAddSignReqVO.java => BpmTaskSignCreateReqVO.java} (37%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/{BpmTaskSubSignReqVO.java => BpmTaskSignDeleteReqVO.java} (50%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index cb22e70fc1..a689ad3e62 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -50,10 +50,10 @@ public interface ErrorCodeConstants { ErrorCode TASK_RETURN_FAIL_SOURCE_TARGET_ERROR = new ErrorCode(1_009_005_006, "回退任务失败,目标节点是在并行网关上或非同一路线上,不可跳转"); ErrorCode TASK_DELEGATE_FAIL_USER_REPEAT = new ErrorCode(1_009_005_007, "任务委派失败,委派人和当前审批人为同一人"); ErrorCode TASK_DELEGATE_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_008, "任务委派失败,被委派人不存在"); - ErrorCode TASK_ADD_SIGN_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签:选择的用户不存在"); - ErrorCode TASK_ADD_SIGN_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签:当前任务已经{},不能{}"); - ErrorCode TASK_ADD_SIGN_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复"); - ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); + ErrorCode TASK_SIGN_CREATE_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签:选择的用户不存在"); + ErrorCode TASK_SIGN_CREATE_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签:当前任务已经{},不能{}"); + ErrorCode TASK_SIGN_CREATE_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复"); + ErrorCode TASK_SIGN_DELETE_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); ErrorCode TASK_TRANSFER_FAIL_USER_REPEAT = new ErrorCode(1_009_005_013, "任务转办失败,转办人和当前审批人为同一人"); ErrorCode TASK_TRANSFER_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_014, "任务转办失败,转办人不存在"); diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java similarity index 51% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java index 47e06bf6fb..b01153d794 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskAddSignTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java @@ -1,14 +1,17 @@ package cn.iocoder.yudao.module.bpm.enums.task; +import cn.hutool.core.util.ArrayUtil; import lombok.AllArgsConstructor; import lombok.Getter; /** - * 流程任务 -- 加签类型枚举类型 + * 流程任务的加签类型枚举 + * + * @author kehaiyou */ @Getter @AllArgsConstructor -public enum BpmTaskAddSignTypeEnum { +public enum BpmTaskSignTypeEnum { /** * 向前加签,需要前置任务审批完成,才回到原审批人 @@ -19,17 +22,26 @@ public enum BpmTaskAddSignTypeEnum { */ AFTER("after", "向后加签"); + /** + * 类型 + */ private final String type; + /** + * 名字 + */ + private final String name; - private final String desc; // TODO 芋艿:desc - - public static String formatDesc(String type) { - for (BpmTaskAddSignTypeEnum value : values()) { + public static String nameOfType(String type) { + for (BpmTaskSignTypeEnum value : values()) { if (value.type.equals(type)) { - return value.desc; + return value.name; } } return null; } + public static BpmTaskSignTypeEnum of(String type) { + return ArrayUtil.firstMatch(value -> value.getType().equals(type), values()); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java index 020ed3daf7..eb4af0f623 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java @@ -22,23 +22,16 @@ public enum BpmTaskStatustEnum { DELEGATE(6, "委派中"), /** - * 【加签】源任务已经审批完成,但是它使用了后加签,后加签的任务未完成,源任务就会是这个状态 - * 相当于是 通过 APPROVE 的特殊状态 - * 例如:A 审批,A 后加签了 B,并且审批通过了任务,但是 B 还未审批,则当前任务状态为“待后加签任务完成” + * 使用场景: + * 1. 任务被向后【加签】时,它在审批通过后,会变成 APPROVING 这个状态,然后等到【加签】出来的任务都被审批后,才会变成 APPROVE 审批通过 */ APPROVING(7, "审批通过中"), /** - * 【加签】源任务未审批,但是向前加签了,所以源任务状态变为“待前加签任务完成” - * 相当于是 处理中 PROCESS 的特殊状态 - * 例如:A 审批,A 前加签了 B,B 还未审核 + * 使用场景: + * 1. 任务被向前【加签】时,它会变成 WAIT 状态,需要等待【加签】出来的任务被审批后,它才能继续变为 RUNNING 继续审批 + * 2. 任务被向后【加签】时,【加签】出来的任务处于 WAIT 状态,它们需要等待该任务被审批后,它们才能继续变为 RUNNING 继续审批 */ WAIT(0, "待审批"); -// /** -// * 【加签】后加签任务被创建时的初始状态 -// * 相当于是 处理中 PROCESS 的特殊状态 -// * 因为需要源任务先完成,才能到后加签的人来审批,所以加了一个状态区分 -// */ -// WAIT_BEFORE_TASK(9, "处理中【待前置任务完成】"); /** * 状态 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 151610e2b7..6e17a0901d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -4,8 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; @@ -94,7 +92,8 @@ public class BpmTaskController { // 拼接数据 HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId); // 获得 User 和 Dept Map - Set userIds = convertSet(taskList, task -> NumberUtils.parseLong(task.getAssignee())); + Set userIds = convertSetByFlatMap(taskList, task -> + Stream.of(NumberUtils.parseLong(task.getAssignee()), NumberUtils.parseLong(task.getOwner()))); userIds.add(NumberUtils.parseLong(processInstance.getStartUserId())); Map userMap = adminUserApi.getUserMap(userIds); Map deptMap = deptApi.getDeptMap( @@ -155,7 +154,7 @@ public class BpmTaskController { @PutMapping("/create-sign") @Operation(summary = "加签", description = "before 前加签,after 后加签") @PreAuthorize("@ss.hasPermission('bpm:task:update')") - public CommonResult createSignTask(@Valid @RequestBody BpmTaskAddSignReqVO reqVO) { + public CommonResult createSignTask(@Valid @RequestBody BpmTaskSignCreateReqVO reqVO) { taskService.createSignTask(getLoginUserId(), reqVO); return success(true); } @@ -163,13 +162,12 @@ public class BpmTaskController { @DeleteMapping("/delete-sign") @Operation(summary = "减签") @PreAuthorize("@ss.hasPermission('bpm:task:update')") - public CommonResult deleteSignTask(@Valid @RequestBody BpmTaskSubSignReqVO reqVO) { + public CommonResult deleteSignTask(@Valid @RequestBody BpmTaskSignDeleteReqVO reqVO) { taskService.deleteSignTask(getLoginUserId(), reqVO); return success(true); } - // TODO 芋艿:待测试 - @GetMapping("list-by-parent-task-id") + @GetMapping("/list-by-parent-task-id") @Operation(summary = "获得指定父级任务的子任务列表") // 目前用于,减签的时候,获得子任务列表 @Parameter(name = "parentTaskId", description = "父级任务编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") @@ -179,12 +177,11 @@ public class BpmTaskController { return success(Collections.emptyList()); } // 拼接数据 - Map userMap = adminUserApi.getUserMap( - convertSetByFlatMap(taskList, user -> Stream.of(Long.valueOf(user.getAssignee()), Long.valueOf(user.getOwner())))); - return success(convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> { - taskVO.setAssigneeUser(BeanUtils.toBean(userMap.get(NumberUtils.parseLong(task.getAssignee())), BpmProcessInstanceRespVO.User.class)); - taskVO.setOwnerUser(BeanUtils.toBean(userMap.get(NumberUtils.parseLong(task.getOwner())), BpmProcessInstanceRespVO.User.class)); - }))); + Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(taskList, + user -> Stream.of(NumberUtils.parseLong(user.getAssignee()), NumberUtils.parseLong(user.getOwner())))); + Map deptMap = deptApi.getDeptMap( + convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + return success(BpmTaskConvert.INSTANCE.buildTaskListByParentTaskId(taskList, userMap, deptMap)); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskAddSignReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java similarity index 37% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskAddSignReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java index 68369696b5..71278b37f5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskAddSignReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java @@ -6,24 +6,23 @@ import lombok.Data; import jakarta.validation.constraints.NotEmpty; import java.util.Set; -// TODO @海洋:类名,应该是 create 哈 -@Schema(description = "管理后台 - 加签流程任务的 Request VO") +@Schema(description = "管理后台 - 加签任务的创建(加签) Request VO") @Data -public class BpmTaskAddSignReqVO { +public class BpmTaskSignCreateReqVO { - @Schema(description = "需要加签的任务 ID") + @Schema(description = "需要加签的任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotEmpty(message = "任务编号不能为空") private String id; - @Schema(description = "加签的用户 ID") - @NotEmpty(message = "加签用户 ID 不能为空") - private Set userIdList; + @Schema(description = "加签的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "888") + @NotEmpty(message = "加签用户不能为空") + private Set userIds; - @Schema(description = "加签类型,before 向前加签,after 向后加签") + @Schema(description = "加签类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "before") @NotEmpty(message = "加签类型不能为空") - private String type; + private String type; // 参见 BpmTaskSignTypeEnum 枚举 - @Schema(description = "加签原因") + @Schema(description = "加签原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "需要加签") @NotEmpty(message = "加签原因不能为空") private String reason; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java similarity index 50% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java index a2966a399e..9ea8a105b8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSubSignReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java @@ -5,16 +5,16 @@ import lombok.Data; import jakarta.validation.constraints.NotEmpty; -// TODO @海洋:类名,应该是 delete 哈 -@Schema(description = "管理后台 - 减签流程任务的 Request VO") +@Schema(description = "管理后台 - 加签任务的删除(减签) Request VO") @Data -public class BpmTaskSubSignReqVO { +public class BpmTaskSignDeleteReqVO { - @Schema(description = "被减签的任务 ID") + @Schema(description = "被减签的任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotEmpty(message = "任务编号不能为空") private String id; - @Schema(description = "加签原因") + @Schema(description = "加签原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "需要减签") @NotEmpty(message = "加签原因不能为空") private String reason; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index ee7b5245ce..e9f04f4981 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -24,8 +24,7 @@ import java.util.Date; import java.util.List; import java.util.Map; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; /** * Bpm 任务 Convert @@ -91,6 +90,14 @@ public interface BpmTaskConvert { taskVO.getAssigneeUser().setDeptName(dept.getName()); } } + AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner())); + if (ownerUser != null) { + taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class)); + DeptRespDTO dept = deptMap.get(ownerUser.getDeptId()); + if (dept != null) { + taskVO.getOwnerUser().setDeptName(dept.getName()); + } + } return taskVO; }); @@ -104,6 +111,29 @@ public interface BpmTaskConvert { return filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId())); } + default List buildTaskListByParentTaskId(List taskList, + Map userMap, + Map deptMap) { + return convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> { + AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); + if (assignUser != null) { + taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); + DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); + if (dept != null) { + taskVO.getAssigneeUser().setDeptName(dept.getName()); + } + } + AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner())); + if (ownerUser != null) { + taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class)); + DeptRespDTO dept = deptMap.get(ownerUser.getDeptId()); + if (dept != null) { + taskVO.getOwnerUser().setDeptName(dept.getName()); + } + } + })); + } + default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser, Task task) { BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO(); @@ -114,22 +144,28 @@ public interface BpmTaskConvert { return reqDTO; } - //此处不用 mapstruct 映射,因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的 - //使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题 - default TaskEntityImpl convert(TaskEntityImpl task,TaskEntityImpl parentTask){ - task.setCategory(parentTask.getCategory()); - task.setDescription(parentTask.getDescription()); - task.setTenantId(parentTask.getTenantId()); - task.setName(parentTask.getName()); - task.setParentTaskId(parentTask.getId()); - task.setProcessDefinitionId(parentTask.getProcessDefinitionId()); - task.setProcessInstanceId(parentTask.getProcessInstanceId()); -// task.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错) - task.setTaskDefinitionKey(parentTask.getTaskDefinitionKey()); - task.setTaskDefinitionId(parentTask.getTaskDefinitionId()); - task.setPriority(parentTask.getPriority()); - task.setCreateTime(new Date()); - return task; + /** + * 将父任务的属性,拷贝到子任务(加签任务) + * + * 为什么不使用 mapstruct 映射?因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的。 + * 使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题。 + * + * @param parentTask 父任务 + * @param childTask 加签任务 + */ + default void copyTo(TaskEntityImpl parentTask, TaskEntityImpl childTask) { + childTask.setName(parentTask.getName()); + childTask.setDescription(parentTask.getDescription()); + childTask.setCategory(parentTask.getCategory()); + childTask.setParentTaskId(parentTask.getId()); + childTask.setProcessDefinitionId(parentTask.getProcessDefinitionId()); + childTask.setProcessInstanceId(parentTask.getProcessInstanceId()); +// childTask.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错) + childTask.setTaskDefinitionKey(parentTask.getTaskDefinitionKey()); + childTask.setTaskDefinitionId(parentTask.getTaskDefinitionId()); + childTask.setPriority(parentTask.getPriority()); + childTask.setCreateTime(new Date()); + childTask.setTenantId(parentTask.getTenantId()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 4ec8272a57..83bb3eb0a9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -148,7 +148,7 @@ public interface BpmTaskService { * @param userId 被加签的用户和任务 ID,加签类型 * @param reqVO 当前用户 ID */ - void createSignTask(Long userId, BpmTaskAddSignReqVO reqVO); + void createSignTask(Long userId, BpmTaskSignCreateReqVO reqVO); /** * 任务减签 @@ -156,7 +156,7 @@ public interface BpmTaskService { * @param userId 当前用户ID * @param reqVO 被减签的任务 ID,理由 */ - void deleteSignTask(Long userId, BpmTaskSubSignReqVO reqVO); + void deleteSignTask(Long userId, BpmTaskSignDeleteReqVO reqVO); /** * 获取指定任务的子任务列表 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 5c1de8a56a..aa1fc6345b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -13,7 +13,10 @@ import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; -import cn.iocoder.yudao.module.bpm.enums.task.*; +import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; @@ -44,10 +47,10 @@ import org.springframework.transaction.support.TransactionSynchronizationManager import org.springframework.util.Assert; import java.util.*; +import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** @@ -170,7 +173,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 情况二:审批有【后】加签的任务 - if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(task.getScopeType())) { + if (BpmTaskSignTypeEnum.AFTER.getType().equals(task.getScopeType())) { approveAfterSignTask(task, reqVO); return; } @@ -191,29 +194,23 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 审批通过存在“后加签”的任务。 *

- * 注意:该任务不能马上完成,需要一个中间状态(SIGN_AFTER),并激活剩余所有子任务(PROCESS)为可审批处理 + * 注意:该任务不能马上完成,需要一个中间状态(APPROVING),并激活剩余所有子任务(PROCESS)为可审批处理 + * 如果马上完成,则会触发下一个任务,甚至如果没有下一个任务则流程实例就直接结束了! * * @param task 当前任务 * @param reqVO 前端请求参数 */ private void approveAfterSignTask(Task task, BpmTaskApproveReqVO reqVO) { - // 1. 有向后加签,则该任务状态临时设置为 ADD_SIGN_AFTER 状态 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.SIGN_AFTER.getResult()) -// .setReason(reqVO.getReason()).setEndTime(LocalDateTime.now())); - // TODO @芋艿:reqVO.reason??? - updateTaskStatus(task.getId(), BpmTaskStatustEnum.APPROVING.getStatus()); + // 更新父 task 状态 + 原因 + updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVING.getStatus(), reqVO.getReason()); // 2. 激活子任务 - List childrenTaskIdList = getChildrenTaskIdList(task.getId()); - for (String childrenTaskId : childrenTaskIdList) { - taskService.resolveTask(childrenTaskId); - // 更新任务扩展表中子任务为进行中 - updateTaskStatus(childrenTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); + List childrenTaskList = getTaskListByParentTaskId(task.getId()); + for (Task childrenTask : childrenTaskList) { + taskService.resolveTask(childrenTask.getId()); + // 更新子 task 状态 + updateTaskStatus(childrenTask.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); } - // 2.1 更新任务扩展表中子任务为进行中 -// taskExtMapper.updateBatchByTaskIdList(childrenTaskIdList, -// new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.PROCESS.getResult())); } /** @@ -229,14 +226,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { return; } // 1.1 判断是否还有子任务。如果没有,就不处理 - Long childrenTaskCount = getChildrenTaskCount(parentTaskId); + Long childrenTaskCount = getTaskCountByParentTaskId(parentTaskId); if (childrenTaskCount > 0) { return; } // 1.2 只处理加签的父任务 Task parentTask = validateTaskExist(parentTaskId); String scopeType = parentTask.getScopeType(); - if (!validateSignType(scopeType)){ + if (BpmTaskSignTypeEnum.of(scopeType) == null){ return; } @@ -246,14 +243,20 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.saveTask(parentTaskImpl); // 3.1 情况一:处理向【向前】加签 - if (BpmTaskAddSignTypeEnum.BEFORE.getType().equals(scopeType)) { + if (BpmTaskSignTypeEnum.BEFORE.getType().equals(scopeType)) { // 3.1.1 owner 重新赋值给父任务的 assignee,这样它就可以被审批 taskService.resolveTask(parentTaskId); // 3.1.2 更新流程任务 status updateTaskStatus(parentTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); // 3.2 情况二:处理向【向后】加签 - } else if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(scopeType)) { - // 3.2.1 完成自己(因为它已经没有子任务,所以也可以完成) + } else if (BpmTaskSignTypeEnum.AFTER.getType().equals(scopeType)) { + // 只有 parentTask 处于 APPROVING 的情况下,才可以继续 complete 完成 + // 否则,一个未审批的 parentTask 任务,在加签出来的任务都被减签的情况下,就直接完成审批,这样会存在问题 + Integer status = (Integer) parentTask.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); + if (ObjectUtil.notEqual(status, BpmTaskStatustEnum.APPROVING.getStatus())) { + return; + } + // 3.2.2 完成自己(因为它已经没有子任务,所以也可以完成) updateTaskStatus(parentTaskId, BpmTaskStatustEnum.APPROVE.getStatus()); taskService.complete(parentTaskId); } @@ -262,18 +265,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { handleParentTaskIfSign(parentTask.getParentTaskId()); } - /** - * 获取子任务个数 - * - * @param parentTaskId 父任务 ID - * @return 剩余子任务个数 - */ - private Long getChildrenTaskCount(String parentTaskId) { - String tableName = managementService.getTableName(TaskEntity.class); - String sql = "SELECT COUNT(1) from " + tableName + " WHERE PARENT_TASK_ID_=#{parentTaskId}"; - return taskService.createNativeTaskQuery().sql(sql).parameter("parentTaskId", parentTaskId).count(); - } - /** * 审批被委派的任务 * @@ -339,7 +330,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } /** - * 校验任务是否存在, 并且是否是分配给自己的任务 + * 校验任务是否存在,并且是否是分配给自己的任务 * * @param userId 用户 id * @param taskId task id @@ -388,7 +379,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override public void afterCommit() { - if (StrUtil.isNotEmpty(task.getAssignee())) { + if (StrUtil.isEmpty(task.getAssignee())) { return; } ProcessInstance processInstance = processInstanceService.getProcessInstance(task.getProcessInstanceId()); @@ -574,52 +565,45 @@ public class BpmTaskServiceImpl implements BpmTaskService { @Override @Transactional(rollbackFor = Exception.class) - public void createSignTask(Long userId, BpmTaskAddSignReqVO reqVO) { + public void createSignTask(Long userId, BpmTaskSignCreateReqVO reqVO) { // 1. 获取和校验任务 - TaskEntityImpl taskEntity = validateAddSign(userId, reqVO); - List userList = adminUserApi.getUserList(reqVO.getUserIdList()); + TaskEntityImpl taskEntity = validateTaskCanCreateSign(userId, reqVO); + List userList = adminUserApi.getUserList(reqVO.getUserIds()); if (CollUtil.isEmpty(userList)) { - throw exception(TASK_ADD_SIGN_USER_NOT_EXIST); + throw exception(TASK_SIGN_CREATE_USER_NOT_EXIST); } // 2. 处理当前任务 // 2.1 开启计数功能,主要用于为了让表 ACT_RU_TASK 中的 SUB_TASK_COUNT_ 字段记录下总共有多少子任务,后续可能有用 taskEntity.setCountEnabled(true); - if (reqVO.getType().equals(BpmTaskAddSignTypeEnum.BEFORE.getType())) { - // 2.2 向前加签,设置 owner,置空 assign。等子任务都完成后,再调用 resolveTask 重新将 owner 设置为 assign - // 原因是:不能和向前加签的子任务一起审批,需要等前面的子任务都完成才能审批 + // 2.2 向前加签,设置 owner,置空 assign。等子任务都完成后,再调用 resolveTask 重新将 owner 设置为 assign + // 原因是:不能和向前加签的子任务一起审批,需要等前面的子任务都完成才能审批 + if (reqVO.getType().equals(BpmTaskSignTypeEnum.BEFORE.getType())) { taskEntity.setOwner(taskEntity.getAssignee()); taskEntity.setAssignee(null); - // 2.3 更新扩展表状态 -// taskExtMapper.updateByTaskId( -// new BpmTaskExtDO().setTaskId(taskEntity.getId()) -// .setResult(BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()) -// .setReason(reqVO.getReason())); -// taskEntity.setTransientVariableLocal(BpmConstants.TASK_VARIABLE_STATUS, BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()); -// updateTaskStatus(taskEntity.getId(), BpmProcessInstanceResultEnum.SIGN_BEFORE.getResult()); // TODO 芋艿:貌似会有实物并发的问题;所以不能用这个调用,只能 set } // 2.4 记录加签方式,完成任务时需要用到判断 taskEntity.setScopeType(reqVO.getType()); // 2.5 保存当前任务修改后的值 taskService.saveTask(taskEntity); - if (reqVO.getType().equals(BpmTaskAddSignTypeEnum.BEFORE.getType())) { - updateTaskStatus(taskEntity.getId(), BpmTaskStatustEnum.WAIT.getStatus()); // TODO 芋艿:貌似只能放在这个地方,不然会有并发修改的报错 + // 2.6 更新 task 状态为 WAIT,只有在向前加签的时候 + if (reqVO.getType().equals(BpmTaskSignTypeEnum.BEFORE.getType())) { + updateTaskStatus(taskEntity.getId(), BpmTaskStatustEnum.WAIT.getStatus()); } // 3. 创建加签任务 - createSignTask(convertList(reqVO.getUserIdList(), String::valueOf), taskEntity); + createSignTaskList(convertList(reqVO.getUserIds(), String::valueOf), taskEntity); - // 4. 记录加签 comment,拼接结果为: [当前用户]向前加签/向后加签给了[多个用户],理由为:reason + // 4. 记录加签的评论到 task 任务 AdminUserRespDTO currentUser = adminUserApi.getUser(userId); - String comment = StrUtil.format(BpmCommentTypeEnum.ADD_SIGN.getComment(), currentUser.getNickname(), - BpmTaskAddSignTypeEnum.formatDesc(reqVO.getType()), String.join(",", convertList(userList, AdminUserRespDTO::getNickname)), reqVO.getReason()); - taskService.addComment(reqVO.getId(), taskEntity.getProcessInstanceId(), - BpmCommentTypeEnum.ADD_SIGN.getType().toString(), comment); + String comment = StrUtil.format(BpmCommentTypeEnum.ADD_SIGN.getComment(), + currentUser.getNickname(), BpmTaskSignTypeEnum.nameOfType(reqVO.getType()), + String.join(",", convertList(userList, AdminUserRespDTO::getNickname)), reqVO.getReason()); + taskService.addComment(reqVO.getId(), taskEntity.getProcessInstanceId(), BpmCommentTypeEnum.ADD_SIGN.getType(), comment); } - /** - * 校验任务的加签是否一致 + * 校验任务是否可以加签,主要校验加签类型是否一致: *

* 1. 如果存在“向前加签”的任务,则不能“向后加签” * 2. 如果存在“向后加签”的任务,则不能“向前加签” @@ -628,24 +612,23 @@ public class BpmTaskServiceImpl implements BpmTaskService { * @param reqVO 请求参数,包含任务 ID 和加签类型 * @return 当前任务 */ - private TaskEntityImpl validateAddSign(Long userId, BpmTaskAddSignReqVO reqVO) { + private TaskEntityImpl validateTaskCanCreateSign(Long userId, BpmTaskSignCreateReqVO reqVO) { TaskEntityImpl taskEntity = (TaskEntityImpl) validateTask(userId, reqVO.getId()); // 向前加签和向后加签不能同时存在 if (taskEntity.getScopeType() != null && ObjectUtil.notEqual(taskEntity.getScopeType(), reqVO.getType())) { - throw exception(TASK_ADD_SIGN_TYPE_ERROR, - BpmTaskAddSignTypeEnum.formatDesc(taskEntity.getScopeType()), BpmTaskAddSignTypeEnum.formatDesc(reqVO.getType())); + throw exception(TASK_SIGN_CREATE_TYPE_ERROR, + BpmTaskSignTypeEnum.nameOfType(taskEntity.getScopeType()), BpmTaskSignTypeEnum.nameOfType(reqVO.getType())); } // 同一个 key 的任务,审批人不重复 List taskList = taskService.createTaskQuery().processInstanceId(taskEntity.getProcessInstanceId()) .taskDefinitionKey(taskEntity.getTaskDefinitionKey()).list(); - List currentAssigneeList = convertList(taskList, task -> NumberUtils.parseLong(task.getAssignee())); - // 保留交集在 currentAssigneeList 中 - currentAssigneeList.retainAll(reqVO.getUserIdList()); - if (CollUtil.isNotEmpty(currentAssigneeList)) { - List userList = adminUserApi.getUserList(currentAssigneeList); - throw exception(TASK_ADD_SIGN_USER_REPEAT, String.join(",", convertList(userList, AdminUserRespDTO::getNickname))); + List currentAssigneeList = convertListByFlatMap(taskList, task -> // 需要考虑 owner 的情况,因为向后加签时,它暂时没 assignee 而是 owner + Stream.of(NumberUtils.parseLong(task.getAssignee()), NumberUtils.parseLong(task.getOwner()))); + if (CollUtil.containsAny(currentAssigneeList, reqVO.getUserIds())) { + List userList = adminUserApi.getUserList( CollUtil.intersection(currentAssigneeList, reqVO.getUserIds())); + throw exception(TASK_SIGN_CREATE_USER_REPEAT, String.join(",", convertList(userList, AdminUserRespDTO::getNickname))); } return taskEntity; } @@ -653,15 +636,15 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 创建加签子任务 * - * @param addSingUserIdList 被加签的用户 ID + * @param userIds 被加签的用户 ID * @param taskEntity 被加签的任务 */ - private void createSignTask(List addSingUserIdList, TaskEntityImpl taskEntity) { - if (CollUtil.isEmpty(addSingUserIdList)) { + private void createSignTaskList(List userIds, TaskEntityImpl taskEntity) { + if (CollUtil.isEmpty(userIds)) { return; } // 创建加签人的新任务,全部基于 taskEntity 为父任务来创建 - for (String addSignId : addSingUserIdList) { + for (String addSignId : userIds) { if (StrUtil.isBlank(addSignId)) { continue; } @@ -678,31 +661,29 @@ public class BpmTaskServiceImpl implements BpmTaskService { private void createSignTask(TaskEntityImpl parentTask, String assignee) { // 1. 生成子任务 TaskEntityImpl task = (TaskEntityImpl) taskService.newTask(IdUtil.fastSimpleUUID()); - task = BpmTaskConvert.INSTANCE.convert(task, parentTask); - if (BpmTaskAddSignTypeEnum.BEFORE.getType().equals(parentTask.getScopeType())) { - // 2.1 前加签,设置审批人 + BpmTaskConvert.INSTANCE.copyTo(parentTask, task); + + // 2.1 向前加签,设置审批人 + if (BpmTaskSignTypeEnum.BEFORE.getType().equals(parentTask.getScopeType())) { task.setAssignee(assignee); + // 2.2 向后加签,设置 owner 不设置 assignee 是因为不能同时审批,需要等父任务完成 } else { - // 2.2.1 设置 owner 不设置 assignee 是因为不能同时审批,需要等父任务完成 task.setOwner(assignee); - // 2.2.2 设置向后加签任务的 scopeType 为 afterChildrenTask,用于设置任务扩展表的状态 -// task.setScopeType(BpmTaskAddSignTypeEnum.AFTER_CHILDREN_TASK.getType()); -// task.setVariableLocal(BpmConstants.TASK_VARIABLE_STATUS, BpmProcessInstanceResultEnum.WAIT.getResult()); } - // 2. 保存子任务 + // 2.3 保存子任务 taskService.saveTask(task); - // 3. TODO - if (BpmTaskAddSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { + + // 3. 向后前签,设置子任务的状态为 WAIT,因为需要等父任务审批完 + if (BpmTaskSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { updateTaskStatus(task.getId(), BpmTaskStatustEnum.WAIT.getStatus()); } } @Override @Transactional(rollbackFor = Exception.class) - public void deleteSignTask(Long userId, BpmTaskSubSignReqVO reqVO) { + public void deleteSignTask(Long userId, BpmTaskSignDeleteReqVO reqVO) { // 1.1 校验 task 可以被减签 -// Task task = validateSubSign(reqVO.getId()); // TODO 芋艿:这个判断,暂时有点问题!在前置加签的时候 - Task task = validateTaskExist(reqVO.getId()); + Task task = validateTaskCanSignDelete(reqVO.getId()); // 1.2 校验取消人存在 AdminUserRespDTO cancelUser = null; if (StrUtil.isNotBlank(task.getAssignee())) { @@ -713,21 +694,19 @@ public class BpmTaskServiceImpl implements BpmTaskService { } Assert.notNull(cancelUser, "任务中没有所有者和审批人,数据错误"); - // 2. 删除任务和对应子任务 - // 2.1 获取所有需要删除的任务 ID ,包含当前任务和所有子任务 - List allTaskIdList = getAllChildTaskIds(task.getId()); + // 2.1 获得子任务列表,包括子任务的子任务 + List childTaskList = getAllChildTaskList(task); + childTaskList.add(task); + // 2.2 更新子任务为已取消 + String cancelReason = StrUtil.format("任务被取消,原因:由于[{}]操作[减签],", cancelUser.getNickname()); + childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatustEnum.CANCEL.getStatus(), cancelReason)); // 2.2 删除任务和所有子任务 - taskService.deleteTasks(allTaskIdList); - // 2.3 修改扩展表状态为取消 -// taskExtMapper.updateBatchByTaskIdList(allTaskIdList, new BpmTaskExtDO().setResult(BpmProcessInstanceResultEnum.CANCEL.getResult()) -// .setReason(StrUtil.format("由于{}操作[减签],任务被取消", user.getNickname()))); -// allTaskIdList.forEach(taskId -> updateTaskStatus(taskId, BpmProcessInstanceResultEnum.CANCEL.getResult())); // TODO @芋艿:交给取消;考虑到理由,可能不能直接给; + taskService.deleteTasks(convertList(childTaskList, Task::getId)); // 3. 记录日志到父任务中。先记录日志是因为,通过 handleParentTask 方法之后,任务可能被完成了,并且不存在了,会报异常,所以先记录 AdminUserRespDTO user = adminUserApi.getUser(userId); - String comment = StrUtil.format(BpmCommentTypeEnum.SUB_SIGN.getComment(), user.getNickname(), cancelUser.getNickname()); - taskService.addComment(task.getParentTaskId(), task.getProcessInstanceId(), - BpmCommentTypeEnum.SUB_SIGN.getType().toString(), comment); + taskService.addComment(task.getParentTaskId(), task.getProcessInstanceId(), BpmCommentTypeEnum.SUB_SIGN.getType(), + StrUtil.format(BpmCommentTypeEnum.SUB_SIGN.getComment(), user.getNickname(), cancelUser.getNickname())); // 4. 处理当前任务的父任务 handleParentTaskIfSign(task.getParentTaskId()); @@ -736,86 +715,72 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 校验任务是否能被减签 * - * @param id 任务ID + * @param id 任务编号 * @return 任务信息 */ - private Task validateSubSign(String id) { + private Task validateTaskCanSignDelete(String id) { Task task = validateTaskExist(id); - - // 必须有 scopeType - String scopeType = task.getScopeType(); - if (StrUtil.isEmpty(scopeType)) { - throw exception(TASK_SUB_SIGN_NO_PARENT); + if (task.getParentTaskId() == null) { + throw exception(TASK_SIGN_DELETE_NO_PARENT); + } + Task parentTask = getTask(task.getParentTaskId()); + if (parentTask == null) { + throw exception(TASK_SIGN_DELETE_NO_PARENT); } - // 并且值为 向前和向后加签 - if (!validateSignType(scopeType)) { - throw exception(TASK_SUB_SIGN_NO_PARENT); + if (BpmTaskSignTypeEnum.of(parentTask.getScopeType()) == null) { + throw exception(TASK_SIGN_DELETE_NO_PARENT); } return task; } /** - * 判断当前类型是否为加签 - * @param scopeType 任务的 scopeType - * @return 当前 scopeType 为加签则返回 true - */ - private boolean validateSignType(String scopeType){ - return StrUtil.equalsAny(scopeType,BpmTaskAddSignTypeEnum.BEFORE.getType(),scopeType, BpmTaskAddSignTypeEnum.AFTER.getType()); - } - -// TODO @海:BpmProcessInstanceResultEnum.CAN_SUB_SIGN_STATUS_LIST) 应该作为条件,mapper 不要有业务 - /** - * 获取所有要被取消的删除的任务 ID 集合 + * 获得所有子任务列表 * - * @param parentTaskId 父级任务ID - * @return 所有任务ID + * @param parentTask 父任务 + * @return 所有子任务列表 */ - public List getAllChildTaskIds(String parentTaskId) { - List allChildTaskIds = new ArrayList<>(); + private List getAllChildTaskList(Task parentTask) { + List result = new ArrayList<>(); // 1. 递归获取子级 - Stack stack = new Stack<>(); - // 1.1 将根任务ID入栈 - stack.push(parentTaskId); - //控制遍历的次数不超过 Byte.MAX_VALUE,避免脏数据造成死循环 - int count = 0; - // TODO @海:< 的前后空格,要注意哈; - while (!stack.isEmpty() && count childrenTaskIdList = getChildrenTaskIdList(taskId); - if (CollUtil.isNotEmpty(childrenTaskIdList)) { - for (String childTaskId : childrenTaskIdList) { - // 1.5 将子任务ID入栈,以便后续处理 - stack.push(childTaskId); - } + Stack stack = new Stack<>(); + stack.push(parentTask); + // 2. 递归遍历 + for (int i = 0; i < Short.MAX_VALUE; i++) { + if (stack.isEmpty()) { + break; + } + // 2.1 获取子任务们 + Task task = stack.pop(); + List childTaskList = getTaskListByParentTaskId(task.getId()); + // 2.2 如果非空,则添加到 stack 进一步递归 + if (CollUtil.isNotEmpty(childTaskList)) { + stack.addAll(childTaskList); + result.addAll(childTaskList); } - count++; } - return allChildTaskIds; - } - - /** - * 获取指定父级任务的所有子任务 ID 集合 - * - * @param parentTaskId 父任务 ID - * @return 所有子任务的 ID 集合 - */ - private List getChildrenTaskIdList(String parentTaskId) { - return convertList(getTaskListByParentTaskId(parentTaskId), Task::getId); + return result; } @Override public List getTaskListByParentTaskId(String parentTaskId) { String tableName = managementService.getTableName(TaskEntity.class); // taskService.createTaskQuery() 没有 parentId 参数,所以写 sql 查询 - String sql = "select ID_,OWNER_,ASSIGNEE_ from " + tableName + " where PARENT_TASK_ID_=#{parentTaskId}"; + String sql = "select ID_,NAME_,OWNER_,ASSIGNEE_ from " + tableName + " where PARENT_TASK_ID_=#{parentTaskId}"; return taskService.createNativeTaskQuery().sql(sql).parameter("parentTaskId", parentTaskId).list(); } + /** + * 获取子任务个数 + * + * @param parentTaskId 父任务 ID + * @return 剩余子任务个数 + */ + private Long getTaskCountByParentTaskId(String parentTaskId) { + String tableName = managementService.getTableName(TaskEntity.class); + String sql = "SELECT COUNT(1) from " + tableName + " WHERE PARENT_TASK_ID_=#{parentTaskId}"; + return taskService.createNativeTaskQuery().sql(sql).parameter("parentTaskId", parentTaskId).count(); + } + @Override public Map getTaskNameByTaskIds(Collection taskIds) { if (CollUtil.isEmpty(taskIds)) { -- Gitee From d5e28d4c57315d1dd885d3713659b1bf5ad55f62 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 19 Mar 2024 12:13:49 +0800 Subject: [PATCH 0079/1557] =?UTF-8?q?BPM=EF=BC=9A=E7=AE=80=E5=8C=96=20user?= =?UTF-8?q?Group=20=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmUserGroupController.java | 36 +++++++++--------- .../vo/group/BpmUserGroupCreateReqVO.java | 11 ------ .../vo/group/BpmUserGroupPageReqVO.java | 3 ++ .../vo/group/BpmUserGroupRespVO.java | 19 ++++++++-- ...BaseVO.java => BpmUserGroupSaveReqVO.java} | 20 +++++----- .../vo/group/BpmUserGroupSimpleRespVO.java | 20 ---------- .../vo/group/BpmUserGroupUpdateReqVO.java | 17 --------- .../definition/BpmUserGroupConvert.java | 38 ------------------- .../dataobject/definition/BpmUserGroupDO.java | 2 +- .../BpmTaskCandidateGroupStrategy.java | 2 +- .../definition/BpmUserGroupService.java | 7 ++-- .../definition/BpmUserGroupServiceImpl.java | 26 ++++++------- .../BpmTaskCandidateGroupStrategyTest.java | 4 +- .../definition/BpmUserGroupServiceTest.java | 4 +- 14 files changed, 64 insertions(+), 145 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/{BpmUserGroupBaseVO.java => BpmUserGroupSaveReqVO.java} (64%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmUserGroupConvert.java diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java index 82404b9253..64b80345c0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @Tag(name = "管理后台 - 用户组") @RestController @@ -35,14 +35,14 @@ public class BpmUserGroupController { @PostMapping("/create") @Operation(summary = "创建用户组") @PreAuthorize("@ss.hasPermission('bpm:user-group:create')") - public CommonResult createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { + public CommonResult createUserGroup(@Valid @RequestBody BpmUserGroupSaveReqVO createReqVO) { return success(userGroupService.createUserGroup(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新用户组") @PreAuthorize("@ss.hasPermission('bpm:user-group:update')") - public CommonResult updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { + public CommonResult updateUserGroup(@Valid @RequestBody BpmUserGroupSaveReqVO updateReqVO) { userGroupService.updateUserGroup(updateReqVO); return success(true); } @@ -62,7 +62,7 @@ public class BpmUserGroupController { @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") public CommonResult getUserGroup(@RequestParam("id") Long id) { BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); - return success(BpmUserGroupConvert.INSTANCE.convert(userGroup)); + return success(BeanUtils.toBean(userGroup, BpmUserGroupRespVO.class)); } @GetMapping("/page") @@ -70,16 +70,14 @@ public class BpmUserGroupController { @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") public CommonResult> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { PageResult pageResult = userGroupService.getUserGroupPage(pageVO); - return success(BpmUserGroupConvert.INSTANCE.convertPage(pageResult)); + return success(BeanUtils.toBean(pageResult, BpmUserGroupRespVO.class)); } - @GetMapping("/list-all-simple") + @GetMapping("/simple-list") @Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项") - public CommonResult> getSimpleUserGroups() { - // 获用户门列表,只要开启状态的 + public CommonResult> getUserGroupSimpleList() { List list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); - // 排序后,返回给前端 - return success(BpmUserGroupConvert.INSTANCE.convertList2(list)); + return success(convertList(list, group -> new BpmUserGroupRespVO().setId(group.getId()).setName(group.getName()))); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java deleted file mode 100644 index 416c4793ae..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -@Schema(description = "管理后台 - 用户组创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO { - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java index 05f17788ab..499e47a420 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java @@ -16,6 +16,9 @@ import java.time.LocalDateTime; @ToString(callSuper = true) public class BpmUserGroupPageReqVO extends PageParam { + @Schema(description = "编号", example = "1024") + private Long id; + @Schema(description = "组名", example = "芋道") private String name; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java index 0f89e95388..f20722a8d7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java @@ -1,19 +1,30 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; import java.time.LocalDateTime; +import java.util.Set; @Schema(description = "管理后台 - 用户组 Response VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { +public class BpmUserGroupRespVO { @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; + @Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String name; + + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") + private String description; + + @Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") + private Set userIds; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java similarity index 64% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java index efe1155c3c..1993cdba07 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java @@ -1,29 +1,27 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; - import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - import jakarta.validation.constraints.NotNull; +import lombok.*; + import java.util.Set; -/** -* 用户组 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ +@Schema(description = "管理后台 - 用户组创建/修改 Request VO") @Data -public class BpmUserGroupBaseVO { +public class BpmUserGroupSaveReqVO { + + @Schema(description = "编号", example = "1024") + private Long id; @Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") @NotNull(message = "组名不能为空") private String name; - @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") - @NotNull(message = "描述不能为空") + @Schema(description = "描述", example = "芋道源码") private String description; @Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") @NotNull(message = "成员编号数组不能为空") - private Set memberUserIds; + private Set userIds; @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "状态不能为空") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java deleted file mode 100644 index e5e2060bb7..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Schema(description = "管理后台 - 用户组精简信息 Response VO") -@Data -@NoArgsConstructor -@AllArgsConstructor -public class BpmUserGroupSimpleRespVO { - - @Schema(description = "用户组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private Long id; - - @Schema(description = "用户组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java deleted file mode 100644 index 02bb2b31c4..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import jakarta.validation.constraints.*; - -@Schema(description = "管理后台 - 用户组更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { - - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "编号不能为空") - private Long id; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmUserGroupConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmUserGroupConvert.java deleted file mode 100644 index bbf00ba524..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmUserGroupConvert.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.definition; - -import java.util.*; - -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import org.mapstruct.Mapper; -import org.mapstruct.Named; -import org.mapstruct.factory.Mappers; - -/** - * 用户组 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface BpmUserGroupConvert { - - BpmUserGroupConvert INSTANCE = Mappers.getMapper(BpmUserGroupConvert.class); - - BpmUserGroupDO convert(BpmUserGroupCreateReqVO bean); - - BpmUserGroupDO convert(BpmUserGroupUpdateReqVO bean); - - BpmUserGroupRespVO convert(BpmUserGroupDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - @Named("convertList2") - List convertList2(List list); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java index ec11681805..6e209e241c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java @@ -47,6 +47,6 @@ public class BpmUserGroupDO extends BaseDO { * 成员用户编号数组 */ @TableField(typeHandler = JsonLongSetTypeHandler.class) - private Set memberUserIds; + private Set userIds; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java index b8fa00f84d..bc161886b0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java @@ -41,7 +41,7 @@ public class BpmTaskCandidateGroupStrategy implements BpmTaskCandidateStrategy { public Set calculateUsers(DelegateExecution execution, String param) { Set groupIds = StrUtils.splitToLongSet(param); List groups = userGroupService.getUserGroupList(groupIds); - return convertSetByFlatMap(groups, BpmUserGroupDO::getMemberUserIds, Collection::stream); + return convertSetByFlatMap(groups, BpmUserGroupDO::getUserIds, Collection::stream); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java index 6ae6e06ca5..a95dc24dac 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import jakarta.validation.Valid; @@ -23,14 +22,14 @@ public interface BpmUserGroupService { * @param createReqVO 创建信息 * @return 编号 */ - Long createUserGroup(@Valid BpmUserGroupCreateReqVO createReqVO); + Long createUserGroup(@Valid BpmUserGroupSaveReqVO createReqVO); /** * 更新用户组 * * @param updateReqVO 更新信息 */ - void updateUserGroup(@Valid BpmUserGroupUpdateReqVO updateReqVO); + void updateUserGroup(@Valid BpmUserGroupSaveReqVO updateReqVO); /** * 删除用户组 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java index 2690787614..3c64891046 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java @@ -2,13 +2,10 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmUserGroupMapper; import jakarta.annotation.Resource; @@ -20,6 +17,7 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_IS_DISABLE; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS; @@ -36,20 +34,18 @@ public class BpmUserGroupServiceImpl implements BpmUserGroupService { private BpmUserGroupMapper userGroupMapper; @Override - public Long createUserGroup(BpmUserGroupCreateReqVO createReqVO) { - // 插入 - BpmUserGroupDO userGroup = BpmUserGroupConvert.INSTANCE.convert(createReqVO); + public Long createUserGroup(BpmUserGroupSaveReqVO createReqVO) { + BpmUserGroupDO userGroup = BeanUtils.toBean(createReqVO, BpmUserGroupDO.class); userGroupMapper.insert(userGroup); - // 返回 return userGroup.getId(); } @Override - public void updateUserGroup(BpmUserGroupUpdateReqVO updateReqVO) { + public void updateUserGroup(BpmUserGroupSaveReqVO updateReqVO) { // 校验存在 - this.validateUserGroupExists(updateReqVO.getId()); + validateUserGroupExists(updateReqVO.getId()); // 更新 - BpmUserGroupDO updateObj = BpmUserGroupConvert.INSTANCE.convert(updateReqVO); + BpmUserGroupDO updateObj = BeanUtils.toBean(updateReqVO, BpmUserGroupDO.class); userGroupMapper.updateById(updateObj); } @@ -63,7 +59,7 @@ public class BpmUserGroupServiceImpl implements BpmUserGroupService { private void validateUserGroupExists(Long id) { if (userGroupMapper.selectById(id) == null) { - throw ServiceExceptionUtil.exception(USER_GROUP_NOT_EXISTS); + throw exception(USER_GROUP_NOT_EXISTS); } } @@ -95,12 +91,12 @@ public class BpmUserGroupServiceImpl implements BpmUserGroupService { } // 获得用户组信息 List userGroups = userGroupMapper.selectBatchIds(ids); - Map userGroupMap = CollectionUtils.convertMap(userGroups, BpmUserGroupDO::getId); + Map userGroupMap = convertMap(userGroups, BpmUserGroupDO::getId); // 校验 ids.forEach(id -> { BpmUserGroupDO userGroup = userGroupMap.get(id); if (userGroup == null) { - throw ServiceExceptionUtil.exception(USER_GROUP_NOT_EXISTS); + throw exception(USER_GROUP_NOT_EXISTS); } if (!CommonStatusEnum.ENABLE.getStatus().equals(userGroup.getStatus())) { throw exception(USER_GROUP_IS_DISABLE, userGroup.getName()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java index 07958a51b7..8bd2c88afd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java @@ -29,8 +29,8 @@ public class BpmTaskCandidateGroupStrategyTest extends BaseMockitoUnitTest { // 准备参数 String param = "1,2"; // mock 方法 - BpmUserGroupDO userGroup1 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(11L, 12L))); - BpmUserGroupDO userGroup2 = randomPojo(BpmUserGroupDO.class, o -> o.setMemberUserIds(asSet(21L, 22L))); + BpmUserGroupDO userGroup1 = randomPojo(BpmUserGroupDO.class, o -> o.setUserIds(asSet(11L, 12L))); + BpmUserGroupDO userGroup2 = randomPojo(BpmUserGroupDO.class, o -> o.setUserIds(asSet(21L, 22L))); when(userGroupService.getUserGroupList(eq(asSet(1L, 2L)))).thenReturn(Arrays.asList(userGroup1, userGroup2)); // 调用 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java index 9aca274768..438e3193cb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.framework.test.core.util.AssertUtils; import cn.iocoder.yudao.framework.test.core.util.RandomUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; @@ -39,7 +39,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest { @Test public void testCreateUserGroup_success() { // 准备参数 - BpmUserGroupCreateReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupCreateReqVO.class); + BpmUserGroupSaveReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupSaveReqVO.class); // 调用 Long userGroupId = userGroupService.createUserGroup(reqVO); -- Gitee From ed83b912e40b2ce45c0c57297ec30fc02ed6eff3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 19 Mar 2024 19:49:45 +0800 Subject: [PATCH 0080/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=88=86=E7=B1=BB=E8=A1=A8=EF=BC=8C=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3=E7=8E=B0=E6=9C=89=E7=9A=84=20`bpm=5Fcategory`=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 9 +- .../task/BpmProcessInstanceStatusEnum.java | 12 +- yudao-module-bpm/yudao-module-bpm-biz/pom.xml | 4 + .../definition/BpmCategoryController.java | 86 +++++++++++ .../admin/definition/BpmModelController.java | 59 +++++++- .../BpmProcessDefinitionController.java | 66 +++++++-- .../vo/category/BpmCategoryPageReqVO.java | 36 +++++ .../vo/category/BpmCategoryRespVO.java | 33 +++++ .../vo/category/BpmCategorySaveReqVO.java | 34 +++++ .../definition/vo/model/BpmModelBaseVO.java | 40 ----- .../vo/model/BpmModelPageItemRespVO.java | 48 ------ .../vo/model/BpmModelPageReqVO.java | 6 +- .../definition/vo/model/BpmModelRespVO.java | 47 +++++- .../vo/model/BpmModelUpdateReqVO.java | 2 +- .../vo/model/BpmModelUpdateStateReqVO.java | 4 +- .../BpmProcessDefinitionListReqVO.java | 18 --- .../BpmProcessDefinitionPageItemRespVO.java | 22 --- .../process/BpmProcessDefinitionRespVO.java | 12 +- .../task/BpmProcessInstanceController.java | 8 +- .../BpmProcessInstanceCopyController.java | 6 +- .../BpmProcessInstanceMyPageReqVO.java | 10 +- .../BpmProcessInstancePageItemRespVO.java | 7 +- .../vo/instance/BpmProcessInstanceRespVO.java | 5 +- .../convert/definition/BpmModelConvert.java | 90 ++++++------ .../BpmProcessDefinitionConvert.java | 85 +++++------ .../task/BpmProcessInstanceConvert.java | 9 +- .../dataobject/definition/BpmCategoryDO.java | 53 +++++++ ...O.java => BpmProcessDefinitionInfoDO.java} | 9 +- .../BpmProcessInstanceCopyDO.java | 2 +- .../dal/mysql/category/BpmCategoryMapper.java | 46 ++++++ ...va => BpmProcessDefinitionInfoMapper.java} | 13 +- .../BpmProcessInstanceCopyMapper.java | 4 +- .../definition/BpmCategoryService.java | 85 +++++++++++ .../definition/BpmCategoryServiceImpl.java | 113 +++++++++++++++ .../service/definition/BpmFormService.java | 11 +- .../definition/BpmFormServiceImpl.java | 6 +- .../service/definition/BpmModelService.java | 21 +-- .../definition/BpmModelServiceImpl.java | 105 ++++++-------- .../BpmProcessDefinitionService.java | 40 +++-- .../BpmProcessDefinitionServiceImpl.java | 130 ++++------------- .../dto/BpmProcessDefinitionCreateReqDTO.java | 1 - .../task/BpmProcessInstanceCopyService.java | 2 +- .../BpmProcessInstanceCopyServiceImpl.java | 4 +- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../mapper/category/BpmCategoryMapper.xml | 12 ++ .../category/BpmCategoryServiceImplTest.java | 137 ++++++++++++++++++ 46 files changed, 1059 insertions(+), 495 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/{BpmProcessDefinitionExtDO.java => BpmProcessDefinitionInfoDO.java} (88%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/{cc => task}/BpmProcessInstanceCopyDO.java (96%) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/{BpmProcessDefinitionExtMapper.java => BpmProcessDefinitionInfoMapper.java} (36%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/{cc => task}/BpmProcessInstanceCopyMapper.java (88%) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index a689ad3e62..494e4a1b5d 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -65,7 +65,12 @@ public interface ErrorCodeConstants { ErrorCode FORM_FIELD_REPEAT = new ErrorCode(1_009_010_001, "表单项({}) 和 ({}) 使用了相同的字段名({})"); // ========== 用户组模块 1-009-011-000 ========== - ErrorCode USER_GROUP_NOT_EXISTS = new ErrorCode(1_009_011_000, "用户组不存在"); - ErrorCode USER_GROUP_IS_DISABLE = new ErrorCode(1_009_011_001, "名字为【{}】的用户组已被禁用"); + ErrorCode USER_GROUP_NOT_EXISTS = new ErrorCode(1_009_011_000, "用户分组不存在"); + ErrorCode USER_GROUP_IS_DISABLE = new ErrorCode(1_009_011_001, "名字为【{}】的用户分组已被禁用"); + + // ========== 用户组模块 1-009-012-000 ========== + ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(1_009_012_000, "流程分类不存在"); + ErrorCode CATEGORY_NAME_DUPLICATE = new ErrorCode(1_009_012_001, "流程分类名字【{}】重复"); + ErrorCode CATEGORY_CODE_DUPLICATE = new ErrorCode(1_009_012_002, "流程分类编码【{}】重复"); } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java index b8c05ad98c..82a4119b57 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java @@ -1,8 +1,11 @@ package cn.iocoder.yudao.module.bpm.enums.task; +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; +import java.util.Arrays; + /** * 流程实例 ProcessInstance 的状态 * @@ -10,13 +13,15 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum BpmProcessInstanceStatusEnum { +public enum BpmProcessInstanceStatusEnum implements IntArrayValuable { RUNNING(1, "审批中"), APPROVE(2, "审批通过"), REJECT(3, "审批不通过"), CANCEL(4, "已取消"); + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray(); + /** * 状态 */ @@ -26,4 +31,9 @@ public enum BpmProcessInstanceStatusEnum { */ private final String desc; + @Override + public int[] array() { + return new int[0]; + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml index f1ac4c0ee8..1a4b410e88 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml +++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml @@ -70,5 +70,9 @@ yudao-spring-boot-starter-flowable ${revision} + + cn.iocoder.boot + yudao-spring-boot-starter-excel + diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java new file mode 100644 index 0000000000..322666615b --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java @@ -0,0 +1,86 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.Comparator; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; + +@Tag(name = "管理后台 - BPM 流程分类") +@RestController +@RequestMapping("/bpm/category") +@Validated +public class BpmCategoryController { + + @Resource + private BpmCategoryService categoryService; + + @PostMapping("/create") + @Operation(summary = "创建流程分类") + @PreAuthorize("@ss.hasPermission('bpm:category:create')") + public CommonResult createCategory(@Valid @RequestBody BpmCategorySaveReqVO createReqVO) { + return success(categoryService.createCategory(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新流程分类") + @PreAuthorize("@ss.hasPermission('bpm:category:update')") + public CommonResult updateCategory(@Valid @RequestBody BpmCategorySaveReqVO updateReqVO) { + categoryService.updateCategory(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除流程分类") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:category:delete')") + public CommonResult deleteCategory(@RequestParam("id") Long id) { + categoryService.deleteCategory(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得流程分类") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bpm:category:query')") + public CommonResult getCategory(@RequestParam("id") Long id) { + BpmCategoryDO category = categoryService.getCategory(id); + return success(BeanUtils.toBean(category, BpmCategoryRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得流程分类分页") + @PreAuthorize("@ss.hasPermission('bpm:category:query')") + public CommonResult> getCategoryPage(@Valid BpmCategoryPageReqVO pageReqVO) { + PageResult pageResult = categoryService.getCategoryPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BpmCategoryRespVO.class)); + } + + @GetMapping("/simple-list") + @Operation(summary = "获取流程分类的精简信息列表", description = "只包含被开启的分类,主要用于前端的下拉选项") + public CommonResult> getCategorySimpleList() { + List list = categoryService.getCategoryListByStatus(CommonStatusEnum.ENABLE.getStatus()); + list.sort(Comparator.comparingInt(BpmCategoryDO::getSort)); + return success(convertList(list, category -> new BpmCategoryRespVO().setId(category.getId()) + .setName(category.getName()).setCode(category.getCode()))); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index 4e7195ccdd..4143076fff 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -1,23 +1,41 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.io.IoUtils; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; +import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; +import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; +import org.flowable.engine.repository.Deployment; +import org.flowable.engine.repository.Model; +import org.flowable.engine.repository.ProcessDefinition; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @Tag(name = "管理后台 - 流程模型") @RestController @@ -27,11 +45,39 @@ public class BpmModelController { @Resource private BpmModelService modelService; + @Resource + private BpmFormService formService; + @Resource + private BpmCategoryService categoryService; + @Resource + private BpmProcessDefinitionService processDefinitionService; @GetMapping("/page") @Operation(summary = "获得模型分页") - public CommonResult> getModelPage(BpmModelPageReqVO pageVO) { - return success(modelService.getModelPage(pageVO)); + public CommonResult> getModelPage(BpmModelPageReqVO pageVO) { + PageResult pageResult = modelService.getModelPage(pageVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty(pageResult.getTotal())); + } + + // 拼接数据 + // 获得 Form 表单 + Set formIds = convertSet(pageResult.getList(), model -> { + BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + return metaInfo != null ? metaInfo.getFormId() : null; + }); + Map formMap = formService.getFormMap(formIds); + // 获得 Category Map + Map categoryMap = categoryService.getCategoryMap( + convertSet(pageResult.getList(), Model::getCategory)); + // 获得 Deployment Map + Set deploymentIds = new HashSet<>(); + pageResult.getList().forEach(model -> CollectionUtils.addIfNotNull(deploymentIds, model.getDeploymentId())); + Map deploymentMap = processDefinitionService.getDeploymentMap(deploymentIds); + // 获得 ProcessDefinition Map + List processDefinitions = processDefinitionService.getProcessDefinitionListByDeploymentIds(deploymentIds); + Map processDefinitionMap = convertMap(processDefinitions, ProcessDefinition::getDeploymentId); + return success(BpmModelConvert.INSTANCE.buildModelPage(pageResult, formMap, categoryMap, deploymentMap, processDefinitionMap)); } @GetMapping("/get") @@ -39,8 +85,12 @@ public class BpmModelController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:model:query')") public CommonResult getModel(@RequestParam("id") String id) { - BpmModelRespVO model = modelService.getModel(id); - return success(model); + Model model = modelService.getModel(id); + if (model == null) { + return null; + } + byte[] bpmnBytes = modelService.getModelBpmnXML(id); + return success(BpmModelConvert.INSTANCE.buildModel(model, bpmnBytes)); } @PostMapping("/create") @@ -93,4 +143,5 @@ public class BpmModelController { modelService.deleteModel(id); return success(true); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java index 0c0fcd7d34..ff3c37b08d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java @@ -1,15 +1,23 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; +import cn.iocoder.yudao.module.bpm.convert.definition.BpmProcessDefinitionConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; +import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import org.flowable.engine.repository.Deployment; +import org.flowable.engine.repository.ProcessDefinition; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -17,11 +25,12 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; - +import java.util.Collections; import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @Tag(name = "管理后台 - 流程定义") @RestController @@ -30,22 +39,54 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; public class BpmProcessDefinitionController { @Resource - private BpmProcessDefinitionService bpmDefinitionService; + private BpmProcessDefinitionService processDefinitionService; + @Resource + private BpmFormService formService; + @Resource + private BpmCategoryService categoryService; @GetMapping("/page") @Operation(summary = "获得流程定义分页") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") - public CommonResult> getProcessDefinitionPage( + public CommonResult> getProcessDefinitionPage( BpmProcessDefinitionPageReqVO pageReqVO) { - return success(bpmDefinitionService.getProcessDefinitionPage(pageReqVO)); + PageResult pageResult = processDefinitionService.getProcessDefinitionPage(pageReqVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty(pageResult.getTotal())); + } + + // 获得 Category Map + Map categoryMap = categoryService.getCategoryMap( + convertSet(pageResult.getList(), ProcessDefinition::getCategory)); + // 获得 Deployment Map + Map deploymentMap = processDefinitionService.getDeploymentMap( + convertSet(pageResult.getList(), ProcessDefinition::getDeploymentId)); + // 获得 BpmProcessDefinitionInfoDO Map + Map processDefinitionMap = processDefinitionService.getProcessDefinitionInfoMap( + convertSet(pageResult.getList(), ProcessDefinition::getId)); + // 获得 Form Map + Map formMap = formService.getFormMap( + convertSet(processDefinitionMap.values(), BpmProcessDefinitionInfoDO::getFormId)); + return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinitionPage( + pageResult, deploymentMap, processDefinitionMap, formMap, categoryMap)); } @GetMapping ("/list") @Operation(summary = "获得流程定义列表") + @Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举 @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") public CommonResult> getProcessDefinitionList( - BpmProcessDefinitionListReqVO listReqVO) { - return success(bpmDefinitionService.getProcessDefinitionList(listReqVO)); + @RequestParam("suspensionState") Integer suspensionState) { + List list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState); + if (CollUtil.isEmpty(list)) { + return success(Collections.emptyList()); + } + + // 获得 BpmProcessDefinitionInfoDO Map + Map processDefinitionMap = processDefinitionService.getProcessDefinitionInfoMap( + convertSet(list, ProcessDefinition::getId)); + return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinitionList( + list, null, processDefinitionMap, null, null)); } @GetMapping ("/get-bpmn-xml") @@ -53,7 +94,8 @@ public class BpmProcessDefinitionController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") public CommonResult getProcessDefinitionBpmnXML(@RequestParam("id") String id) { - String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); + String bpmnXML = processDefinitionService.getProcessDefinitionBpmnXML(id); return success(bpmnXML); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java new file mode 100644 index 0000000000..ea3c2cb6cd --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - BPM 流程分类分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BpmCategoryPageReqVO extends PageParam { + + @Schema(description = "分类名", example = "王五") + private String name; + + @Schema(description = "分类标志", example = "OA") + private String code; + + @Schema(description = "分类状态", example = "1") + @InEnum(CommonStatusEnum.class) + private Integer status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java new file mode 100644 index 0000000000..7ada55a1d9 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - BPM 流程分类 Response VO") +@Data +public class BpmCategoryRespVO { + + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167") + private Long id; + + @Schema(description = "分类名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + private String name; + + @Schema(description = "分类标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "OA") + private String code; + + @Schema(description = "分类描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") + private String description; + + @Schema(description = "分类状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + + @Schema(description = "分类排序", requiredMode = Schema.RequiredMode.REQUIRED) + private Integer sort; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java new file mode 100644 index 0000000000..352cf690b4 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - BPM 流程分类新增/修改 Request VO") +@Data +public class BpmCategorySaveReqVO { + + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167") + private Long id; + + @Schema(description = "分类名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "分类名不能为空") + private String name; + + @Schema(description = "分类标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "OA") + @NotEmpty(message = "分类标志不能为空") + private String code; + + @Schema(description = "分类状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "分类状态不能为空") + @InEnum(CommonStatusEnum.class) + private Integer status; + + @Schema(description = "分类排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "分类排序不能为空") + private Integer sort; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java deleted file mode 100644 index c0b1443cbe..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotEmpty; - -/** -* 流程模型 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ -@Data -public class BpmModelBaseVO { - - @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao") - @NotEmpty(message = "流程标识不能为空") - private String key; - - @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - @NotEmpty(message = "流程名称不能为空") - private String name; - - @Schema(description = "流程描述", example = "我是描述") - private String description; - - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") - @NotEmpty(message = "流程分类不能为空") - private String category; - - @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") - private Integer formType; - @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") - private Long formId; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/create") - private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/view") - private String formCustomViewPath; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java deleted file mode 100644 index 4fc5b61d49..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java +++ /dev/null @@ -1,48 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 流程模型的分页的每一项 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmModelPageItemRespVO extends BpmModelBaseVO { - - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "表单名字", example = "请假表单") - private String formName; - - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime createTime; - - /** - * 最新部署的流程定义 - */ - private ProcessDefinition processDefinition; - - @Schema(description = "流程定义") - @Data - public static class ProcessDefinition { - - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer version; - - @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime deploymentTime; - - @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer suspensionState; - - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java index 15283208e4..86766f1878 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java @@ -13,13 +13,13 @@ import lombok.ToString; @ToString(callSuper = true) public class BpmModelPageReqVO extends PageParam { - @Schema(description = "标识-精准匹配", example = "process1641042089407") + @Schema(description = "标识,精准匹配", example = "process1641042089407") private String key; - @Schema(description = "名字-模糊匹配", example = "芋道") + @Schema(description = "名字,模糊匹配", example = "芋道") private String name; - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", example = "1") private String category; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java index df4abf750b..c083933596 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java @@ -1,25 +1,56 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; import java.time.LocalDateTime; -@Schema(description = "管理后台 - 流程模型的创建 Request VO") +@Schema(description = "管理后台 - 流程模型 Response VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmModelRespVO extends BpmModelBaseVO { +public class BpmModelRespVO { @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String id; - @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) - private String bpmnXml; + @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao") + private String key; + + @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String name; + + @Schema(description = "流程描述", example = "我是描述") + private String description; + + @Schema(description = "流程分类编码", example = "1") + private String category; + @Schema(description = "流程分类名字", example = "请假") + private String categoryName; + + @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") + private Integer formType; + + @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") + private Long formId; + @Schema(description = "表单名字", example = "请假表单") + private String formName; + + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", + example = "/bpm/oa/leave/create") + private String formCustomCreatePath; + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", + example = "/bpm/oa/leave/view") + private String formCustomViewPath; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; + @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) + private String bpmnXml; + + /** + * 最新部署的流程定义 + */ + private BpmProcessDefinitionRespVO processDefinition; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java index 9cfb7bbbe3..cc2420b289 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java @@ -19,7 +19,7 @@ public class BpmModelUpdateReqVO { @Schema(description = "流程描述", example = "我是描述") private String description; - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", example = "1") private String category; @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java index 4d583dac23..7c5a356a24 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java @@ -13,8 +13,8 @@ public class BpmModelUpdateStateReqVO { @NotNull(message = "编号不能为空") private String id; - @Schema(description = "状态-见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "状态不能为空") - private Integer state; + private Integer state; // 参见 Flowable SuspensionState 枚举 } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java deleted file mode 100644 index 35243d2ac7..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@Schema(description = "管理后台 - 流程定义列表 Request VO") -@Data -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) -public class BpmProcessDefinitionListReqVO extends PageParam { - - @Schema(description = "中断状态-参见 SuspensionState 枚举", example = "1") - private Integer suspensionState; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java deleted file mode 100644 index 901c8aa770..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 流程定义的分页的每一项 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { - - @Schema(description = "表单名字", example = "请假表单") - private String formName; - - @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime deploymentTime; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index c649c8219f..bf015920ee 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import jakarta.validation.constraints.NotEmpty; + +import java.time.LocalDateTime; import java.util.List; @Schema(description = "管理后台 - 流程定义 Response VO") @@ -23,14 +25,17 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "流程描述", example = "我是描述") private String description; - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") - @NotEmpty(message = "流程分类不能为空") + @Schema(description = "流程分类", example = "1") private String category; + @Schema(description = "流程分类名字", example = "请假") + private String categoryName; @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; + @Schema(description = "表单名字", example = "请假表单") + private String formName; @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) private String formConf; @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) @@ -45,4 +50,7 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer suspensionState; + @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取 + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index c22ee3c6b8..05c8458274 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; @@ -40,6 +42,8 @@ public class BpmProcessInstanceController { private BpmTaskService taskService; @Resource private BpmProcessDefinitionService processDefinitionService; + @Resource + private BpmCategoryService categoryService; @GetMapping("/my-page") @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") @@ -56,7 +60,9 @@ public class BpmProcessInstanceController { convertList(pageResult.getList(), HistoricProcessInstance::getId)); Map processDefinitionMap = processDefinitionService.getProcessDefinitionMap( convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)); - return success(BpmProcessInstanceConvert.INSTANCE.convertPage(pageResult, processDefinitionMap, taskMap)); + Map categoryMap = categoryService.getCategoryMap( + convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory)); + return success(BpmProcessInstanceConvert.INSTANCE.convertPage(pageResult, processDefinitionMap, categoryMap, taskMap)); } @PostMapping("/create") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java index e86f013151..e9f0eb4441 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java @@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.cc.BpmProcessInstanceCopyRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceCopyService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; @@ -44,7 +44,7 @@ public class BpmProcessInstanceCopyController { @Resource private BpmProcessInstanceService processInstanceService; @Resource - private BpmTaskService bpmTaskService; + private BpmTaskService taskService; @Resource private AdminUserApi adminUserApi; @@ -61,7 +61,7 @@ public class BpmProcessInstanceCopyController { } // 拼接返回 - Map taskNameMap = bpmTaskService.getTaskNameByTaskIds( + Map taskNameMap = taskService.getTaskNameByTaskIds( convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getTaskId)); Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId)); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java index 5b5d9fb26d..4945b2b9ad 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -23,13 +25,11 @@ public class BpmProcessInstanceMyPageReqVO extends PageParam { @Schema(description = "流程定义的编号", example = "2048") private String processDefinitionId; - @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态", example = "1") + @InEnum(BpmProcessInstanceStatusEnum.class) private Integer status; - @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", example = "2") - private Integer result; - - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", example = "1") private String category; @Schema(description = "创建时间") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java index 4cfaf171d5..f1763a27f5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java @@ -6,6 +6,7 @@ import lombok.Data; import java.time.LocalDateTime; import java.util.List; +// TODO @芋艿:是不是要融合? @Schema(description = "管理后台 - 流程实例的分页 Item Response VO") @Data public class BpmProcessInstancePageItemRespVO { @@ -19,10 +20,12 @@ public class BpmProcessInstancePageItemRespVO { @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private String processDefinitionId; - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String category; + @Schema(description = "流程分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "请假") + private String categoryName; - @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index faa770c473..e0410e6be8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -17,15 +17,12 @@ public class BpmProcessInstanceRespVO { @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") private String name; - @Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String category; @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 - @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private Integer result; - @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java index 9f79032f60..a0abde8c61 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java @@ -1,10 +1,17 @@ package cn.iocoder.yudao.module.bpm.convert.definition; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModeImportReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; @@ -30,57 +37,61 @@ public interface BpmModelConvert { BpmModelConvert INSTANCE = Mappers.getMapper(BpmModelConvert.class); - default List convertList(List list, Map formMap, - Map deploymentMap, - Map processDefinitionMap) { - return CollectionUtils.convertList(list, model -> { + default PageResult buildModelPage(PageResult pageResult, + Map formMap, + Map categoryMap, Map deploymentMap, + Map processDefinitionMap) { + List list = CollectionUtils.convertList(pageResult.getList(), model -> { BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); BpmFormDO form = metaInfo != null ? formMap.get(metaInfo.getFormId()) : null; + BpmCategoryDO category = categoryMap.get(model.getCategory()); Deployment deployment = model.getDeploymentId() != null ? deploymentMap.get(model.getDeploymentId()) : null; ProcessDefinition processDefinition = model.getDeploymentId() != null ? processDefinitionMap.get(model.getDeploymentId()) : null; - return convert(model, form, deployment, processDefinition); + return buildModel0(model, metaInfo, form, category, deployment, processDefinition); }); + return new PageResult<>(list, pageResult.getTotal()); } - default BpmModelPageItemRespVO convert(Model model, BpmFormDO form, Deployment deployment, ProcessDefinition processDefinition) { - BpmModelPageItemRespVO modelRespVO = new BpmModelPageItemRespVO(); - modelRespVO.setId(model.getId()); - modelRespVO.setCreateTime(DateUtils.of(model.getCreateTime())); - // 通用 copy - copyTo(model, modelRespVO); + default BpmModelRespVO buildModel(Model model, + byte[] bpmnBytes) { + BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + BpmModelRespVO modelVO = buildModel0(model, metaInfo, null, null, null, null); + modelVO.setBpmnXml(new String(bpmnBytes)); + return modelVO; + } + + default BpmModelRespVO buildModel0(Model model, + BpmModelMetaInfoRespDTO metaInfo, BpmFormDO form, BpmCategoryDO category, + Deployment deployment, ProcessDefinition processDefinition) { + BpmModelRespVO modelRespVO = new BpmModelRespVO().setId(model.getId()).setName(model.getName()) + .setKey(model.getKey()).setCategory(model.getCategory()) + .setCreateTime(DateUtils.of(model.getCreateTime())); // Form + if (metaInfo != null) { + modelRespVO.setFormType(metaInfo.getFormType()).setFormId(metaInfo.getFormId()) + .setFormCustomCreatePath(metaInfo.getFormCustomCreatePath()) + .setFormCustomViewPath(metaInfo.getFormCustomViewPath()); + modelRespVO.setDescription(metaInfo.getDescription()); + } if (form != null) { - modelRespVO.setFormId(form.getId()); - modelRespVO.setFormName(form.getName()); + modelRespVO.setFormId(form.getId()).setFormName(form.getName()); + } + // Category + if (category != null) { + modelRespVO.setCategoryName(category.getName()); } // ProcessDefinition - modelRespVO.setProcessDefinition(this.convert(processDefinition)); - if (modelRespVO.getProcessDefinition() != null) { + if (processDefinition != null) { + modelRespVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); modelRespVO.getProcessDefinition().setSuspensionState(processDefinition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); - modelRespVO.getProcessDefinition().setDeploymentTime(DateUtils.of(deployment.getDeploymentTime())); + if (deployment != null) { + modelRespVO.getProcessDefinition().setDeploymentTime(DateUtils.of(deployment.getDeploymentTime())); + } } return modelRespVO; } - default BpmModelRespVO convert(Model model) { - BpmModelRespVO modelRespVO = new BpmModelRespVO(); - modelRespVO.setId(model.getId()); - modelRespVO.setCreateTime(DateUtils.of(model.getCreateTime())); - // 通用 copy - copyTo(model, modelRespVO); - return modelRespVO; - } - - default void copyTo(Model model, BpmModelBaseVO to) { - to.setName(model.getName()); - to.setKey(model.getKey()); - to.setCategory(model.getCategory()); - // metaInfo - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); - copyTo(metaInfo, to); - } - BpmModelCreateReqVO convert(BpmModeImportReqVO bean); default BpmProcessDefinitionCreateReqDTO convert2(Model model, BpmFormDO form) { @@ -102,18 +113,14 @@ public interface BpmModelConvert { void copyTo(BpmModelMetaInfoRespDTO from, @MappingTarget BpmProcessDefinitionCreateReqDTO to); - void copyTo(BpmModelMetaInfoRespDTO from, @MappingTarget BpmModelBaseVO to); - - BpmModelPageItemRespVO.ProcessDefinition convert(ProcessDefinition bean); - - default void copy(Model model, BpmModelCreateReqVO bean) { + default void copyToCreateModel(Model model, BpmModelCreateReqVO bean) { model.setName(bean.getName()); model.setKey(bean.getKey()); model.setMetaInfo(buildMetaInfoStr(null, bean.getDescription(), null, null, null, null)); } - default void copy(Model model, BpmModelUpdateReqVO bean) { + default void copyToUpdateModel(Model model, BpmModelUpdateReqVO bean) { model.setName(bean.getName()); model.setCategory(bean.getCategory()); model.setMetaInfo(buildMetaInfoStr(JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class), @@ -138,4 +145,5 @@ public interface BpmModelConvert { } return JsonUtils.toJsonString(metaInfo); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java index b52b48ee9e..f1e9451788 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java @@ -1,12 +1,15 @@ package cn.iocoder.yudao.module.bpm.convert.definition; import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.date.DateUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.repository.Deployment; @@ -14,7 +17,6 @@ import org.flowable.engine.repository.ProcessDefinition; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.MappingTarget; -import org.mapstruct.Named; import org.mapstruct.factory.Mappers; import java.util.List; @@ -30,55 +32,46 @@ public interface BpmProcessDefinitionConvert { BpmProcessDefinitionConvert INSTANCE = Mappers.getMapper(BpmProcessDefinitionConvert.class); - BpmProcessDefinitionPageItemRespVO convert(ProcessDefinition bean); - BpmProcessDefinitionExtDO convert2(BpmProcessDefinitionCreateReqDTO bean); - - default List convertList(List list, Map deploymentMap, - Map processDefinitionDOMap, Map formMap) { - return CollectionUtils.convertList(list, definition -> { - Deployment deployment = definition.getDeploymentId() != null ? deploymentMap.get(definition.getDeploymentId()) : null; - BpmProcessDefinitionExtDO definitionDO = processDefinitionDOMap.get(definition.getId()); - BpmFormDO form = definitionDO != null ? formMap.get(definitionDO.getFormId()) : null; - return convert(definition, deployment, definitionDO, form); - }); + default PageResult buildProcessDefinitionPage(PageResult page, + Map deploymentMap, + Map processDefinitionInfoMap, + Map formMap, + Map categoryMap) { + List list = buildProcessDefinitionList(page.getList(), deploymentMap, processDefinitionInfoMap, formMap, categoryMap); + return new PageResult<>(list, page.getTotal()); } - default List convertList3(List list, - Map processDefinitionDOMap) { - return CollectionUtils.convertList(list, processDefinition -> { - BpmProcessDefinitionRespVO respVO = convert3(processDefinition); - BpmProcessDefinitionExtDO processDefinitionExtDO = processDefinitionDOMap.get(processDefinition.getId()); - // 复制通用属性 - copyTo(processDefinitionExtDO, respVO); + default List buildProcessDefinitionList(List list, + Map deploymentMap, + Map processDefinitionInfoMap, + Map formMap, + Map categoryMap) { + return CollectionUtils.convertList(list, definition -> { + BpmProcessDefinitionRespVO respVO = BeanUtils.toBean(definition, BpmProcessDefinitionRespVO.class); + respVO.setSuspensionState(definition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); + // Deployment + MapUtils.findAndThen(deploymentMap, definition.getDeploymentId(), + deployment -> respVO.setDeploymentTime(LocalDateTimeUtil.of(deployment.getDeploymentTime()))); + // BpmProcessDefinitionInfoDO + BpmProcessDefinitionInfoDO processDefinitionInfo = MapUtil.get(processDefinitionInfoMap, definition.getId(), BpmProcessDefinitionInfoDO.class); + if (processDefinitionInfo != null) { + copyTo(processDefinitionInfo, respVO); + // Form + BpmFormDO form = MapUtil.get(formMap, processDefinitionInfo.getFormId(), BpmFormDO.class); + if (form != null) { + respVO.setFormName(form.getName()); + } + } + // Category + MapUtils.findAndThen(categoryMap, definition.getCategory(), category -> respVO.setCategoryName(category.getName())); return respVO; }); } - @Mapping(source = "suspended", target = "suspensionState", qualifiedByName = "convertSuspendedToSuspensionState") - BpmProcessDefinitionRespVO convert3(ProcessDefinition bean); - - @Named("convertSuspendedToSuspensionState") - default Integer convertSuspendedToSuspensionState(boolean suspended) { - return suspended ? SuspensionState.SUSPENDED.getStateCode() : - SuspensionState.ACTIVE.getStateCode(); - } - - default BpmProcessDefinitionPageItemRespVO convert(ProcessDefinition bean, Deployment deployment, - BpmProcessDefinitionExtDO processDefinitionExtDO, BpmFormDO form) { - BpmProcessDefinitionPageItemRespVO respVO = convert(bean); - respVO.setSuspensionState(bean.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); - if (deployment != null) { - respVO.setDeploymentTime(LocalDateTimeUtil.of(deployment.getDeploymentTime())); - } - if (form != null) { - respVO.setFormName(form.getName()); - } - // 复制通用属性 - copyTo(processDefinitionExtDO, respVO); - return respVO; - } + BpmProcessDefinitionInfoDO convert2(BpmProcessDefinitionCreateReqDTO bean); @Mapping(source = "from.id", target = "to.id", ignore = true) - void copyTo(BpmProcessDefinitionExtDO from, @MappingTarget BpmProcessDefinitionRespVO to); + void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to); + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 11166c62e3..a7c621590e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -7,7 +7,8 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO; @@ -38,6 +39,7 @@ public interface BpmProcessInstanceConvert { default PageResult convertPage(PageResult pageResult, Map processDefinitionMap, + Map categoryMap, Map> taskMap) { PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstancePageItemRespVO.class); for (int i = 0; i < pageResult.getList().size(); i++) { @@ -45,13 +47,14 @@ public interface BpmProcessInstanceConvert { respVO.setStatus((Integer) pageResult.getList().get(i).getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(), processDefinition -> respVO.setCategory(processDefinition.getCategory())); + MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstancePageItemRespVO.Task.class)); } return vpPageResult; } default BpmProcessInstanceRespVO convert2(HistoricProcessInstance processInstance, - ProcessDefinition processDefinition, BpmProcessDefinitionExtDO processDefinitionExt, + ProcessDefinition processDefinition, BpmProcessDefinitionInfoDO processDefinitionExt, String bpmnXml, AdminUserRespDTO startUser, DeptRespDTO dept) { BpmProcessInstanceRespVO respVO = convert2(processInstance); respVO.setStatus((Integer) processInstance.getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); @@ -75,7 +78,7 @@ public interface BpmProcessInstanceConvert { BpmProcessInstanceRespVO.ProcessDefinition convert2(ProcessDefinition bean); @Mapping(source = "from.id", target = "to.id", ignore = true) - void copyTo(BpmProcessDefinitionExtDO from, @MappingTarget BpmProcessInstanceRespVO.ProcessDefinition to); + void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessInstanceRespVO.ProcessDefinition to); BpmProcessInstanceRespVO.User convert2(AdminUserRespDTO bean); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java new file mode 100644 index 0000000000..2fe0963bb5 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java @@ -0,0 +1,53 @@ +package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * BPM 流程分类 DO + * + * @author 芋道源码 + */ +@TableName("bpm_category") +@KeySequence("bpm_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BpmCategoryDO extends BaseDO { + + /** + * 分类编号 + */ + @TableId + private Long id; + /** + * 分类名 + */ + private String name; + /** + * 分类标志 + */ + private String code; + /** + * 分类描述 + */ + private String description; + /** + * 分类状态 + * + * 枚举 {@link TODO common_status 对应的类} + */ + private Integer status; + /** + * 分类排序 + */ + private Integer sort; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionExtDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java similarity index 88% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionExtDO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java index 57abc0b99b..5f94b3b95d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionExtDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java @@ -11,19 +11,19 @@ import lombok.*; import java.util.List; /** - * Bpm 流程定义的拓展表 - * 主要解决 Activiti {@link ProcessDefinition} 不支持拓展字段,所以新建拓展表 + * Bpm 流程定义的拓信息 + * 主要解决 Flowable {@link org.flowable.engine.repository.ProcessDefinition} 不支持拓展字段,所以新建该表 * * @author 芋道源码 */ -@TableName(value = "bpm_process_definition_ext", autoResultMap = true) +@TableName(value = "bpm_process_definition_info", autoResultMap = true) @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class BpmProcessDefinitionExtDO extends BaseDO { +public class BpmProcessDefinitionInfoDO extends BaseDO { /** * 编号 @@ -86,5 +86,4 @@ public class BpmProcessDefinitionExtDO extends BaseDO { */ private String formCustomViewPath; - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java similarity index 96% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java index 99bca609d6..fe3b28de28 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/cc/BpmProcessInstanceCopyDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.dal.dataobject.cc; +package cn.iocoder.yudao.module.bpm.dal.dataobject.task; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java new file mode 100644 index 0000000000..888856a45a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.bpm.dal.mysql.category; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.Collection; +import java.util.List; + +/** + * BPM 流程分类 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface BpmCategoryMapper extends BaseMapperX { + + default PageResult selectPage(BpmCategoryPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BpmCategoryDO::getName, reqVO.getName()) + .eqIfPresent(BpmCategoryDO::getCode, reqVO.getCode()) + .eqIfPresent(BpmCategoryDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(BpmCategoryDO::getCreateTime, reqVO.getCreateTime()) + .orderByAsc(BpmCategoryDO::getSort)); + } + + default BpmCategoryDO selectByName(String name) { + return selectOne(BpmCategoryDO::getName, name); + } + + default BpmCategoryDO selectByCode(String code) { + return selectOne(BpmCategoryDO::getCode, code); + } + + default List selectListByCode(Collection codes) { + return selectList(BpmCategoryDO::getCode, codes); + } + + default List selectListByStatus(Integer status) { + return selectList(BpmCategoryDO::getStatus, status); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java similarity index 36% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java index 3ff53f2d9c..419d638f8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.definition; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import org.apache.ibatis.annotations.Mapper; @@ -9,14 +8,14 @@ import java.util.Collection; import java.util.List; @Mapper -public interface BpmProcessDefinitionExtMapper extends BaseMapperX { +public interface BpmProcessDefinitionInfoMapper extends BaseMapperX { - default List selectListByProcessDefinitionIds(Collection processDefinitionIds) { - return selectList("process_definition_id", processDefinitionIds); + default List selectListByProcessDefinitionIds(Collection processDefinitionIds) { + return selectList(BpmProcessDefinitionInfoDO::getProcessDefinitionId, processDefinitionIds); } - default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) { - return selectOne("process_definition_id", processDefinitionId); + default BpmProcessDefinitionInfoDO selectByProcessDefinitionId(String processDefinitionId) { + return selectOne(BpmProcessDefinitionInfoDO::getProcessDefinitionId, processDefinitionId); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java similarity index 88% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java index 2179525e00..c5ec50f659 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/cc/BpmProcessInstanceCopyMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.bpm.dal.mysql.cc; +package cn.iocoder.yudao.module.bpm.dal.mysql.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; import org.apache.ibatis.annotations.Mapper; @Mapper diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java new file mode 100644 index 0000000000..a61b132b5e --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import jakarta.validation.Valid; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; + +/** + * BPM 流程分类 Service 接口 + * + * @author 芋道源码 + */ +public interface BpmCategoryService { + + /** + * 创建流程分类 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createCategory(@Valid BpmCategorySaveReqVO createReqVO); + + /** + * 更新流程分类 + * + * @param updateReqVO 更新信息 + */ + void updateCategory(@Valid BpmCategorySaveReqVO updateReqVO); + + /** + * 删除流程分类 + * + * @param id 编号 + */ + void deleteCategory(Long id); + + /** + * 获得流程分类 + * + * @param id 编号 + * @return BPM 流程分类 + */ + BpmCategoryDO getCategory(Long id); + + /** + * 获得流程分类分页 + * + * @param pageReqVO 分页查询 + * @return 流程分类分页 + */ + PageResult getCategoryPage(BpmCategoryPageReqVO pageReqVO); + + /** + * 获得流程分类 Map,基于指定编码 + * + * @param codes 编号数组 + * @return 流程分类 Map + */ + default Map getCategoryMap(Collection codes) { + return convertMap(getCategoryListByCode(codes), BpmCategoryDO::getCode); + } + + /** + * 获得流程分类列表,基于指定编码 + * + * @return 流程分类列表 + */ + List getCategoryListByCode(Collection codes); + + /** + * 获得流程分类列表,基于指定状态 + * + * @param status 状态 + * @return 流程分类列表 + */ + List getCategoryListByStatus(Integer status); + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java new file mode 100644 index 0000000000..8db37a46e4 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java @@ -0,0 +1,113 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.bpm.dal.mysql.category.BpmCategoryMapper; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; + +/** + * BPM 流程分类 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class BpmCategoryServiceImpl implements BpmCategoryService { + + @Resource + private BpmCategoryMapper bpmCategoryMapper; + + @Override + public Long createCategory(BpmCategorySaveReqVO createReqVO) { + // 校验唯一 + validateCategoryNameUnique(createReqVO); + validateCategoryCodeUnique(createReqVO); + // 插入 + BpmCategoryDO category = BeanUtils.toBean(createReqVO, BpmCategoryDO.class); + bpmCategoryMapper.insert(category); + return category.getId(); + } + + @Override + public void updateCategory(BpmCategorySaveReqVO updateReqVO) { + // 校验存在 + validateCategoryExists(updateReqVO.getId()); + validateCategoryNameUnique(updateReqVO); + validateCategoryCodeUnique(updateReqVO); + // 更新 + BpmCategoryDO updateObj = BeanUtils.toBean(updateReqVO, BpmCategoryDO.class); + bpmCategoryMapper.updateById(updateObj); + } + + private void validateCategoryNameUnique(BpmCategorySaveReqVO updateReqVO) { + BpmCategoryDO category = bpmCategoryMapper.selectByName(updateReqVO.getName()); + if (category == null + || ObjUtil.equal(category.getId(), updateReqVO.getId())) { + return; + } + throw exception(CATEGORY_NAME_DUPLICATE, updateReqVO.getName()); + } + + private void validateCategoryCodeUnique(BpmCategorySaveReqVO updateReqVO) { + BpmCategoryDO category = bpmCategoryMapper.selectByCode(updateReqVO.getCode()); + if (category == null + || ObjUtil.equal(category.getId(), updateReqVO.getId())) { + return; + } + throw exception(CATEGORY_CODE_DUPLICATE, updateReqVO.getCode()); + } + + @Override + public void deleteCategory(Long id) { + // 校验存在 + validateCategoryExists(id); + // 删除 + bpmCategoryMapper.deleteById(id); + } + + private void validateCategoryExists(Long id) { + if (bpmCategoryMapper.selectById(id) == null) { + throw exception(CATEGORY_NOT_EXISTS); + } + } + + @Override + public BpmCategoryDO getCategory(Long id) { + return bpmCategoryMapper.selectById(id); + } + + @Override + public PageResult getCategoryPage(BpmCategoryPageReqVO pageReqVO) { + return bpmCategoryMapper.selectPage(pageReqVO); + } + + @Override + public List getCategoryListByCode(Collection codes) { + if (CollUtil.isEmpty(codes)) { + return Collections.emptyList(); + } + return bpmCategoryMapper.selectListByCode(codes); + } + + @Override + public List getCategoryListByStatus(Integer status) { + return bpmCategoryMapper.selectListByStatus(status); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java index dd618226e5..9c61ae4272 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java @@ -1,16 +1,14 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; - import jakarta.validation.Valid; + import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Map; @@ -74,9 +72,6 @@ public interface BpmFormService { * @return 动态表单 Map */ default Map getFormMap(Collection ids) { - if (CollUtil.isEmpty(ids)) { - return Collections.emptyMap(); - } return CollectionUtils.convertMap(this.getFormList(ids), BpmFormDO::getId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java index 54bee9ce1e..d805da6a69 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -80,6 +81,9 @@ public class BpmFormServiceImpl implements BpmFormService { @Override public List getFormList(Collection ids) { + if (CollUtil.isEmpty(ids)) { + return Collections.emptyList(); + } return formMapper.selectBatchIds(ids); } @@ -88,7 +92,7 @@ public class BpmFormServiceImpl implements BpmFormService { return formMapper.selectPage(pageReqVO); } - + // TODO @芋艿:这里没搞完! @Override public BpmFormDO checkFormConfig(String configStr) { BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(configStr, BpmModelMetaInfoRespDTO.class); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java index bddd790816..e1acce0649 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import jakarta.validation.Valid; import org.flowable.bpmn.model.BpmnModel; +import org.flowable.engine.repository.Model; /** * Flowable流程模型接口 @@ -18,7 +19,7 @@ public interface BpmModelService { * @param pageVO 分页查询 * @return 流程模型分页 */ - PageResult getModelPage(BpmModelPageReqVO pageVO); + PageResult getModelPage(BpmModelPageReqVO pageVO); /** * 创建流程模型 @@ -35,7 +36,15 @@ public interface BpmModelService { * @param id 编号 * @return 流程模型 */ - BpmModelRespVO getModel(String id); + Model getModel(String id); + + /** + * 获得流程模型的 BPMN XML + * + * @param id 编号 + * @return BPMN XML + */ + byte[] getModelBpmnXML(String id); /** * 修改流程模型 @@ -66,14 +75,6 @@ public interface BpmModelService { */ void updateModelState(String id, Integer state); - /** - * 获得流程模型编号对应的 BPMN Model - * - * @param id 流程模型编号 - * @return BPMN Model - */ - BpmnModel getBpmnModel(String id); - /** * 获得流程定义编号对应的 BPMN Model * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 729e176b0f..933a0b5bfc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -2,13 +2,13 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; -import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; @@ -21,7 +21,6 @@ import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.RepositoryService; -import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ModelQuery; import org.flowable.engine.repository.ProcessDefinition; @@ -30,10 +29,10 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; -import java.util.*; +import java.util.List; +import java.util.Objects; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** @@ -60,7 +59,7 @@ public class BpmModelServiceImpl implements BpmModelService { private BpmTaskCandidateInvoker taskCandidateInvoker; @Override - public PageResult getModelPage(BpmModelPageReqVO pageVO) { + public PageResult getModelPage(BpmModelPageReqVO pageVO) { ModelQuery modelQuery = repositoryService.createModelQuery(); if (StrUtil.isNotBlank(pageVO.getKey())) { modelQuery.modelKey(pageVO.getKey()); @@ -72,34 +71,21 @@ public class BpmModelServiceImpl implements BpmModelService { modelQuery.modelCategory(pageVO.getCategory()); } // 执行查询 - List models = modelQuery.modelTenantId(TenantContextHolder.getTenantIdStr()) + long count = modelQuery.count(); + if (count == 0) { + return PageResult.empty(count); + } + List models = modelQuery + .modelTenantId(TenantContextHolder.getTenantIdStr()) .orderByCreateTime().desc() .listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); - - // 获得 Form Map - Set formIds = CollectionUtils.convertSet(models, model -> { - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); - return metaInfo != null ? metaInfo.getFormId() : null; - }); - Map formMap = bpmFormService.getFormMap(formIds); - - // 获得 Deployment Map - Set deploymentIds = new HashSet<>(); - models.forEach(model -> CollectionUtils.addIfNotNull(deploymentIds, model.getDeploymentId())); - Map deploymentMap = processDefinitionService.getDeploymentMap(deploymentIds); - // 获得 ProcessDefinition Map - List processDefinitions = processDefinitionService.getProcessDefinitionListByDeploymentIds(deploymentIds); - Map processDefinitionMap = convertMap(processDefinitions, ProcessDefinition::getDeploymentId); - - // 拼接结果 - long modelCount = modelQuery.count(); - return new PageResult<>(BpmModelConvert.INSTANCE.convertList(models, formMap, deploymentMap, processDefinitionMap), modelCount); + return new PageResult<>(models, count); } @Override @Transactional(rollbackFor = Exception.class) public String createModel(@Valid BpmModelCreateReqVO createReqVO, String bpmnXml) { - checkKeyNCName(createReqVO.getKey()); + validateKeyNCName(createReqVO.getKey()); // 校验流程标识已经存在 Model keyModel = getModelByKey(createReqVO.getKey()); if (keyModel != null) { @@ -108,7 +94,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 创建流程定义 Model model = repositoryService.newModel(); - BpmModelConvert.INSTANCE.copy(model, createReqVO); + BpmModelConvert.INSTANCE.copyToCreateModel(model, createReqVO); model.setTenantId(TenantContextHolder.getTenantIdStr()); // 保存流程定义 repositoryService.saveModel(model); @@ -117,34 +103,17 @@ public class BpmModelServiceImpl implements BpmModelService { return model.getId(); } - private Model getModelByKey(String key) { - return repositoryService.createModelQuery().modelKey(key).singleResult(); - } - - @Override - public BpmModelRespVO getModel(String id) { - Model model = repositoryService.getModel(id); - if (model == null) { - return null; - } - BpmModelRespVO modelRespVO = BpmModelConvert.INSTANCE.convert(model); - // 拼接 bpmn XML - byte[] bpmnBytes = repositoryService.getModelEditorSource(id); - modelRespVO.setBpmnXml(StrUtil.utf8Str(bpmnBytes)); - return modelRespVO; - } - @Override @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) { // 校验流程模型存在 - Model model = repositoryService.getModel(updateReqVO.getId()); + Model model = getModel(updateReqVO.getId()); if (model == null) { throw exception(MODEL_NOT_EXISTS); } // 修改流程定义 - BpmModelConvert.INSTANCE.copy(model, updateReqVO); + BpmModelConvert.INSTANCE.copyToUpdateModel(model, updateReqVO); // 更新模型 repositoryService.saveModel(model); // 更新 BPMN XML @@ -155,18 +124,18 @@ public class BpmModelServiceImpl implements BpmModelService { @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 public void deployModel(String id) { // 1.1 校验流程模型存在 - Model model = repositoryService.getModel(id); + Model model = getModel(id); if (ObjectUtils.isEmpty(model)) { throw exception(MODEL_NOT_EXISTS); } // 1.2 校验流程图 // TODO 芋艿:校验流程图的有效性;例如说,是否有开始的元素,是否有结束的元素; - byte[] bpmnBytes = repositoryService.getModelEditorSource(model.getId()); + byte[] bpmnBytes = getModelBpmnXML(model.getId()); if (bpmnBytes == null) { throw exception(MODEL_NOT_EXISTS); } // 1.3 校验表单已配 - BpmFormDO form = checkFormConfig(model.getMetaInfo()); + BpmFormDO form = validateFormConfig(model.getMetaInfo()); // 1.4 校验任务分配规则已配置 taskCandidateInvoker.validateBpmnConfig(bpmnBytes); @@ -194,7 +163,7 @@ public class BpmModelServiceImpl implements BpmModelService { @Transactional(rollbackFor = Exception.class) public void deleteModel(String id) { // 校验流程模型存在 - Model model = repositoryService.getModel(id); + Model model = getModel(id); if (model == null) { throw exception(MODEL_NOT_EXISTS); } @@ -206,33 +175,27 @@ public class BpmModelServiceImpl implements BpmModelService { @Override public void updateModelState(String id, Integer state) { - // 校验流程模型存在 - Model model = repositoryService.getModel(id); + // 1.1 校验流程模型存在 + Model model = getModel(id); if (model == null) { throw exception(MODEL_NOT_EXISTS); } - // 校验流程定义存在 + // 1.2 校验流程定义存在 ProcessDefinition definition = processDefinitionService.getProcessDefinitionByDeploymentId(model.getDeploymentId()); if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } - // 更新状态 + // 2. 更新状态 processDefinitionService.updateProcessDefinitionState(definition.getId(), state); } - @Override - public BpmnModel getBpmnModel(String id) { - byte[] bpmnBytes = repositoryService.getModelEditorSource(id); - return BpmnModelUtils.getBpmnModel(bpmnBytes); - } - @Override public BpmnModel getBpmnModelByDefinitionId(String processDefinitionId) { return repositoryService.getBpmnModel(processDefinitionId); } - private void checkKeyNCName(String key) { + private void validateKeyNCName(String key) { if (!ValidationUtils.isXmlNCName(key)) { throw exception(MODEL_KEY_VALID); } @@ -244,7 +207,7 @@ public class BpmModelServiceImpl implements BpmModelService { * @param metaInfoStr 流程模型 metaInfo 字段 * @return 流程表单 */ - private BpmFormDO checkFormConfig(String metaInfoStr) { + private BpmFormDO validateFormConfig(String metaInfoStr) { BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(metaInfoStr, BpmModelMetaInfoRespDTO.class); if (metaInfo == null || metaInfo.getFormType() == null) { throw exception(MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG); @@ -282,4 +245,18 @@ public class BpmModelServiceImpl implements BpmModelService { processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode()); } + private Model getModelByKey(String key) { + return repositoryService.createModelQuery().modelKey(key).singleResult(); + } + + @Override + public Model getModel(String id) { + return repositoryService.getModel(id); + } + + @Override + public byte[] getModelBpmnXML(String id) { + return repositoryService.getModelEditorSource(id); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java index 5f6d5f1482..163fc24aa6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java @@ -1,17 +1,14 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import jakarta.validation.Valid; -import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; +import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; @@ -33,15 +30,15 @@ public interface BpmProcessDefinitionService { * @param pageReqVO 分页入参 * @return 流程定义 Page */ - PageResult getProcessDefinitionPage(BpmProcessDefinitionPageReqVO pageReqVO); + PageResult getProcessDefinitionPage(BpmProcessDefinitionPageReqVO pageReqVO); /** * 获得流程定义列表 * - * @param listReqVO 列表入参 + * @param suspensionState 中断状态 * @return 流程定义列表 */ - List getProcessDefinitionList(BpmProcessDefinitionListReqVO listReqVO); + List getProcessDefinitionListBySuspensionState(Integer suspensionState); /** * 创建流程定义 @@ -68,20 +65,24 @@ public interface BpmProcessDefinitionService { String getProcessDefinitionBpmnXML(String id); /** - * 获得需要创建的流程定义,是否和当前激活的流程定义相等 + * 获得流程定义的信息 * - * @param createReqDTO 创建信息 - * @return 是否相等 + * @param id 流程定义编号 + * @return 流程定义信息 */ - boolean isProcessDefinitionEquals(@Valid BpmProcessDefinitionCreateReqDTO createReqDTO); + BpmProcessDefinitionInfoDO getProcessDefinitionInfo(String id); /** - * 获得编号对应的 BpmProcessDefinitionExtDO + * 获得流程定义的信息 List * - * @param id 编号 - * @return 流程定义拓展 + * @param ids 流程定义编号数组 + * @return 流程额定义信息数组 */ - BpmProcessDefinitionExtDO getProcessDefinitionExt(String id); + List getProcessDefinitionInfoList(Collection ids); + + default Map getProcessDefinitionInfoMap(Set ids) { + return convertMap(getProcessDefinitionInfoList(ids), BpmProcessDefinitionInfoDO::getProcessDefinitionId); + } /** * 获得编号对应的 ProcessDefinition @@ -153,11 +154,4 @@ public interface BpmProcessDefinitionService { */ Deployment getDeployment(String id); - /** - * 获得 Bpmn 模型 - * - * @param processDefinitionId 流程定义的编号 - * @return Bpmn 模型 - */ - BpmnModel getBpmnModel(String processDefinitionId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index ef8fd6e4d0..20a9ee95b0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -1,21 +1,15 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.PageUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import cn.iocoder.yudao.module.bpm.convert.definition.BpmProcessDefinitionConvert; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; -import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessDefinitionExtMapper; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessDefinitionInfoMapper; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; @@ -33,7 +27,7 @@ import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.addIfNotNull; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.PROCESS_DEFINITION_KEY_NOT_MATCH; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.PROCESS_DEFINITION_NAME_NOT_MATCH; import static java.util.Collections.emptyList; @@ -55,10 +49,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ private RepositoryService repositoryService; @Resource - private BpmProcessDefinitionExtMapper processDefinitionMapper; - - @Resource - private BpmFormService formService; + private BpmProcessDefinitionInfoMapper processDefinitionMapper; @Override public ProcessDefinition getProcessDefinition(String id) { @@ -111,11 +102,6 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ return repositoryService.createDeploymentQuery().deploymentId(id).singleResult(); } - @Override - public BpmnModel getBpmnModel(String processDefinitionId) { - return repositoryService.getBpmnModel(processDefinitionId); - } - @Override public String createProcessDefinition(@Valid BpmProcessDefinitionCreateReqDTO createReqDTO) { // 创建 Deployment 部署 @@ -141,7 +127,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } // 插入拓展表 - BpmProcessDefinitionExtDO definitionDO = BpmProcessDefinitionConvert.INSTANCE.convert2(createReqDTO) + BpmProcessDefinitionInfoDO definitionDO = BpmProcessDefinitionConvert.INSTANCE.convert2(createReqDTO) .setProcessDefinitionId(definition.getId()); processDefinitionMapper.insert(definitionDO); return definition.getId(); @@ -175,101 +161,43 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } @Override - public boolean isProcessDefinitionEquals(@Valid BpmProcessDefinitionCreateReqDTO createReqDTO) { - // 校验 name、description 是否更新 - ProcessDefinition oldProcessDefinition = getActiveProcessDefinition(createReqDTO.getKey()); - if (oldProcessDefinition == null) { - return false; - } - BpmProcessDefinitionExtDO oldProcessDefinitionExt = getProcessDefinitionExt(oldProcessDefinition.getId()); - if (!StrUtil.equals(createReqDTO.getName(), oldProcessDefinition.getName()) - || !StrUtil.equals(createReqDTO.getDescription(), oldProcessDefinitionExt.getDescription()) - || !StrUtil.equals(createReqDTO.getCategory(), oldProcessDefinition.getCategory())) { - return false; - } - // 校验 form 信息是否更新 - if (!ObjectUtil.equal(createReqDTO.getFormType(), oldProcessDefinitionExt.getFormType()) - || !ObjectUtil.equal(createReqDTO.getFormId(), oldProcessDefinitionExt.getFormId()) - || !ObjectUtil.equal(createReqDTO.getFormConf(), oldProcessDefinitionExt.getFormConf()) - || !ObjectUtil.equal(createReqDTO.getFormFields(), oldProcessDefinitionExt.getFormFields()) - || !ObjectUtil.equal(createReqDTO.getFormCustomCreatePath(), oldProcessDefinitionExt.getFormCustomCreatePath()) - || !ObjectUtil.equal(createReqDTO.getFormCustomViewPath(), oldProcessDefinitionExt.getFormCustomViewPath())) { - return false; - } - // 校验 BPMN XML 信息 - BpmnModel newModel = BpmnModelUtils.getBpmnModel(createReqDTO.getBpmnBytes()); - BpmnModel oldModel = getBpmnModel(oldProcessDefinition.getId()); - // 对比字节变化 - if (!BpmnModelUtils.equals(oldModel, newModel)) { - return false; - } - // 最终发现都一致,则返回 true - return true; + public BpmProcessDefinitionInfoDO getProcessDefinitionInfo(String id) { + return processDefinitionMapper.selectByProcessDefinitionId(id); } @Override - public BpmProcessDefinitionExtDO getProcessDefinitionExt(String id) { - return processDefinitionMapper.selectByProcessDefinitionId(id); + public List getProcessDefinitionInfoList(Collection ids) { + return processDefinitionMapper.selectListByProcessDefinitionIds(ids); } @Override - public List getProcessDefinitionList(BpmProcessDefinitionListReqVO listReqVO) { - // 拼接查询条件 - ProcessDefinitionQuery definitionQuery = repositoryService.createProcessDefinitionQuery(); - if (Objects.equals(SuspensionState.SUSPENDED.getStateCode(), listReqVO.getSuspensionState())) { - definitionQuery.suspended(); - } else if (Objects.equals(SuspensionState.ACTIVE.getStateCode(), listReqVO.getSuspensionState())) { - definitionQuery.active(); + public PageResult getProcessDefinitionPage(BpmProcessDefinitionPageReqVO pageVO) { + ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery(); + if (StrUtil.isNotBlank(pageVO.getKey())) { + query.processDefinitionKey(pageVO.getKey()); } // 执行查询 - definitionQuery.processDefinitionTenantId(TenantContextHolder.getTenantIdStr()); - List processDefinitions = definitionQuery.list(); - if (CollUtil.isEmpty(processDefinitions)) { - return Collections.emptyList(); + long count = query.count(); + if (count == 0) { + return PageResult.empty(count); } - - // 获得 BpmProcessDefinitionDO Map - List processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds( - convertList(processDefinitions, ProcessDefinition::getId)); - Map processDefinitionDOMap = convertMap(processDefinitionDOs, - BpmProcessDefinitionExtDO::getProcessDefinitionId); - // 执行查询,并返回 - return BpmProcessDefinitionConvert.INSTANCE.convertList3(processDefinitions, processDefinitionDOMap); + List list = query.orderByProcessDefinitionVersion().desc() + .listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); + return new PageResult<>(list, count); } @Override - public PageResult getProcessDefinitionPage(BpmProcessDefinitionPageReqVO pageVO) { - ProcessDefinitionQuery definitionQuery = repositoryService.createProcessDefinitionQuery(); - if (StrUtil.isNotBlank(pageVO.getKey())) { - definitionQuery.processDefinitionKey(pageVO.getKey()); + public List getProcessDefinitionListBySuspensionState(Integer suspensionState) { + // 拼接查询条件 + ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery(); + if (Objects.equals(SuspensionState.SUSPENDED.getStateCode(), suspensionState)) { + query.suspended(); + } else if (Objects.equals(SuspensionState.ACTIVE.getStateCode(), suspensionState)) { + query.active(); } - // 执行查询 - List processDefinitions = definitionQuery.orderByProcessDefinitionVersion().desc() - .listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); - - if (CollUtil.isEmpty(processDefinitions)) { - return new PageResult<>(emptyList(), definitionQuery.count()); - } - // 获得 Deployment Map - Set deploymentIds = new HashSet<>(); - processDefinitions.forEach(definition -> addIfNotNull(deploymentIds, definition.getDeploymentId())); - Map deploymentMap = getDeploymentMap(deploymentIds); - - // 获得 BpmProcessDefinitionDO Map - List processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds( - convertList(processDefinitions, ProcessDefinition::getId)); - Map processDefinitionDOMap = convertMap(processDefinitionDOs, - BpmProcessDefinitionExtDO::getProcessDefinitionId); - - // 获得 Form Map - Set formIds = convertSet(processDefinitionDOs, BpmProcessDefinitionExtDO::getFormId); - Map formMap = formService.getFormMap(formIds); - - // 拼接结果 - long definitionCount = definitionQuery.count(); - return new PageResult<>(BpmProcessDefinitionConvert.INSTANCE.convertList(processDefinitions, deploymentMap, - processDefinitionDOMap, formMap), definitionCount); + query.processDefinitionTenantId(TenantContextHolder.getTenantIdStr()); + return query.list(); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java index eb715edb42..ae3f38a96d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java @@ -40,7 +40,6 @@ public class BpmProcessDefinitionCreateReqDTO { private String description; /** * 流程分类 - * 参见 bpm_model_category 数据字典 */ @NotEmpty(message = "流程分类不能为空") private String category; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java index 67135167af..bd84490e8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.bpm.service.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; import java.util.Collection; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index e45ce881cd..aba8bd9f17 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.cc.BpmProcessInstanceCopyDO; -import cn.iocoder.yudao.module.bpm.dal.mysql.cc.BpmProcessInstanceCopyMapper; +import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceCopyMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import jakarta.annotation.Resource; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index 6b81092ace..f9a44482b8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml new file mode 100644 index 0000000000..cf0954503c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java new file mode 100644 index 0000000000..19f576818b --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java @@ -0,0 +1,137 @@ +package cn.iocoder.yudao.module.bpm.service.category; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryServiceImpl; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import jakarta.annotation.Resource; + +import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; + +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.category.BpmCategoryMapper; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.springframework.context.annotation.Import; + +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.*; +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.*; +import static org.junit.jupiter.api.Assertions.*; + +/** + * {@link BpmCategoryServiceImpl} 的单元测试类 + * + * @author 芋道源码 + */ +@Import(BpmCategoryServiceImpl.class) +public class BpmCategoryServiceImplTest extends BaseDbUnitTest { + + @Resource + private BpmCategoryServiceImpl categoryService; + + @Resource + private BpmCategoryMapper categoryMapper; + + @Test + public void testCreateCategory_success() { + // 准备参数 + BpmCategorySaveReqVO createReqVO = randomPojo(BpmCategorySaveReqVO.class).setId(null); + + // 调用 + Long categoryId = categoryService.createCategory(createReqVO); + // 断言 + assertNotNull(categoryId); + // 校验记录的属性是否正确 + BpmCategoryDO category = categoryMapper.selectById(categoryId); + assertPojoEquals(createReqVO, category, "id"); + } + + @Test + public void testUpdateCategory_success() { + // mock 数据 + BpmCategoryDO dbCategory = randomPojo(BpmCategoryDO.class); + categoryMapper.insert(dbCategory);// @Sql: 先插入出一条存在的数据 + // 准备参数 + BpmCategorySaveReqVO updateReqVO = randomPojo(BpmCategorySaveReqVO.class, o -> { + o.setId(dbCategory.getId()); // 设置更新的 ID + }); + + // 调用 + categoryService.updateCategory(updateReqVO); + // 校验是否更新正确 + BpmCategoryDO category = categoryMapper.selectById(updateReqVO.getId()); // 获取最新的 + assertPojoEquals(updateReqVO, category); + } + + @Test + public void testUpdateCategory_notExists() { + // 准备参数 + BpmCategorySaveReqVO updateReqVO = randomPojo(BpmCategorySaveReqVO.class); + + // 调用, 并断言异常 + assertServiceException(() -> categoryService.updateCategory(updateReqVO), CATEGORY_NOT_EXISTS); + } + + @Test + public void testDeleteCategory_success() { + // mock 数据 + BpmCategoryDO dbCategory = randomPojo(BpmCategoryDO.class); + categoryMapper.insert(dbCategory);// @Sql: 先插入出一条存在的数据 + // 准备参数 + Long id = dbCategory.getId(); + + // 调用 + categoryService.deleteCategory(id); + // 校验数据不存在了 + assertNull(categoryMapper.selectById(id)); + } + + @Test + public void testDeleteCategory_notExists() { + // 准备参数 + Long id = randomLongId(); + + // 调用, 并断言异常 + assertServiceException(() -> categoryService.deleteCategory(id), CATEGORY_NOT_EXISTS); + } + + @Test + @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解 + public void testGetCategoryPage() { + // mock 数据 + BpmCategoryDO dbCategory = randomPojo(BpmCategoryDO.class, o -> { // 等会查询到 + o.setName(null); + o.setCode(null); + o.setStatus(null); + o.setCreateTime(null); + }); + categoryMapper.insert(dbCategory); + // 测试 name 不匹配 + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setName(null))); + // 测试 code 不匹配 + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCode(null))); + // 测试 status 不匹配 + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setStatus(null))); + // 测试 createTime 不匹配 + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCreateTime(null))); + // 准备参数 + BpmCategoryPageReqVO reqVO = new BpmCategoryPageReqVO(); + reqVO.setName(null); + reqVO.setCode(null); + reqVO.setStatus(null); + reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); + + // 调用 + PageResult pageResult = categoryService.getCategoryPage(reqVO); + // 断言 + assertEquals(1, pageResult.getTotal()); + assertEquals(1, pageResult.getList().size()); + assertPojoEquals(dbCategory, pageResult.getList().get(0)); + } + +} \ No newline at end of file -- Gitee From 29a0fbfc4339b942d4236ec25eb1ac52c1e216ed Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 20 Mar 2024 12:50:51 +0800 Subject: [PATCH 0081/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E8=A1=A8=E5=8D=95=EF=BC=8C=E6=AF=8F=E4=B8=AA=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=BB=BB=E5=8A=A1=E9=83=BD=E5=8F=AF=E4=BB=A5=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E6=B5=81=E7=A8=8B=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/BpmProcessInstanceCreateReqDTO.java | 2 +- .../admin/task/BpmTaskController.java | 10 +++- .../BpmProcessInstanceCreateReqVO.java | 2 +- .../task/vo/task/BpmTaskApproveReqVO.java | 4 ++ .../admin/task/vo/task/BpmTaskRespVO.java | 14 ++++- .../convert/definition/BpmModelConvert.java | 5 +- .../task/BpmProcessInstanceConvert.java | 11 ++-- .../bpm/convert/task/BpmTaskConvert.java | 47 +++++++--------- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../bpm/service/task/BpmTaskServiceImpl.java | 5 +- .../flowable/core/util/FlowableUtils.java | 56 +++++++++++++++++++ 11 files changed, 117 insertions(+), 41 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java index b20a449df5..629742bc82 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java @@ -20,7 +20,7 @@ public class BpmProcessInstanceCreateReqDTO { @NotEmpty(message = "流程定义的标识不能为空") private String processDefinitionKey; /** - * 变量实例 + * 变量实例(动态表单) */ private Map variables; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 6e17a0901d..c00f4beb43 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -46,6 +48,8 @@ public class BpmTaskController { private BpmTaskService taskService; @Resource private BpmProcessInstanceService processInstanceService; + @Resource + private BpmFormService formService; @Resource private AdminUserApi adminUserApi; @@ -98,7 +102,11 @@ public class BpmTaskController { Map userMap = adminUserApi.getUserMap(userIds); Map deptMap = deptApi.getDeptMap( convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); - return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, userMap, deptMap)); + // 获得 Form Map + Map formMap = formService.getFormMap( + convertSet(taskList, task -> Long.parseLong(task.getFormKey()))); + return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, + formMap, userMap, deptMap)); } @PutMapping("/approve") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java index 93c22dddc8..f477498616 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java @@ -15,7 +15,7 @@ public class BpmProcessInstanceCreateReqVO { @NotEmpty(message = "流程定义编号不能为空") private String processDefinitionId; - @Schema(description = "变量实例") + @Schema(description = "变量实例(动态表单)") private Map variables; // TODO @hai:assignees 复数 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java index c5ca09b371..0be06a6c8d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java @@ -5,6 +5,7 @@ import jakarta.validation.constraints.NotEmpty; import lombok.Data; import java.util.Collection; +import java.util.Map; @Schema(description = "管理后台 - 通过流程任务的 Request VO") @Data @@ -21,4 +22,7 @@ public class BpmTaskApproveReqVO { @Schema(description = "抄送的用户编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2") private Collection copyUserIds; + @Schema(description = "变量实例(动态表单)", requiredMode = Schema.RequiredMode.REQUIRED) + private Map variables; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 46ac3f36d4..27add6000d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -6,6 +6,7 @@ import lombok.Data; import java.time.LocalDateTime; import java.util.List; +import java.util.Map; @Schema(description = "管理后台 - 流程任务 Response VO") @Data @@ -49,7 +50,6 @@ public class BpmTaskRespVO { @Schema(description = "所属流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8888") private String processInstanceId; - /** * 所属流程实例 */ @@ -57,10 +57,20 @@ public class BpmTaskRespVO { @Schema(description = "父任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String parentTaskId; - @Schema(description = "子任务列表(由加签生成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "childrenTask") private List children; + @Schema(description = "表单编号", example = "1024") + private Long formId; + @Schema(description = "表单名字", example = "请假表单") + private String formName; + @Schema(description = "表单的配置-JSON 字符串") + private String formConf; + @Schema(description = "表单项的数组") + private List formFields; + @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED) + private Map formVariables; + @Data @Schema(description = "流程实例") public static class ProcessInstance { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java index a0abde8c61..7bcd82a1b9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.convert.definition; +import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -56,7 +57,9 @@ public interface BpmModelConvert { byte[] bpmnBytes) { BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); BpmModelRespVO modelVO = buildModel0(model, metaInfo, null, null, null, null); - modelVO.setBpmnXml(new String(bpmnBytes)); + if (ArrayUtil.isNotEmpty(bpmnBytes)) { + modelVO.setBpmnXml(new String(bpmnBytes)); + } return modelVO; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index a7c621590e..b1129b2d43 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -2,15 +2,14 @@ package cn.iocoder.yudao.module.bpm.convert.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; -import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -19,7 +18,6 @@ import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; -import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.MappingTarget; import org.mapstruct.factory.Mappers; @@ -32,7 +30,6 @@ import java.util.Map; * * @author 芋道源码 */ -@Mapper(uses = DateUtils.class) public interface BpmProcessInstanceConvert { BpmProcessInstanceConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceConvert.class); @@ -44,7 +41,7 @@ public interface BpmProcessInstanceConvert { PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstancePageItemRespVO.class); for (int i = 0; i < pageResult.getList().size(); i++) { BpmProcessInstancePageItemRespVO respVO = vpPageResult.getList().get(i); - respVO.setStatus((Integer) pageResult.getList().get(i).getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); + respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i))); MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(), processDefinition -> respVO.setCategory(processDefinition.getCategory())); MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); @@ -57,8 +54,8 @@ public interface BpmProcessInstanceConvert { ProcessDefinition processDefinition, BpmProcessDefinitionInfoDO processDefinitionExt, String bpmnXml, AdminUserRespDTO startUser, DeptRespDTO dept) { BpmProcessInstanceRespVO respVO = convert2(processInstance); - respVO.setStatus((Integer) processInstance.getProcessVariables().get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)); - respVO.setFormVariables(processInstance.getProcessVariables()); // TODO 芋艿:真的这么搞么???formVariable 要不要换个 key 之类的 + respVO.setStatus(FlowableUtils.getProcessInstanceStatus(processInstance)); + respVO.setFormVariables(FlowableUtils.filterProcessInstanceFormVariable(processInstance.getProcessVariables())); // definition respVO.setProcessDefinition(convert2(processDefinition)); copyTo(processDefinitionExt, respVO.getProcessDefinition()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index e9f04f4981..625282b0f9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -1,14 +1,15 @@ package cn.iocoder.yudao.module.bpm.convert.task; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; @@ -17,7 +18,6 @@ import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; -import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import java.util.Date; @@ -25,13 +25,13 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; /** * Bpm 任务 Convert * * @author 芋道源码 */ -@Mapper(uses = DateUtils.class) public interface BpmTaskConvert { BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class); @@ -45,8 +45,7 @@ public interface BpmTaskConvert { return; } AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); }); } @@ -55,14 +54,13 @@ public interface BpmTaskConvert { Map userMap) { List taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); - taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); - taskVO.setReason((String) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_REASON)); + taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)); // 流程实例 HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); if (processInstance != null) { AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class)); + taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); } return taskVO; }); @@ -71,32 +69,32 @@ public interface BpmTaskConvert { default List buildTaskListByProcessInstanceId(List taskList, HistoricProcessInstance processInstance, + Map formMap, Map userMap, Map deptMap) { List taskVOList = CollectionUtils.convertList(taskList, task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); - taskVO.setStatus((Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS)); - taskVO.setReason((String) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_REASON)); + taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)); // 流程实例 AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); - taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class, - processInstanceVO -> processInstanceVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)))); + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class)); + taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); + // 表单信息 + BpmFormDO form = MapUtil.get(formMap, Long.parseLong(task.getFormKey()), BpmFormDO.class); + if (form != null) { + taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf()) + .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task)); + } // 用户信息 AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); if (assignUser != null) { taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); - DeptRespDTO dept = deptMap.get(assignUser.getDeptId()); - if (dept != null) { - taskVO.getAssigneeUser().setDeptName(dept.getName()); - } + findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName())); } AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner())); if (ownerUser != null) { taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class)); - DeptRespDTO dept = deptMap.get(ownerUser.getDeptId()); - if (dept != null) { - taskVO.getOwnerUser().setDeptName(dept.getName()); - } + findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName())); } return taskVO; }); @@ -126,10 +124,7 @@ public interface BpmTaskConvert { AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner())); if (ownerUser != null) { taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class)); - DeptRespDTO dept = deptMap.get(ownerUser.getDeptId()); - if (dept != null) { - taskVO.getOwnerUser().setDeptName(dept.getName()); - } + findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName())); } })); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index f9a44482b8..b6b9b142e6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index aa1fc6345b..95c5e7cf45 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -10,6 +10,7 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; @@ -185,7 +186,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); // 3.3 调用 BPM complete 去完成任务 - taskService.complete(task.getId(), instance.getProcessVariables()); + // 其中,variables 是存储动态表单到 local 任务级别。过滤一下,避免 ProcessInstance 系统级的变量被占用 + Map variables = FlowableUtils.filterTaskFormVariable(reqVO.getVariables()); + taskService.complete(task.getId(), variables, true); // 【加签专属】处理加签任务 handleParentTaskIfSign(task.getParentTaskId()); diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java index d697989953..7863bece98 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java +++ b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java @@ -4,8 +4,14 @@ import org.flowable.common.engine.api.delegate.Expression; import org.flowable.common.engine.api.variable.VariableContainer; import org.flowable.common.engine.impl.el.ExpressionManager; import org.flowable.common.engine.impl.identity.Authentication; +import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.util.CommandContextUtil; +import org.flowable.engine.runtime.ProcessInstance; +import org.flowable.task.api.TaskInfo; + +import java.util.HashMap; +import java.util.Map; /** * Flowable 相关的工具方法 @@ -34,6 +40,56 @@ public class FlowableUtils { return activityId + "_assignee"; } + // ========== ProcessInstance 相关的工具方法 ========== + + public static Integer getProcessInstanceStatus(ProcessInstance processInstance) { + return getProcessInstanceStatus(processInstance.getProcessVariables()); + } + + public static Integer getProcessInstanceStatus(HistoricProcessInstance processInstance) { + return getProcessInstanceStatus(processInstance.getProcessVariables()); + } + + // TODO 芋艿:需要再搞搞 + private static Integer getProcessInstanceStatus(Map processVariables) { + return (Integer) processVariables.get("PROCESS_STATUS"); + } + + public static Map getProcessInstanceFormVariable(ProcessInstance processInstance) { + Map formVariables = new HashMap<>(processInstance.getProcessVariables()); + filterProcessInstanceFormVariable(formVariables); + return formVariables; + } + + public static Map filterProcessInstanceFormVariable(Map processVariables) { + processVariables.remove("PROCESS_STATUS"); + return processVariables; + } + + // ========== Task 相关的工具方法 ========== + + // TODO 芋艿:需要再搞搞 + + public static Integer getTaskStatus(TaskInfo task) { + return (Integer) task.getTaskLocalVariables().get("TASK_STATUS"); + } + + public static String getTaskReason(TaskInfo task) { + return (String) task.getTaskLocalVariables().get("TASK_REASON"); + } + + public static Map getTaskFormVariable(TaskInfo task) { + Map formVariables = new HashMap<>(task.getTaskLocalVariables()); + filterTaskFormVariable(formVariables); + return formVariables; + } + + public static Map filterTaskFormVariable(Map taskLocalVariables) { + taskLocalVariables.remove("TASK_STATUS"); + taskLocalVariables.remove("TASK_REASON"); + return taskLocalVariables; + } + // ========== Expression 相关的工具方法 ========== public static Object getExpressionValue(VariableContainer variableContainer, String expressionString) { -- Gitee From 559bab571ae6a1d80febdaee675bb24fa54e44b3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 20 Mar 2024 13:14:53 +0800 Subject: [PATCH 0082/1557] =?UTF-8?q?BPM=EF=BC=9A=E7=A7=BB=E9=99=A4=20flow?= =?UTF-8?q?able=20starter=20=E6=A8=A1=E5=9D=97=EF=BC=8C=E8=9E=8D=E5=90=88?= =?UTF-8?q?=E5=88=B0=20bpm=20=E6=A8=A1=E5=9D=97=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-bpm/pom.xml | 1 - yudao-module-bpm/yudao-module-bpm-biz/pom.xml | 14 ++-- .../task/BpmProcessInstanceConvert.java | 2 +- .../bpm/convert/task/BpmTaskConvert.java | 2 +- .../bpm/framework}/FlowableContextHolder.java | 3 +- .../bpm/config/BpmCommonConfiguration.java | 19 ----- .../bpm/core/event/package-info.java | 6 -- .../bpm/framework/bpm/core/package-info.java | 4 - .../bpm/framework/bpm/package-info.java | 6 -- .../config/BpmFlowableConfiguration.java | 32 ++++++++ .../BpmParallelMultiInstanceBehavior.java | 6 +- .../BpmSequentialMultiInstanceBehavior.java | 6 +- .../candidate/BpmTaskCandidateInvoker.java | 2 +- .../BpmTaskCandidateExpressionStrategy.java | 2 +- ...pmProcessInstanceResultEventPublisher.java | 2 +- .../flowable/core/util/BpmnModelUtils.java | 2 +- .../flowable/core/util/FlowableUtils.java | 80 ++++++++++++++++--- .../web/config/BpmWebConfiguration.java | 14 ++++ .../web/core}/FlowableWebFilter.java | 11 +-- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../bpm/service/task/BpmTaskServiceImpl.java | 4 +- ...pmTaskCandidateExpressionStrategyTest.java | 2 +- .../pom.xml | 37 --------- .../config/YudaoFlowableConfiguration.java | 46 ----------- ...ot.autoconfigure.AutoConfiguration.imports | 1 - 25 files changed, 147 insertions(+), 159 deletions(-) rename yudao-module-bpm/{yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/context => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework}/FlowableContextHolder.java (91%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/package-info.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/package-info.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/package-info.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/{bpm => flowable}/core/event/BpmProcessInstanceResultEventPublisher.java (90%) rename yudao-module-bpm/{yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm}/framework/flowable/core/util/BpmnModelUtils.java (99%) rename yudao-module-bpm/{yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm}/framework/flowable/core/util/FlowableUtils.java (57%) rename yudao-module-bpm/{yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/web => yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core}/FlowableWebFilter.java (84%) delete mode 100644 yudao-module-bpm/yudao-spring-boot-starter-flowable/pom.xml delete mode 100644 yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java delete mode 100644 yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/yudao-module-bpm/pom.xml b/yudao-module-bpm/pom.xml index 491c99771a..95b798904c 100644 --- a/yudao-module-bpm/pom.xml +++ b/yudao-module-bpm/pom.xml @@ -11,7 +11,6 @@ yudao-module-bpm-api yudao-module-bpm-biz - yudao-spring-boot-starter-flowable yudao-module-bpm pom diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml index 1a4b410e88..1ac423e11c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml +++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml @@ -64,15 +64,19 @@ yudao-spring-boot-starter-test - + cn.iocoder.boot - yudao-spring-boot-starter-flowable - ${revision} + yudao-spring-boot-starter-excel + - cn.iocoder.boot - yudao-spring-boot-starter-excel + org.flowable + flowable-spring-boot-starter-process + + + org.flowable + flowable-spring-boot-starter-actuator diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index b1129b2d43..7a73dabdc3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageItemRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 625282b0f9..82593b08cb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -6,7 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/context/FlowableContextHolder.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java similarity index 91% rename from yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/context/FlowableContextHolder.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java index efc6d5340d..6e4fb99e32 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/context/FlowableContextHolder.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.flowable.core.context; +package cn.iocoder.yudao.module.bpm.framework; import cn.hutool.core.collection.CollUtil; import com.alibaba.ttl.TransmittableThreadLocal; @@ -10,6 +10,7 @@ import java.util.Map; /** * 工作流--用户用到的上下文相关信息 */ +@Deprecated // TODO 芋艿:找个方式,去掉这个上下文 public class FlowableContextHolder { private static final ThreadLocal>> ASSIGNEE = new TransmittableThreadLocal<>(); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java deleted file mode 100644 index 7a6ca7711d..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.bpm.config; - -import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * BPM 通用的 Configuration 配置类,提供给 Activiti 和 Flowable - */ -@Configuration(proxyBeanMethods = false) -public class BpmCommonConfiguration { - - @Bean - public BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher(ApplicationEventPublisher publisher) { - return new BpmProcessInstanceResultEventPublisher(publisher); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/package-info.java deleted file mode 100644 index c4a1311289..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 自定义 Event 实现,提供方便业务接入的 Listener! - * - * @author 芋道源码 - */ -package cn.iocoder.yudao.module.bpm.framework.bpm.core.event; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/package-info.java deleted file mode 100644 index b97cb4c8ae..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 占位 - */ -package cn.iocoder.yudao.module.bpm.framework.bpm.core; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/package-info.java deleted file mode 100644 index 9a5e3ea962..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 提供给 Activiti 和 Flowable 的通用封装 - * - * @author 芋道源码 - */ -package cn.iocoder.yudao.module.bpm.framework.bpm; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java index 9248da552b..979d191535 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java @@ -4,13 +4,18 @@ import cn.hutool.core.collection.ListUtil; import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.BpmActivityBehaviorFactory; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import org.flowable.common.engine.api.delegate.event.FlowableEventListener; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.task.AsyncListenableTaskExecutor; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.List; @@ -22,6 +27,26 @@ import java.util.List; @Configuration(proxyBeanMethods = false) public class BpmFlowableConfiguration { + /** + * 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean + * + * 如果不创建,会导致项目启动时,Flowable 报错的问题 + */ + @Bean(name = "applicationTaskExecutor") + @ConditionalOnMissingBean(name = "applicationTaskExecutor") + public AsyncListenableTaskExecutor taskExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(8); + executor.setMaxPoolSize(8); + executor.setQueueCapacity(100); + executor.setThreadNamePrefix("flowable-task-Executor-"); + executor.setAwaitTerminationSeconds(30); + executor.setWaitForTasksToCompleteOnShutdown(true); + executor.setAllowCoreThreadTimeOut(true); + executor.initialize(); + return executor; + } + /** * BPM 模块的 ProcessEngineConfigurationConfigurer 实现类: * @@ -56,4 +81,11 @@ public class BpmFlowableConfiguration { return new BpmTaskCandidateInvoker(strategyList, adminUserApi); } + // =========== 自己拓展的 Bean ========== + + @Bean + public BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher(ApplicationEventPublisher publisher) { + return new BpmProcessInstanceResultEventPublisher(publisher); + } + } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java index 938d04ed1d..64ebb1aac8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; import org.flowable.bpmn.model.Activity; @@ -43,9 +43,9 @@ public class BpmParallelMultiInstanceBehavior extends ParallelMultiInstanceBehav // 第一步,设置 collectionVariable 和 CollectionVariable // 从 execution.getVariable() 读取所有任务处理人的 key super.collectionExpression = null; // collectionExpression 和 collectionVariable 是互斥的 - super.collectionVariable = FlowableUtils.formatCollectionVariable(execution.getCurrentActivityId()); + super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId()); // 从 execution.getVariable() 读取当前所有任务处理的人的 key - super.collectionElementVariable = FlowableUtils.formatCollectionElementVariable(execution.getCurrentActivityId()); + super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId()); // 第二步,获取任务的所有处理人 Set assigneeUserIds = taskCandidateInvoker.calculateUsers(execution); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java index 1e4ebc1416..a214e26255 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import lombok.Setter; import org.flowable.bpmn.model.Activity; @@ -37,9 +37,9 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB // 第一步,设置 collectionVariable 和 CollectionVariable // 从 execution.getVariable() 读取所有任务处理人的 key super.collectionExpression = null; // collectionExpression 和 collectionVariable 是互斥的 - super.collectionVariable = FlowableUtils.formatCollectionVariable(execution.getCurrentActivityId()); + super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId()); // 从 execution.getVariable() 读取当前所有任务处理的人的 key - super.collectionElementVariable = FlowableUtils.formatCollectionElementVariable(execution.getCurrentActivityId()); + super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId()); // 第二步,获取任务的所有处理人 Set assigneeUserIds = new LinkedHashSet<>(taskCandidateInvoker.calculateUsers(execution)); // 保证有序!!! diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java index d1ba65df2b..e1fb626320 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java @@ -5,7 +5,7 @@ import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java index f8be5fe3e4..e51ab76e00 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import org.dromara.hutool.core.convert.Convert; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/BpmProcessInstanceResultEventPublisher.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java similarity index 90% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/BpmProcessInstanceResultEventPublisher.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java index b759fe1e16..7457e3d23e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/BpmProcessInstanceResultEventPublisher.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.framework.bpm.core.event; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.event; import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; import lombok.AllArgsConstructor; diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java similarity index 99% rename from yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 264dd7ec66..a72a4b396b 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.flowable.core.util; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java similarity index 57% rename from yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java index 7863bece98..3fceb60fd2 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java @@ -1,5 +1,6 @@ -package cn.iocoder.yudao.framework.flowable.core.util; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import org.flowable.common.engine.api.delegate.Expression; import org.flowable.common.engine.api.variable.VariableContainer; import org.flowable.common.engine.impl.el.ExpressionManager; @@ -32,11 +33,23 @@ public class FlowableUtils { // ========== Execution 相关的工具方法 ========== - public static String formatCollectionVariable(String activityId) { + /** + * 格式化多实例(并签、或签)的 collectionVariable 变量(多实例对应的多审批人列表) + * + * @param activityId 活动编号 + * @return collectionVariable 变量 + */ + public static String formatExecutionCollectionVariable(String activityId) { return activityId + "_assignees"; } - public static String formatCollectionElementVariable(String activityId) { + /** + * 格式化多实例(并签、或签)的 collectionElementVariable 变量(当前实例对应的一个审批人) + * + * @param activityId 活动编号 + * @return collectionElementVariable 变量 + */ + public static String formatExecutionCollectionElementVariable(String activityId) { return activityId + "_assignee"; } @@ -50,43 +63,86 @@ public class FlowableUtils { return getProcessInstanceStatus(processInstance.getProcessVariables()); } - // TODO 芋艿:需要再搞搞 + /** + * 获得流程实例的状态 + * + * @param processVariables 流程实例的 variables + * @return 状态 + */ private static Integer getProcessInstanceStatus(Map processVariables) { - return (Integer) processVariables.get("PROCESS_STATUS"); + return (Integer) processVariables.get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS); } + /** + * 获得流程实例的表单 + * + * @param processInstance 流程实例 + * @return 表单 + */ public static Map getProcessInstanceFormVariable(ProcessInstance processInstance) { Map formVariables = new HashMap<>(processInstance.getProcessVariables()); filterProcessInstanceFormVariable(formVariables); return formVariables; } + /** + * 过滤流程实例的表单 + * + * 为什么要过滤?目前使用 processVariables 存储所有流程实例的拓展字段,需要过滤掉一部分的系统字段,从而实现表单的展示 + * + * @param processVariables 流程实例的 variables + * @return 过滤后的表单 + */ public static Map filterProcessInstanceFormVariable(Map processVariables) { - processVariables.remove("PROCESS_STATUS"); + processVariables.remove(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS); return processVariables; } // ========== Task 相关的工具方法 ========== - // TODO 芋艿:需要再搞搞 - + /** + * 获得任务的状态 + * + * @param task 任务 + * @return 状态 + */ public static Integer getTaskStatus(TaskInfo task) { - return (Integer) task.getTaskLocalVariables().get("TASK_STATUS"); + return (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); } + /** + * 获得任务的审批原因 + * + * @param task 任务 + * @return 审批原因 + */ public static String getTaskReason(TaskInfo task) { - return (String) task.getTaskLocalVariables().get("TASK_REASON"); + return (String) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_REASON); } + /** + * 获得任务的表单 + * + * @param task 任务 + * @return 表单 + */ public static Map getTaskFormVariable(TaskInfo task) { Map formVariables = new HashMap<>(task.getTaskLocalVariables()); filterTaskFormVariable(formVariables); return formVariables; } + /** + * 过滤任务的表单 + * + * 为什么要过滤?目前使用 taskLocalVariables 存储所有任务的拓展字段,需要过滤掉一部分的系统字段,从而实现表单的展示 + * + * @param taskLocalVariables 任务的 taskLocalVariables + * @return 过滤后的表单 + */ public static Map filterTaskFormVariable(Map taskLocalVariables) { - taskLocalVariables.remove("TASK_STATUS"); - taskLocalVariables.remove("TASK_REASON"); + taskLocalVariables.remove(BpmConstants.TASK_VARIABLE_STATUS); + taskLocalVariables.remove(BpmConstants.TASK_VARIABLE_REASON); return taskLocalVariables; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java index aa9daedab1..d4af61c9bf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.bpm.framework.web.config; +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; +import cn.iocoder.yudao.module.bpm.framework.web.core.FlowableWebFilter; import org.springdoc.core.models.GroupedOpenApi; +import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -21,4 +24,15 @@ public class BpmWebConfiguration { return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("bpm"); } + /** + * 配置 Flowable Web 过滤器 + */ + @Bean + public FilterRegistrationBean flowableWebFilter() { + FilterRegistrationBean registrationBean = new FilterRegistrationBean<>(); + registrationBean.setFilter(new FlowableWebFilter()); + registrationBean.setOrder(WebFilterOrderEnum.FLOWABLE_FILTER); + return registrationBean; + } + } diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/web/FlowableWebFilter.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java similarity index 84% rename from yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/web/FlowableWebFilter.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java index d2135290fd..29fc7c3bff 100644 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/web/FlowableWebFilter.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java @@ -1,16 +1,17 @@ -package cn.iocoder.yudao.framework.flowable.core.web; +package cn.iocoder.yudao.module.bpm.framework.web.core; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import org.springframework.web.filter.OncePerRequestFilter; - +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.springframework.web.filter.OncePerRequestFilter; + import java.io.IOException; + /** - * flowable Web 过滤器,将 userId 设置到 {@link org.flowable.common.engine.impl.identity.Authentication} 中 + * Flowable Web 过滤器,将 userId 设置到 {@link org.flowable.common.engine.impl.identity.Authentication} 中 * * @author jason */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index b6b9b142e6..26b4cefa42 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.flowable.core.context.FlowableContextHolder; import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 95c5e7cf45..dc89a670fd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -9,8 +9,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; -import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java index caa668eac8..eaa2ef7b58 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; import org.flowable.engine.delegate.DelegateExecution; import org.junit.jupiter.api.Test; diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/pom.xml b/yudao-module-bpm/yudao-spring-boot-starter-flowable/pom.xml deleted file mode 100644 index ae0ed46eef..0000000000 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - cn.iocoder.boot - yudao-module-bpm - ${revision} - - 4.0.0 - - yudao-spring-boot-starter-flowable - - - - cn.iocoder.boot - yudao-common - - - - - cn.iocoder.boot - yudao-spring-boot-starter-security - - - - - org.flowable - flowable-spring-boot-starter-process - - - org.flowable - flowable-spring-boot-starter-actuator - - - - diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java deleted file mode 100644 index 859eca510d..0000000000 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java +++ /dev/null @@ -1,46 +0,0 @@ -package cn.iocoder.yudao.framework.flowable.config; - -import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; -import cn.iocoder.yudao.framework.flowable.core.web.FlowableWebFilter; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.core.task.AsyncListenableTaskExecutor; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -@AutoConfiguration -public class YudaoFlowableConfiguration { - - /** - * 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean - * - * 如果不创建,会导致项目启动时,Flowable 报错的问题 - */ - @Bean(name = "applicationTaskExecutor") - @ConditionalOnMissingBean(name = "applicationTaskExecutor") - public AsyncListenableTaskExecutor taskExecutor() { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(8); - executor.setMaxPoolSize(8); - executor.setQueueCapacity(100); - executor.setThreadNamePrefix("flowable-task-Executor-"); - executor.setAwaitTerminationSeconds(30); - executor.setWaitForTasksToCompleteOnShutdown(true); - executor.setAllowCoreThreadTimeOut(true); - executor.initialize(); - return executor; - } - - /** - * 配置 flowable Web 过滤器 - */ - @Bean - public FilterRegistrationBean flowableWebFilter() { - FilterRegistrationBean registrationBean = new FilterRegistrationBean<>(); - registrationBean.setFilter(new FlowableWebFilter()); - registrationBean.setOrder(WebFilterOrderEnum.FLOWABLE_FILTER); - return registrationBean; - } - -} diff --git a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 1df61598ce..0000000000 --- a/yudao-module-bpm/yudao-spring-boot-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -cn.iocoder.yudao.framework.flowable.config.YudaoFlowableConfiguration \ No newline at end of file -- Gitee From c104191821afd7fa7cd1a1e935aaa9deb85f9f3d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 20 Mar 2024 18:51:36 +0800 Subject: [PATCH 0083/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=BC=BA=20mode?= =?UTF-8?q?l=20=E6=B5=81=E7=A8=8B=E6=A8=A1=E5=9E=8B=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=90=84=E7=A7=8D=E5=8F=82=E6=95=B0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 10 +-- .../admin/definition/BpmModelController.java | 3 +- .../admin/task/BpmTaskController.java | 2 +- .../convert/definition/BpmModelConvert.java | 34 ++------- .../BpmProcessDefinitionConvert.java | 3 - .../bpm/convert/task/BpmTaskConvert.java | 2 +- .../flowable/core/util/BpmnModelUtils.java | 27 ++----- .../service/definition/BpmFormService.java | 8 -- .../definition/BpmFormServiceImpl.java | 23 +----- .../definition/BpmModelServiceImpl.java | 74 +++++++++++-------- .../BpmProcessDefinitionService.java | 14 ++-- .../BpmProcessDefinitionServiceImpl.java | 31 ++++---- .../dto/BpmModelMetaInfoRespDTO.java | 2 + .../dto/BpmProcessDefinitionCreateReqDTO.java | 26 +------ 14 files changed, 98 insertions(+), 161 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 494e4a1b5d..310e1b623c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -10,16 +10,9 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; public interface ErrorCodeConstants { // ========== 通用流程处理 模块 1-009-000-000 ========== - ErrorCode HIGHLIGHT_IMG_ERROR = new ErrorCode(1_009_000_002, "获取高亮流程图异常"); // ========== OA 流程模块 1-009-001-000 ========== ErrorCode OA_LEAVE_NOT_EXISTS = new ErrorCode(1_009_001_001, "请假申请不存在"); - ErrorCode OA_PM_POST_NOT_EXISTS = new ErrorCode(1_009_001_002, "项目经理岗位未设置"); - ErrorCode OA_DEPART_PM_POST_NOT_EXISTS = new ErrorCode(1_009_001_009, "部门的项目经理不存在"); - ErrorCode OA_BM_POST_NOT_EXISTS = new ErrorCode(1_009_001_004, "部门经理岗位未设置"); - ErrorCode OA_DEPART_BM_POST_NOT_EXISTS = new ErrorCode(1_009_001_005, "部门的部门经理不存在"); - ErrorCode OA_HR_POST_NOT_EXISTS = new ErrorCode(1_009_001_006, "HR岗位未设置"); - ErrorCode OA_DAY_LEAVE_ERROR = new ErrorCode(1_009_001_007, "请假天数必须>=1"); // ========== 流程模型 1-009-002-000 ========== ErrorCode MODEL_KEY_EXISTS = new ErrorCode(1_009_002_000, "已经存在流程标识为【{}】的流程"); @@ -28,7 +21,8 @@ public interface ErrorCodeConstants { ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1_009_002_003, "部署流程失败,原因:流程表单未配置,请点击【修改流程】按钮进行配置"); ErrorCode MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败," + "原因:用户任务({})未配置审批人,请点击【流程设计】按钮,选择该它的【任务(审批人)】进行配置"); - ErrorCode MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS = new ErrorCode(1_009_003_005, "流程定义部署失败,原因:信息未发生变化"); + ErrorCode MODEL_DEPLOY_FAIL_BPMN_START_EVENT_NOT_EXISTS = new ErrorCode(1_009_002_005, "部署流程失败,原因:BPMN 流程图中,没有开始事件"); + ErrorCode MODEL_DEPLOY_FAIL_BPMN_USER_TASK_NAME_NOT_EXISTS = new ErrorCode(1_009_002_006, "部署流程失败,原因:BPMN 流程图中,用户任务({})的名字不存在"); // ========== 流程定义 1-009-003-000 ========== ErrorCode PROCESS_DEFINITION_KEY_NOT_MATCH = new ErrorCode(1_009_003_000, "流程定义的标识期望是({}),当前是({}),请修改 BPMN 流程图"); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index 4143076fff..dcf91260fb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.io.IoUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; @@ -112,7 +113,7 @@ public class BpmModelController { @Operation(summary = "导入模型") @PreAuthorize("@ss.hasPermission('bpm:model:import')") public CommonResult importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { - BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); + BpmModelCreateReqVO createReqVO = BeanUtils.toBean(importReqVO, BpmModelCreateReqVO.class); // 读取文件 String bpmnXml = IoUtils.readUtf8(importReqVO.getBpmnFile().getInputStream(), false); return success(modelService.createModel(createReqVO, bpmnXml)); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index c00f4beb43..d721cf7a8f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -104,7 +104,7 @@ public class BpmTaskController { convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); // 获得 Form Map Map formMap = formService.getFormMap( - convertSet(taskList, task -> Long.parseLong(task.getFormKey()))); + convertSet(taskList, task -> NumberUtils.parseLong(task.getFormKey()))); return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, formMap, userMap, deptMap)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java index 7bcd82a1b9..373e71bf36 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModeImportReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; @@ -15,13 +14,11 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ProcessDefinition; import org.mapstruct.Mapper; -import org.mapstruct.MappingTarget; import org.mapstruct.factory.Mappers; import java.util.List; @@ -43,7 +40,7 @@ public interface BpmModelConvert { Map categoryMap, Map deploymentMap, Map processDefinitionMap) { List list = CollectionUtils.convertList(pageResult.getList(), model -> { - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + BpmModelMetaInfoRespDTO metaInfo = buildMetaInfo(model); BpmFormDO form = metaInfo != null ? formMap.get(metaInfo.getFormId()) : null; BpmCategoryDO category = categoryMap.get(model.getCategory()); Deployment deployment = model.getDeploymentId() != null ? deploymentMap.get(model.getDeploymentId()) : null; @@ -55,7 +52,7 @@ public interface BpmModelConvert { default BpmModelRespVO buildModel(Model model, byte[] bpmnBytes) { - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + BpmModelMetaInfoRespDTO metaInfo = buildMetaInfo(model); BpmModelRespVO modelVO = buildModel0(model, metaInfo, null, null, null, null); if (ArrayUtil.isNotEmpty(bpmnBytes)) { modelVO.setBpmnXml(new String(bpmnBytes)); @@ -95,27 +92,6 @@ public interface BpmModelConvert { return modelRespVO; } - BpmModelCreateReqVO convert(BpmModeImportReqVO bean); - - default BpmProcessDefinitionCreateReqDTO convert2(Model model, BpmFormDO form) { - BpmProcessDefinitionCreateReqDTO createReqDTO = new BpmProcessDefinitionCreateReqDTO(); - createReqDTO.setModelId(model.getId()); - createReqDTO.setName(model.getName()); - createReqDTO.setKey(model.getKey()); - createReqDTO.setCategory(model.getCategory()); - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); - // metaInfo - copyTo(metaInfo, createReqDTO); - // form - if (form != null) { - createReqDTO.setFormConf(form.getConf()); - createReqDTO.setFormFields(form.getFields()); - } - return createReqDTO; - } - - void copyTo(BpmModelMetaInfoRespDTO from, @MappingTarget BpmProcessDefinitionCreateReqDTO to); - default void copyToCreateModel(Model model, BpmModelCreateReqVO bean) { model.setName(bean.getName()); model.setKey(bean.getKey()); @@ -126,7 +102,7 @@ public interface BpmModelConvert { default void copyToUpdateModel(Model model, BpmModelUpdateReqVO bean) { model.setName(bean.getName()); model.setCategory(bean.getCategory()); - model.setMetaInfo(buildMetaInfoStr(JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class), + model.setMetaInfo(buildMetaInfoStr(buildMetaInfo(model), bean.getDescription(), bean.getFormType(), bean.getFormId(), bean.getFormCustomCreatePath(), bean.getFormCustomViewPath())); } @@ -149,4 +125,8 @@ public interface BpmModelConvert { return JsonUtils.toJsonString(metaInfo); } + default BpmModelMetaInfoRespDTO buildMetaInfo(Model model) { + return JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java index f1e9451788..1b5897dd50 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java @@ -10,7 +10,6 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; @@ -69,8 +68,6 @@ public interface BpmProcessDefinitionConvert { }); } - BpmProcessDefinitionInfoDO convert2(BpmProcessDefinitionCreateReqDTO bean); - @Mapping(source = "from.id", target = "to.id", ignore = true) void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 82593b08cb..ac1da99a0f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -80,7 +80,7 @@ public interface BpmTaskConvert { taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class)); taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); // 表单信息 - BpmFormDO form = MapUtil.get(formMap, Long.parseLong(task.getFormKey()), BpmFormDO.class); + BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class); if (form != null) { taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf()) .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task)); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index a72a4b396b..9763bc8a60 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -71,26 +71,15 @@ public class BpmnModelUtils { return result; } - /** - * 比较 两个bpmnModel 是否相同 - * @param oldModel 老的bpmn model - * @param newModel 新的bpmn model - */ - public static boolean equals(BpmnModel oldModel, BpmnModel newModel) { - // 由于 BpmnModel 未提供 equals 方法,所以只能转成字节数组,进行比较 - return Arrays.equals(getBpmnBytes(oldModel), getBpmnBytes(newModel)); - } - - /** - * 把 bpmnModel 转换成 byte[] - * @param model bpmnModel - */ - public static byte[] getBpmnBytes(BpmnModel model) { - if (model == null) { - return new byte[0]; + public static StartEvent getStartEvent(BpmnModel model) { + Process process = model.getMainProcess(); + // 从 initialFlowElement 找 + FlowElement startElement = process.getInitialFlowElement(); + if (startElement instanceof StartEvent) { + return (StartEvent) startElement; } - BpmnXMLConverter converter = new BpmnXMLConverter(); - return converter.convertToXML(model); + // 从 flowElementList 找 + return (StartEvent) CollUtil.findOne(process.getFlowElements(), flowElement -> flowElement instanceof StartEvent); } public static BpmnModel getBpmnModel(byte[] bpmnBytes) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java index 9c61ae4272..fa9484708f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java @@ -83,12 +83,4 @@ public interface BpmFormService { */ PageResult getFormPage(BpmFormPageReqVO pageReqVO); - /** - * 校验流程表单已配置 - * - * @param configStr configStr 字段 - * @return 流程表单 - */ - BpmFormDO checkFormConfig(String configStr); - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java index d805da6a69..0575129950 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java @@ -11,17 +11,14 @@ import cn.iocoder.yudao.module.bpm.convert.definition.BpmFormConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmFormMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmFormFieldRespDTO; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 动态表单 Service 实现类 @@ -92,24 +89,6 @@ public class BpmFormServiceImpl implements BpmFormService { return formMapper.selectPage(pageReqVO); } - // TODO @芋艿:这里没搞完! - @Override - public BpmFormDO checkFormConfig(String configStr) { - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(configStr, BpmModelMetaInfoRespDTO.class); - if (metaInfo == null || metaInfo.getFormType() == null) { - throw exception(MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG); - } - // 校验表单存在 - if (Objects.equals(metaInfo.getFormType(), BpmModelFormTypeEnum.NORMAL.getType())) { - BpmFormDO form = getForm(metaInfo.getFormId()); - if (form == null) { - throw exception(FORM_NOT_EXISTS); - } - return form; - } - return null; - } - /** * 校验 Field,避免 field 重复 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 933a0b5bfc..511b4902ae 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -13,12 +13,14 @@ import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.StartEvent; +import org.flowable.bpmn.model.UserTask; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.RepositoryService; import org.flowable.engine.repository.Model; @@ -85,7 +87,9 @@ public class BpmModelServiceImpl implements BpmModelService { @Override @Transactional(rollbackFor = Exception.class) public String createModel(@Valid BpmModelCreateReqVO createReqVO, String bpmnXml) { - validateKeyNCName(createReqVO.getKey()); + if (!ValidationUtils.isXmlNCName(createReqVO.getName())) { + throw exception(MODEL_KEY_VALID); + } // 校验流程标识已经存在 Model keyModel = getModelByKey(createReqVO.getKey()); if (keyModel != null) { @@ -129,26 +133,16 @@ public class BpmModelServiceImpl implements BpmModelService { throw exception(MODEL_NOT_EXISTS); } // 1.2 校验流程图 - // TODO 芋艿:校验流程图的有效性;例如说,是否有开始的元素,是否有结束的元素; byte[] bpmnBytes = getModelBpmnXML(model.getId()); - if (bpmnBytes == null) { - throw exception(MODEL_NOT_EXISTS); - } + validateBpmnXml(bpmnBytes); // 1.3 校验表单已配 - BpmFormDO form = validateFormConfig(model.getMetaInfo()); + BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); + BpmFormDO form = validateFormConfig(metaInfo); // 1.4 校验任务分配规则已配置 taskCandidateInvoker.validateBpmnConfig(bpmnBytes); - // 1.5 校验模型是否发生修改。如果未修改,则不允许创建 - BpmProcessDefinitionCreateReqDTO definitionCreateReqDTO = BpmModelConvert.INSTANCE.convert2(model, form) - .setBpmnBytes(bpmnBytes); - // TODO @芋艿:这里比较可能有点问题 -// if (processDefinitionService.isProcessDefinitionEquals(definitionCreateReqDTO)) { // 流程定义的信息相等 -// throw exception(MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS); -// } - // 2.1 创建流程定义 - String definitionId = processDefinitionService.createProcessDefinition(definitionCreateReqDTO); + String definitionId = processDefinitionService.createProcessDefinition(model, metaInfo, bpmnBytes, form); // 2.2 将老的流程定义进行挂起。也就是说,只有最新部署的流程定义,才可以发起任务。 updateProcessDefinitionSuspended(model.getDeploymentId()); @@ -159,6 +153,25 @@ public class BpmModelServiceImpl implements BpmModelService { repositoryService.saveModel(model); } + private void validateBpmnXml(byte[] bpmnBytes) { + BpmnModel bpmnModel = BpmnModelUtils.getBpmnModel(bpmnBytes); + if (bpmnModel == null) { + throw exception(MODEL_NOT_EXISTS); + } + // 1. 没有 StartEvent + StartEvent startEvent = BpmnModelUtils.getStartEvent(bpmnModel); + if (startEvent == null) { + throw exception(MODEL_DEPLOY_FAIL_BPMN_START_EVENT_NOT_EXISTS); + } + // 2. 校验 UserTask 的 name 都配置了 + List userTasks = BpmnModelUtils.getBpmnModelElements(bpmnModel, UserTask.class); + userTasks.forEach(userTask -> { + if (StrUtil.isEmpty(userTask.getName())) { + throw exception(MODEL_DEPLOY_FAIL_BPMN_USER_TASK_NAME_NOT_EXISTS, userTask.getId()); + } + }); + } + @Override @Transactional(rollbackFor = Exception.class) public void deleteModel(String id) { @@ -195,32 +208,32 @@ public class BpmModelServiceImpl implements BpmModelService { return repositoryService.getBpmnModel(processDefinitionId); } - private void validateKeyNCName(String key) { - if (!ValidationUtils.isXmlNCName(key)) { - throw exception(MODEL_KEY_VALID); - } - } - /** * 校验流程表单已配置 * - * @param metaInfoStr 流程模型 metaInfo 字段 - * @return 流程表单 + * @param metaInfo 流程模型元数据 + * @return 表单配置 */ - private BpmFormDO validateFormConfig(String metaInfoStr) { - BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(metaInfoStr, BpmModelMetaInfoRespDTO.class); + private BpmFormDO validateFormConfig(BpmModelMetaInfoRespDTO metaInfo) { if (metaInfo == null || metaInfo.getFormType() == null) { throw exception(MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG); } // 校验表单存在 if (Objects.equals(metaInfo.getFormType(), BpmModelFormTypeEnum.NORMAL.getType())) { + if (metaInfo.getFormId() == null) { + throw exception(MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG); + } BpmFormDO form = bpmFormService.getForm(metaInfo.getFormId()); if (form == null) { throw exception(FORM_NOT_EXISTS); } return form; + } else { + if (StrUtil.isEmpty(metaInfo.getFormCustomCreatePath()) || StrUtil.isEmpty(metaInfo.getFormCustomViewPath())) { + throw exception(MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG); + } + return null; } - return null; } private void saveModelBpmnXml(Model model, String bpmnXml) { @@ -231,8 +244,11 @@ public class BpmModelServiceImpl implements BpmModelService { } /** - * 挂起 deploymentId 对应的流程定义。 这里一个deploymentId 只关联一个流程定义 - * @param deploymentId 流程发布Id. + * 挂起 deploymentId 对应的流程定义 + * + * 注意:这里一个 deploymentId 只关联一个流程定义 + * + * @param deploymentId 流程发布Id */ private void updateProcessDefinitionSuspended(String deploymentId) { if (StrUtil.isEmpty(deploymentId)) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java index 163fc24aa6..7126d652ef 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java @@ -2,10 +2,11 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; -import jakarta.validation.Valid; +import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import org.flowable.engine.repository.Deployment; +import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ProcessDefinition; import java.util.Collection; @@ -41,12 +42,15 @@ public interface BpmProcessDefinitionService { List getProcessDefinitionListBySuspensionState(Integer suspensionState); /** - * 创建流程定义 + * 基于流程模型,创建流程定义 * - * @param createReqDTO 创建信息 + * @param model 流程模型 + * @param modelMetaInfo 流程模型元信息 + * @param bpmnBytes BPMN XML 字节数组 + * @param form 表单 * @return 流程编号 */ - String createProcessDefinition(@Valid BpmProcessDefinitionCreateReqDTO createReqDTO); + String createProcessDefinition(Model model, BpmModelMetaInfoRespDTO modelMetaInfo, byte[] bpmnBytes, BpmFormDO form); /** * 更新流程定义状态 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 20a9ee95b0..85418fb830 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -3,22 +3,23 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmProcessDefinitionConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessDefinitionInfoMapper; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmProcessDefinitionCreateReqDTO; +import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import jakarta.annotation.Resource; -import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.RepositoryService; import org.flowable.engine.repository.Deployment; +import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.repository.ProcessDefinitionQuery; import org.springframework.stereotype.Service; @@ -103,11 +104,12 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } @Override - public String createProcessDefinition(@Valid BpmProcessDefinitionCreateReqDTO createReqDTO) { + public String createProcessDefinition(Model model, BpmModelMetaInfoRespDTO modelMetaInfo, + byte[] bpmnBytes, BpmFormDO form) { // 创建 Deployment 部署 Deployment deploy = repositoryService.createDeployment() - .key(createReqDTO.getKey()).name(createReqDTO.getName()).category(createReqDTO.getCategory()) - .addBytes(createReqDTO.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes()) + .key(model.getKey()).name(model.getName()).category(model.getCategory()) + .addBytes(model.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, bpmnBytes) .tenantId(TenantContextHolder.getTenantIdStr()) .disableSchemaValidation() // 禁用 XML Schema 验证,因为有自定义的属性 .deploy(); @@ -115,20 +117,23 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ // 设置 ProcessDefinition 的 category 分类 ProcessDefinition definition = repositoryService.createProcessDefinitionQuery() .deploymentId(deploy.getId()).singleResult(); - repositoryService.setProcessDefinitionCategory(definition.getId(), createReqDTO.getCategory()); + repositoryService.setProcessDefinitionCategory(definition.getId(), model.getCategory()); // 注意 1,ProcessDefinition 的 key 和 name 是通过 BPMN 中的 的 id 和 name 决定 // 注意 2,目前该项目的设计上,需要保证 Model、Deployment、ProcessDefinition 使用相同的 key,保证关联性。 // 否则,会导致 ProcessDefinition 的分页无法查询到。 - if (!Objects.equals(definition.getKey(), createReqDTO.getKey())) { - throw exception(PROCESS_DEFINITION_KEY_NOT_MATCH, createReqDTO.getKey(), definition.getKey()); + if (!Objects.equals(definition.getKey(), model.getKey())) { + throw exception(PROCESS_DEFINITION_KEY_NOT_MATCH, model.getKey(), definition.getKey()); } - if (!Objects.equals(definition.getName(), createReqDTO.getName())) { - throw exception(PROCESS_DEFINITION_NAME_NOT_MATCH, createReqDTO.getName(), definition.getName()); + if (!Objects.equals(definition.getName(), model.getName())) { + throw exception(PROCESS_DEFINITION_NAME_NOT_MATCH, model.getName(), definition.getName()); } // 插入拓展表 - BpmProcessDefinitionInfoDO definitionDO = BpmProcessDefinitionConvert.INSTANCE.convert2(createReqDTO) - .setProcessDefinitionId(definition.getId()); + BpmProcessDefinitionInfoDO definitionDO = BeanUtils.toBean(modelMetaInfo, BpmProcessDefinitionInfoDO.class) + .setModelId(model.getId()).setProcessDefinitionId(definition.getId()); + if (form != null) { + definitionDO.setFormFields(form.getFields()).setFormConf(form.getConf()); + } processDefinitionMapper.insert(definitionDO); return definition.getId(); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java index 3a36b0eeb0..5b4ef3da53 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java @@ -7,6 +7,8 @@ import lombok.Data; * BPM 流程 MetaInfo Response DTO * 主要用于 { Model#setMetaInfo(String)} 的存储 * + * 最终,它的字段和 {@link cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO} 是一致的 + * * @author 芋道源码 */ @Data diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java index ae3f38a96d..4008f8f077 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java @@ -1,15 +1,11 @@ package cn.iocoder.yudao.module.bpm.service.definition.dto; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; -import lombok.Data; - -import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; +import lombok.Data; + import java.util.List; -import java.util.Objects; /** * 流程定义创建 Request DTO @@ -82,22 +78,4 @@ public class BpmProcessDefinitionCreateReqDTO { */ private String formCustomViewPath; - @AssertTrue(message = "流程表单信息不全") - public boolean isNormalFormTypeValid() { - // 如果非业务表单,则直接通过 - if (!Objects.equals(formType, BpmModelFormTypeEnum.NORMAL.getType())) { - return true; - } - return formId != null && StrUtil.isNotEmpty(formConf) && CollUtil.isNotEmpty(formFields); - } - - @AssertTrue(message = "业务表单信息不全") - public boolean isNormalCustomTypeValid() { - // 如果非业务表单,则直接通过 - if (!Objects.equals(formType, BpmModelFormTypeEnum.CUSTOM.getType())) { - return true; - } - return StrUtil.isNotEmpty(formCustomCreatePath) && StrUtil.isNotEmpty(formCustomViewPath); - } - } -- Gitee From e5444c5d47a2f71d6d0acfe998eaf763acbcaef8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 20 Mar 2024 21:32:01 +0800 Subject: [PATCH 0084/1557] =?UTF-8?q?BPM=EF=BC=9A=E4=BC=98=E5=8C=96=20conv?= =?UTF-8?q?ert=20=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ava => BpmProcessInstanceStatusEvent.java} | 11 ++- ...pmProcessInstanceStatusEventListener.java} | 10 +-- .../admin/definition/BpmFormController.java | 34 +++++---- .../vo/form/BpmFormCreateReqVO.java | 22 ------ .../definition/vo/form/BpmFormRespVO.java | 20 ++++-- ...mFormBaseVO.java => BpmFormSaveReqVO.java} | 22 ++++-- .../vo/form/BpmFormSimpleRespVO.java | 16 ----- .../vo/form/BpmFormUpdateReqVO.java | 25 ------- .../process/BpmProcessDefinitionRespVO.java | 7 +- .../admin/oa/BpmOALeaveController.java | 19 +++-- .../admin/oa/vo/BpmOALeaveBaseVO.java | 33 --------- .../admin/oa/vo/BpmOALeaveCreateReqVO.java | 30 ++++++-- .../admin/oa/vo/BpmOALeavePageReqVO.java | 18 +++-- .../admin/oa/vo/BpmOALeaveRespVO.java | 30 ++++---- .../task/BpmProcessInstanceController.java | 35 ++++++++- .../task/vo/activity/BpmActivityRespVO.java | 4 +- .../BpmProcessInstancePageItemRespVO.java | 54 -------------- .../vo/instance/BpmProcessInstanceRespVO.java | 39 +++++----- .../admin/task/vo/task/BpmTaskRespVO.java | 3 - .../convert/definition/BpmFormConvert.java | 34 --------- .../bpm/convert/oa/BpmOALeaveConvert.java | 30 -------- .../task/BpmProcessInstanceConvert.java | 72 ++++++++----------- .../bpm/convert/task/BpmTaskConvert.java | 4 +- .../bpm/dal/dataobject/oa/BpmOALeaveDO.java | 6 +- .../bpm/dal/mysql/oa/BpmOALeaveMapper.java | 2 +- ...pmProcessInstanceResultEventPublisher.java | 6 +- .../service/definition/BpmFormService.java | 7 +- .../definition/BpmFormServiceImpl.java | 21 +++--- .../definition/BpmModelServiceImpl.java | 2 +- .../bpm/service/oa/BpmOALeaveService.java | 4 +- .../bpm/service/oa/BpmOALeaveServiceImpl.java | 12 ++-- ...ner.java => BpmOALeaveStatusListener.java} | 10 +-- .../task/BpmProcessInstanceService.java | 9 --- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../bpm/service/task/BpmTaskServiceImpl.java | 8 ++- .../mapper/category/BpmCategoryMapper.xml | 12 ---- .../definition/BpmFormServiceTest.java | 4 +- .../definition/BpmUserGroupServiceTest.java | 5 +- .../src/test/resources/sql/create_tables.sql | 2 +- ...er.java => CrmContractStatusListener.java} | 10 +-- ....java => CrmReceivableStatusListener.java} | 10 +-- .../src/main/resources/application.yaml | 2 +- 42 files changed, 267 insertions(+), 439 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/{BpmProcessInstanceResultEvent.java => BpmProcessInstanceStatusEvent.java} (65%) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/{BpmProcessInstanceResultEventListener.java => BpmProcessInstanceStatusEventListener.java} (63%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/{BpmFormBaseVO.java => BpmFormSaveReqVO.java} (49%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmFormConvert.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/oa/BpmOALeaveConvert.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/{BpmOALeaveResultListener.java => BpmOALeaveStatusListener.java} (58%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/{CrmContractResultListener.java => CrmContractStatusListener.java} (65%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/{CrmReceivableResultListener.java => CrmReceivableStatusListener.java} (65%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEvent.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java similarity index 65% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEvent.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java index 9b703728d4..f320948437 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEvent.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java @@ -5,14 +5,13 @@ import lombok.Data; import org.springframework.context.ApplicationEvent; /** - * 流程实例的结果发生变化的 Event - * 定位:由于额外增加了 {@link BpmProcessInstanceExtDO#getResult()} 结果,所以增加该事件 + * 流程实例的状态(结果)发生变化的 Event * * @author 芋道源码 */ @SuppressWarnings("ALL") @Data -public class BpmProcessInstanceResultEvent extends ApplicationEvent { +public class BpmProcessInstanceStatusEvent extends ApplicationEvent { /** * 流程实例的编号 @@ -27,15 +26,15 @@ public class BpmProcessInstanceResultEvent extends ApplicationEvent { /** * 流程实例的结果 */ - @NotNull(message = "流程实例的结果不能为空") - private Integer result; + @NotNull(message = "流程实例的状态不能为空") + private Integer status; /** * 流程实例对应的业务标识 * 例如说,请假 */ private String businessKey; - public BpmProcessInstanceResultEvent(Object source) { + public BpmProcessInstanceStatusEvent(Object source) { super(source); } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEventListener.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java similarity index 63% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEventListener.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java index bff99a8c19..f8b1863c6c 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceResultEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java @@ -4,15 +4,15 @@ import cn.hutool.core.util.StrUtil; import org.springframework.context.ApplicationListener; /** - * {@link BpmProcessInstanceResultEvent} 的监听器 + * {@link BpmProcessInstanceStatusEvent} 的监听器 * * @author 芋道源码 */ -public abstract class BpmProcessInstanceResultEventListener - implements ApplicationListener { +public abstract class BpmProcessInstanceStatusEventListener + implements ApplicationListener { @Override - public final void onApplicationEvent(BpmProcessInstanceResultEvent event) { + public final void onApplicationEvent(BpmProcessInstanceStatusEvent event) { if (!StrUtil.equals(event.getProcessDefinitionKey(), getProcessDefinitionKey())) { return; } @@ -29,6 +29,6 @@ public abstract class BpmProcessInstanceResultEventListener * * @param event 事件 */ - protected abstract void onEvent(BpmProcessInstanceResultEvent event); + protected abstract void onEvent(BpmProcessInstanceStatusEvent event); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java index b5065ed48e..b957a75a7a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java @@ -1,23 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.*; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmFormConvert; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @Tag(name = "管理后台 - 动态表单") @RestController @@ -31,14 +34,14 @@ public class BpmFormController { @PostMapping("/create") @Operation(summary = "创建动态表单") @PreAuthorize("@ss.hasPermission('bpm:form:create')") - public CommonResult createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { + public CommonResult createForm(@Valid @RequestBody BpmFormSaveReqVO createReqVO) { return success(formService.createForm(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新动态表单") @PreAuthorize("@ss.hasPermission('bpm:form:update')") - public CommonResult updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { + public CommonResult updateForm(@Valid @RequestBody BpmFormSaveReqVO updateReqVO) { formService.updateForm(updateReqVO); return success(true); } @@ -58,14 +61,15 @@ public class BpmFormController { @PreAuthorize("@ss.hasPermission('bpm:form:query')") public CommonResult getForm(@RequestParam("id") Long id) { BpmFormDO form = formService.getForm(id); - return success(BpmFormConvert.INSTANCE.convert(form)); + return success(BeanUtils.toBean(form, BpmFormRespVO.class)); } - @GetMapping("/list-all-simple") + @GetMapping({"/list-all-simple", "/simple-list"}) @Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框") - public CommonResult> getSimpleForms() { + public CommonResult> getFormSimpleList() { List list = formService.getFormList(); - return success(BpmFormConvert.INSTANCE.convertList2(list)); + return success(convertList(list, formDO -> // 只返回 id、name 字段 + new BpmFormRespVO().setId(formDO.getId()).setName(formDO.getName()))); } @GetMapping("/page") @@ -73,7 +77,7 @@ public class BpmFormController { @PreAuthorize("@ss.hasPermission('bpm:form:query')") public CommonResult> getFormPage(@Valid BpmFormPageReqVO pageVO) { PageResult pageResult = formService.getFormPage(pageVO); - return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); + return success(BeanUtils.toBean(pageResult, BpmFormRespVO.class)); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java deleted file mode 100644 index aa014a584d..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -import jakarta.validation.constraints.NotNull; -import java.util.List; - -@Schema(description = "管理后台 - 动态表单创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmFormCreateReqVO extends BpmFormBaseVO { - - @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "表单的配置不能为空") - private String conf; - - @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "表单项的数组不能为空") - private List fields; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java index b8c8f531fe..1c4eb762ca 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java @@ -1,22 +1,23 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; + import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import jakarta.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; @Schema(description = "管理后台 - 动态表单 Response VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmFormRespVO extends BpmFormBaseVO { +public class BpmFormRespVO { @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; + @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + @NotNull(message = "表单名称不能为空") + private String name; + @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "表单的配置不能为空") private String conf; @@ -25,6 +26,13 @@ public class BpmFormRespVO extends BpmFormBaseVO { @NotNull(message = "表单项的数组不能为空") private List fields; + @Schema(description = "表单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "表单状态不能为空") + private Integer status; // 参见 CommonStatusEnum 枚举 + + @Schema(description = "备注", example = "我是备注") + private String remark; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java similarity index 49% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java index fcc0cc167a..4da13aaf8c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java @@ -1,19 +1,29 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import jakarta.validation.constraints.*; -/** -* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ +import jakarta.validation.constraints.NotNull; +import java.util.List; + +@Schema(description = "管理后台 - 动态表单创建/更新 Request VO") @Data -public class BpmFormBaseVO { +public class BpmFormSaveReqVO { + + @Schema(description = "表单编号", example = "1024") + private Long id; @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") @NotNull(message = "表单名称不能为空") private String name; + @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "表单的配置不能为空") + private String conf; + + @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "表单项的数组不能为空") + private List fields; + @Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "表单状态不能为空") private Integer status; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java deleted file mode 100644 index 71d8a1f802..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - 流程表单精简 Response VO") -@Data -public class BpmFormSimpleRespVO { - - @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private Long id; - - @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java deleted file mode 100644 index 4248547802..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java +++ /dev/null @@ -1,25 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import jakarta.validation.constraints.*; -import java.util.List; - -@Schema(description = "管理后台 - 动态表单更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmFormUpdateReqVO extends BpmFormBaseVO { - - @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "表单编号不能为空") - private Long id; - - @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "表单的配置不能为空") - private String conf; - - @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "表单项的数组不能为空") - private List fields; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index bf015920ee..4fa56d4a37 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -50,7 +50,10 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer suspensionState; - @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取 + @Schema(description = "部署时间") + private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取,非必须返回 + + @Schema(description = "BPMN XML") + private String bpmnXml; // 需要从对应的 BpmnModel 读取,非必须返回 } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java index b964694a5a..1447494506 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO; -import cn.iocoder.yudao.module.bpm.convert.oa.BpmOALeaveConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; - import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -49,7 +48,7 @@ public class BpmOALeaveController { @Parameter(name = "id", description = "编号", required = true, example = "1024") public CommonResult getLeave(@RequestParam("id") Long id) { BpmOALeaveDO leave = leaveService.getLeave(id); - return success(BpmOALeaveConvert.INSTANCE.convert(leave)); + return success(BeanUtils.toBean(leave, BpmOALeaveRespVO.class)); } @GetMapping("/page") @@ -57,7 +56,7 @@ public class BpmOALeaveController { @Operation(summary = "获得请假申请分页") public CommonResult> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { PageResult pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); - return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); + return success(BeanUtils.toBean(pageResult, BpmOALeaveRespVO.class)); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java deleted file mode 100644 index f7089f8594..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.time.LocalDateTime; -import jakarta.validation.constraints.*; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -/** -* 请假申请 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ -@Data -public class BpmOALeaveBaseVO { - - @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "开始时间不能为空") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime startTime; - @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "结束时间不能为空") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime endTime; - - @Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer type; - - @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码") - private String reason; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java index 56ee98b337..8f84a281d2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java @@ -1,16 +1,34 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; + import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.AssertTrue; +import jakarta.validation.constraints.NotNull; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; -import jakarta.validation.constraints.AssertTrue; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @Schema(description = "管理后台 - 请假申请创建 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmOALeaveCreateReqVO extends BpmOALeaveBaseVO { +public class BpmOALeaveCreateReqVO { + + @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "开始时间不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startTime; + + @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "结束时间不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endTime; + + @Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer type; + + @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码") + private String reason; @AssertTrue(message = "结束时间,需要在开始时间之后") public boolean isEndTimeValid() { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java index 903a0fcf27..a754370ccb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java @@ -1,10 +1,14 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.time.LocalDateTime; + import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @Schema(description = "管理后台 - 请假申请分页 Request VO") @@ -13,13 +17,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class BpmOALeavePageReqVO extends PageParam { - @Schema(description = "状态-参见 bpm_process_instance_result 枚举", example = "1") - private Integer result; + @Schema(description = "状态", example = "1") + private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举 - @Schema(description = "请假类型-参见 bpm_oa_type", example = "1") + @Schema(description = "请假类型,参见 bpm_oa_type", example = "1") private Integer type; - @Schema(description = "原因-模糊匹配", example = "阅读芋道源码") + @Schema(description = "原因,模糊匹配", example = "阅读芋道源码") private String reason; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java index 669e309e7e..dbfe9d90f3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java @@ -1,32 +1,36 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import org.springframework.format.annotation.DateTimeFormat; +import lombok.Data; -import jakarta.validation.constraints.NotNull; import java.time.LocalDateTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - @Schema(description = "管理后台 - 请假申请 Response VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { +public class BpmOALeaveRespVO { @Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "状态-参见 bpm_process_instance_result 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer result; + @Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer type; + + @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码") + private String reason; @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "申请时间不能为空") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime createTime; - @Schema(description = "流程id") + @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime startTime; + + @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime endTime; + + @Schema(description = "流程编号") private String processInstanceId; + @Schema(description = "审批结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 05c8458274..2db6b76f91 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -3,13 +3,19 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -45,10 +51,15 @@ public class BpmProcessInstanceController { @Resource private BpmCategoryService categoryService; + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + @GetMapping("/my-page") @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") - public CommonResult> getMyProcessInstancePage( + public CommonResult> getMyProcessInstancePage( @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { PageResult pageResult = processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO); if (CollUtil.isEmpty(pageResult.getList())) { @@ -62,7 +73,8 @@ public class BpmProcessInstanceController { convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)); Map categoryMap = categoryService.getCategoryMap( convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory)); - return success(BpmProcessInstanceConvert.INSTANCE.convertPage(pageResult, processDefinitionMap, categoryMap, taskMap)); + return success(BpmProcessInstanceConvert.INSTANCE.buildMyProcessInstancePage(pageResult, + processDefinitionMap, categoryMap, taskMap)); } @PostMapping("/create") @@ -77,7 +89,24 @@ public class BpmProcessInstanceController { @Parameter(name = "id", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") public CommonResult getProcessInstance(@RequestParam("id") String id) { - return success(processInstanceService.getProcessInstanceVO(id)); + HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(id); + if (processInstance == null) { + return success(null); + } + + // 拼接返回 + ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition( + processInstance.getProcessDefinitionId()); + BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo( + processInstance.getProcessDefinitionId()); + String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); + AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); + DeptRespDTO dept = null; + if (startUser != null) { + dept = deptApi.getDept(startUser.getDeptId()); + } + return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstance(processInstance, + processDefinition, processDefinitionInfo, bpmnXml, startUser, dept)); } @DeleteMapping("/cancel") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java index ab6468204c..8f959e0938 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java @@ -19,7 +19,7 @@ public class BpmActivityRespVO { @Schema(description = "流程活动的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; - @Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048") - private String taskId; + @Schema(description = "关联的流程任务的编号", example = "2048") + private String taskId; // 关联的流程任务,只有 UserTask 等类型才有 } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java deleted file mode 100644 index f1763a27f5..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java +++ /dev/null @@ -1,54 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.time.LocalDateTime; -import java.util.List; - -// TODO @芋艿:是不是要融合? -@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") -@Data -public class BpmProcessInstancePageItemRespVO { - - @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - - @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") - private String processDefinitionId; - - @Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private String category; - @Schema(description = "流程分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "请假") - private String categoryName; - - @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 - - @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime startTime; - - @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime endTime; - - /** - * 当前任务 - */ - private List tasks; - - @Schema(description = "流程任务") - @Data - public static class Task { - - @Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - private String id; - - @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - private String name; - - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index e0410e6be8..d6e67dd349 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -19,12 +20,14 @@ public class BpmProcessInstanceRespVO { @Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String category; + @Schema(description = "流程分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "请假") + private String categoryName; @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime createTime; + private LocalDateTime startTime; @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; @@ -40,10 +43,17 @@ public class BpmProcessInstanceRespVO { */ private User startUser; + @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") + private String processDefinitionId; /** * 流程定义 */ - private ProcessDefinition processDefinition; + private BpmProcessDefinitionRespVO processDefinition; + + /** + * 当前审批中的任务 + */ + private List tasks; // 仅在流程实例分页才返回 @Schema(description = "用户信息") @Data @@ -61,30 +71,15 @@ public class BpmProcessInstanceRespVO { } - @Schema(description = "流程定义信息") + @Schema(description = "流程任务") @Data - public static class ProcessDefinition { + public static class Task { - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String id; - @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") - private Integer formType; - @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") - private Long formId; - @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) - private String formConf; - @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) - private List formFields; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/create") - private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/view") - private String formCustomViewPath; - - @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) - private String bpmnXml; + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") + private String name; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 27add6000d..26b8e80b05 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -42,9 +42,6 @@ public class BpmTaskRespVO { */ private BpmProcessInstanceRespVO.User assigneeUser; - // TODO @芋艿:这个 key 有点问题,应该是 taskDefinitionId - @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001") - private String definitionKey; @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "Activity_one") private String taskDefinitionKey; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmFormConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmFormConvert.java deleted file mode 100644 index 6ba7574170..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmFormConvert.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.definition; - -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSimpleRespVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 动态表单 Convert - * - * @author 芋艿 - */ -@Mapper -public interface BpmFormConvert { - - BpmFormConvert INSTANCE = Mappers.getMapper(BpmFormConvert.class); - - BpmFormDO convert(BpmFormCreateReqVO bean); - - BpmFormDO convert(BpmFormUpdateReqVO bean); - - BpmFormRespVO convert(BpmFormDO bean); - - List convertList2(List list); - - PageResult convertPage(PageResult page); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/oa/BpmOALeaveConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/oa/BpmOALeaveConvert.java deleted file mode 100644 index f87531bfc5..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/oa/BpmOALeaveConvert.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.bpm.convert.oa; - -import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO; -import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 请假申请 Convert - * - * @author 芋艿 - */ -@Mapper -public interface BpmOALeaveConvert { - - BpmOALeaveConvert INSTANCE = Mappers.getMapper(BpmOALeaveConvert.class); - - BpmOALeaveDO convert(BpmOALeaveCreateReqVO bean); - - BpmOALeaveRespVO convert(BpmOALeaveDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 7a73dabdc3..1f6e38a3d4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -4,12 +4,12 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageItemRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -18,6 +18,7 @@ import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; +import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.MappingTarget; import org.mapstruct.factory.Mappers; @@ -30,39 +31,43 @@ import java.util.Map; * * @author 芋道源码 */ +@Mapper public interface BpmProcessInstanceConvert { BpmProcessInstanceConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceConvert.class); - default PageResult convertPage(PageResult pageResult, - Map processDefinitionMap, - Map categoryMap, - Map> taskMap) { - PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstancePageItemRespVO.class); + default PageResult buildMyProcessInstancePage(PageResult pageResult, + Map processDefinitionMap, + Map categoryMap, + Map> taskMap) { + PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstanceRespVO.class); for (int i = 0; i < pageResult.getList().size(); i++) { - BpmProcessInstancePageItemRespVO respVO = vpPageResult.getList().get(i); + BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i); respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i))); MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(), processDefinition -> respVO.setCategory(processDefinition.getCategory())); MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); - respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstancePageItemRespVO.Task.class)); + respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class)); } return vpPageResult; } - default BpmProcessInstanceRespVO convert2(HistoricProcessInstance processInstance, - ProcessDefinition processDefinition, BpmProcessDefinitionInfoDO processDefinitionExt, - String bpmnXml, AdminUserRespDTO startUser, DeptRespDTO dept) { - BpmProcessInstanceRespVO respVO = convert2(processInstance); + default BpmProcessInstanceRespVO buildProcessInstance(HistoricProcessInstance processInstance, + ProcessDefinition processDefinition, + BpmProcessDefinitionInfoDO processDefinitionExt, + String bpmnXml, + AdminUserRespDTO startUser, + DeptRespDTO dept) { + BpmProcessInstanceRespVO respVO = BeanUtils.toBean(processInstance, BpmProcessInstanceRespVO.class); respVO.setStatus(FlowableUtils.getProcessInstanceStatus(processInstance)); respVO.setFormVariables(FlowableUtils.filterProcessInstanceFormVariable(processInstance.getProcessVariables())); // definition - respVO.setProcessDefinition(convert2(processDefinition)); + respVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); copyTo(processDefinitionExt, respVO.getProcessDefinition()); respVO.getProcessDefinition().setBpmnXml(bpmnXml); // user if (startUser != null) { - respVO.setStartUser(convert2(startUser)); + respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); if (dept != null) { respVO.getStartUser().setDeptName(dept.getName()); } @@ -70,42 +75,27 @@ public interface BpmProcessInstanceConvert { return respVO; } - BpmProcessInstanceRespVO convert2(HistoricProcessInstance bean); - - BpmProcessInstanceRespVO.ProcessDefinition convert2(ProcessDefinition bean); - @Mapping(source = "from.id", target = "to.id", ignore = true) - void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessInstanceRespVO.ProcessDefinition to); - - BpmProcessInstanceRespVO.User convert2(AdminUserRespDTO bean); + void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to); - default BpmProcessInstanceResultEvent convert(Object source, HistoricProcessInstance instance, Integer result) { - BpmProcessInstanceResultEvent event = new BpmProcessInstanceResultEvent(source); - event.setId(instance.getId()); - event.setProcessDefinitionKey(instance.getProcessDefinitionKey()); - event.setBusinessKey(instance.getBusinessKey()); - event.setResult(result); - return event; + default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, HistoricProcessInstance instance, Integer status) { + return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status) + .setProcessDefinitionKey(instance.getProcessDefinitionKey()).setBusinessKey(instance.getBusinessKey()); } - // TODO @芋艿:需要改下 key! - default BpmProcessInstanceResultEvent convert(Object source, ProcessInstance instance, Integer result) { - BpmProcessInstanceResultEvent event = new BpmProcessInstanceResultEvent(source); - event.setId(instance.getId()); - event.setProcessDefinitionKey(instance.getProcessDefinitionKey()); - event.setBusinessKey(instance.getBusinessKey()); - event.setResult(result); - return event; + default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance, Integer status) {; + return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status) + .setProcessDefinitionKey(instance.getProcessDefinitionKey()).setBusinessKey(instance.getBusinessKey()); } - default BpmMessageSendWhenProcessInstanceApproveReqDTO convert2ApprovedReq(ProcessInstance instance){ - return new BpmMessageSendWhenProcessInstanceApproveReqDTO() + default BpmMessageSendWhenProcessInstanceApproveReqDTO buildProcessInstanceApproveMessage(ProcessInstance instance) { + return new BpmMessageSendWhenProcessInstanceApproveReqDTO() .setStartUserId(NumberUtils.parseLong(instance.getStartUserId())) .setProcessInstanceId(instance.getId()) .setProcessInstanceName(instance.getName()); } - default BpmMessageSendWhenProcessInstanceRejectReqDTO convert2RejectReq(ProcessInstance instance, String reason) { + default BpmMessageSendWhenProcessInstanceRejectReqDTO buildProcessInstanceRejectMessage(ProcessInstance instance, String reason) { return new BpmMessageSendWhenProcessInstanceRejectReqDTO() .setProcessInstanceName(instance.getName()) .setProcessInstanceId(instance.getId()) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index ac1da99a0f..67b882c954 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -6,10 +6,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; @@ -18,6 +18,7 @@ import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; +import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import java.util.Date; @@ -32,6 +33,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd * * @author 芋道源码 */ +@Mapper public interface BpmTaskConvert { BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java index e24ce02adf..ca21b538cd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java @@ -57,12 +57,12 @@ public class BpmOALeaveDO extends BaseDO { */ private Long day; /** - * 请假的结果 + * 审批结果 * * 枚举 {@link BpmTaskStatustEnum} - * 考虑到简单,所以直接复用了 BpmProcessInstanceResultEnum 枚举,也可以自己定义一个枚举哈 + * 考虑到简单,所以直接复用了 BpmProcessInstanceStatusEnum 枚举,也可以自己定义一个枚举哈 */ - private Integer result; + private Integer status; /** * 对应的流程编号 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOALeaveMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOALeaveMapper.java index ad05b98041..2787874506 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOALeaveMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOALeaveMapper.java @@ -19,7 +19,7 @@ public interface BpmOALeaveMapper extends BaseMapperX { default PageResult selectPage(Long userId, BpmOALeavePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(BpmOALeaveDO::getUserId, userId) - .eqIfPresent(BpmOALeaveDO::getResult, reqVO.getResult()) + .eqIfPresent(BpmOALeaveDO::getStatus, reqVO.getStatus()) .eqIfPresent(BpmOALeaveDO::getType, reqVO.getType()) .likeIfPresent(BpmOALeaveDO::getReason, reqVO.getReason()) .betweenIfPresent(BpmOALeaveDO::getCreateTime, reqVO.getCreateTime()) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java index 7457e3d23e..bf85c58c8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.event; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent; import lombok.AllArgsConstructor; import org.springframework.context.ApplicationEventPublisher; import org.springframework.validation.annotation.Validated; @@ -8,7 +8,7 @@ import org.springframework.validation.annotation.Validated; import jakarta.validation.Valid; /** - * {@link BpmProcessInstanceResultEvent} 的生产者 + * {@link BpmProcessInstanceStatusEvent} 的生产者 * * @author 芋道源码 */ @@ -18,7 +18,7 @@ public class BpmProcessInstanceResultEventPublisher { private final ApplicationEventPublisher publisher; - public void sendProcessInstanceResultEvent(@Valid BpmProcessInstanceResultEvent event) { + public void sendProcessInstanceResultEvent(@Valid BpmProcessInstanceStatusEvent event) { publisher.publishEvent(event); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java index fa9484708f..3c8425084c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java @@ -2,9 +2,8 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import jakarta.validation.Valid; @@ -26,14 +25,14 @@ public interface BpmFormService { * @param createReqVO 创建信息 * @return 编号 */ - Long createForm(@Valid BpmFormCreateReqVO createReqVO); + Long createForm(@Valid BpmFormSaveReqVO createReqVO); /** * 更新动态表单 * * @param updateReqVO 更新信息 */ - void updateForm(@Valid BpmFormUpdateReqVO updateReqVO); + void updateForm(@Valid BpmFormSaveReqVO updateReqVO); /** * 删除动态表单 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java index 0575129950..95f2759938 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java @@ -4,10 +4,9 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; -import cn.iocoder.yudao.module.bpm.convert.definition.BpmFormConvert; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmFormMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; @@ -33,22 +32,22 @@ public class BpmFormServiceImpl implements BpmFormService { private BpmFormMapper formMapper; @Override - public Long createForm(BpmFormCreateReqVO createReqVO) { - this.checkFields(createReqVO.getFields()); + public Long createForm(BpmFormSaveReqVO createReqVO) { + this.vadateFields(createReqVO.getFields()); // 插入 - BpmFormDO form = BpmFormConvert.INSTANCE.convert(createReqVO); + BpmFormDO form = BeanUtils.toBean(createReqVO, BpmFormDO.class); formMapper.insert(form); // 返回 return form.getId(); } @Override - public void updateForm(BpmFormUpdateReqVO updateReqVO) { - this.checkFields(updateReqVO.getFields()); + public void updateForm(BpmFormSaveReqVO updateReqVO) { + vadateFields(updateReqVO.getFields()); // 校验存在 - this.validateFormExists(updateReqVO.getId()); + validateFormExists(updateReqVO.getId()); // 更新 - BpmFormDO updateObj = BpmFormConvert.INSTANCE.convert(updateReqVO); + BpmFormDO updateObj = BeanUtils.toBean(updateReqVO, BpmFormDO.class); formMapper.updateById(updateObj); } @@ -94,7 +93,7 @@ public class BpmFormServiceImpl implements BpmFormService { * * @param fields field 数组 */ - private void checkFields(List fields) { + private void vadateFields(List fields) { if (true) { // TODO 芋艿:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验 return; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 511b4902ae..eb392ace2f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -87,7 +87,7 @@ public class BpmModelServiceImpl implements BpmModelService { @Override @Transactional(rollbackFor = Exception.class) public String createModel(@Valid BpmModelCreateReqVO createReqVO, String bpmnXml) { - if (!ValidationUtils.isXmlNCName(createReqVO.getName())) { + if (!ValidationUtils.isXmlNCName(createReqVO.getKey())) { throw exception(MODEL_KEY_VALID); } // 校验流程标识已经存在 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveService.java index 3089566598..24ca6d3227 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveService.java @@ -29,9 +29,9 @@ public interface BpmOALeaveService { * 更新请假申请的状态 * * @param id 编号 - * @param result 结果 + * @param status 结果 */ - void updateLeaveResult(Long id, Integer result); + void updateLeaveStatus(Long id, Integer status); /** * 获得请假申请 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 9477e667dd..c71d885054 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -2,19 +2,19 @@ package cn.iocoder.yudao.module.bpm.service.oa; import cn.hutool.core.date.LocalDateTimeUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; -import cn.iocoder.yudao.module.bpm.convert.oa.BpmOALeaveConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.util.HashMap; import java.util.Map; @@ -47,8 +47,8 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { public Long createLeave(Long userId, BpmOALeaveCreateReqVO createReqVO) { // 插入 OA 请假单 long day = LocalDateTimeUtil.between(createReqVO.getStartTime(), createReqVO.getEndTime()).toDays(); - BpmOALeaveDO leave = BpmOALeaveConvert.INSTANCE.convert(createReqVO).setUserId(userId).setDay(day) - .setResult(BpmTaskStatustEnum.RUNNING.getStatus()); + BpmOALeaveDO leave = BeanUtils.toBean(createReqVO, BpmOALeaveDO.class) + .setUserId(userId).setDay(day).setStatus(BpmTaskStatustEnum.RUNNING.getStatus()); leaveMapper.insert(leave); // 发起 BPM 流程 @@ -64,9 +64,9 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { } @Override - public void updateLeaveResult(Long id, Integer result) { + public void updateLeaveStatus(Long id, Integer status) { validateLeaveExists(id); - leaveMapper.updateById(new BpmOALeaveDO().setId(id).setResult(result)); + leaveMapper.updateById(new BpmOALeaveDO().setId(id).setStatus(status)); } private void validateLeaveExists(Long id) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveResultListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveStatusListener.java similarity index 58% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveResultListener.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveStatusListener.java index e1dccb52bd..8c70306fb5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveResultListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOALeaveStatusListener.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.service.oa.listener; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEventListener; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEventListener; import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveServiceImpl; import org.springframework.stereotype.Component; @@ -14,7 +14,7 @@ import jakarta.annotation.Resource; * @author 芋道源码 */ @Component -public class BpmOALeaveResultListener extends BpmProcessInstanceResultEventListener { +public class BpmOALeaveStatusListener extends BpmProcessInstanceStatusEventListener { @Resource private BpmOALeaveService leaveService; @@ -25,8 +25,8 @@ public class BpmOALeaveResultListener extends BpmProcessInstanceResultEventListe } @Override - protected void onEvent(BpmProcessInstanceResultEvent event) { - leaveService.updateLeaveResult(Long.parseLong(event.getBusinessKey()), event.getResult()); + protected void onEvent(BpmProcessInstanceStatusEvent event) { + leaveService.updateLeaveStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index 1e78c271e1..3473cbcadf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -5,7 +5,6 @@ import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import jakarta.validation.Valid; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; @@ -115,14 +114,6 @@ public interface BpmProcessInstanceService { */ String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO); - /** - * 获得流程实例 VO 信息 - * - * @param id 流程实例的编号 - * @return 流程实例 - */ - BpmProcessInstanceRespVO getProcessInstanceVO(String id); - /** * 取消流程实例 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index 26b4cefa42..f589e29cdd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Resource private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public BpmProcessInstanceRespVO getProcessInstanceVO(String id) { // 获得流程实例 HistoricProcessInstance processInstance = getHistoricProcessInstance(id); if (processInstance == null) { return null; } // 获得流程定义 ProcessDefinition processDefinition = processDefinitionService .getProcessDefinition(processInstance.getProcessDefinitionId()); Assert.notNull(processDefinition, "流程定义({}) 不存在", processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionExt = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); Assert.notNull(processDefinitionExt, "流程定义拓展({}) 不存在", id); String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); // 获得 User AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { dept = deptApi.getDept(startUser.getDeptId()); } // 拼接结果 return BpmProcessInstanceConvert.INSTANCE.convert2(processInstance, processDefinition, processDefinitionExt, bpmnXml, startUser, dept); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.convert2ApprovedReq(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.convert2RejectReq(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.convert(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index dc89a670fd..e7759c56ec 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -187,8 +187,12 @@ public class BpmTaskServiceImpl implements BpmTaskService { BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); // 3.3 调用 BPM complete 去完成任务 // 其中,variables 是存储动态表单到 local 任务级别。过滤一下,避免 ProcessInstance 系统级的变量被占用 - Map variables = FlowableUtils.filterTaskFormVariable(reqVO.getVariables()); - taskService.complete(task.getId(), variables, true); + if (CollUtil.isNotEmpty(reqVO.getVariables())) { + Map variables = FlowableUtils.filterTaskFormVariable(reqVO.getVariables()); + taskService.complete(task.getId(), variables, true); + } else { + taskService.complete(task.getId()); + } // 【加签专属】处理加签任务 handleParentTaskIfSign(task.getParentTaskId()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml deleted file mode 100644 index cf0954503c..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/category/BpmCategoryMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java index fbc069d8aa..50bc3ace76 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.RandomUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; @@ -43,7 +43,7 @@ public class BpmFormServiceTest extends BaseDbUnitTest { @Test public void testCreateForm_success() { // 准备参数 - BpmFormCreateReqVO reqVO = randomPojo(BpmFormCreateReqVO.class, o -> { + BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> { o.setConf("{}"); o.setFields(randomFields()); }); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java index 438e3193cb..cf119f2152 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.test.core.util.AssertUtils; import cn.iocoder.yudao.framework.test.core.util.RandomUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmUserGroupMapper; import org.junit.jupiter.api.Assertions; @@ -56,7 +55,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest { BpmUserGroupDO dbUserGroup = RandomUtils.randomPojo(BpmUserGroupDO.class); userGroupMapper.insert(dbUserGroup);// @Sql: 先插入出一条存在的数据 // 准备参数 - BpmUserGroupUpdateReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupUpdateReqVO.class, o -> { + BpmUserGroupSaveReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupSaveReqVO.class, o -> { o.setId(dbUserGroup.getId()); // 设置更新的 ID }); @@ -70,7 +69,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest { @Test public void testUpdateUserGroup_notExists() { // 准备参数 - BpmUserGroupUpdateReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupUpdateReqVO.class); + BpmUserGroupSaveReqVO reqVO = RandomUtils.randomPojo(BpmUserGroupSaveReqVO.class); // 调用, 并断言异常 AssertUtils.assertServiceException(() -> userGroupService.updateUserGroup(reqVO), USER_GROUP_NOT_EXISTS); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql index 20a939b761..eae4d7e41a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql @@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS "bpm_user_group" ( "name" varchar(63) NOT NULL, "description" varchar(255) NOT NULL, "status" tinyint NOT NULL, - "member_user_ids" varchar(255) NOT NULL, + "user_ids" varchar(255) NOT NULL, "creator" varchar(64) DEFAULT '', "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, "updater" varchar(64) DEFAULT '', diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractResultListener.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractStatusListener.java similarity index 65% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractResultListener.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractStatusListener.java index 256259bdf7..14d3c66aac 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractResultListener.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/listener/CrmContractStatusListener.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.service.contract.listener; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEventListener; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEventListener; import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.contract.CrmContractServiceImpl; import jakarta.annotation.Resource; @@ -13,7 +13,7 @@ import org.springframework.stereotype.Component; * @author HUIHUI */ @Component -public class CrmContractResultListener extends BpmProcessInstanceResultEventListener { +public class CrmContractStatusListener extends BpmProcessInstanceStatusEventListener { @Resource private CrmContractService contractService; @@ -24,8 +24,8 @@ public class CrmContractResultListener extends BpmProcessInstanceResultEventList } @Override - protected void onEvent(BpmProcessInstanceResultEvent event) { - contractService.updateContractAuditStatus(Long.parseLong(event.getBusinessKey()), event.getResult()); + protected void onEvent(BpmProcessInstanceStatusEvent event) { + contractService.updateContractAuditStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableStatusListener.java similarity index 65% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableStatusListener.java index 8c4f3e974d..4bf0497e60 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableResultListener.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/listener/CrmReceivableStatusListener.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.service.receivable.listener; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; -import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEventListener; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent; +import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEventListener; import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableService; import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableServiceImpl; import jakarta.annotation.Resource; @@ -13,7 +13,7 @@ import org.springframework.stereotype.Component; * @author HUIHUI */ @Component -public class CrmReceivableResultListener extends BpmProcessInstanceResultEventListener { +public class CrmReceivableStatusListener extends BpmProcessInstanceStatusEventListener { @Resource private CrmReceivableService receivableService; @@ -24,8 +24,8 @@ public class CrmReceivableResultListener extends BpmProcessInstanceResultEventLi } @Override - public void onEvent(BpmProcessInstanceResultEvent event) { - receivableService.updateReceivableAuditStatus(Long.parseLong(event.getBusinessKey()), event.getResult()); + public void onEvent(BpmProcessInstanceStatusEvent event) { + receivableService.updateReceivableAuditStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); } } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 4eaba09c83..017258b7f9 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -59,7 +59,7 @@ flowable: database-schema-update: true # 设置为 false,可通过 https://github.com/flowable/flowable-sql 初始化 db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置 check-process-definitions: false # 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程 - history-level: full # full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数 + history-level: audit # full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数 # MyBatis Plus 的配置项 mybatis-plus: -- Gitee From b21eac6ca630d9bd956285fe1d34ad573bf6e962 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 21 Mar 2024 08:53:16 +0800 Subject: [PATCH 0085/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=20findAndThen=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E6=94=AF=E6=8C=81=20key=20=E4=B8=BA?= =?UTF-8?q?=20null=20=E7=9A=84=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/framework/common/util/collection/MapUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java index 6f62573b2f..a59b53fd4b 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.common.util.collection; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; -- Gitee From 10bfbc9e6e61b302762a1e6240237cc93b19b31b Mon Sep 17 00:00:00 2001 From: liyujiang <1032694760@qq.com> Date: Thu, 21 Mar 2024 18:07:12 +0800 Subject: [PATCH 0086/1557] =?UTF-8?q?fix(trade):=20=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=89=A9=E6=B5=81=E5=85=AC=E5=8F=B8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=8F=82=E8=A7=81=20TradeOrderUpdateServiceImpl=20=E7=B1=BB?= =?UTF-8?q?=E4=B8=AD=E8=B0=83=E7=94=A8TradeOrderLogUtils.setOrderInfo?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E7=9A=84=E5=8F=82=E6=95=B0=E2=80=9CexpressNa?= =?UTF-8?q?me=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/trade/enums/order/TradeOrderOperateTypeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java index 8973ff9731..b326e8e1ea 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java @@ -17,7 +17,7 @@ public enum TradeOrderOperateTypeEnum { ADMIN_UPDATE_PRICE(2, "订单价格 {oldPayPrice} 修改,实际支付金额为 {newPayPrice} 元"), MEMBER_PAY(10, "用户付款成功"), ADMIN_UPDATE_ADDRESS(11, "收货地址修改"), - ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"), + ADMIN_DELIVERY(20, "已发货,快递公司:{expressName},快递单号:{logisticsNo}"), MEMBER_RECEIVE(30, "用户已收货"), SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"), ADMIN_PICK_UP_RECEIVE(32, "管理员自提收货"), -- Gitee From 03e3dc01216a532799e39e86a53f1b0d1bf1e46a Mon Sep 17 00:00:00 2001 From: liyujiang <1032694760@qq.com> Date: Fri, 22 Mar 2024 08:19:53 +0800 Subject: [PATCH 0087/1557] =?UTF-8?q?fix(pay):=E5=90=8E=E5=8F=B0=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=BA=94=E7=94=A8=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=9F=90=E4=B8=80=E6=B8=A0=E9=81=93=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E4=BB=BB=E7=84=B6=E6=98=BE=E7=A4=BA=E4=B8=BA?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/pay/controller/admin/app/PayAppController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java index b0d80eac37..3fb89cadea 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.pay.controller.admin.app; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -92,6 +93,8 @@ public class PayAppController { // 得到所有的应用编号,查出所有的渠道 Collection appIds = convertList(pageResult.getList(), PayAppDO::getId); List channels = channelService.getChannelListByAppIds(appIds); + // 移除未启用的渠道 + channels.removeIf(channel -> !CommonStatusEnum.ENABLE.getStatus().equals(channel.getStatus())); // 拼接后返回 return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels)); -- Gitee From ba4b3701bf0a8d0fd2bc51f0aba9ee1b20166607 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 22 Mar 2024 08:26:19 +0800 Subject: [PATCH 0088/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=90=E6=B5=81=E7=A8=8B=E5=AE=9E=E4=BE=8B=E3=80=91=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=85=A8=E9=83=A8=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9E=E4=BE=8B=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/task/BpmDeleteReasonEnum.java | 5 +- .../process/BpmProcessDefinitionRespVO.java | 6 +- .../task/BpmProcessInstanceController.java | 61 ++++++++++++++++--- ....java => BpmProcessInstancePageReqVO.java} | 11 ++-- .../vo/instance/BpmProcessInstanceRespVO.java | 5 +- .../admin/task/vo/task/BpmTaskRespVO.java | 2 +- .../task/BpmProcessInstanceConvert.java | 14 +++-- .../bpm/convert/task/BpmTaskConvert.java | 1 + .../config/BpmFlowableConfiguration.java | 6 +- ... => BpmProcessInstanceEventPublisher.java} | 2 +- .../task/BpmProcessInstanceService.java | 18 ++++-- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../bpm/service/task/BpmTaskServiceImpl.java | 2 +- 13 files changed, 97 insertions(+), 38 deletions(-) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/{BpmProcessInstanceMyPageReqVO.java => BpmProcessInstancePageReqVO.java} (79%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/{BpmProcessInstanceResultEventPublisher.java => BpmProcessInstanceEventPublisher.java} (92%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java index ed07b330ab..802b9d8904 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java @@ -16,11 +16,12 @@ public enum BpmDeleteReasonEnum { // ========== 流程实例的独有原因 ========== REJECT_TASK("审批不通过任务,原因:{}"), // 场景:用户审批不通过任务。修改文案时,需要注意 isRejectReason 方法 - CANCEL_PROCESS_INSTANCE("用户主动取消流程,原因:{}"), // 场景:用户主动取消流程 + CANCEL_PROCESS_INSTANCE_BY_START_USER("用户主动取消流程,原因:{}"), // 场景:用户主动取消流程 + CANCEL_PROCESS_INSTANCE_BY_ADMIN("管理员【{}】取消流程,原因:{}"), // 场景:管理员取消流程 // ========== 流程任务的独有原因 ========== - CANCEL_SYSTEM("系统自动取消"), // 场景:非常多,比如说:1)多任务审批已经满足条件,无需审批该任务;2)流程实例被取消,无需审批该任务;等等 + CANCEL_BY_SYSTEM("系统自动取消"), // 场景:非常多,比如说:1)多任务审批已经满足条件,无需审批该任务;2)流程实例被取消,无需审批该任务;等等 ; private final String reason; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index 4fa56d4a37..27164c6957 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import jakarta.validation.constraints.NotEmpty; - import java.time.LocalDateTime; import java.util.List; @@ -19,9 +17,11 @@ public class BpmProcessDefinitionRespVO { private Integer version; @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") - @NotEmpty(message = "流程名称不能为空") private String name; + @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao") + private String key; + @Schema(description = "流程描述", example = "我是描述") private String description; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 2db6b76f91..3208013bd7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -4,7 +4,10 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; @@ -59,9 +62,10 @@ public class BpmProcessInstanceController { @GetMapping("/my-page") @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") - public CommonResult> getMyProcessInstancePage( - @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { - PageResult pageResult = processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO); + public CommonResult> getProcessInstanceMyPage( + @Valid BpmProcessInstancePageReqVO pageReqVO) { + PageResult pageResult = processInstanceService.getProcessInstancePage( + getLoginUserId(), pageReqVO); if (CollUtil.isEmpty(pageResult.getList())) { return success(PageResult.empty(pageResult.getTotal())); } @@ -73,8 +77,35 @@ public class BpmProcessInstanceController { convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)); Map categoryMap = categoryService.getCategoryMap( convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory)); - return success(BpmProcessInstanceConvert.INSTANCE.buildMyProcessInstancePage(pageResult, - processDefinitionMap, categoryMap, taskMap)); + return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult, + processDefinitionMap, categoryMap, taskMap, null, null)); + } + + @GetMapping("/manager-page") + @Operation(summary = "获得管理流程实例的分页列表", description = "在【流程实例】菜单中,进行调用") + @PreAuthorize("@ss.hasPermission('bpm:process-instance:manager-query')") + public CommonResult> getProcessInstanceManagerPage( + @Valid BpmProcessInstancePageReqVO pageReqVO) { + PageResult pageResult = processInstanceService.getProcessInstancePage( + null, pageReqVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty(pageResult.getTotal())); + } + + // 拼接返回 + Map> taskMap = taskService.getTaskMapByProcessInstanceIds( + convertList(pageResult.getList(), HistoricProcessInstance::getId)); + Map processDefinitionMap = processDefinitionService.getProcessDefinitionMap( + convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)); + Map categoryMap = categoryService.getCategoryMap( + convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory)); + // 发起人信息 + Map userMap = adminUserApi.getUserMap( + convertSet(pageResult.getList(), processInstance -> NumberUtils.parseLong(processInstance.getStartUserId()))); + Map deptMap = deptApi.getDeptMap( + convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult, + processDefinitionMap, categoryMap, taskMap, userMap, deptMap)); } @PostMapping("/create") @@ -109,11 +140,21 @@ public class BpmProcessInstanceController { processDefinition, processDefinitionInfo, bpmnXml, startUser, dept)); } - @DeleteMapping("/cancel") - @Operation(summary = "取消流程实例", description = "撤回发起的流程") + @DeleteMapping("/cancel-by-start-user") + @Operation(summary = "用户取消流程实例", description = "取消发起的流程") @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')") - public CommonResult cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { - processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO); + public CommonResult cancelProcessInstanceByStartUser( + @Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { + processInstanceService.cancelProcessInstanceByStartUser(getLoginUserId(), cancelReqVO); + return success(true); + } + + @DeleteMapping("/cancel-by-admin") + @Operation(summary = "管理员取消流程实例", description = "管理员撤回流程") + @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel-by-admin')") + public CommonResult cancelProcessInstanceByManager( + @Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { + processInstanceService.cancelProcessInstanceByAdmin(getLoginUserId(), cancelReqVO); return success(true); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java similarity index 79% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java index 4945b2b9ad..bc658eb874 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java @@ -5,19 +5,15 @@ import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") +@Schema(description = "管理后台 - 流程实例分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class BpmProcessInstanceMyPageReqVO extends PageParam { +public class BpmProcessInstancePageReqVO extends PageParam { @Schema(description = "流程名称", example = "芋道") private String name; @@ -36,4 +32,7 @@ public class BpmProcessInstanceMyPageReqVO extends PageParam { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; + @Schema(description = "发起用户编号", example = "1024") + private Long startUserId; // 注意,只有在【流程实例】菜单,才使用该参数 + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index d6e67dd349..ac6b90c7e1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -26,12 +26,15 @@ public class BpmProcessInstanceRespVO { @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举 - @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "发起时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime startTime; @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; + @Schema(description = "持续时间", example = "1000") + private Long durationInMillis; + @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED) private Map formVariables; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 26b8e80b05..7f5177b948 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -24,7 +24,7 @@ public class BpmTaskRespVO { @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; - @Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000") + @Schema(description = "持续时间", example = "1000") private Long durationInMillis; @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 1f6e38a3d4..745eab330b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -36,10 +36,12 @@ public interface BpmProcessInstanceConvert { BpmProcessInstanceConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceConvert.class); - default PageResult buildMyProcessInstancePage(PageResult pageResult, - Map processDefinitionMap, - Map categoryMap, - Map> taskMap) { + default PageResult buildProcessInstancePage(PageResult pageResult, + Map processDefinitionMap, + Map categoryMap, + Map> taskMap, + Map userMap, + Map deptMap) { PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstanceRespVO.class); for (int i = 0; i < pageResult.getList().size(); i++) { BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i); @@ -48,6 +50,10 @@ public interface BpmProcessInstanceConvert { processDefinition -> respVO.setCategory(processDefinition.getCategory())); MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class)); + // user + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(pageResult.getList().get(i).getStartUserId())); + respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); + MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName())); } return vpPageResult; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 67b882c954..6fd404e289 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -46,6 +46,7 @@ public interface BpmTaskConvert { if (processInstance == null) { return; } + taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class)); AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId())); taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); }); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java index 979d191535..8e69fdc752 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java @@ -4,7 +4,7 @@ import cn.hutool.core.collection.ListUtil; import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.BpmActivityBehaviorFactory; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import org.flowable.common.engine.api.delegate.event.FlowableEventListener; import org.flowable.spring.SpringProcessEngineConfiguration; @@ -84,8 +84,8 @@ public class BpmFlowableConfiguration { // =========== 自己拓展的 Bean ========== @Bean - public BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher(ApplicationEventPublisher publisher) { - return new BpmProcessInstanceResultEventPublisher(publisher); + public BpmProcessInstanceEventPublisher processInstanceEventPublisher(ApplicationEventPublisher publisher) { + return new BpmProcessInstanceEventPublisher(publisher); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceEventPublisher.java similarity index 92% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceEventPublisher.java index bf85c58c8e..c0429f2c3a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceEventPublisher.java @@ -14,7 +14,7 @@ import jakarta.validation.Valid; */ @AllArgsConstructor @Validated -public class BpmProcessInstanceResultEventPublisher { +public class BpmProcessInstanceEventPublisher { private final ApplicationEventPublisher publisher; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index 3473cbcadf..4ef484551d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import jakarta.validation.Valid; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; @@ -93,8 +93,8 @@ public interface BpmProcessInstanceService { * @param pageReqVO 分页请求 * @return 流程实例的分页 */ - PageResult getMyProcessInstancePage(Long userId, - @Valid BpmProcessInstanceMyPageReqVO pageReqVO); + PageResult getProcessInstancePage(Long userId, + @Valid BpmProcessInstancePageReqVO pageReqVO); /** * 创建流程实例(提供给前端) @@ -115,12 +115,20 @@ public interface BpmProcessInstanceService { String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO); /** - * 取消流程实例 + * 发起人取消流程实例 * * @param userId 用户编号 * @param cancelReqVO 取消信息 */ - void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO); + void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO); + + /** + * 管理员取消流程实例 + * + * @param userId 用户编号 + * @param cancelReqVO 取消信息 + */ + void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO); /** * 更新 ProcessInstance 拓展记录为取消 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index f589e29cdd..39914df9c6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceResultEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getMyProcessInstancePage(Long userId, BpmProcessInstanceMyPageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().includeProcessVariables() .startedBy(String.valueOf(userId)) .orderByProcessInstanceStartTime().desc(); if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public void cancelProcessInstance(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。通过历史表查询 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceResultEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index e7759c56ec..9740552834 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -375,7 +375,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { log.error("[updateTaskStatusWhenCanceled][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } - updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_SYSTEM.getReason()); + updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_BY_SYSTEM.getReason()); // 补充说明:由于 Task 被删除成 HistoricTask 后,无法通过 taskService.addComment 添加理由,所以无法存储具体的取消理由 } -- Gitee From acea73c9915e6c8ec9e20efd336b18c982e63b3b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 22 Mar 2024 09:06:52 +0800 Subject: [PATCH 0089/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=90=E6=B5=81=E7=A8=8B=E4=BB=BB=E5=8A=A1=E3=80=91=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=85=A8=E9=83=A8=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9E=E4=BE=8B=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/task/BpmTaskController.java | 39 ++++++++++++++++--- .../task/BpmProcessInstanceConvert.java | 8 ++-- .../bpm/convert/task/BpmTaskConvert.java | 13 +++++-- .../bpm/service/task/BpmTaskService.java | 13 ++++++- .../bpm/service/task/BpmTaskServiceImpl.java | 25 +++++++++++- 5 files changed, 83 insertions(+), 15 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index d721cf7a8f..7d72a133bd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -59,8 +59,12 @@ public class BpmTaskController { @GetMapping("todo-page") @Operation(summary = "获取 Todo 待办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") - public CommonResult> getTodoTaskPage(@Valid BpmTaskPageReqVO pageVO) { - PageResult pageResult = taskService.getTodoTaskPage(getLoginUserId(), pageVO); + public CommonResult> getTaskTodoPage(@Valid BpmTaskPageReqVO pageVO) { + PageResult pageResult = taskService.getTaskTodoPage(getLoginUserId(), pageVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty()); + } + // 拼接数据 Map processInstanceMap = processInstanceService.getProcessInstanceMap( convertSet(pageResult.getList(), Task::getProcessInstanceId)); @@ -72,14 +76,39 @@ public class BpmTaskController { @GetMapping("done-page") @Operation(summary = "获取 Done 已办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") - public CommonResult> getDoneTaskPage(@Valid BpmTaskPageReqVO pageVO) { - PageResult pageResult = taskService.getDoneTaskPage(getLoginUserId(), pageVO); + public CommonResult> getTaskDonePage(@Valid BpmTaskPageReqVO pageVO) { + PageResult pageResult = taskService.getTaskDonePage(getLoginUserId(), pageVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty()); + } + // 拼接数据 Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId)); Map userMap = adminUserApi.getUserMap( convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); - return success(BpmTaskConvert.INSTANCE.buildDoneTaskPage(pageResult, processInstanceMap, userMap)); + return success(BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, null)); + } + + @GetMapping("manager-page") + @Operation(summary = "获取全部任务的分页", description = "用于【流程任务】菜单") + @PreAuthorize("@ss.hasPermission('bpm:task:mananger-query')") + public CommonResult> getDoneTaskPage(@Valid BpmTaskPageReqVO pageVO) { + PageResult pageResult = taskService.getTaskPage(getLoginUserId(), pageVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty()); + } + + // 拼接数据 + Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( + convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId)); + // 获得 User 和 Dept Map + Set userIds = convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())); + userIds.addAll(convertSet(pageResult.getList(), task -> NumberUtils.parseLong(task.getAssignee()))); + Map userMap = adminUserApi.getUserMap(userIds); + Map deptMap = deptApi.getDeptMap( + convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + return success(BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, deptMap)); } @GetMapping("/list-by-process-instance-id") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 745eab330b..5d28c99a76 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -51,9 +51,11 @@ public interface BpmProcessInstanceConvert { MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class)); // user - AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(pageResult.getList().get(i).getStartUserId())); - respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); - MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName())); + if (userMap != null) { + AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(pageResult.getList().get(i).getStartUserId())); + respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); + MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName())); + } } return vpPageResult; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 6fd404e289..5f4e915d3f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -52,12 +52,19 @@ public interface BpmTaskConvert { }); } - default PageResult buildDoneTaskPage(PageResult pageResult, - Map processInstanceMap, - Map userMap) { + default PageResult buildTaskPage(PageResult pageResult, + Map processInstanceMap, + Map userMap, + Map deptMap) { List taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)); + // 用户信息 + AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee())); + if (assignUser != null) { + taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class)); + findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName())); + } // 流程实例 HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId()); if (processInstance != null) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 83bb3eb0a9..f69757f142 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -27,7 +27,7 @@ public interface BpmTaskService { * @param pageReqVO 分页请求 * @return 流程任务分页 */ - PageResult getTodoTaskPage(Long userId, BpmTaskPageReqVO pageReqVO); + PageResult getTaskTodoPage(Long userId, BpmTaskPageReqVO pageReqVO); /** * 获得已办的流程任务分页 @@ -36,7 +36,16 @@ public interface BpmTaskService { * @param pageReqVO 分页请求 * @return 流程任务分页 */ - PageResult getDoneTaskPage(Long userId, BpmTaskPageReqVO pageReqVO); + PageResult getTaskDonePage(Long userId, BpmTaskPageReqVO pageReqVO); + + /** + * 获得全部的流程任务分页 + * + * @param userId 用户编号 + * @param pageReqVO 分页请求 + * @return 流程任务分页 + */ + PageResult getTaskPage(Long userId, BpmTaskPageReqVO pageReqVO); /** * 获得流程任务 Map diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 9740552834..7afed756b8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -86,7 +86,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { private AdminUserApi adminUserApi; @Override - public PageResult getTodoTaskPage(Long userId, BpmTaskPageReqVO pageVO) { + public PageResult getTaskTodoPage(Long userId, BpmTaskPageReqVO pageVO) { TaskQuery taskQuery = taskService.createTaskQuery() .taskAssignee(String.valueOf(userId)) // 分配给自己 .active() @@ -108,7 +108,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } @Override - public PageResult getDoneTaskPage(Long userId, BpmTaskPageReqVO pageVO) { + public PageResult getTaskDonePage(Long userId, BpmTaskPageReqVO pageVO) { HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery() .finished() // 已完成 .taskAssignee(String.valueOf(userId)) // 分配给自己 @@ -130,6 +130,27 @@ public class BpmTaskServiceImpl implements BpmTaskService { return new PageResult<>(tasks, count); } + @Override + public PageResult getTaskPage(Long userId, BpmTaskPageReqVO pageVO) { + HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery() + .includeTaskLocalVariables() + .orderByHistoricTaskInstanceEndTime().desc(); // 审批时间倒序 + if (StrUtil.isNotBlank(pageVO.getName())) { + taskQuery.taskNameLike("%" + pageVO.getName() + "%"); + } + if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { + taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); + taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1])); + } + // 执行查询 + long count = taskQuery.count(); + if (count == 0) { + return PageResult.empty(); + } + List tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); + return new PageResult<>(tasks, count); + } + @Override public List getTasksByProcessInstanceIds(List processInstanceIds) { if (CollUtil.isEmpty(processInstanceIds)) { -- Gitee From 528a321f0aa178b4b36b764075371ca1d3ada7e0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 Mar 2024 00:54:26 +0800 Subject: [PATCH 0090/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E3=80=8C=E5=8F=91=E8=B5=B7=E4=BA=BA=E8=87=AA=E9=80=89=E3=80=8D?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1=E5=AE=A1=E6=89=B9=E4=BA=BA=E7=9A=84?= =?UTF-8?q?=E5=88=86=E9=85=8D=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/BpmProcessInstanceCreateReqDTO.java | 7 +- .../module/bpm/enums/ErrorCodeConstants.java | 5 +- .../BpmProcessDefinitionController.java | 25 ++++-- .../vo/category/BpmCategorySaveReqVO.java | 3 + .../process/BpmProcessDefinitionRespVO.java | 17 ++++- .../admin/oa/vo/BpmOALeaveCreateReqVO.java | 5 ++ .../task/BpmProcessInstanceController.java | 4 +- .../BpmProcessInstanceCreateReqVO.java | 5 +- .../BpmProcessDefinitionConvert.java | 57 ++++++++++---- .../task/BpmProcessInstanceConvert.java | 2 +- .../dataobject/definition/BpmCategoryDO.java | 11 ++- .../dal/mysql/category/BpmCategoryMapper.java | 2 +- .../bpm/framework/FlowableContextHolder.java | 41 ---------- .../candidate/BpmTaskCandidateInvoker.java | 37 +++------ .../candidate/BpmTaskCandidateStrategy.java | 9 +++ .../BpmTaskAssignLeaderExpression.java | 4 +- .../BpmTaskAssignStartUserExpression.java | 4 +- ...mTaskCandidateStartUserSelectStrategy.java | 76 +++++++++++++++++++ .../flowable/core/enums/BpmConstants.java | 6 ++ .../enums/BpmTaskCandidateStrategyEnum.java | 1 + .../flowable/core/util/BpmnModelUtils.java | 20 +++++ .../flowable/core/util/FlowableUtils.java | 15 +++- .../definition/BpmFormServiceImpl.java | 6 +- .../BpmProcessDefinitionService.java | 15 ++-- .../BpmProcessDefinitionServiceImpl.java | 12 +-- .../bpm/service/oa/BpmOALeaveServiceImpl.java | 3 +- .../task/BpmProcessInstanceService.java | 21 ----- .../task/BpmProcessInstanceServiceImpl.java | 2 +- .../BpmTaskAssignLeaderExpressionTest.java | 5 +- .../category/BpmCategoryServiceImplTest.java | 53 +++++++------ .../definition/BpmFormServiceTest.java | 5 +- .../src/test/resources/sql/clean.sql | 1 + .../src/test/resources/sql/create_tables.sql | 15 ++++ 33 files changed, 305 insertions(+), 189 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java index 629742bc82..b1ac35366f 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/dto/BpmProcessInstanceCreateReqDTO.java @@ -32,14 +32,13 @@ public class BpmProcessInstanceCreateReqDTO { @NotEmpty(message = "业务的唯一标识") private String businessKey; - // TODO @hai:assignees 复数 /** - * 提前指派的审批人 + * 发起人自选审批人 Map * * key:taskKey 任务编码 * value:审批人的数组 - * 例如: { taskKey1 :[1, 2] },则表示 taskKey1 这个任务,提前设定了,由 userId 为 1,2 的用户进行审批 + * 例如:{ taskKey1 :[1, 2] },则表示 taskKey1 这个任务,提前设定了,由 userId 为 1,2 的用户进行审批 */ - private Map> assignee; + private Map> startUserSelectAssignees; } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 310e1b623c..70e13cbe18 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -29,12 +29,13 @@ public interface ErrorCodeConstants { ErrorCode PROCESS_DEFINITION_NAME_NOT_MATCH = new ErrorCode(1_009_003_001, "流程定义的名字期望是({}),当前是({}),请修改 BPMN 流程图"); ErrorCode PROCESS_DEFINITION_NOT_EXISTS = new ErrorCode(1_009_003_002, "流程定义不存在"); ErrorCode PROCESS_DEFINITION_IS_SUSPENDED = new ErrorCode(1_009_003_003, "流程定义处于挂起状态"); - ErrorCode PROCESS_DEFINITION_BPMN_MODEL_NOT_EXISTS = new ErrorCode(1_009_003_004, "流程定义的模型不存在"); // ========== 流程实例 1-009-004-000 ========== ErrorCode PROCESS_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_004_000, "流程实例不存在"); ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS = new ErrorCode(1_009_004_001, "流程取消失败,流程不处于运行中"); ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF = new ErrorCode(1_009_004_002, "流程取消失败,该流程不是你发起的"); + ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG = new ErrorCode(1_009_004_003, "审批任务({})的审批人未配置"); + ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS = new ErrorCode(1_009_004_004, "审批任务({})的审批人({})不存在"); // ========== 流程任务 1-009-005-000 ========== ErrorCode TASK_OPERATE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "操作失败,原因:该任务的审批人不是你"); @@ -50,8 +51,6 @@ public interface ErrorCodeConstants { ErrorCode TASK_SIGN_DELETE_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); ErrorCode TASK_TRANSFER_FAIL_USER_REPEAT = new ErrorCode(1_009_005_013, "任务转办失败,转办人和当前审批人为同一人"); ErrorCode TASK_TRANSFER_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_014, "任务转办失败,转办人不存在"); - - // ========== 流程任务分配规则 1-009-006-000 TODO 芋艿:这里要改下 ========== ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败,原因:找不到任务的审批人!"); // ========== 动态表单模块 1-009-010-000 ========== diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java index ff3c37b08d..149737ca0f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.bpm.convert.definition.BpmProcessDefinitionConver import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; @@ -16,6 +17,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.UserTask; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; import org.springframework.security.access.prepost.PreAuthorize; @@ -89,13 +92,23 @@ public class BpmProcessDefinitionController { list, null, processDefinitionMap, null, null)); } - @GetMapping ("/get-bpmn-xml") - @Operation(summary = "获得流程定义的 BPMN XML") - @Parameter(name = "id", description = "编号", required = true, example = "1024") + @GetMapping ("/get") + @Operation(summary = "获得流程定义") + @Parameter(name = "id", description = "流程编号", required = true, example = "1024") + @Parameter(name = "key", description = "流程定义标识", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") - public CommonResult getProcessDefinitionBpmnXML(@RequestParam("id") String id) { - String bpmnXML = processDefinitionService.getProcessDefinitionBpmnXML(id); - return success(bpmnXML); + public CommonResult getProcessDefinition( + @RequestParam(value = "id", required = false) String id, + @RequestParam(value = "key", required = false) String key) { + ProcessDefinition processDefinition = id != null ? processDefinitionService.getProcessDefinition(id) + : processDefinitionService.getActiveProcessDefinition(key); + if (processDefinition == null) { + return success(null); + } + BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId()); + List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); + return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition( + processDefinition, null, null, null, null, bpmnModel, userTaskList)); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java index 352cf690b4..d1a175ec57 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java @@ -18,6 +18,9 @@ public class BpmCategorySaveReqVO { @NotEmpty(message = "分类名不能为空") private String name; + @Schema(description = "分类描述", example = "你猜") + private String description; + @Schema(description = "分类标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "OA") @NotEmpty(message = "分类标志不能为空") private String code; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index 27164c6957..f54e318031 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -48,7 +48,7 @@ public class BpmProcessDefinitionRespVO { private String formCustomViewPath; @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer suspensionState; + private Integer suspensionState; // 参见 SuspensionState 枚举 @Schema(description = "部署时间") private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取,非必须返回 @@ -56,4 +56,19 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "BPMN XML") private String bpmnXml; // 需要从对应的 BpmnModel 读取,非必须返回 + @Schema(description = "发起用户需要选择审批人的任务数组") + private List startUserSelectTasks; // 需要从对应的 BpmnModel 读取,非必须返回 + + @Schema(description = "BPMN UserTask 用户任务") + @Data + public static class UserTask { + + @Schema(description = "任务标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "sudo") + private String id; + + @Schema(description = "任务名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + private String name; + + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java index 8f84a281d2..856a225477 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java @@ -7,6 +7,8 @@ import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -30,6 +32,9 @@ public class BpmOALeaveCreateReqVO { @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码") private String reason; + @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}") + private Map> startUserSelectAssignees; + @AssertTrue(message = "结束时间,需要在开始时间之后") public boolean isEndTimeValid() { return !getEndTime().isBefore(getStartTime()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 3208013bd7..50fbc9fa8b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessI import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; @@ -130,7 +131,8 @@ public class BpmProcessInstanceController { processInstance.getProcessDefinitionId()); BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo( processInstance.getProcessDefinitionId()); - String bpmnXml = processDefinitionService.getProcessDefinitionBpmnXML(processInstance.getProcessDefinitionId()); + String bpmnXml = BpmnModelUtils.getBpmnXml( + processDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId())); AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())); DeptRespDTO dept = null; if (startUser != null) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java index f477498616..b13ff561fb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java @@ -18,8 +18,7 @@ public class BpmProcessInstanceCreateReqVO { @Schema(description = "变量实例(动态表单)") private Map variables; - // TODO @hai:assignees 复数 - @Schema(description = "提前指派的审批人", requiredMode = Schema.RequiredMode.REQUIRED, example = "{taskKey1: [1, 2]}") - private Map> assignee; + @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}") + private Map> startUserSelectAssignees; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java index 1b5897dd50..61187424bb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java @@ -4,12 +4,14 @@ import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.map.MapUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.UserTask; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.ProcessDefinition; @@ -47,27 +49,50 @@ public interface BpmProcessDefinitionConvert { Map formMap, Map categoryMap) { return CollectionUtils.convertList(list, definition -> { - BpmProcessDefinitionRespVO respVO = BeanUtils.toBean(definition, BpmProcessDefinitionRespVO.class); - respVO.setSuspensionState(definition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); - // Deployment - MapUtils.findAndThen(deploymentMap, definition.getDeploymentId(), - deployment -> respVO.setDeploymentTime(LocalDateTimeUtil.of(deployment.getDeploymentTime()))); - // BpmProcessDefinitionInfoDO + Deployment deployment = MapUtil.get(deploymentMap, definition.getDeploymentId(), Deployment.class); BpmProcessDefinitionInfoDO processDefinitionInfo = MapUtil.get(processDefinitionInfoMap, definition.getId(), BpmProcessDefinitionInfoDO.class); + BpmFormDO form = null; if (processDefinitionInfo != null) { - copyTo(processDefinitionInfo, respVO); - // Form - BpmFormDO form = MapUtil.get(formMap, processDefinitionInfo.getFormId(), BpmFormDO.class); - if (form != null) { - respVO.setFormName(form.getName()); - } + form = MapUtil.get(formMap, processDefinitionInfo.getFormId(), BpmFormDO.class); } - // Category - MapUtils.findAndThen(categoryMap, definition.getCategory(), category -> respVO.setCategoryName(category.getName())); - return respVO; + BpmCategoryDO category = MapUtil.get(categoryMap, definition.getCategory(), BpmCategoryDO.class); + return buildProcessDefinition(definition, deployment, processDefinitionInfo, form, category, null, null); }); } + default BpmProcessDefinitionRespVO buildProcessDefinition(ProcessDefinition definition, + Deployment deployment, + BpmProcessDefinitionInfoDO processDefinitionInfo, + BpmFormDO form, + BpmCategoryDO category, + BpmnModel bpmnModel, + List startUserSelectUserTaskList) { + BpmProcessDefinitionRespVO respVO = BeanUtils.toBean(definition, BpmProcessDefinitionRespVO.class); + respVO.setSuspensionState(definition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); + // Deployment + if (deployment != null) { + respVO.setDeploymentTime(LocalDateTimeUtil.of(deployment.getDeploymentTime())); + } + // BpmProcessDefinitionInfoDO + if (processDefinitionInfo != null) { + copyTo(processDefinitionInfo, respVO); + // Form + if (form != null) { + respVO.setFormName(form.getName()); + } + } + // Category + if (category != null) { + respVO.setCategoryName(category.getName()); + } + // BpmnModel + if (bpmnModel != null) { + respVO.setBpmnXml(BpmnModelUtils.getBpmnXml(bpmnModel)); + respVO.setStartUserSelectTasks(BeanUtils.toBean(startUserSelectUserTaskList, BpmProcessDefinitionRespVO.UserTask.class)); + } + return respVO; + } + @Mapping(source = "from.id", target = "to.id", ignore = true) void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java index 5d28c99a76..d2b326e116 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java @@ -68,7 +68,7 @@ public interface BpmProcessInstanceConvert { DeptRespDTO dept) { BpmProcessInstanceRespVO respVO = BeanUtils.toBean(processInstance, BpmProcessInstanceRespVO.class); respVO.setStatus(FlowableUtils.getProcessInstanceStatus(processInstance)); - respVO.setFormVariables(FlowableUtils.filterProcessInstanceFormVariable(processInstance.getProcessVariables())); + respVO.setFormVariables(FlowableUtils.getProcessInstanceFormVariable(processInstance)); // definition respVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); copyTo(processDefinitionExt, respVO.getProcessDefinition()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java index 2fe0963bb5..560a8ead6d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; -import lombok.*; -import java.util.*; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import com.baomidou.mybatisplus.annotation.*; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; /** * BPM 流程分类 DO @@ -42,7 +41,7 @@ public class BpmCategoryDO extends BaseDO { /** * 分类状态 * - * 枚举 {@link TODO common_status 对应的类} + * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} */ private Integer status; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java index 888856a45a..5fc8236e84 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java @@ -21,7 +21,7 @@ public interface BpmCategoryMapper extends BaseMapperX { default PageResult selectPage(BpmCategoryPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(BpmCategoryDO::getName, reqVO.getName()) - .eqIfPresent(BpmCategoryDO::getCode, reqVO.getCode()) + .likeIfPresent(BpmCategoryDO::getCode, reqVO.getCode()) .eqIfPresent(BpmCategoryDO::getStatus, reqVO.getStatus()) .betweenIfPresent(BpmCategoryDO::getCreateTime, reqVO.getCreateTime()) .orderByAsc(BpmCategoryDO::getSort)); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java deleted file mode 100644 index 6e4fb99e32..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/FlowableContextHolder.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework; - -import cn.hutool.core.collection.CollUtil; -import com.alibaba.ttl.TransmittableThreadLocal; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * 工作流--用户用到的上下文相关信息 - */ -@Deprecated // TODO 芋艿:找个方式,去掉这个上下文 -public class FlowableContextHolder { - - private static final ThreadLocal>> ASSIGNEE = new TransmittableThreadLocal<>(); - - /** - * 通过流程任务的定义 key ,拿到提前选好的审批人 - * 此方法目的:首次创建流程实例时,数据库中还查询不到 assignee 字段,所以存入上下文中获取 - * - * @param taskDefinitionKey 流程任务 key - * @return 审批人 ID 集合 - */ - public static List getAssigneeByTaskDefinitionKey(String taskDefinitionKey) { - if (CollUtil.isNotEmpty(ASSIGNEE.get())) { - return ASSIGNEE.get().get(taskDefinitionKey); - } - return Collections.emptyList(); - } - - /** - * 存入提前选好的审批人到上下文线程变量中 - * - * @param assignee 流程任务 key -> 审批人 ID 炅和 - */ - public static void setAssignee(Map> assignee) { - ASSIGNEE.set(assignee); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java index e1fb626320..7bad358070 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java @@ -4,16 +4,13 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; -import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.delegate.DelegateExecution; @@ -60,9 +57,13 @@ public class BpmTaskCandidateInvoker { // 遍历所有的 UserTask,校验审批人配置 userTaskList.forEach(userTask -> { // 1. 非空校验 - Integer strategy = parseCandidateStrategy(userTask); - String param = parseCandidateParam(userTask); - if (strategy == null || StrUtil.isBlank(param)) { + Integer strategy = BpmnModelUtils.parseCandidateStrategy(userTask); + String param = BpmnModelUtils.parseCandidateParam(userTask); + if (strategy == null) { + throw exception(MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG, userTask.getName()); + } + BpmTaskCandidateStrategy candidateStrategy = getCandidateStrategy(strategy); + if (candidateStrategy.isParamRequired() && StrUtil.isBlank(param)) { throw exception(MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG, userTask.getName()); } // 2. 具体策略校验 @@ -77,16 +78,8 @@ public class BpmTaskCandidateInvoker { * @return 用户编号集合 */ public Set calculateUsers(DelegateExecution execution) { - // TODO 芋艿:这里需要重构 -// // 1. 先从提前选好的审批人中获取 -// List assignee = processInstanceService.getAssigneeByProcessInstanceIdAndTaskDefinitionKey( -// execution.getProcessInstanceId(), execution.getCurrentActivityId()); -// if (CollUtil.isNotEmpty(assignee)) { -// // TODO @hai:new HashSet 即可 -// return convertSet(assignee, Function.identity()); -// } - Integer strategy = parseCandidateStrategy(execution.getCurrentFlowElement()); - String param = parseCandidateParam(execution.getCurrentFlowElement()); + Integer strategy = BpmnModelUtils.parseCandidateStrategy(execution.getCurrentFlowElement()); + String param = BpmnModelUtils.parseCandidateParam(execution.getCurrentFlowElement()); // 1.1 计算任务的候选人 Set userIds = getCandidateStrategy(strategy).calculateUsers(execution, param); // 1.2 移除被禁用的用户 @@ -113,16 +106,6 @@ public class BpmTaskCandidateInvoker { }); } - private static Integer parseCandidateStrategy(FlowElement userTask) { - return NumberUtils.parseInt(userTask.getAttributeValue( - BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); - } - - private static String parseCandidateParam(FlowElement userTask) { - return userTask.getAttributeValue( - BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM); - } - private BpmTaskCandidateStrategy getCandidateStrategy(Integer strategy) { BpmTaskCandidateStrategyEnum strategyEnum = BpmTaskCandidateStrategyEnum.valueOf(strategy); Assert.notNull(strategyEnum, "策略(%s) 不存在", strategy); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java index a5c5c9b4d9..1534d39c28 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateStrategy.java @@ -36,4 +36,13 @@ public interface BpmTaskCandidateStrategy { */ Set calculateUsers(DelegateExecution execution, String param); + /** + * 是否一定要输入参数 + * + * @return 是否 + */ + default boolean isParamRequired() { + return true; + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java index cb5306548d..7a021ab2be 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java @@ -32,12 +32,12 @@ public class BpmTaskAssignLeaderExpression { private DeptApi deptApi; @Resource - private BpmProcessInstanceService bpmProcessInstanceService; + private BpmProcessInstanceService processInstanceService; protected Set calculateUsers(DelegateExecution execution, int level) { Assert.isTrue(level > 0, "level 必须大于 0"); // 获得发起人 - ProcessInstance processInstance = bpmProcessInstanceService.getProcessInstance(execution.getProcessInstanceId()); + ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); // 获得对应 leve 的部门 DeptRespDTO dept = null; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index c4d8811b41..451ceed609 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -19,10 +19,10 @@ import java.util.Set; public class BpmTaskAssignStartUserExpression { @Resource - private BpmProcessInstanceService bpmProcessInstanceService; + private BpmProcessInstanceService processInstanceService; public Set calculateUsers(DelegateExecution execution) { - ProcessInstance processInstance = bpmProcessInstanceService.getProcessInstance(execution.getProcessInstanceId()); + ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); return SetUtils.asSet(startUserId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java new file mode 100644 index 0000000000..ef31d88854 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import jakarta.annotation.Resource; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.UserTask; +import org.flowable.engine.delegate.DelegateExecution; +import org.flowable.engine.runtime.ProcessInstance; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.util.*; + +/** + * 发起人自选 {@link BpmTaskCandidateUserStrategy} 实现类 + * + * @author 芋道源码 + */ +@Component +public class BpmTaskCandidateStartUserSelectStrategy implements BpmTaskCandidateStrategy { + + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmProcessInstanceService processInstanceService; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.START_USER_SELECT; + } + + @Override + public void validateParam(String param) {} + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); + Assert.notNull(processInstance, "流程实例({})不能为空", execution.getProcessInstanceId()); + Map> startUserSelectAssignees = FlowableUtils.getStartUserSelectAssignees(processInstance); + Assert.notNull(startUserSelectAssignees, "流程实例({}) 的发起人自选审批人不能为空", + execution.getProcessInstanceId()); + // 获得审批人 + List assignees = startUserSelectAssignees.get(execution.getCurrentActivityId()); + return new LinkedHashSet<>(assignees); + } + + @Override + public boolean isParamRequired() { + return false; + } + + /** + * 获得发起人自选审批人的 UserTask 列表 + * + * @param bpmnModel BPMN 模型 + * @return UserTask 列表 + */ + public static List getStartUserSelectUserTaskList(BpmnModel bpmnModel) { + if (bpmnModel == null) { + return null; + } + List userTaskList = BpmnModelUtils.getBpmnModelElements(bpmnModel, UserTask.class); + if (CollUtil.isEmpty(userTaskList)) { + return null; + } + userTaskList.removeIf(userTask -> !Objects.equals(BpmnModelUtils.parseCandidateStrategy(userTask), + BpmTaskCandidateStrategyEnum.START_USER_SELECT.getStrategy())); + return userTaskList; + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java index 6dd5e79c7b..e965d22811 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmConstants.java @@ -15,6 +15,12 @@ public class BpmConstants { * @see ProcessInstance#getProcessVariables() */ public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS"; + /** + * 流程实例的变量 - 发起用户选择的审批人 Map + * + * @see ProcessInstance#getProcessVariables() + */ + public static final String PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES = "PROCESS_START_USER_SELECT_ASSIGNEES"; /** * 任务的变量 - 状态 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java index 0c31998215..a8b5385012 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java @@ -20,6 +20,7 @@ public enum BpmTaskCandidateStrategyEnum { DEPT_LEADER(21, "部门的负责人"), POST(22, "岗位"), USER(30, "用户"), + START_USER_SELECT(35, "发起人自选"), // 申请人自己,可在提交申请时选择此节点的审批人 USER_GROUP(40, "用户组"), EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager ; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 9763bc8a60..bcf82d731c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; @@ -14,6 +16,16 @@ import java.util.*; */ public class BpmnModelUtils { + public static Integer parseCandidateStrategy(FlowElement userTask) { + return NumberUtils.parseInt(userTask.getAttributeValue( + BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); + } + + public static String parseCandidateParam(FlowElement userTask) { + return userTask.getAttributeValue( + BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM); + } + /** * 根据节点,获取入口连线 * @@ -91,6 +103,14 @@ public class BpmnModelUtils { return converter.convertToBpmnModel(new BytesStreamSource(bpmnBytes), false, false); } + public static String getBpmnXml(BpmnModel model) { + if (model == null) { + return null; + } + BpmnXMLConverter converter = new BpmnXMLConverter(); + return new String(converter.convertToXML(model)); + } + // ========== 遍历相关的方法 ========== /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java index 3fceb60fd2..6a65dd8044 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java @@ -12,6 +12,7 @@ import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.TaskInfo; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -79,7 +80,7 @@ public class FlowableUtils { * @param processInstance 流程实例 * @return 表单 */ - public static Map getProcessInstanceFormVariable(ProcessInstance processInstance) { + public static Map getProcessInstanceFormVariable(HistoricProcessInstance processInstance) { Map formVariables = new HashMap<>(processInstance.getProcessVariables()); filterProcessInstanceFormVariable(formVariables); return formVariables; @@ -98,6 +99,18 @@ public class FlowableUtils { return processVariables; } + /** + * 获得流程实例的发起用户选择的审批人 Map + * + * @param processInstance 流程实例 + * @return 发起用户选择的审批人 Map + */ + @SuppressWarnings("unchecked") + public static Map> getStartUserSelectAssignees(ProcessInstance processInstance) { + return (Map>) processInstance.getProcessVariables().get( + BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES); + } + // ========== Task 相关的工具方法 ========== /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java index 95f2759938..d49018f6ba 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java @@ -33,7 +33,7 @@ public class BpmFormServiceImpl implements BpmFormService { @Override public Long createForm(BpmFormSaveReqVO createReqVO) { - this.vadateFields(createReqVO.getFields()); + this.validateFields(createReqVO.getFields()); // 插入 BpmFormDO form = BeanUtils.toBean(createReqVO, BpmFormDO.class); formMapper.insert(form); @@ -43,7 +43,7 @@ public class BpmFormServiceImpl implements BpmFormService { @Override public void updateForm(BpmFormSaveReqVO updateReqVO) { - vadateFields(updateReqVO.getFields()); + validateFields(updateReqVO.getFields()); // 校验存在 validateFormExists(updateReqVO.getId()); // 更新 @@ -93,7 +93,7 @@ public class BpmFormServiceImpl implements BpmFormService { * * @param fields field 数组 */ - private void vadateFields(List fields) { + private void validateFields(List fields) { if (true) { // TODO 芋艿:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验 return; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java index 7126d652ef..5e2e2f8051 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionService.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; +import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ProcessDefinition; @@ -61,12 +62,12 @@ public interface BpmProcessDefinitionService { void updateProcessDefinitionState(String id, Integer state); /** - * 获得流程定义对应的 BPMN XML + * 获得流程定义对应的 BPMN * * @param id 流程定义编号 - * @return BPMN XML + * @return BPMN */ - String getProcessDefinitionBpmnXML(String id); + BpmnModel getProcessDefinitionBpmnModel(String id); /** * 获得流程定义的信息 @@ -89,9 +90,9 @@ public interface BpmProcessDefinitionService { } /** - * 获得编号对应的 ProcessDefinition + * 获得流程定义编号对应的 ProcessDefinition * - * @param id 编号 + * @param id 流程定义编号 * @return 流程定义 */ ProcessDefinition getProcessDefinition(String id); @@ -139,7 +140,7 @@ public interface BpmProcessDefinitionService { * @return 流程部署 Map */ default Map getDeploymentMap(Set ids) { - return convertMap(getDeployments(ids), Deployment::getId); + return convertMap(getDeploymentList(ids), Deployment::getId); } /** @@ -148,7 +149,7 @@ public interface BpmProcessDefinitionService { * @param ids 部署编号的数组 * @return 流程部署的数组 */ - List getDeployments(Set ids); + List getDeploymentList(Set ids); /** * 获得 id 对应的 Deployment diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 85418fb830..3324a5e79a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -14,7 +14,6 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConsta import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; import org.flowable.engine.RepositoryService; @@ -84,7 +83,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } @Override - public List getDeployments(Set ids) { + public List getDeploymentList(Set ids) { if (CollUtil.isEmpty(ids)) { return emptyList(); } @@ -156,13 +155,8 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } @Override - public String getProcessDefinitionBpmnXML(String id) { - BpmnModel bpmnModel = repositoryService.getBpmnModel(id); - if (bpmnModel == null) { - return null; - } - BpmnXMLConverter converter = new BpmnXMLConverter(); - return StrUtil.utf8Str(converter.convertToXML(bpmnModel)); + public BpmnModel getProcessDefinitionBpmnModel(String id) { + return repositoryService.getBpmnModel(id); } @Override diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index c71d885054..9a84f676a8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -56,7 +56,8 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { processInstanceVariables.put("day", day); String processInstanceId = processInstanceApi.createProcessInstance(userId, new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY) - .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(leave.getId()))); + .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(leave.getId())) + .setStartUserSelectAssignees(createReqVO.getStartUserSelectAssignees())); // 将工作流的编号,更新到 OA 请假单中 leaveMapper.updateById(new BpmOALeaveDO().setId(leave.getId()).setProcessInstanceId(processInstanceId)); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index 4ef484551d..9ba4cb0774 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -49,17 +49,6 @@ public interface BpmProcessInstanceService { return convertMap(getProcessInstances(ids), ProcessInstance::getProcessInstanceId); } - /** - * 获得流程实例名字 Map - * - * @param ids 流程实例的编号集合 - * @return 对应的映射关系 - */ - default Map getProcessInstanceNameMap(Set ids) { - return convertMap(getProcessInstances(ids), - ProcessInstance::getProcessInstanceId, ProcessInstance::getName); - } - /** * 获得历史的流程实例 * @@ -152,14 +141,4 @@ public interface BpmProcessInstanceService { */ void updateProcessInstanceReject(String id, String reason); - // TODO @hai:改成 getProcessInstanceAssigneesByTaskDefinitionKey(String id, String taskDefinitionKey) - /** - * 获取流程实例中,取出指定流程任务提前指定的审批人 - * - * @param processInstanceId 流程实例的编号 - * @param taskDefinitionKey 流程任务定义的 key - * @return 审批人集合 - */ - List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey); - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index 39914df9c6..f6283eff84 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.FlowableContextHolder; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getAssignee()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getAssignee()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> assignee) { // 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 设置上下文信息 // TODO @hai:要不往 variables 存到一个全局固定 key 里,减少对上下文的依赖 FlowableContextHolder.setAssignee(assignee); // 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } @Override public List getAssigneeByProcessInstanceIdAndTaskDefinitionKey(String processInstanceId, String taskDefinitionKey) { // 1. 先从上下文获取,首次提交数据库中查询不到 List result = FlowableContextHolder.getAssigneeByTaskDefinitionKey(taskDefinitionKey); if (CollUtil.isNotEmpty(result)) { return result; } // 2. 从数据库中获取 // TODO @芋艿:指定审批人,这里的存储方案有问题,后续优化下 // BpmProcessInstanceExtDO instance = processInstanceExtMapper.selectByProcessInstanceId(processInstanceId); // if (instance == null) { // throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); // } // if (CollUtil.isNotEmpty(instance.getAssignee())) { // return instance.getAssignee().get(taskDefinitionKey); // } return Collections.emptyList(); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java index b9a77ca79e..f7eac7ca0d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java @@ -30,8 +30,9 @@ public class BpmTaskAssignLeaderExpressionTest extends BaseMockitoUnitTest { private AdminUserApi adminUserApi; @Mock private DeptApi deptApi; + @Mock - private BpmProcessInstanceService bpmProcessInstanceService; + private BpmProcessInstanceService processInstanceService; @Test public void testCalculateUsers_noDept() { @@ -96,7 +97,7 @@ public class BpmTaskAssignLeaderExpressionTest extends BaseMockitoUnitTest { // mock 返回 startUserId ExecutionEntityImpl processInstance = new ExecutionEntityImpl(); processInstance.setStartUserId(String.valueOf(startUserId)); - when(bpmProcessInstanceService.getProcessInstance(eq(execution.getProcessInstanceId()))) + when(processInstanceService.getProcessInstance(eq(execution.getProcessInstanceId()))) .thenReturn(processInstance); return execution; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java index 19f576818b..f71b8aae50 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java @@ -1,26 +1,24 @@ package cn.iocoder.yudao.module.bpm.service.category; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; -import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryServiceImpl; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import jakarta.annotation.Resource; - -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; - import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.mysql.category.BpmCategoryMapper; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - +import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryServiceImpl; +import jakarta.annotation.Resource; +import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*; +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.*; -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.*; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.CATEGORY_NOT_EXISTS; import static org.junit.jupiter.api.Assertions.*; /** @@ -40,7 +38,8 @@ public class BpmCategoryServiceImplTest extends BaseDbUnitTest { @Test public void testCreateCategory_success() { // 准备参数 - BpmCategorySaveReqVO createReqVO = randomPojo(BpmCategorySaveReqVO.class).setId(null); + BpmCategorySaveReqVO createReqVO = randomPojo(BpmCategorySaveReqVO.class).setId(null) + .setStatus(randomCommonStatus()); // 调用 Long categoryId = categoryService.createCategory(createReqVO); @@ -59,6 +58,7 @@ public class BpmCategoryServiceImplTest extends BaseDbUnitTest { // 准备参数 BpmCategorySaveReqVO updateReqVO = randomPojo(BpmCategorySaveReqVO.class, o -> { o.setId(dbCategory.getId()); // 设置更新的 ID + o.setStatus(randomCommonStatus()); }); // 调用 @@ -101,29 +101,28 @@ public class BpmCategoryServiceImplTest extends BaseDbUnitTest { } @Test - @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解 public void testGetCategoryPage() { // mock 数据 BpmCategoryDO dbCategory = randomPojo(BpmCategoryDO.class, o -> { // 等会查询到 - o.setName(null); - o.setCode(null); - o.setStatus(null); - o.setCreateTime(null); + o.setName("芋头"); + o.setCode("xiaodun"); + o.setStatus(CommonStatusEnum.ENABLE.getStatus()); + o.setCreateTime(buildTime(2023, 2, 2)); }); categoryMapper.insert(dbCategory); // 测试 name 不匹配 - categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setName(null))); + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setName("小盾"))); // 测试 code 不匹配 - categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCode(null))); + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCode("tudou"))); // 测试 status 不匹配 - categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setStatus(null))); + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 测试 createTime 不匹配 - categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCreateTime(null))); + categoryMapper.insert(cloneIgnoreId(dbCategory, o -> o.setCreateTime(buildTime(2024, 2, 2)))); // 准备参数 BpmCategoryPageReqVO reqVO = new BpmCategoryPageReqVO(); - reqVO.setName(null); - reqVO.setCode(null); - reqVO.setStatus(null); + reqVO.setName("芋"); + reqVO.setCode("xiao"); + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); // 调用 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java index 50bc3ace76..93281a4fde 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java @@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmFormMapper; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmFormFieldRespDTO; @@ -66,7 +65,7 @@ public class BpmFormServiceTest extends BaseDbUnitTest { }); formMapper.insert(dbForm);// @Sql: 先插入出一条存在的数据 // 准备参数 - BpmFormUpdateReqVO reqVO = randomPojo(BpmFormUpdateReqVO.class, o -> { + BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> { o.setId(dbForm.getId()); // 设置更新的 ID o.setConf("{'yudao': 'yuanma'}"); o.setFields(randomFields()); @@ -82,7 +81,7 @@ public class BpmFormServiceTest extends BaseDbUnitTest { @Test public void testUpdateForm_notExists() { // 准备参数 - BpmFormUpdateReqVO reqVO = randomPojo(BpmFormUpdateReqVO.class, o -> { + BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> { o.setConf("{'yudao': 'yuanma'}"); o.setFields(randomFields()); }); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/clean.sql b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/clean.sql index 6e42d3cfc6..d4f93bbc27 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/clean.sql +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/clean.sql @@ -1,2 +1,3 @@ DELETE FROM "bpm_form"; DELETE FROM "bpm_user_group"; +DELETE FROM "bpm_category"; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql index eae4d7e41a..1034962c70 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/sql/create_tables.sql @@ -12,6 +12,21 @@ CREATE TABLE IF NOT EXISTS "bpm_user_group" ( PRIMARY KEY ("id") ) COMMENT '用户组'; +CREATE TABLE IF NOT EXISTS "bpm_category" ( + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "name" varchar(63) NOT NULL, + "code" varchar(63) NOT NULL, + "description" varchar(255) NOT NULL, + "status" tinyint NOT NULL, + "sort" int NOT NULL, + "creator" varchar(64) DEFAULT '', + "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar(64) DEFAULT '', + "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, + PRIMARY KEY ("id") +) COMMENT '分类'; + CREATE TABLE IF NOT EXISTS "bpm_form" ( "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "name" varchar(63) NOT NULL, -- Gitee From 53f2d4cfd1594e1675411e0e7412f590508e7a2b Mon Sep 17 00:00:00 2001 From: liyujiang <1032694760@qq.com> Date: Sat, 23 Mar 2024 10:16:47 +0800 Subject: [PATCH 0091/1557] =?UTF-8?q?fix(trade):=20=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=97=A0=E9=9C=80=E5=8F=91=E8=B4=A7=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=8F=8F=E8=BF=B0=E6=94=B9=E4=B8=BA=E2=80=9C=E5=B7=B2?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=EF=BC=8C=E5=BF=AB=E9=80=92=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=EF=BC=9A=E6=97=A0=EF=BC=8C=E5=BF=AB=E9=80=92=E5=8D=95=E5=8F=B7?= =?UTF-8?q?=EF=BC=9A=E6=97=A0=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/service/order/TradeOrderUpdateServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java index b9f9e2e42c..310727fd19 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java @@ -361,8 +361,8 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { // 3. 记录订单日志 TradeOrderLogUtils.setOrderInfo(order.getId(), order.getStatus(), TradeOrderStatusEnum.DELIVERED.getStatus(), - MapUtil.builder().put("expressName", express != null ? express.getName() : "") - .put("logisticsNo", express != null ? deliveryReqVO.getLogisticsNo() : "").build()); + MapUtil.builder().put("expressName", express != null ? express.getName() : "无") + .put("logisticsNo", express != null ? deliveryReqVO.getLogisticsNo() : "无").build()); // 4. 发送站内信 tradeMessageService.sendMessageWhenDeliveryOrder(new TradeOrderMessageWhenDeliveryOrderReqBO() -- Gitee From a5417626974bfef428875ceab03504376c55c10f Mon Sep 17 00:00:00 2001 From: zengheng Date: Sat, 23 Mar 2024 10:57:58 +0800 Subject: [PATCH 0092/1557] =?UTF-8?q?=E4=BF=AE=E5=A4=8Derp=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E7=AE=A1=E7=90=86=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/purchase/ErpPurchaseOrderController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java index 9a3c4d8020..09e8cab289 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java @@ -61,14 +61,14 @@ public class ErpPurchaseOrderController { @PostMapping("/create") @Operation(summary = "创建采购订单") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:create')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:create')") public CommonResult createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) { return success(purchaseOrderService.createPurchaseOrder(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新采购订单") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update')") public CommonResult updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) { purchaseOrderService.updatePurchaseOrder(updateReqVO); return success(true); @@ -76,7 +76,7 @@ public class ErpPurchaseOrderController { @PutMapping("/update-status") @Operation(summary = "更新采购订单的状态") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update-status')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update-status')") public CommonResult updatePurchaseOrderStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) { purchaseOrderService.updatePurchaseOrderStatus(id, status); @@ -86,7 +86,7 @@ public class ErpPurchaseOrderController { @DeleteMapping("/delete") @Operation(summary = "删除采购订单") @Parameter(name = "ids", description = "编号数组", required = true) - @PreAuthorize("@ss.hasPermission('erp:purchase-create:delete')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:delete')") public CommonResult deletePurchaseOrder(@RequestParam("ids") List ids) { purchaseOrderService.deletePurchaseOrder(ids); return success(true); @@ -95,7 +95,7 @@ public class ErpPurchaseOrderController { @GetMapping("/get") @Operation(summary = "获得采购订单") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") public CommonResult getPurchaseOrder(@RequestParam("id") Long id) { ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id); if (purchaseOrder == null) { @@ -115,7 +115,7 @@ public class ErpPurchaseOrderController { @GetMapping("/page") @Operation(summary = "获得采购订单分页") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") public CommonResult> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) { PageResult pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO); return success(buildPurchaseOrderVOPageResult(pageResult)); @@ -123,7 +123,7 @@ public class ErpPurchaseOrderController { @GetMapping("/export-excel") @Operation(summary = "导出采购订单 Excel") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:export')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:export')") @OperateLog(type = EXPORT) public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException { -- Gitee From 889b9406b89a051b91ad3e4be40261f29d586c8d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 Mar 2024 15:58:45 +0800 Subject: [PATCH 0093/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9B=91=E5=90=AC=E5=99=A8=E3=80=81=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=9B=91=E5=90=AC=E5=99=A8=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 6 ++ .../definition/BpmProcessListenerType.java | 21 ++++ .../BpmProcessListenerValueType.java | 22 ++++ .../BpmProcessListenerController.java | 73 +++++++++++++ .../vo/category/BpmCategoryPageReqVO.java | 2 - .../definition/vo/form/BpmFormPageReqVO.java | 2 - .../vo/group/BpmUserGroupPageReqVO.java | 2 - .../listener/BpmProcessListenerPageReqVO.java | 24 +++++ .../vo/listener/BpmProcessListenerRespVO.java | 36 +++++++ .../listener/BpmProcessListenerSaveReqVO.java | 39 +++++++ .../vo/model/BpmModeImportReqVO.java | 2 - .../vo/model/BpmModelPageReqVO.java | 2 - .../BpmProcessDefinitionPageReqVO.java | 2 - .../admin/oa/vo/BpmOALeavePageReqVO.java | 2 - .../BpmProcessInstanceCopyPageReqVO.java | 4 - .../admin/task/vo/task/BpmTaskPageReqVO.java | 2 - .../dataobject/definition/BpmCategoryDO.java | 2 - .../dal/dataobject/definition/BpmFormDO.java | 4 +- .../BpmProcessDefinitionInfoDO.java | 4 +- .../definition/BpmProcessListenerDO.java | 70 ++++++++++++ .../definition/BpmTaskMessageRuleDO.java | 5 - .../dataobject/definition/BpmUserGroupDO.java | 4 +- .../bpm/dal/dataobject/oa/BpmOALeaveDO.java | 2 - .../task/BpmProcessInstanceCopyDO.java | 2 - .../definition/BpmProcessListenerMapper.java | 26 +++++ .../DemoDelegateClassExecutionListener.java | 21 ++++ ...moDelegateExpressionExecutionListener.java | 23 ++++ ...DemoSpringExpressionExecutionListener.java | 21 ++++ .../DemoDelegateClassExecutionListener.java | 22 ++++ ...moDelegateExpressionExecutionListener.java | 20 ++++ ...DemoSpringExpressionExecutionListener.java | 19 ++++ .../definition/BpmProcessListenerService.java | 54 ++++++++++ .../BpmProcessListenerServiceImpl.java | 102 ++++++++++++++++++ 33 files changed, 602 insertions(+), 40 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskMessageRuleDO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateClassExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoSpringExpressionExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateExpressionExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionExecutionListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index 70e13cbe18..b2b732ecfe 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -66,4 +66,10 @@ public interface ErrorCodeConstants { ErrorCode CATEGORY_NAME_DUPLICATE = new ErrorCode(1_009_012_001, "流程分类名字【{}】重复"); ErrorCode CATEGORY_CODE_DUPLICATE = new ErrorCode(1_009_012_002, "流程分类编码【{}】重复"); + // ========== BPM 流程监听器 1-009-013-000 ========== + ErrorCode PROCESS_LISTENER_NOT_EXISTS = new ErrorCode(1_009_013_000, "流程监听器不存在"); + ErrorCode PROCESS_LISTENER_CLASS_NOT_FOUND = new ErrorCode(1_009_013_001, "流程监听器类({})不存在"); + ErrorCode PROCESS_LISTENER_CLASS_IMPLEMENTS_ERROR = new ErrorCode(1_009_013_002, "流程监听器类({})没有实现接口({})"); + ErrorCode PROCESS_LISTENER_EXPRESSION_INVALID = new ErrorCode(1_009_013_003, "流程监听器表达式({})不合法"); + } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java new file mode 100644 index 0000000000..3dde5dfb53 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * BPM 流程监听器的类型 + * + * @author 芋道源码 + */ +@Getter +@AllArgsConstructor +public enum BpmProcessListenerType { + + EXECUTION("execution", "执行监听器"), + TASK("task", "任务执行器"); + + private final String type; + private final String name; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java new file mode 100644 index 0000000000..63e23af236 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * BPM 流程监听器的值类型 + * + * @author 芋道源码 + */ +@Getter +@AllArgsConstructor +public enum BpmProcessListenerValueType { + + CLASS("class", "Java 类"), + DELEGATE_EXPRESSION("delegateExpression", "代理表达式"), + EXPRESSION("expression", "表达式"); + + private final String type; + private final String name; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java new file mode 100644 index 0000000000..843f53dbaf --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessListenerService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - BPM 流程监听器") +@RestController +@RequestMapping("/bpm/process-listener") +@Validated +public class BpmProcessListenerController { + + @Resource + private BpmProcessListenerService processListenerService; + + @PostMapping("/create") + @Operation(summary = "创建流程监听器") + @PreAuthorize("@ss.hasPermission('bpm:process-listener:create')") + public CommonResult createProcessListener(@Valid @RequestBody BpmProcessListenerSaveReqVO createReqVO) { + return success(processListenerService.createProcessListener(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新流程监听器") + @PreAuthorize("@ss.hasPermission('bpm:process-listener:update')") + public CommonResult updateProcessListener(@Valid @RequestBody BpmProcessListenerSaveReqVO updateReqVO) { + processListenerService.updateProcessListener(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除流程监听器") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:process-listener:delete')") + public CommonResult deleteProcessListener(@RequestParam("id") Long id) { + processListenerService.deleteProcessListener(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得流程监听器") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bpm:process-listener:query')") + public CommonResult getProcessListener(@RequestParam("id") Long id) { + BpmProcessListenerDO processListener = processListenerService.getProcessListener(id); + return success(BeanUtils.toBean(processListener, BpmProcessListenerRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得流程监听器分页") + @PreAuthorize("@ss.hasPermission('bpm:process-listener:query')") + public CommonResult> getProcessListenerPage( + @Valid BpmProcessListenerPageReqVO pageReqVO) { + PageResult pageResult = processListenerService.getProcessListenerPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BpmProcessListenerRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java index ea3c2cb6cd..b76e96c314 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java @@ -15,8 +15,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Schema(description = "管理后台 - BPM 流程分类分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmCategoryPageReqVO extends PageParam { @Schema(description = "分类名", example = "王五") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java index 0227e0ad92..1657f02046 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java @@ -8,8 +8,6 @@ import lombok.ToString; @Schema(description = "管理后台 - 动态表单分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmFormPageReqVO extends PageParam { @Schema(description = "表单名称", example = "芋道") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java index 499e47a420..234ff2849d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java @@ -12,8 +12,6 @@ import java.time.LocalDateTime; @Schema(description = "管理后台 - 用户组分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmUserGroupPageReqVO extends PageParam { @Schema(description = "编号", example = "1024") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java new file mode 100644 index 0000000000..6783127f55 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - BPM 流程监听器分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BpmProcessListenerPageReqVO extends PageParam { + + @Schema(description = "监听器名字", example = "赵六") + private String name; + + @Schema(description = "监听器类型", example = "execution") + private String type; + + @Schema(description = "监听事件", example = "start") + private String event; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java new file mode 100644 index 0000000000..f7a484254b --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - BPM 流程监听器 Response VO") +@Data +public class BpmProcessListenerRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13089") + private Long id; + + @Schema(description = "监听器名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + private String name; + + @Schema(description = "监听器类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "execution") + private String type; + + @Schema(description = "监听器状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + + @Schema(description = "监听事件", requiredMode = Schema.RequiredMode.REQUIRED, example = "start") + private String event; + + @Schema(description = "监听器值类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "class") + private String valueType; + + @Schema(description = "监听器值", requiredMode = Schema.RequiredMode.REQUIRED) + private String value; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java new file mode 100644 index 0000000000..f69d0dfe1a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - BPM 流程监听器新增/修改 Request VO") +@Data +public class BpmProcessListenerSaveReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13089") + private Long id; + + @Schema(description = "监听器名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "监听器名字不能为空") + private String name; + + @Schema(description = "监听器类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "execution") + @NotEmpty(message = "监听器类型不能为空") + private String type; + + @Schema(description = "监听器状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "监听器状态不能为空") + private Integer status; + + @Schema(description = "监听事件", requiredMode = Schema.RequiredMode.REQUIRED, example = "start") + @NotEmpty(message = "监听事件不能为空") + private String event; + + @Schema(description = "监听器值类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "class") + @NotEmpty(message = "监听器值类型不能为空") + private String valueType; + + @Schema(description = "监听器值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "监听器值不能为空") + private String value; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java index 798355057f..a78a96fcbd 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java @@ -10,8 +10,6 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 bpmnFile 文件") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmModeImportReqVO extends BpmModelCreateReqVO { @Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java index 86766f1878..ec14b1aa8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java @@ -9,8 +9,6 @@ import lombok.ToString; @Schema(description = "管理后台 - 流程模型分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmModelPageReqVO extends PageParam { @Schema(description = "标识,精准匹配", example = "process1641042089407") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java index f5c7f36d61..828654f1e7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java @@ -8,8 +8,6 @@ import lombok.ToString; @Schema(description = "管理后台 - 流程定义分页 Request VO") @Data -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionPageReqVO extends PageParam { @Schema(description = "标识-精准匹配", example = "process1641042089407") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java index a754370ccb..3777564b4a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java @@ -13,8 +13,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Schema(description = "管理后台 - 请假申请分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmOALeavePageReqVO extends PageParam { @Schema(description = "状态", example = "1") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java index a0c431814b..b702afd2bf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; @@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Schema(description = "管理后台 - 流程实例抄送的分页 Request VO") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmProcessInstanceCopyPageReqVO extends PageParam { @Schema(description = "流程名称", example = "芋道") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java index fe115fdf06..d90eb632a9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java @@ -12,8 +12,6 @@ import java.time.LocalDateTime; @Schema(description = "管理后台 - 流程任务的的分页 Request VO") // 待办、已办,都使用该分页 @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) public class BpmTaskPageReqVO extends PageParam { @Schema(description = "流程任务名", example = "芋道") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java index 560a8ead6d..916009d377 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java @@ -14,8 +14,6 @@ import lombok.*; @TableName("bpm_category") @KeySequence("bpm_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java index 76bf777e5d..4c0218896d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java @@ -10,15 +10,13 @@ import lombok.*; import java.util.List; /** - * 工作流的表单定义 + * BPM 工作流的表单定义 * 用于工作流的申请表单,需要动态配置的场景 * * @author 芋道源码 */ @TableName(value = "bpm_form", autoResultMap = true) @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java index 5f94b3b95d..436476b27d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java @@ -11,15 +11,13 @@ import lombok.*; import java.util.List; /** - * Bpm 流程定义的拓信息 + * BPM 流程定义的拓信息 * 主要解决 Flowable {@link org.flowable.engine.repository.ProcessDefinition} 不支持拓展字段,所以新建该表 * * @author 芋道源码 */ @TableName(value = "bpm_process_definition_info", autoResultMap = true) @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java new file mode 100644 index 0000000000..56be88ff3c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * BPM 流程监听器 DO + * + * 目的:本质上它是流程监听器的模版,用于 BPMN 在设计时,直接选择这些模版 + * + * @author 芋道源码 + */ +@TableName(value = "bpm_process_listener") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BpmProcessListenerDO extends BaseDO { + + /** + * 主键 ID,自增 + */ + @TableId + private Long id; + /** + * 监听器名字 + */ + private String name; + /** + * 状态 + * + * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} + */ + private Integer status; + /** + * 监听类型 + * + * 枚举 {@link cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerType} + * + * 1. execution:ExecutionListener 执行监听器 + * 2. task:TaskListener 任务监听器 + */ + private String type; + /** + * 监听事件 + * + * execution 时:start、end + * task 时:create 创建、assignment 指派、complete 完成、delete 删除、update 更新、timeout 超时 + */ + private String event; + + /** + * 值类型 + * + * 1. class:Java 类,ExecutionListener 需要 {@link org.flowable.engine.delegate.JavaDelegate},TaskListener 需要 {@link org.flowable.engine.delegate.TaskListener} + * 2. delegateExpression:委托表达式,在 class 的基础上,需要注册到 Spring 容器里,后续表达式通过 Spring Bean 名称即可 + * 3. expression:表达式,一个普通类的普通方法,将这个普通类注册到 Spring 容器中,然后表达式中还可以执行这个类中的方法 + */ + private String valueType; + /** + * 值 + */ + private String value; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskMessageRuleDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskMessageRuleDO.java deleted file mode 100644 index db204c0273..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmTaskMessageRuleDO.java +++ /dev/null @@ -1,5 +0,0 @@ -package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; - -// TODO 芋艿:先埋个坑。任务消息的配置规则。说白了,就是不同的 -public class BpmTaskMessageRuleDO { -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java index 6e209e241c..87df0472bf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java @@ -11,14 +11,12 @@ import lombok.*; import java.util.Set; /** - * Bpm 用户组 + * BPM 用户组 * * @author 芋道源码 */ @TableName(value = "bpm_user_group", autoResultMap = true) @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java index ca21b538cd..ff63f8e43b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java @@ -18,8 +18,6 @@ import java.time.LocalDateTime; */ @TableName("bpm_oa_leave") @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java index fe3b28de28..57e729605d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java @@ -13,8 +13,6 @@ import lombok.*; */ @TableName(value = "bpm_process_instance_copy", autoResultMap = true) @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java new file mode 100644 index 0000000000..0b72aa283e --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.bpm.dal.mysql.definition; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * BPM 流程监听器 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface BpmProcessListenerMapper extends BaseMapperX { + + default PageResult selectPage(BpmProcessListenerPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BpmProcessListenerDO::getName, reqVO.getName()) + .eqIfPresent(BpmProcessListenerDO::getType, reqVO.getType()) + .eqIfPresent(BpmProcessListenerDO::getEvent, reqVO.getEvent()) + .orderByDesc(BpmProcessListenerDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateClassExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateClassExecutionListener.java new file mode 100644 index 0000000000..0ce920e3fd --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateClassExecutionListener.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.exection; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.DelegateExecution; +import org.flowable.engine.delegate.JavaDelegate; + +/** + * 类型为 class 的 ExecutionListener 监听器示例 + * + * @author 芋道源码 + */ +@Slf4j +public class DemoDelegateClassExecutionListener implements JavaDelegate { + + @Override + public void execute(DelegateExecution execution) { + log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), + execution.getCurrentFlowableListener().getFieldExtensions()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java new file mode 100644 index 0000000000..00f3504ace --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.exection; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.DelegateExecution; +import org.flowable.engine.delegate.JavaDelegate; +import org.springframework.stereotype.Component; + +/** + * 类型为 delegateExpression 的 ExecutionListener 监听器示例 + * + * 和 {@link DemoDelegateClassExecutionListener} 的差异是,需要注册到 Spring 中 + */ +@Component +@Slf4j +public class DemoDelegateExpressionExecutionListener implements JavaDelegate { + + @Override + public void execute(DelegateExecution execution) { + log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), + execution.getCurrentFlowableListener().getFieldExtensions()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoSpringExpressionExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoSpringExpressionExecutionListener.java new file mode 100644 index 0000000000..949140fdfc --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/exection/DemoSpringExpressionExecutionListener.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.exection; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Component; + +/** + * 类型为 expression 的 ExecutionListener 监听器示例 + * + * 和 {@link DemoDelegateClassExecutionListener} 的差异是,需要注册到 Spring 中,但不用实现 {@link org.flowable.engine.delegate.JavaDelegate} 接口 + */ +@Component +@Slf4j +public class DemoSpringExpressionExecutionListener { + + public void execute(DelegateExecution execution) { + log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), + execution.getCurrentFlowableListener().getFieldExtensions()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassExecutionListener.java new file mode 100644 index 0000000000..58578841a2 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassExecutionListener.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.TaskListener; +import org.flowable.task.service.delegate.DelegateTask; +import org.springframework.stereotype.Component; + +/** + * 类型为 class 的 TaskListener 监听器示例 + * + * @author 芋道源码 + */ +@Component +@Slf4j +public class DemoDelegateClassExecutionListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + log.info("[execute][task({}) 被调用]", delegateTask.getId()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateExpressionExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateExpressionExecutionListener.java new file mode 100644 index 0000000000..8438a8b10a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateExpressionExecutionListener.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.TaskListener; +import org.flowable.task.service.delegate.DelegateTask; + +/** + * 类型为 delegateExpression 的 TaskListener 监听器示例 + * + * @author 芋道源码 + */ +@Slf4j +public class DemoDelegateExpressionExecutionListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + log.info("[execute][task({}) 被调用]", delegateTask.getId()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionExecutionListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionExecutionListener.java new file mode 100644 index 0000000000..75ba722f75 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionExecutionListener.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; + +import lombok.extern.slf4j.Slf4j; +import org.flowable.engine.delegate.TaskListener; +import org.flowable.task.service.delegate.DelegateTask; + +/** + * 类型为 expression 的 TaskListener 监听器示例 + * + * @author 芋道源码 + */ +@Slf4j +public class DemoSpringExpressionExecutionListener { + + public void notify(DelegateTask delegateTask) { + log.info("[execute][task({}) 被调用]", delegateTask.getId()); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java new file mode 100644 index 0000000000..65290054a8 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * BPM 流程监听器 Service 接口 + * + * @author 芋道源码 + */ +public interface BpmProcessListenerService { + + /** + * 创建流程监听器 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProcessListener(@Valid BpmProcessListenerSaveReqVO createReqVO); + + /** + * 更新流程监听器 + * + * @param updateReqVO 更新信息 + */ + void updateProcessListener(@Valid BpmProcessListenerSaveReqVO updateReqVO); + + /** + * 删除流程监听器 + * + * @param id 编号 + */ + void deleteProcessListener(Long id); + + /** + * 获得流程监听器 + * + * @param id 编号 + * @return 流程监听器 + */ + BpmProcessListenerDO getProcessListener(Long id); + + /** + * 获得流程监听器分页 + * + * @param pageReqVO 分页查询 + * @return 流程监听器分页 + */ + PageResult getProcessListenerPage(BpmProcessListenerPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java new file mode 100644 index 0000000000..078c92287a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessListenerMapper; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerType; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerValueType; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.JavaDelegate; +import org.flowable.engine.delegate.TaskListener; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; + +/** + * BPM 流程监听器 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class BpmProcessListenerServiceImpl implements BpmProcessListenerService { + + @Resource + private BpmProcessListenerMapper processListenerMapper; + + @Override + public Long createProcessListener(BpmProcessListenerSaveReqVO createReqVO) { + // 校验 + validateCreateProcessListenerValue(createReqVO); + // 插入 + BpmProcessListenerDO processListener = BeanUtils.toBean(createReqVO, BpmProcessListenerDO.class); + processListenerMapper.insert(processListener); + return processListener.getId(); + } + + @Override + public void updateProcessListener(BpmProcessListenerSaveReqVO updateReqVO) { + // 校验存在 + validateProcessListenerExists(updateReqVO.getId()); + validateCreateProcessListenerValue(updateReqVO); + // 更新 + BpmProcessListenerDO updateObj = BeanUtils.toBean(updateReqVO, BpmProcessListenerDO.class); + processListenerMapper.updateById(updateObj); + } + + private void validateCreateProcessListenerValue(BpmProcessListenerSaveReqVO createReqVO) { + // class 类型 + if (createReqVO.getValueType().equals(BpmProcessListenerValueType.CLASS.getType())) { + try { + Class clazz = Class.forName(createReqVO.getValue()); + if (createReqVO.getType().equals(BpmProcessListenerType.EXECUTION.getType()) + && !JavaDelegate.class.isAssignableFrom(clazz)) { + throw exception(PROCESS_LISTENER_CLASS_IMPLEMENTS_ERROR, createReqVO.getValue(), + JavaDelegate.class.getName()); + } else if (createReqVO.getType().equals(BpmProcessListenerType.TASK.getType()) + && !TaskListener.class.isAssignableFrom(clazz)) { + throw exception(PROCESS_LISTENER_CLASS_IMPLEMENTS_ERROR, createReqVO.getValue(), + TaskListener.class.getName()); + } + } catch (ClassNotFoundException e) { + throw exception(PROCESS_LISTENER_CLASS_NOT_FOUND, createReqVO.getValue()); + } + return; + } + // 表达式 + if (!StrUtil.startWith(createReqVO.getValue(), "${") || !StrUtil.endWith(createReqVO.getValue(), "}")) { + throw exception(PROCESS_LISTENER_EXPRESSION_INVALID, createReqVO.getValue()); + } + } + + @Override + public void deleteProcessListener(Long id) { + // 校验存在 + validateProcessListenerExists(id); + // 删除 + processListenerMapper.deleteById(id); + } + + private void validateProcessListenerExists(Long id) { + if (processListenerMapper.selectById(id) == null) { + throw exception(PROCESS_LISTENER_NOT_EXISTS); + } + } + + @Override + public BpmProcessListenerDO getProcessListener(Long id) { + return processListenerMapper.selectById(id); + } + + @Override + public PageResult getProcessListenerPage(BpmProcessListenerPageReqVO pageReqVO) { + return processListenerMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file -- Gitee From 6d44bf0d7a8839043723ceb9c9acf3deff5ace88 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 Mar 2024 19:23:11 +0800 Subject: [PATCH 0094/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9B=91=E5=90=AC=E5=99=A8=E3=80=81=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=9B=91=E5=90=AC=E5=99=A8=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/vo/listener/BpmProcessListenerPageReqVO.java | 6 ++++++ .../bpm/dal/mysql/definition/BpmProcessListenerMapper.java | 1 + ...tionListener.java => DemoDelegateClassTaskListener.java} | 2 +- ...istener.java => DemoDelegateExpressionTaskListener.java} | 4 +++- ...nListener.java => DemoSpringExpressionTaskListener.java} | 3 +-- 5 files changed, 12 insertions(+), 4 deletions(-) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/{DemoDelegateClassExecutionListener.java => DemoDelegateClassTaskListener.java} (87%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/{DemoDelegateExpressionExecutionListener.java => DemoDelegateExpressionTaskListener.java} (78%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/{DemoSpringExpressionExecutionListener.java => DemoSpringExpressionTaskListener.java} (79%) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java index 6783127f55..d3b9746727 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -21,4 +23,8 @@ public class BpmProcessListenerPageReqVO extends PageParam { @Schema(description = "监听事件", example = "start") private String event; + @Schema(description = "状态", example = "1") + @InEnum(CommonStatusEnum.class) + private Integer status; + } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java index 0b72aa283e..10ccd2fbae 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessListenerMapper.java @@ -20,6 +20,7 @@ public interface BpmProcessListenerMapper extends BaseMapperX Date: Sat, 23 Mar 2024 21:11:53 +0800 Subject: [PATCH 0095/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E8=A1=A8=E8=BE=BE=E5=BC=8F=E7=9A=84=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 3 + .../BpmProcessExpressionController.java | 73 +++++++++++++++++++ .../BpmProcessExpressionPageReqVO.java | 33 +++++++++ .../BpmProcessExpressionRespVO.java | 30 ++++++++ .../BpmProcessExpressionSaveReqVO.java | 27 +++++++ .../definition/BpmProcessExpressionDO.java | 45 ++++++++++++ .../BpmProcessExpressionMapper.java | 26 +++++++ .../BpmTaskAssignLeaderExpression.java | 2 +- .../BpmTaskAssignStartUserExpression.java | 3 +- .../BpmProcessExpressionService.java | 54 ++++++++++++++ .../BpmProcessExpressionServiceImpl.java | 72 ++++++++++++++++++ 11 files changed, 365 insertions(+), 3 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessExpressionMapper.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index b2b732ecfe..ec167719cc 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -72,4 +72,7 @@ public interface ErrorCodeConstants { ErrorCode PROCESS_LISTENER_CLASS_IMPLEMENTS_ERROR = new ErrorCode(1_009_013_002, "流程监听器类({})没有实现接口({})"); ErrorCode PROCESS_LISTENER_EXPRESSION_INVALID = new ErrorCode(1_009_013_003, "流程监听器表达式({})不合法"); + // ========== BPM 流程表达式 1-009-014-000 ========== + ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在"); + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java new file mode 100644 index 0000000000..4b119f7996 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessExpressionService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - BPM 流程表达式") +@RestController +@RequestMapping("/bpm/process-expression") +@Validated +public class BpmProcessExpressionController { + + @Resource + private BpmProcessExpressionService processExpressionService; + + @PostMapping("/create") + @Operation(summary = "创建流程表达式") + @PreAuthorize("@ss.hasPermission('bpm:process-expression:create')") + public CommonResult createProcessExpression(@Valid @RequestBody BpmProcessExpressionSaveReqVO createReqVO) { + return success(processExpressionService.createProcessExpression(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新流程表达式") + @PreAuthorize("@ss.hasPermission('bpm:process-expression:update')") + public CommonResult updateProcessExpression(@Valid @RequestBody BpmProcessExpressionSaveReqVO updateReqVO) { + processExpressionService.updateProcessExpression(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除流程表达式") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:process-expression:delete')") + public CommonResult deleteProcessExpression(@RequestParam("id") Long id) { + processExpressionService.deleteProcessExpression(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得流程表达式") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bpm:process-expression:query')") + public CommonResult getProcessExpression(@RequestParam("id") Long id) { + BpmProcessExpressionDO processExpression = processExpressionService.getProcessExpression(id); + return success(BeanUtils.toBean(processExpression, BpmProcessExpressionRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得流程表达式分页") + @PreAuthorize("@ss.hasPermission('bpm:process-expression:query')") + public CommonResult> getProcessExpressionPage( + @Valid BpmProcessExpressionPageReqVO pageReqVO) { + PageResult pageResult = processExpressionService.getProcessExpressionPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BpmProcessExpressionRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java new file mode 100644 index 0000000000..37b02f0d9f --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - BPM 流程表达式分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BpmProcessExpressionPageReqVO extends PageParam { + + @Schema(description = "表达式名字", example = "李四") + private String name; + + @Schema(description = "表达式状态", example = "1") + @InEnum(CommonStatusEnum.class) + private Integer status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java new file mode 100644 index 0000000000..d877f60a88 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression; + +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - BPM 流程表达式 Response VO") +@Data +public class BpmProcessExpressionRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3870") + @ExcelProperty("编号") + private Long id; + + @Schema(description = "表达式名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("表达式名字") + private String name; + + @Schema(description = "表达式状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + + @Schema(description = "表达式", requiredMode = Schema.RequiredMode.REQUIRED) + private String expression; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java new file mode 100644 index 0000000000..9c7301a7d7 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - BPM 流程表达式新增/修改 Request VO") +@Data +public class BpmProcessExpressionSaveReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3870") + private Long id; + + @Schema(description = "表达式名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "表达式名字不能为空") + private String name; + + @Schema(description = "表达式状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "表达式状态不能为空") + private Integer status; + + @Schema(description = "表达式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "表达式不能为空") + private String expression; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java new file mode 100644 index 0000000000..6f6be586ec --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.bpm.dal.dataobject.definition; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * BPM 流程表达式 DO + * + * @author 芋道源码 + */ +@TableName("bpm_process_expression") +@KeySequence("bpm_process_expression_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BpmProcessExpressionDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + /** + * 表达式名字 + */ + private String name; + /** + * 表达式状态 + * + * 枚举 {@link TODO common_status 对应的类} + */ + private Integer status; + /** + * 表达式 + */ + private String expression; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessExpressionMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessExpressionMapper.java new file mode 100644 index 0000000000..ab8c18ccf6 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessExpressionMapper.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.bpm.dal.mysql.definition; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * BPM 流程表达式 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface BpmProcessExpressionMapper extends BaseMapperX { + + default PageResult selectPage(BpmProcessExpressionPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BpmProcessExpressionDO::getName, reqVO.getName()) + .eqIfPresent(BpmProcessExpressionDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(BpmProcessExpressionDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(BpmProcessExpressionDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java index 7a021ab2be..0200dbace3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java @@ -34,7 +34,7 @@ public class BpmTaskAssignLeaderExpression { @Resource private BpmProcessInstanceService processInstanceService; - protected Set calculateUsers(DelegateExecution execution, int level) { + public Set calculateUsers(DelegateExecution execution, int level) { Assert.isTrue(level > 0, "level 必须大于 0"); // 获得发起人 ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index 451ceed609..4df9eb1a56 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import jakarta.annotation.Resource; -import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Component; @@ -21,7 +20,7 @@ public class BpmTaskAssignStartUserExpression { @Resource private BpmProcessInstanceService processInstanceService; - public Set calculateUsers(DelegateExecution execution) { + public Set calculateUsers(org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl execution) { ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); return SetUtils.asSet(startUserId); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java new file mode 100644 index 0000000000..caca96e25e --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * BPM 流程表达式 Service 接口 + * + * @author 芋道源码 + */ +public interface BpmProcessExpressionService { + + /** + * 创建流程表达式 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProcessExpression(@Valid BpmProcessExpressionSaveReqVO createReqVO); + + /** + * 更新流程表达式 + * + * @param updateReqVO 更新信息 + */ + void updateProcessExpression(@Valid BpmProcessExpressionSaveReqVO updateReqVO); + + /** + * 删除流程表达式 + * + * @param id 编号 + */ + void deleteProcessExpression(Long id); + + /** + * 获得流程表达式 + * + * @param id 编号 + * @return 流程表达式 + */ + BpmProcessExpressionDO getProcessExpression(Long id); + + /** + * 获得流程表达式分页 + * + * @param pageReqVO 分页查询 + * @return 流程表达式分页 + */ + PageResult getProcessExpressionPage(BpmProcessExpressionPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java new file mode 100644 index 0000000000..122f3921da --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessExpressionMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; + +/** + * BPM 流程表达式 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class BpmProcessExpressionServiceImpl implements BpmProcessExpressionService { + + @Resource + private BpmProcessExpressionMapper processExpressionMapper; + + @Override + public Long createProcessExpression(BpmProcessExpressionSaveReqVO createReqVO) { + // 插入 + BpmProcessExpressionDO processExpression = BeanUtils.toBean(createReqVO, BpmProcessExpressionDO.class); + processExpressionMapper.insert(processExpression); + // 返回 + return processExpression.getId(); + } + + @Override + public void updateProcessExpression(BpmProcessExpressionSaveReqVO updateReqVO) { + // 校验存在 + validateProcessExpressionExists(updateReqVO.getId()); + // 更新 + BpmProcessExpressionDO updateObj = BeanUtils.toBean(updateReqVO, BpmProcessExpressionDO.class); + processExpressionMapper.updateById(updateObj); + } + + @Override + public void deleteProcessExpression(Long id) { + // 校验存在 + validateProcessExpressionExists(id); + // 删除 + processExpressionMapper.deleteById(id); + } + + private void validateProcessExpressionExists(Long id) { + if (processExpressionMapper.selectById(id) == null) { + throw exception(PROCESS_EXPRESSION_NOT_EXISTS); + } + } + + @Override + public BpmProcessExpressionDO getProcessExpression(Long id) { + return processExpressionMapper.selectById(id); + } + + @Override + public PageResult getProcessExpressionPage(BpmProcessExpressionPageReqVO pageReqVO) { + return processExpressionMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file -- Gitee From 5c5bd0e5dab432d53128fb2c3909f710614de530 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 24 Mar 2024 10:08:51 +0800 Subject: [PATCH 0096/1557] =?UTF-8?q?BPM=EF=BC=9A=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=9A=84=20icon=20=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmModelFormTypeEnum.java | 15 +++++++++++++-- .../definition/vo/model/BpmModelRespVO.java | 17 +++++++++-------- .../vo/model/BpmModelUpdateReqVO.java | 11 +++++++++-- .../process/BpmProcessDefinitionRespVO.java | 3 +++ .../convert/definition/BpmModelConvert.java | 19 ++++++++++++------- .../BpmProcessDefinitionConvert.java | 1 - .../BpmProcessDefinitionInfoDO.java | 5 +++++ .../dto/BpmModelMetaInfoRespDTO.java | 5 +++++ 8 files changed, 56 insertions(+), 20 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java index c21d6f9991..3bca6c82b8 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java @@ -1,8 +1,11 @@ package cn.iocoder.yudao.module.bpm.enums.definition; +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; +import java.util.Arrays; + /** * BPM 模型的表单类型的枚举 * @@ -10,12 +13,20 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum BpmModelFormTypeEnum { +public enum BpmModelFormTypeEnum implements IntArrayValuable { NORMAL(10, "流程表单"), // 对应 BpmFormDO CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储 ; + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray(); + private final Integer type; - private final String desc; + private final String name; + + @Override + public int[] array() { + return ARRAYS; + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java index c083933596..aad2015c7e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java @@ -19,6 +19,9 @@ public class BpmModelRespVO { @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") private String name; + @Schema(description = "流程图标", example = "https://www.iocoder.cn/yudao.jpg") + private String icon; + @Schema(description = "流程描述", example = "我是描述") private String description; @@ -30,17 +33,15 @@ public class BpmModelRespVO { @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") - private Long formId; + @Schema(description = "表单编号", example = "1024") + private Long formId; // 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空 @Schema(description = "表单名字", example = "请假表单") private String formName; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/create") - private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", - example = "/bpm/oa/leave/view") - private String formCustomViewPath; + @Schema(description = "自定义表单的提交路径", example = "/bpm/oa/leave/create") + private String formCustomCreatePath; // 使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空 + @Schema(description = "自定义表单的查看路径", example = "/bpm/oa/leave/view") + private String formCustomViewPath; // ,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java index cc2420b289..94585af3de 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - import jakarta.validation.constraints.NotEmpty; +import lombok.Data; +import org.hibernate.validator.constraints.URL; @Schema(description = "管理后台 - 流程模型的更新 Request VO") @Data @@ -16,6 +18,10 @@ public class BpmModelUpdateReqVO { @Schema(description = "流程名称", example = "芋道") private String name; + @Schema(description = "流程图标", example = "https://www.iocoder.cn/yudao.jpg") + @URL(message = "流程图标格式不正确") + private String icon; + @Schema(description = "流程描述", example = "我是描述") private String description; @@ -26,6 +32,7 @@ public class BpmModelUpdateReqVO { private String bpmnXml; @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") + @InEnum(BpmModelFormTypeEnum.class) private Integer formType; @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index f54e318031..2fb8dd4dcb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -22,6 +22,9 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao") private String key; + @Schema(description = "流程图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/yudao.jpg") + private String icon; + @Schema(description = "流程描述", example = "我是描述") private String description; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java index 373e71bf36..3fe5cc068e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java @@ -71,7 +71,7 @@ public interface BpmModelConvert { modelRespVO.setFormType(metaInfo.getFormType()).setFormId(metaInfo.getFormId()) .setFormCustomCreatePath(metaInfo.getFormCustomCreatePath()) .setFormCustomViewPath(metaInfo.getFormCustomViewPath()); - modelRespVO.setDescription(metaInfo.getDescription()); + modelRespVO.setIcon(metaInfo.getIcon()).setDescription(metaInfo.getDescription()); } if (form != null) { modelRespVO.setFormId(form.getId()).setFormName(form.getName()); @@ -95,24 +95,29 @@ public interface BpmModelConvert { default void copyToCreateModel(Model model, BpmModelCreateReqVO bean) { model.setName(bean.getName()); model.setKey(bean.getKey()); - model.setMetaInfo(buildMetaInfoStr(null, bean.getDescription(), null, null, - null, null)); + model.setMetaInfo(buildMetaInfoStr(null, + null, bean.getDescription(), + null, null, null, null)); } default void copyToUpdateModel(Model model, BpmModelUpdateReqVO bean) { model.setName(bean.getName()); model.setCategory(bean.getCategory()); model.setMetaInfo(buildMetaInfoStr(buildMetaInfo(model), - bean.getDescription(), bean.getFormType(), bean.getFormId(), - bean.getFormCustomCreatePath(), bean.getFormCustomViewPath())); + bean.getIcon(), bean.getDescription(), + bean.getFormType(), bean.getFormId(), bean.getFormCustomCreatePath(), bean.getFormCustomViewPath())); } - default String buildMetaInfoStr(BpmModelMetaInfoRespDTO metaInfo, String description, Integer formType, - Long formId, String formCustomCreatePath, String formCustomViewPath) { + default String buildMetaInfoStr(BpmModelMetaInfoRespDTO metaInfo, + String icon, String description, + Integer formType, Long formId, String formCustomCreatePath, String formCustomViewPath) { if (metaInfo == null) { metaInfo = new BpmModelMetaInfoRespDTO(); } // 只有非空,才进行设置,避免更新时的覆盖 + if (StrUtil.isNotEmpty(icon)) { + metaInfo.setIcon(icon); + } if (StrUtil.isNotEmpty(description)) { metaInfo.setDescription(description); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java index 61187424bb..0e767d787c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java @@ -33,7 +33,6 @@ public interface BpmProcessDefinitionConvert { BpmProcessDefinitionConvert INSTANCE = Mappers.getMapper(BpmProcessDefinitionConvert.class); - default PageResult buildProcessDefinitionPage(PageResult page, Map deploymentMap, Map processDefinitionInfoMap, diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java index 436476b27d..9ac9252d5b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java @@ -40,6 +40,11 @@ public class BpmProcessDefinitionInfoDO extends BaseDO { * 关联 Model 的 id 属性 */ private String modelId; + + /** + * 图标 + */ + private String icon; /** * 描述 */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java index 5b4ef3da53..8ec9dc64b3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmModelMetaInfoRespDTO.java @@ -14,10 +14,15 @@ import lombok.Data; @Data public class BpmModelMetaInfoRespDTO { + /** + * 流程图标 + */ + private String icon; /** * 流程描述 */ private String description; + /** * 表单类型 */ -- Gitee From 18f6bdd1c0f624d36859f56c921fa2349ae04762 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 24 Mar 2024 10:41:54 +0800 Subject: [PATCH 0097/1557] =?UTF-8?q?=E6=9C=80=E6=96=B0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=20SQL=20=E7=9A=84=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 134 +++++++++++------- .../banner/core/BannerApplicationRunner.java | 2 +- 2 files changed, 83 insertions(+), 53 deletions(-) diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 49da40058b..e5e9635625 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 01/03/2024 19:39:45 + Date: 24/03/2024 10:40:51 */ SET NAMES utf8mb4; @@ -385,7 +385,7 @@ CREATE TABLE `infra_api_error_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 15660 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 16372 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; -- ---------------------------- -- Records of infra_api_error_log @@ -423,7 +423,7 @@ CREATE TABLE `infra_codegen_column` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2248 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; +) ENGINE = InnoDB AUTO_INCREMENT = 2305 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; -- ---------------------------- -- Records of infra_codegen_column @@ -461,7 +461,7 @@ CREATE TABLE `infra_codegen_table` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 171 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; +) ENGINE = InnoDB AUTO_INCREMENT = 176 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; -- ---------------------------- -- Records of infra_codegen_table @@ -690,7 +690,7 @@ CREATE TABLE `infra_file` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1281 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1294 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; -- ---------------------------- -- Records of infra_file @@ -879,7 +879,7 @@ CREATE TABLE `system_dict_data` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1509 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1529 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; -- ---------------------------- -- Records of system_dict_data @@ -973,26 +973,21 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1118, 0, '等待退款', '0', 'pay_refund_status', 0, 'info', '', '等待退款', '1', '2021-12-10 16:44:59', '1', '2023-07-19 10:14:39', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1119, 20, '退款失败', '20', 'pay_refund_status', 0, 'danger', '', '退款失败', '1', '2021-12-10 16:45:10', '1', '2023-07-19 10:15:10', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1124, 10, '退款成功', '10', 'pay_refund_status', 0, 'success', '', '退款成功', '1', '2021-12-10 16:46:26', '1', '2023-07-19 10:15:00', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1125, 0, '默认', '1', 'bpm_model_category', 0, 'primary', '', '流程分类 - 默认', '1', '2022-01-02 08:41:11', '1', '2022-02-16 20:01:42', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1126, 0, 'OA', '2', 'bpm_model_category', 0, 'success', '', '流程分类 - OA', '1', '2022-01-02 08:41:22', '1', '2022-02-16 20:01:50', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1127, 0, '进行中', '1', 'bpm_process_instance_status', 0, 'primary', '', '流程实例的状态 - 进行中', '1', '2022-01-07 23:47:22', '1', '2022-02-16 20:07:49', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1128, 2, '已完成', '2', 'bpm_process_instance_status', 0, 'success', '', '流程实例的状态 - 已完成', '1', '2022-01-07 23:47:49', '1', '2022-02-16 20:07:54', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1129, 1, '处理中', '1', 'bpm_process_instance_result', 0, 'primary', '', '流程实例的结果 - 处理中', '1', '2022-01-07 23:48:32', '1', '2022-02-16 09:53:26', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1130, 2, '通过', '2', 'bpm_process_instance_result', 0, 'success', '', '流程实例的结果 - 通过', '1', '2022-01-07 23:48:45', '1', '2022-02-16 09:53:31', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1131, 3, '不通过', '3', 'bpm_process_instance_result', 0, 'danger', '', '流程实例的结果 - 不通过', '1', '2022-01-07 23:48:55', '1', '2022-02-16 09:53:38', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1132, 4, '已取消', '4', 'bpm_process_instance_result', 0, 'info', '', '流程实例的结果 - 撤销', '1', '2022-01-07 23:49:06', '1', '2022-02-16 09:53:42', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1127, 1, '审批中', '1', 'bpm_process_instance_status', 0, 'default', '', '流程实例的状态 - 进行中', '1', '2022-01-07 23:47:22', '1', '2024-03-16 16:11:45', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1128, 2, '审批通过', '2', 'bpm_process_instance_status', 0, 'success', '', '流程实例的状态 - 已完成', '1', '2022-01-07 23:47:49', '1', '2024-03-16 16:11:54', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1129, 1, '审批中', '1', 'bpm_task_status', 0, 'primary', '', '流程实例的结果 - 处理中', '1', '2022-01-07 23:48:32', '1', '2024-03-08 22:41:37', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1130, 2, '审批通过', '2', 'bpm_task_status', 0, 'success', '', '流程实例的结果 - 通过', '1', '2022-01-07 23:48:45', '1', '2024-03-08 22:41:38', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1131, 3, '审批不通过', '3', 'bpm_task_status', 0, 'danger', '', '流程实例的结果 - 不通过', '1', '2022-01-07 23:48:55', '1', '2024-03-08 22:41:38', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1132, 4, '已取消', '4', 'bpm_task_status', 0, 'info', '', '流程实例的结果 - 撤销', '1', '2022-01-07 23:49:06', '1', '2024-03-08 22:41:39', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1133, 10, '流程表单', '10', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 流程表单', '103', '2022-01-11 23:51:30', '103', '2022-01-11 23:51:30', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1134, 20, '业务表单', '20', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 业务表单', '103', '2022-01-11 23:51:47', '103', '2022-01-11 23:51:47', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1135, 10, '角色', '10', 'bpm_task_assign_rule_type', 0, 'info', '', '任务分配规则的类型 - 角色', '103', '2022-01-12 23:21:22', '1', '2022-02-16 20:06:14', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1136, 20, '部门的成员', '20', 'bpm_task_assign_rule_type', 0, 'primary', '', '任务分配规则的类型 - 部门的成员', '103', '2022-01-12 23:21:47', '1', '2022-02-16 20:05:28', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1137, 21, '部门的负责人', '21', 'bpm_task_assign_rule_type', 0, 'primary', '', '任务分配规则的类型 - 部门的负责人', '103', '2022-01-12 23:33:36', '1', '2022-02-16 20:05:31', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1138, 30, '用户', '30', 'bpm_task_assign_rule_type', 0, 'info', '', '任务分配规则的类型 - 用户', '103', '2022-01-12 23:34:02', '1', '2022-02-16 20:05:50', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1139, 40, '用户组', '40', 'bpm_task_assign_rule_type', 0, 'warning', '', '任务分配规则的类型 - 用户组', '103', '2022-01-12 23:34:21', '1', '2022-02-16 20:05:57', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1140, 50, '自定义脚本', '50', 'bpm_task_assign_rule_type', 0, 'danger', '', '任务分配规则的类型 - 自定义脚本', '103', '2022-01-12 23:34:43', '1', '2022-02-16 20:06:01', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1141, 22, '岗位', '22', 'bpm_task_assign_rule_type', 0, 'success', '', '任务分配规则的类型 - 岗位', '103', '2022-01-14 18:41:55', '1', '2022-02-16 20:05:39', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1142, 10, '流程发起人', '10', 'bpm_task_assign_script', 0, '', '', '任务分配自定义脚本 - 流程发起人', '103', '2022-01-15 00:10:57', '103', '2022-01-15 21:24:10', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1143, 20, '流程发起人的一级领导', '20', 'bpm_task_assign_script', 0, '', '', '任务分配自定义脚本 - 流程发起人的一级领导', '103', '2022-01-15 21:24:31', '103', '2022-01-15 21:24:31', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1144, 21, '流程发起人的二级领导', '21', 'bpm_task_assign_script', 0, '', '', '任务分配自定义脚本 - 流程发起人的二级领导', '103', '2022-01-15 21:24:46', '103', '2022-01-15 21:24:57', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1135, 10, '角色', '10', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 角色', '103', '2022-01-12 23:21:22', '1', '2024-03-06 02:53:16', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1136, 20, '部门的成员', '20', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的成员', '103', '2022-01-12 23:21:47', '1', '2024-03-06 02:53:17', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1137, 21, '部门的负责人', '21', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的负责人', '103', '2022-01-12 23:33:36', '1', '2024-03-06 02:53:18', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1138, 30, '用户', '30', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 用户', '103', '2022-01-12 23:34:02', '1', '2024-03-06 02:53:19', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1139, 40, '用户组', '40', 'bpm_task_candidate_strategy', 0, 'warning', '', '任务分配规则的类型 - 用户组', '103', '2022-01-12 23:34:21', '1', '2024-03-06 02:53:20', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1140, 60, '流程表达式', '60', 'bpm_task_candidate_strategy', 0, 'danger', '', '任务分配规则的类型 - 流程表达式', '103', '2022-01-12 23:34:43', '1', '2024-03-06 02:53:20', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1141, 22, '岗位', '22', 'bpm_task_candidate_strategy', 0, 'success', '', '任务分配规则的类型 - 岗位', '103', '2022-01-14 18:41:55', '1', '2024-03-06 02:53:21', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1145, 1, '管理后台', '1', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 管理后台', '1', '2022-02-02 13:15:06', '1', '2022-03-10 16:32:59', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1146, 2, '用户 APP', '2', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 用户 APP', '1', '2022-02-02 13:15:19', '1', '2022-03-10 16:33:03', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1150, 1, '数据库', '1', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:25:28', '1', '2022-03-15 00:25:28', b'0'); @@ -1246,7 +1241,18 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1505, 71, '采购入库(作废)', '71', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:10', '1', '2024-02-16 19:40:40', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1506, 80, '采购退货出库', '80', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-16 13:10:17', '1', '2024-02-16 13:10:17', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1507, 81, '采购退货出库(作废)', '81', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:26', '1', '2024-02-16 19:40:33', b'0'); -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1508, 3, 'CRM', '3', 'bpm_model_category', 0, 'success', '', '', '1', '2024-02-24 07:58:38', '1', '2024-02-24 07:58:44', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1509, 3, '审批不通过', '3', 'bpm_process_instance_status', 0, 'danger', '', '', '1', '2024-03-16 16:12:06', '1', '2024-03-16 16:12:06', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1510, 4, '已取消', '4', 'bpm_process_instance_status', 0, 'warning', '', '', '1', '2024-03-16 16:12:22', '1', '2024-03-16 16:12:22', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1511, 5, '已退回', '5', 'bpm_task_status', 0, 'warning', '', '', '1', '2024-03-16 19:10:46', '1', '2024-03-08 22:41:40', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1512, 6, '委派中', '6', 'bpm_task_status', 0, 'primary', '', '', '1', '2024-03-17 10:06:22', '1', '2024-03-08 22:41:40', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1513, 7, '审批通过中', '7', 'bpm_task_status', 0, 'success', '', '', '1', '2024-03-17 10:06:47', '1', '2024-03-08 22:41:41', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1514, 0, '待审批', '0', 'bpm_task_status', 0, 'info', '', '', '1', '2024-03-17 10:07:11', '1', '2024-03-08 22:41:42', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1515, 35, '发起人自选', '35', 'bpm_task_candidate_strategy', 0, '', '', '', '1', '2024-03-22 19:45:16', '1', '2024-03-22 19:45:16', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1516, 1, '执行监听器', 'execution', 'bpm_process_listener_type', 0, 'primary', '', '', '1', '2024-03-23 12:54:03', '1', '2024-03-23 19:14:19', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1517, 1, '任务监听器', 'task', 'bpm_process_listener_type', 0, 'success', '', '', '1', '2024-03-23 12:54:13', '1', '2024-03-23 19:14:24', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1526, 1, 'Java 类', 'class', 'bpm_process_listener_value_type', 0, 'primary', '', '', '1', '2024-03-23 15:08:45', '1', '2024-03-23 19:14:32', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1527, 2, '表达式', 'expression', 'bpm_process_listener_value_type', 0, 'success', '', '', '1', '2024-03-23 15:09:06', '1', '2024-03-23 19:14:38', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1528, 3, '代理表达式', 'delegateExpression', 'bpm_process_listener_value_type', 0, 'info', '', '', '1', '2024-03-23 15:11:23', '1', '2024-03-23 19:14:41', b'0'); COMMIT; -- ---------------------------- @@ -1267,7 +1273,7 @@ CREATE TABLE `system_dict_type` ( `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 613 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; +) ENGINE = InnoDB AUTO_INCREMENT = 616 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; -- ---------------------------- -- Records of system_dict_type @@ -1296,12 +1302,10 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (131, '支付回调状态', 'pay_notify_status', 0, '支付回调状态(包括退款回调)', '1', '2021-12-03 10:53:29', '1', '2023-07-19 18:09:43', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (132, '支付订单状态', 'pay_order_status', 0, '支付订单状态', '1', '2021-12-03 11:17:50', '1', '2021-12-03 11:17:50', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (134, '退款订单状态', 'pay_refund_status', 0, '退款订单状态', '1', '2021-12-10 16:42:50', '1', '2023-07-19 10:13:17', b'0', NULL); -INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (138, '流程分类', 'bpm_model_category', 0, '流程分类', '1', '2022-01-02 08:40:45', '1', '2022-01-02 08:40:45', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (139, '流程实例的状态', 'bpm_process_instance_status', 0, '流程实例的状态', '1', '2022-01-07 23:46:42', '1', '2022-01-07 23:46:42', b'0', NULL); -INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (140, '流程实例的结果', 'bpm_process_instance_result', 0, '流程实例的结果', '1', '2022-01-07 23:48:10', '1', '2022-01-07 23:48:10', b'0', NULL); +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (140, '流程实例的结果', 'bpm_task_status', 0, '流程实例的结果', '1', '2022-01-07 23:48:10', '1', '2024-03-08 22:42:03', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (141, '流程的表单类型', 'bpm_model_form_type', 0, '流程的表单类型', '103', '2022-01-11 23:50:45', '103', '2022-01-11 23:50:45', b'0', NULL); -INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (142, '任务分配规则的类型', 'bpm_task_assign_rule_type', 0, '任务分配规则的类型', '103', '2022-01-12 23:21:04', '103', '2022-01-12 15:46:10', b'0', NULL); -INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (143, '任务分配自定义脚本', 'bpm_task_assign_script', 0, '任务分配自定义脚本', '103', '2022-01-15 00:10:35', '103', '2022-01-15 00:10:35', b'0', NULL); +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (142, '任务分配规则的类型', 'bpm_task_candidate_strategy', 0, 'BPM 任务的候选人的策略', '103', '2022-01-12 23:21:04', '103', '2024-03-06 02:53:59', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (144, '代码生成的场景枚举', 'infra_codegen_scene', 0, '代码生成的场景枚举', '1', '2022-02-02 13:14:45', '1', '2022-03-10 16:33:46', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (145, '角色类型', 'system_role_type', 0, '角色类型', '1', '2022-02-16 13:01:46', '1', '2022-02-16 13:01:46', b'0', NULL); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (146, '文件存储器', 'infra_file_storage', 0, '文件存储器', '1', '2022-03-15 00:24:38', '1', '2022-03-15 00:24:38', b'0', NULL); @@ -1356,6 +1360,8 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (610, '转账订单状态', 'pay_transfer_status', 0, '', '1', '2023-10-28 16:18:32', '1', '2023-10-28 16:18:32', b'0', '1970-01-01 00:00:00'); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (611, 'ERP 库存明细的业务类型', 'erp_stock_record_biz_type', 0, 'ERP 库存明细的业务类型', '1', '2024-02-05 18:07:02', '1', '2024-02-05 18:07:02', b'0', '1970-01-01 00:00:00'); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (612, 'ERP 审批状态', 'erp_audit_status', 0, '', '1', '2024-02-06 00:00:07', '1', '2024-02-06 00:00:07', b'0', '1970-01-01 00:00:00'); +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (613, 'BPM 监听器类型', 'bpm_process_listener_type', 0, '', '1', '2024-03-23 12:52:24', '1', '2024-03-09 15:54:28', b'0', '1970-01-01 00:00:00'); +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', b'0', '1970-01-01 00:00:00'); COMMIT; -- ---------------------------- @@ -1404,7 +1410,7 @@ CREATE TABLE `system_login_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3023 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 3031 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; -- ---------------------------- -- Records of system_login_log @@ -1534,7 +1540,7 @@ CREATE TABLE `system_menu` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2712 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; +) ENGINE = InnoDB AUTO_INCREMENT = 2736 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; -- ---------------------------- -- Records of system_menu @@ -1696,25 +1702,25 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1178, '支付订单导出', 'pay:order:export', 3, 5, 1173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1185, '工作流程', '', 1, 50, 0, '/bpm', 'fa:medium', NULL, NULL, 0, b'1', b'1', b'1', '1', '2021-12-30 20:26:36', '1', '2024-02-29 12:43:43', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1186, '流程管理', '', 1, 10, 1185, 'manager', 'fa:dedent', NULL, NULL, 0, b'1', b'1', b'1', '1', '2021-12-30 20:28:30', '1', '2024-02-29 12:36:02', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1187, '流程表单', '', 2, 0, 1186, 'form', 'fa:hdd-o', 'bpm/form/index', 'BpmForm', 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2024-02-29 12:36:34', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1187, '流程表单', '', 2, 2, 1186, 'form', 'fa:hdd-o', 'bpm/form/index', 'BpmForm', 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2024-03-19 12:25:25', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1188, '表单查询', 'bpm:form:query', 3, 1, 1187, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1189, '表单创建', 'bpm:form:create', 3, 2, 1187, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1190, '表单更新', 'bpm:form:update', 3, 3, 1187, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1191, '表单删除', 'bpm:form:delete', 3, 4, 1187, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1192, '表单导出', 'bpm:form:export', 3, 5, 1187, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1193, '流程模型', '', 2, 5, 1186, 'model', 'fa-solid:project-diagram', 'bpm/model/index', 'BpmModel', 0, b'1', b'1', b'1', '1', '2021-12-31 23:24:58', '1', '2024-02-29 12:36:53', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1193, '流程模型', '', 2, 1, 1186, 'model', 'fa-solid:project-diagram', 'bpm/model/index', 'BpmModel', 0, b'1', b'1', b'1', '1', '2021-12-31 23:24:58', '1', '2024-03-19 12:25:19', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1194, '模型查询', 'bpm:model:query', 3, 1, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:01:10', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1195, '模型创建', 'bpm:model:create', 3, 2, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:01:24', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1196, '模型导入', 'bpm:model:import', 3, 3, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:01:35', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1197, '模型更新', 'bpm:model:update', 3, 4, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:02:28', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1198, '模型删除', 'bpm:model:delete', 3, 5, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:02:43', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1199, '模型发布', 'bpm:model:deploy', 3, 6, 1193, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2022-01-03 19:03:24', '1', '2022-04-20 17:03:10', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1200, '任务管理', '', 2, 20, 1185, 'task', 'fa:tasks', NULL, NULL, 0, b'1', b'1', b'1', '1', '2022-01-07 23:51:48', '1', '2024-02-29 12:37:07', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1201, '我的流程', '', 2, 0, 1200, 'my', 'fa-solid:book', 'bpm/processInstance/index', 'BpmProcessInstance', 0, b'1', b'1', b'1', '', '2022-01-07 15:53:44', '1', '2024-02-29 12:37:24', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1200, '审批中心', '', 2, 20, 1185, 'task', 'fa:tasks', NULL, NULL, 0, b'1', b'1', b'1', '1', '2022-01-07 23:51:48', '1', '2024-03-21 00:33:15', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1201, '我的流程', '', 2, 1, 1200, 'my', 'fa-solid:book', 'bpm/processInstance/index', 'BpmProcessInstanceMy', 0, b'1', b'1', b'1', '', '2022-01-07 15:53:44', '1', '2024-03-21 23:52:12', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1202, '流程实例的查询', 'bpm:process-instance:query', 3, 1, 1201, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-01-07 15:53:44', '1', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1207, '待办任务', '', 2, 10, 1200, 'todo', 'fa:slack', 'bpm/task/todo/index', 'BpmTodoTask', 0, b'1', b'1', b'1', '1', '2022-01-08 10:33:37', '1', '2024-02-29 12:37:39', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1208, '已办任务', '', 2, 20, 1200, 'done', 'fa:delicious', 'bpm/task/done/index', 'BpmDoneTask', 0, b'1', b'1', b'1', '1', '2022-01-08 10:34:13', '1', '2024-02-29 12:37:54', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1209, '用户分组', '', 2, 2, 1186, 'user-group', 'fa:user-secret', 'bpm/group/index', 'BpmUserGroup', 0, b'1', b'1', b'1', '', '2022-01-14 02:14:20', '1', '2024-02-29 12:36:45', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1209, '用户分组', '', 2, 4, 1186, 'user-group', 'fa:user-secret', 'bpm/group/index', 'BpmUserGroup', 0, b'1', b'1', b'1', '', '2022-01-14 02:14:20', '1', '2024-03-21 23:55:29', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1210, '用户组查询', 'bpm:user-group:query', 3, 1, 1209, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1211, '用户组创建', 'bpm:user-group:create', 3, 2, 1209, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1212, '用户组更新', 'bpm:user-group:update', 3, 3, 1209, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', b'0'); @@ -2304,6 +2310,29 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2709, '客户公海配置查询', 'crm:customer-pool-config:query', 3, 2, 2516, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:45:19', '1', '2024-02-24 16:45:28', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2710, '合同配置更新', 'crm:contract-config:update', 3, 1, 2708, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:45:56', '1', '2024-02-24 16:45:56', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2711, '合同配置查询', 'crm:contract-config:query', 3, 2, 2708, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:46:16', '1', '2024-02-24 16:46:16', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2712, '客户分析', '', 2, 0, 2560, 'customer', 'ep:avatar', 'views/crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, b'1', b'1', b'1', '1', '2024-03-09 16:43:56', '1', '2024-03-09 16:43:56', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2713, '抄送我的', '', 2, 30, 1200, 'copy', 'ep:copy-document', 'bpm/task/copy/index', 'BpmProcessInstanceCopy', 0, b'1', b'1', b'1', '1', '2024-03-17 21:50:23', '1', '2024-03-17 22:12:23', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2714, '流程分类', '', 2, 3, 1186, 'category', 'fa:object-ungroup', 'bpm/category/index', 'BpmCategory', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-21 23:51:18', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2715, '分类查询', 'bpm:category:query', 3, 1, 2714, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:25', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2716, '分类创建', 'bpm:category:create', 3, 2, 2714, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:31', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2717, '分类更新', 'bpm:category:update', 3, 3, 2714, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:35', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2718, '分类删除', 'bpm:category:delete', 3, 4, 2714, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:41', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2720, '发起流程', '', 2, 0, 1200, 'create', 'fa-solid:grin-stars', 'bpm/processInstance/create/index', 'BpmProcessInstanceCreate', 0, b'1', b'0', b'1', '1', '2024-03-19 19:46:05', '1', '2024-03-23 19:03:42', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2721, '流程实例', '', 2, 10, 1186, 'process-instance/manager', 'fa:square', 'bpm/processInstance/manager/index', 'BpmProcessInstanceManager', 0, b'1', b'1', b'1', '1', '2024-03-21 23:57:30', '1', '2024-03-21 23:57:30', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2722, '流程实例的查询(管理员)', 'bpm:process-instance:manager-query', 3, 1, 2721, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-03-22 08:18:27', '1', '2024-03-22 08:19:05', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2723, '流程实例的取消(管理员)', 'bpm:process-instance:cancel-by-admin', 3, 2, 2721, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-03-22 08:19:25', '1', '2024-03-22 08:19:25', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2724, '流程任务', '', 2, 11, 1186, 'process-tasnk', 'ep:collection-tag', 'bpm/task/manager/index', 'BpmManagerTask', 0, b'1', b'1', b'1', '1', '2024-03-22 08:43:22', '1', '2024-03-22 08:43:27', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2725, '流程任务的查询(管理员)', 'bpm:task:mananger-query', 3, 1, 2724, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-03-22 08:43:49', '1', '2024-03-22 08:43:49', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2726, '流程监听器', '', 2, 5, 1186, 'process-listener', 'fa:assistive-listening-systems', 'bpm/processListener/index', 'BpmProcessListener', 0, b'1', b'1', b'1', '', '2024-03-09 16:05:34', '1', '2024-03-23 13:13:38', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2727, '流程监听器查询', 'bpm:process-listener:query', 3, 1, 2726, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2728, '流程监听器创建', 'bpm:process-listener:create', 3, 2, 2726, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2729, '流程监听器更新', 'bpm:process-listener:update', 3, 3, 2726, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2730, '流程监听器删除', 'bpm:process-listener:delete', 3, 4, 2726, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2731, '流程表达式', '', 2, 6, 1186, 'process-expression', 'fa:wpexplorer', 'bpm/processExpression/index', 'BpmProcessExpression', 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '1', '2024-03-23 19:43:05', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2732, '流程表达式查询', 'bpm:process-expression:query', 3, 1, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2733, '流程表达式创建', 'bpm:process-expression:create', 3, 2, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2734, '流程表达式更新', 'bpm:process-expression:update', 3, 3, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2735, '流程表达式删除', 'bpm:process-expression:delete', 3, 4, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); COMMIT; -- ---------------------------- @@ -2424,7 +2453,7 @@ CREATE TABLE `system_oauth2_access_token` ( PRIMARY KEY (`id`) USING BTREE, INDEX `idx_access_token`(`access_token` ASC) USING BTREE, INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 5237 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 6042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; -- ---------------------------- -- Records of system_oauth2_access_token @@ -2546,7 +2575,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1410 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 1415 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; -- ---------------------------- -- Records of system_oauth2_refresh_token @@ -2586,7 +2615,7 @@ CREATE TABLE `system_operate_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 10705 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 11782 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; -- ---------------------------- -- Records of system_operate_log @@ -4805,7 +4834,7 @@ CREATE TABLE `system_sms_log` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 610 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 911 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; -- ---------------------------- -- Records of system_sms_log @@ -4986,7 +5015,7 @@ CREATE TABLE `system_tenant_package` ( `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '套餐名', `status` tinyint NOT NULL DEFAULT 0 COMMENT '租户状态(0正常 1停用)', `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注', - `menu_ids` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联的菜单编号', + `menu_ids` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联的菜单编号', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -5017,7 +5046,7 @@ CREATE TABLE `system_user_post` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; +) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; -- ---------------------------- -- Records of system_user_post @@ -5025,10 +5054,10 @@ CREATE TABLE `system_user_post` ( BEGIN; INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (112, 1, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', b'0', 1); INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (113, 100, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', b'0', 1); -INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 114, 3, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', b'0', 1); INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 104, 1, '1', '2022-05-16 19:36:28', '1', '2022-05-16 19:36:28', b'0', 1); INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (116, 117, 2, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', b'0', 1); INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (117, 118, 1, '1', '2022-07-09 17:44:44', '1', '2022-07-09 17:44:44', b'0', 1); +INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 114, 1, '1', '2024-03-15 19:48:11', '1', '2024-03-15 19:48:11', b'0', 1); COMMIT; -- ---------------------------- @@ -5046,7 +5075,7 @@ CREATE TABLE `system_user_role` ( `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; +) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; -- ---------------------------- -- Records of system_user_role @@ -5073,7 +5102,6 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (24, 120, 115, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', b'0', 126); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (25, 121, 116, '1', '2022-12-30 11:33:49', '1', '2022-12-30 11:33:49', b'0', 127); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (26, 122, 118, '1', '2022-12-30 11:47:53', '1', '2022-12-30 11:47:53', b'0', 129); -INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (27, 112, 101, '1', '2023-02-09 23:18:51', '1', '2023-02-09 23:18:51', b'0', 1); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (28, 123, 136, '1', '2023-03-05 21:23:35', '1', '2023-03-05 21:23:35', b'0', 147); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (29, 124, 137, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', b'0', 148); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (30, 125, 138, '1', '2023-03-05 21:59:03', '1', '2023-03-05 21:59:03', b'0', 149); @@ -5081,6 +5109,8 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (32, 126, 140, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', b'0', 151); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (33, 127, 141, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', b'0', 152); INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (34, 128, 143, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); +INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', b'0', 1); +INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', b'0', 1); COMMIT; -- ---------------------------- @@ -5116,22 +5146,22 @@ CREATE TABLE `system_users` ( -- Records of system_users -- ---------------------------- BEGIN; -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-03-01 09:37:59', 'admin', '2021-01-05 17:03:47', NULL, '2024-03-01 09:37:59', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-03-15 19:32:26', 'admin', '2021-01-05 17:03:47', NULL, '2024-03-15 19:32:26', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '127.0.0.1', '2022-07-08 01:26:27', '', '2021-01-13 23:50:35', NULL, '2022-07-08 01:26:27', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$osUERr6VErPvY3mGUh40Teb06H2pJiFuGaWFLRku82pdU713WTGFS', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-02-29 22:40:00', '', '2021-01-21 02:13:53', NULL, '2024-02-29 22:40:00', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', b'0', 118); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', b'0', 119); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', b'0', 120); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (110, 'admin110', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '小王', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-09-25 22:47:33', '1', '2022-02-22 00:56:14', NULL, '2022-09-25 22:47:33', b'0', 121); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (111, 'test', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '测试用户', NULL, NULL, '[]', '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:42:17', '110', '2022-02-23 13:14:33', NULL, '2023-12-30 11:42:17', b'0', 121); -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (112, 'newobject', '$2a$10$3alwklxqfq8/hKoW6oUV0OJp0IdQpBDauLy4633SpUjrRsStl6kMa', '新对象', NULL, 100, '[]', '', '', 1, '', 0, '0:0:0:0:0:0:0:1', '2023-02-10 13:48:13', '1', '2022-02-23 19:08:03', NULL, '2023-02-10 13:48:13', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (112, 'newobject', '$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', '新对象', NULL, 100, '[]', '', '15601691235', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-16 23:11:38', '1', '2022-02-23 19:08:03', NULL, '2024-03-16 23:11:38', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', NULL, '2022-03-19 18:38:51', b'0', 122); -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[3]', '', '', 0, '', 0, '127.0.0.1', '2022-03-19 22:15:43', '1', '2022-03-19 21:50:58', NULL, '2022-03-19 22:15:43', b'0', 1); -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 'aotemane', '$2a$10$/WCwGHu1eq0wOVDd/u8HweJ0gJCHyLS6T7ndCqI8UXZAQom1etk2e', '1', '11', 101, '[]', '', '', 1, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2022-06-22 13:34:58', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[1]', '', '15601691236', 1, '', 0, '127.0.0.1', '2022-03-19 22:15:43', '1', '2022-03-19 21:50:58', '1', '2024-03-15 19:48:11', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 'aotemane', '$2a$10$/WCwGHu1eq0wOVDd/u8HweJ0gJCHyLS6T7ndCqI8UXZAQom1etk2e', '1', '11', 101, '[]', '', '15601691238', 1, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-03-15 19:48:22', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (116, '15601691302', '$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6', '小豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', b'0', 124); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', b'0', 1); -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '', 2, '', 0, '', NULL, '1', '2022-07-09 17:44:43', '1', '2023-12-05 19:33:20', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 2, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', NULL, '2024-03-17 09:10:27', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (126, 'tudou123', '$2a$04$lecJZ/CqgknEp7mDV2d4ou0beyj1GbM3.nVEZe//8WgQpR.JBgnAu', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', b'0', 151); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (127, 'admin2024', '$2a$04$cHdZ7N6AUKysa2XTUG/J/egYtAzdwtpnNpcMVHDrupt1dyn4teOku', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:43:28', '1', '2023-12-30 11:43:17', NULL, '2023-12-30 11:43:28', b'0', 152); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (128, 'xiaoming', '$2a$04$BRinw4an9PBGvx6K7GLNre6rWU0.1HMYHkQCN6Oir74zNFKkNKRzm', 'xiaoming', NULL, NULL, NULL, '', '15601691301', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-02-29 23:48:33', '1', '2024-02-27 21:58:25', NULL, '2024-02-29 23:48:33', b'0', 153); diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java index 444f7856ed..bd931e2137 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java @@ -35,7 +35,7 @@ public class BannerApplicationRunner implements ApplicationRunner { System.out.println("[报表模块 yudao-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]"); } // 工作流 - if (isNotPresent("cn.iocoder.yudao.framework.flowable.config.YudaoFlowableConfiguration")) { + if (isNotPresent("cn.iocoder.yudao.module.bpm.framework.flowable.config.BpmFlowableConfiguration")) { System.out.println("[工作流模块 yudao-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]"); } // 商城系统 -- Gitee From cc27652f86686e71362d4c5c69ea8aefb2770c5e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 24 Mar 2024 10:43:37 +0800 Subject: [PATCH 0098/1557] =?UTF-8?q?=E6=9C=80=E6=96=B0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=20SQL=20=E7=9A=84=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- yudao-server/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1b5fc92c15..3a66524bc1 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ yudao-module-system yudao-module-infra - yudao-module-bpm + diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index e5b816b9b2..bc850b5902 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -46,11 +46,11 @@ - - cn.iocoder.boot - yudao-module-bpm-biz - ${revision} - + + + + + -- Gitee From a79985ae5bb13154a67493e4ecfaac34b8f5e434 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 24 Mar 2024 10:44:54 +0800 Subject: [PATCH 0099/1557] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=EF=BC=8C=E6=94=AF=E6=8C=81=20JDK8?= =?UTF-8?q?=20=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/definition/BpmCategoryController.java | 4 ++-- .../admin/definition/BpmFormController.java | 4 ++-- .../admin/definition/BpmModelController.java | 4 ++-- .../definition/BpmProcessDefinitionController.java | 2 +- .../definition/BpmProcessExpressionController.java | 5 +++-- .../definition/BpmProcessListenerController.java | 5 +++-- .../admin/definition/BpmUserGroupController.java | 4 ++-- .../vo/category/BpmCategorySaveReqVO.java | 5 +++-- .../expression/BpmProcessExpressionSaveReqVO.java | 5 +++-- .../admin/definition/vo/form/BpmFormRespVO.java | 2 +- .../admin/definition/vo/form/BpmFormSaveReqVO.java | 5 +++-- .../definition/vo/group/BpmUserGroupSaveReqVO.java | 5 +++-- .../vo/listener/BpmProcessListenerSaveReqVO.java | 5 +++-- .../definition/vo/model/BpmModelUpdateReqVO.java | 3 ++- .../controller/admin/oa/BpmOALeaveController.java | 5 +++-- .../admin/oa/vo/BpmOALeaveCreateReqVO.java | 4 ++-- .../admin/task/BpmProcessInstanceController.java | 4 ++-- .../task/BpmProcessInstanceCopyController.java | 4 ++-- .../controller/admin/task/BpmTaskController.java | 4 ++-- .../admin/task/vo/task/BpmTaskApproveReqVO.java | 2 +- .../admin/task/vo/task/BpmTaskDelegateReqVO.java | 5 +++-- .../admin/task/vo/task/BpmTaskSignCreateReqVO.java | 2 +- .../BpmTaskAssignStartUserExpression.java | 2 +- .../BpmTaskCandidateDeptLeaderStrategy.java | 2 +- .../BpmTaskCandidateDeptMemberStrategy.java | 2 +- .../BpmTaskCandidateExpressionStrategy.java | 4 ++-- .../strategy/BpmTaskCandidateGroupStrategy.java | 2 +- .../strategy/BpmTaskCandidatePostStrategy.java | 2 +- .../strategy/BpmTaskCandidateRoleStrategy.java | 2 +- .../BpmTaskCandidateStartUserSelectStrategy.java | 2 +- .../strategy/BpmTaskCandidateUserStrategy.java | 2 +- .../listener/BpmProcessInstanceEventListener.java | 2 +- .../framework/web/config/BpmWebConfiguration.java | 2 +- .../bpm/framework/web/core/FlowableWebFilter.java | 9 +++++---- .../bpm/service/definition/BpmCategoryService.java | 2 +- .../service/definition/BpmCategoryServiceImpl.java | 12 +++++------- .../bpm/service/definition/BpmFormService.java | 2 +- .../bpm/service/definition/BpmFormServiceImpl.java | 2 +- .../bpm/service/definition/BpmModelServiceImpl.java | 4 ++-- .../definition/BpmProcessDefinitionServiceImpl.java | 2 +- .../definition/BpmProcessExpressionService.java | 5 +++-- .../definition/BpmProcessExpressionServiceImpl.java | 13 ++++++------- .../definition/BpmProcessListenerService.java | 5 +++-- .../definition/BpmProcessListenerServiceImpl.java | 3 ++- .../bpm/service/definition/BpmUserGroupService.java | 2 +- .../service/definition/BpmUserGroupServiceImpl.java | 2 +- .../dto/BpmProcessDefinitionCreateReqDTO.java | 4 ++-- .../bpm/service/oa/BpmOALeaveServiceImpl.java | 2 +- .../task/BpmProcessInstanceCopyServiceImpl.java | 2 +- .../bpm/service/task/BpmProcessInstanceService.java | 2 +- .../service/task/BpmProcessInstanceServiceImpl.java | 2 +- .../module/bpm/service/task/BpmTaskService.java | 2 +- .../module/bpm/service/task/BpmTaskServiceImpl.java | 8 ++++---- .../category/BpmCategoryServiceImplTest.java | 3 ++- 54 files changed, 106 insertions(+), 94 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java index 322666615b..a787905541 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java @@ -12,12 +12,12 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.Comparator; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java index b957a75a7a..4ec377610c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java @@ -11,12 +11,12 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index dcf91260fb..4095450233 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -19,8 +19,6 @@ import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDT import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Model; import org.flowable.engine.repository.ProcessDefinition; @@ -28,6 +26,8 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.io.IOException; import java.util.HashSet; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java index 149737ca0f..ee23c63e8f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java @@ -16,7 +16,6 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionServic import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.repository.Deployment; @@ -28,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java index 4b119f7996..a6e11a03c8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java @@ -11,12 +11,13 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessExpressionServic import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - BPM 流程表达式") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java index 843f53dbaf..c6cc391c36 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java @@ -11,12 +11,13 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessListenerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - BPM 流程监听器") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java index 64b80345c0..fca7d5b0f7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java @@ -12,12 +12,12 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java index d1a175ec57..d4865e7f60 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java @@ -3,10 +3,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - BPM 流程分类新增/修改 Request VO") @Data public class BpmCategorySaveReqVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java index 9c7301a7d7..2755bf80e0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - BPM 流程表达式新增/修改 Request VO") @Data public class BpmProcessExpressionSaveReqVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java index 1c4eb762ca..832d4d40f5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java index 4da13aaf8c..c890859704 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; + import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import java.util.List; @Schema(description = "管理后台 - 动态表单创建/更新 Request VO") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java index 1993cdba07..470eb0e530 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; + import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; +import lombok.Data; +import javax.validation.constraints.NotNull; import java.util.Set; @Schema(description = "管理后台 - 用户组创建/修改 Request VO") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java index f69d0dfe1a..ef022b86c7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - BPM 流程监听器新增/修改 Request VO") @Data public class BpmProcessListenerSaveReqVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java index 94585af3de..231ead168b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java @@ -3,10 +3,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; import lombok.Data; import org.hibernate.validator.constraints.URL; +import javax.validation.constraints.NotEmpty; + @Schema(description = "管理后台 - 流程模型的更新 Request VO") @Data public class BpmModelUpdateReqVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java index 1447494506..47a72800e6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java @@ -11,12 +11,13 @@ import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java index 856a225477..f843059a12 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.AssertTrue; -import jakarta.validation.constraints.NotNull; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.AssertTrue; +import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 50fbc9fa8b..52198fe917 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -23,8 +23,6 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.task.api.Task; @@ -32,6 +30,8 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java index e9f0eb4441..cfd2f963da 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java @@ -16,8 +16,6 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.flowable.engine.history.HistoricProcessInstance; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -25,6 +23,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.Map; import java.util.stream.Stream; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 7d72a133bd..fb757d2b81 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -17,8 +17,6 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; @@ -28,6 +26,8 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java index 0be06a6c8d..5d35a0e815 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.util.Collection; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java index cd1fce4416..96c42deb80 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - 委派流程任务的 Request VO") @Data public class BpmTaskDelegateReqVO { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java index 71278b37f5..e2a153239e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import jakarta.validation.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import java.util.Set; @Schema(description = "管理后台 - 加签任务的创建(加签) Request VO") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index 4df9eb1a56..ebdcf8bb0d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import jakarta.annotation.Resource; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Set; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java index 485552f91f..e3c439ed0d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategy.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCand import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.List; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java index f60b1cc8b2..78f1589e12 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategy.java @@ -6,10 +6,10 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidat import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.List; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java index e51ab76e00..e0f9dabe5a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; +import cn.hutool.core.convert.Convert; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; -import org.dromara.hutool.core.convert.Convert; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java index bc161886b0..da1aa39441 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategy.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Collection; import java.util.List; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java index 3f2ae58f15..ca259ffffa 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategy.java @@ -6,10 +6,10 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidat import cn.iocoder.yudao.module.system.api.dept.PostApi; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.List; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java index 0dd1786268..de51b3c771 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategy.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCand import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.system.api.permission.PermissionApi; import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Set; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java index ef31d88854..36750effb9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserSelectStrategy.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidat import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import jakarta.annotation.Resource; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.delegate.DelegateExecution; @@ -15,6 +14,7 @@ import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.*; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java index 390e4903a0..a6daec0e07 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategy.java @@ -4,10 +4,10 @@ import cn.iocoder.yudao.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Set; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java index cf1506e8df..f6d0a28c09 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmProcessInstanceEventListener.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import com.google.common.collect.ImmutableSet; -import jakarta.annotation.Resource; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; @@ -11,6 +10,7 @@ import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Set; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java index d4af61c9bf..86e3135fcb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.framework.web.config; import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; import cn.iocoder.yudao.module.bpm.framework.web.core.FlowableWebFilter; -import org.springdoc.core.models.GroupedOpenApi; +import org.springdoc.core.GroupedOpenApi; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java index 29fc7c3bff..7c7ce35d4f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/core/FlowableWebFilter.java @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.bpm.framework.web.core; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; -import jakarta.servlet.FilterChain; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; import org.springframework.web.filter.OncePerRequestFilter; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** @@ -33,4 +33,5 @@ public class FlowableWebFilter extends OncePerRequestFilter { FlowableUtils.clearAuthenticatedUserId(); } } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java index a61b132b5e..e267d30556 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryService.java @@ -4,8 +4,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; -import jakarta.validation.Valid; +import javax.validation.Valid; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java index 8db37a46e4..d76eb98e9d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmCategoryServiceImpl.java @@ -2,18 +2,16 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO; -import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; -import org.springframework.validation.annotation.Validated; - import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; - import cn.iocoder.yudao.module.bpm.dal.mysql.category.BpmCategoryMapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.Collection; import java.util.Collections; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java index 3c8425084c..cf421e1906 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormService.java @@ -5,8 +5,8 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; -import jakarta.validation.Valid; +import javax.validation.Valid; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java index d49018f6ba..51d022dac1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceImpl.java @@ -11,10 +11,10 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmFormMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmFormFieldRespDTO; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index eb392ace2f..bedb438770 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -15,8 +15,6 @@ import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.StartEvent; @@ -31,6 +29,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import java.util.Objects; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 3324a5e79a..3b651ec263 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -12,7 +12,6 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitio import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessDefinitionInfoMapper; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.common.engine.impl.db.SuspensionState; @@ -24,6 +23,7 @@ import org.flowable.engine.repository.ProcessDefinitionQuery; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java index caca96e25e..0d8a99e076 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionService.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO; -import jakarta.validation.*; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import javax.validation.Valid; /** * BPM 流程表达式 Service 接口 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java index 122f3921da..f379bfdf75 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessExpressionServiceImpl.java @@ -1,19 +1,18 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessExpressionMapper; import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; - -import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessExpressionMapper; +import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.PROCESS_EXPRESSION_NOT_EXISTS; /** * BPM 流程表达式 Service 实现类 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java index 65290054a8..f9f1020e0b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerService.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerSaveReqVO; -import jakarta.validation.*; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import javax.validation.Valid; /** * BPM 流程监听器 Service 接口 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java index 078c92287a..e5f47b90b5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessListenerServiceImpl.java @@ -9,12 +9,13 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerD import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessListenerMapper; import cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerValueType; -import jakarta.annotation.Resource; import org.flowable.engine.delegate.JavaDelegate; import org.flowable.engine.delegate.TaskListener; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java index a95dc24dac..967f6e1049 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupService.java @@ -4,8 +4,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; -import jakarta.validation.Valid; +import javax.validation.Valid; import java.util.Collection; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java index 3c64891046..3d60dea7c2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceImpl.java @@ -8,10 +8,10 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserG import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO; import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmUserGroupMapper; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java index 4008f8f077..e7b84c9986 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/dto/BpmProcessDefinitionCreateReqDTO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.bpm.service.definition.dto; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; import java.util.List; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 9a84f676a8..ff8816901f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -10,11 +10,11 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.HashMap; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index aba8bd9f17..5d73470011 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceCopyMapper; import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; @@ -16,6 +15,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.Collection; import java.util.List; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java index 9ba4cb0774..43e44aa5c1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java @@ -5,11 +5,11 @@ import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; -import jakarta.validation.Valid; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; +import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index f6283eff84..9787e52c0c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index f69757f142..e9a55c0ffe 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.bpm.service.task; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; -import jakarta.validation.Valid; import org.flowable.bpmn.model.UserTask; import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; +import javax.validation.Valid; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 7afed756b8..0337208c14 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -9,8 +9,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; @@ -19,12 +17,12 @@ import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.FlowElement; @@ -47,6 +45,8 @@ import org.springframework.transaction.support.TransactionSynchronization; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.*; import java.util.stream.Stream; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java index f71b8aae50..f5033d7c68 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/category/BpmCategoryServiceImplTest.java @@ -8,10 +8,11 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCa import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.mysql.category.BpmCategoryMapper; import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryServiceImpl; -import jakarta.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; +import javax.annotation.Resource; + import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; -- Gitee From ce013a2562883f22884ce267ac8f980dd86c73d4 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 24 Mar 2024 17:15:56 +0800 Subject: [PATCH 0100/1557] =?UTF-8?q?CRM:=20=E6=96=B0=E5=A2=9E=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=A1=8C=E4=B8=9A=E3=80=81=E6=9D=A5=E6=BA=90=E3=80=81?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.java | 24 +++ .../CrmStatisticCustomerIndustryRespVO.java | 27 +++ .../CrmStatisticCustomerLevelRespVO.java | 27 +++ .../CrmStatisticCustomerSourceRespVO.java | 27 +++ .../CrmStatisticsCustomerMapper.java | 9 + .../CrmStatisticsCustomerService.java | 27 +++ .../CrmStatisticsCustomerServiceImpl.java | 164 +++++++++++++----- .../CrmStatisticsCustomerMapper.xml | 64 +++++++ .../module/system/api/dict/DictDataApi.java | 17 ++ yudao-server/pom.xml | 10 +- 10 files changed, 345 insertions(+), 51 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 4a0b2e760e..4b45a9c280 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -2,6 +2,9 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -82,4 +85,25 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerDealCycleByUser(reqVO)); } + @GetMapping("/get-customer-industry-summary") + @Operation(summary = "获取客户行业统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerIndustry(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerIndustry(reqVO)); + } + + @GetMapping("/get-customer-source-summary") + @Operation(summary = "获取客户来源统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerSource(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerSource(reqVO)); + } + + @GetMapping("/get-customer-level-summary") + @Operation(summary = "获取客户级别统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerLevel(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerLevel(reqVO)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java new file mode 100644 index 0000000000..4811740923 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户行业分析 VO") +@Data +public class CrmStatisticCustomerIndustryRespVO { + + @Schema(description = "客户行业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer industryId; + @Schema(description = "客户行业名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String industryName; + + @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCount; + + @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer dealCount; + + @Schema(description = "行业占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double industryPortion; + + @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double dealPortion; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java new file mode 100644 index 0000000000..74e06918c9 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户级别分析 VO") +@Data +public class CrmStatisticCustomerLevelRespVO { + + @Schema(description = "客户级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer level; + @Schema(description = "客户级别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String levelName; + + @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCount; + + @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer dealCount; + + @Schema(description = "级别占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double levelPortion; + + @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double dealPortion; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java new file mode 100644 index 0000000000..2edba39edb --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户来源分析 VO") +@Data +public class CrmStatisticCustomerSourceRespVO { + + @Schema(description = "客户来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer source; + @Schema(description = "客户来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String sourceName; + + @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCount; + + @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer dealCount; + + @Schema(description = "来源占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double sourcePortion; + + @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double dealPortion; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 19bd76fc32..0e8df55657 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -42,4 +45,10 @@ public interface CrmStatisticsCustomerMapper { List selectCustomerDealCycleGroupbyUser(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerIndustryListGroupbyIndustryId(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerSourceListGroupbySource(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerLevelListGroupbyLevel(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 546124701a..5402c706de 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import java.util.List; @@ -77,4 +80,28 @@ public interface CrmStatisticsCustomerService { */ List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO); + /** + * 获取客户行业统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户来源统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerSource(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户级别统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index c9654a68eb..e2a3752911 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -6,6 +6,9 @@ import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -78,15 +81,15 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // TODO @dhb52:这个是不是要 add 到 respVoList 里?或者还可以 convertList(times, time -> new CrmStatisticsCustomerDealCycleByDateRespVO()...) List respVoList = new ArrayList<>(times.size()); final Map customerCreateCountMap = convertMap(customerCreateCount, - CrmStatisticsCustomerSummaryByDateRespVO::getTime, - CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); + CrmStatisticsCustomerSummaryByDateRespVO::getTime, + CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); final Map customerDealCountMap = convertMap(customerDealCount, - CrmStatisticsCustomerSummaryByDateRespVO::getTime, - CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); + CrmStatisticsCustomerSummaryByDateRespVO::getTime, + CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); times.forEach(time -> respVoList.add( - new CrmStatisticsCustomerSummaryByDateRespVO().setTime(time) - .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) + new CrmStatisticsCustomerSummaryByDateRespVO().setTime(time) + .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) + .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0)) )); return respVoList; } @@ -108,25 +111,25 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 3. 合并统计数据 final Map customerCreateCountMap = convertMap(customerCreateCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); final Map customerDealCountMap = convertMap(customerDealCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); final Map contractPriceMap = convertMap(contractPrice, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); final Map receivablePriceMap = convertMap(receivablePrice, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { final CrmStatisticsCustomerSummaryByUserRespVO vo = new CrmStatisticsCustomerSummaryByUserRespVO(); vo.setOwnerUserId(userId); vo.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) - .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.ZERO)) - .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.ZERO)); + .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) + .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.ZERO)) + .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.ZERO)); respVoList.add(vo); }); @@ -156,15 +159,15 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 4. 合并统计数据 List respVoList = new ArrayList<>(times.size()); final Map followupRecordCountMap = convertMap(followupRecordCount, - CrmStatisticsFollowupSummaryByDateRespVO::getTime, - CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); + CrmStatisticsFollowupSummaryByDateRespVO::getTime, + CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); final Map followupCustomerCountMap = convertMap(followupCustomerCount, - CrmStatisticsFollowupSummaryByDateRespVO::getTime, - CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); + CrmStatisticsFollowupSummaryByDateRespVO::getTime, + CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); times.forEach(time -> respVoList.add( - new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) - .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) - .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) + new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) + .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) + .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) )); return respVoList; @@ -186,16 +189,16 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 3. 合并统计数据 final Map followupRecordCountMap = convertMap(followupRecordCount, - CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); + CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); final Map followupCustomerCountMap = convertMap(followupCustomerCount, - CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); + CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { final CrmStatisticsFollowupSummaryByUserRespVO vo = new CrmStatisticsFollowupSummaryByUserRespVO() - .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) - .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); + .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) + .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); vo.setOwnerUserId(userId); respVoList.add(vo); }); @@ -221,7 +224,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 3. 获取字典数据 List followUpTypes = dictDataApi.getDictDataList(CRM_FOLLOW_UP_TYPE); final Map followUpTypeMap = convertMap(followUpTypes, - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); respVoList.forEach(vo -> { vo.setFollowupType(followUpTypeMap.get(vo.getFollowupType())); }); @@ -244,19 +247,19 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 3. 设置 创建人、负责人、行业、来源 // 获取客户所属行业 Map industryMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_INDUSTRY), - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); // 获取客户来源 Map sourceMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_SOURCE), - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); + DictDataRespDTO::getValue, DictDataRespDTO::getLabel); // 获取创建人、负责人列表 Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(respVoList, - vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); + vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); respVoList.forEach(vo -> { MapUtils.findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); MapUtils.findAndThen(sourceMap, vo.getSource(), vo::setSourceName); MapUtils.findAndThen(userMap, NumberUtils.parseLong(vo.getCreatorUserId()), - user -> vo.setCreatorUserName(user.getNickname())); + user -> vo.setCreatorUserName(user.getNickname())); MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); }); @@ -283,11 +286,11 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 4. 合并统计数据 List respVoList = new ArrayList<>(times.size()); final Map customerDealCycleMap = convertMap(customerDealCycle, - CrmStatisticsCustomerDealCycleByDateRespVO::getTime, - CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); + CrmStatisticsCustomerDealCycleByDateRespVO::getTime, + CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); times.forEach(time -> respVoList.add( - new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) - .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) + new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) + .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) )); return respVoList; } @@ -308,16 +311,16 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe // 3. 合并统计数据 final Map customerDealCycleMap = convertMap(customerDealCycle, - CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); + CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); final Map customerDealCountMap = convertMap(customerDealCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); + CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, + CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); List respVoList = new ArrayList<>(userIds.size()); userIds.forEach(userId -> { final CrmStatisticsCustomerDealCycleByUserRespVO vo = new CrmStatisticsCustomerDealCycleByUserRespVO() - .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); + .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) + .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); vo.setOwnerUserId(userId); respVoList.add(vo); }); @@ -328,6 +331,75 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return respVoList; } + @Override + public List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List industryRespVOList = customerMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); + if (CollUtil.isEmpty(industryRespVOList)) { + return Collections.emptyList(); + } + + return convertList(industryRespVOList, item -> { + if (ObjUtil.isNull(item.getIndustryId())) { + return item; + } + item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); + return item; + }); + } + + @Override + public List getCustomerSource(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List sourceRespVOList = customerMapper.selectCustomerSourceListGroupbySource(reqVO); + if (CollUtil.isEmpty(sourceRespVOList)) { + return Collections.emptyList(); + } + + return convertList(sourceRespVOList, item -> { + if (ObjUtil.isNull(item.getSource())) { + return item; + } + item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); + return item; + }); + } + + @Override + public List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List levelRespVOList = customerMapper.selectCustomerLevelListGroupbyLevel(reqVO); + if (CollUtil.isEmpty(levelRespVOList)) { + return Collections.emptyList(); + } + + return convertList(levelRespVOList, item -> { + if (ObjUtil.isNull(item.getLevel())) { + return item; + } + item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); + return item; + }); + } + /** * 拼接用户信息(昵称) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index fce255651f..758da4fcd0 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -249,4 +249,68 @@ GROUP BY a.owner_user_id + + + + diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java index 5c47f4de3c..b75684de05 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.system.api.dict; +import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import java.util.Collection; @@ -33,6 +35,21 @@ public interface DictDataApi { */ DictDataRespDTO getDictData(String type, String value); + /** + * 获得指定的字典标签,从缓存中 + * + * @param type 字典类型 + * @param value 字典数据值 + * @return 字典标签 + */ + default String getDictDataLabel(String type, Integer value) { + DictDataRespDTO dictData = getDictData(type, String.valueOf(value)); + if (ObjUtil.isNull(dictData)) { + return StrUtil.EMPTY; + } + return dictData.getLabel(); + } + /** * 解析获得指定的字典数据,从缓存中 * diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index ff17b298d3..ade54c0685 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -95,11 +95,11 @@ - - cn.iocoder.boot - yudao-module-erp-biz - ${revision} - + + + + + -- Gitee From 5999b80471136848746f4d6f048dacc6ea9ae81c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 24 Mar 2024 20:09:06 +0800 Subject: [PATCH 0101/1557] =?UTF-8?q?=E5=AF=B9=E6=8E=A5openai=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/image/ImageClient.java | 1 - .../ai/imageopenai/OpenAiImageApi.java | 62 +++++++++++++++---- .../ai/imageopenai/OpenAiImageClient.java | 16 +++-- .../ai/imageopenai/OpenAiImageOptions.java | 16 +++++ .../imageopenai/api/OpenAiImageResponse.java | 1 + .../ai/image/OpenAiImageClientTests.java | 40 +++++++++++- 6 files changed, 114 insertions(+), 22 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java index 00bd3e176c..98fc44ff63 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java @@ -19,7 +19,6 @@ package cn.iocoder.yudao.framework.ai.image; import cn.iocoder.yudao.framework.ai.model.ModelClient; -@FunctionalInterface public interface ImageClient extends ModelClient { /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java index bcc03f2eed..0f651ac09f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java @@ -1,14 +1,25 @@ package cn.iocoder.yudao.framework.ai.imageopenai; +import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; import cn.iocoder.yudao.framework.ai.util.JacksonUtil; import io.netty.channel.ChannelOption; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.netty.http.client.HttpClient; +import java.io.IOException; +import java.net.URI; import java.time.Duration; /** @@ -17,6 +28,7 @@ import java.time.Duration; * author: fansili * time: 2024/3/17 09:53 */ +@Slf4j public class OpenAiImageApi { private static final String DEFAULT_BASE_URL = "https://api.openai.com"; @@ -24,6 +36,8 @@ public class OpenAiImageApi { // 发送请求 webClient private final WebClient webClient; + private CloseableHttpClient httpclient = HttpClients.createDefault(); + public OpenAiImageApi(String apiKey) { this.apiKey = apiKey; // 创建一个HttpClient实例并设置超时 @@ -37,18 +51,40 @@ public class OpenAiImageApi { } public OpenAiImageResponse createImage(OpenAiImageRequest request) { - String res = webClient.post() - .uri(uriBuilder -> uriBuilder.path("/v1/images/generations").build()) - .header("Content-Type", "application/json") - .header("Authorization", "Bearer " + apiKey) - // 设置请求体(这里假设jsonStr是一个JSON格式的字符串) - .body(BodyInserters.fromValue(JacksonUtil.toJson(request))) - // 发送请求并获取响应体 - .retrieve() - // 转换响应体为String类型 - .bodyToMono(String.class) - .block(); - // TODO: 2024/3/17 这里发送请求会失败! - return null; + HttpPost httpPost = new HttpPost(); + httpPost.setURI(URI.create(DEFAULT_BASE_URL.concat("/v1/images/generations"))); + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Authorization", "Bearer " + apiKey); + httpPost.setEntity(new StringEntity(JacksonUtil.toJson(request), "UTF-8")); + + CloseableHttpResponse response= null; + try { + response = httpclient.execute(httpPost); + HttpEntity entity = response.getEntity(); + String resultJson = EntityUtils.toString(entity); + log.info("openai 图片生成结果: {}", resultJson); + return JSONUtil.toBean(resultJson, OpenAiImageResponse.class); + } catch (IOException e) { + throw new RuntimeException(e); + } finally { + if (response != null) { + try { + response.close(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + } +// String res = webClient.post() +// .uri(uriBuilder -> uriBuilder.path("/v1/images/generations").build()) +// .header("Content-Type", "application/json") +// .header("Authorization", "Bearer " + apiKey) +// // 设置请求体(这里假设jsonStr是一个JSON格式的字符串) +// .body(BodyInserters.fromValue(JacksonUtil.toJson(request))) +// // 发送请求并获取响应体 +// .retrieve() +// // 转换响应体为String类型 +// .bodyToMono(String.class) +// .block(); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java index a1bb59db1c..a1083cd184 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java @@ -1,15 +1,13 @@ package cn.iocoder.yudao.framework.ai.imageopenai; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.codec.Base64; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.chat.ChatException; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; -import cn.iocoder.yudao.framework.ai.image.ImageClient; -import cn.iocoder.yudao.framework.ai.image.ImageOptions; -import cn.iocoder.yudao.framework.ai.image.ImagePrompt; -import cn.iocoder.yudao.framework.ai.image.ImageResponse; +import cn.iocoder.yudao.framework.ai.image.*; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; -import jdk.jfr.Frequency; import lombok.extern.slf4j.Slf4j; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; @@ -74,9 +72,15 @@ public class OpenAiImageClient implements ImageClient { // 创建请求 OpenAiImageRequest request = new OpenAiImageRequest(); BeanUtil.copyProperties(openAiImageOptions, request); + request.setPrompt(imagePrompt.getInstructions().get(0).getText()); // 发送请求 OpenAiImageResponse response = openAiImageApi.createImage(request); - return null; + return new ImageResponse(response.getData().stream().map(res -> { + byte[] bytes = HttpUtil.downloadBytes(res.getUrl()); + String base64 = Base64.encode(bytes); + return new ImageGeneration(new Image(res.getUrl(), base64)); + }).toList()); }); } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java index f18ccd2985..c80396521f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.ai.imageopenai; import cn.iocoder.yudao.framework.ai.image.ImageOptions; import lombok.Data; +import lombok.Getter; import lombok.experimental.Accessors; /** @@ -47,6 +48,21 @@ public class OpenAiImageOptions implements ImageOptions { // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 private String endUserId; + @Getter + public enum ResponseFormatEnum { + + URL("url"), + BASE64("b64_json"), + + ; + + ResponseFormatEnum(String value) { + this.value = value; + } + + private String value; + } + // // 适配 spring ai diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java index 04de1494d1..1f4ab61526 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java @@ -23,6 +23,7 @@ public class OpenAiImageResponse { public static class Item { private String url; + private String b64_json; } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java index 83d5569304..8a6fb5f23b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/OpenAiImageClientTests.java @@ -6,6 +6,14 @@ import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; import org.junit.Before; import org.junit.Test; +import javax.imageio.ImageIO; +import javax.swing.*; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.Base64; +import java.util.Scanner; + /** * author: fansili * time: 2024/3/17 10:40 @@ -20,12 +28,40 @@ public class OpenAiImageClientTests { // 初始化 openAiImageClient this.openAiImageClient = new OpenAiImageClient( new OpenAiImageApi(""), - new OpenAiImageOptions() + new OpenAiImageOptions().setResponseFormat(OpenAiImageOptions.ResponseFormatEnum.URL.getValue()) ); } @Test public void callTest() { - openAiImageClient.call(new ImagePrompt("我和我的小狗,一起在北极和企鹅玩排球。")); + ImageResponse call = openAiImageClient.call(new ImagePrompt("我和我的小狗,一起在北极和企鹅玩排球。")); + System.err.println("url: " + call.getResult().getOutput().getUrl()); + System.err.println("base64: " + call.getResult().getOutput().getB64Json()); + + String base64String = call.getResult().getOutput().getB64Json(); + ImageIcon imageIcon = new ImageIcon(decodeBase64ToImage(base64String)); + JLabel label = new JLabel(imageIcon); + + JFrame frame = new JFrame("Base64 Image Display"); + frame.getContentPane().add(label); + frame.pack(); + frame.setVisible(true); + + // 阻止退出 + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } + + + // 将Base64解码为BufferedImage + private static BufferedImage decodeBase64ToImage(String base64String) { + try { + byte[] decodedBytes = Base64.getDecoder().decode(base64String); + ByteArrayInputStream bis = new ByteArrayInputStream(decodedBytes); + return ImageIO.read(bis); + } catch (IOException e) { + System.out.println("Error decoding the base64 image: " + e.getMessage()); + return null; + } } } -- Gitee From 6e261de03e3b28cd293bd60f51cc9e4fdad1c31f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 24 Mar 2024 20:10:34 +0800 Subject: [PATCH 0102/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0http=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 276e877330..a4e1deae2f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -114,6 +114,12 @@ broadscope-bailian-sdk-java 1.3.0 + + org.apache.httpcomponents + httpclient + 4.5.14 + compile + \ No newline at end of file -- Gitee From 22191e81e3a74f90dd20efe5d4db2d7938aa91de Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 24 Mar 2024 22:24:46 +0800 Subject: [PATCH 0103/1557] =?UTF-8?q?CRM:=20=E6=96=B0=E5=A2=9E=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=8C=BA=E5=9F=9F=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.java | 8 ++++ .../CrmStatisticCustomerAreaRespVO.java | 27 ++++++++++++ .../CrmStatisticsCustomerMapper.java | 3 ++ .../CrmStatisticsCustomerService.java | 9 ++++ .../CrmStatisticsCustomerServiceImpl.java | 44 ++++++++++++++++--- .../CrmStatisticsCustomerMapper.xml | 21 +++++++++ 6 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 4b45a9c280..0422bff4b9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; @@ -106,4 +107,11 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerLevel(reqVO)); } + @GetMapping("/get-customer-area-summary") + @Operation(summary = "获取客户地区统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerArea(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerArea(reqVO)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java new file mode 100644 index 0000000000..5f6924d58d --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户省份分析 VO") +@Data +public class CrmStatisticCustomerAreaRespVO { + + @Schema(description = "省份编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer areaId; + @Schema(description = "省份名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "浙江省") + private String areaName; + + @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerCount; + + @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer dealCount; + + @Schema(description = "省份占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double areaPortion; + + @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Double dealPortion; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 0e8df55657..168d0fb515 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; @@ -51,4 +52,6 @@ public interface CrmStatisticsCustomerMapper { List selectCustomerLevelListGroupbyLevel(CrmStatisticsCustomerReqVO reqVO); + List selectSummaryListByAreaId(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 5402c706de..73bd437d6c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; @@ -104,4 +105,12 @@ public interface CrmStatisticsCustomerService { */ List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO); + /** + * 获取客户地区统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerArea(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index e2a3752911..69cbd64421 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -5,7 +5,11 @@ import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; @@ -30,6 +34,7 @@ import java.util.Map; import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; /** @@ -256,11 +261,11 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); respVoList.forEach(vo -> { - MapUtils.findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); - MapUtils.findAndThen(sourceMap, vo.getSource(), vo::setSourceName); - MapUtils.findAndThen(userMap, NumberUtils.parseLong(vo.getCreatorUserId()), + findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); + findAndThen(sourceMap, vo.getSource(), vo::setSourceName); + findAndThen(userMap, NumberUtils.parseLong(vo.getCreatorUserId()), user -> vo.setCreatorUserName(user.getNickname())); - MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); + findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); }); return respVoList; @@ -400,6 +405,35 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe }); } + @Override + public List getCustomerArea(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户地区统计数据 + List list = customerMapper.selectSummaryListByAreaId(reqVO); + if (CollUtil.isEmpty(list)) { + return Collections.emptyList(); + } + + // 拼接数据 + List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); + areaList.add(new Area().setId(null).setName("未知")); + Map areaMap = convertMap(areaList, Area::getId); + List customerAreaRespVOList = convertList(list, item -> { + Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); + if (parentId == null) { + return item; + } + findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); + return item; + }); + return customerAreaRespVOList; + } + /** * 拼接用户信息(昵称) * @@ -408,7 +442,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe private void appendUserInfo(List respVoList) { Map userMap = adminUserApi.getUserMap(convertSet(respVoList, CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); - respVoList.forEach(vo -> MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); + respVoList.forEach(vo -> findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 758da4fcd0..e843d1dee6 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -312,5 +312,26 @@ GROUP BY level; + -- Gitee From 3b8dee4963df6ddaa11baa11a8dbcd01cb298f2f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 26 Mar 2024 08:38:59 +0800 Subject: [PATCH 0104/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tatustEnum.java => BpmTaskStatusEnum.java} | 2 +- .../admin/task/BpmTaskController.java | 2 +- .../bpm/dal/dataobject/oa/BpmOALeaveDO.java | 4 +-- .../candidate/BpmTaskCandidateInvoker.java | 2 ++ .../bpm/service/oa/BpmOALeaveServiceImpl.java | 4 +-- .../bpm/service/task/BpmTaskServiceImpl.java | 36 +++++++++---------- .../module/crm/util/CrmAuditStatusUtils.java | 8 ++--- .../controller/admin/auth/AuthController.java | 2 +- 8 files changed, 31 insertions(+), 29 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/{BpmTaskStatustEnum.java => BpmTaskStatusEnum.java} (98%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java similarity index 98% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java index eb4af0f623..40a385a582 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java @@ -11,7 +11,7 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum BpmTaskStatustEnum { +public enum BpmTaskStatusEnum { RUNNING(1, "审批中"), APPROVE(2, "审批通过"), diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 7d72a133bd..70eb0f5e3d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -93,7 +93,7 @@ public class BpmTaskController { @GetMapping("manager-page") @Operation(summary = "获取全部任务的分页", description = "用于【流程任务】菜单") @PreAuthorize("@ss.hasPermission('bpm:task:mananger-query')") - public CommonResult> getDoneTaskPage(@Valid BpmTaskPageReqVO pageVO) { + public CommonResult> getTaskManagerPage(@Valid BpmTaskPageReqVO pageVO) { PageResult pageResult = taskService.getTaskPage(getLoginUserId(), pageVO); if (CollUtil.isEmpty(pageResult.getList())) { return success(PageResult.empty()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java index ff63f8e43b..6c5b648dac 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.dal.dataobject.oa; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -57,7 +57,7 @@ public class BpmOALeaveDO extends BaseDO { /** * 审批结果 * - * 枚举 {@link BpmTaskStatustEnum} + * 枚举 {@link BpmTaskStatusEnum} * 考虑到简单,所以直接复用了 BpmProcessInstanceStatusEnum 枚举,也可以自己定义一个枚举哈 */ private Integer status; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java index 7bad358070..c0c7ca0d9d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; @@ -77,6 +78,7 @@ public class BpmTaskCandidateInvoker { * @param execution 执行任务 * @return 用户编号集合 */ + @DataPermission(enable = false) // 忽略数据权限,避免因为过滤,导致找不到候选人 public Set calculateUsers(DelegateExecution execution) { Integer strategy = BpmnModelUtils.parseCandidateStrategy(execution.getCurrentFlowElement()); String param = BpmnModelUtils.parseCandidateParam(execution.getCurrentFlowElement()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 9a84f676a8..53e2759142 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -9,7 +9,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,7 +48,7 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { // 插入 OA 请假单 long day = LocalDateTimeUtil.between(createReqVO.getStartTime(), createReqVO.getEndTime()).toDays(); BpmOALeaveDO leave = BeanUtils.toBean(createReqVO, BpmOALeaveDO.class) - .setUserId(userId).setDay(day).setStatus(BpmTaskStatustEnum.RUNNING.getStatus()); + .setUserId(userId).setDay(day).setStatus(BpmTaskStatusEnum.RUNNING.getStatus()); leaveMapper.insert(leave); // 发起 BPM 流程 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 7afed756b8..176d38a0d3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -17,7 +17,7 @@ import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; @@ -202,7 +202,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 情况三:审批普通的任务。大多数情况下,都是这样 // 3.1 更新 task 状态、原因 - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.APPROVE.getStatus(), reqVO.getReason()); // 3.2 添加评论 taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); @@ -230,14 +230,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { */ private void approveAfterSignTask(Task task, BpmTaskApproveReqVO reqVO) { // 更新父 task 状态 + 原因 - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVING.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.APPROVING.getStatus(), reqVO.getReason()); // 2. 激活子任务 List childrenTaskList = getTaskListByParentTaskId(task.getId()); for (Task childrenTask : childrenTaskList) { taskService.resolveTask(childrenTask.getId()); // 更新子 task 状态 - updateTaskStatus(childrenTask.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); + updateTaskStatus(childrenTask.getId(), BpmTaskStatusEnum.RUNNING.getStatus()); } } @@ -261,7 +261,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 1.2 只处理加签的父任务 Task parentTask = validateTaskExist(parentTaskId); String scopeType = parentTask.getScopeType(); - if (BpmTaskSignTypeEnum.of(scopeType) == null){ + if (BpmTaskSignTypeEnum.of(scopeType) == null) { return; } @@ -275,17 +275,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 3.1.1 owner 重新赋值给父任务的 assignee,这样它就可以被审批 taskService.resolveTask(parentTaskId); // 3.1.2 更新流程任务 status - updateTaskStatus(parentTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); + updateTaskStatus(parentTaskId, BpmTaskStatusEnum.RUNNING.getStatus()); // 3.2 情况二:处理向【向后】加签 } else if (BpmTaskSignTypeEnum.AFTER.getType().equals(scopeType)) { // 只有 parentTask 处于 APPROVING 的情况下,才可以继续 complete 完成 // 否则,一个未审批的 parentTask 任务,在加签出来的任务都被减签的情况下,就直接完成审批,这样会存在问题 Integer status = (Integer) parentTask.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); - if (ObjectUtil.notEqual(status, BpmTaskStatustEnum.APPROVING.getStatus())) { + if (ObjectUtil.notEqual(status, BpmTaskStatusEnum.APPROVING.getStatus())) { return; } // 3.2.2 完成自己(因为它已经没有子任务,所以也可以完成) - updateTaskStatus(parentTaskId, BpmTaskStatustEnum.APPROVE.getStatus()); + updateTaskStatus(parentTaskId, BpmTaskStatusEnum.APPROVE.getStatus()); taskService.complete(parentTaskId); } @@ -311,7 +311,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 底层调用 TaskHelper.changeTaskAssignee(task, task.getOwner()):将 owner 设置为 assignee taskService.resolveTask(task.getId()); // 2.2 更新 task 状态 + 原因 - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.RUNNING.getStatus(), reqVO.getReason()); } @Override @@ -326,7 +326,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { } // 2.1 更新流程实例为不通过 - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.REJECT.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.REJECT.getStatus(), reqVO.getReason()); // 2.2 添加评论 taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.REJECT.getType(), BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason())); @@ -378,7 +378,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { log.error("[updateTaskStatusWhenCreated][taskId({}) 已经有状态({})]", task.getId(), status); return; } - updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); + updateTaskStatus(task.getId(), BpmTaskStatusEnum.RUNNING.getStatus()); } @Override @@ -392,11 +392,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2. 更新 task 状态 + 原因 Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); - if (BpmTaskStatustEnum.isEndStatus(status)) { + if (BpmTaskStatusEnum.isEndStatus(status)) { log.error("[updateTaskStatusWhenCanceled][taskId({}) 处于结果({}),无需进行更新]", taskId, status); return; } - updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_BY_SYSTEM.getReason()); + updateTaskStatusAndReason(taskId, BpmTaskStatusEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_BY_SYSTEM.getReason()); // 补充说明:由于 Task 被删除成 HistoricTask 后,无法通过 taskService.addComment 添加理由,所以无法存储具体的取消理由 } @@ -525,7 +525,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.RETURN.getType(), BpmCommentTypeEnum.RETURN.formatComment(reqVO.getReason())); // 2.2 更新 task 状态 + 原因 - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RETURN.getStatus(), reqVO.getReason()); + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.RETURN.getStatus(), reqVO.getReason()); }); // 3. 执行驳回 @@ -562,7 +562,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.delegateTask(taskId, reqVO.getDelegateUserId().toString()); // 3.3 更新 task 状态。 // 为什么不更新原因?因为原因目前主要给审批通过、不通过时使用 - updateTaskStatus(taskId, BpmTaskStatustEnum.DELEGATE.getStatus()); + updateTaskStatus(taskId, BpmTaskStatusEnum.DELEGATE.getStatus()); } @Override @@ -616,7 +616,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.saveTask(taskEntity); // 2.6 更新 task 状态为 WAIT,只有在向前加签的时候 if (reqVO.getType().equals(BpmTaskSignTypeEnum.BEFORE.getType())) { - updateTaskStatus(taskEntity.getId(), BpmTaskStatustEnum.WAIT.getStatus()); + updateTaskStatus(taskEntity.getId(), BpmTaskStatusEnum.WAIT.getStatus()); } // 3. 创建加签任务 @@ -703,7 +703,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 3. 向后前签,设置子任务的状态为 WAIT,因为需要等父任务审批完 if (BpmTaskSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { - updateTaskStatus(task.getId(), BpmTaskStatustEnum.WAIT.getStatus()); + updateTaskStatus(task.getId(), BpmTaskStatusEnum.WAIT.getStatus()); } } @@ -727,7 +727,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { childTaskList.add(task); // 2.2 更新子任务为已取消 String cancelReason = StrUtil.format("任务被取消,原因:由于[{}]操作[减签],", cancelUser.getNickname()); - childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatustEnum.CANCEL.getStatus(), cancelReason)); + childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatusEnum.CANCEL.getStatus(), cancelReason)); // 2.2 删除任务和所有子任务 taskService.deleteTasks(convertList(childTaskList, Task::getId)); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java index 43e681c5e7..c1d4eaab7c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/util/CrmAuditStatusUtils.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.util; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum; /** @@ -17,9 +17,9 @@ public class CrmAuditStatusUtils { * @param bpmResult BPM 审批结果 */ public static Integer convertBpmResultToAuditStatus(Integer bpmResult) { - Integer auditStatus = BpmTaskStatustEnum.APPROVE.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.APPROVE.getStatus() - : BpmTaskStatustEnum.REJECT.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.REJECT.getStatus() - : BpmTaskStatustEnum.CANCEL.getStatus().equals(bpmResult) ? BpmTaskStatustEnum.CANCEL.getStatus() : null; + Integer auditStatus = BpmTaskStatusEnum.APPROVE.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.APPROVE.getStatus() + : BpmTaskStatusEnum.REJECT.getStatus().equals(bpmResult) ? CrmAuditStatusEnum.REJECT.getStatus() + : BpmTaskStatusEnum.CANCEL.getStatus().equals(bpmResult) ? BpmTaskStatusEnum.CANCEL.getStatus() : null; Assert.notNull(auditStatus, "BPM 审批结果({}) 转换失败", bpmResult); return auditStatus; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index 241cff87e2..f24db16a92 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -99,7 +99,7 @@ public class AuthController { // 1.1 获得用户信息 AdminUserDO user = userService.getUser(getLoginUserId()); if (user == null) { - return null; + return success(null); } // 1.2 获得角色列表 -- Gitee From 85f994f643eb662a13f6100624988804a4f305fa Mon Sep 17 00:00:00 2001 From: wangxiaorui <742397974@qq.com> Date: Tue, 26 Mar 2024 01:19:48 +0000 Subject: [PATCH 0105/1557] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=8F=96=E6=B6=88=E5=88=86=E9=94=80=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E5=88=9B=E5=BB=BA=E5=88=86=E9=94=80=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=98=AF=E6=8C=89=E7=85=A7OrderItem?= =?UTF-8?q?=E7=9A=84=E4=B8=BB=E9=94=AE=E6=9D=A5=E5=88=9B=E5=BB=BA=EF=BC=8C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=9A=84=E6=97=B6=E5=80=99=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=8C=89=E7=85=A7OrderItem=E7=9A=84=E4=B8=BB=E9=94=AE=E6=9D=A5?= =?UTF-8?q?=E5=8F=96=E6=B6=88=EF=BC=8C=E5=90=A6=E5=88=99=E4=BC=9A=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88=E5=88=86=E9=94=80?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiaorui <742397974@qq.com> --- .../trade/service/order/handler/TradeBrokerageOrderHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java index 4a02ef4ccc..526d470877 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java @@ -83,7 +83,7 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler { if (order.getBrokerageUserId() == null) { return; } - cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId()); + cancelBrokerage(order.getBrokerageUserId(), orderItem.getId()); } /** -- Gitee From 210b4e54d703cd639435689266a19e35ae1e3ea9 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Wed, 27 Mar 2024 09:16:12 +0800 Subject: [PATCH 0106/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=E5=90=8E=E7=AB=AF=E5=AE=9E?= =?UTF-8?q?=E7=8E=B010%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 44 +++++ .../definition/BpmSimpleModelController.java | 31 ++++ .../vo/simple/BpmSimpleModelNodeVO.java | 37 +++++ .../vo/simple/BpmSimpleModelSaveReqVO.java | 21 +++ .../core/enums/BpmnModelConstants.java | 10 ++ .../flowable/core/util/BpmnModelUtils.java | 156 +++++++++++++++++- .../service/definition/BpmModelService.java | 9 + .../definition/BpmModelServiceImpl.java | 9 +- .../definition/BpmSimpleModelService.java | 18 ++ .../definition/BpmSimpleModelServiceImpl.java | 44 +++++ 10 files changed, 374 insertions(+), 5 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java new file mode 100644 index 0000000000..357804fecb --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import cn.hutool.core.util.ArrayUtil; +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; +import java.util.Objects; + +/** + * 仿钉钉的流程器设计器的模型节点类型 + * + * @author jason + */ +@Getter +@AllArgsConstructor +public enum BpmSimpleModelNodeType implements IntArrayValuable { + + START_NODE(-1, "开始节点"), + START_USER_NODE(0, "发起人结点"), + APPROVE_USER_NODE (1, "审批人节点"), + EXCLUSIVE_GATEWAY_NODE(4, "排他网关"), + END_NODE(-2, "结束节点"); + + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); + + private final Integer type; + private final String name; + + public static boolean isGatewayNode(Integer type) { + // TODO 后续增加并行网关的支持 + return Objects.equals(EXCLUSIVE_GATEWAY_NODE.getType(), type); + } + + public static BpmSimpleModelNodeType valueOf(Integer type) { + return ArrayUtil.firstMatch(nodeType -> nodeType.getType().equals(type), values()); + } + + @Override + public int[] array() { + return ARRAYS; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java new file mode 100644 index 0000000000..f6fb33e167 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmSimpleModelService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - BPM 仿钉钉流程设计器") +@RestController +@RequestMapping("/bpm/simple") +public class BpmSimpleModelController { + @Resource + private BpmSimpleModelService bpmSimpleModelService; + + @PostMapping("/save") + @Operation(summary = "保存仿钉钉流程设计模型") + @PreAuthorize("@ss.hasPermission('bpm:model:update')") + public CommonResult saveSimpleModel(@Valid @RequestBody BpmSimpleModelSaveReqVO reqVO) { + return success(bpmSimpleModelService.saveSimpleModel(reqVO)); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java new file mode 100644 index 0000000000..19152bd2a6 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; + +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Schema(description = "管理后台 - 仿钉钉流程设计模型节点 VO") +@Data +public class BpmSimpleModelNodeVO { + + @Schema(description = "模型节点编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent_1") + @NotEmpty(message = "模型节点编号不能为空") + private String id; + + @Schema(description = "模型节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "模型节点类型不能为空") + @InEnum(BpmSimpleModelNodeType.class) + private Integer type; + + @Schema(description = "模型节点名称", example = "领导审批") + private String name; + + @Schema(description = "孩子节点") + private BpmSimpleModelNodeVO childNode; + + @Schema(description = "网关节点的条件节点") + private List conditionNodes; + + @Schema(description = "节点的属性") + private Map attributes; +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java new file mode 100644 index 0000000000..881adc89f2 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 仿钉钉流程设计模型的新增/修改 Request VO") +@Data +public class BpmSimpleModelSaveReqVO { + + @Schema(description = "流程模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "流程模型编号不能为空") + private String modelId; // 对应 Flowable act_re_model 表 ID_ 字段 + + @Schema(description = "仿钉钉流程设计模型对象", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "仿钉钉流程设计模型对象不能为空") + @Valid + private BpmSimpleModelNodeVO simpleModelBody; +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index 3eb6981ef9..5283baa251 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -23,4 +23,14 @@ public interface BpmnModelConstants { */ String USER_TASK_CANDIDATE_PARAM = "candidateParam"; + /** + * BPMN Start Event 节点 Id, 用于后端生成 Start Event 节点 + */ + String START_EVENT_ID = "StartEvent_1"; + + /** + * BPMN End Event 节点 Id, 用于后端生成 End Event 节点 + */ + String END_EVENT_ID = "EndEvent_1"; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index bcf82d731c..b66ef6a97e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -1,15 +1,25 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.lang.TypeReference; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; import org.flowable.common.engine.impl.util.io.BytesStreamSource; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * 流程模型转操作工具类 @@ -326,4 +336,148 @@ public class BpmnModelUtils { return userTaskList; } + /** + * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) + * @param processId 流程标识 + * @param processName 流程名称 + * @param simpleModelNode 仿钉钉流程设计模型数据结构 + * @return Bpmn Model + */ + public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName,BpmSimpleModelNodeVO simpleModelNode) { + BpmnModel bpmnModel = new BpmnModel(); + Process mainProcess = new Process(); + mainProcess.setId(processId); + mainProcess.setName(processName); + mainProcess.setExecutable(Boolean.TRUE); + bpmnModel.addProcess(mainProcess); + // 目前前端传进来的节点。 没有 start event 节点 和 end event 节点。 + // 在最前面加上 start event node + BpmSimpleModelNodeVO startEventNode = new BpmSimpleModelNodeVO(); + startEventNode.setId(BpmnModelConstants.START_EVENT_ID); + startEventNode.setName("开始"); + startEventNode.setType(BpmSimpleModelNodeType.START_NODE.getType()); + startEventNode.setChildNode(simpleModelNode); + // 添加 FlowNode + addBpmnFlowNode(mainProcess, startEventNode); + // 单独添加 end event 节点 + addBpmnEndEventNode(mainProcess); + // 添加节点之间的连线 Sequence Flow + addBpmnSequenceFlow(mainProcess, startEventNode); + // 自动布局 + new BpmnAutoLayout(bpmnModel).execute(); + + return bpmnModel; + } + + private static void addBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node) { + // 节点为 null 退出 + if (node == null) { + return; + } + BpmSimpleModelNodeVO childNode = node.getChildNode(); + // 如果后续节点为 null. 添加与结束节点的连线 + if (childNode == null) { + addBpmnSequenceFlowElement(mainProcess, node.getId(),BpmnModelConstants.END_EVENT_ID, null); + return; + } + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); + Assert.notNull(nodeType, "模型节点类型不支持"); + switch(nodeType){ + case START_NODE : + case START_USER_NODE : + case APPROVE_USER_NODE : + addBpmnSequenceFlowElement(mainProcess, node.getId(), childNode.getId(), null); + break; + default : { + // TODO 其它节点类型的实现 + } + } + // 递归调用后续节点 + addBpmnSequenceFlow(mainProcess, childNode); + } + + private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String conditionExpression) { + SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); + if (StrUtil.isNotEmpty(conditionExpression)) { + sequenceFlow.setConditionExpression(conditionExpression); + } + mainProcess.addFlowElement(sequenceFlow); + + } + + private static void addBpmnFlowNode(Process mainProcess, BpmSimpleModelNodeVO simpleModelNode) { + // 节点为 null 退出 + if (simpleModelNode == null) { + return; + } + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); + Assert.notNull(nodeType, "模型节点类型不支持"); + switch(nodeType){ + case START_NODE : + addBpmnStartEventNode(mainProcess, simpleModelNode); + break; + case START_USER_NODE : + case APPROVE_USER_NODE : + addBpmnUserTaskEventNode(mainProcess, simpleModelNode); + break; + default : { + // TODO 其它节点类型的实现 + } + } + + // 如果不是网关类型的接口, 并且chileNode为空退出 + if (!BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { + return; + } + + // 如果是网关类型接口. 递归添加条件节点 + if (BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { + for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { + addBpmnFlowNode(mainProcess, node); + } + } + + // chileNode不为空,递归添加子节点 + if (simpleModelNode.getChildNode() != null) { + addBpmnFlowNode(mainProcess, simpleModelNode.getChildNode()); + } + } + + private static void addBpmnEndEventNode(Process mainProcess) { + EndEvent endEvent = new EndEvent(); + endEvent.setId(BpmnModelConstants.END_EVENT_ID); + endEvent.setName("结束"); + mainProcess.addFlowElement(endEvent); + } + + private static void addBpmnUserTaskEventNode(Process mainProcess, BpmSimpleModelNodeVO node) { + UserTask userTask = new UserTask(); + userTask.setId(node.getId()); + userTask.setName(node.getName()); + Integer candidateStrategy = MapUtil.getInt(node.getAttributes(),BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); + List candidateParam = MapUtil.get(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, new TypeReference<>() {}); + // 添加自定义属性 + addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, + candidateStrategy == null ? null : String.valueOf(candidateStrategy)); + addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, + CollUtil.join(candidateParam, ",")); + mainProcess.addFlowElement(userTask); + } + + private static void addExtensionAttribute(FlowElement element, String namespace, String name, String value) { + if (value == null) { + return; + } + ExtensionAttribute extensionAttribute = new ExtensionAttribute(name, value); + extensionAttribute.setNamespace(namespace); + element.addAttribute(extensionAttribute); + } + + private static void addBpmnStartEventNode(Process mainProcess, BpmSimpleModelNodeVO node) { + StartEvent startEvent = new StartEvent(); + startEvent.setId(node.getId()); + startEvent.setName(node.getName()); + mainProcess.addFlowElement(startEvent); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java index e1acce0649..2e0927e7be 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java @@ -46,6 +46,15 @@ public interface BpmModelService { */ byte[] getModelBpmnXML(String id); + + /** + * 保存流程模型的 BPMN XML + * + * @param id 编号 + * @param bpmnXml BPMN XML + */ + void saveModelBpmnXml(String id, String bpmnXml); + /** * 修改流程模型 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index eb392ace2f..b85b5e0664 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -103,7 +103,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 保存流程定义 repositoryService.saveModel(model); // 保存 BPMN XML - saveModelBpmnXml(model, bpmnXml); + saveModelBpmnXml(model.getId(), bpmnXml); return model.getId(); } @@ -121,7 +121,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 更新模型 repositoryService.saveModel(model); // 更新 BPMN XML - saveModelBpmnXml(model, updateReqVO.getBpmnXml()); + saveModelBpmnXml(model.getId(), updateReqVO.getBpmnXml()); } @Override @@ -236,11 +236,12 @@ public class BpmModelServiceImpl implements BpmModelService { } } - private void saveModelBpmnXml(Model model, String bpmnXml) { + @Override + public void saveModelBpmnXml(String id, String bpmnXml) { if (StrUtil.isEmpty(bpmnXml)) { return; } - repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(bpmnXml)); + repositoryService.addModelEditorSource(id, StrUtil.utf8Bytes(bpmnXml)); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java new file mode 100644 index 0000000000..1761ba3ffc --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import jakarta.validation.Valid; + +/** + * 仿钉钉流程设计 Service 接口 + * + * @author jason + */ +public interface BpmSimpleModelService { + + /** + * 保存仿钉钉流程设计模型 + * @param reqVO 请求信息 + */ + Boolean saveSimpleModel(@Valid BpmSimpleModelSaveReqVO reqVO); +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java new file mode 100644 index 0000000000..8273ca1760 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.hutool.core.util.ArrayUtil; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import jakarta.annotation.Resource; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.engine.repository.Model; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; + +/** + * 仿钉钉流程设计 Service 实现类 + * + * @author jason + */ +@Service +@Validated +public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { + @Resource + private BpmModelService bpmModelService; + + @Override + public Boolean saveSimpleModel(BpmSimpleModelSaveReqVO reqVO) { + Model model = bpmModelService.getModel(reqVO.getModelId()); + if (model == null) { + throw exception(MODEL_NOT_EXISTS); + } + byte[] bpmnBytes = bpmModelService.getModelBpmnXML(reqVO.getModelId()); + + if (ArrayUtil.isEmpty(bpmnBytes)) { + // BPMN XML 不存在。新增 + BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + bpmModelService.saveModelBpmnXml(model.getId(),BpmnModelUtils.getBpmnXml(bpmnModel)); + return Boolean.TRUE; + } else { + // TODO BPMN XML 已经存在。如何修改 ?? + return Boolean.FALSE; + } + } +} -- Gitee From 62de6c36bc5fdd51968b0f0f4753fcbdf5bf6712 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 19:42:08 +0800 Subject: [PATCH 0107/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- yudao-module-bpm/yudao-module-bpm-biz/pom.xml | 1 + .../expression/BpmTaskAssignLeaderExpression.java | 7 +++++++ .../expression/BpmTaskAssignStartUserExpression.java | 9 ++++++++- .../flowable/core/listener/BpmTaskEventListener.java | 2 +- .../demo/task/DemoDelegateClassTaskListener.java | 2 -- .../demo/task/DemoSpringExpressionTaskListener.java | 2 ++ .../module/bpm/service/task/BpmTaskServiceImpl.java | 2 +- 8 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 3a66524bc1..1b5fc92c15 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ yudao-module-system yudao-module-infra - + yudao-module-bpm diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml index 1ac423e11c..4ba9929e71 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml +++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml @@ -69,6 +69,7 @@ cn.iocoder.boot yudao-spring-boot-starter-excel + org.flowable diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java index 0200dbace3..7c1950f8ce 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java @@ -34,6 +34,13 @@ public class BpmTaskAssignLeaderExpression { @Resource private BpmProcessInstanceService processInstanceService; + /** + * 计算审批的候选人 + * + * @param execution 流程执行实体 + * @param level 指定级别 + * @return 指定级别的领导 + */ public Set calculateUsers(DelegateExecution execution, int level) { Assert.isTrue(level > 0, "level 必须大于 0"); // 获得发起人 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index 4df9eb1a56..ac243c0f43 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import jakarta.annotation.Resource; +import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Component; @@ -20,7 +21,13 @@ public class BpmTaskAssignStartUserExpression { @Resource private BpmProcessInstanceService processInstanceService; - public Set calculateUsers(org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl execution) { + /** + * 计算审批的候选人 + * + * @param execution 流程执行实体 + * @return 发起人 + */ + public Set calculateUsers(ExecutionEntityImpl execution) { ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); return SetUtils.asSet(startUserId); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java index a8f1788f34..733cc2b41b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Set; /** - * 监听 {@link org.flowable.task.api.Task} 的开始与完成 + * 监听 {@link Task} 的开始与完成 * * @author jason */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java index 136c33efc0..dee2b95870 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java @@ -3,14 +3,12 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.delegate.TaskListener; import org.flowable.task.service.delegate.DelegateTask; -import org.springframework.stereotype.Component; /** * 类型为 class 的 TaskListener 监听器示例 * * @author 芋道源码 */ -@Component @Slf4j public class DemoDelegateClassTaskListener implements TaskListener { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java index df13797107..0917abd573 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; import lombok.extern.slf4j.Slf4j; import org.flowable.task.service.delegate.DelegateTask; +import org.springframework.stereotype.Component; /** * 类型为 expression 的 TaskListener 监听器示例 @@ -9,6 +10,7 @@ import org.flowable.task.service.delegate.DelegateTask; * @author 芋道源码 */ @Slf4j +@Component public class DemoSpringExpressionTaskListener { public void notify(DelegateTask delegateTask) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 176d38a0d3..daf0cb7418 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -728,7 +728,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.2 更新子任务为已取消 String cancelReason = StrUtil.format("任务被取消,原因:由于[{}]操作[减签],", cancelUser.getNickname()); childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatusEnum.CANCEL.getStatus(), cancelReason)); - // 2.2 删除任务和所有子任务 + // 2.3 删除任务和所有子任务 taskService.deleteTasks(convertList(childTaskList, Task::getId)); // 3. 记录日志到父任务中。先记录日志是因为,通过 handleParentTask 方法之后,任务可能被完成了,并且不存在了,会报异常,所以先记录 -- Gitee From aea8fb7fc61fdfcd87c23f24e76af374f8edf370 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 19:49:06 +0800 Subject: [PATCH 0108/1557] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1b5fc92c15..3a66524bc1 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ yudao-module-system yudao-module-infra - yudao-module-bpm + -- Gitee From ec1ce2f358ec47777743fca1dea25765ede7e7c1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 21:05:13 +0800 Subject: [PATCH 0109/1557] =?UTF-8?q?README=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=9B=BE=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=90=86?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .image/common/bpm-feature.png | Bin 0 -> 16260 bytes .image/common/infra-feature.png | Bin 0 -> 16920 bytes .image/common/system-feature.png | Bin 0 -> 13584 bytes README.md | 6 ++++++ 4 files changed, 6 insertions(+) create mode 100644 .image/common/bpm-feature.png create mode 100644 .image/common/infra-feature.png create mode 100644 .image/common/system-feature.png diff --git a/.image/common/bpm-feature.png b/.image/common/bpm-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..23787fb4f090154f2d914100ca91174c1e60cafc GIT binary patch literal 16260 zcmaKTWmp_du}F7A2qsR$0x_XXa4N%@2#w^Y;J8G-JXw(jk+R1Rn^tK{e96fF;);r zR(7_Lv1xEfsH2mkrqKdmxXA8e7Nz?o;y- zv-cT8x6VJW@BO1X;E$!{9dQ7Fl#r6#Tb{qJ$o|w;%BEsvc z#m2%*LiH;@pLIXPMBp?1zmGg#Jo2ECCcKi(0yH9hf6XB6Ceb*UhVq;@DT7a}hO*(y zU$42zY!6pTgL$E2Ohp$HW1(aj(?*mqn*C-Fj>Eipf9)@#*;2p+GsrQLBWcop93L5rW;J%S&-vR(*cBO5K{AOtMx}`ocWj;N<1^v04%%NRbXZtLO|y%ZJY)@ znJ|B>WWICm983pI;(sYBqfEj;*_fS^t*!Npeae!MR{hS~1MNh_AE8ebF6gg3=L)bV z-Ok-I)VeeLrAy^q_wfaLGYO#S2-UnY@|o6~z4#>J6YKb36DM@hf@c<{m9Vm(>6*M~ za&fNC{b774(l$WU^t;XI4#aHT5s^sD@+c=U+JecDUEAjh9%yyI?`Ae}x0?>ipU^TV z=eJ*W-dck$leb@_M)jYDU*AK?{lo_%AIe z#UtqQ^&$>gr8d|5zczxaW5ev?BG$%Og%WaFt0sLJjwnI2lwKf(yaC_lZSwmBX8Ma= zrCaYTwe@!(#lMn3O{$`%GI*042l}oFUQ^xLq-oEBSlm`1C=6%l+k); zeTq)mz&6yNE~-j?judMdYR7ZJkQTr}tpf-N!AC#-%+}f^@3ES-69jucp+L=!_rDgD zSEaG-dmO|1PgM6)emj<1F8%w{K%P8xvU}OoouAQYr2ov1OgtAbyZHzMCo^8NSz|wo z_Gez|kE-3Ng)Kj3x_7$9ER?b;Q?VXCDl%B{9*mZuh5S2u2V4x%0EGlW8LdQyL*tj& zfwG?YVBEQw{|m4g_qQX9*tA0eJqL_?Q!y~Tc7UcwJZcq4RV@JRRF)&+s{!!U+H49` z@3)YPN8l=kQ-c9!N|w2-dVaZ#uNkPZ*ki-Ig?uvaWu?C|R_P-ffSIjA)_WQJpTy0u zCR3#f+HdLFxz1d5@#GK2<#lA>-x^3=Afz>WM1X0Y(%^0VK|sVhC6#lfC2#alFn>n4 zWzE0E_GQhSD;c=fP*BO~z3XVQzjB_B>Dxh=pO|0UBlOYbO`QXsYc3A(j*7aSvO2G@ z5$wbEGdV~E*X+gsF$=;hOWtdeC1zAC1Zxt)IM&3aYm#4wd4mSLvo?NA{>Z6;g8Ih> zD0u2nsIl505Y0;s%FfLyg#Hf}YlfhB_-6^44R?*OPt|Im^rv}f= zBN0%E2uVy5O@U%E^1616ZiTQ(=xesRY6G3I%d0m+7}A$ZN`7i*UjKxy6_$O;c8hc) zf+WEXT(+du;82WJ30?I_JJZ<-F_fR#BHf17d&_8>cGxR+fVMkhGzfKH;s{pSsX;AM zJv${MSpX9^J&PUR5Bm1O38!53b##}=+!q@L0HJvxXaZ!S3ykTl8GG2j4HNZ*( zw#Bl)X1H5G<3e~@MyR(6U3j6V0_Opz*MLY0qP7Xog;XR+p*ca- zWX<8g#k1S1Z;)68#JxzUABnvx<`eVn#5U`jin3%7Ct&0q-waseWu2DWc!$KWf^Uo$mMXfj;7C~h2pXB-=TKp`UBO9!mK&(_QbKr2QuEl z-M*wdj46=RyCieF4zVW7iX;y0H%ZfyFNF7}CeS=1n_48+=ZCJ_ruGmk-=DH>(Y)({ zkGe`shFZSk;+~B-x(|5?M1DbY!?#`dwq-lpn{y5|n`9@pu0yj033y{=AJPAq*qX9c`l2Hf5g%bjJroeoo4364iSHMV|}2yzyS5#-XHF<%0*`cmG``&fx%_y4rbOrF61CW%w7{IEtPS&6>us z&=38CIQ@T@$t}M_8R?VBy_^Y>ks_CWAtJ66_!!55n=J>To@DRQx)e3ZB`_A8nkhJR{wzMi!p=EDPr1?lkI6=L!q+sr11vE?Fjf+gGA86TpYcTz zTR|?B(3o8+=}DXv$w{t}vSAh-UDoneU&vdo!bO%dIsCg4t=zp@N!=-)6te7(7Q>0Z7m}70aar-#SYs$0t{3?AQ^HVGU1MG9~6X#KO>X zu2yL^T%|bHUqYZvrHN(v)ZG}1Zy0(C1Xyb7~y}PyhtD0j7>oOK|5x``l92v*r6dcZ}K2A z=P};|K57Z%COf46NaiOTXmE@>ye%B?dJjV=nP3&Lyu-#_Z3Xo!08^l4BfvE;=P8L&4O8owd>x7c;F z(71ObQU%;xDX!{`>l3^L2Dhf3V6P6$9DaS6b+IavuXO{12aM3{E$w-FR)fDRek5cf zAMma;rSLp6!3u>ZSFZ%v5W1CQ(0xFC_bwnfc=^c`uplC>RN_v3wm2KHr8JnqUBVfxl_+k8l-DbzJfVY?%#NesKG?u z-t;`SfcLicXKwz=>AjM{@{WbUa)wFUnkitSWjr-w;Wu-+$c=3;c)ql~hKQk)XA5+! zR4vyPAUFTFfPS88KEFhABFbH=wQx#?+HZ>6JJv!H|Db`N@#Zyq;QsTWVqQHqA5A^K zQWTN3@+8?uV#@~J;Dq$OpOa){ICIE8{pJ%-b5F!k7Z#wxs$X;So;}4i*V@&eYvcZK`F8d^69cVqEb*RYsbP6*T7&!BHq!tjG{HqImx{ z`IXO9x<$u$D7KnhXyo7~kDKj=C^6NjrmW(7S|0;)L1IK9AX9r-U)zxAZxf9WsR)yn z2hy_YPWKb$k=8ct4Ha5%3m`q#zy~4f9GP{QjquMVIG1n*jYxEQ$_{`SyJxfqDU&hO9plV#{M`?~Gx9G|iM6t_Po zzdi^0ERU~CANSsw({FbFzVIj-EORwiG$)o5niqukEi9V4DNT>jQAfzDCtWrPk`#o? z)C4jdU!QWVqi<^m^v2@BC%rXM9HAj#quVoy`aHhMosSq%sx<-L)GWGGO@Bcq{#-CTOhe zYeC{iT*NDT4kP>3+una>CQt*RTg=YhL{-bflUPl5PK_gc{uxV&xpI$TG2m%V<{`E# z=7`}dz}SbOW+_>4itlCa)&N2X`tmn7Ip^7;$HBX3;+jwiSE6q+u(8THW}u*hN@KP5 zQt3dZUH7V37~mJj$eVs11p+fVFa-x24dR;IkFsW;a0lB}Q#mOmpKk@VE~36QA|K8t z-`i=AOXVu(*33Z4UTmf7v5B6UCaAmJCDR7`KqLxv^*=y+(e3Hb2NLVz4em>T+2I`* zUJC*Xb%T#b1c&w$bGL%QKNv3rfm#1vpf%yIN&(-?=pQGlpmPdTQ`80NeL7>zM9Aq% znl++Ly!)kef%r9dt@EyP%xgs3Xy&aTvkGWt17dr_4$RUz`w^z?nQ9?Xbb1$jHqoFv z)9?onr0cs46_0Pt!bwykZi=iRA*Qjk7xbBEtk941HcFBQE6`bjBvsH~YxlWbsZY*)r8YC3$@_Cgn;g6DO4fkdj z;v`reT{b7;R`aJAwfY6u3+1XtEWjscc~b?n{?_Ex%~RJ5HDq{#a7*N&q$FB~#0*b0 z{K_916+!DKhMQ3TA^E{sCPakvFtYWD1FEVDC5=Dhk!D0hcv(5zP!7r8%YWY_U_{^| zuy52gNUDyYJ5;<1kZ8@$2w&0`vDS{05xOG-npX4)@m_hck}cG){QZ{CKleuuBplMA zPR#MH18}RzZALPL-E7qIoWfn@`j+{M<-7Ez=h0IU4+h2pe56o}@$uA}_1_Q$$W&$E@h3RgjrH4A8J!{&x2 zIn6HB$eX_sW}$1z72S!nYK|g?y&Di8Jl5Sz)NoJ*`I!(X!u)yq0OYdp+Sh)@ ztfKdi|Iy*RZ)12(&AhpVrZ=ZUlwE{pyNc?O6Wle@c1e*aFch{D@3%OL9}*wap`Ly& zbJs>8u2m{ls546`{_-U2(Ny~Rp&xvX#3*v(O}_jHq&tcbbzJz`;gSyIniS0u@?G|t z4isF5-PwOQDQKQn#XNrl3Pw0o90&%HL-r{IZeOjOCh~kH0Si4<>4TOz z(AzElzV6Iem9NRo*sQ$kSsZ0h7u(4nKvL)hI;P(Vb~ZR2?K)VcM$k1Z6c)Qd0&m*L z>*u~dZF({NJm4emSWP%#8*1EZt;dJ+GX4<{2hm!WhGL6M&Oo_qF|i^GDH0N0I1~!{ zh?JQs(x{W=%FiOP|J=wKKBaZ~sOOU5)njZHP)775f&}s;g2|t%svx=lbNW0b%1_sS zsgIvg^o|(!z#i#I2EpW`@Dn8^@Xz}a`oMen*F^6V1#ZuA@y5#JEZu-76Wcs>5OzHK zYDCyw2S*~nLcC!PEAxWcKr^afxGZ|wio!`)__pU*{rUt-8D@m2nWPUh+C6!BGg^bM z$`Jkz^BxU%)}vp^E}w*aMhGnrfM!NH_KuLI9AlL&IB9y@ATWjBx<-WEKnHybi_cmx zOoao8Dz=UEA(nF*gDaUD+D}K>XGYpvYNOR*(P+}JsvA6?WRbI)V#S;JV;IoQW;0^p zOu}l$Bf@WrG(P}e6c22MBPihbDej!j^s`>7-nfdM+nGC zLaaKeUdiFLMk!8R<4Cmz1bWl0m`a;9wHUb6@(08uG+I(jN2zD@K~U*I ztfmioTL&^SD1yKl`gn|r8PZ)dn7v-*S)Y8)Zf}!-J7@DP8qH&HaJ(h$GvGznCwYEO zl|GWe!!q|womj7V$B;`MX_dpAQsjlVQ<|yQfP41QPlBKBZ_m%)wO6OaJ^q@;JQHj| z2I$QI&TetO-8o?_(?+>J9~>$M=oyP8lS9?GQte~4) zg;QF??}?{F3KsWJx zf^T-8djdOD4s91D(*KO5<|1fhJ0qFX#zsK1@5u~LK)R$SAO|5$bAyo0Q;}@x_Q!Lq z9=pxc;5Od{&F2vtq7T%uf@y0EQ91mS-B@pZ7zrw+MDZeV5L~)HfC0t9&o$4$Y-O{ zZ>_8>Rlkyl_;X@kqV1yFVR{{kw!6@9d5)O1M{d6e8dwd)|L1$W=#dz^qpX4LiuBFP@8)hBF>kC067{>KB$dz_Ny`u+vDJF)eX(WRHs(@%3BqtHFyAIs;Y*t${Rr z#rL+h;m$oMEBD&@iQyulfHK3<7>8e%+fV^)sFzUI=M6AtCP9NET;(e@8~P&d-)MAw zN2b0;4$HS@HI%F0XZ8Pl6>pF1BO`v!#Ty|;;&?46ep%O7=jolI;{V}qCM?_pRIt0j z@IHU0j_ut-Qh7&7^hya!#XPxOEZMSSRU}=IO?|s72r;$=YbH+m;71*A zQ!@I+KbxJu1=7nDmg0Fiv*V?t%Z_^Zi1_ES5V{$z}Cu z3erI(60%^|bl|5&vaf4cmr$o!_X6n7>a!~W(?_6w(VgK7%oMt9ViXfV_e54-wp`m> z%^psV($XFJSl>35HXh?Tok-ub&k*&sU)lxO+T?=(tQ{Z<$xFZsK7A`+seT z)iPlmx(;ZtGqsW8dSnv#ly^vmOp7ge+YI~>F%@rId8m|N&nBs>VI9-JdRL?!2OavQ zt5v)2HknBi_25Ns<-Y6AqJfZL|NX@>ys~=fiV_m4$!=r_{--{Tbtr}?iUCTJ@!l?Rpi9TKZtc=x*@jT)r0k2vW91pPt_eM}!C6 ztyVsy%2_IRk~Y zw_Et$u0YXF$4wK@YWftvf1fC4#Y)Z57(jyw{mFb+sn$zr#0=!h>1=tS<_SkT{!D%(}MB{Uw>xeWot#tIo1 zq~OtYJ-<4)Lct&nM6!%GTm`|rFvZ@;(viINc9@xUE*Z(o|0GG+xZqRBqC1xV*n8%J zJx!fVRgx(GM!=9FE6%7t=+G0V7T(Ve#M8P!WUwdrTg05mf{5%QlYg`@d)~z!Y%6=L z2y7-JgYBB{|A6-x;W#|66+ZZbn7t708p-~kz7zeI3=7)XFwLYkDXhM=P%w+9&kvdp z|4waY#Hga?br$l5&Nz{=TDn$ue-NpEO;Hlt7A-D^CsI!AeKEmV_TAVIku&kW9Pn{t z&;<-Z!y9}r1#jktG%&NbfPMOgD4>X--E@Xx8XuFAZ;e@ zYB6w=i4pSa6WK>2%mrmTN*}2lnu?PO2o=N2mJAC`Bs>f!n*o^@=YwZ3SB={H z;1*w^H<*%|0GL=ggugH3vS5UoUZX_QKR<%@XDl8AoZ9)}>eJs~(nG8(N#2u94>0i9 zksBNt4!^lrRoaxb^+uc{?~Us$>d+ZO$|9$}pE2*!MNeMKOPMf8@f*M|< zGgbWoLX{839po+TPAM+@DbfQgiO9MW%Fp*OurBB{5DB@w%H9P(40dL%RkeL5_@PR= zZqs~t-X|aBDckG^votuIt$l$;qx6RS;~rovVWENXW+2WTcs&(}C6B|%=`wrN%`6r6C()h>p2_%&?C;>p%6Gg2Q zm}+6gMbfFurx*x7FM=p1tIZWHoIr zAjpvgC5^vAyEy@|LF%pA?=J-lL;&t?6y?C1H~jh!LpuSNO|q?>o#CD(1P z!Uo>zNm^-6!Sr=fbNj51BJLD#9h1;D6j>Nx^Nk?#kJT8fYcmZ$zxshb-_H)mtNbWpVmi|t$|2v`K8A7jY#6NZM? zCa#JX1m7ZGIC~kbVn(pUUs)zNXW_D3JXr}(rE~Ekhz)rzywq5`dvE{A5WJJk!!|9{ z0yP|NuP%d*>3svA!NKjtjYsV!ex?uZ?fGZZaOPz}T?>$)ug0>w9T)zZBFEAou2^bB z#=#hc2X2Z*lqyStCK|v0b6xSL@o8Ikx@woFvaD>uod@dRLZduV=uC3;&>|WXetrAS z)B{vSxxn1UY=Fvh^R@?x%*qCe6pn4NC#ND~B>zmyKfxt_DgwFIH+#2$BJU^{8eDnW z29}@rJK#^41G&9mY)|^{WAdoeZON2*r}v&O`qKRdTp3=}&suuR7L85|_PMeP!i%x$ zmZa#{41B~TOx8q`(~#?U^VEKl^(J&3>x#)~D&ta}JRJ0EpL~?};YZV!X*}MbCjliN zohQ;ssx1tQ&#jtL5LUk2^|#*_LUD$El|F_C{ZdauNbG?392~C5rBTwwx`!PJl>xQj zy=qp2viYUy>D8iRmNb1`<15KudI&^x?(g64E(44COggzsok#DzK_34-!O@oYZ_xVZ zFS+o$zyuYZOZ`tT_vdwt%W0i ze&ITM3jRZ?a#dRl?!Tm7%u)W8@050h`&0_Fr|+SjaYxx^_E;ks~itYrbS8ypwY8YBgY~W zy01Vx z06zD5%y-+ZdRX7>%HlmRaHdBLu42K|x`~FwUb93c?_($a5Jk5Lb`e}#x=O7=hONGJ!oJnk3w&X>=W%a!g234>$+1(twVML#od{-P}2{_2rX7E$F}@2v+Y zB{w;2S;C)kw(TURqY(_CYY5U{=##|mBg2ugSeF-e3t5v_1T*B=YI9*S#K?lsxf!|- z>Ym95;fl%vgBrnmcjJhO!SKocggl>)tt{v+uTR^^8?wDLt~)d*iL(;~50YC`zTcN5 zB#BPJ+gm2l9|QXdq${T_ALxE^ZxlQPOLM~4T=*!7%@@u{1D}4}IMjI77Br^i47bDv7wQ*3!2)M%vvkqcKf4OPQV(H63WQyPmJz#_-C%v`6Z z)NfRfSoxW4++h<48oss=4t}6&|342w-$`DImA5G9Ebi~;){<~CwF9v~J78kE=`Njb z1g7GKrYI=QdC1&I;pO}NeXtbq&>y~AkO3onp1z{W?MCoTD!9VU;6FAkuHfQ1@uS3D z``Sdew1wxb6Nq2Kt8L@WxXpuJ_CT|DGgBAbb~oA-X%z@@ z&`KUWyg(jOhJk``U6r&*daAP6H_mTq*pn_Gb?Z;6493slF<7Ow78w z81$M>t#Y?HkI(v)%-cOtYciIm04;Bj2>TBqAel^!qS7v_0f@FRx!A2l0#1`puS59O zGOn|6OY1KGf+N8ET0^KPDB^PpK~U@%WMIv_aE)Gza4p6kea#43@^A7s-5&m-g)4Qv z7sDNNH(ID4{kFO%ml!^JB5Ui2^H2#EwTy%*Mu?6Vrn5wjK{}G8d0)v>c1b;(n&p+f zRseZ4H$LJZSTt9A&9Vkk5V(x)pbo*NcUYo=DeuBubz)y%68zqV+Kg*z*ntG33x4a+ zjk+-cBF47fJxemY(;qtaM|GEtVyR2&gskhmI(xpRRJKto>XL$h_5LQ;0RhU;b`83L)ehAa(sCh@#f=Wq8ODlncDpBFRQvX zl3&<{%^bV~)Kw?7qYgwwNk|}M=$&A+l9RFjAv)#U+Hqxv=gr*T8X<(AoiKcagP&ht zh{o6R?r!Qql`p6&NF?y$c6#e>l1?QF`9s1<*TtS3ZqaGWy<7$HHAPmx8xzy5>z$B4 z$NXbuWvS8|Bng}WJ)gB43L?0qGrj*%gysn&p;0r6ksNflv){eyUX-nMA<)<+TV(7% zkOjs6=*R|XKe0#E=PxbB9&eXbUC{j5Cwy4Tw=3oNS#uCqX&hyEdMaaT)cHLdJ0?OU zm)2yiJ#RE% z+1=rg>thGLp!pVvtVd!<8f7=IRApz+xQs}wKwc=Ms303YXO0;yJ|OgCTcS4=5sQ}Z z3e71#@e&4$S$tDzimu0rSj!WmBzUpjIud#u;o(Ml8e$d<0t>r`+Y5qKLHV_m_Ml8p z?$U4-4)z>NV(}!Te}YOon}G;Co*3_4ayU5IC@Y!=(1LIw`Uui_k+ojlLwPBEYT4jj zS*7zGtWenWRl-$RTEv($6TEHreNR-)au~Avp2L2HlE9zy2n5~T;ksq~gNRUUZU2QL z#6FjagZeu;dGjNphpn-byoBKnEu+K;hnie;4#>Llt_G+pGv#x#%6ifun_FnsC+ORi zp64#V!K<>g)Dy>5Q6%a%8($~&v zRvwW&D^SZg>9tyD-nxTg%CmT#uiZ(^hoDG;xE|#4@D)0SNw#+;?(>qqd|#JrsQXQk zXm%B39%P&{)Rzj1wb`T`Lc=jDf}MEZU&S>v#Uqi(Be*Fa=PNjgk595t)H8$9GXllUE;R$Z@&;r>@H3-3_ZZLhU0WW^RNE)I9ddLfiU7?s0YNS@a!%k zR>csD&Q3OQ16_)MC=DJj8KiW=XEHlK=O5SN2zCsa;e8J4&UE$9yAL;oJne8~&*8H5 zoC+nH5V?3or^%(E{?V=Za@;2ceJ!Udvu)~wNL|h~7z}e(>Bk%g;>GqWlrUzfl&pa% zSmaVvfD~{!E5HS=){7@#aT>!{M?nKyyjzzJe7b;~gI~lT){b?5y8aNMX(-iiH0@;q z7MpjQV`s=!nh%;V6)TWGxOBi4PFfrIZ;MLGWPO!E!}wkDRDhyL2?f2@c>QC3F&pE( zOy(&=HN$)7>XYRCI!#|c2?7E*&9wnzz4$BHDv|-i9B^YlNMduqJ-U{ z<`lNG9eWp{S;-QnaaVoJ&0=g%=7^|D8txfAsBHJ|%6chGz*zfSHrNwJbBX=Qm>8k> zDuM&&i?iyf3W%Xe6lD&`avALNP6eq>u7-dMp0O6hw>=ZkuilDpV&}$Mc`K%?tn^HW zfWg=S!}9W406V!(lvjVuwqT@=zYy+L6aDIHFB?#bw=qWr1_) z2CA{)FM0E+UODo;XX#JAZjaMBMAHvKBRqCCGd|RM(_!^Qs4yfG_ZtyAZP1VnIPa>8 z5hzgbIy3y28_)Q6V_^^4OHt=)l&EHE1;!OEJ_d!O_K(LmEy+bg+S-v%E4G}5b}U2@ z*!?2zgG{+bN)V8F1gPK8)~i^0X##xnSksNZQ9*4 zJOoAUmxwS`%t?zx2U5&fTX=rF%ybVWA`zgg(Ij^y)qa0w%!%>N20gggt!u-N!TX5V zlqHC{TK1)2X+e-Y=$j%Y0~du2Ibx@0(ISV9AcwDdr0|muAVqx;>)0~Ff1)MS0ARFh zBs(ceahBSq3=#k&F#|GPF1jZ#2kw8{1n)g{NJl3UI+tWvO#xews3NpbWp39@juHz7cN`vS(h(AtNmI_1djKuTN55(d9VX;}pgs)C&pS~)CkdIHS^Q4(!#*av z*Fpzp(7FP!B#_L-ys@_jRQf`HbsDq*Ue$I9viWNM_ZJBG`e3k^Y>?4c$F=i|`#)XA zXivJau>&Zjrw%=~8E$U=b0`Og*K+6QC+}Z{0*1!D+L8}0Wu%b9Vc-6oJCIQIpauH< zZ=K5yvtjr#yr?=9)4ZToV4*ZMWmg0Bae2dm~-%gnz3;ex`3W z^m=4@sl16O_-U|XFi1g7$MMW{#+dsHbE4;0lXa(Wa0=FNCF7bKyN z0Gmx}Bor~>)ZgQT?pA{3W)7-*d|mLg6WVM~yEg0GZki3BiMPgmMF0NFrJV0_VwjKk6Rji5PE#hsH?&@WRT83B}7pVy1l8IqBt!;o?KzLtW) z%OSM>klJWHh*A&1VZB#0RE)}4F0@pGl^36=bGq-FZB^SHJA46bwXh9-25tj|Jmd1! z)GNyw?HQ9n97G;h5;LK?jdHY>?>tW1(Q?6mH9)>U`;&0RJq^2e)TV>sa6ZE?*yaK|>5~`8Ak$f=IN}>{v%S zPQJcp{(xxxz{>;o=Y$#lnck_T;N^f5C~e990VN~(mA7u*!_{Z#E2V2fbHK#x->Pan z5dn`&oBv)LVGcuNOZ*Bax2learBy_vW;g#2$uUo=0ph%oD)1C7JN)kH zzDCcR+J!b($50E@#vj;yiuElY zPJ^Xz^o?t=hGysZ@S28FN1q)i|1!S-9IL@;>fw%94z10O_cv>d$L3O{Ku<4dGLN$j z>&JtuN5;6>4PwnwTs#BPh0x*Dp7-D zH1LpAWNV7LXLQg^Z0l4t!0!&D@br8h0v|&CV>qKb=p_CMagrJ|zumxaa&chuj5c53 zvu>RHJ4Hc1)VD}`;cjxOt)HMaPZ6$PTTX8fMyEUr#g$dGrmhr44R7h$jj!IVIt@eUgMGQ-mF)N721J9#>P*KXHjAFCEt=(m`#JyMeyA9GXh5bqb& zCM*zhPD>KRHLujT0whw9a$6go+D@tgDpWD{*lvT6eXW{tta&eoXb8IBIbJgI=daTfpz;>ogNr-jaI0s?utU_3w9%;ldxh4gq*+PM?4Q6kS`jE5 zM)g8CMKT4pk-iteP719PR zLQCd{0uANQWY1-z-&)C&Qd%;i5*^&nn~;H5`$o!Jq_>m4{Zc50OA@{1>fmRnHzN$G z)GPp6o|fXsQ`^J5Fef-HQmUGFvwOtsgWDP(33NAvD-@T7#;F4ke7&@IMR_8T&t^(x`3+ zix%+xAU*fRfImo};W1uC-R+0@r|r#kd`bB!$g%RHBz!`ZK6nvZBy%ajysj^I)~YVOc9r}2vhntOVU!-% z$8GR1x=Z&_gIZ0HQjjB~Z=DCO{p*-sdl~ym`sPd7I0q_^>lK~Aikl3|Z;+NGtOb>vN_w4GI-?HIUluE`q=^>QosnoWWy+%9S) z;wLroov0nH&}Sb51OrIo`_M~&8``I0>LTX~c2XXjx5 zVXUjv-)~qdm_sls@sIws_z_Ht%dveD!gE9zR+w|~Fz1-R*EJ)wAJv|yts|4StB6DSHs-gbZMQgiv*UYsKo~Y@=>qK5optd1H zBf!X0#)}n@#85ib^ST8rpxN^a*K@4U&YS0LK2og7ilCTxGq0+(US3ZR9Z>c38Qyl( zW`VaIDd(#In>}eas6sVj-rM$llau?XgY}8yw%y>O4Z}Msg&;fTt%)MYqfm=4b&$MY zZ;PcwpQ`dp9w%f5jVrYj%<)-|$}F_~Q;;E*`2O3h-mSc+e7Mig)|kp2^}ehW!6Ye8)oYJM^b8dcfO9Q}Levaz6pAqkNT@6yIw8gO%hz K$W_Xkef=LKHG>cU literal 0 HcmV?d00001 diff --git a/.image/common/infra-feature.png b/.image/common/infra-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..f5cef50c56ff3a4acccbfbb4f5f3e453dda5e12b GIT binary patch literal 16920 zcmeIaRa9I-*Dcz(y9Esdm&QGW5G=TB;~JoG3j`+wcXziyH{N(~cWnsn?h-7(&3FEX z|Gr!~4`-Zl$GG*hSNU42cGaAa6I57KC@U+g4KfRl2oDL1j*Lw(wFcjf z7T$J7KW+>^%+&ln+k9GVdp`Od6&3aRaC_4d*wWVVXCTAU#?i^my8>EsRqgn9bLP7K z>%&UV^W2A*jja9Ko0l2K$=cV~{pRyNalh7w;?4TkhRAF9%~BapSNiLdgHPCEPVL-N z=FsD7Z&8`ct4#jgb?5%;FRtfpRZFujz(M zeXnf?{WUg3t8MAidoMHRi=MM_ec?hoqxG}*1oZ%bgpR!QCoQj~lkQIh|NI2tF3SvS zda+_q>vF*Q=dJ(CAndN}&o__ox8Y=t2M54|jaK5kh1Pl zfQ9I#^xNq#;$#{0Qr+nRn>0`>@Xw znlq+Wq z08}a%`xH2|M_n31pZ)oMzg=>a!{EXk#m9<@$I1dB!rPdFJRt%4P=&eAani zMzC-FK1j8G$tu&9EmFkhK+=ko&0i%)$m`CLI(P+E$JE$s<=ynx1rxpIdtoX?Y4dec z+j$w6AXa1?(VAe!;A3BRgA&*Gsr&yi#vOA23>QFE$<(y!y@=fw5aL;=DTA{SbX@j#>s(ul+&(svoX@XifsqG^_Pi#VvX6O;! zOn}>U%Ee9OJnz$Jh4+_h8qLbX;fJ0!WEBEV?_MLb!JqcVOF#yRb{MsUar1RuTpy@Z z2DiN*t8cfx#9-%URq=5Mkn)gqNe;>h$ zEl%MN%v)9n5?(wDG7xsRb$XG89>PXlU0-eb7RmJ)2>4FxU=w2%NcDyU)u@zX=LNy-i)?`GWq-( z>W*7oVTI@qCtBQeXqFeUcwJ}2U$?Ifz0wV5`l8BCW%K7R1TS2jC;%d5Cr9ZLe zug0Fe8s+8_t>Y_6JTw)*+aa7t_kV4@HoMsVCRa*brRzGW9ImQUS+Ftdq7N(yJ*K&~ zE!f5*Dtz}z+NjG>tjn0VLVJ||opG7{s^g)v?StFA2IpZOB$YbO%ow_e_AW8hg85p% z1*Cza0kbQiXOa$lE^iiox7U5)`ODa88wtO1XbpP9L@@v9&HpgwF)eK$&}3B<9y z8&ZD#_Olk2>05<)*VSEjJz>pB#YZVvJ4p<|;E+sQWxp)GdZmCs`;LLecH(Uv$gdTB z?EqmhDiVu7=lq2|Uq9PCdYCmMy+BYQzJabDF6u8kx8xGhqYQNP4zTd|@lgWK7^fFjJh>pZunrv!q=5d zS@8UmX4?XAl+mlqr{b-CL)ccEw_T-=4pHav2f?+s zCzV#`-|8azxlx+;^$`I=^iJ5cw12F!^ue=?FiXLcQcK2Rhi{s8X!n~mc35%BTe?(F zZch%E?ndKEPMWm~#s*oOl^As-{(x7ZM1#f1pC&FFljD;kJH)m6j+);bG&4CNBm#}? zNPTIM!$76}xoY8)eI}3o>T%aBa`qumUMFJ;@*es=&j?FA8hxE@MDT786Yd|VB5@m( zXH!32G8PQ%$;idTOm1oCI8tiWAdb9Hk|lk5mCeQWl@+XBOvJcPeB*xoj{jib%VnfW zQ)d_VWd=`7Ow@4xz<`k>cQq8|87s&sc^ONY*Iy~JDjsu*0+A8oEFEtkofnJ%gN@X| zM#G1VwscPB6o)XFpmPUQQfLZvvjj@ZY`m^-4uTg_rVrq>uZWMsU=y25AYIc|2hfl% ze+;Epi(e)foYM<~Rdu;P>C&zHUtaA-IcV9-QJk-czHH)>+6TiN*E@agUNmxF0^pCQ z+iPo1!eKEr@anM7VV&j?I1TWZu+>$+vESi`o=?B)P5!8=)nCGw{GVdBPCw?vMH_)A zoPNFPT)m);JzT+;I_`3|)@0iItLk9l9j&b1u&;jt?2#ZI_cuPnv%OKqEla!l$Gu6E ziOg-UUct~#d;8X$_6N}A-nmzl-_iVj9elW3$j#XNhZdSx&S82{2BwExAWI*n_b3}o zcIN(KS>#-oczT%D<=vbxT{giUcD*P(I0(TL*(OHscyNDxyd}zmiFD8Yr<4&&PdLCD z1%2jtUtPdLyzz$fp z^DBcC-^>exA2g$l7L7?l_FXPAxX|Bp%`iX?Og?~5R}C*lgcm@v2|ORmZIG-b@NcP0ftK_dD&vj+^;{huxhytItAc=ov6^wJqd>&%%@e>IYd(jk$vL`Hn$ z)mB(l0*&tdv&e_nvxn#XyEAR0t!tUwo1mV!9X-UNkay90a0Ll(4@qU*{2kvFGRtg3 z5wKso_x0tr?p8qq>}xIz+Z^`|TcqGdpJ|J~9dPff4Zjjyx-eh{ogrUY|M=qR{H>T5 z8;yd&=kg3$XViJ-ToMHSJzEp*TyO07f_?=&B@kGN$c^~8NS%w4eB9u;H-<8f<^us< z3Dk&VNI_>auD~0U4m-ln4$3WuEKV)6X2XG<{e<|<1^kPs>hW@MU2N>0s(jYa8P)Ho@Q#EL`P~rxj_8h$J zdY6ZbiAb@xbL0`;qvPW zU;o?M{#E{BSDTVjjt@7dm+2_U9UB2r8ynG|dJR~N(nof+U%2})X?a{>cMZREa4&G_ zby1yh=jVLpl^6`?$Hqh@_pkyA&FxUuao}Qt1sM`;To2)i0`MHN+e-wym3)iX0T-%o z^<7Aj;(*_$PA!4MWlI{+60+ORU?j%lxE?LMxPnE}!H?OqbbqKn5hEA)Hfj%k_;?)b z-xXLTh?5bE3Sk68^3E3qCu^k-Bur7Ya>lU#j5RWM;8&KSs53z4Be$aiiM1v!I`8&K=6?)>qFf4F?0yBg$cRSn+AA$c`Q#_=Y3~*_wSO_8cvvNXQ z=>o>kT=iOXE>1l7ZTQx|S8^Ed5Nn|Cr4$TG=#UV;?idQX$2gXQFd{!U`Bo(x=x zyKxqoFrxH!4?AGatl3KD*Kp1VckG+Xn;ED_jUCjf(M5q-PV`6KfK0VAc7D=S zwP0`Zng)vMNp~ZsUdr#JH$CuHm^Czv9nQ-!s$elXLuY1u;sY_BD+Gj7@L+&Alr=w+ zA+2Zn!Zuh9X0 z4cD=PA_xA2^#3)rV?x#r8ybP?<86x(-{XShC2kC*q^P$xGhs9wkd&jUnpD;TQ`4fL zk5S%>#~L;*4LW+(F8XZXUF7Xt^N<1P?dCZsO2OJf#4ZIkf-tp7Pzgc#P@Dfly!!|A z_RJ70BSRtUkFSodkjvbc9fKfvx%d<2UW0I+2O5=oCSCIF;#>u-L-db}jkP$haRJNK z#sgx}^rXqDBwsYgiz?w;wiHi8jcS556al^+up6-~P!PR1=`#X@iv5qx8u3dV>XcM8 z!*ks+QL-lZS1|mM0E=Hdkvx;lsx@QNR?lc5lTk(;c}~SGH|2wkryv%gD+~f_vWBjI zw1TRX6|sYF|GF>XxY$A2fF5CQLbGo;_^qHt*U%EtzL0$x9z__7%3m9asX8$lFC7X% zX=pAM%g1Co-%4imqCF_=2?IR76)7D_XJU%<9k+)D8Jb>x1b3Z##9gJ|q_hQ{M>#d5pxa8~s?gi3)9&T>%gkt_FrB_+m|XrR zQ)ZOX1i|)iJfUUOh5O#Mb@2QgWdSyHdLA1FCvs~CV4SP@ zoB#^A6fXMh;^tx@rzPSZ&y@s}i>A7K*HI(-130PuRU9}vh+3kOKDts3?t|ue^z+y_jsef4iLON!a4_qqJ zhB=B&@KJ5>FQX>XI&@Qt@PAWM2$F*f4X$kluXix(2SwapIdqt`u_M2KnS%o0(#t_#yye(Qqyrqp)gTPf9h z-Eoi?%nnLDc6j6wCOmVD>jHtGm;v+8@G+(XU3iGSRDKPY{mj8r)rG>sr&zV2KWenn zAVZxK2Cg>30CwkBcNWOJeN_Eju>2zwBRi^Ai#Z-pQc*xm<|p>Npu#FX)gPuA7$0fcJDCZ zmh~zBXK7mt?q#D5!8sQM7Go9tsb_nF9DX#A0*hx9B>rXieFO7sVTlN=-?=dJ&3D2d z+A4KZ#|J@?{id=?C+GkzA_0GpQ09k1tgf;pd)mt*Z|6YtD&ML$-(&xr^mBmFHGGmy zGlj1H%hn?TcV*^fRSM%{l)rO@dKjDmjr5L@vA$sh)##8mRU`@VH=4_Vt#+b7SQ`2Q zT$jw?T4BrHHzA*|#n&-2O2Z|Urxk2yoOzXcvg-nk#bVCW?gpHy4JuP6ylfC%DhldI z^@#c2Xy)Ce_xdUBHJgDyu^pdO-=s5gi4HJad~;s~^)}RzvJ&c|j(&@X{DFEiqCe^d zYZvn0CxXu~m0v7C`r9p2f2Uakm5B|$_?HaMroa}HuX&L9qXf{imGqtJfpJ1y_f>}iO}u0GpR1|v1DQUI@lXvJda<9{#402bBz%J}sL-1yWq-3Y0x&L44#U7nsZW@fTEEONLb z_%oR{hb+q>jME_f#P<{c&{aNnF>IjyolOs@*{88#$rwM59Kb6d>^u(2g*rWK@LH|e zkGQLPhL-Glt)(niqnxyZ65tPT4ennbuv@|Z#x(NvwX|)JYGxy;XKpSll+-DPugs`e zeA-*I5O8CeLw&^|vzpvjNVKj50K5fn7bY=sAT!NcQ+O@n&C$Y*u{-6b>CL^gxcA{_VA6#-{ z_53_To+Fqhj$ppWhWF%rpG~yrJxg-@Omw{VIhh*?+UXa!((80=&KYn0& z@cNH4C6=Bb9Y+jE;fVF;IUcKCF`pK<5n4mAZ9~topc(M*-@opRFXE}(MUN&zrP6lP zgdemNtl-5+sxP_9z%2vRz!?w4Zzxa{3#T=jGgE3Ho!SkbmY2UFVz|BB2&)R6n-VQk zd~uOA1m)CbjpiSDD|6?~&v8~n8pB}yKz-Gfvxp72?pDidlBdMf?PLIdTFz+-tFBeD zE$TUykj$y$03rrCa#@tpO)t5DaFm2jI^P>b1cWk*QsDncz(6qLz0tBNp_ZYxi)clJ!>YfbXQhgontcG2?sMdTRupI(* zO>9n2Pn)?B2s!~bZo`Z|okEn;9T#6^YF_U+Ph;+%K$Z3i6bp;!VCdDy26)*bHu(8J zq?>JF_H+rf0B>!CzdgxObnNBEmL>@&ucdToJ$zPOdh-mx*_!&qzB_%pgNPTGiBNYH zM^%}U@5sMXOc6AB>K{7~8mw=kxHM!P&DU)=$lJe&$92%I=(H%qH{k4=d7&C05P4uozs>5ftVv{cY zh^5?x^OnEo2Zke$+p2loURrx|Q};)qSt%ta@yr94(gjhPk-#DtXP{e=ljKaB{6%yJ z6994wha0;#ZYF5(`AN*%713{5;}GLNZ4fAUMg2Z*WZdT!TSC%=?y^mOdDIR>ta?XV za8LSGy=kBRJoqR4sR1fi3a5pd6|4)(Qw0>*7bLdiyf1K7WK8 z_5J-xeIrOiL8?895bJs;>7#cb%`fngN=S_`Ab2>ITz4_g*#L3yj_|X}0MfJd1 zmaJ)6DEh>li7ah7@vShz8M8ZIQPlD&rK~4UQq-u!FkUv`j;J+by8rYK4t-ntaQ|-O z4w_2f6UOS;!ItOK|I6;ZDDJ2LnyD_G&F%q}N*3?&hy#*OF4Zsq-pw8^nVAHeG+5lU@qN!0)ihX>wgo`z1951f3x0$C8S@^hPUcyx zx9XZSz}NwIJ);>k0O5stL_g);P_rSoI+kMu)=iI4LQ7@EGhyBHT5793+2!H$_s zn5NZ$5Pear%NBdr{9~-j-e3~Sph4Dj)GiFVZaEG-K0!4j1kuk47Q~X69C|$TDVU)~ z$k++V$N*bOKp_G59Lt1`H;ScO<0F3kLCt_?lv_?;OKT7M9~Qn!RGes*M*4L$VfwV5 zu2MkP=eL!h*ndQQL_3}UW{h=`kbmy}D(n7`WY1qmJgNSf zyLLl14!v4}C5$d-ly;6$N74Go8d#}YThvTDay+1v2BW5U#Fm%W}X#+|>i@^(vCd#`EYlO+OCqD{eeKxZTibAcUMAqYJkc_=< z0RAvkT(L;C#&i`P$=&oN5y6O9Mk9-^Ybn)$eMp4>01Z^IFzKST&4~2f$z=#s;-1CM zEi)0DROG8Ss;Eytf4%s6-PAgMAcP-n9n<6S+OH|q)l0n*t3@e zjCKeDe&2k{!8jg2h_P`VEbD>Bp;r&vYG|l+#E3t2@$W_=lVZbO`auhCgMfy(S8vo?pxp0o_|2KV~bA4fk=c&HEPzhddsfh z{-5i!gQ?;qjWFv(*@V~u(TZFHti?t^D*({KSX{wmr2T@)+{axZfDo_ip?xDmRoKTj zj~1{5vNLpqY9frLNs_Og26~N+7!LXs35ZW#Asf~U(ZJ?nr3LjXT+|MtHfgf#N7o%|3~N;6QRw@$tG0 zMtXHm^)wsfbL%Ua+$AWDOE>S#4oPc)y?a*|JGmfSILlw|7K@VS0rg;wcC-H+s@nT< z!yF|Fa8GXZdx3*?8Rcidi3~e;P(}tcC*;5*Ph8F8D)A1OoRXc1Tb5HknUAFO_jQaB zQMAGi+rlO|8}8Ff;FqPpPq)(`C)MeE-rxiURGsK@y1Joj;r}QX-=~^*mi(qY;fl%9 z+(40p5n91ETEW(Ar|%w7R#&%T+O2>w@9A}syz$6n<>aam-hHL0cZlK;xwvgI4{`{3 zAbBXA@u9Z|>o0%cKCq26SOy7Z`8K3ZKzNZ$TdPX=r7pUcfiV%*F5LGgxX8T)9Fa@O zfNO?7@3SS}u=bJznqVzFuXid4aNk{+4%Nb*p!EehoxUOd)%-aarty;l)&0W>VSA&_ z)Q!T=W^N=ON8om=)K^3aFg2Vi^zj}}=y5i0Lmz9hzMx?nvtD%S@V%VA&j$)NV)^jd9fIkmVS|j1gHwamMR~DZI~I4t0XW(EW~Vu~RSAkpOUSGqc4}=#7i&tL z2s+(00@wD9NCqOk<3)NsIF*&FL=S2`Ar3X(zuo3yA-7%Eak0eX^lgi2Om#9z{tm74 zH2DgZK~(rH!Kw~8z`sl|%0eQAG+pGL_yZO|VzIKg655&Q z|JEWWAi>*>`3+6k00-#mv&=>g>tip*w4ONKgcq6Y!m8s!)^b8z`L!XDhVUH7AL&Gq z)#}0qD0=xz*`y-}|B#=g$u^TW2IZKsfrlnYj>8^Y(g?#|wm?FXsNl5KOnR*Zv2%>i zOl%Ee5U4_TBlr-stPCo7ZfV!^@Jq<(TM<#7Hcm;8tl7SK)e#JR|G8XqRZ&yGKY>IexVrY%9GbO|e z{xe(Cst5Nks0*OcIuQ=c1KBf?)lnRAoZgT1hy1qNJY!f7e>+II9^3F}^Bj@#v+WAO{|)YU<(C`9^4ud@wfB zN9)lIY%B79SJO{=@idc)UEkk~9PQ|^V5N71x&~`z4hf93hoDx6>s&Dplcz&HHS?Gx zPouUKm@$NZu`?LeSoXpi`dL3gCoE%6(^rPK?l>%SR%uqoYU`=JVkZanfXK_Qi#J-f zP8N@yIO9de{;rN4-kn5&JE0S9%qzy?)hK`yx~?0MLscb2IDGQ3#Ly9o5$nZFELzlm z2(8fXB!q6~U0i-eN76MwWCut{1!DXMwwU^!?e2If30rRlbuGHJo1@{z_jdON-x5C3 zbzS2;0PEtuD7mN|=^_qn&UWV1axic7O>iih{`Bh#O71a7MqTGlgl~f+4*-~{vSxa2Uq_;AX3Uyp2xh62=)veKhzL4W*3Or zGX}ulv_};ryOMGm3gdqL*iEF%``qJ5y-kZQ@d>{~%iugf*MOY}YuF&;L-!~iwl8eI zDQ@}s(;3?O86WP2SS%K%>bGdek>fwPlbx?0+TX7AnLMesZ6N%ID-dzZRe?7CBHc^Q zvM`y(8^XFC(Eh_3l)7kJ?1HZGHn5b7(gQ!a&Li%>{SWcrLHNE?fim$ikc&UY91(R` z8!J2De^3x)?8Hh^;a5P%6n`Yf8wOpV^UMF|8{qOhD-m*G$KJj-5hXK;1sXK&V%^7b zN1@jSQiuC>ypkR9$d}qu7N}EFl+EV716z~wO}2mY_KlWI{TR5*Y-l~esM94B{Wky% zoVr4*`5Q7i*4&4AADZy$1VsV808;auGsx5Q5Z1Y`UZF6F(YIY!M4WuvgzOuXvM-%5 zQkw@PJ^vmnYeRDs-`=6uCO9H605GcBJQl483G5^g+3O#|0Rrm zn7)$b(-d&Z{=n5kj9)oewY+hC#6dMQ>Jz}|M3vV6WC|$kBk*Ewn6y82rsvQDcM%BD zN}hRXNglocRKL*TrK2D|H*&V%K@`sJgW;GOY6J<0tW&!&JCk;|=MC^i>5j=Nazn&8 zeU2d5Xwhn%y-gS$vXmu-+X0cKr#YYA?2<8vW^|j2*CMhW>&+8ZoIdwnnWwvtb!a|2 zL@ETcmpfhOPp0`H=N6OBA?|r(g}CkN&6LSw;srOO0Y_QYv2FPm;A6h$Ow@7RYRB`n zUI|9J5z$WnzBX*{>$j$^r^_%TIpwNoBBO|}+w&&RT2yb{&rSCi?JC;@1hD%GkH<>C!{iK5f)*FdBSlj{PkO1kGq*ZR4eJ_~e@y zlgROGm2oHi+qGgZTln|tEB2d&54{YvJ8WVLt`~oi%NW^Cb9bc5)T-h2gJ{<}GG=r#)Fz=NV(~t>!tW$F3qXgl;M1%1{m0 zB%nN+0>b$=@r_26f?1pDJpefSq)d(#IPnqHw$Sz!ZJ{jKm>|^rZG%E@dL!m96$6rk_N@>mCZ=wq^wV8Z(VvVq1#e<~t<5pV}(CCN9V&Pf=qtjh>&@o1N%wFP_ zF|v-jQmOElvhp|5YdhcNA>xH<%dVLwl8A#5y0P0V+rqZst(5RzU=d$-eUT;y6fOJZ{ki2A}1^H z?P!IYc2`A-5f723wemUWxZn%aD^UAu8$p{y%hd!=&v*Wz)h4*c00w_}JI3-Sxtvgw zMNqkXRWBX!8)FdG(EFcFI_JNmMyc`af!@DeFZ=Gt#(pt{fs76fvwbiqqjW20fmcy+161Nh0#dfw! zW{T{1U;e_7{_*(tNsE3A$K+=uZhz--Xe(g*p?+C^^kcBkWzEsC^{nu}EWb5qCK(P^Lp`vK4cO0=jNb4CpfswkrZh_4nbUcG&ti_A3O?9=$iAaupgNkJF0HIc=$TMWom@Fs`!RubrI@r1S;&Jqn$4!r zW+^fmFK{8>h!bRce$U#->T+58NV`S7v!gk<1_sYNWADRTt3DYb*Ylcri&J#X3WleU z5Szk#Ik57lKgV4W0#xYnsZAC@vsJ%OJ>_FKpxmrqnj>~@A=<>pWr5Z9P`ZIU2E*XL zEniJ^a|HYR=t>f#7RZlrAOyU*DUeMWRPb_-rtat~Udz4N2Gd8ji{0?~#U5}RAApInW^^f9>NWNkKYQwNWQJ-nj!=%CXtqwY` zB2Sg|kt(kpNec3GY5-;}UuuEjVsaDknd#-mq0+j?L!e*;YvJ)o0L4}Mbvj@{lK}TN z4W=`PJ74Rt{5bdRiLAeQ{kSk@W&uudb?aIGoA_y5)_Jg(_lODCaqy3#PL82}HZ1l@ zIgcU2wp-3LkB^TnhlIe!*#al?pYm*~vcl;MhfZJhRGQ!lSxPST`Z3)jkzS&Pf9%j9 zpi7B6dbF0HLirzp`Sy!Ru~YLz=tQDn4)Y}|mtAm7Hpi<=j-Q+|lXUm)$6W77+IY{k>}tRuxbEFk0W?$^@601((Kecw|pKK6U-y$0As^ zZOUa8tf~plOPQ}bHp19J{W=YZWh;kilX6QRt+36@PN^|16-VIJdL|7#*TD%tz4Zc< zWYjYkjVmuW`Z7m>FCRnXI&?gYm={|Av~0VKFGX+bF*wTyn0WN5MU4YO1m2XfM0V7Z z?LQM0x)5&hX&oV`hC5z|=wr|sIw8WF;F49P@%jsAN!nkl_(Hg6#@!6uTQ>gro^&am zEDI5P4q+3+UErOn^~_FM;CmW4C_!aX6C+J4Z5CCLyjCFbVhb_U!av6;BiB*P;OTh6 zSOYR^#f&f*L*klR{qcOHodJIJ8E!GPG&ocLQR{l>~I5wxL4R}HtvSp`x2JgWKGv~rmb zZ#5jN2XLk-zI84dYmmH=q3aH}cSDp_B`NvPeD>Z)KB0iMal7FzNUyt0oNge^x`M&T z2{*E{QAdQt8|$+p#bpspq3Cr9bR|lz>8iQ=Z|*7!3CZtg!?N9}FLb}E<*#!IIYK$9 zBGiu_n@elZsUTu8)G5H)$qD2@=@hn9#j*w7ZCP0Lg2AVpWI@`@m&^K!LPiX+s-HFy znRM$pw&sp#;&D740^wWDU+YWxg2ycrFX5ox?sWH`P(}sQ@~UY1kg}R}0HMgOeyrYC zPQ2YqBFpsCD+cb|s%TJFT?Z`Of6#|#UjMx>vD1!Z^ zHMaQq3E952Le!ZEvMGLeA^B$f%9lIvSz=1k_W^-OKfUCZj8C=zlg`4lU&081)iP$2Qr>~K!Km;nmGR#@LjJ#>@eHOyT*bnf9Tx!hoCQn zT>qW71^`gaHeL+Ae&6DwQ*jO-;>YBYkXs{6UrsYc@THq&X$R1GE1Ei*1fyL1P%64W z4A}t&wfJF>c9HSM^kCs9HX-l*VblYd{Qm|2Cyn#4*i=v5AH$8^o2L~u%9&=!W?+2D zxr~PHVwy+pGV#2wW{8s`At{I=s<=NrR_%y0`>2g{zNj?$_8KSGv2&M_rt4!sZ@^yc zYY%d>S0tubzi>y{dO)l9z4QtCWg5Zb-=zJxZ?X7oSPxDeYcGF8eY+-I?8>@G2CE60 zU0+1X4nhJx!$Oc$OhqOHNVqN%Q!4qyZ~9}B3J9)zX1KcYt|4!}i!y9)qRf=`hP;UCo<9u8)%6_^<&n5#lo)z)( znE~mmqp)6HR&jJ~)*!TJa;F<#DNpgd4-NzeGyq$4f2JxxI6aE<#l3X+ev`iR`KXCD z$=A#ve1u{?2k49T`$(FAHED z#w*3B<;$9m#a^GRw|fv0@zjVd`CC&sqFq+V(<)7sI^%i86z>PKrTii9y{6@DTn2cZ zt=1hSKdiSK*19UG&WUigBjuu=)v65pHI-9lC0}Q+k7&QN%8o~Ci@;A12->VLtC`^u zkw%~?NB>CYnQ-??@bkNFo&B58zVDh(1L>|$Eq~iVv-Xw_45cc{Kj&oP3H{e28E76X zImvz_swtgDe!sERm8cmFi)uEr+cWLE8w7HEb)I6lrVkuN4EAIVZ62y7Gc*MAXBHydgSp z#EnjMAd}1Oo}IQ*efhc1c95ourhNHl)-%Y+dEzGtwTNN9Ss4%PIK9D%Q!6HanR>nbiu|W4zq$XPAZrT32ED%1TG%_dItCk+_VvZ6WlNfn{IAV~JDfevwPlkz3GP zK)A#gViYpJLE`0 z@F1uv3dV9bX~cXlUSPy3ig#XmokpWFOv_(KfdH8oweVBDtW0$ zQ<&}l4k47f9k4fv*im;yEliLcwzhY^6yh-xzXWO@E6 z*=X3+@frU2=#)C1A~a{@UqrNvZOu}ZZ*I8N>$lV81R4+0i8g7D+gVJFYrj>!!6u)v z+-oS{g6cE^(zS&(d>}Q-H!6#9(f!N?vCT(H*5hbhnhG$x-Zd?tT51{(m(du)M!zQF zD3azPx3gf%<2!&bS!DIKuhrnS*t)$%SD0OQjME&s)XwIUHwfs&aG(p2S=bp!*Pw9A zH-LdO@feKF$nSK3*}uQQP%#(F3DA~VG>adF))o?X_q0HCXUW3{sF*E;$mB>0ru!fN zUG&m^hx~(NM3?5@8FHj=3ZEmHra}8QZ@9B-Ty`W?sPLIx^lQ||4-nHpU?X26m>RFo zmQQbi?Yc$;Jq=0Z8|4-`>u541zM}BEm-dFq~^@&17xo(z#gYmd7b+DCAOx|Lc&_x{+LH4~sQDuup|4=v8sYLcCd$4ZJiu>eS^{(VA2X=gbp zFhe$_cZ*>;%7Wh50Jw_KZnh~8h!{9Qdd7h4EQ(d8UShjYAU5qe$#uEP!VzP7)T-G3 z;M7Rh_`W6l6cxVGaUDc+iFjV2Gq08SeJ;%Dz6yTr)F97K5`tWWmET>8bs`p~t-~OV z%+Apn*iZRe7-%owHOzE*a<600DOqJHG>p@rPZFtLdG{>Mc! zUe{Bl)kuVGu`(V@499&roPjM!b;1z#6LpG5X&FzFG5cUMKf@Moq?KOIB9}7fAU|BI zWTFFgFMIXRU;S)pQKs_o}&$Pnz_~{5c--j`K53c2*g3OET3p*`emW zjJtpkH3CE!Pfm{U{e!kFp5ON7gvjCd4Ylnm&>fyS+8kXyuPG-|av)3Diy0SoeZKTo zq~g_#UCVpi_#caSQ7SI?YZ~0N4j$k;?8xunfO8eyIn6)~+RDapwH&nL(*+QEw0`)U zN-3iJ&yeEJ#`3{gQZipi`(3iRl`>Q~Ww4mP3ERLC7?j%tm2H*cwIC7ST?S3+>GcI! zhn9A!^0mo`f%xtu?5Abla5h;DJ$UPO5X_=~ex<4=kZkV&Q6n8xxy=J=s3h{Aj|rvJ zn`7GAnmtr)vhY4lrG3Ij_s!U6PrCn%-BlZnUS(56j+XuJ_S5}|%&1EVI&IL24U1r! z8X)O?Im+9mT?%YHD1=<=mL4^-(iHHA`Yit4Xq{9zUIN1SX$p#970^sF9 z>;&baIT=&e{|@h=lSSyfniPLIspx%XjVSWu#^ig6Q|BVqc#8EqdQ?KkcL>bh|5WU* zaMfd=pF!zSYCj}yi8ed+H(htszz+@L#>V4UDI_N5fCmtyaTrKin}Isf<9hW`#5D>PJu{}It2Uzf;9|2yHop6*c| W#wNR7sLindBg@OENLNXk2LB%-C!B`> literal 0 HcmV?d00001 diff --git a/.image/common/system-feature.png b/.image/common/system-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..366087ce0c9061c34e60feaa30af099f99694cdd GIT binary patch literal 13584 zcmc(`Ra9I}6fW3UAOsRDK%jA#;O_43?gW>{-2#Ci4GAuR;O^GAcjE+iZCulMf=&K4 z^Dwh!-TN@>&dhl@Rj2CPXMd-5?UG&VeAQ5s$HpYV1ONcoiV8AX000Uc06^l$K>1g4 z>u7QL@4;0=MMw7j&;85Gi$;Ik)%6v8Z+Coh^6=S2>|}XmWovuu0`dFo{0z{p zw6?MS_wk{&t_})=<>cl<+S}(B7D~%X1A_wf_4T`Z`w|lq%PXosWHDG-!~{cf4$ptBF|wg>*OBcwNv|d=32OB;Z%k z@4q+mzqhki+FnkNA{Vk|AuojvFE7y2zji+NCyzn{wnEvr+m-`G+f6UuHJ=*WGuF!+ z=O2I9ZL7lEUn&E0M*dn)gq@@<9Iw5+tSw&mAHK|WA6!01cKw+>c>c43FsZnEhK=v} zjX&j-^ku!Y#=bnprp7Z6!2kemQ$-m`9lw>+#eD1m2?EsV+OuI=+UNolP1@vZ^Y~0* zj+MIrVvhez^?$z-jUH0j4(_-$-~!r*FQkWc%=qfJ645`joPJ8J#%+SbF&%Em%aZg+ zN@a{3a_}6A5ph2PmqGZi1~|rF&S=c#7B~D*-i)>EevTACO_^6nW!61@+LW-)wp6fK zDGx9p5Rcokj2YQ~AI+higF0EkWA;D3ZycyrJHip6%n3vc;l43ho88?eV!>U(xi4b} zrpoXk#jU0B9#gZfpj^ZY(|;K0W1r=K`X$gP)v<0|mCKdXO^nLN-?jGVbyUUjHbv|S zM0U|Mk0-Wp0S{?i;YE0HqaP<|O{ldw;o)MdD( z+p+JLCKS@d+1miaiar>h0U5J?M>hp*1Dah-bR;dR(xJxqj7`Oeou)eekharc(oK>A z6ckG2*$gQR)-}z5>P2edf?wV!Z~PX^fMS!=QqT-uJ+j#_+GM>|iB!Bj0ka&U+xyb7 zaCWzZ%CbT=Sri1M4!}dIamARl`?aqhPubcHQN!X8lv8%{cl4ZnzaFH|p? zCqU(rW_@Sp2oNn|L>l!vO&rqYQ-`U_$|U1xo0R(`94xP&ND==K2iI0n|M0c{XHf^s zX!C;F)xkW{yXzv9nRPz=Lg)HJzD8lWK1v6c(Za8+CbBc*$CwHuWyv!`Ow6_fG}$C> z#Cd`=8#<$EGJheU9yXJn-x=kZ3H9O789$KG(x03e`kOSrTQnBS#w?QT>w0KSzMxz= zOt$gII!6IL`e^yU4?C5glW-qT(GBgt5vJO7J1smg>aQ7N={NET>a+_`x{m=(__Fco zfv!XTWIVZXB~#gho^auvdWabR^S-6eChoWEqrVwn=c?ng)u-;(=qqq}ZFVlCH}DZR z*CCsJ5Ndw5owzICKlQ}h=Q942)dHNSWpoaIJ=%U}+}HA*4_O6dnX1d^ryu{Y{#gVM zRA`Te8p}0;=^Fs%KAPV~Iw0gc8x1BQ>7?qa#>e^0iNmSTxGSM{a&sE}yGi}lM857G za`Q~)^?+;#WFU4quUyq^HdM6QF9+-vf*!mCF&2Z##3b-*{v^+_g11|?|L^81<-N?f zuP~Q((epBm4spq;zHLlAQp+mK05HT2d&&)N3K7awOkPKmxM{L$^Rn_z&aXG|Y^cj< zw;kx^5c!O+zV{=yW#2DM$kw0eJ5_Z|OLnPMp~R0J?({YplD)lx2F?%jv1((#C!d@b zL`YPTj@|fytd<=9>!PQwjoIwS_`o5*oSl$hr= zaE_khuW%1z=!b+Cp6Woj5M0Q~f_mSV15fWnVfBXpn(Hm(eD+*roy--IP`Wo*K^~l- z54EyIk0tpm!%=bd*Q@2$YoCQsbW z6LS)AxH*(l#H<9-H|!W(ZWD;_&5IzH15MAt9ujt=XKiCWS-ejbfi9(01dcC)w|FL$jlael8Iz+ zMu4H9GVEOn&)!Qf!9kR@%lcaPzV&^=;+bZ#mQu6J=AR%`zAI<*iJf&G`A1y27Rcv>^%hu z(K;~U!CoX1D$6eq7bAI>51O8sh9p9z?M=KqdCm(FIRD>4T5G?9-Qn4XU6p6DSP9}f z?5it!wJhowK{`%1?fSXzeMP!kFJ|4Gy3FVWCa}f=9OG?cIY(KWV?t($$8-wkg!4`} zJ@>@5w^R`%Y5t#N%^1>nWZa&d<~njuqq{s$K-m}rzdJ9P)C%IyK(u4NnsQcxf;BE9 zX;DFavTTlHYag3Tf2I&(e*E}x@A@JWG3Y&$CZ&ttP?y+Z?KVHKYbyQ_%nfR&O*jd~ z!7tKAoq*8tVO>(=ta%jK+_QLFi<$kZhT*;K!#0(UraU zQwZpXjmj@JV||uXVsf3ptW+?ex-MPdBF zUP96RC~>(b+KGhvQUO0`-8gCc9G=Ni_w6r0<S3y-D|?=)f>-fW|8HvB!9qT znt(rhM{)fa6ppkCFg>LNaH2DExX=Tvhz|3pSkJ5lYX~U(z8u{90~g=NzQ^J543n*o zn4)AP4m11;h9oFW7Pc#BMdw7o`Ne_vX%>`aN$yc`sya5t{N`^+m|C(WH5g%^Ssex3 z8oc+SZWX|xPm{gAs3>w1{vWpJt_^mN^9x58+Hm=*e?AoQ)mFZBi;vT17E@5;z_}v7 zlZC13f45nelwUeb;#m*?n`6aND5$lP8?cuDA+bP1rB5b4{JCt&NY4-##4V+wg^;}L z%7~xI86u;*3lBT+-x#JkAhCxkC}=_&n^dUsgFrH{)SaHnkSD?qKy&RKA251b&b!KA zlEScN4>b%Z?4TNy2itj!E`gxCae-7cv zn(Dp5e7!vj7kpNE|2tZyEyQjLL~{;&cj+qReCBKL173w8QXxY#450^>PR~`NNPYs4@XuTC*tVf@Byy8dI#?&}-t$+4!F_xm zbAB?6{8mD)k#s+V*mkT%l5=w7-F|43hq;@yJ>j2M@(M2d0x`D*nuR?U$UdEuAn$uG z3jugxRq%e75fl%2vFm!q)YE*LU7DLT`+=EKOzKE4Cf*mz{sA(d`m-{Bdg#uXwU+Bk ze4wLhHxd48i-)oA(cR*KeIRIZg?*c;4!wPiU}jir=Ahsgc#p5+3-X#~)FT~iT`D?q z&ne0)M@DhcGR=jkpL+6#Ztu(|Y4vnH66u~G#fU9Q{n74$J}|ZcdCIOJ^6l29;y6-SW&v2-Mjr*>A7v#>=lzV z*7esM66{CKML7jV_l_c{O(^I}N|nw^DW$0>hT)E6y1JypM=pHXw0NHfc-JjiLfa9s zfDHF`chhvxK4!}iC$NVORh&TyyZq0ee0WG&JMx=f!Ct@Kqe-!mvGduEQW`X$Fq>ZW z(=yc8J}Y26ADS3G{jL;+al)O5J}HLNrh?hEMK0!VzM~ktA8Pm#*0j2$Ji10lJc4kN z`t7txMU{s!AugM^A;T8+6N3=RH@v#T9fJKmb>LYpm82QBg!?rT+RZHE*yZ4l@2x$4 z7o$(tu%sjgsjG+3eF*(m6G1$S$ypv#JFA$WI@UXTwygx>wN{_UFF21#;k)5;KvC>k zT)*ChFKM6gbh1%k`fbykL!Q)u1h7z?h!^*Ks{m%67jj|ZgI6BddPsgV2u7>{0V3&9 zUV&VTueK?)hFD)G71PfyiNRwl!5bIdU8jD`qei4K2a+>*ni;YRX=9UdELc|4SfJ9b zbnAYiMw4O^9cI`x@qrqpsJ=re*J7z0_mI-EiHep>&cmeTFpoU_Y8Lr+49q2Q6l;|-TQ&V z4d9F?=#*)An6O+qw(?}*c84u$LkDE{-BiXI1f>jtI0VRfj1|w3o?EQHCCr`=6FxoY z=Y0OY((9UCodPBb>=NRFaq!{t40yZj#c4`u3CNejl{|{?^Wm;D)vzbzUX?{B`HN{j zR-_$wJ*x?TM$agg(x*?jM+{q#GI-Z6|GU5&#;Vg#`vexeMerDYSE#@nD{;4{4!yfu>jdx^h5ae2Rnu9N zEBimRf31x%VLatN&G6g~Nr}q`ZX!sPF3k{qAcF^Q6aIKcUMyetHDw(OWs6USAZJ6P zacBj+Yw7OGEci^4%nlI_&p#2uZDFfhlGt&kGIRsCkoTbUH4-ht$4`I^*x?q`DjFF8 z17!ZiNO(v&it=Rk_bbNL8s(Es-$%<(IuDyFMU6Z0hU*LIOV<3g@liS7mcOzVfwtH*~?}N^(OU@=;5}lHC{Bvfotf~F9b7F0j&dyh4v>y!jb$`FasE_2s?u) zG6Axpj@j#J1ZrAV$Rl##CNAAKhiW8j$lC(n*(wzq3L7)%W<7Y#Q?A;Gjxzo{$E$hb zV2|J5k-_vUzM->VYU&``7kaBe6Df$+fT@f9iwiZXcT0#iYJMJs_s1LX>rc>RLmP0>`mFMW)?`yu z^Z8yK*h<|bW}qywxGjDH;d($CMq``XUk!)XU)YWN7Q-tUmG6M9ZLbx{u)w4rC5{9h zj>X?B`l_dx1BJRT`I|3bNL&81M=8x#b;a;-hnh&Z>L3Q~xofPUI~Hu@UY;po;H@J7HLC7*X0>aTqCbGOxj>LN!1ymhay zJ;DXk_bPA)YV;Y(IkVuqU%Vb0NiUvPZjJ-RK6IEpjbj&g7=PlEynx*E$jRHB0vAu; zGr1fJ2Crt!Q9m9{{l|GgqU&THo8L1$!24I_qHO(pa5Ta2ewZm6Rel=?6{Z`@=#S%~V2FChf}siMAZrbj(`cOG(cF4%;01bJU=_u3bO zkK9<3-;5xx;_MhAc;Xg4ZLz?K#PudXFB>kPCKJczVC5^lZ zbUjCvXitd!V*sv{`j4!gANT`r&3ix%1&pw6L#^4!=#(qRxL#PU5T7xo*o zeN-++vFWhmVSWgP7I4^Lk{oH#;9;c>g!pek-YwxS)I6s2eq^aI*_r*<|J%KX@^`AH zE%}pUVE9J1P0H1mX^Q9hp1@I%V#ccbXIhlHnD6-Rz=Ik0D6Js(Afw+Y$W_kcsw;m| zxs}pIP`4#61PBX)PU2JfBq~fuhd?GT`(*!+VQMNXWU9#CMaN}FsIfnP=~t6M4XXr; z`ST)+E&4Mo-hU|7G)KkYHAQkw06{FqiS+^_g`l!wVT-adn__V17LtqpSdYXLBP`=jlBwcQd;>WG7li+4IDEv-pO zxiXczG)5B^UNCYUbNxK6dLJk$yEaG>a}uxP7gZ+OA&_4Lxi2NmCW)31bq@Wy!YWCH z6AY((B0I@5gON7;K8w`cN4*rGQgj}}XGdVg?+7S_!u}?r#|{X7rbf*7O!jlEg=W50 zj$WOjEI$JQDa=wl;M}K{fWfy*P+U2|FZsy7J^+M&#WDdJKxy$76xx=TSmDEz79fk)~i;4CJ^SVld0t1qL}@=Ld$T6|Efc zb|wKBWBi_g`_szVYO8oR827^nXbZ9aaCfm89FI#p1oFO%+d`6rIShIs21NVNHj*mu z!rKBUGD2T=M0a_Bn+Ksd|F&=99z{dmjjsJ2zD&h=#yJX^h6abG{ zaGr$Cx!He^hDnsCcUH!ed#pG zk4@8(3ZjZxd3}+M^5BNo8k!AnYSb;VxYxh!cDXP$pMSS4I{au`-iH6{FR=DTL$~3j zO)TP{xH`%9x%smnm7&&OQ^(DxhQ}WzH?5`bwJf=|3jIe=pW78?lt~gpXbnGoZ%JsK zHFsJFlHl4YWOCTF;O?3qTd3rfe$_(%9jPrwg^nt{3w0?=;nglRS8AlmEuMuF^@pUm zVI4e=W#zEyuQn2F)Y^)}w(Lm%PXwOa<k+4m!_kkQ z*Zpt4ncYA2%(P7V|5zq7@F}l(c$Q!pz=~IYnWEJ@2>r0@7D&G#aN-+(iVY8dWjvcE z?c!IRqJ-8{AYn1NVl;;(_`-Mc{Ij|1)$5j8P`8k_RtFfM#QAX(vC_)Fe}CKl0_r7# zC<}!AJ{_h;-k%^2d-v9DFmVN&JXa*E9=)HHh!}!Cl8W(@K81NUjY!bw z7Pdj3l4O9XZt7KaJA|_PBF?9qrY@%G2AeG^rGBJXq*QCP&_QLBv6p+fV9Nj%Td!_3 zQz4#d6+oO&PK|7#?ZMh#a1!tk<|(!Vw93D8j`r-TNTHzysvXNKHANhip`2Mlc7&&j<;jtx6z+I{5V2s#yL5d#)(ki!!wguuE<#sm z1Gx!VqkXHipPAd>11vsO5{{S+2+{~5q!1#7d*PxG?OdrsOii4fx02nF)QfBmAE2GQj6)j-u z8aAnhkcV-_x683I(TZkZ8F~5V<}DoiZDmG29}7g$iDIFB@1tHS?+*aMzFIrxz4I20 zmspo9wfwSN2(LAVwb_5b6t1_N3h9ap(^R@$L8@S12eYsiTHaA-65UsSxn`v(`2fjl*K5#GD? zYIEbyi4OZQ^!u;QqiDVve7CqHv7YySq)Y{mHB`*Cg7If*R6a(m3)Y)0gDR=@m#-9V zk#*CF@s1}xUFG?#ZMIDz!wKbCr}kC z+x~_1XVq)Xq5E{+*!2i2&iS2F`i+NPWc-lq;#CCE2mRji(dxK2ETr`jyh0&IS8FJP zvZh9uG9;3%;bM>FaJndCD`&XC-CO-WPig;g{m%4O|?3YSw2*YgI}d zBOj;*AAGyH1gE>;Lml)kWLW3vCCmPH-)(u%90Rl_RCxdS=b(3|zQ50f9~;BvTe7LP z(%E=^Mq&*U*=3$FI#PqGMX@kB^A4v~^NCfjPFE&XC8cr@)ns9+tpN|dt5M>30dbfy z<+L`1DxLuD*7IUtd&xiR*TM!qgDmfk^-&ln{E29U;Q1ZvV$AVRH%0*o(Hd@*p244R zDQJ6XnJfCWMaf5$4AV{|au%8R)rW@HT`^9s07h?7vn2FlO z6@A_-_Vc^6|E{X2Xf{D0#YxqK*Eu|;?`f!Z^eUDab&qaGUJ1MSIye9GGU@p|1C8yb zB9kzYVM6V7Otv0hW03C&WNJz9Q~VOx*IX#~tUe<3_PD*xJIAyof3!h`Fk_Ce$15L$ z4u^pFUA$tgpw7$(?K6N*>bTFN2r-Ye&UCYxh2F@sXRYh+H)r*;gh??%&d2QwsOBP~ zTs!(U#IMLEe8bNC@KM8Gyld4w8K_fHJj6HEDO6`}%E%})0Gw2_am2NVE1Ms}%PC9^ z$C!CHI)gbZlOOmSXNShK+HsPz8a`Fby!SAoQ>YI;o%f8by+`7Ap=WLJT7yqqZWv0Z zgN04+5B)AI&{(|J&iaett5s5@NI!|bbe7&>$rMk5I00V=4V20|_s4O#8@z&&SupEF z#Qa}1jSVXq-kH}_Ha;7}3R5Ns9&?lqvB($iN4U)s6AQb&tbi9}?9B@|i{PuW1q`jw zrPjJ!(JZrMPyqFz8=1Z{l>48%adN)bfcLl20s>alo;a`$UdK_ws0pP^q68+U}b;+hex1;B&tq)YrvN{PwILtISENIHlA?Nt5D=3w2Gw zmUJAfU*+;N)i#ZNzOwf2uig-`EDqCXoXSDiTT))6W`|7F2xYSYZiG?xRP2rE^c{5Y z(?b`WKF=FROodRkdhpBE_R+WL>)n*VqI`bG~qxMWt7XI@S5V=@0ZS#&${R z!!r1Q`)boCXz^BfWDMz>2emgbesiZUA5s}jrX_9~S9o<4y+I$Qn+7dFA;Hh448hQJ zS-->?ip#}%m@qYqn$`nj9e%yg5(1-;Le`3Y-HZG%F7~}wY<{UF5#owz(U4fL2NPV& zR!xXLBex7&#^v6b^NzU4C13Wzk^m%H3c3SW2m7%thYXxWVEKN2$M#x8OOORZZx7|@ zr`E;!v)uVBK;)_b#?}G=`Bm6iDK?>GMD|2v=y~ho){EOi9*SGejj-J97f_eA%F7sK z=qfh?YS?3K<3_wF486VsURwEy{gpJ^r?7qMmVEAWZ7T#|plUi}iZkv!B|16L5bn6% ze#^1&qve>L>~MK?%GIlKF>Y*~_Vu)kfQgrFP7@dYg8g}C?2K`13M1~3_t zSbEt($t4bWetMVV(AVdByxnswK~|ACQ~msAYxkq_!!P$?&Wn)1KXYs75GHE?I+)@r z819c=c@4r><9Q`SiAm@eQQDJKSq+qX>r~C;-ufyQQ%z%JTVabs@ZdhdB=5_+yMg50 zJKWk^Q3*6L-ct+zHmx%zu8tNIJP@zUR94+uMhp9PBt7bQgtaX_Ys{@mkv?m5Dp69u z!}^oNsDJL>2kF}Kqla$GDaWAFVkYD2W)XlQ0a`_T0S0by3ijOB`dipKUAIX<6nd>| zr-ss)1O@5aq8&#-Z?r!Zh*#e4_X>0f^Ik*AyElg(`6lwe50C>U!gK}!!@G64uEO!W zf1w|=MEa7=hy5(d<)d*VT(Qn$|5hT-CBB!0$!15sL%4k*YoNsjX>JRtT+j%$Ip450 z^K}@*=Poaab+Ic7))!RoWFMNK162EMgmqv~v_Vc%c*d5MoXMa1?GIk21g0BtS_9M{ z5r%ttP5^6+1WsN+Ln&`J*hoTN0)f<2VTiRYG;Dkips^B+21(hjcgaG*4T^S3qdt_X!e4?zPNKa_`rZJTX5j0Ei7&S8h z9ZEZi!j6FJRDI=ylM|Uojg4ejyE)dBlL<0qJ77VY9|w^Aku~#&h(NKux>V31YdT2( zuG^V)Uara|LmW8?b%junrFeXnBvE>xs}?HCDidSj>(N0f_$iXmZX>YLERmDE3xa@% z^5sO!kpr&v2c+TRJ>V%&^8DUj4qxxL{6!^_VvLZ%yM#A_d=;auedwPVn6m@AWz_-h zdnOwV2yHAU@7Scbk-A}S01wPdJ$=dimh|v`TvCIYZ##a<4`G$}gBSpz-9#Frwx(2w zGIow?PZHI_Q;T)H?NbKbMrm5$lrs?BmL1t8#Ho{e>AZe8g@A?kvs-v)*sHh6l{0g= zw7v2YtFXKd@I_>mNA;?n7*7aC6k9d;?!Ab%s;YF~khMy!s|ayrJm*4!@ykh=0{gu& zDL+nSKi{MW|9~F%^K+NbG}#GrwZ?8tVkPTXj3CFaZ&qhXzRp43O0MONn25S=Ua&GY z0m)D7su>)>w?Mx4?jnir&BA1tMjzWb4A;2kJ7k#@lg6t18LCNytgEg zkV&$Iea;(+hngBDBG&#wBK~tlIihT-6nQ6}^L7b=m?1#Y0$24A=xW6~hhN*4^g>*DwJ@ z3_O7gw*NHij9{YRbLH{DyrAhHJt*O9aA&70q4ot4Yem z9927NM(hqUih9>+T?qIi`TXG<@F8xy6_FE7#L)XCg5ReCz{bsTo%A3Stptg-9#tbU z$q8LBQ2%b(Nc7qm-vsj>=ED1&NaeL|GiTj@;*)cI_-Qd#mqp)K;t)lF2!?mnIOYfW@Sz5`h!b+T=vGbZE)jJ)Z8U%mkr$%n=ug@SC-4-! zoH~((T-ZHhqp-pqLpLio$vz3dj>QTFxTP-1s5((68x0_m5R9C5)Gbo>G)I=11HKwe z4&BA(ZWGc{Xvi$kk}Tys3ds!{XFqE3z$>swoB0wsObZ=A66n~=$csoODU}@)cMbIZ z-0|}x83kll=d>!*hLgM#0!s1T!Z<(A_NJGeMSmBX7&vNIbR+2%mQAr-X{}#iW2#AT zY(M}M-+6#`kgeyuaUa2H!suYd7ZW8*gEGjtt@!b!oL3B_eXMkI?2&MRM?rW)ltr*L z?l5fro9V8fRNbM3%|Oa3`CWjSA70H;34sh~23&s;t@??KAKAf=ZFF(4G-+(X>Sn*2 zH7Q=D76^^xGnmr|Njkbz%v}zTTSrNwK>k>&r=zZ<*>^Ih>@||S8}33B^!`}10b~&` zpsS*t3_|(~_4(DL_Ne$ce>I;$$Cx$zuW=nWk6!(J-GM2wSg7QFHPh9eRLI1hN-*8Q zGs&K=+?XIsr+;`AlsIxC43gvHBOUesTatjH7=iveT$);hx(+!Arfh+m7{qTivUSSb zTjZpOm$~3A3U1c8P4m3J84lx}2t5|zpS(t|{7ds1U5Ru-qQl$Ep_7=nj>NVg{IE!Q z@a$PJ;d9fG01w<=#T73Iq1Ncpvx)XaSy%rc!~(eKX9)i)isNWp3EhBlmi#D?(6GU< zJ<~yvNE)uF*~ijn&&wLU5;-=X1Z)(8!gRTuoK(0773`qQs>olYu56`^6e7e=D1x;( zrnZWlC;=Ea$@gHuh9Hf2z~zk&UYG`;5;CR`%MIW{>O9dBASVv{-b=0SltT?M@=bgr z0?b7|^zc<}c)J;}`~tfG6djz0bR(#v8{Y!IOn?WJI`%?h^Zw1p^%t^qfVV7% z?MZ8iTYueS5T%cB(igIqop%P0FPSN!19OjVLG*ihTVxEUF9|QCCHpT4J#pqs)hGm! zmW-GYXi0lA%n9u%FW-4QcQnf){3{KqI%SYa~`Ndx3hZ*uh3(J(C zf)~+O_i_$zV}lb(MV+SfY??k(%wb-#KP9b{9KXJx->|cO~y0}v^BgU!KjHPs|onB-1n>dEid~W>afmgOR>Z1t2<`0 z*un++MR4HT0Z9k4))lm^4-pglo(~X(4ZcacPZ{YbNk!JHSyto%MDKFf1ri!*$5uyp zKCJn$ToHwZB=AChS1y8+RNMK_F0xQrIfr+-m>!2d;~2o={)m%z!pW zP+ujDo@S1mCXY|cFi{X_73PV)uvL5{pl7WlZ!)Pc-rq--j9JgueL_!lZwl}1{dAQ% zT@>cI3KItSBx;H+WpXt_wx*Lw8Rn<&mWUhlIM|#7_IOSJ3jh&hGev{l1uwPfzuu<$ zyAqoomR)lOqEAwI-7D67`$sC4wU}yeqfw5TYiD)W%I==SV(Mu>6hQq|E8bGj*algi zh_Oj~`hyk)tcbEFO640P(l>d}b88c_!8^&hs{#f!PTq97SVzV%K(%6U8nO$Z@*I>} zS(w$pdP4QrFr=k2gMpDc@t5;;c=pF7iASBTVs!5>`kygKq3GzX=&;(JGEiTQYye z=id8#P0(r>c)bf9F}RVkXWBbN;d~uId3QkPfLCH!e0eUBQ1SgzgZ>NWtHTk#^Sho_ z#LeqrD4$u$g2QV~6SFL?PX?#LtYzVZ%+_C#G$i#VSVJ)GP^%sUItd|eA{%0&t3kJP z`^A)FRCK$jWiVTw+0l@|LN*znl}7UCBSJdN_MUpQA~9sOhTkoG{C{r0_yu& z(vOk`U1p6z9`{*ag&rAt3@p9TdbOCjsn5$QKJ?ixM4~>+=Z!iyc?Li~2Z8LHFJ)WLSM3qMG?)eLzO40h zz7xvXS0_#E$}Dg4hE}nyNdHA2u3x;x drO^K6mM}P0xV$DFHT(a=DaxwJ)JR!G{BJSciA?|i literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 0d13dc75f0..bbd419574b 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,8 @@ | 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 | | 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 | +![功能图](/img/common/system-feature.png) + ### 工作流程 | | 功能 | 描述 | @@ -174,6 +176,8 @@ | 🚀 | 已办任务 | 查看自己【已】审批的工作任务,未来会支持回退操作 | | 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 | +![功能图](/img/common/bpm-feature.png) + ### 支付系统 | | 功能 | 描述 | @@ -209,6 +213,8 @@ | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | +![功能图](/img/common/infra-feature.png) + ### 数据报表 | | 功能 | 描述 | -- Gitee From ba541fba8347329387d7ec97ed662f736d937b24 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 21:06:06 +0800 Subject: [PATCH 0110/1557] =?UTF-8?q?README=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=9B=BE=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=90=86?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bbd419574b..4787c4d4f0 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ | 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 | | 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 | -![功能图](/img/common/system-feature.png) +![功能图](/.image/common/system-feature.png) ### 工作流程 @@ -176,7 +176,7 @@ | 🚀 | 已办任务 | 查看自己【已】审批的工作任务,未来会支持回退操作 | | 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 | -![功能图](/img/common/bpm-feature.png) +![功能图](/.image/common/bpm-feature.png) ### 支付系统 @@ -213,7 +213,7 @@ | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | -![功能图](/img/common/infra-feature.png) +![功能图](/.image/common/infra-feature.png) ### 数据报表 -- Gitee From f623156829a6e25b5b872c7b2729dc33dbd2d5ac Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 21:11:12 +0800 Subject: [PATCH 0111/1557] =?UTF-8?q?README=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=9B=BE=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=90=86?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../candidate/expression/BpmTaskAssignStartUserExpression.java | 2 +- .../yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java index ac243c0f43..2c7de5a2b4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java @@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import jakarta.annotation.Resource; import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.util.Set; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java index 53e2759142..e86575a749 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java @@ -10,11 +10,11 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.HashMap; import java.util.Map; -- Gitee From 2ea56b51eba1854345259e9e1c347b355d0324bd Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 27 Mar 2024 14:30:28 +0000 Subject: [PATCH 0112/1557] =?UTF-8?q?=E3=80=90=E8=BD=BB=E9=87=8F=E7=BA=A7?= =?UTF-8?q?=20PR=E3=80=91=EF=BC=9Afix:=20convertXxxByFlatMap,=20=E5=BD=93m?= =?UTF-8?q?ap=E5=90=8E=E5=86=85=E5=AE=B9=E4=B8=BAnull=E6=97=B6,=20flatMap?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0NPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dhb52 --- .../common/util/collection/CollectionUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java index cb4ddec34a..0d06bc799f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java @@ -78,7 +78,7 @@ public class CollectionUtils { if (CollUtil.isEmpty(from)) { return new ArrayList<>(); } - return from.stream().flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); + return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); } public static List convertListByFlatMap(Collection from, @@ -87,7 +87,7 @@ public class CollectionUtils { if (CollUtil.isEmpty(from)) { return new ArrayList<>(); } - return from.stream().map(mapper).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); + return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); } public static List mergeValuesFromMap(Map> map) { @@ -123,7 +123,7 @@ public class CollectionUtils { if (CollUtil.isEmpty(from)) { return new HashSet<>(); } - return from.stream().flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); + return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); } public static Set convertSetByFlatMap(Collection from, @@ -132,7 +132,7 @@ public class CollectionUtils { if (CollUtil.isEmpty(from)) { return new HashSet<>(); } - return from.stream().map(mapper).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); + return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); } public static Map convertMap(Collection from, Function keyFunc) { @@ -315,4 +315,4 @@ public class CollectionUtils { return list.stream().flatMap(Collection::stream).collect(Collectors.toList()); } -} +} \ No newline at end of file -- Gitee From a80ba4888911f770ed09e3143dead2eba467aa8d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 28 Mar 2024 19:05:16 +0800 Subject: [PATCH 0113/1557] =?UTF-8?q?bugfix=EF=BC=9A=E5=90=8C=E6=AD=A5=20m?= =?UTF-8?q?aster=20=E4=BF=AE=E6=94=B9=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receivable/CrmReceivablePlanServiceImpl.java | 6 +----- .../admin/purchase/ErpPurchaseOrderController.java | 14 +++++++------- .../app/spu/AppProductSpuController.java | 2 +- .../controller/app/cart/vo/AppCartAddReqVO.java | 5 +++-- .../order/handler/TradeBrokerageOrderHandler.java | 2 +- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java index 93ecb47462..dd3de19b1a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java @@ -20,7 +20,6 @@ import com.mzt.logapi.context.LogRecordContext; import com.mzt.logapi.service.impl.DiffParseFunction; import com.mzt.logapi.starter.annotation.LogRecord; import jakarta.annotation.Resource; -import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -46,9 +45,6 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { @Resource private CrmReceivablePlanMapper receivablePlanMapper; - @Resource - @Lazy // 延迟加载,避免循环依赖 - private CrmReceivableService receivableService; @Resource private CrmContractService contractService; @Resource @@ -144,7 +140,7 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { // 2. 删除 receivablePlanMapper.deleteById(id); // 3. 删除数据权限 - permissionService.deletePermission(CrmBizTypeEnum.CRM_CUSTOMER.getType(), id); + permissionService.deletePermission(CrmBizTypeEnum.CRM_RECEIVABLE_PLAN.getType(), id); // 4. 记录操作日志上下文 LogRecordContext.putVariable("receivablePlan", receivablePlan); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java index 203d2fec0b..bbaf2edf7f 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java @@ -61,14 +61,14 @@ public class ErpPurchaseOrderController { @PostMapping("/create") @Operation(summary = "创建采购订单") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:create')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:create')") public CommonResult createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) { return success(purchaseOrderService.createPurchaseOrder(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新采购订单") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update')") public CommonResult updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) { purchaseOrderService.updatePurchaseOrder(updateReqVO); return success(true); @@ -76,7 +76,7 @@ public class ErpPurchaseOrderController { @PutMapping("/update-status") @Operation(summary = "更新采购订单的状态") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update-status')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update-status')") public CommonResult updatePurchaseOrderStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) { purchaseOrderService.updatePurchaseOrderStatus(id, status); @@ -86,7 +86,7 @@ public class ErpPurchaseOrderController { @DeleteMapping("/delete") @Operation(summary = "删除采购订单") @Parameter(name = "ids", description = "编号数组", required = true) - @PreAuthorize("@ss.hasPermission('erp:purchase-create:delete')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:delete')") public CommonResult deletePurchaseOrder(@RequestParam("ids") List ids) { purchaseOrderService.deletePurchaseOrder(ids); return success(true); @@ -95,7 +95,7 @@ public class ErpPurchaseOrderController { @GetMapping("/get") @Operation(summary = "获得采购订单") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") public CommonResult getPurchaseOrder(@RequestParam("id") Long id) { ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id); if (purchaseOrder == null) { @@ -115,7 +115,7 @@ public class ErpPurchaseOrderController { @GetMapping("/page") @Operation(summary = "获得采购订单分页") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") public CommonResult> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) { PageResult pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO); return success(buildPurchaseOrderVOPageResult(pageResult)); @@ -123,7 +123,7 @@ public class ErpPurchaseOrderController { @GetMapping("/export-excel") @Operation(summary = "导出采购订单 Excel") - @PreAuthorize("@ss.hasPermission('erp:purchase-create:export')") + @PreAuthorize("@ss.hasPermission('erp:purchase-order:export')") @OperateLog(type = EXPORT) public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException { diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java index 57fc47d45d..d8d6f29ef0 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java @@ -101,7 +101,7 @@ public class AppProductSpuController { throw exception(SPU_NOT_EXISTS); } if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) { - throw exception(SPU_NOT_ENABLE); + throw exception(SPU_NOT_ENABLE, spu.getName()); } // 获得商品 SKU List skus = productSkuService.getSkuListBySpuId(spu.getId()); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java index 26d774234b..0c33b86269 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - +import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; +import lombok.Data; @Schema(description = "用户 App - 购物车添加购物项 Request VO") @Data @@ -15,6 +15,7 @@ public class AppCartAddReqVO { @Schema(description = "新增商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "数量不能为空") + @Min(value = 1, message = "商品数量必须大于等于 1") private Integer count; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java index d0a3afd5fb..e1ceaa505f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java @@ -83,7 +83,7 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler { if (order.getBrokerageUserId() == null) { return; } - cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId()); + cancelBrokerage(order.getBrokerageUserId(), orderItem.getId()); } /** -- Gitee From 7d26d63dba50ff72708cd478b7c3d40a8066b4ee Mon Sep 17 00:00:00 2001 From: jiejc1 Date: Thu, 28 Mar 2024 20:06:31 +0800 Subject: [PATCH 0114/1557] =?UTF-8?q?fix:=20[issue-401]=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=AD=E5=B1=B1=E5=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/area.csv | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/resources/area.csv b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/resources/area.csv index c9a3a0e748..06954ba6ca 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/resources/area.csv +++ b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/resources/area.csv @@ -522,6 +522,29 @@ id,name,type,parentId 441931,凤岗镇,4,441900 441932,长安镇,4,441900 442000,中山市,3,440000 +442001,石岐街道,4,442000 +442002,东区街道,4,442000 +442003,中山港街道,4,442000 +442004,西区街道,4,442000 +442005,南区街道,4,442000 +442006,五桂山街道,4,442000 +442007,民众街道,4,442000 +442008,南朗街道,4,442000 +442009,黄圃镇,4,442000 +442010,东凤镇,4,442000 +442011,古镇镇,4,442000 +442012,沙溪镇,4,442000 +442013,坦洲镇,4,442000 +442014,港口镇,4,442000 +442015,三角镇,4,442000 +442016,横栏镇,4,442000 +442017,南头镇,4,442000 +442018,阜沙镇,4,442000 +442019,三乡镇,4,442000 +442020,板芙镇,4,442000 +442021,大涌镇,4,442000 +442022,神湾镇,4,442000 +442023,小榄镇,4,442000 445100,潮州市,3,440000 445200,揭阳市,3,440000 445300,云浮市,3,440000 -- Gitee From b504d9841e37c23cfed48640d641d47529fb4314 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 29 Mar 2024 19:49:47 +0800 Subject: [PATCH 0115/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=E5=90=8E=E7=AB=AF=E5=AE=9E?= =?UTF-8?q?=E7=8E=B030%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 2 + .../definition/BpmSimpleModelController.java | 15 +- .../core/enums/BpmnModelConstants.java | 13 +- .../flowable/core/util/BpmnModelUtils.java | 57 +++---- .../definition/BpmSimpleModelService.java | 8 + .../definition/BpmSimpleModelServiceImpl.java | 142 ++++++++++++++++-- 6 files changed, 186 insertions(+), 51 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index ec167719cc..ba6b8c4543 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -75,4 +75,6 @@ public interface ErrorCodeConstants { // ========== BPM 流程表达式 1-009-014-000 ========== ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在"); + // ========== BPM 仿钉钉流程设计器 1-009-015-000 ========== + ErrorCode CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT = new ErrorCode(1_009_015_000, "该流程模型不支持仿钉钉设计流程"); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java index f6fb33e167..40745513e9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java @@ -1,17 +1,16 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; import cn.iocoder.yudao.module.bpm.service.definition.BpmSimpleModelService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -28,4 +27,12 @@ public class BpmSimpleModelController { public CommonResult saveSimpleModel(@Valid @RequestBody BpmSimpleModelSaveReqVO reqVO) { return success(bpmSimpleModelService.saveSimpleModel(reqVO)); } + + @GetMapping("/get") + @Operation(summary = "获得仿钉钉流程设计模型") + @Parameter(name = "modelId", description = "流程模型编号", required = true, example = "a2c5eee0-eb6c-11ee-abf4-0c37967c420a") + public CommonResult getSimpleModel(@RequestParam("modelId") String modelId){ + return success(bpmSimpleModelService.getSimpleModel(modelId)); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index 5283baa251..72d4e59ed6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -1,5 +1,10 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; +import com.google.common.collect.ImmutableSet; +import org.flowable.bpmn.model.*; + +import java.util.Set; + /** * BPMN XML 常量信息 * @@ -24,13 +29,13 @@ public interface BpmnModelConstants { String USER_TASK_CANDIDATE_PARAM = "candidateParam"; /** - * BPMN Start Event 节点 Id, 用于后端生成 Start Event 节点 + * BPMN End Event 节点 Id, 用于后端生成 End Event 节点 */ - String START_EVENT_ID = "StartEvent_1"; + String END_EVENT_ID = "EndEvent_1"; /** - * BPMN End Event 节点 Id, 用于后端生成 End Event 节点 + * 支持转仿钉钉设计模型的 Bpmn 节点 */ - String END_EVENT_ID = "EndEvent_1"; + Set> SUPPORT_CONVERT_SIMPLE_FlOW_NODES = ImmutableSet.of(UserTask.class, EndEvent.class); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index b66ef6a97e..501cfb6a5c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.hutool.core.lang.TypeReference; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; @@ -338,31 +337,26 @@ public class BpmnModelUtils { /** * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) - * @param processId 流程标识 - * @param processName 流程名称 + * + * @param processId 流程标识 + * @param processName 流程名称 * @param simpleModelNode 仿钉钉流程设计模型数据结构 * @return Bpmn Model */ - public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName,BpmSimpleModelNodeVO simpleModelNode) { + public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); Process mainProcess = new Process(); mainProcess.setId(processId); mainProcess.setName(processName); mainProcess.setExecutable(Boolean.TRUE); bpmnModel.addProcess(mainProcess); - // 目前前端传进来的节点。 没有 start event 节点 和 end event 节点。 - // 在最前面加上 start event node - BpmSimpleModelNodeVO startEventNode = new BpmSimpleModelNodeVO(); - startEventNode.setId(BpmnModelConstants.START_EVENT_ID); - startEventNode.setName("开始"); - startEventNode.setType(BpmSimpleModelNodeType.START_NODE.getType()); - startEventNode.setChildNode(simpleModelNode); + // 前端模型数据结构。 有 start event 节点. 没有 end event 节点。 // 添加 FlowNode - addBpmnFlowNode(mainProcess, startEventNode); + addBpmnFlowNode(mainProcess, simpleModelNode); // 单独添加 end event 节点 addBpmnEndEventNode(mainProcess); // 添加节点之间的连线 Sequence Flow - addBpmnSequenceFlow(mainProcess, startEventNode); + addBpmnSequenceFlow(mainProcess, simpleModelNode); // 自动布局 new BpmnAutoLayout(bpmnModel).execute(); @@ -371,24 +365,24 @@ public class BpmnModelUtils { private static void addBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node) { // 节点为 null 退出 - if (node == null) { + if (node == null || node.getId() == null) { return; } BpmSimpleModelNodeVO childNode = node.getChildNode(); // 如果后续节点为 null. 添加与结束节点的连线 - if (childNode == null) { - addBpmnSequenceFlowElement(mainProcess, node.getId(),BpmnModelConstants.END_EVENT_ID, null); + if (childNode == null || childNode.getId() == null) { + addBpmnSequenceFlowElement(mainProcess, node.getId(), BpmnModelConstants.END_EVENT_ID, null); return; } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); - switch(nodeType){ - case START_NODE : - case START_USER_NODE : - case APPROVE_USER_NODE : + switch (nodeType) { + case START_NODE: + case START_USER_NODE: + case APPROVE_USER_NODE: addBpmnSequenceFlowElement(mainProcess, node.getId(), childNode.getId(), null); break; - default : { + default: { // TODO 其它节点类型的实现 } } @@ -396,7 +390,7 @@ public class BpmnModelUtils { addBpmnSequenceFlow(mainProcess, childNode); } - private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String conditionExpression) { + private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String conditionExpression) { SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); if (StrUtil.isNotEmpty(conditionExpression)) { sequenceFlow.setConditionExpression(conditionExpression); @@ -407,20 +401,20 @@ public class BpmnModelUtils { private static void addBpmnFlowNode(Process mainProcess, BpmSimpleModelNodeVO simpleModelNode) { // 节点为 null 退出 - if (simpleModelNode == null) { + if (simpleModelNode == null || simpleModelNode.getId() == null) { return; } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); - switch(nodeType){ - case START_NODE : + switch (nodeType) { + case START_NODE: addBpmnStartEventNode(mainProcess, simpleModelNode); break; - case START_USER_NODE : - case APPROVE_USER_NODE : + case START_USER_NODE: + case APPROVE_USER_NODE: addBpmnUserTaskEventNode(mainProcess, simpleModelNode); break; - default : { + default: { // TODO 其它节点类型的实现 } } @@ -454,17 +448,16 @@ public class BpmnModelUtils { UserTask userTask = new UserTask(); userTask.setId(node.getId()); userTask.setName(node.getName()); - Integer candidateStrategy = MapUtil.getInt(node.getAttributes(),BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); - List candidateParam = MapUtil.get(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, new TypeReference<>() {}); + Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); // 添加自定义属性 addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, candidateStrategy == null ? null : String.valueOf(candidateStrategy)); addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, - CollUtil.join(candidateParam, ",")); + MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); mainProcess.addFlowElement(userTask); } - private static void addExtensionAttribute(FlowElement element, String namespace, String name, String value) { + private static void addExtensionAttribute(FlowElement element, String namespace, String name, String value) { if (value == null) { return; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java index 1761ba3ffc..2d6865d243 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; import jakarta.validation.Valid; @@ -15,4 +16,11 @@ public interface BpmSimpleModelService { * @param reqVO 请求信息 */ Boolean saveSimpleModel(@Valid BpmSimpleModelSaveReqVO reqVO); + + /** + * 获取仿钉钉流程设计模型结构 + * @param modelId 流程模型编号 + * @return 仿钉钉流程设计模型结构 + */ + BpmSimpleModelNodeVO getSimpleModel(String modelId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java index 8273ca1760..eca3da1845 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java @@ -1,16 +1,28 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import jakarta.annotation.Resource; -import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.*; import org.flowable.engine.repository.Model; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.List; +import java.util.Map; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.START_NODE; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_PARAM; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY; /** * 仿钉钉流程设计 Service 实现类 @@ -29,16 +41,124 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { if (model == null) { throw exception(MODEL_NOT_EXISTS); } - byte[] bpmnBytes = bpmModelService.getModelBpmnXML(reqVO.getModelId()); +// byte[] bpmnBytes = bpmModelService.getModelBpmnXML(reqVO.getModelId()); +// if (ArrayUtil.isEmpty(bpmnBytes)) { +// // BPMN XML 不存在。新增 +// BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); +// bpmModelService.saveModelBpmnXml(model.getId(), BpmnModelUtils.getBpmnXml(bpmnModel)); +// return Boolean.TRUE; +// } else { +// // TODO BPMN XML 已经存在。如何修改 ?? +// return Boolean.FALSE; +// } + // 暂时直接修改 + BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + bpmModelService.saveModelBpmnXml(model.getId(), BpmnModelUtils.getBpmnXml(bpmnModel)); + return Boolean.TRUE; + } + + @Override + public BpmSimpleModelNodeVO getSimpleModel(String modelId) { + Model model = bpmModelService.getModel(modelId); + if (model == null) { + throw exception(MODEL_NOT_EXISTS); + } + byte[] bpmnBytes = bpmModelService.getModelBpmnXML(modelId); + BpmnModel bpmnModel = BpmnModelUtils.getBpmnModel(bpmnBytes); + return convertBpmnModelToSimpleModel(bpmnModel); + + } + + /** + * Bpmn Model 转换成 仿钉钉流程设计模型数据结构(json) 待完善 + * + * @param bpmnModel Bpmn Model + * @return 仿钉钉流程设计模型数据结构 + */ + private BpmSimpleModelNodeVO convertBpmnModelToSimpleModel(BpmnModel bpmnModel) { + if (bpmnModel == null) { + return null; + } + StartEvent startEvent = BpmnModelUtils.getStartEvent(bpmnModel); + if (startEvent == null) { + return null; + } + BpmSimpleModelNodeVO rootNode = new BpmSimpleModelNodeVO(); + rootNode.setType(START_NODE.getType()); + rootNode.setId(startEvent.getId()); + rootNode.setName(startEvent.getName()); + recursiveBuildSimpleModelNode(startEvent, rootNode); + return rootNode; + + } - if (ArrayUtil.isEmpty(bpmnBytes)) { - // BPMN XML 不存在。新增 - BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); - bpmModelService.saveModelBpmnXml(model.getId(),BpmnModelUtils.getBpmnXml(bpmnModel)); - return Boolean.TRUE; - } else { - // TODO BPMN XML 已经存在。如何修改 ?? - return Boolean.FALSE; + private void recursiveBuildSimpleModelNode(FlowNode currentFlowNode, BpmSimpleModelNodeVO currentSimpleModeNode) { + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(currentSimpleModeNode.getType()); + Assert.notNull(nodeType, "节点类型不支持"); + // 校验节点是否支持转仿钉钉的流程模型 + List outgoingFlows = validateCanConvertSimpleNode(nodeType, currentFlowNode); + if (CollUtil.isEmpty(outgoingFlows) || outgoingFlows.get(0).getTargetFlowElement() == null) { + return; + } + FlowElement targetElement = outgoingFlows.get(0).getTargetFlowElement(); + // 如果是 EndEvent 直接退出 + if (targetElement instanceof EndEvent) { + return; + } + if (targetElement instanceof UserTask) { + BpmSimpleModelNodeVO childNode = convertUserTaskToSimpleModelNode((UserTask) targetElement); + currentSimpleModeNode.setChildNode(childNode); + recursiveBuildSimpleModelNode((FlowNode) targetElement, childNode); + } + // TODO 其它节点类型待实现 + } + + + private BpmSimpleModelNodeVO convertUserTaskToSimpleModelNode(UserTask userTask) { + BpmSimpleModelNodeVO simpleModelNodeVO = new BpmSimpleModelNodeVO(); + simpleModelNodeVO.setType(BpmSimpleModelNodeType.APPROVE_USER_NODE.getType()); + simpleModelNodeVO.setName(userTask.getName()); + simpleModelNodeVO.setId(userTask.getId()); + Map attributes = MapUtil.newHashMap(); + // TODO 暂时是普通审批,需要加会签 + attributes.put("approveMethod", 1); + attributes.computeIfAbsent(USER_TASK_CANDIDATE_STRATEGY, (key) -> BpmnModelUtils.parseCandidateStrategy(userTask)); + attributes.computeIfAbsent(USER_TASK_CANDIDATE_PARAM, (key) -> BpmnModelUtils.parseCandidateParam(userTask)); + simpleModelNodeVO.setAttributes(attributes); + return simpleModelNodeVO; + } + + private List validateCanConvertSimpleNode(BpmSimpleModelNodeType nodeType, FlowNode currentFlowNode) { + switch (nodeType) { + case START_NODE: + case APPROVE_USER_NODE: { + List outgoingFlows = currentFlowNode.getOutgoingFlows(); + if (CollUtil.isNotEmpty(outgoingFlows) && outgoingFlows.size() > 1) { + throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); + } + validIsSupportFlowNode(outgoingFlows.get(0).getTargetFlowElement()); + return outgoingFlows; + } + default: { + // TODO 其它节点类型待实现 + throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); + } + } + } + + private void validIsSupportFlowNode(FlowElement targetElement) { + if (targetElement == null) { + return; + } + boolean isSupport = false; + for (Class item : BpmnModelConstants.SUPPORT_CONVERT_SIMPLE_FlOW_NODES) { + if (item.isInstance(targetElement)) { + isSupport = true; + break; + } + } + if (!isSupport) { + throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); } } } -- Gitee From 90f82b157de162ecf07cb904ce2fe632d6bdb6ea Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 09:22:54 +0800 Subject: [PATCH 0116/1557] =?UTF-8?q?CRM=EF=BC=9A=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=90=E5=AE=A2=E6=88=B7=E7=BB=9F=E8=AE=A1=E3=80=91=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/DateIntervalEnum.java | 28 +- .../framework/common/util/date/DateUtils.java | 39 -- .../common/util/date/LocalDateTimeUtils.java | 144 +++++- .../module/crm/enums/ErrorCodeConstants.java | 1 - .../CrmStatisticsCustomerController.http | 2 +- .../CrmStatisticsCustomerController.java | 18 +- ...CrmStatisticsCustomerByUserBaseRespVO.java | 2 - ...atisticsCustomerContractSummaryRespVO.java | 31 +- ...atisticsCustomerDealCycleByDateRespVO.java | 2 +- ...atisticsCustomerDealCycleByUserRespVO.java | 4 +- .../customer/CrmStatisticsCustomerReqVO.java | 7 +- ...StatisticsCustomerSummaryByDateRespVO.java | 4 +- ...StatisticsCustomerSummaryByUserRespVO.java | 8 +- ...tatisticsFollowUpSummaryByDateRespVO.java} | 6 +- ...tatisticsFollowUpSummaryByTypeRespVO.java} | 6 +- ...tatisticsFollowUpSummaryByUserRespVO.java} | 6 +- .../vo/rank/CrmStatisticsRankRespVO.java | 1 + .../CrmStatisticsCustomerMapper.java | 24 +- .../CrmStatisticsCustomerService.java | 8 +- .../CrmStatisticsCustomerServiceImpl.java | 482 ++++++------------ .../CrmStatisticsCustomerMapper.xml | 288 +++++------ 21 files changed, 497 insertions(+), 614 deletions(-) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/{CrmStatisticsFollowupSummaryByDateRespVO.java => CrmStatisticsFollowUpSummaryByDateRespVO.java} (79%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/{CrmStatisticsFollowupSummaryByTypeRespVO.java => CrmStatisticsFollowUpSummaryByTypeRespVO.java} (76%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/{CrmStatisticsFollowupSummaryByUserRespVO.java => CrmStatisticsFollowUpSummaryByUserRespVO.java} (75%) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java index 9a614ddc9d..498b671242 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.common.enums; +import cn.hutool.core.util.ArrayUtil; import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -7,7 +8,7 @@ import lombok.Getter; import java.util.Arrays; /** - * 时间间隔类型枚举 + * 时间间隔的枚举 * * @author dhb52 */ @@ -15,26 +16,19 @@ import java.util.Arrays; @AllArgsConstructor public enum DateIntervalEnum implements IntArrayValuable { - TODAY(1, "今天"), - YESTERDAY(2, "昨天"), - THIS_WEEK(3, "本周"), - LAST_WEEK(4, "上周"), - THIS_MONTH(5, "本月"), - LAST_MONTH(6, "上月"), - THIS_QUARTER(7, "本季度"), - LAST_QUARTER(8, "上季度"), - THIS_YEAR(9, "本年"), - LAST_YEAR(10, "去年"), - CUSTOMER(11, "自定义"), + DAY(1, "天"), + WEEK(2, "周"), + MONTH(3, "月"), + QUARTER(4, "季度"), + YEAR(5, "年") ; - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getType).toArray(); + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray(); /** * 类型 */ - private final Integer type; - + private final Integer interval; /** * 名称 */ @@ -45,4 +39,8 @@ public enum DateIntervalEnum implements IntArrayValuable { return ARRAYS; } + public static DateIntervalEnum valueOf(Integer interval) { + return ArrayUtil.firstMatch(item -> item.getInterval().equals(interval), DateIntervalEnum.values()); + } + } \ No newline at end of file diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java index 60b3f1e1e9..b51a838c69 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java @@ -65,19 +65,11 @@ public class DateUtils { return new Date(System.currentTimeMillis() + duration.toMillis()); } - public static boolean isExpired(Date time) { - return System.currentTimeMillis() > time.getTime(); - } - public static boolean isExpired(LocalDateTime time) { LocalDateTime now = LocalDateTime.now(); return now.isAfter(time); } - public static long diff(Date endTime, Date startTime) { - return endTime.getTime() - startTime.getTime(); - } - /** * 创建指定时间 * @@ -134,37 +126,6 @@ public class DateUtils { return a.isAfter(b) ? a : b; } - /** - * 计算当期时间相差的日期 - * - * @param field 日历字段.
eg:Calendar.MONTH,Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY等. - * @param amount 相差的数值 - * @return 计算后的日志 - */ - public static Date addDate(int field, int amount) { - return addDate(null, field, amount); - } - - /** - * 计算当期时间相差的日期 - * - * @param date 设置时间 - * @param field 日历字段 例如说,{@link Calendar#DAY_OF_MONTH} 等 - * @param amount 相差的数值 - * @return 计算后的日志 - */ - public static Date addDate(Date date, int field, int amount) { - if (amount == 0) { - return date; - } - Calendar c = Calendar.getInstance(); - if (date != null) { - c.setTime(date); - } - c.add(field, amount); - return c.getTime(); - } - /** * 是否今天 * diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java index 87c20798ea..cf978d81a2 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java @@ -1,13 +1,18 @@ package cn.iocoder.yudao.framework.common.util.date; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; -import java.time.Duration; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; +import java.time.*; +import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAdjusters; +import java.util.ArrayList; +import java.util.List; /** * 时间工具类,用于 {@link java.time.LocalDateTime} @@ -21,6 +26,22 @@ public class LocalDateTimeUtils { */ public static LocalDateTime EMPTY = buildTime(1970, 1, 1); + /** + * 解析时间 + * + * 相比 {@link LocalDateTimeUtil#parse(CharSequence)} 方法来说,会尽量去解析,直到成功 + * + * @param time 时间 + * @return 时间字符串 + */ + public static LocalDateTime parse(String time) { + try { + return LocalDateTimeUtil.parse(time, DatePattern.NORM_DATE_PATTERN); + } catch (DateTimeParseException e) { + return LocalDateTimeUtil.parse(time); + } + } + public static LocalDateTime addTime(Duration duration) { return LocalDateTime.now().plus(duration); } @@ -54,6 +75,21 @@ public class LocalDateTimeUtils { return new LocalDateTime[]{buildTime(year1, mouth1, day1), buildTime(year2, mouth2, day2)}; } + /** + * 判指定断时间,是否在该时间范围内 + * + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param time 指定时间 + * @return 是否 + */ + public static boolean isBetween(LocalDateTime startTime, LocalDateTime endTime, String time) { + if (startTime == null || endTime == null || time == null) { + return false; + } + return LocalDateTimeUtil.isIn(parse(time), startTime, endTime); + } + /** * 判断当前时间是否在该时间范围内 * @@ -122,6 +158,16 @@ public class LocalDateTimeUtils { return date.with(TemporalAdjusters.lastDayOfMonth()).with(LocalTime.MAX); } + /** + * 获得指定日期所在季度 + * + * @param date 日期 + * @return 所在季度 + */ + public static int getQuarterOfYear(LocalDateTime date) { + return (date.getMonthValue() - 1) / 3 + 1; + } + /** * 获取指定日期到现在过了几天,如果指定日期在当前日期之后,获取结果为负 * @@ -168,4 +214,94 @@ public class LocalDateTimeUtils { return LocalDateTime.now().with(TemporalAdjusters.firstDayOfYear()).with(LocalTime.MIN); } + public static List getDateRangeList(LocalDateTime startTime, + LocalDateTime endTime, + Integer interval) { + // 1.1 找到枚举 + DateIntervalEnum intervalEnum = DateIntervalEnum.valueOf(interval); + Assert.notNull(intervalEnum, "interval({}} 找不到对应的枚举", interval); + // 1.2 将时间对齐 + startTime = LocalDateTimeUtil.beginOfDay(startTime); + endTime = LocalDateTimeUtil.endOfDay(endTime); + + // 2. 循环,生成时间范围 + List timeRanges = new ArrayList<>(); + switch (intervalEnum) { + case DateIntervalEnum.DAY: + while (startTime.isBefore(endTime)) { + timeRanges.add(new LocalDateTime[]{startTime, startTime.plusDays(1).minusNanos(1)}); + startTime = startTime.plusDays(1); + } + break; + case DateIntervalEnum.WEEK: + while (startTime.isBefore(endTime)) { + LocalDateTime endOfWeek = startTime.with(DayOfWeek.SUNDAY).plusDays(1).minusNanos(1); + timeRanges.add(new LocalDateTime[]{startTime, endOfWeek}); + startTime = endOfWeek.plusNanos(1); + } + break; + case DateIntervalEnum.MONTH: + while (startTime.isBefore(endTime)) { + LocalDateTime endOfMonth = startTime.with(TemporalAdjusters.lastDayOfMonth()).plusDays(1).minusNanos(1); + timeRanges.add(new LocalDateTime[]{startTime, endOfMonth}); + startTime = endOfMonth.plusNanos(1); + } + break; + case DateIntervalEnum.QUARTER: + while (startTime.isBefore(endTime)) { + LocalDateTime quarterEnd = startTime.withMonth(getQuarterOfYear(startTime) * 3 + 1) + .withDayOfMonth(1).minusNanos(1); + timeRanges.add(new LocalDateTime[]{startTime, quarterEnd}); + startTime = quarterEnd.plusNanos(1); + } + break; + case DateIntervalEnum.YEAR: + while (startTime.isBefore(endTime)) { + LocalDateTime endOfYear = startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1); + timeRanges.add(new LocalDateTime[]{startTime, endOfYear}); + startTime = endOfYear.plusNanos(1); + } + break; + default: + throw new IllegalArgumentException("Invalid interval: " + interval); + } + // 3. 兜底,最后一个时间,需要保持在 endTime 之前 + LocalDateTime[] lastTimeRange = CollUtil.getLast(timeRanges); + if (lastTimeRange != null) { + lastTimeRange[1] = endTime; + } + return timeRanges; + } + + /** + * 格式化时间范围 + * + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param interval 时间间隔 + * @return 时间范围 + */ + public static String formatDateRange(LocalDateTime startTime, LocalDateTime endTime, Integer interval) { + // 1. 找到枚举 + DateIntervalEnum intervalEnum = DateIntervalEnum.valueOf(interval); + Assert.notNull(intervalEnum, "interval({}} 找不到对应的枚举", interval); + + // 2. 循环,生成时间范围 + switch (intervalEnum) { + case DateIntervalEnum.DAY: + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN); + case DateIntervalEnum.WEEK: + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN) + + StrUtil.format("(第 {} 周)", LocalDateTimeUtil.weekOfYear(startTime)); + case DateIntervalEnum.MONTH: + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_MONTH_PATTERN); + case DateIntervalEnum.QUARTER: + return StrUtil.format("{}-Q{}", startTime.getYear(), getQuarterOfYear(startTime)); + case DateIntervalEnum.YEAR: + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_YEAR_PATTERN); + default: + throw new IllegalArgumentException("Invalid interval: " + interval); + } + } + } diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java index d49f6068cf..27fb6f9cea 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java @@ -104,6 +104,5 @@ public interface ErrorCodeConstants { ErrorCode FOLLOW_UP_RECORD_DELETE_DENIED = new ErrorCode(1_020_013_001, "删除跟进记录失败,原因:没有权限"); // ========== 数据统计 1_020_014_000 ========== - ErrorCode STATISTICS_CUSTOMER_TIMES_NOT_SET = new ErrorCode(1_020_014_000, "自定义时间间隔,必须输入时间区间"); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 9d96e159aa..b5d35f5c4a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -1,6 +1,6 @@ # == 1. 客户总量分析 == ### 1.1 客户总量分析(按日) -GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100&intervalType=11×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 +GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-date?deptId=100&interval=1×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 4a0b2e760e..7d45ae217f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -40,25 +40,25 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerSummaryByUser(reqVO)); } - @GetMapping("/get-followup-summary-by-date") + @GetMapping("/get-follow-up-summary-by-date") @Operation(summary = "获取客户跟进次数分析(按日期)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getFollowupSummaryByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getFollowupSummaryByDate(reqVO)); + public CommonResult> getFollowupSummaryByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowUpSummaryByDate(reqVO)); } - @GetMapping("/get-followup-summary-by-user") + @GetMapping("/get-follow-up-summary-by-user") @Operation(summary = "获取客户跟进次数分析(按用户)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getFollowupSummaryByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getFollowupSummaryByUser(reqVO)); + public CommonResult> getFollowUpSummaryByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowUpSummaryByUser(reqVO)); } - @GetMapping("/get-followup-summary-by-type") + @GetMapping("/get-follow-up-summary-by-type") @Operation(summary = "获取客户跟进次数分析(按类型)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getFollowupSummaryByType(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getFollowupSummaryByType(reqVO)); + public CommonResult> getFollowUpSummaryByType(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getFollowUpSummaryByType(reqVO)); } @GetMapping("/get-contract-summary") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java index 41fa9152e9..bde0029c68 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerByUserBaseRespVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; -import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -13,7 +12,6 @@ import lombok.Data; public class CrmStatisticsCustomerByUserBaseRespVO { @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @JsonIgnore private Long ownerUserId; @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java index ec1d273034..fa03d46098 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerContractSummaryRespVO.java @@ -1,18 +1,12 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.math.BigDecimal; -import java.time.LocalDate; import java.time.LocalDateTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT; - @Schema(description = "管理后台 - CRM 客户转化率分析 VO") @Data public class CrmStatisticsCustomerContractSummaryRespVO { @@ -29,31 +23,19 @@ public class CrmStatisticsCustomerContractSummaryRespVO { @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1200.00") private BigDecimal receivablePrice; - @Schema(description = "客户行业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @JsonIgnore - private String industryId; - - @Schema(description = "客户行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "金融") - private String industryName; - - @Schema(description = "客户来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @JsonIgnore - private String source; + @Schema(description = "客户行业编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer industryId; - @Schema(description = "客户来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "外呼") - private String sourceName; + @Schema(description = "客户来源编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer source; @Schema(description = "负责人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @JsonIgnore private Long ownerUserId; - @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") private String ownerUserName; @Schema(description = "创建人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - @JsonIgnore - private String creatorUserId; - + private String creator; @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, example = "源码") private String creatorUserName; @@ -61,7 +43,6 @@ public class CrmStatisticsCustomerContractSummaryRespVO { private LocalDateTime createTime; @Schema(description = "下单日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02 00:00:00") - @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT) - private LocalDate orderDate; + private LocalDateTime orderDate; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java index 44b2526e85..62facb053e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByDateRespVO.java @@ -11,6 +11,6 @@ public class CrmStatisticsCustomerDealCycleByDateRespVO { private String time; @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") - private Double customerDealCycle = 0.0; + private Double customerDealCycle; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java index 6c8137983d..1c394b8b49 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByUserRespVO.java @@ -8,9 +8,9 @@ import lombok.Data; public class CrmStatisticsCustomerDealCycleByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") - private Double customerDealCycle = 0.0; + private Double customerDealCycle; @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerDealCount = 0; + private Integer customerDealCount; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index 38f15cf034..0564c2679e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -30,12 +30,12 @@ public class CrmStatisticsCustomerReqVO { * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 * 后续,可能会支持选择部分用户进行查询 */ - @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") + @Schema(description = "负责人用户 id 集合", hidden = true, example = "2") private List userIds; @Schema(description = "时间间隔类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @InEnum(value = DateIntervalEnum.class, message = "时间间隔类型,必须是 {value}") - private Integer intervalType; + private Integer interval; /** * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 @@ -49,7 +49,8 @@ public class CrmStatisticsCustomerReqVO { * group by DATE_FORMAT(field, #{dateFormat}) * 非前端传递, 由Service计算后传递给Mapper的参数 */ - @Schema(description = "Group By 日期格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "%Y%m") + @Deprecated + @Schema(description = "Group By 日期格式", hidden = true, example = "%Y%m") private String sqlDateFormat; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java index 866a58f1e6..7ffcb20ff5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByDateRespVO.java @@ -11,9 +11,9 @@ public class CrmStatisticsCustomerSummaryByDateRespVO { private String time; @Schema(description = "新建客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerCreateCount = 0; + private Integer customerCreateCount; @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerDealCount = 0; + private Integer customerDealCount; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java index bd719a1b8a..fa8372b8bb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerSummaryByUserRespVO.java @@ -10,15 +10,15 @@ import java.math.BigDecimal; public class CrmStatisticsCustomerSummaryByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { @Schema(description = "新建客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerCreateCount = 0; + private Integer customerCreateCount; @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerDealCount = 0; + private Integer customerDealCount; @Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") - private BigDecimal contractPrice = BigDecimal.ZERO; + private BigDecimal contractPrice; @Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") - private BigDecimal receivablePrice = BigDecimal.ZERO; + private BigDecimal receivablePrice; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByDateRespVO.java similarity index 79% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByDateRespVO.java index 6bd6f1d4db..9040c1eab7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByDateRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByDateRespVO.java @@ -5,15 +5,15 @@ import lombok.Data; @Schema(description = "管理后台 - CRM 跟进次数分析(按日期) VO") @Data -public class CrmStatisticsFollowupSummaryByDateRespVO { +public class CrmStatisticsFollowUpSummaryByDateRespVO { @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") private String time; @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer followupRecordCount = 0; + private Integer followUpRecordCount; @Schema(description = "跟进客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer followupCustomerCount = 0; + private Integer followUpCustomerCount; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByTypeRespVO.java similarity index 76% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByTypeRespVO.java index c722305a5f..d39f1cc0d5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByTypeRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByTypeRespVO.java @@ -6,12 +6,12 @@ import lombok.Data; @Schema(description = "管理后台 - CRM 跟进次数分析(按类型) VO") @Data -public class CrmStatisticsFollowupSummaryByTypeRespVO { +public class CrmStatisticsFollowUpSummaryByTypeRespVO { @Schema(description = "跟进类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private String followupType; + private Integer followUpType; @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer followupRecordCount = 0; + private Integer followUpRecordCount; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByUserRespVO.java similarity index 75% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByUserRespVO.java index 5cd610c360..0651356266 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowupSummaryByUserRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsFollowUpSummaryByUserRespVO.java @@ -5,12 +5,12 @@ import lombok.Data; @Schema(description = "管理后台 - CRM 跟进次数分析(按用户) VO") @Data -public class CrmStatisticsFollowupSummaryByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { +public class CrmStatisticsFollowUpSummaryByUserRespVO extends CrmStatisticsCustomerByUserBaseRespVO { @Schema(description = "跟进次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer followupRecordCount = 0; + private Integer followUpRecordCount; @Schema(description = "跟进客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer followupCustomerCount = 0; + private Integer followUpCustomerCount; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java index 101cd8bccf..261aa893e8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java @@ -17,6 +17,7 @@ public class CrmStatisticsRankRespVO { @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String deptName; + // TODO @芋艿:需要改下,金额是 bigdecimal /** * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 *

diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 7c8ed7e93c..6b535d4c86 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -13,32 +13,32 @@ import java.util.List; @Mapper public interface CrmStatisticsCustomerMapper { - List selectCustomerCreateCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerCreateCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerDealCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerCreateCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); // 已经 review + List selectCustomerCreateCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCountGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectCustomerDealCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectContractPriceGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectContractPriceGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectReceivablePriceGroupByUser(CrmStatisticsCustomerReqVO crmStatisticsCustomerReqVO); // 已经 review + List selectReceivablePriceGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupRecordCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); + List selectFollowUpRecordCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupCustomerCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); + List selectFollowUpCustomerCountGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupRecordCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); + List selectFollowUpRecordCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupCustomerCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); + List selectFollowUpCustomerCountGroupByUser(CrmStatisticsCustomerReqVO reqVO); List selectContractSummary(CrmStatisticsCustomerReqVO reqVO); - List selectFollowupRecordCountGroupByType(CrmStatisticsCustomerReqVO reqVO); + List selectFollowUpRecordCountGroupByType(CrmStatisticsCustomerReqVO reqVO); List selectCustomerDealCycleGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); // TODO } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 546124701a..06873e4a18 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -27,14 +27,13 @@ public interface CrmStatisticsCustomerService { */ List getCustomerSummaryByUser(CrmStatisticsCustomerReqVO reqVO); - /** * 跟进次数分析(按日期) * * @param reqVO 请求参数 * @return 统计数据 */ - List getFollowupSummaryByDate(CrmStatisticsCustomerReqVO reqVO); + List getFollowUpSummaryByDate(CrmStatisticsCustomerReqVO reqVO); /** * 跟进次数分析(按用户) @@ -42,7 +41,7 @@ public interface CrmStatisticsCustomerService { * @param reqVO 请求参数 * @return 统计数据 */ - List getFollowupSummaryByUser(CrmStatisticsCustomerReqVO reqVO); + List getFollowUpSummaryByUser(CrmStatisticsCustomerReqVO reqVO); /** * 客户跟进次数分析(按类型) @@ -50,8 +49,7 @@ public interface CrmStatisticsCustomerService { * @param reqVO 请求参数 * @return 统计数据 */ - List getFollowupSummaryByType(CrmStatisticsCustomerReqVO reqVO); - + List getFollowUpSummaryByType(CrmStatisticsCustomerReqVO reqVO); /** * 获取合同摘要信息(客户转化率页面) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index f951e25f54..250560ef29 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -1,19 +1,13 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; -import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; @@ -27,10 +21,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; -import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.STATISTICS_CUSTOMER_TIMES_NOT_SET; +import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; /** * CRM 客户分析 Service 实现类 @@ -41,13 +33,6 @@ import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.STATISTICS_CU @Validated public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerService { - private static final String SQL_DATE_FORMAT_BY_MONTH = "%Y%m"; - private static final String SQL_DATE_FORMAT_BY_DAY = "%Y%m%d"; - - private static final String TIME_FORMAT_BY_MONTH = "yyyyMM"; - private static final String TIME_FORMAT_BY_DAY = "yyyyMMdd"; - - @Resource private CrmStatisticsCustomerMapper customerMapper; @@ -55,283 +40,211 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; - @Resource - private DictDataApi dictDataApi; @Override public List getCustomerSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List customerCreateCountVoList = customerMapper.selectCustomerCreateCountGroupByDate(reqVO); - List customerDealCountVoList = customerMapper.selectCustomerDealCountGroupByDate(reqVO); - - // 3. 合并数据 - List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); - Map customerCreateCountMap = convertMap(customerCreateCountVoList, - CrmStatisticsCustomerSummaryByDateRespVO::getTime, - CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount); - Map customerDealCountMap = convertMap(customerDealCountVoList, - CrmStatisticsCustomerSummaryByDateRespVO::getTime, - CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount); - List respVoList = convertList(times, - time -> new CrmStatisticsCustomerSummaryByDateRespVO() - .setTime(time) - .setCustomerCreateCount(customerCreateCountMap.getOrDefault(time, 0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(time, 0))); - - return respVoList; + + // 2. 按天统计,获取分项统计数据 + List customerCreateCountList = customerMapper.selectCustomerCreateCountGroupByDate(reqVO); + List customerDealCountList = customerMapper.selectCustomerDealCountGroupByDate(reqVO); + + // 3. 按照日期间隔,合并数据 + List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); + return convertList(timeRanges, times -> { + Integer customerCreateCount = customerCreateCountList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToInt(CrmStatisticsCustomerSummaryByDateRespVO::getCustomerCreateCount).sum(); + Integer customerDealCount = customerDealCountList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToInt(CrmStatisticsCustomerSummaryByDateRespVO::getCustomerDealCount).sum(); + return new CrmStatisticsCustomerSummaryByDateRespVO() + .setTime(LocalDateTimeUtils.formatDateRange(times[0], times[1], reqVO.getInterval())) + .setCustomerCreateCount(customerCreateCount).setCustomerDealCount(customerDealCount); + }); } @Override public List getCustomerSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List customerCreateCount = customerMapper.selectCustomerCreateCountGroupByUser(reqVO); - List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); - List contractPrice = customerMapper.selectContractPriceGroupByUser(reqVO); - List receivablePrice = customerMapper.selectReceivablePriceGroupByUser(reqVO); - - // 3. 合并统计数据 - Map customerCreateCountMap = convertMap(customerCreateCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount); - Map customerDealCountMap = convertMap(customerDealCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - Map contractPriceMap = convertMap(contractPrice, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getContractPrice); - Map receivablePriceMap = convertMap(receivablePrice, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getReceivablePrice); - List respVoList = convertList(userIds, userId -> { - CrmStatisticsCustomerSummaryByUserRespVO vo = new CrmStatisticsCustomerSummaryByUserRespVO(); - // ownerUserId 为基类属性 - vo.setOwnerUserId(userId); - vo.setCustomerCreateCount(customerCreateCountMap.getOrDefault(userId, 0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)) - .setContractPrice(contractPriceMap.getOrDefault(userId, BigDecimal.ZERO)) - .setReceivablePrice(receivablePriceMap.getOrDefault(userId, BigDecimal.ZERO)); - return vo; - }); - - // 4. 拼接用户信息 - appendUserInfo(respVoList); - return respVoList; + // 2. 按用户统计,获取分项统计数据 + List customerCreateCountList = customerMapper.selectCustomerCreateCountGroupByUser(reqVO); + List customerDealCountList = customerMapper.selectCustomerDealCountGroupByUser(reqVO); + List contractPriceList = customerMapper.selectContractPriceGroupByUser(reqVO); + List receivablePriceList = customerMapper.selectReceivablePriceGroupByUser(reqVO); + + // 3.1 按照用户,合并统计数据 + List summaryList = convertList(reqVO.getUserIds(), userId -> { + Integer customerCreateCount = customerCreateCountList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToInt(CrmStatisticsCustomerSummaryByUserRespVO::getCustomerCreateCount).sum(); + Integer customerDealCount = customerDealCountList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToInt(CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount).sum(); + BigDecimal contractPrice = contractPriceList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .reduce(BigDecimal.ZERO, (sum, vo) -> sum.add(vo.getContractPrice()), BigDecimal::add); + BigDecimal receivablePrice = receivablePriceList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .reduce(BigDecimal.ZERO, (sum, vo) -> sum.add(vo.getReceivablePrice()), BigDecimal::add); + return (CrmStatisticsCustomerSummaryByUserRespVO) new CrmStatisticsCustomerSummaryByUserRespVO() + .setCustomerCreateCount(customerCreateCount).setCustomerDealCount(customerDealCount) + .setContractPrice(contractPrice).setReceivablePrice(receivablePrice).setOwnerUserId(userId); + }); + // 3.2 拼接用户信息 + appendUserInfo(summaryList); + return summaryList; } @Override - public List getFollowupSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { + public List getFollowUpSummaryByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByDate(reqVO); - List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByDate(reqVO); - - // 3. 合并统计数据 - List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); - Map followupRecordCountMap = convertMap(followupRecordCount, - CrmStatisticsFollowupSummaryByDateRespVO::getTime, - CrmStatisticsFollowupSummaryByDateRespVO::getFollowupRecordCount); - Map followupCustomerCountMap = convertMap(followupCustomerCount, - CrmStatisticsFollowupSummaryByDateRespVO::getTime, - CrmStatisticsFollowupSummaryByDateRespVO::getFollowupCustomerCount); - List respVoList = convertList(times, time -> - new CrmStatisticsFollowupSummaryByDateRespVO().setTime(time) - .setFollowupRecordCount(followupRecordCountMap.getOrDefault(time, 0)) - .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(time, 0)) - ); - - return respVoList; + + // 2. 按天统计,获取分项统计数据 + List followUpRecordCountList = customerMapper.selectFollowUpRecordCountGroupByDate(reqVO); + List followUpCustomerCountList = customerMapper.selectFollowUpCustomerCountGroupByDate(reqVO); + + // 3. 按照时间间隔,合并统计数据 + List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); + return convertList(timeRanges, times -> { + Integer followUpRecordCount = followUpRecordCountList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToInt(CrmStatisticsFollowUpSummaryByDateRespVO::getFollowUpRecordCount).sum(); + Integer followUpCustomerCount = followUpCustomerCountList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToInt(CrmStatisticsFollowUpSummaryByDateRespVO::getFollowUpCustomerCount).sum(); + return new CrmStatisticsFollowUpSummaryByDateRespVO() + .setTime(LocalDateTimeUtils.formatDateRange(times[0], times[1], reqVO.getInterval())) + .setFollowUpCustomerCount(followUpRecordCount).setFollowUpRecordCount(followUpCustomerCount); + }); } @Override - public List getFollowupSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { + public List getFollowUpSummaryByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List followupRecordCount = customerMapper.selectFollowupRecordCountGroupByUser(reqVO); - List followupCustomerCount = customerMapper.selectFollowupCustomerCountGroupByUser(reqVO); - - // 3. 合并统计数据 - Map followupRecordCountMap = convertMap(followupRecordCount, - CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsFollowupSummaryByUserRespVO::getFollowupRecordCount); - Map followupCustomerCountMap = convertMap(followupCustomerCount, - CrmStatisticsFollowupSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsFollowupSummaryByUserRespVO::getFollowupCustomerCount); - List respVoList = convertList(userIds, userId -> { - CrmStatisticsFollowupSummaryByUserRespVO vo = new CrmStatisticsFollowupSummaryByUserRespVO() - .setFollowupRecordCount(followupRecordCountMap.getOrDefault(userId, 0)) - .setFollowupCustomerCount(followupCustomerCountMap.getOrDefault(userId, 0)); - // ownerUserId 为基类属性 - vo.setOwnerUserId(userId); - return vo; - }); - // 4. 拼接用户信息 - appendUserInfo(respVoList); - return respVoList; + // 2. 按用户统计,获取分项统计数据 + List followUpRecordCountList = customerMapper.selectFollowUpRecordCountGroupByUser(reqVO); + List followUpCustomerCountList = customerMapper.selectFollowUpCustomerCountGroupByUser(reqVO); + + // 3.1 按照用户,合并统计数据 + List summaryList = convertList(reqVO.getUserIds(), userId -> { + Integer followUpRecordCount = followUpRecordCountList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToInt(CrmStatisticsFollowUpSummaryByUserRespVO::getFollowUpRecordCount).sum(); + Integer followUpCustomerCount = followUpCustomerCountList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToInt(CrmStatisticsFollowUpSummaryByUserRespVO::getFollowUpCustomerCount).sum(); + return (CrmStatisticsFollowUpSummaryByUserRespVO) new CrmStatisticsFollowUpSummaryByUserRespVO() + .setFollowUpCustomerCount(followUpRecordCount).setFollowUpRecordCount(followUpCustomerCount).setOwnerUserId(userId); + }); + // 3.2 拼接用户信息 + appendUserInfo(summaryList); + return summaryList; } @Override - public List getFollowupSummaryByType(CrmStatisticsCustomerReqVO reqVO) { + public List getFollowUpSummaryByType(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获得排行数据 - initParams(reqVO); - List respVoList = customerMapper.selectFollowupRecordCountGroupByType(reqVO); - - // 3. 获取字典数据 - List followUpTypes = dictDataApi.getDictDataList(CRM_FOLLOW_UP_TYPE); - Map followUpTypeMap = convertMap(followUpTypes, - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - respVoList.forEach(vo -> { - vo.setFollowupType(followUpTypeMap.get(vo.getFollowupType())); - }); - return respVoList; + // 2. 获得跟进数据 + return customerMapper.selectFollowUpRecordCountGroupByType(reqVO); } @Override public List getContractSummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取统计数据 - initParams(reqVO); - List respVoList = customerMapper.selectContractSummary(reqVO); - - // 3. 设置 创建人、负责人、行业、来源 - // 3.1 获取客户所属行业 - Map industryMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_INDUSTRY), - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - // 3.2 获取客户来源 - Map sourceMap = convertMap(dictDataApi.getDictDataList(CRM_CUSTOMER_SOURCE), - DictDataRespDTO::getValue, DictDataRespDTO::getLabel); - // 3.3 获取创建人、负责人列表 - Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(respVoList, - vo -> Stream.of(NumberUtils.parseLong(vo.getCreatorUserId()), vo.getOwnerUserId()))); - // 3.4 设置 创建人、负责人、行业、来源 - respVoList.forEach(vo -> { - MapUtils.findAndThen(industryMap, vo.getIndustryId(), vo::setIndustryName); - MapUtils.findAndThen(sourceMap, vo.getSource(), vo::setSourceName); - MapUtils.findAndThen(userMap, NumberUtils.parseLong(vo.getCreatorUserId()), - user -> vo.setCreatorUserName(user.getNickname())); - MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); - }); - return respVoList; + // 2. 按用户统计,获取统计数据 + List summaryList = customerMapper.selectContractSummary(reqVO); + + // 3. 拼接信息 + Map userMap = adminUserApi.getUserMap( + convertSetByFlatMap(summaryList, vo -> Stream.of(NumberUtils.parseLong(vo.getCreator()), vo.getOwnerUserId()))); + summaryList.forEach(vo -> { + findAndThen(userMap, NumberUtils.parseLong(vo.getCreator()), user -> vo.setCreatorUserName(user.getNickname())); + findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname())); + }); + return summaryList; } @Override public List getCustomerDealCycleByDate(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByDate(reqVO); - - // 3. 合并统计数据 - List times = generateTimeSeries(reqVO.getTimes()[0], reqVO.getTimes()[1]); - Map customerDealCycleMap = convertMap(customerDealCycle, - CrmStatisticsCustomerDealCycleByDateRespVO::getTime, - CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle); - List respVoList = convertList(times, time -> - new CrmStatisticsCustomerDealCycleByDateRespVO().setTime(time) - .setCustomerDealCycle(customerDealCycleMap.getOrDefault(time, 0D)) - ); - - return respVoList; + + // 2. 按天统计,获取分项统计数据 + List customerDealCycleList = customerMapper.selectCustomerDealCycleGroupByDate(reqVO); + + // 3. 按照日期间隔,合并统计数据 + List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); + return convertList(timeRanges, times -> { + Double customerDealCycle = customerDealCycleList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToDouble(CrmStatisticsCustomerDealCycleByDateRespVO::getCustomerDealCycle).sum(); + return new CrmStatisticsCustomerDealCycleByDateRespVO() + .setTime(LocalDateTimeUtils.formatDateRange(times[0], times[1], reqVO.getInterval())) + .setCustomerDealCycle(customerDealCycle); + }); } @Override public List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { return Collections.emptyList(); } - reqVO.setUserIds(userIds); - - // 2. 获取分项统计数据 - initParams(reqVO); - List customerDealCycle = customerMapper.selectCustomerDealCycleGroupByUser(reqVO); - List customerDealCount = customerMapper.selectCustomerDealCountGroupByUser(reqVO); - - // 3. 合并统计数据 - Map customerDealCycleMap = convertMap(customerDealCycle, - CrmStatisticsCustomerDealCycleByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle); - Map customerDealCountMap = convertMap(customerDealCount, - CrmStatisticsCustomerSummaryByUserRespVO::getOwnerUserId, - CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount); - List respVoList = convertList(userIds, userId -> { - CrmStatisticsCustomerDealCycleByUserRespVO vo = new CrmStatisticsCustomerDealCycleByUserRespVO() - .setCustomerDealCycle(customerDealCycleMap.getOrDefault(userId, 0.0)) - .setCustomerDealCount(customerDealCountMap.getOrDefault(userId, 0)); - // ownerUserId 为基类属性 - vo.setOwnerUserId(userId); - return vo; - }); - - // 4. 拼接用户信息 - appendUserInfo(respVoList); - return respVoList; + // 2. 按用户统计,获取分项统计数据 + List customerDealCycleList = customerMapper.selectCustomerDealCycleGroupByUser(reqVO); + List customerDealCountList = customerMapper.selectCustomerDealCountGroupByUser(reqVO); + + // 3.1 按照用户,合并统计数据 + List summaryList = convertList(reqVO.getUserIds(), userId -> { + Double customerDealCycle = customerDealCycleList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToDouble(CrmStatisticsCustomerDealCycleByUserRespVO::getCustomerDealCycle).sum(); + Integer customerDealCount = customerDealCountList.stream().filter(vo -> userId.equals(vo.getOwnerUserId())) + .mapToInt(CrmStatisticsCustomerSummaryByUserRespVO::getCustomerDealCount).sum(); + return (CrmStatisticsCustomerDealCycleByUserRespVO) new CrmStatisticsCustomerDealCycleByUserRespVO() + .setCustomerDealCycle(customerDealCycle).setCustomerDealCount(customerDealCount).setOwnerUserId(userId); + }); + // 3.2 拼接用户信息 + appendUserInfo(summaryList); + return summaryList; } /** * 拼接用户信息(昵称) * - * @param respVoList 统计数据 + * @param voList 统计数据 */ - private void appendUserInfo(List respVoList) { - Map userMap = adminUserApi.getUserMap(convertSet(respVoList, - CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); - respVoList.forEach(vo -> MapUtils.findAndThen(userMap, - vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); + private void appendUserInfo(List voList) { + Map userMap = adminUserApi.getUserMap( + convertSet(voList, CrmStatisticsCustomerByUserBaseRespVO::getOwnerUserId)); + voList.forEach(vo -> findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()))); } /** @@ -347,113 +260,10 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } // 情况二:选中某个部门 // 2.1 获得部门列表 - Long deptId = reqVO.getDeptId(); - List deptIds = convertList(deptApi.getChildDeptList(deptId), DeptRespDTO::getId); - deptIds.add(deptId); + List deptIds = convertList(deptApi.getChildDeptList(reqVO.getDeptId()), DeptRespDTO::getId); + deptIds.add(reqVO.getDeptId()); // 2.2 获得用户编号 return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); } - - /** - * 判断是否按照 月粒度 统计 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 是, 按月粒度, 否则按天粒度统计。 - */ - private boolean queryByMonth(LocalDateTime startTime, LocalDateTime endTime) { - return LocalDateTimeUtil.between(startTime, endTime).toDays() > 31; - } - - /** - * 生成时间序列 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 时间序列 - */ - private List generateTimeSeries(LocalDateTime startTime, LocalDateTime endTime) { - boolean byMonth = queryByMonth(startTime, endTime); - List times = CollUtil.newArrayList(); - while (!startTime.isAfter(endTime)) { - times.add(LocalDateTimeUtil.format(startTime, byMonth ? TIME_FORMAT_BY_MONTH : TIME_FORMAT_BY_DAY)); - if (byMonth) - startTime = startTime.plusMonths(1); - else - startTime = startTime.plusDays(1); - } - - return times; - } - - /** - * 获取 SQL 查询 GROUP BY 的时间格式 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return SQL 查询 GROUP BY 的时间格式 - */ - private String getSqlDateFormat(LocalDateTime startTime, LocalDateTime endTime) { - return queryByMonth(startTime, endTime) ? SQL_DATE_FORMAT_BY_MONTH : SQL_DATE_FORMAT_BY_DAY; - } - - private void initParams(CrmStatisticsCustomerReqVO reqVO) { - final Integer intervalType = reqVO.getIntervalType(); - - // 1. 自定义时间间隔,必须输入起始日期-结束日期 - if (DateIntervalEnum.CUSTOMER.getType().equals(intervalType)) { - if (ObjUtil.isEmpty(reqVO.getTimes()) || reqVO.getTimes().length != 2) { - throw exception(STATISTICS_CUSTOMER_TIMES_NOT_SET); - } - // 设置 mapper sqlDateFormat 参数 - reqVO.setSqlDateFormat(getSqlDateFormat(reqVO.getTimes()[0], reqVO.getTimes()[1])); - // 自定义日期无需计算日期参数 - return; - } - - // 2. 根据时间区间类型计算时间段区间日期 - DateTime beginDate = null; - DateTime endDate = null; - if (DateIntervalEnum.TODAY.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfDay(DateUtil.date()); - endDate = DateUtil.endOfDay(DateUtil.date()); - } else if (DateIntervalEnum.YESTERDAY.getType().equals(intervalType)) { - beginDate = DateUtil.offsetDay(DateUtil.date(), -1); - endDate = DateUtil.offsetDay(DateUtil.date(), -1); - } else if (DateIntervalEnum.THIS_WEEK.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfWeek(DateUtil.date()); - endDate = DateUtil.endOfWeek(DateUtil.date()); - } else if (DateIntervalEnum.LAST_WEEK.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfWeek(DateUtil.offsetWeek(DateUtil.date(), -1)); - endDate = DateUtil.endOfWeek(DateUtil.offsetWeek(DateUtil.date(), -1)); - } else if (DateIntervalEnum.THIS_MONTH.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfMonth(DateUtil.date()); - endDate = DateUtil.endOfMonth(DateUtil.date()); - } else if (DateIntervalEnum.LAST_MONTH.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfMonth(DateUtil.offsetMonth(DateUtil.date(), -1)); - endDate = DateUtil.endOfMonth(DateUtil.offsetMonth(DateUtil.date(), -1)); - } else if (DateIntervalEnum.THIS_QUARTER.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfQuarter(DateUtil.date()); - endDate = DateUtil.endOfQuarter(DateUtil.date()); - } else if (DateIntervalEnum.LAST_QUARTER.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfQuarter(DateUtil.offsetMonth(DateUtil.date(), -3)); - endDate = DateUtil.endOfQuarter(DateUtil.offsetMonth(DateUtil.date(), -3)); - } else if (DateIntervalEnum.THIS_YEAR.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfYear(DateUtil.date()); - endDate = DateUtil.endOfYear(DateUtil.date()); - } else if (DateIntervalEnum.LAST_YEAR.getType().equals(intervalType)) { - beginDate = DateUtil.beginOfYear(DateUtil.offsetMonth(DateUtil.date(), -12)); - endDate = DateUtil.endOfYear(DateUtil.offsetMonth(DateUtil.date(), -12)); - } - - // 3. 计算开始、结束日期时间,并设置reqVo - LocalDateTime[] times = new LocalDateTime[2]; - times[0] = LocalDateTimeUtil.beginOfDay(LocalDateTimeUtil.of(beginDate)); - times[1] = LocalDateTimeUtil.endOfDay(LocalDateTimeUtil.of(endDate)); - // 3.1 设置 mapper 时间区间 参数 - reqVO.setTimes(times); - // 3.2 设置 mapper sqlDateFormat 参数 - reqVO.setSqlDateFormat(getSqlDateFormat(times[0], times[1])); - } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 32a1d425e5..4e1cee0ea3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -5,31 +5,31 @@ @@ -38,13 +38,13 @@ SELECT owner_user_id, COUNT(1) AS customer_create_count - FROM crm_customer - WHERE deleted = 0 - AND owner_user_id in - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + FROM crm_customer + WHERE deleted = 0 + AND owner_user_id in + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -53,16 +53,16 @@ SELECT customer.owner_user_id, COUNT( DISTINCT customer.id ) AS customer_deal_count - FROM crm_customer AS customer - LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id - WHERE customer.deleted = 0 AND contract.deleted = 0 - AND contract.audit_status = 20 - AND customer.owner_user_id IN - - #{userId} - - AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - GROUP BY customer.owner_user_id + FROM crm_customer AS customer + LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id + WHERE customer.deleted = 0 AND contract.deleted = 0 + AND contract.audit_status = 20 + AND customer.owner_user_id IN + + #{userId} + + AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY customer.owner_user_id - SELECT - DATE_FORMAT( create_time, #{sqlDateFormat} ) AS time, - COUNT(*) AS followup_record_count - FROM crm_follow_up_record - WHERE creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} - GROUP BY time + DATE_FORMAT( create_time, '%Y-%m-%d' ) AS time, + COUNT(*) AS follow_up_record_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} + GROUP BY time - SELECT - DATE_FORMAT( create_time, #{sqlDateFormat} ) AS time, - COUNT(DISTINCT biz_id) AS followup_customer_count - FROM crm_follow_up_record - WHERE creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} - GROUP BY time + DATE_FORMAT( create_time, '%Y-%m-%d' ) AS time, + COUNT(DISTINCT biz_id) AS follow_up_customer_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} + GROUP BY time - SELECT creator as owner_user_id, - COUNT(*) AS followup_record_count - FROM crm_follow_up_record - WHERE creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} - GROUP BY creator + COUNT(*) AS follow_up_record_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} + GROUP BY creator - SELECT creator as owner_user_id, - COUNT(DISTINCT biz_id) AS followup_customer_count - FROM crm_follow_up_record - WHERE creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} - GROUP BY creator + COUNT(DISTINCT biz_id) AS follow_up_customer_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} + GROUP BY creator - SELECT - type AS followupType, - COUNT(*) AS followup_record_count - FROM crm_follow_up_record - WHERE creator IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} - GROUP BY followupType + type AS follow_up_type, + COUNT(*) AS follow_up_record_count + FROM crm_follow_up_record + WHERE creator IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND biz_type = ${@cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum@CRM_CUSTOMER.type} + GROUP BY follow_up_type -- Gitee From a8bec19196cd63b135734011b1de13d8b728b6a8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 11:00:15 +0800 Subject: [PATCH 0117/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=E3=80=90?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=BB=9F=E8=AE=A1=E3=80=91=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.java | 6 ++- .../CrmStatisticsCustomerMapper.java | 2 +- .../CrmStatisticsCustomerService.java | 6 ++- .../CrmStatisticsCustomerMapper.xml | 30 +++++------ .../statistics/CrmStatisticsRankMapper.xml | 54 +++++++++---------- 5 files changed, 51 insertions(+), 47 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 7d45ae217f..450a9cd99e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -61,8 +61,10 @@ public class CrmStatisticsCustomerController { return success(customerService.getFollowUpSummaryByType(reqVO)); } + // TODO @dhb52:【客户转化率】里,应该少了一个接口,给上面图标的; + @GetMapping("/get-contract-summary") - @Operation(summary = "获取合同摘要信息(客户转化率页面)") + @Operation(summary = "获取客户的首次合同、回款信息列表", description = "用于【客户转化率】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") public CommonResult> getContractSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { return success(customerService.getContractSummary(reqVO)); @@ -82,4 +84,6 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerDealCycleByUser(reqVO)); } + // TODO dhb52:【成交周期分析】里,有按照员工(已实现)、地区(未实现)、产品(未实现),需要在看看哈;可以把 CustomerDealCycle 拆成 3 个 tab,员工客户成交周期分析、地区客户成交周期分析、产品客户成交周期分析; + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 6b535d4c86..213a07d29a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -39,6 +39,6 @@ public interface CrmStatisticsCustomerMapper { List selectCustomerDealCycleGroupByDate(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); // TODO + List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 06873e4a18..55317f4aec 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -52,16 +52,18 @@ public interface CrmStatisticsCustomerService { List getFollowUpSummaryByType(CrmStatisticsCustomerReqVO reqVO); /** - * 获取合同摘要信息(客户转化率页面) + * 获取客户的首次合同、回款信息列表,用于【客户转化率】页面 * * @param reqVO 请求参数 - * @return 合同摘要列表 + * @return 客户的首次合同、回款信息列表 */ List getContractSummary(CrmStatisticsCustomerReqVO reqVO); /** * 客户成交周期(按日期) * + * 成交的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 + * * @param reqVO 请求参数 * @return 统计数据 */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 4e1cee0ea3..0672d629e1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -24,7 +24,7 @@ COUNT( DISTINCT customer_id ) AS customerDealCount FROM crm_contract WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id IN #{userId} @@ -56,7 +56,7 @@ FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id WHERE customer.deleted = 0 AND contract.deleted = 0 - AND contract.audit_status = 20 + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} @@ -72,7 +72,7 @@ IFNULL(SUM(total_price), 0) AS contract_price FROM crm_contract WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in #{userId} @@ -88,7 +88,7 @@ IFNULL(SUM(price), 0) AS receivable_price FROM crm_receivable WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id IN #{userId} @@ -175,28 +175,24 @@ + @@ -222,11 +219,12 @@ FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id WHERE customer.deleted = 0 AND contract.deleted = 0 - AND contract.audit_status = 20 + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} + AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY customer.owner_user_id diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml index c82c554120..ae84e1d474 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml @@ -7,11 +7,11 @@ SELECT IFNULL(SUM(total_price), 0) AS count, owner_user_id FROM crm_contract WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} and owner_user_id in - - #{userId} - + + #{userId} + AND order_date between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -22,11 +22,11 @@ SELECT IFNULL(SUM(price), 0) AS count, owner_user_id FROM crm_receivable WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in - - #{userId} - + + #{userId} + AND return_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -37,11 +37,11 @@ SELECT COUNT(1) AS count, owner_user_id FROM crm_contract WHERE deleted = 0 - AND audit_status = 20 + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in - - #{userId} - + + #{userId} + AND order_date between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -55,9 +55,9 @@ WHERE deleted = 0 AND audit_status = 20 AND owner_user_id in - - #{userId} - + + #{userId} + AND order_date between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -69,9 +69,9 @@ FROM crm_customer WHERE deleted = 0 AND owner_user_id in - - #{userId} - + + #{userId} + AND create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -83,9 +83,9 @@ FROM crm_contact WHERE deleted = 0 AND owner_user_id in - - #{userId} - + + #{userId} + AND create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -99,9 +99,9 @@ WHERE cfur.deleted = 0 AND cc.deleted = 0 AND cc.owner_user_id in - - #{userId} - + + #{userId} + AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY cc.owner_user_id @@ -115,9 +115,9 @@ WHERE cfur.deleted = 0 AND cc.deleted = 0 AND cc.owner_user_id in - - #{userId} - + + #{userId} + AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY cc.owner_user_id -- Gitee From 8266fb8f94f4679e37fdaf3444486aa6d14ca922 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 11:49:06 +0800 Subject: [PATCH 0118/1557] =?UTF-8?q?CRM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=90=E6=8E=92=E8=A1=8C=E7=89=88=E3=80=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/rank/CrmStatisticsRankRespVO.java | 9 +++-- .../statistics/CrmStatisticsRankMapper.xml | 38 ++++++++----------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java index 261aa893e8..feb2f3f2e1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/rank/CrmStatisticsRankRespVO.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.rank; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.math.BigDecimal; + @Schema(description = "管理后台 - CRM 排行榜统计 Response VO") @Data @@ -17,14 +19,15 @@ public class CrmStatisticsRankRespVO { @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String deptName; - // TODO @芋艿:需要改下,金额是 bigdecimal /** * 数量是个特别“抽象”的概念,在不同排行下,代表不同含义 - *

+ * * 1. 金额:合同金额排行、回款金额排行 * 2. 个数:签约合同排行、产品销量排行、产品销量排行、新增客户数排行、新增联系人排行、跟进次数排行、跟进客户数排行 + * + * 为什么使用 BigDecimal 的原因: */ @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer count; + private BigDecimal count; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml index ae84e1d474..abd63f27d2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml @@ -12,8 +12,7 @@ #{userId} - AND order_date between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND order_date between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -27,8 +26,7 @@ #{userId} - AND return_time between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND return_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -42,25 +40,23 @@ #{userId} - AND order_date between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND order_date between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id - @@ -86,8 +81,7 @@ #{userId} - AND create_time between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY owner_user_id @@ -102,8 +96,7 @@ #{userId} - AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY cc.owner_user_id @@ -118,8 +111,7 @@ #{userId} - AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and - #{times[1],javaType=java.time.LocalDateTime} + AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and #{times[1],javaType=java.time.LocalDateTime} GROUP BY cc.owner_user_id -- Gitee From 924580f4a29db98d7add392e516be8505d0ed61b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 13:51:46 +0800 Subject: [PATCH 0119/1557] =?UTF-8?q?CRM=EF=BC=9A=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E3=80=90=E5=AE=A2=E6=88=B7=E7=94=BB=E5=83=8F=E3=80=91=EF=BC=8C?= =?UTF-8?q?=E4=BB=8E=E3=80=90=E5=AE=A2=E6=88=B7=E7=BB=9F=E8=AE=A1=E3=80=91?= =?UTF-8?q?=E6=8B=86=E5=88=86=E5=87=BA=E5=8E=BB=E5=85=88~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.java | 32 ---- .../CrmStatisticsPortraitController.java | 61 +++++++ .../CrmStatisticsRankController.java | 1 - .../customer/CrmStatisticsCustomerReqVO.java | 8 - .../CrmStatisticCustomerAreaRespVO.java | 2 +- .../CrmStatisticCustomerIndustryRespVO.java | 2 +- .../CrmStatisticCustomerLevelRespVO.java | 2 +- .../CrmStatisticCustomerSourceRespVO.java | 2 +- .../CrmStatisticsCustomerMapper.java | 14 +- .../CrmStatisticsPortraitMapper.java | 28 +++ .../CrmStatisticsCustomerService.java | 36 ---- .../CrmStatisticsCustomerServiceImpl.java | 107 ----------- .../CrmStatisticsPortraitService.java | 50 ++++++ .../CrmStatisticsPortraitServiceImpl.java | 166 ++++++++++++++++++ .../CrmStatisticsCustomerMapper.xml | 85 --------- .../CrmStatisticsPortraitMapper.xml | 90 ++++++++++ 16 files changed, 400 insertions(+), 286 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{customer/analyze => portrait}/CrmStatisticCustomerAreaRespVO.java (98%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{customer/analyze => portrait}/CrmStatisticCustomerIndustryRespVO.java (98%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{customer/analyze => portrait}/CrmStatisticCustomerLevelRespVO.java (98%) rename yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/{customer/analyze => portrait}/CrmStatisticCustomerSourceRespVO.java (98%) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 413bae8f88..450a9cd99e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -2,10 +2,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -90,32 +86,4 @@ public class CrmStatisticsCustomerController { // TODO dhb52:【成交周期分析】里,有按照员工(已实现)、地区(未实现)、产品(未实现),需要在看看哈;可以把 CustomerDealCycle 拆成 3 个 tab,员工客户成交周期分析、地区客户成交周期分析、产品客户成交周期分析; - @GetMapping("/get-customer-industry-summary") - @Operation(summary = "获取客户行业统计数据") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerIndustry(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerIndustry(reqVO)); - } - - @GetMapping("/get-customer-source-summary") - @Operation(summary = "获取客户来源统计数据") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerSource(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerSource(reqVO)); - } - - @GetMapping("/get-customer-level-summary") - @Operation(summary = "获取客户级别统计数据") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerLevel(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerLevel(reqVO)); - } - - @GetMapping("/get-customer-area-summary") - @Operation(summary = "获取客户地区统计数据") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerArea(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerArea(reqVO)); - } - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java new file mode 100644 index 0000000000..90ef266880 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsPortraitService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - CRM 客户画像") +@RestController +@RequestMapping("/crm/statistics-portrait") +@Validated +public class CrmStatisticsPortraitController { + + @Resource + private CrmStatisticsPortraitService statisticsPortraitService; + + @GetMapping("/get-customer-area-summary") + @Operation(summary = "获取客户地区统计数据", description = "用于【城市分布分析】页面") + @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") + public CommonResult> getCustomerAreaSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerArea(reqVO)); + } + + @GetMapping("/get-customer-industry-summary") + @Operation(summary = "获取客户行业统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") + public CommonResult> getCustomerIndustry(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerIndustry(reqVO)); + } + + @GetMapping("/get-customer-level-summary") + @Operation(summary = "获取客户级别统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") + public CommonResult> getCustomerLevel(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerLevel(reqVO)); + } + + @GetMapping("/get-customer-source-summary") + @Operation(summary = "获取客户来源统计数据") + @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") + public CommonResult> getCustomerSource(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSource(reqVO)); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java index f3757ea28c..974963d33b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsRankController.java @@ -18,7 +18,6 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - @Tag(name = "管理后台 - CRM 排行榜统计") @RestController @RequestMapping("/crm/statistics-rank") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index 0564c2679e..5c887c6af3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -45,12 +45,4 @@ public class CrmStatisticsCustomerReqVO { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] times; - /** - * group by DATE_FORMAT(field, #{dateFormat}) - * 非前端传递, 由Service计算后传递给Mapper的参数 - */ - @Deprecated - @Schema(description = "Group By 日期格式", hidden = true, example = "%Y%m") - private String sqlDateFormat; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java similarity index 98% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java index 5f6924d58d..05220d47c6 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerAreaRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java similarity index 98% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java index 4811740923..8d368a3067 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerIndustryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java similarity index 98% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java index 74e06918c9..5d6e9793da 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerLevelRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java similarity index 98% rename from yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java rename to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java index 2edba39edb..60b938139e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/analyze/CrmStatisticCustomerSourceRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze; +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index f2e9dc9f34..b7f495b616 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -1,16 +1,12 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** - * CRM 数据统计 员工客户分析 Mapper + * CRM 数据统计 Mapper * * @author dhb52 */ @@ -45,12 +41,4 @@ public interface CrmStatisticsCustomerMapper { List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); - List selectCustomerIndustryListGroupbyIndustryId(CrmStatisticsCustomerReqVO reqVO); - - List selectCustomerSourceListGroupbySource(CrmStatisticsCustomerReqVO reqVO); - - List selectCustomerLevelListGroupbyLevel(CrmStatisticsCustomerReqVO reqVO); - - List selectSummaryListByAreaId(CrmStatisticsCustomerReqVO reqVO); - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java new file mode 100644 index 0000000000..25b7cb2d2b --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * CRM 数据画像 Mapper + * + * @author dhb52 + */ +@Mapper +public interface CrmStatisticsPortraitMapper { + + List selectCustomerIndustryListGroupbyIndustryId(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerSourceListGroupbySource(CrmStatisticsCustomerReqVO reqVO); + + List selectCustomerLevelListGroupbyLevel(CrmStatisticsCustomerReqVO reqVO); + + List selectSummaryListByAreaId(CrmStatisticsCustomerReqVO reqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index a69e1b9a07..55317f4aec 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -1,10 +1,6 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import java.util.List; @@ -81,36 +77,4 @@ public interface CrmStatisticsCustomerService { */ List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO); - /** - * 获取客户行业统计数据 - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO); - - /** - * 获取客户来源统计数据 - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerSource(CrmStatisticsCustomerReqVO reqVO); - - /** - * 获取客户级别统计数据 - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO); - - /** - * 获取客户地区统计数据 - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerArea(CrmStatisticsCustomerReqVO reqVO); - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index e20d3a9631..250560ef29 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -4,14 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.ip.core.Area; -import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; -import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.analyze.CrmStatisticCustomerSourceRespVO; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -30,8 +23,6 @@ import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; /** * CRM 客户分析 Service 实现类 @@ -245,104 +236,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return summaryList; } - @Override - public List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - // 2. 获取客户行业统计数据 - List industryRespVOList = customerMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); - if (CollUtil.isEmpty(industryRespVOList)) { - return Collections.emptyList(); - } - - return convertList(industryRespVOList, item -> { - if (ObjUtil.isNull(item.getIndustryId())) { - return item; - } - item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); - return item; - }); - } - - @Override - public List getCustomerSource(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - // 2. 获取客户行业统计数据 - List sourceRespVOList = customerMapper.selectCustomerSourceListGroupbySource(reqVO); - if (CollUtil.isEmpty(sourceRespVOList)) { - return Collections.emptyList(); - } - - return convertList(sourceRespVOList, item -> { - if (ObjUtil.isNull(item.getSource())) { - return item; - } - item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); - return item; - }); - } - - @Override - public List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - // 2. 获取客户行业统计数据 - List levelRespVOList = customerMapper.selectCustomerLevelListGroupbyLevel(reqVO); - if (CollUtil.isEmpty(levelRespVOList)) { - return Collections.emptyList(); - } - - return convertList(levelRespVOList, item -> { - if (ObjUtil.isNull(item.getLevel())) { - return item; - } - item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); - return item; - }); - } - - @Override - public List getCustomerArea(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - // 2. 获取客户地区统计数据 - List list = customerMapper.selectSummaryListByAreaId(reqVO); - if (CollUtil.isEmpty(list)) { - return Collections.emptyList(); - } - - // 拼接数据 - List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); - areaList.add(new Area().setId(null).setName("未知")); - Map areaMap = convertMap(areaList, Area::getId); - List customerAreaRespVOList = convertList(list, item -> { - Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); - if (parentId == null) { - return item; - } - findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); - return item; - }); - return customerAreaRespVOList; - } - /** * 拼接用户信息(昵称) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java new file mode 100644 index 0000000000..33afe0ecac --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; + +import java.util.List; + +/** + * CRM 客户画像 Service 接口 + * + * @author HUIHUI + */ +public interface CrmStatisticsPortraitService { + + /** + * 获取客户地区统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerArea(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户行业统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户级别统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO); + + /** + * 获取客户来源统计数据 + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerSource(CrmStatisticsCustomerReqVO reqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java new file mode 100644 index 0000000000..2e63d8786b --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -0,0 +1,166 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsPortraitMapper; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; +import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; +import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; + +/** + * CRM 客户画像 Service 实现类 + * + * @author HUIHUI + */ +@Service +public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitService { + + @Resource + private CrmStatisticsPortraitMapper portraitMapper; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + @Resource + private DictDataApi dictDataApi; + + @Override + public List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); + if (CollUtil.isEmpty(industryRespVOList)) { + return Collections.emptyList(); + } + + return convertList(industryRespVOList, item -> { + if (ObjUtil.isNull(item.getIndustryId())) { + return item; + } + item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); + return item; + }); + } + + @Override + public List getCustomerSource(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupbySource(reqVO); + if (CollUtil.isEmpty(sourceRespVOList)) { + return Collections.emptyList(); + } + + return convertList(sourceRespVOList, item -> { + if (ObjUtil.isNull(item.getSource())) { + return item; + } + item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); + return item; + }); + } + + @Override + public List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 + List levelRespVOList = portraitMapper.selectCustomerLevelListGroupbyLevel(reqVO); + if (CollUtil.isEmpty(levelRespVOList)) { + return Collections.emptyList(); + } + + return convertList(levelRespVOList, item -> { + if (ObjUtil.isNull(item.getLevel())) { + return item; + } + item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); + return item; + }); + } + + @Override + public List getCustomerArea(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + // 2. 获取客户地区统计数据 + List list = portraitMapper.selectSummaryListByAreaId(reqVO); + if (CollUtil.isEmpty(list)) { + return Collections.emptyList(); + } + + // 拼接数据 + List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); + areaList.add(new Area().setId(null).setName("未知")); + Map areaMap = convertMap(areaList, Area::getId); + List customerAreaRespVOList = convertList(list, item -> { + Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); + if (parentId == null) { + return item; + } + findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); + return item; + }); + return customerAreaRespVOList; + } + + /** + * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 + * + * @param reqVO 请求参数 + * @return 用户编号数组 + */ + private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { + // 情况一:选中某个用户 + if (ObjUtil.isNotNull(reqVO.getUserId())) { + return List.of(reqVO.getUserId()); + } + // 情况二:选中某个部门 + // 2.1 获得部门列表 + List deptIds = convertList(deptApi.getChildDeptList(reqVO.getDeptId()), DeptRespDTO::getId); + deptIds.add(reqVO.getDeptId()); + // 2.2 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index acf3545057..0672d629e1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -229,89 +229,4 @@ GROUP BY customer.owner_user_id - - - - - diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml new file mode 100644 index 0000000000..0364027c7b --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + -- Gitee From 3f5724e97803557d54a746ee26f4cc6cbf78e3d2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 14:17:28 +0800 Subject: [PATCH 0120/1557] =?UTF-8?q?CRM=EF=BC=9Acode=20review=E3=80=90?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=94=BB=E5=83=8F=E3=80=91=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPortraitController.java | 22 +++--- .../CrmStatisticCustomerAreaRespVO.java | 2 + .../CrmStatisticCustomerIndustryRespVO.java | 3 + .../CrmStatisticCustomerLevelRespVO.java | 5 +- .../CrmStatisticCustomerSourceRespVO.java | 5 +- .../CrmStatisticsPortraitMapper.java | 4 +- .../CrmStatisticsPortraitService.java | 8 +-- .../CrmStatisticsPortraitServiceImpl.java | 67 ++++++++++--------- .../CrmStatisticsPortraitMapper.xml | 2 + 9 files changed, 69 insertions(+), 49 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java index 90ef266880..0f1e9e6355 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java @@ -30,32 +30,34 @@ public class CrmStatisticsPortraitController { @Resource private CrmStatisticsPortraitService statisticsPortraitService; + // TODO @puhui999:搞个属于自己的 CrmStatisticsCustomerReqVO 类哈 + @GetMapping("/get-customer-area-summary") @Operation(summary = "获取客户地区统计数据", description = "用于【城市分布分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") public CommonResult> getCustomerAreaSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerArea(reqVO)); + return success(statisticsPortraitService.getCustomerAreaSummary(reqVO)); } @GetMapping("/get-customer-industry-summary") - @Operation(summary = "获取客户行业统计数据") + @Operation(summary = "获取客户行业统计数据", description = "用于【客户行业分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerIndustry(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerIndustry(reqVO)); + public CommonResult> getCustomerIndustrySummary(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerIndustrySummary(reqVO)); } @GetMapping("/get-customer-level-summary") - @Operation(summary = "获取客户级别统计数据") + @Operation(summary = "获取客户级别统计数据", description = "用于【客户级别分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerLevel(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerLevel(reqVO)); + public CommonResult> getCustomerLevelSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerLevelSummary(reqVO)); } @GetMapping("/get-customer-source-summary") - @Operation(summary = "获取客户来源统计数据") + @Operation(summary = "获取客户来源统计数据", description = "用于【客户来源分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerSource(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerSource(reqVO)); + public CommonResult> getCustomerSourceSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSourceSummary(reqVO)); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java index 05220d47c6..e83563d5b1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java @@ -18,6 +18,8 @@ public class CrmStatisticCustomerAreaRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; + // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 + @Schema(description = "省份占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Double areaPortion; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java index 8d368a3067..4029a42b03 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java @@ -9,6 +9,7 @@ public class CrmStatisticCustomerIndustryRespVO { @Schema(description = "客户行业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer industryId; + // TODO @puhui999:这个前端字典翻译哈 @Schema(description = "客户行业名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private String industryName; @@ -18,6 +19,8 @@ public class CrmStatisticCustomerIndustryRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; + // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 + @Schema(description = "行业占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Double industryPortion; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java index 5d6e9793da..c438ee21e1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java @@ -7,8 +7,9 @@ import lombok.Data; @Data public class CrmStatisticCustomerLevelRespVO { - @Schema(description = "客户级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @Schema(description = "客户级别编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer level; + // TODO @puhui999:这个前端字典翻译哈 @Schema(description = "客户级别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private String levelName; @@ -18,6 +19,8 @@ public class CrmStatisticCustomerLevelRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; + // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 + @Schema(description = "级别占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Double levelPortion; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java index 60b938139e..e66a5c634f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java @@ -7,8 +7,9 @@ import lombok.Data; @Data public class CrmStatisticCustomerSourceRespVO { - @Schema(description = "客户来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @Schema(description = "客户来源编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer source; + // TODO @puhui999:这个前端字典翻译哈 @Schema(description = "客户来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private String sourceName; @@ -18,6 +19,8 @@ public class CrmStatisticCustomerSourceRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; + // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 + @Schema(description = "来源占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Double sourcePortion; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java index 25b7cb2d2b..193cc93072 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java @@ -12,11 +12,13 @@ import java.util.List; /** * CRM 数据画像 Mapper * - * @author dhb52 + * @author HUIHUI */ @Mapper public interface CrmStatisticsPortraitMapper { + // TODO @puuhui999:GroupBy + List selectCustomerIndustryListGroupbyIndustryId(CrmStatisticsCustomerReqVO reqVO); List selectCustomerSourceListGroupbySource(CrmStatisticsCustomerReqVO reqVO); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java index 33afe0ecac..dd1f3e3daf 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java @@ -21,7 +21,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerArea(CrmStatisticsCustomerReqVO reqVO); + List getCustomerAreaSummary(CrmStatisticsCustomerReqVO reqVO); /** * 获取客户行业统计数据 @@ -29,7 +29,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO); + List getCustomerIndustrySummary(CrmStatisticsCustomerReqVO reqVO); /** * 获取客户级别统计数据 @@ -37,7 +37,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO); + List getCustomerLevelSummary(CrmStatisticsCustomerReqVO reqVO); /** * 获取客户来源统计数据 @@ -45,6 +45,6 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerSource(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSourceSummary(CrmStatisticsCustomerReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index 2e63d8786b..e38a702bcb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -28,6 +28,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; +// TODO @puhui999:参考 CrmStatisticsCustomerServiceImpl 代码风格,优化下这个类哈;包括命名、空行、注释等; /** * CRM 客户画像 Service 实现类 * @@ -47,30 +48,37 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe private DictDataApi dictDataApi; @Override - public List getCustomerIndustry(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerAreaSummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); - // 2. 获取客户行业统计数据 - List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); - if (CollUtil.isEmpty(industryRespVOList)) { + // 2. 获取客户地区统计数据 + List list = portraitMapper.selectSummaryListByAreaId(reqVO); + if (CollUtil.isEmpty(list)) { return Collections.emptyList(); } - return convertList(industryRespVOList, item -> { - if (ObjUtil.isNull(item.getIndustryId())) { + // 拼接数据 + List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); + areaList.add(new Area().setId(null).setName("未知")); + Map areaMap = convertMap(areaList, Area::getId); + List customerAreaRespVOList = convertList(list, item -> { + Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); + // TODO @puhui999:找不到,可以归到未知哈; + if (parentId == null) { return item; } - item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); + findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); return item; }); + return customerAreaRespVOList; } @Override - public List getCustomerSource(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerIndustrySummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { @@ -78,70 +86,65 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe } reqVO.setUserIds(userIds); // 2. 获取客户行业统计数据 - List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupbySource(reqVO); - if (CollUtil.isEmpty(sourceRespVOList)) { + List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); + if (CollUtil.isEmpty(industryRespVOList)) { return Collections.emptyList(); } - return convertList(sourceRespVOList, item -> { - if (ObjUtil.isNull(item.getSource())) { + return convertList(industryRespVOList, item -> { + if (ObjUtil.isNull(item.getIndustryId())) { return item; } - item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); + item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); return item; }); } @Override - public List getCustomerLevel(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerSourceSummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 - List levelRespVOList = portraitMapper.selectCustomerLevelListGroupbyLevel(reqVO); - if (CollUtil.isEmpty(levelRespVOList)) { + List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupbySource(reqVO); + if (CollUtil.isEmpty(sourceRespVOList)) { return Collections.emptyList(); } - return convertList(levelRespVOList, item -> { - if (ObjUtil.isNull(item.getLevel())) { + return convertList(sourceRespVOList, item -> { + if (ObjUtil.isNull(item.getSource())) { return item; } - item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); + item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); return item; }); } @Override - public List getCustomerArea(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerLevelSummary(CrmStatisticsCustomerReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); - // 2. 获取客户地区统计数据 - List list = portraitMapper.selectSummaryListByAreaId(reqVO); - if (CollUtil.isEmpty(list)) { + // 2. 获取客户行业统计数据 + List levelRespVOList = portraitMapper.selectCustomerLevelListGroupbyLevel(reqVO); + if (CollUtil.isEmpty(levelRespVOList)) { return Collections.emptyList(); } - // 拼接数据 - List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); - areaList.add(new Area().setId(null).setName("未知")); - Map areaMap = convertMap(areaList, Area::getId); - List customerAreaRespVOList = convertList(list, item -> { - Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); - if (parentId == null) { + return convertList(levelRespVOList, item -> { + if (ObjUtil.isNull(item.getLevel())) { return item; } - findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); + item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); return item; }); - return customerAreaRespVOList; } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml index 0364027c7b..946bd292b8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml @@ -2,6 +2,8 @@ + + - SELECT - DATE_FORMAT(create_time, '%Y-%m-%d') AS time, - COUNT(*) AS customerCreateCount - FROM crm_customer - WHERE deleted = 0 - AND owner_user_id IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - GROUP BY time + SELECT DATE_FORMAT(create_time, '%Y-%m-%d') AS time, + COUNT(*) AS customerCreateCount + FROM crm_customer + WHERE deleted = 0 + AND owner_user_id IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY time -- Gitee From a9a8efc808cb037692c253147833c24badcea50b Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 3 Apr 2024 10:09:46 +0800 Subject: [PATCH 0148/1557] =?UTF-8?q?CRM:=20=E5=AE=8C=E5=96=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=94=BB=E5=83=8F=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPortraitController.java | 20 ++-- .../CrmStatisticCustomerAreaRespVO.java | 8 -- .../CrmStatisticCustomerIndustryRespVO.java | 11 -- .../CrmStatisticCustomerLevelRespVO.java | 11 -- .../CrmStatisticCustomerSourceRespVO.java | 11 -- .../portrait/CrmStatisticsPortraitReqVO.java | 42 ++++++++ .../CrmStatisticsPortraitMapper.java | 16 +-- .../CrmStatisticsPortraitService.java | 14 +-- .../CrmStatisticsPortraitServiceImpl.java | 74 ++++--------- .../CrmStatisticsPortraitMapper.xml | 101 ++++++------------ 10 files changed, 118 insertions(+), 190 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java index 0f1e9e6355..986e2268c4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticsPortraitReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; @@ -30,34 +30,32 @@ public class CrmStatisticsPortraitController { @Resource private CrmStatisticsPortraitService statisticsPortraitService; - // TODO @puhui999:搞个属于自己的 CrmStatisticsCustomerReqVO 类哈 - @GetMapping("/get-customer-area-summary") @Operation(summary = "获取客户地区统计数据", description = "用于【城市分布分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerAreaSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerAreaSummary(reqVO)); + public CommonResult> getCustomerAreaSummary(@Valid CrmStatisticsPortraitReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSummaryByArea(reqVO)); } @GetMapping("/get-customer-industry-summary") @Operation(summary = "获取客户行业统计数据", description = "用于【客户行业分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerIndustrySummary(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerIndustrySummary(reqVO)); + public CommonResult> getCustomerIndustrySummary(@Valid CrmStatisticsPortraitReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSummaryByIndustry(reqVO)); } @GetMapping("/get-customer-level-summary") @Operation(summary = "获取客户级别统计数据", description = "用于【客户级别分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerLevelSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerLevelSummary(reqVO)); + public CommonResult> getCustomerLevelSummary(@Valid CrmStatisticsPortraitReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSummaryByLevel(reqVO)); } @GetMapping("/get-customer-source-summary") @Operation(summary = "获取客户来源统计数据", description = "用于【客户来源分析】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-portrait:query')") - public CommonResult> getCustomerSourceSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(statisticsPortraitService.getCustomerSourceSummary(reqVO)); + public CommonResult> getCustomerSourceSummary(@Valid CrmStatisticsPortraitReqVO reqVO) { + return success(statisticsPortraitService.getCustomerSummaryBySource(reqVO)); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java index e83563d5b1..3420e7e5b6 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerAreaRespVO.java @@ -18,12 +18,4 @@ public class CrmStatisticCustomerAreaRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; - // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 - - @Schema(description = "省份占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double areaPortion; - - @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double dealPortion; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java index 4029a42b03..84b8de70f3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerIndustryRespVO.java @@ -9,9 +9,6 @@ public class CrmStatisticCustomerIndustryRespVO { @Schema(description = "客户行业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer industryId; - // TODO @puhui999:这个前端字典翻译哈 - @Schema(description = "客户行业名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private String industryName; @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer customerCount; @@ -19,12 +16,4 @@ public class CrmStatisticCustomerIndustryRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; - // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 - - @Schema(description = "行业占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double industryPortion; - - @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double dealPortion; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java index c438ee21e1..dea4eeb0c8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerLevelRespVO.java @@ -9,9 +9,6 @@ public class CrmStatisticCustomerLevelRespVO { @Schema(description = "客户级别编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer level; - // TODO @puhui999:这个前端字典翻译哈 - @Schema(description = "客户级别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private String levelName; @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer customerCount; @@ -19,12 +16,4 @@ public class CrmStatisticCustomerLevelRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; - // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 - - @Schema(description = "级别占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double levelPortion; - - @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double dealPortion; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java index e66a5c634f..61b9688ff4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticCustomerSourceRespVO.java @@ -9,9 +9,6 @@ public class CrmStatisticCustomerSourceRespVO { @Schema(description = "客户来源编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") private Integer source; - // TODO @puhui999:这个前端字典翻译哈 - @Schema(description = "客户来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") - private String sourceName; @Schema(description = "客户个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer customerCount; @@ -19,12 +16,4 @@ public class CrmStatisticCustomerSourceRespVO { @Schema(description = "成交个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer dealCount; - // TODO @puhui999:下面两个的计算,交给前端。后端只返回数据即可。 - - @Schema(description = "来源占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double sourcePortion; - - @Schema(description = "成交占比(%)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Double dealPortion; - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java new file mode 100644 index 0000000000..c284e7457f --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - CRM 客户画像 Request VO") +@Data +public class CrmStatisticsPortraitReqVO { + + @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "部门 id 不能为空") + private Long deptId; + + /** + * 负责人用户 id, 当用户为空, 则计算部门下用户 + */ + @Schema(description = "负责人用户 id", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + private Long userId; + + /** + * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 + * 后续,可能会支持选择部分用户进行查询 + */ + @Schema(description = "负责人用户 id 集合", hidden = true, example = "2") + private List userIds; + + /** + * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 + * 并作为参数传递给Mapper + */ + @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] times; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java index 193cc93072..a7c942752b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsPortraitMapper.java @@ -1,10 +1,6 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.*; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -17,14 +13,12 @@ import java.util.List; @Mapper public interface CrmStatisticsPortraitMapper { - // TODO @puuhui999:GroupBy + List selectSummaryListGroupByAreaId(CrmStatisticsPortraitReqVO reqVO); - List selectCustomerIndustryListGroupbyIndustryId(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerIndustryListGroupByIndustryId(CrmStatisticsPortraitReqVO reqVO); - List selectCustomerSourceListGroupbySource(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerSourceListGroupBySource(CrmStatisticsPortraitReqVO reqVO); - List selectCustomerLevelListGroupbyLevel(CrmStatisticsCustomerReqVO reqVO); - - List selectSummaryListByAreaId(CrmStatisticsCustomerReqVO reqVO); + List selectCustomerLevelListGroupByLevel(CrmStatisticsPortraitReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java index dd1f3e3daf..c568d3b4ec 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitService.java @@ -1,10 +1,6 @@ package cn.iocoder.yudao.module.crm.service.statistics; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.*; import java.util.List; @@ -21,7 +17,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerAreaSummary(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryByArea(CrmStatisticsPortraitReqVO reqVO); /** * 获取客户行业统计数据 @@ -29,7 +25,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerIndustrySummary(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryByIndustry(CrmStatisticsPortraitReqVO reqVO); /** * 获取客户级别统计数据 @@ -37,7 +33,7 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerLevelSummary(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryByLevel(CrmStatisticsPortraitReqVO reqVO); /** * 获取客户来源统计数据 @@ -45,6 +41,6 @@ public interface CrmStatisticsPortraitService { * @param reqVO 请求参数 * @return 统计数据 */ - List getCustomerSourceSummary(CrmStatisticsCustomerReqVO reqVO); + List getCustomerSummaryBySource(CrmStatisticsPortraitReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index e38a702bcb..9863f62fcf 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -5,15 +5,10 @@ import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerReqVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsPortraitMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; @@ -26,9 +21,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; -// TODO @puhui999:参考 CrmStatisticsCustomerServiceImpl 代码风格,优化下这个类哈;包括命名、空行、注释等; /** * CRM 客户画像 Service 实现类 * @@ -44,64 +37,54 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe private AdminUserApi adminUserApi; @Resource private DeptApi deptApi; - @Resource - private DictDataApi dictDataApi; @Override - public List getCustomerAreaSummary(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 + public List getCustomerSummaryByArea(CrmStatisticsPortraitReqVO reqVO) { + // 1.1 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); - // 2. 获取客户地区统计数据 - List list = portraitMapper.selectSummaryListByAreaId(reqVO); + // 1.2 获取客户地区统计数据 + List list = portraitMapper.selectSummaryListGroupByAreaId(reqVO); if (CollUtil.isEmpty(list)) { return Collections.emptyList(); } - // 拼接数据 + // 2. 拼接数据 List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); areaList.add(new Area().setId(null).setName("未知")); Map areaMap = convertMap(areaList, Area::getId); - List customerAreaRespVOList = convertList(list, item -> { + return convertList(list, item -> { Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); - // TODO @puhui999:找不到,可以归到未知哈; - if (parentId == null) { - return item; + if (parentId == null) { // 找不到,归到未知 + return item.setAreaId(null).setAreaName("未知"); } findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); return item; }); - return customerAreaRespVOList; } @Override - public List getCustomerIndustrySummary(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerSummaryByIndustry(CrmStatisticsPortraitReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); + // 2. 获取客户行业统计数据 - List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupbyIndustryId(reqVO); + List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupByIndustryId(reqVO); if (CollUtil.isEmpty(industryRespVOList)) { return Collections.emptyList(); } - - return convertList(industryRespVOList, item -> { - if (ObjUtil.isNull(item.getIndustryId())) { - return item; - } - item.setIndustryName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_INDUSTRY, item.getIndustryId())); - return item; - }); + return industryRespVOList; } @Override - public List getCustomerSourceSummary(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerSummaryBySource(CrmStatisticsPortraitReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { @@ -110,41 +93,28 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe reqVO.setUserIds(userIds); // 2. 获取客户行业统计数据 - List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupbySource(reqVO); + List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupBySource(reqVO); if (CollUtil.isEmpty(sourceRespVOList)) { return Collections.emptyList(); } - - return convertList(sourceRespVOList, item -> { - if (ObjUtil.isNull(item.getSource())) { - return item; - } - item.setSourceName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_SOURCE, item.getSource())); - return item; - }); + return sourceRespVOList; } @Override - public List getCustomerLevelSummary(CrmStatisticsCustomerReqVO reqVO) { + public List getCustomerSummaryByLevel(CrmStatisticsPortraitReqVO reqVO) { // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); - // 2. 获取客户行业统计数据 - List levelRespVOList = portraitMapper.selectCustomerLevelListGroupbyLevel(reqVO); + + // 2. 获取客户级别统计数据 + List levelRespVOList = portraitMapper.selectCustomerLevelListGroupByLevel(reqVO); if (CollUtil.isEmpty(levelRespVOList)) { return Collections.emptyList(); } - - return convertList(levelRespVOList, item -> { - if (ObjUtil.isNull(item.getLevel())) { - return item; - } - item.setLevelName(dictDataApi.getDictDataLabel(CRM_CUSTOMER_LEVEL, item.getLevel())); - return item; - }); + return levelRespVOList; } /** @@ -153,7 +123,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe * @param reqVO 请求参数 * @return 用户编号数组 */ - private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { + private List getUserIds(CrmStatisticsPortraitReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { return List.of(reqVO.getUserId()); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml index 946bd292b8..42056a48b5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPortraitMapper.xml @@ -2,91 +2,60 @@ - - - + SELECT area_id, COUNT(*) AS customerCount, SUM(deal_status) AS dealCount + FROM crm_customer + WHERE deleted = 0 AND area_id IS NOT NULL AND owner_user_id IN #{userId} - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY - industry_id; + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} + AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY area_id - + SELECT industry_id, COUNT(*) AS customerCount, SUM(deal_status) AS dealCount + FROM crm_customer + WHERE deleted = 0 AND industry_id IS NOT NULL AND owner_user_id IN #{userId} - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY - source; + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} + AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY industry_id - + SELECT source, COUNT(*) AS customerCount, SUM(deal_status) AS dealCount + FROM crm_customer + WHERE deleted = 0 AND source IS NOT NULL AND owner_user_id IN #{userId} - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY - level; + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} + AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY source - + SELECT level, COUNT(*) AS customerCount, SUM(deal_status) AS dealCount + FROM crm_customer + WHERE deleted = 0 AND level IS NOT NULL AND owner_user_id IN #{userId} - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} - GROUP BY - area_id; + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} + AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY level -- Gitee From 84825579b6f5a15231d2bbb884cda61c020d1c6c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 3 Apr 2024 16:54:49 +0800 Subject: [PATCH 0149/1557] =?UTF-8?q?=F0=9F=98=84=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E5=8F=91=E9=80=81=E3=80=81=E6=8E=A5=E6=94=B6discard=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=88=90=E5=8A=9F=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/Midjourney/MjHttpExecute.java | 24 -- .../ai/midjourney/DiscordJadMain.java | 10 + .../ai/midjourney/DiscordWebSocketClient.java | 141 ++++++++++ .../MidjourneyApi.java | 4 +- .../MjCommandEnum.java | 2 +- .../{Midjourney => midjourney}/MjExecute.java | 2 +- .../ai/midjourney/MjHttpExecute.java | 52 ++++ .../interactions_type2.json | 6 +- .../interactions_type3.json | 0 .../ai/midjourney/jad/Constants.java | 22 ++ .../ai/midjourney/jad/DiscordAccount.java | 35 +++ .../ai/midjourney/jad/DomainObject.java | 70 +++++ .../ai/midjourney/wss/AsyncLockUtils.java | 61 +++++ .../ai/midjourney/wss/DiscordHelper.java | 57 +++++ .../framework/ai/midjourney/wss/Main.java | 39 +++ .../ai/midjourney/wss/MessageType.java | 26 ++ .../ai/midjourney/wss/ReturnCode.java | 42 +++ .../ai/midjourney/wss/WebSocketStarter.java | 8 + .../midjourney/wss/user/FailureCallback.java | 6 + .../wss/user/SpringUserWebSocketStarter.java | 189 ++++++++++++++ .../wss/user/SpringWebSocketHandler.java | 240 ++++++++++++++++++ .../midjourney/wss/user/SuccessCallback.java | 7 + .../wss/user/UserMessageListener.java | 28 ++ 23 files changed, 1041 insertions(+), 30 deletions(-) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjHttpExecute.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{Midjourney => midjourney}/MidjourneyApi.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{Midjourney => midjourney}/MjCommandEnum.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{Midjourney => midjourney}/MjExecute.java (81%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{Midjourney => midjourney}/interactions_type2.json (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{Midjourney => midjourney}/interactions_type3.json (100%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjHttpExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjHttpExecute.java deleted file mode 100644 index 2fc61bda79..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjHttpExecute.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.framework.ai.Midjourney; - -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.web.client.RestTemplate; - -public class MjHttpExecute implements MjExecute { - - private static final String URL = "https://discord.com/"; - - private RestTemplate restTemplate = new RestTemplate(); - - - @Override - public boolean execute(MjCommandEnum mjCommand, String prompt) { - // 发送的 uri - String uri = "api/v9/interactions"; - // restTemplate 发送post请求 - String result = restTemplate.postForObject(URL + uri, prompt, String.class); - // 加载当前目录下文件 - - return false; - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java new file mode 100644 index 0000000000..5da1b667c5 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.framework.ai.midjourney; + +/** + * author: fansili + * time: 2024/4/3 15:54 + */ +public class DiscordJadMain { + + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java new file mode 100644 index 0000000000..6b77be8842 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java @@ -0,0 +1,141 @@ +package cn.iocoder.yudao.framework.ai.midjourney; +import cn.hutool.http.useragent.UserAgent; +import cn.hutool.http.useragent.UserAgentUtil; +import cn.hutool.json.JSONObject; +import com.alibaba.fastjson.JSON; +import org.springframework.web.socket.*; +import org.springframework.web.socket.client.standard.StandardWebSocketClient; +import org.springframework.web.socket.handler.TextWebSocketHandler; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; + +/** + * https://blog.csdn.net/qq_38490457/article/details/125250135 + */ +public class DiscordWebSocketClient { + + private static final String DISCORD_GATEWAY_URL = "wss://gateway.discord.gg/?v=9&encoding=json"; + + public static void main(String[] args) throws InterruptedException, ExecutionException, IOException, URISyntaxException { + StandardWebSocketClient client = new StandardWebSocketClient(); + DiscordWebSocketHandler handler = new DiscordWebSocketHandler(); + + + WebSocketHttpHeaders headers = new WebSocketHttpHeaders(); + headers.add("Accept-Encoding", "gzip, deflate, br"); + headers.add("Accept-Language", "zh-CN,zh;q=0.9"); + headers.add("Cache-Control", "no-cache"); + headers.add("Pragma", "no-cache"); + headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); + headers.add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"); + + Future futureSession = client.doHandshake(handler, headers, new URI(DISCORD_GATEWAY_URL)); + WebSocketSession session = futureSession.get(); // 这会阻塞直到连接建立 + + // 登录过程(你需要替换 TOKEN 为你的 Discord Bot Token) +// String token = "YOUR_DISCORD_BOT_TOKEN"; // 请替换为你的 Bot Token +// String identifyPayload = "{\"op\":2,\"d\":{\"token\":\"" + token + "\",\"properties\":{\"$os\":\"java\",\"$browser\":\"spring-websocket\",\"$device\":\"spring-websocket\"},\"compress\":false,\"large_threshold\":256,\"shard\":[0,1]}}"; +// session.sendMessage(new TextMessage(identifyPayload)); + + // 发送心跳以保持连接活跃 + Thread heartbeatThread = new Thread(() -> { + int interval = 0; // 初始心跳间隔,后续从 Discord 服务器获取 + while (!Thread.currentThread().isInterrupted()) { + try { + Thread.sleep(interval * 1000); // 等待指定的心跳间隔 + session.sendMessage(new TextMessage("{\"op\":1,\"d\":null}")); // 发送心跳包 + } catch (Exception e) { + e.printStackTrace(); + break; + } + } + }); + heartbeatThread.start(); + + // 等待用户输入来保持程序运行(仅用于示例) + System.in.read(); + + // 关闭连接和线程 + session.close(); + heartbeatThread.interrupt(); + } + + private static class DiscordWebSocketHandler implements WebSocketHandler { + + @Override + public void afterConnectionEstablished(WebSocketSession session) throws Exception { + + } + + @Override + public void handleMessage(WebSocketSession session, WebSocketMessage message) throws Exception { + Object payload = message.getPayload(); + + session.sendMessage(new TextMessage(JSON.toJSONString(createAuthData()))); + String a= ""; + } + + @Override + public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception { + + } + + @Override + public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception { + + } + + @Override + public boolean supportsPartialMessages() { + return false; + } + + + private JSONObject createAuthData() { + String userAgentStr = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"; + UserAgent userAgent = UserAgentUtil.parse(userAgentStr); + String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; + + JSONObject connectionProperties = new JSONObject() + .put("browser", userAgent.getBrowser().getName()) + .put("browser_user_agent", userAgentStr) + .put("browser_version", userAgent.getVersion()) + .put("client_build_number", 222963) + .put("client_event_source", null) + .put("device", "") + .put("os", userAgent.getOs().getName()) + .put("referer", "https://www.midjourney.com") + .put("referrer_current", "") + .put("referring_domain", "www.midjourney.com") + .put("referring_domain_current", "") + .put("release_channel", "stable") + .put("system_locale", "zh-CN"); + JSONObject presence = new JSONObject() + .put("activities", "") + .put("afk", false) + .put("since", 0) + .put("status", "online"); + JSONObject clientState = new JSONObject() + .put("api_code_version", 0) + .put("guild_versions", "") + .put("highest_last_message_id", "0") + .put("private_channels_version", "0") + .put("read_state_version", 0) + .put("user_guild_settings_version", -1) + .put("user_settings_version", -1); + return new JSONObject() + .put("capabilities", 16381) + .put("client_state", clientState) + .put("compress", false) + .put("presence", presence) + .put("properties", connectionProperties) + .put("token", token); + } + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MidjourneyApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MidjourneyApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java index bf1c89aa4d..9aa5edfac3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MidjourneyApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java @@ -1,10 +1,12 @@ -package cn.iocoder.yudao.framework.ai.Midjourney; +package cn.iocoder.yudao.framework.ai.midjourney; /** * 文档: https://www.xiubbs.com/t-401-1-1.html * * https://github.com/novicezk/midjourney-proxy/blob/main/README_CN.md * + * discord4j、https://github.com/discord-jda/JDA + * */ public class MidjourneyApi { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjCommandEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjCommandEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java index 9ae0518226..7344f424c5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjCommandEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.Midjourney; +package cn.iocoder.yudao.framework.ai.midjourney; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java similarity index 81% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjExecute.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java index 60eff553e3..5945c92129 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/MjExecute.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.Midjourney; +package cn.iocoder.yudao.framework.ai.midjourney; /** * mj 命令 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java new file mode 100644 index 0000000000..5b5794ae67 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.framework.ai.midjourney; + +import cn.hutool.core.io.FileUtil; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.client.RestTemplate; + +import java.nio.charset.Charset; + +public class MjHttpExecute implements MjExecute { + + private static final String URL = "https://discord.com/"; + + @Override + public boolean execute(MjCommandEnum mjCommand, String prompt) { + // 发送的 uri + String uri = "api/v9/interactions"; + // restTemplate 发送post请求 +// String result = restTemplate.postForObject(URL + uri, prompt, String.class); + // 加载当前目录下文件 + return false; + } + + public static void main(String[] args) { + RestTemplate restTemplate = new RestTemplate(); + + String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; + String body = FileUtil.readString("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai" + + "/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney" + + "/interactions_type2.json", Charset.forName("utf-8")); + // 创建HTTP头部 + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); // 设置内容类型为JSON + headers.set("Authorization", token); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("Referer", "https://discord.com/channels/1221445697157468200/1221445862962630706"); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("Cookie", "__dcfduid=6ca536c0e3fa11eeb7cbe34c31b49caf; __sdcfduid=6ca536c1e3fa11eeb7cbe34c31b49caf52cce5ffd8983d2a052cf6aba75fe5fe566f2c265902e283ce30dbf98b8c9c93; _gcl_au=1.1.245923998.1710853617; _ga=GA1.1.111061823.1710853617; __cfruid=6385bb3f48345a006b25992db7dcf984e395736d-1712124666; _cfuvid=O09la5ms0ypNptiG0iD8A6BKWlTxz1LG0WR7qRStD7o-1712124666575-0.0.1.1-604800000; locale=zh-CN; cf_clearance=l_YGod1_SUtYxpDVeZXiX7DLLPl1DYrquZe8WVltvYs-1712124668-1.0.1.1-Hl2.fToel23EpF2HCu9J20rB4D7OhhCzoajPSdo.9Up.wPxhvq22DP9RHzEBKuIUlKyH.kJLxXJfAt2N.LD5WQ; OptanonConsent=isIABGlobal=false&datestamp=Wed+Apr+03+2024+14%3A11%3A15+GMT%2B0800+(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)&version=6.33.0&hosts=&landingPath=https%3A%2F%2Fdiscord.com%2F&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1; _ga_Q149DFWHT7=GS1.1.1712124668.4.1.1712124679.0.0.0"); // 如果需要,设置认证信息(例如JWT令牌) + // 封装请求体和头部信息 + HttpEntity requestEntity = new HttpEntity<>(body, headers); + + // 定义请求URL和返回类型 + String uri = "api/v9/interactions"; + String res = restTemplate.postForObject(URL + uri, requestEntity, String.class); + System.err.println("11"); + + // +// MjHttpExecute mjHttpExecute = new MjHttpExecute(); +// mjHttpExecute.execute(null, "童话世界应该是什么样?"); + + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/interactions_type2.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type2.json similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/interactions_type2.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type2.json index da4858dd1d..b8a2afef38 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/interactions_type2.json +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type2.json @@ -1,8 +1,8 @@ { "type": 2, "application_id": "936929561302675456", - "guild_id": "1224337694918971392", - "channel_id": "1224337694918971396", + "guild_id": "1221445697157468200", + "channel_id": "1221445862962630706", "session_id": "696318caed5180a2210e358e44801449", "data": { "version": "1166847114203123795", @@ -13,7 +13,7 @@ { "type": 3, "name": "prompt", - "value": "中国的是什么样子" + "value": "童话世界应该是什么样?" } ], "application_command": { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/interactions_type3.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type3.json similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/Midjourney/interactions_type3.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type3.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java new file mode 100644 index 0000000000..7b42bbbe35 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.framework.ai.midjourney.jad; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public final class Constants { + // 任务扩展属性 start + public static final String TASK_PROPERTY_NOTIFY_HOOK = "notifyHook"; + public static final String TASK_PROPERTY_FINAL_PROMPT = "finalPrompt"; + public static final String TASK_PROPERTY_MESSAGE_ID = "messageId"; + public static final String TASK_PROPERTY_MESSAGE_HASH = "messageHash"; + public static final String TASK_PROPERTY_PROGRESS_MESSAGE_ID = "progressMessageId"; + public static final String TASK_PROPERTY_FLAGS = "flags"; + public static final String TASK_PROPERTY_NONCE = "nonce"; + public static final String TASK_PROPERTY_DISCORD_INSTANCE_ID = "discordInstanceId"; + // 任务扩展属性 end + + public static final String API_SECRET_HEADER_NAME = "mj-api-secret"; + public static final String DEFAULT_DISCORD_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"; + + public static final String MJ_MESSAGE_HANDLED = "mj_proxy_handled"; +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java new file mode 100644 index 0000000000..a67752687e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.framework.ai.midjourney.jad; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) + +public class DiscordAccount extends DomainObject { + + + private String guildId; + + private String channelId; + + private String userToken; + + private String userAgent = Constants.DEFAULT_DISCORD_USER_AGENT; + + + private boolean enable = true; + + + private int coreSize = 3; + + private int queueSize = 10; + + private int timeoutMinutes = 5; + + @JsonIgnore + public String getDisplay() { + return this.channelId; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java new file mode 100644 index 0000000000..3fae0b346e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.framework.ai.midjourney.jad; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + + +public class DomainObject implements Serializable { + @Getter + @Setter + protected String id; + + @Setter + protected Map properties; // 扩展属性,仅支持基本类型 + + @JsonIgnore + private final transient Object lock = new Object(); + + public void sleep() throws InterruptedException { + synchronized (this.lock) { + this.lock.wait(); + } + } + + public void awake() { + synchronized (this.lock) { + this.lock.notifyAll(); + } + } + + public DomainObject setProperty(String name, Object value) { + getProperties().put(name, value); + return this; + } + + public DomainObject removeProperty(String name) { + getProperties().remove(name); + return this; + } + + public Object getProperty(String name) { + return getProperties().get(name); + } + + @SuppressWarnings("unchecked") + public T getPropertyGeneric(String name) { + return (T) getProperty(name); + } + + public T getProperty(String name, Class clz) { + return getProperty(name, clz, null); + } + + public T getProperty(String name, Class clz, T defaultValue) { + Object value = getProperty(name); + return value == null ? defaultValue : clz.cast(value); + } + + public Map getProperties() { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + return this.properties; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java new file mode 100644 index 0000000000..7309bee894 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + +import cn.hutool.cache.CacheUtil; +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.thread.ThreadUtil; +import cn.iocoder.yudao.framework.ai.midjourney.jad.DomainObject; +import lombok.experimental.UtilityClass; + +import java.time.Duration; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +@UtilityClass +public class AsyncLockUtils { + private static final TimedCache LOCK_MAP = CacheUtil.newTimedCache(Duration.ofDays(1).toMillis()); + + public static synchronized LockObject getLock(String key) { + return LOCK_MAP.get(key); + } + + public static LockObject waitForLock(String key, Duration duration) throws TimeoutException { + LockObject lockObject; + synchronized (LOCK_MAP) { + if (LOCK_MAP.containsKey(key)) { + lockObject = LOCK_MAP.get(key); + } else { + lockObject = new LockObject(key); + LOCK_MAP.put(key, lockObject); + } + } + Future future = ThreadUtil.execAsync(() -> { + try { + lockObject.sleep(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + }); + try { + future.get(duration.toMillis(), TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } catch (ExecutionException e) { + // do nothing + } catch (TimeoutException e) { + future.cancel(true); + throw new TimeoutException("Wait Timeout"); + } finally { + LOCK_MAP.remove(lockObject.getId()); + } + return lockObject; + } + + public static class LockObject extends DomainObject { + + public LockObject(String id) { + this.id = id; + } + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java new file mode 100644 index 0000000000..3af52647df --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + +import cn.hutool.core.text.CharSequenceUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +@Component +@RequiredArgsConstructor +public class DiscordHelper { + /** + * DISCORD_SERVER_URL. + */ + public static final String DISCORD_SERVER_URL = "https://discord.com"; + /** + * DISCORD_CDN_URL. + */ + public static final String DISCORD_CDN_URL = "https://cdn.discordapp.com"; + /** + * DISCORD_WSS_URL. + */ + public static final String DISCORD_WSS_URL = "wss://gateway.discord.gg"; + /** + * DISCORD_UPLOAD_URL. + */ + public static final String DISCORD_UPLOAD_URL = "https://discord-attachments-uploads-prd.storage.googleapis.com"; + + public String getServer() { + return DISCORD_SERVER_URL; + } + + public String getCdn() { + return DISCORD_CDN_URL; + } + + public String getWss() { + return DISCORD_WSS_URL; + } + + public String getMessageHash(String imageUrl) { + if (CharSequenceUtil.isBlank(imageUrl)) { + return null; + } + if (CharSequenceUtil.endWith(imageUrl, "_grid_0.webp")) { + int hashStartIndex = imageUrl.lastIndexOf("/"); + if (hashStartIndex < 0) { + return null; + } + return CharSequenceUtil.sub(imageUrl, hashStartIndex + 1, imageUrl.length() - "_grid_0.webp".length()); + } + int hashStartIndex = imageUrl.lastIndexOf("_"); + if (hashStartIndex < 0) { + return null; + } + return CharSequenceUtil.subBefore(imageUrl.substring(hashStartIndex + 1), ".", true); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java new file mode 100644 index 0000000000..923a1cb743 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + +import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.wss.user.SpringUserWebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.wss.user.UserMessageListener; + +import java.util.Scanner; + +/** + * author: fansili + * time: 2024/4/3 16:40 + */ +public class Main { + + public static void main(String[] args) { + String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; + + + DiscordHelper discordHelper = new DiscordHelper(); + DiscordAccount discordAccount = new DiscordAccount(); + discordAccount.setUserToken(token); + discordAccount.setGuildId("1221445697157468200"); + discordAccount.setChannelId("1221445862962630706"); + + + var messageListener = new UserMessageListener(); + var webSocketStarter = new SpringUserWebSocketStarter(discordHelper.getWss(), null, discordAccount, messageListener); + + try { + webSocketStarter.start(); + } catch (Exception e) { + throw new RuntimeException(e); + } + + + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java new file mode 100644 index 0000000000..3beb3a090d --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + + +public enum MessageType { + /** + * 创建. + */ + CREATE, + /** + * 修改. + */ + UPDATE, + /** + * 删除. + */ + DELETE; + + public static MessageType of(String type) { + return switch (type) { + case "MESSAGE_CREATE" -> CREATE; + case "MESSAGE_UPDATE" -> UPDATE; + case "MESSAGE_DELETE" -> DELETE; + default -> null; + }; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java new file mode 100644 index 0000000000..84c87452d0 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public final class ReturnCode { + /** + * 成功. + */ + public static final int SUCCESS = 1; + /** + * 数据未找到. + */ + public static final int NOT_FOUND = 3; + /** + * 校验错误. + */ + public static final int VALIDATION_ERROR = 4; + /** + * 系统异常. + */ + public static final int FAILURE = 9; + + /** + * 已存在. + */ + public static final int EXISTED = 21; + /** + * 排队中. + */ + public static final int IN_QUEUE = 22; + /** + * 队列已满. + */ + public static final int QUEUE_REJECTED = 23; + /** + * prompt包含敏感词. + */ + public static final int BANNED_PROMPT = 24; + + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java new file mode 100644 index 0000000000..d49b94dbca --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss; + + +public interface WebSocketStarter { + + void start() throws Exception; + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java new file mode 100644 index 0000000000..c4a44acebc --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java @@ -0,0 +1,6 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss.user; + + +public interface FailureCallback { + void onFailure(int code, String reason); +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java new file mode 100644 index 0000000000..d4561794d2 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java @@ -0,0 +1,189 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss.user; + + +import cn.hutool.core.exceptions.ValidateException; +import cn.hutool.core.text.CharSequenceUtil; +import cn.hutool.core.thread.ThreadUtil; +import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.wss.AsyncLockUtils; +import cn.iocoder.yudao.framework.ai.midjourney.wss.ReturnCode; +import cn.iocoder.yudao.framework.ai.midjourney.wss.WebSocketStarter; +import lombok.extern.slf4j.Slf4j; +import org.apache.tomcat.websocket.Constants; +import org.jetbrains.annotations.NotNull; +import org.springframework.util.concurrent.ListenableFutureCallback; +import org.springframework.web.socket.CloseStatus; +import org.springframework.web.socket.WebSocketHttpHeaders; +import org.springframework.web.socket.WebSocketSession; +import org.springframework.web.socket.client.standard.StandardWebSocketClient; + +import java.io.IOException; +import java.net.URI; +import java.time.Duration; +import java.util.concurrent.TimeoutException; + +@Slf4j +public class SpringUserWebSocketStarter implements WebSocketStarter { + private static final int CONNECT_RETRY_LIMIT = 5; + + private final DiscordAccount account; + private final UserMessageListener userMessageListener; + private final String wssServer; + private final String resumeWss; + + private boolean running = false; + + private WebSocketSession webSocketSession = null; + private ResumeData resumeData = null; + + public SpringUserWebSocketStarter(String wssServer, String resumeWss, DiscordAccount account, UserMessageListener userMessageListener) { + this.wssServer = wssServer; + this.resumeWss = resumeWss; + this.account = account; + this.userMessageListener = userMessageListener; + } + + @Override + public void start() throws Exception { + start(false); + } + + private void start(boolean reconnect) { + WebSocketHttpHeaders headers = new WebSocketHttpHeaders(); + headers.add("Accept-Encoding", "gzip, deflate, br"); + headers.add("Accept-Language", "zh-CN,zh;q=0.9"); + headers.add("Cache-Control", "no-cache"); + headers.add("Pragma", "no-cache"); + headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); + headers.add("User-Agent", this.account.getUserAgent()); + var handler = new SpringWebSocketHandler(this.account, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); + String gatewayUrl; + if (reconnect) { + gatewayUrl = getGatewayServer(this.resumeData.resumeGatewayUrl()) + "/?encoding=json&v=9&compress=zlib-stream"; + handler.setSessionId(this.resumeData.sessionId()); + handler.setSequence(this.resumeData.sequence()); + handler.setResumeGatewayUrl(this.resumeData.resumeGatewayUrl()); + } else { + gatewayUrl = getGatewayServer(null) + "/?encoding=json&v=9&compress=zlib-stream"; + } + var webSocketClient = new StandardWebSocketClient(); + webSocketClient.getUserProperties().put(Constants.IO_TIMEOUT_MS_PROPERTY, "10000"); + var socketSessionFuture = webSocketClient.doHandshake(handler, headers, URI.create(gatewayUrl)); + socketSessionFuture.addCallback(new ListenableFutureCallback<>() { + @Override + public void onFailure(@NotNull Throwable e) { + onSocketFailure(SpringWebSocketHandler.CLOSE_CODE_EXCEPTION, e.getMessage()); + } + + @Override + public void onSuccess(WebSocketSession session) { + SpringUserWebSocketStarter.this.webSocketSession = session; + } + }); + } + + private void onSocketSuccess(String sessionId, Object sequence, String resumeGatewayUrl) { + this.resumeData = new ResumeData(sessionId, sequence, resumeGatewayUrl); + this.running = true; + notifyWssLock(ReturnCode.SUCCESS, ""); + } + + private void onSocketFailure(int code, String reason) { + if (code == 1001) { + return; + } + closeSocketSessionWhenIsOpen(); + if (!this.running) { + notifyWssLock(code, reason); + return; + } + this.running = false; + if (code >= 4000) { + log.warn("[wss-{}] Can't reconnect! Account disabled. Closed by {}({}).", this.account.getDisplay(), code, reason); + disableAccount(); + } else if (code == 2001) { + log.warn("[wss-{}] Closed by {}({}). Try reconnect...", this.account.getDisplay(), code, reason); + tryReconnect(); + } else { + log.warn("[wss-{}] Closed by {}({}). Try new connection...", this.account.getDisplay(), code, reason); + tryNewConnect(); + } + } + + private void tryReconnect() { + try { + tryStart(true); + } catch (Exception e) { + if (e instanceof TimeoutException) { + closeSocketSessionWhenIsOpen(); + } + log.warn("[wss-{}] Reconnect fail: {}, Try new connection...", this.account.getDisplay(), e.getMessage()); + ThreadUtil.sleep(1000); + tryNewConnect(); + } + } + + private void tryNewConnect() { + for (int i = 1; i <= CONNECT_RETRY_LIMIT; i++) { + try { + tryStart(false); + return; + } catch (Exception e) { + if (e instanceof TimeoutException) { + closeSocketSessionWhenIsOpen(); + } + log.warn("[wss-{}] New connect fail ({}): {}", this.account.getDisplay(), i, e.getMessage()); + ThreadUtil.sleep(5000); + } + } + log.error("[wss-{}] Account disabled", this.account.getDisplay()); + disableAccount(); + } + + public void tryStart(boolean reconnect) throws Exception { + start(reconnect); + AsyncLockUtils.LockObject lock = AsyncLockUtils.waitForLock("wss:" + this.account.getId(), Duration.ofSeconds(20)); + int code = lock.getProperty("code", Integer.class, 0); + if (code == ReturnCode.SUCCESS) { + log.debug("[wss-{}] {} success.", this.account.getDisplay(), reconnect ? "Reconnect" : "New connect"); + return; + } + throw new ValidateException(lock.getProperty("description", String.class)); + } + + private void notifyWssLock(int code, String reason) { + AsyncLockUtils.LockObject lock = AsyncLockUtils.getLock("wss:" + this.account.getId()); + if (lock != null) { + lock.setProperty("code", code); + lock.setProperty("description", reason); + lock.awake(); + } + } + + private void disableAccount() { + if (Boolean.FALSE.equals(this.account.isEnable())) { + return; + } + this.account.setEnable(false); + } + + private void closeSocketSessionWhenIsOpen() { + try { + if (this.webSocketSession != null && this.webSocketSession.isOpen()) { + this.webSocketSession.close(CloseStatus.GOING_AWAY); + } + } catch (IOException e) { + // do nothing + } + } + + private String getGatewayServer(String resumeGatewayUrl) { + if (CharSequenceUtil.isNotBlank(resumeGatewayUrl)) { + return CharSequenceUtil.isBlank(this.resumeWss) ? resumeGatewayUrl : this.resumeWss; + } + return this.wssServer; + } + + public record ResumeData(String sessionId, Object sequence, String resumeGatewayUrl) { + } +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java new file mode 100644 index 0000000000..044ce24d90 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java @@ -0,0 +1,240 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss.user; + +import cn.hutool.core.text.CharSequenceUtil; +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.http.useragent.UserAgent; +import cn.hutool.http.useragent.UserAgentUtil; +import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import net.dv8tion.jda.api.utils.data.DataArray; +import net.dv8tion.jda.api.utils.data.DataObject; +import net.dv8tion.jda.api.utils.data.DataType; +import net.dv8tion.jda.internal.requests.WebSocketCode; +import net.dv8tion.jda.internal.utils.compress.Decompressor; +import net.dv8tion.jda.internal.utils.compress.ZlibDecompressor; +import org.jetbrains.annotations.NotNull; +import org.springframework.web.socket.*; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +@Slf4j +public class SpringWebSocketHandler implements WebSocketHandler { + public static final int CLOSE_CODE_RECONNECT = 2001; + public static final int CLOSE_CODE_INVALIDATE = 1009; + public static final int CLOSE_CODE_EXCEPTION = 1011; + + private final DiscordAccount account; + private final UserMessageListener userMessageListener; + private final SuccessCallback successCallback; + private final FailureCallback failureCallback; + + private final ScheduledExecutorService heartExecutor; + private final DataObject authData; + + @Setter + private String sessionId = null; + @Setter + private Object sequence = null; + @Setter + private String resumeGatewayUrl = null; + + private long interval = 41250; + private boolean heartbeatAck = false; + + private Future heartbeatInterval; + private Future heartbeatTimeout; + + private final Decompressor decompressor = new ZlibDecompressor(2048); + + public SpringWebSocketHandler(DiscordAccount account, UserMessageListener userMessageListener, SuccessCallback successCallback, FailureCallback failureCallback) { + this.account = account; + this.userMessageListener = userMessageListener; + this.successCallback = successCallback; + this.failureCallback = failureCallback; + this.heartExecutor = Executors.newSingleThreadScheduledExecutor(); + this.authData = createAuthData(); + } + + @Override + public void afterConnectionEstablished(@NotNull WebSocketSession session) throws Exception { + // do nothing + } + + @Override + public void handleTransportError(@NotNull WebSocketSession session, @NotNull Throwable e) throws Exception { + log.error("[wss-{}] Transport error", this.account.getDisplay(), e); + onFailure(CLOSE_CODE_EXCEPTION, "transport error"); + } + + @Override + public void afterConnectionClosed(@NotNull WebSocketSession session, @NotNull CloseStatus closeStatus) throws Exception { + onFailure(closeStatus.getCode(), closeStatus.getReason()); + } + + @Override + public boolean supportsPartialMessages() { + return true; + } + + @Override + public void handleMessage(@NotNull WebSocketSession session, WebSocketMessage message) throws Exception { + ByteBuffer buffer = (ByteBuffer) message.getPayload(); + byte[] decompressed = decompressor.decompress(buffer.array()); + if (decompressed == null) { + return; + } + String json = new String(decompressed, StandardCharsets.UTF_8); + DataObject data = DataObject.fromJson(json); + int opCode = data.getInt("op"); + switch (opCode) { + case WebSocketCode.HEARTBEAT -> handleHeartbeat(session); + case WebSocketCode.HEARTBEAT_ACK -> { + this.heartbeatAck = true; + clearHeartbeatTimeout(); + } + case WebSocketCode.HELLO -> { + handleHello(session, data); + doResumeOrIdentify(session); + } + case WebSocketCode.RESUME -> onSuccess(); + case WebSocketCode.RECONNECT -> onFailure(CLOSE_CODE_RECONNECT, "receive server reconnect"); + case WebSocketCode.INVALIDATE_SESSION -> onFailure(CLOSE_CODE_INVALIDATE, "receive session invalid"); + case WebSocketCode.DISPATCH -> handleDispatch(data); + default -> log.debug("[wss-{}] Receive unknown code: {}.", account.getDisplay(), data); + } + } + + private void handleDispatch(DataObject raw) { + this.sequence = raw.opt("s").orElse(null); + if (!raw.isType("d", DataType.OBJECT)) { + return; + } + DataObject content = raw.getObject("d"); + String t = raw.getString("t", null); + if ("READY".equals(t)) { + this.sessionId = content.getString("session_id"); + this.resumeGatewayUrl = content.getString("resume_gateway_url"); + onSuccess(); + } else if ("RESUMED".equals(t)) { + onSuccess(); + } else { + try { + this.userMessageListener.onMessage(raw); + } catch (Exception e) { + log.error("[wss-{}] Handle message error", this.account.getDisplay(), e); + } + } + } + + private void handleHeartbeat(WebSocketSession session) { + sendMessage(session, WebSocketCode.HEARTBEAT, this.sequence); + this.heartbeatTimeout = ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(this.interval); + onFailure(CLOSE_CODE_RECONNECT, "heartbeat has not ack"); + }); + } + + private void handleHello(WebSocketSession session, DataObject data) { + clearHeartbeatInterval(); + this.interval = data.getObject("d").getLong("heartbeat_interval"); + this.heartbeatAck = true; + this.heartbeatInterval = this.heartExecutor.scheduleAtFixedRate(() -> { + if (this.heartbeatAck) { + this.heartbeatAck = false; + sendMessage(session, WebSocketCode.HEARTBEAT, this.sequence); + } else { + onFailure(CLOSE_CODE_RECONNECT, "heartbeat has not ack interval"); + } + }, (long) Math.floor(RandomUtil.randomDouble(0, 1) * this.interval), this.interval, TimeUnit.MILLISECONDS); + } + + private void doResumeOrIdentify(WebSocketSession session) { + if (CharSequenceUtil.isBlank(this.sessionId)) { + sendMessage(session, WebSocketCode.IDENTIFY, this.authData); + } else { + var data = DataObject.empty().put("token", this.account.getUserToken()) + .put("session_id", this.sessionId).put("seq", this.sequence); + sendMessage(session, WebSocketCode.RESUME, data); + } + } + + private void sendMessage(WebSocketSession session, int op, Object d) { + var data = DataObject.empty().put("op", op).put("d", d); + try { + session.sendMessage(new TextMessage(data.toString())); + } catch (IOException e) { + log.error("[wss-{}] Send message error", this.account.getDisplay(), e); + onFailure(CLOSE_CODE_EXCEPTION, "send message error"); + } + } + + private void onSuccess() { + ThreadUtil.execute(() -> this.successCallback.onSuccess(this.sessionId, this.sequence, this.resumeGatewayUrl)); + } + + private void onFailure(int code, String reason) { + clearHeartbeatTimeout(); + clearHeartbeatInterval(); + ThreadUtil.execute(() -> this.failureCallback.onFailure(code, reason)); + } + + private void clearHeartbeatTimeout() { + if (this.heartbeatTimeout != null) { + this.heartbeatTimeout.cancel(true); + this.heartbeatTimeout = null; + } + } + + private void clearHeartbeatInterval() { + if (this.heartbeatInterval != null) { + this.heartbeatInterval.cancel(true); + this.heartbeatInterval = null; + } + } + + private DataObject createAuthData() { + UserAgent userAgent = UserAgentUtil.parse(this.account.getUserAgent()); + DataObject connectionProperties = DataObject.empty() + .put("browser", userAgent.getBrowser().getName()) + .put("browser_user_agent", this.account.getUserAgent()) + .put("browser_version", userAgent.getVersion()) + .put("client_build_number", 222963) + .put("client_event_source", null) + .put("device", "") + .put("os", userAgent.getOs().getName()) + .put("referer", "https://www.midjourney.com") + .put("referrer_current", "") + .put("referring_domain", "www.midjourney.com") + .put("referring_domain_current", "") + .put("release_channel", "stable") + .put("system_locale", "zh-CN"); + DataObject presence = DataObject.empty() + .put("activities", DataArray.empty()) + .put("afk", false) + .put("since", 0) + .put("status", "online"); + DataObject clientState = DataObject.empty() + .put("api_code_version", 0) + .put("guild_versions", DataObject.empty()) + .put("highest_last_message_id", "0") + .put("private_channels_version", "0") + .put("read_state_version", 0) + .put("user_guild_settings_version", -1) + .put("user_settings_version", -1); + return DataObject.empty() + .put("capabilities", 16381) + .put("client_state", clientState) + .put("compress", false) + .put("presence", presence) + .put("properties", connectionProperties) + .put("token", this.account.getUserToken()); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java new file mode 100644 index 0000000000..e6e0d89d0e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java @@ -0,0 +1,7 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss.user; + + +public interface SuccessCallback { + + void onSuccess(String sessionId, Object sequence, String resumeGatewayUrl); +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java new file mode 100644 index 0000000000..5bf4d9cf5f --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.framework.ai.midjourney.wss.user; + + +import cn.hutool.core.thread.ThreadUtil; +import cn.iocoder.yudao.framework.ai.midjourney.wss.MessageType; +import com.alibaba.fastjson.JSON; +import lombok.extern.slf4j.Slf4j; +import net.dv8tion.jda.api.utils.data.DataObject; + +@Slf4j +public class UserMessageListener { + + public void onMessage(DataObject raw) { + MessageType messageType = MessageType.of(raw.getString("t")); + if (messageType == null || MessageType.DELETE == messageType) { + return; + } + DataObject data = raw.getObject("d"); + System.err.println(data); + ThreadUtil.sleep(50); +// for (MessageHandler messageHandler : this.messageHandlers) { +// if (data.getBoolean(Constants.MJ_MESSAGE_HANDLED, false)) { +// return; +// } +// messageHandler.handle(this.instance, messageType, data); +// } + } +} -- Gitee From 2f6b9b2ef5bf4679f4d175f363e090e0a059f808 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 3 Apr 2024 17:09:22 +0800 Subject: [PATCH 0150/1557] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/{ => demo}/DiscordJadMain.java | 2 +- .../midjourney/{ => demo}/DiscordWebSocketClient.java | 2 +- .../ai/midjourney/{ => demo}/MidjourneyApi.java | 2 +- .../ai/midjourney/{ => demo}/MjCommandEnum.java | 2 +- .../framework/ai/midjourney/{ => demo}/MjExecute.java | 2 +- .../ai/midjourney/{ => demo}/MjHttpExecute.java | 2 +- .../ai/midjourney/{ => demo}/interactions_type2.json | 0 .../ai/midjourney/{ => demo}/interactions_type3.json | 0 .../ai/midjourney/{ => demo}/jad/Constants.java | 2 +- .../ai/midjourney/{ => demo}/jad/DiscordAccount.java | 2 +- .../ai/midjourney/{ => demo}/jad/DomainObject.java | 2 +- .../ai/midjourney/{ => demo}/wss/AsyncLockUtils.java | 4 ++-- .../ai/midjourney/{ => demo}/wss/DiscordHelper.java | 2 +- .../framework/ai/midjourney/{ => demo}/wss/Main.java | 8 ++++---- .../ai/midjourney/{ => demo}/wss/MessageType.java | 2 +- .../ai/midjourney/{ => demo}/wss/ReturnCode.java | 2 +- .../ai/midjourney/{ => demo}/wss/WebSocketStarter.java | 2 +- .../{ => demo}/wss/user/FailureCallback.java | 2 +- .../wss/user/SpringUserWebSocketStarter.java | 10 +++++----- .../{ => demo}/wss/user/SpringWebSocketHandler.java | 4 ++-- .../{ => demo}/wss/user/SuccessCallback.java | 2 +- .../{ => demo}/wss/user/UserMessageListener.java | 5 ++--- .../yudao/framework/ai/midjourney/package-info.java | 5 +++++ 23 files changed, 35 insertions(+), 31 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/DiscordJadMain.java (60%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/DiscordWebSocketClient.java (99%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/MidjourneyApi.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/MjCommandEnum.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/MjExecute.java (79%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/MjHttpExecute.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/interactions_type2.json (100%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/interactions_type3.json (100%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/jad/Constants.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/jad/DiscordAccount.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/jad/DomainObject.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/AsyncLockUtils.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/DiscordHelper.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/Main.java (75%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/MessageType.java (84%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/ReturnCode.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/WebSocketStarter.java (55%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/user/FailureCallback.java (55%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/user/SpringUserWebSocketStarter.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/user/SpringWebSocketHandler.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/user/SuccessCallback.java (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{ => demo}/wss/user/UserMessageListener.java (80%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java similarity index 60% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java index 5da1b667c5..d9c9dba176 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordJadMain.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java similarity index 99% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java index 6b77be8842..df9705095a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/DiscordWebSocketClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; import cn.hutool.http.useragent.UserAgent; import cn.hutool.http.useragent.UserAgentUtil; import cn.hutool.json.JSONObject; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java index 9aa5edfac3..1c0cbd4804 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; /** * 文档: https://www.xiubbs.com/t-401-1-1.html diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java index 7344f424c5..e65ddf294c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjCommandEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java similarity index 79% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java index 5945c92129..887a35e73c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjExecute.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; /** * mj 命令 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java index 5b5794ae67..4c1a8b20f8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjHttpExecute.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.demo; import cn.hutool.core.io.FileUtil; import org.springframework.http.HttpEntity; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type2.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type2.json similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type2.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type2.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type3.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type3.json similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions_type3.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type3.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java index 7b42bbbe35..42e1b2f479 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/Constants.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.jad; +package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; import lombok.experimental.UtilityClass; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java index a67752687e..8fafa9f593 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DiscordAccount.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.jad; +package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java index 3fae0b346e..e12339edcd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/jad/DomainObject.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.jad; +package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java index 7309bee894..365935a8f3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/AsyncLockUtils.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; import cn.hutool.cache.CacheUtil; import cn.hutool.cache.impl.TimedCache; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.jad.DomainObject; +import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DomainObject; import lombok.experimental.UtilityClass; import java.time.Duration; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java index 3af52647df..7f57fea086 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/DiscordHelper.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; import cn.hutool.core.text.CharSequenceUtil; import lombok.RequiredArgsConstructor; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java similarity index 75% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java index 923a1cb743..25a3327020 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/Main.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; -import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; -import cn.iocoder.yudao.framework.ai.midjourney.wss.user.SpringUserWebSocketStarter; -import cn.iocoder.yudao.framework.ai.midjourney.wss.user.UserMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.SpringUserWebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.UserMessageListener; import java.util.Scanner; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java similarity index 84% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java index 3beb3a090d..cc48fe9834 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/MessageType.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; public enum MessageType { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java index 84c87452d0..0de5390355 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/ReturnCode.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; import lombok.experimental.UtilityClass; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java similarity index 55% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java index d49b94dbca..82874f2042 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/WebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; public interface WebSocketStarter { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java similarity index 55% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java index c4a44acebc..9600ddab37 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/FailureCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; public interface FailureCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java index d4561794d2..644a36844e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringUserWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; import cn.hutool.core.exceptions.ValidateException; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; -import cn.iocoder.yudao.framework.ai.midjourney.wss.AsyncLockUtils; -import cn.iocoder.yudao.framework.ai.midjourney.wss.ReturnCode; -import cn.iocoder.yudao.framework.ai.midjourney.wss.WebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.AsyncLockUtils; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.ReturnCode; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.WebSocketStarter; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.websocket.Constants; import org.jetbrains.annotations.NotNull; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java index 044ce24d90..b9d77784d2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SpringWebSocketHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.http.useragent.UserAgent; import cn.hutool.http.useragent.UserAgentUtil; -import cn.iocoder.yudao.framework.ai.midjourney.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataArray; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java index e6e0d89d0e..7ff2bd3af4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/SuccessCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; public interface SuccessCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java similarity index 80% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java index 5bf4d9cf5f..ca97b6caef 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/wss/user/UserMessageListener.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.framework.ai.midjourney.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.wss.MessageType; -import com.alibaba.fastjson.JSON; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.MessageType; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataObject; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java new file mode 100644 index 0000000000..2ab1129635 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/4/3 17:08 + */ +package cn.iocoder.yudao.framework.ai.midjourney; \ No newline at end of file -- Gitee From 132c1cc828334fa303ba53df5bc34ea82d8e5995 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 3 Apr 2024 19:52:52 +0800 Subject: [PATCH 0151/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=AF=E5=90=A6=E8=AE=B0=E5=BD=95=E3=80=81?= =?UTF-8?q?=E8=84=B1=E6=95=8F=E3=80=81=E6=93=8D=E4=BD=9C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 30 +-- .../common/util/spring/SpringAopUtils.java | 46 ----- .../common/util/spring/SpringUtils.java | 24 +++ .../config/YudaoApiLogAutoConfiguration.java | 15 +- .../apilog/core/annotations/ApiAccessLog.java | 65 ++++++ .../apilog/core/enums/OperateTypeEnum.java | 51 +++++ .../core/filter/ApiAccessLogFilter.java | 194 +++++++++++++++--- .../interceptor/ApiAccessLogInterceptor.java | 67 ++++++ .../apilog/core/service/ApiAccessLog.java | 85 -------- .../service/ApiAccessLogFrameworkService.java | 7 +- .../ApiAccessLogFrameworkServiceImpl.java | 4 +- .../apilog/core/service/ApiErrorLog.java | 107 ---------- .../service/ApiErrorLogFrameworkService.java | 7 +- .../ApiErrorLogFrameworkServiceImpl.java | 4 +- .../core/handler/GlobalExceptionHandler.java | 9 +- .../logger/dto/ApiAccessLogCreateReqDTO.java | 20 +- .../vo/apiaccesslog/ApiAccessLogRespVO.java | 17 ++ .../dal/dataobject/logger/ApiAccessLogDO.java | 21 ++ .../src/test/resources/sql/create_tables.sql | 6 +- .../admin/notify/NotifyMessageController.java | 2 + 20 files changed, 484 insertions(+), 297 deletions(-) delete mode 100644 yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java create mode 100644 yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/enums/OperateTypeEnum.java create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLog.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLog.java diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 95923d4eb0..f7b7c292c8 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 30/03/2024 20:42:06 + Date: 03/04/2024 19:07:31 */ SET NAMES utf8mb4; @@ -327,9 +327,13 @@ CREATE TABLE `infra_api_access_log` ( `application_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名', `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求方法名', `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求地址', - `request_params` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求参数', + `request_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求参数', + `response_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '响应结果', `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP', `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '浏览器 UA', + `operate_module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作模块', + `operate_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作名', + `operate_type` tinyint NULL DEFAULT 0 COMMENT '操作分类', `begin_time` datetime NOT NULL COMMENT '开始请求时间', `end_time` datetime NOT NULL COMMENT '结束请求时间', `duration` int NOT NULL COMMENT '执行时长', @@ -343,7 +347,7 @@ CREATE TABLE `infra_api_access_log` ( `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, INDEX `idx_create_time`(`create_time` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35832 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; +) ENGINE = InnoDB AUTO_INCREMENT = 35920 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; -- ---------------------------- -- Records of infra_api_access_log @@ -385,7 +389,7 @@ CREATE TABLE `infra_api_error_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 16429 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 16462 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; -- ---------------------------- -- Records of infra_api_error_log @@ -494,7 +498,7 @@ CREATE TABLE `infra_config` ( -- Records of infra_config -- ---------------------------- BEGIN; -INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', b'0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-02-28 22:54:14', b'0'); +INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', b'0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-04-03 17:22:28', b'0'); INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:33:38', b'0'); INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (8, 'url', 2, 'SkyWalking 监控的地址', 'url.skywalking', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:57:03', b'0'); INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (9, 'url', 2, 'Spring Boot Admin 监控的地址', 'url.spring-boot-admin', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:52:07', b'0'); @@ -690,7 +694,7 @@ CREATE TABLE `infra_file` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1301 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1302 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; -- ---------------------------- -- Records of infra_file @@ -1416,7 +1420,7 @@ CREATE TABLE `system_login_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3054 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 3066 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; -- ---------------------------- -- Records of system_login_log @@ -2453,7 +2457,7 @@ CREATE TABLE `system_oauth2_access_token` ( PRIMARY KEY (`id`) USING BTREE, INDEX `idx_access_token`(`access_token` ASC) USING BTREE, INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6332 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 6366 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; -- ---------------------------- -- Records of system_oauth2_access_token @@ -2575,7 +2579,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1430 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 1441 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; -- ---------------------------- -- Records of system_oauth2_refresh_token @@ -2615,7 +2619,7 @@ CREATE TABLE `system_operate_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 11964 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 12000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; -- ---------------------------- -- Records of system_operate_log @@ -5305,7 +5309,7 @@ CREATE TABLE `system_sms_log` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 946 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 947 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; -- ---------------------------- -- Records of system_sms_log @@ -5475,7 +5479,7 @@ INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `c INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (151, '大租户', 126, '土豆大', NULL, 0, 'https://tudou.iocoder.cn', 111, '2023-12-08 00:00:00', 10, '1', '2023-12-02 23:35:05', '1', '2023-12-08 23:39:56', b'0'); INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (152, '新租户', 127, '土豆', NULL, 0, 'http://xx.iocoder.cn', 111, '2025-12-31 00:00:00', 50, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', b'0'); INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (153, '小明的租户', 128, 'xiaoming', '15601691301', 0, 'xiaoming.iocoder.cn', 111, '2025-12-01 00:00:00', 100, '1', '2024-02-27 21:58:25', '1', '2024-02-28 22:53:54', b'0'); -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, '2024-04-30 00:00:00', 123, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0'); +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, '2024-04-30 00:00:00', 123, '1', '2024-03-30 17:52:59', '1', '2024-04-03 15:06:42', b'0'); COMMIT; -- ---------------------------- @@ -5619,7 +5623,7 @@ CREATE TABLE `system_users` ( -- Records of system_users -- ---------------------------- BEGIN; -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-03-30 17:18:34', 'admin', '2021-01-05 17:03:47', NULL, '2024-03-30 17:18:34', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '127.0.0.1', '2024-04-03 17:31:00', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-03 17:31:00', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', b'0', 1); diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java deleted file mode 100644 index b71342cb34..0000000000 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java +++ /dev/null @@ -1,46 +0,0 @@ -package cn.iocoder.yudao.framework.common.util.spring; - -import cn.hutool.core.bean.BeanUtil; -import org.springframework.aop.framework.AdvisedSupport; -import org.springframework.aop.framework.AopProxy; -import org.springframework.aop.support.AopUtils; - -/** - * Spring AOP 工具类 - * - * 参考波克尔 http://www.bubuko.com/infodetail-3471885.html 实现 - */ -public class SpringAopUtils { - - /** - * 获取代理的目标对象 - * - * @param proxy 代理对象 - * @return 目标对象 - */ - public static Object getTarget(Object proxy) throws Exception { - // 不是代理对象 - if (!AopUtils.isAopProxy(proxy)) { - return proxy; - } - // Jdk 代理 - if (AopUtils.isJdkDynamicProxy(proxy)) { - return getJdkDynamicProxyTargetObject(proxy); - } - // Cglib 代理 - return getCglibProxyTargetObject(proxy); - } - - private static Object getCglibProxyTargetObject(Object proxy) throws Exception { - Object dynamicAdvisedInterceptor = BeanUtil.getFieldValue(proxy, "CGLIB$CALLBACK_0"); - AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(dynamicAdvisedInterceptor, "advised"); - return advisedSupport.getTargetSource().getTarget(); - } - - private static Object getJdkDynamicProxyTargetObject(Object proxy) throws Exception { - AopProxy aopProxy = (AopProxy) BeanUtil.getFieldValue(proxy, "h"); - AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(aopProxy, "advised"); - return advisedSupport.getTargetSource().getTarget(); - } - -} diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java new file mode 100644 index 0000000000..a501a71163 --- /dev/null +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.framework.common.util.spring; + +import cn.hutool.extra.spring.SpringUtil; + +import java.util.Objects; + +/** + * Spring 工具类 + * + * @author 芋道源码 + */ +public class SpringUtils extends SpringUtil { + + /** + * 是否为生产环境 + * + * @return 是否生产环境 + */ + public static boolean isProd() { + String activeProfile = getActiveProfile(); + return Objects.equals("prod", activeProfile); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java index 172ca3f134..d1f7453b6c 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.framework.apilog.config; import cn.iocoder.yudao.framework.apilog.core.filter.ApiAccessLogFilter; +import cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor; import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkServiceImpl; import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; @@ -10,23 +11,26 @@ import cn.iocoder.yudao.framework.web.config.WebProperties; import cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration; import cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi; import cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi; +import jakarta.servlet.Filter; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; - -import jakarta.servlet.Filter; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @AutoConfiguration(after = YudaoWebAutoConfiguration.class) -public class YudaoApiLogAutoConfiguration { +public class YudaoApiLogAutoConfiguration implements WebMvcConfigurer { @Bean + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") public ApiAccessLogFrameworkService apiAccessLogFrameworkService(ApiAccessLogApi apiAccessLogApi) { return new ApiAccessLogFrameworkServiceImpl(apiAccessLogApi); } @Bean + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") public ApiErrorLogFrameworkService apiErrorLogFrameworkService(ApiErrorLogApi apiErrorLogApi) { return new ApiErrorLogFrameworkServiceImpl(apiErrorLogApi); } @@ -49,4 +53,9 @@ public class YudaoApiLogAutoConfiguration { return bean; } + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(new ApiAccessLogInterceptor()); + } + } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java new file mode 100644 index 0000000000..096c3bef23 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.framework.apilog.core.annotations; + +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 访问日志注解 + * + * @author 芋道源码 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface ApiAccessLog { + + // ========== 开关字段 ========== + + /** + * 是否记录访问日志 + */ + boolean enable() default true; + /** + * 是否记录请求参数 + * + * 默认记录,主要考虑请求数据一般不大。可手动设置为 false 进行关闭 + */ + boolean requestEnable() default true; + /** + * 是否记录响应结果 + * + * 默认不记录,主要考虑响应数据可能比较大。可手动设置为 true 进行打开 + */ + boolean responseEnable() default false; + /** + * 敏感参数数组 + * + * 添加后,请求参数、响应结果不会记录该参数 + */ + String[] sanitizeKeys() default {}; + + // ========== 模块字段 ========== + + /** + * 操作模块 + * + * 为空时,会尝试读取 {@link io.swagger.v3.oas.annotations.tags.Tag#name()} 属性 + */ + String operateModule() default ""; + /** + * 操作名 + * + * 为空时,会尝试读取 {@link io.swagger.v3.oas.annotations.Operation#summary()} 属性 + */ + String operateName() default ""; + /** + * 操作分类 + * + * 实际并不是数组,因为枚举不能设置 null 作为默认值 + */ + OperateTypeEnum[] operateType() default {}; + +} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/enums/OperateTypeEnum.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/enums/OperateTypeEnum.java new file mode 100644 index 0000000000..a7f00558e3 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/enums/OperateTypeEnum.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.framework.apilog.core.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 操作日志的操作类型 + * + * @author ruoyi + */ +@Getter +@AllArgsConstructor +public enum OperateTypeEnum { + + /** + * 查询 + */ + GET(1), + /** + * 新增 + */ + CREATE(2), + /** + * 修改 + */ + UPDATE(3), + /** + * 删除 + */ + DELETE(4), + /** + * 导出 + */ + EXPORT(5), + /** + * 导入 + */ + IMPORT(6), + /** + * 其它 + * + * 在无法归类时,可以选择使用其它。因为还有操作名可以进一步标识 + */ + OTHER(0); + + /** + * 类型 + */ + private final Integer type; + +} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java index ee219de393..654db7a6ed 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java @@ -1,38 +1,56 @@ package cn.iocoder.yudao.framework.apilog.core.filter; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLog; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.BooleanUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.web.config.WebProperties; import cn.iocoder.yudao.framework.web.core.filter.ApiRequestFilter; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; -import lombok.extern.slf4j.Slf4j; - +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; +import com.fasterxml.jackson.databind.JsonNode; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.method.HandlerMethod; + import java.io.IOException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; +import java.util.Iterator; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor.*; import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; /** * API 访问日志 Filter * + * 目的:记录 API 访问日志到数据库中 + * * @author 芋道源码 */ @Slf4j public class ApiAccessLogFilter extends ApiRequestFilter { + private static final String[] SANITIZE_KEYS = new String[]{"password", "token", "accessToken", "refreshToken"}; + private final String applicationName; private final ApiAccessLogFrameworkService apiAccessLogFrameworkService; @@ -44,6 +62,7 @@ public class ApiAccessLogFilter extends ApiRequestFilter { } @Override + @SuppressWarnings("NullableProblems") protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { // 获得开始时间 @@ -66,45 +85,166 @@ public class ApiAccessLogFilter extends ApiRequestFilter { private void createApiAccessLog(HttpServletRequest request, LocalDateTime beginTime, Map queryString, String requestBody, Exception ex) { - ApiAccessLog accessLog = new ApiAccessLog(); + ApiAccessLogCreateReqDTO accessLog = new ApiAccessLogCreateReqDTO(); try { - this.buildApiAccessLogDTO(accessLog, request, beginTime, queryString, requestBody, ex); + boolean enable = buildApiAccessLog(accessLog, request, beginTime, queryString, requestBody, ex); + if (!enable) { + return; + } apiAccessLogFrameworkService.createApiAccessLog(accessLog); } catch (Throwable th) { log.error("[createApiAccessLog][url({}) log({}) 发生异常]", request.getRequestURI(), toJsonString(accessLog), th); } } - private void buildApiAccessLogDTO(ApiAccessLog accessLog, HttpServletRequest request, LocalDateTime beginTime, + private boolean buildApiAccessLog(ApiAccessLogCreateReqDTO accessLog, HttpServletRequest request, LocalDateTime beginTime, Map queryString, String requestBody, Exception ex) { + // 判断:是否要记录操作日志 + HandlerMethod handlerMethod = (HandlerMethod) request.getAttribute(ATTRIBUTE_HANDLER_METHOD); + ApiAccessLog accessLogAnnotation = null; + if (handlerMethod != null) { + accessLogAnnotation = handlerMethod.getMethodAnnotation(ApiAccessLog.class); + if (accessLogAnnotation != null && BooleanUtil.isFalse(accessLogAnnotation.enable())) { + return false; + } + } + // 处理用户信息 - accessLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); - accessLog.setUserType(WebFrameworkUtils.getLoginUserType(request)); + accessLog.setUserId(WebFrameworkUtils.getLoginUserId(request)) + .setUserType(WebFrameworkUtils.getLoginUserType(request)); // 设置访问结果 CommonResult result = WebFrameworkUtils.getCommonResult(request); if (result != null) { - accessLog.setResultCode(result.getCode()); - accessLog.setResultMsg(result.getMsg()); + accessLog.setResultCode(result.getCode()).setResultMsg(result.getMsg()); } else if (ex != null) { - accessLog.setResultCode(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode()); - accessLog.setResultMsg(ExceptionUtil.getRootCauseMessage(ex)); + accessLog.setResultCode(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode()) + .setResultMsg(ExceptionUtil.getRootCauseMessage(ex)); } else { - accessLog.setResultCode(0); - accessLog.setResultMsg(""); - } - // 设置其它字段 - accessLog.setTraceId(TracerUtils.getTraceId()); - accessLog.setApplicationName(applicationName); - accessLog.setRequestUrl(request.getRequestURI()); - Map requestParams = MapUtil.builder().put("query", queryString).put("body", requestBody).build(); - accessLog.setRequestParams(toJsonString(requestParams)); - accessLog.setRequestMethod(request.getMethod()); - accessLog.setUserAgent(ServletUtils.getUserAgent(request)); - accessLog.setUserIp(ServletUtils.getClientIP(request)); + accessLog.setResultCode(GlobalErrorCodeConstants.SUCCESS.getCode()).setResultMsg(""); + } + // 设置请求字段 + accessLog.setTraceId(TracerUtils.getTraceId()).setApplicationName(applicationName) + .setRequestUrl(request.getRequestURI()).setRequestMethod(request.getMethod()) + .setUserAgent(ServletUtils.getUserAgent(request)).setUserIp(ServletUtils.getClientIP(request)); + String[] sanitizeKeys = accessLogAnnotation != null ? accessLogAnnotation.sanitizeKeys() : null; + Boolean requestEnable = accessLogAnnotation != null ? accessLogAnnotation.requestEnable() : Boolean.TRUE; + if (!BooleanUtil.isFalse(requestEnable)) { // 默认记录,所以判断 !false + Map requestParams = MapUtil.builder() + .put("query", sanitizeMap(queryString, sanitizeKeys)) + .put("body", sanitizeJson(requestBody, sanitizeKeys)).build(); + accessLog.setRequestParams(toJsonString(requestParams)); + } + Boolean responseEnable = accessLogAnnotation != null ? accessLogAnnotation.responseEnable() : Boolean.FALSE; + if (BooleanUtil.isTrue(responseEnable)) { // 默认不记录,默认强制要求 true + accessLog.setResponseBody(sanitizeJson(result, sanitizeKeys)); + } // 持续时间 - accessLog.setBeginTime(beginTime); - accessLog.setEndTime(LocalDateTime.now()); - accessLog.setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.MILLIS)); + accessLog.setBeginTime(beginTime).setEndTime(LocalDateTime.now()) + .setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.MILLIS)); + + // 操作模块 + if (handlerMethod != null) { + Tag tagAnnotation = handlerMethod.getBeanType().getAnnotation(Tag.class); + Operation operationAnnotation = handlerMethod.getMethodAnnotation(Operation.class); + String operateModule = accessLogAnnotation != null ? accessLogAnnotation.operateModule() : + tagAnnotation != null ? StrUtil.nullToDefault(tagAnnotation.name(), tagAnnotation.description()) : null; + String operateName = accessLogAnnotation != null ? accessLogAnnotation.operateName() : + operationAnnotation != null ? operationAnnotation.summary() : null; + OperateTypeEnum operateType = accessLogAnnotation != null && accessLogAnnotation.operateType().length > 0 ? + accessLogAnnotation.operateType()[0] : parseOperateLogType(request); + accessLog.setOperateModule(operateModule).setOperateName(operateName).setOperateType(operateType.getType()); + } + return true; + } + + // ========== 解析 @ApiAccessLog、@Swagger 注解 ========== + + private static OperateTypeEnum parseOperateLogType(HttpServletRequest request) { + RequestMethod requestMethod = RequestMethod.resolve(request.getMethod()); + if (requestMethod == null) { + return OperateTypeEnum.OTHER; + } + switch (requestMethod) { + case GET: + return OperateTypeEnum.GET; + case POST: + return OperateTypeEnum.CREATE; + case PUT: + return OperateTypeEnum.UPDATE; + case DELETE: + return OperateTypeEnum.DELETE; + default: + return OperateTypeEnum.OTHER; + } + } + + // ========== 请求和响应的脱敏逻辑,移除类似 password、token 等敏感字段 ========== + + private static String sanitizeMap(Map map, String[] sanitizeKeys) { + if (CollUtil.isNotEmpty(map)) { + return null; + } + if (sanitizeKeys != null) { + MapUtil.removeAny(map, sanitizeKeys); + } + MapUtil.removeAny(map, SANITIZE_KEYS); + return JsonUtils.toJsonString(map); + } + + private static String sanitizeJson(String jsonString, String[] sanitizeKeys) { + if (StrUtil.isEmpty(jsonString)) { + return null; + } + try { + JsonNode rootNode = JsonUtils.parseTree(jsonString); + sanitizeJson(rootNode, sanitizeKeys); + return JsonUtils.toJsonString(rootNode); + } catch (Exception e) { + // 脱敏失败的情况下,直接忽略异常,避免影响用户请求 + log.error("[sanitizeJson][脱敏({}) 发生异常]", jsonString, e); + return jsonString; + } + } + + private static String sanitizeJson(CommonResult commonResult, String[] sanitizeKeys) { + if (commonResult == null) { + return null; + } + String jsonString = toJsonString(commonResult); + try { + JsonNode rootNode = JsonUtils.parseTree(jsonString); + sanitizeJson(rootNode.get("data"), sanitizeKeys); // 只处理 data 字段,不处理 code、msg 字段,避免错误被脱敏掉 + return JsonUtils.toJsonString(rootNode); + } catch (Exception e) { + // 脱敏失败的情况下,直接忽略异常,避免影响用户请求 + log.error("[sanitizeJson][脱敏({}) 发生异常]", jsonString, e); + return jsonString; + } + } + + private static void sanitizeJson(JsonNode node, String[] sanitizeKeys) { + // 情况一:数组,遍历处理 + if (node.isArray()) { + for (JsonNode childNode : node) { + sanitizeJson(childNode, sanitizeKeys); + } + return; + } + // 情况二:非 Object,只是某个值,直接返回 + if (!node.isObject()) { + return; + } + // 情况三:Object,遍历处理 + Iterator> iterator = node.properties().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + if (ArrayUtil.contains(sanitizeKeys, entry.getKey()) + || ArrayUtil.contains(SANITIZE_KEYS, entry.getKey())) { + iterator.remove(); + continue; + } + sanitizeJson(entry.getValue(), sanitizeKeys); + } } } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java new file mode 100644 index 0000000000..431c201d8b --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.framework.apilog.core.interceptor; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.common.util.spring.SpringUtils; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StopWatch; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; + +import java.util.Map; + +/** + * API 访问日志 Interceptor + * + * 目的:在非 prod 环境时,打印 request 和 response 两条日志到日志文件(控制台)中。 + * + * @author 芋道源码 + */ +@Slf4j +public class ApiAccessLogInterceptor implements HandlerInterceptor { + + public static String ATTRIBUTE_HANDLER_METHOD = "HANDLER_METHOD"; + + private static String ATTRIBUTE_STOP_WATCH = "ApiAccessLogInterceptor.StopWatch"; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + // 记录 HandlerMethod,提供给 ApiAccessLogFilter 使用 + HandlerMethod handlerMethod = handler instanceof HandlerMethod ? (HandlerMethod) handler : null; + if (handlerMethod != null) { + request.setAttribute(ATTRIBUTE_HANDLER_METHOD, handlerMethod); + } + + // 打印 request 日志 + if (!SpringUtils.isProd()) { + Map queryString = ServletUtils.getParamMap(request); + String requestBody = ServletUtils.isJsonRequest(request) ? ServletUtils.getBody(request) : null; + if (CollUtil.isEmpty(queryString) && StrUtil.isEmpty(requestBody)) { + log.info("[preHandle][开始请求 URL({}) 无参数]", request.getRequestURI()); + } else { + log.info("[preHandle][开始请求 URL({}) 参数({})]", request.getRequestURI(), + StrUtil.nullToDefault(requestBody, queryString.toString())); + } + // 计时 + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + request.setAttribute(ATTRIBUTE_STOP_WATCH, stopWatch); + } + return true; + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { + // 打印 response 日志 + if (!SpringUtils.isProd()) { + StopWatch stopWatch = (StopWatch) request.getAttribute(ATTRIBUTE_STOP_WATCH); + stopWatch.stop(); + log.info("[afterCompletion][完成请求 URL({}) 耗时({} ms)]", + request.getRequestURI(), stopWatch.getTotalTimeMillis()); + } + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLog.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLog.java deleted file mode 100644 index 4576030087..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLog.java +++ /dev/null @@ -1,85 +0,0 @@ -package cn.iocoder.yudao.framework.apilog.core.service; - -import lombok.Data; - -import jakarta.validation.constraints.NotNull; -import java.time.LocalDateTime; - -/** - * API 访问日志 - * - * @author 芋道源码 - */ -@Data -public class ApiAccessLog { - - /** - * 链路追踪编号 - */ - private String traceId; - /** - * 用户编号 - */ - private Long userId; - /** - * 用户类型 - */ - private Integer userType; - /** - * 应用名 - */ - @NotNull(message = "应用名不能为空") - private String applicationName; - - /** - * 请求方法名 - */ - @NotNull(message = "http 请求方法不能为空") - private String requestMethod; - /** - * 访问地址 - */ - @NotNull(message = "访问地址不能为空") - private String requestUrl; - /** - * 请求参数 - */ - @NotNull(message = "请求参数不能为空") - private String requestParams; - /** - * 用户 IP - */ - @NotNull(message = "ip 不能为空") - private String userIp; - /** - * 浏览器 UA - */ - @NotNull(message = "User-Agent 不能为空") - private String userAgent; - - /** - * 开始请求时间 - */ - @NotNull(message = "开始请求时间不能为空") - private LocalDateTime beginTime; - /** - * 结束请求时间 - */ - @NotNull(message = "结束请求时间不能为空") - private LocalDateTime endTime; - /** - * 执行时长,单位:毫秒 - */ - @NotNull(message = "执行时长不能为空") - private Integer duration; - /** - * 结果码 - */ - @NotNull(message = "错误码不能为空") - private Integer resultCode; - /** - * 结果提示 - */ - private String resultMsg; - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java index b8f21883bb..2f3c78f603 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.framework.apilog.core.service; +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; + /** * API 访问日志 Framework Service 接口 * @@ -10,7 +12,8 @@ public interface ApiAccessLogFrameworkService { /** * 创建 API 访问日志 * - * @param apiAccessLog API 访问日志 + * @param reqDTO API 访问日志 */ - void createApiAccessLog(ApiAccessLog apiAccessLog); + void createApiAccessLog(ApiAccessLogCreateReqDTO reqDTO); + } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkServiceImpl.java index 83162f1643..8f8e343068 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkServiceImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.framework.apilog.core.service; -import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; import lombok.RequiredArgsConstructor; @@ -20,8 +19,7 @@ public class ApiAccessLogFrameworkServiceImpl implements ApiAccessLogFrameworkSe @Override @Async - public void createApiAccessLog(ApiAccessLog apiAccessLog) { - ApiAccessLogCreateReqDTO reqDTO = BeanUtil.copyProperties(apiAccessLog, ApiAccessLogCreateReqDTO.class); + public void createApiAccessLog(ApiAccessLogCreateReqDTO reqDTO) { apiAccessLogApi.createApiAccessLog(reqDTO); } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLog.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLog.java deleted file mode 100644 index 2956d204c4..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLog.java +++ /dev/null @@ -1,107 +0,0 @@ -package cn.iocoder.yudao.framework.apilog.core.service; - -import lombok.Data; - -import jakarta.validation.constraints.NotNull; -import java.time.LocalDateTime; - -/** - * API 错误日志 - * - * @author 芋道源码 - */ -@Data -public class ApiErrorLog { - - /** - * 链路编号 - */ - private String traceId; - /** - * 账号编号 - */ - private Long userId; - /** - * 用户类型 - */ - private Integer userType; - /** - * 应用名 - */ - @NotNull(message = "应用名不能为空") - private String applicationName; - - /** - * 请求方法名 - */ - @NotNull(message = "http 请求方法不能为空") - private String requestMethod; - /** - * 访问地址 - */ - @NotNull(message = "访问地址不能为空") - private String requestUrl; - /** - * 请求参数 - */ - @NotNull(message = "请求参数不能为空") - private String requestParams; - /** - * 用户 IP - */ - @NotNull(message = "ip 不能为空") - private String userIp; - /** - * 浏览器 UA - */ - @NotNull(message = "User-Agent 不能为空") - private String userAgent; - - /** - * 异常时间 - */ - @NotNull(message = "异常时间不能为空") - private LocalDateTime exceptionTime; - /** - * 异常名 - */ - @NotNull(message = "异常名不能为空") - private String exceptionName; - /** - * 异常发生的类全名 - */ - @NotNull(message = "异常发生的类全名不能为空") - private String exceptionClassName; - /** - * 异常发生的类文件 - */ - @NotNull(message = "异常发生的类文件不能为空") - private String exceptionFileName; - /** - * 异常发生的方法名 - */ - @NotNull(message = "异常发生的方法名不能为空") - private String exceptionMethodName; - /** - * 异常发生的方法所在行 - */ - @NotNull(message = "异常发生的方法所在行不能为空") - private Integer exceptionLineNumber; - /** - * 异常的栈轨迹异常的栈轨迹 - */ - @NotNull(message = "异常的栈轨迹不能为空") - private String exceptionStackTrace; - /** - * 异常导致的根消息 - */ - @NotNull(message = "异常导致的根消息不能为空") - private String exceptionRootCauseMessage; - /** - * 异常导致的消息 - */ - @NotNull(message = "异常导致的消息不能为空") - private String exceptionMessage; - - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java index dfc71cb1f7..33bebb7117 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.framework.apilog.core.service; +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; + /** * API 错误日志 Framework Service 接口 * @@ -10,7 +12,8 @@ public interface ApiErrorLogFrameworkService { /** * 创建 API 错误日志 * - * @param apiErrorLog API 错误日志 + * @param reqDTO API 错误日志 */ - void createApiErrorLog(ApiErrorLog apiErrorLog); + void createApiErrorLog(ApiErrorLogCreateReqDTO reqDTO); + } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkServiceImpl.java index cb5abe3c28..32e4f8043b 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkServiceImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.framework.apilog.core.service; -import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; import lombok.RequiredArgsConstructor; @@ -20,8 +19,7 @@ public class ApiErrorLogFrameworkServiceImpl implements ApiErrorLogFrameworkServ @Override @Async - public void createApiErrorLog(ApiErrorLog apiErrorLog) { - ApiErrorLogCreateReqDTO reqDTO = BeanUtil.copyProperties(apiErrorLog, ApiErrorLogCreateReqDTO.class); + public void createApiErrorLog(ApiErrorLogCreateReqDTO reqDTO) { apiErrorLogApi.createApiErrorLog(reqDTO); } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index 5af13b789f..243f949f28 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.framework.web.core.handler; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLog; import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.CommonResult; @@ -11,6 +10,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -46,6 +46,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC @Slf4j public class GlobalExceptionHandler { + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") private final String applicationName; private final ApiErrorLogFrameworkService apiErrorLogFrameworkService; @@ -237,10 +238,10 @@ public class GlobalExceptionHandler { private void createExceptionLog(HttpServletRequest req, Throwable e) { // 插入错误日志 - ApiErrorLog errorLog = new ApiErrorLog(); + ApiErrorLogCreateReqDTO errorLog = new ApiErrorLogCreateReqDTO(); try { // 初始化 errorLog - initExceptionLog(errorLog, req, e); + buildExceptionLog(errorLog, req, e); // 执行插入 errorLog apiErrorLogFrameworkService.createApiErrorLog(errorLog); } catch (Throwable th) { @@ -248,7 +249,7 @@ public class GlobalExceptionHandler { } } - private void initExceptionLog(ApiErrorLog errorLog, HttpServletRequest request, Throwable e) { + private void buildExceptionLog(ApiErrorLogCreateReqDTO errorLog, HttpServletRequest request, Throwable e) { // 处理用户信息 errorLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); errorLog.setUserType(WebFrameworkUtils.getLoginUserType(request)); diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java index cbab51a549..88add1ab63 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java @@ -44,8 +44,11 @@ public class ApiAccessLogCreateReqDTO { /** * 请求参数 */ - @NotNull(message = "请求参数不能为空") private String requestParams; + /** + * 响应结果 + */ + private String responseBody; /** * 用户 IP */ @@ -57,6 +60,21 @@ public class ApiAccessLogCreateReqDTO { @NotNull(message = "User-Agent 不能为空") private String userAgent; + /** + * 操作模块 + */ + private String operateModule; + /** + * 操作名 + */ + private String operateName; + /** + * 操作分类 + * + * 枚举,参见 OperateTypeEnum 类 + */ + private Integer operateType; + /** * 开始请求时间 */ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java index 5e3f3c976d..ff0fed7a3d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java @@ -48,6 +48,10 @@ public class ApiAccessLogRespVO { @ExcelProperty("请求参数") private String requestParams; + @Schema(description = "响应结果") + @ExcelProperty("响应结果") + private String responseBody; + @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1") @ExcelProperty("用户 IP") private String userIp; @@ -56,6 +60,19 @@ public class ApiAccessLogRespVO { @ExcelProperty("浏览器 UA") private String userAgent; + @Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "商品模块") + @ExcelProperty("操作模块") + private String operateModule; + + @Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "创建商品") + @ExcelProperty("操作名") + private String operateName; + + @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty(value = "操作分类", converter = DictConvert.class) + @DictFormat(DictTypeConstants.OPERATE_TYPE) + private Integer operateType; + @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) @ExcelProperty("开始请求时间") private LocalDateTime beginTime; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java index ab4292bf91..d4850fcc82 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.infra.dal.dataobject.logger; +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -70,6 +71,10 @@ public class ApiAccessLogDO extends BaseDO { * body: Quest Body */ private String requestParams; + /** + * 响应结果 + */ + private String responseBody; /** * 用户 IP */ @@ -81,6 +86,21 @@ public class ApiAccessLogDO extends BaseDO { // ========== 执行相关字段 ========== + /** + * 操作模块 + */ + private String operateModule; + /** + * 操作名 + */ + private String operateName; + /** + * 操作分类 + * + * 枚举 {@link OperateTypeEnum} + */ + private Integer operateType; + /** * 开始请求时间 */ @@ -93,6 +113,7 @@ public class ApiAccessLogDO extends BaseDO { * 执行时长,单位:毫秒 */ private Integer duration; + /** * 结果码 * diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql index a5f896ce1e..9f383ac5a2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql @@ -94,8 +94,12 @@ CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( "request_method" varchar(16) not null default '', "request_url" varchar(255) not null default '', "request_params" varchar(8000) not null default '', + "response_body" varchar(8000) not null default '', "user_ip" varchar(50) not null, "user_agent" varchar(512) not null, + `operate_module` varchar(50) NOT NULL, + `operate_name` varchar(50) NOT NULL, + `operate_type` bigint(4) NOT NULL DEFAULT '0', "begin_time" timestamp not null, "end_time" timestamp not null, "duration" integer not null, @@ -108,7 +112,7 @@ CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( "deleted" bit not null default false, "tenant_id" bigint not null default '0', primary key ("id") - ) COMMENT 'API 访问日志表'; +) COMMENT 'API 访问日志表'; CREATE TABLE IF NOT EXISTS "infra_api_error_log" ( "id" bigint not null GENERATED BY DEFAULT AS IDENTITY, diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java index ecf06ad37a..1909046779 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.notify; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -88,6 +89,7 @@ public class NotifyMessageController { @GetMapping("/get-unread-count") @Operation(summary = "获得当前用户的未读站内信数量") + @ApiAccessLog(enable = false) // 由于前端会不断轮询该接口,记录日志没有意义 public CommonResult getUnreadNotifyMessageCount() { return success(notifyMessageService.getUnreadNotifyMessageCount( getLoginUserId(), UserTypeEnum.ADMIN.getValue())); -- Gitee From 22a170ee62ae8dfb1375a0963692c2098bb2228a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 3 Apr 2024 19:55:14 +0800 Subject: [PATCH 0152/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=AF=E5=90=A6=E8=AE=B0=E5=BD=95=E3=80=81?= =?UTF-8?q?=E8=84=B1=E6=95=8F=E3=80=81=E6=93=8D=E4=BD=9C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apilog/core/interceptor/ApiAccessLogInterceptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java index 431c201d8b..1cd43916fa 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java @@ -23,9 +23,9 @@ import java.util.Map; @Slf4j public class ApiAccessLogInterceptor implements HandlerInterceptor { - public static String ATTRIBUTE_HANDLER_METHOD = "HANDLER_METHOD"; + public static final String ATTRIBUTE_HANDLER_METHOD = "HANDLER_METHOD"; - private static String ATTRIBUTE_STOP_WATCH = "ApiAccessLogInterceptor.StopWatch"; + private static final String ATTRIBUTE_STOP_WATCH = "ApiAccessLogInterceptor.StopWatch"; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { -- Gitee From 1761495bce6084dc79f121cce6807b5de138206b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 3 Apr 2024 20:02:05 +0800 Subject: [PATCH 0153/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=AF=E5=90=A6=E8=AE=B0=E5=BD=95=E3=80=81?= =?UTF-8?q?=E8=84=B1=E6=95=8F=E3=80=81=E6=93=8D=E4=BD=9C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/YudaoApiLogAutoConfiguration.java | 3 ++- .../apilog/core/filter/ApiAccessLogFilter.java | 15 ++++++++------- .../core/interceptor/ApiAccessLogInterceptor.java | 4 ++-- .../controller/app/cart/vo/AppCartAddReqVO.java | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java index d1f7453b6c..2a0d8d8760 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java @@ -11,7 +11,6 @@ import cn.iocoder.yudao.framework.web.config.WebProperties; import cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration; import cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi; import cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi; -import jakarta.servlet.Filter; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -20,6 +19,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import javax.servlet.Filter; + @AutoConfiguration(after = YudaoWebAutoConfiguration.class) public class YudaoApiLogAutoConfiguration implements WebMvcConfigurer { diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java index 654db7a6ed..1028ac0853 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java @@ -22,21 +22,21 @@ import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; import com.fasterxml.jackson.databind.JsonNode; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.FilterChain; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.method.HandlerMethod; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.Iterator; import java.util.Map; -import static cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor.*; +import static cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor.ATTRIBUTE_HANDLER_METHOD; import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; /** @@ -160,7 +160,8 @@ public class ApiAccessLogFilter extends ApiRequestFilter { // ========== 解析 @ApiAccessLog、@Swagger 注解 ========== private static OperateTypeEnum parseOperateLogType(HttpServletRequest request) { - RequestMethod requestMethod = RequestMethod.resolve(request.getMethod()); + RequestMethod requestMethod = ArrayUtil.firstMatch(method -> + StrUtil.equalsAnyIgnoreCase(method.name(), request.getMethod()), RequestMethod.values()); if (requestMethod == null) { return OperateTypeEnum.OTHER; } @@ -235,7 +236,7 @@ public class ApiAccessLogFilter extends ApiRequestFilter { return; } // 情况三:Object,遍历处理 - Iterator> iterator = node.properties().iterator(); + Iterator> iterator = node.fields(); while (iterator.hasNext()) { Map.Entry entry = iterator.next(); if (ArrayUtil.contains(sanitizeKeys, entry.getKey()) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java index 1cd43916fa..7f8883a898 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java @@ -4,13 +4,13 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.common.util.spring.SpringUtils; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.util.StopWatch; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerInterceptor; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.Map; /** diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java index 67e7f03fde..49c2035260 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; @Schema(description = "用户 App - 购物车添加购物项 Request VO") -- Gitee From 000b6cf47fd8f14827a28b43c4f2c410b372163c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 01:21:08 +0800 Subject: [PATCH 0154/1557] =?UTF-8?q?=E3=80=90=E9=87=8D=E6=9E=84=E3=80=91V?= =?UTF-8?q?2=20=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=BD=AC=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E5=9F=BA=E4=BA=8E=E6=B3=A8=E8=A7=A3=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8F=98=E9=87=8F=E3=80=81=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=87=BD=E6=95=B0=E7=9A=84=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 56 +-- .../YudaoOperateLogAutoConfiguration.java | 23 -- .../operatelog/core/aop/OperateLogAspect.java | 375 ------------------ .../operatelog/core/package-info.java | 1 - .../operatelog/core/service/OperateLog.java | 110 ----- .../service/OperateLogFrameworkService.java | 17 - .../OperateLogFrameworkServiceImpl.java | 28 -- .../operatelog/core/util/OperateLogUtils.java | 21 - .../framework/operatelog/package-info.java | 6 - ...ot.autoconfigure.AutoConfiguration.imports | 1 - .../core/service/LogRecordServiceImpl.java | 14 +- .../operatelog/CrmOperateLogController.java | 6 +- .../service/codegen/inner/CodegenEngine.java | 6 +- .../codegen/java/controller/controller.vm | 4 +- .../system/api/logger/OperateLogApi.java | 14 +- .../logger/dto/OperateLogCreateReqDTO.java | 95 ++--- ...eReqDTO.java => OperateLogPageReqDTO.java} | 4 +- ...gV2RespDTO.java => OperateLogRespDTO.java} | 2 +- .../logger/dto/OperateLogV2CreateReqDTO.java | 84 ---- .../system/api/logger/OperateLogApiImpl.java | 24 +- .../vo/operatelog/OperateLogPageReqVO.java | 21 +- .../vo/operatelog/OperateLogRespVO.java | 53 +-- .../dal/dataobject/logger/OperateLogDO.java | 83 +--- .../dal/dataobject/logger/OperateLogV2DO.java | 87 ---- .../dal/mysql/logger/OperateLogMapper.java | 34 +- .../dal/mysql/logger/OperateLogV2Mapper.java | 21 - .../service/logger/OperateLogService.java | 17 +- .../service/logger/OperateLogServiceImpl.java | 46 +-- .../logger/OperateLogServiceImplTest.java | 103 ++--- .../src/test/resources/sql/create_tables.sql | 17 +- 30 files changed, 185 insertions(+), 1188 deletions(-) delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLog.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkServiceImpl.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/{OperateLogV2PageReqDTO.java => OperateLogPageReqDTO.java} (81%) rename yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/{OperateLogV2RespDTO.java => OperateLogRespDTO.java} (96%) delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2CreateReqDTO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogV2DO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogV2Mapper.java diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index f7b7c292c8..2770b03339 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 03/04/2024 19:07:31 + Date: 04/04/2024 01:17:25 */ SET NAMES utf8mb4; @@ -347,7 +347,7 @@ CREATE TABLE `infra_api_access_log` ( `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, INDEX `idx_create_time`(`create_time` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35920 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; +) ENGINE = InnoDB AUTO_INCREMENT = 35925 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; -- ---------------------------- -- Records of infra_api_access_log @@ -726,7 +726,7 @@ CREATE TABLE `infra_file_config` ( -- ---------------------------- BEGIN; INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库', 1, '我是数据库', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2024-02-28 22:54:07', b'0'); -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器', 20, '', b'1', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\"}', '1', '2024-01-13 22:11:12', '1', '2024-01-13 22:24:06', b'0'); +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器', 20, '', b'1', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\"}', '1', '2024-01-13 22:11:12', '1', '2024-04-03 19:38:34', b'0'); COMMIT; -- ---------------------------- @@ -1420,7 +1420,7 @@ CREATE TABLE `system_login_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3066 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 3067 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; -- ---------------------------- -- Records of system_login_log @@ -2457,7 +2457,7 @@ CREATE TABLE `system_oauth2_access_token` ( PRIMARY KEY (`id`) USING BTREE, INDEX `idx_access_token`(`access_token` ASC) USING BTREE, INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6366 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 6372 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; -- ---------------------------- -- Records of system_oauth2_access_token @@ -2579,7 +2579,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1441 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 1442 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; -- ---------------------------- -- Records of system_oauth2_refresh_token @@ -2592,46 +2592,6 @@ COMMIT; -- ---------------------------- DROP TABLE IF EXISTS `system_operate_log`; CREATE TABLE `system_operate_log` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键', - `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链路追踪编号', - `user_id` bigint NOT NULL COMMENT '用户编号', - `user_type` tinyint NOT NULL DEFAULT 0 COMMENT '用户类型', - `module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模块标题', - `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名', - `type` bigint NOT NULL DEFAULT 0 COMMENT '操作分类', - `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作内容', - `exts` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '拓展字段', - `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '请求方法名', - `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '请求地址', - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户 IP', - `user_agent` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '浏览器 UA', - `java_method` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Java 方法名', - `java_method_args` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'Java 方法的参数', - `start_time` datetime NOT NULL COMMENT '操作时间', - `duration` int NOT NULL COMMENT '执行时长', - `result_code` int NOT NULL DEFAULT 0 COMMENT '结果码', - `result_msg` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '结果提示', - `result_data` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '结果数据', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 12000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; - --- ---------------------------- --- Records of system_operate_log --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for system_operate_log_v2 --- ---------------------------- -DROP TABLE IF EXISTS `system_operate_log_v2`; -CREATE TABLE `system_operate_log_v2` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键', `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链路追踪编号', `user_id` bigint NOT NULL COMMENT '用户编号', @@ -2655,7 +2615,7 @@ CREATE TABLE `system_operate_log_v2` ( ) ENGINE = InnoDB AUTO_INCREMENT = 9019 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; -- ---------------------------- --- Records of system_operate_log_v2 +-- Records of system_operate_log -- ---------------------------- BEGIN; COMMIT; @@ -5623,7 +5583,7 @@ CREATE TABLE `system_users` ( -- Records of system_users -- ---------------------------- BEGIN; -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '127.0.0.1', '2024-04-03 17:31:00', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-03 17:31:00', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '127.0.0.1', '2024-04-03 20:01:18', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-03 20:01:18', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', b'0', 1); diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java deleted file mode 100644 index 441ec6bbdb..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.config; - -import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkServiceImpl; -import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; - -@AutoConfiguration -public class YudaoOperateLogAutoConfiguration { - - @Bean - public OperateLogAspect operateLogAspect() { - return new OperateLogAspect(); - } - - @Bean - public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi) { - return new OperateLogFrameworkServiceImpl(operateLogApi); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java deleted file mode 100644 index 4371fa8831..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java +++ /dev/null @@ -1,375 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.aop; - -import cn.hutool.core.date.LocalDateTimeUtil; -import cn.hutool.core.exceptions.ExceptionUtil; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog; -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; -import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; -import com.google.common.collect.Maps; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.multipart.MultipartFile; - -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.lang.annotation.Annotation; -import java.lang.reflect.Array; -import java.time.LocalDateTime; -import java.util.*; -import java.util.function.Predicate; -import java.util.stream.IntStream; - -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR; -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; - -/** - * 拦截使用 @OperateLog 注解,如果满足条件,则生成操作日志。 - * 满足如下任一条件,则会进行记录: - * 1. 使用 @ApiOperation + 非 @GetMapping - * 2. 使用 @OperateLog 注解 - *

- * 但是,如果声明 @OperateLog 注解时,将 enable 属性设置为 false 时,强制不记录。 - * - * @author 芋道源码 - */ -@Aspect -@Slf4j -public class OperateLogAspect { - - /** - * 用于记录操作内容的上下文 - * - * @see OperateLog#getContent() - */ - private static final ThreadLocal CONTENT = new ThreadLocal<>(); - /** - * 用于记录拓展字段的上下文 - * - * @see OperateLog#getExts() - */ - private static final ThreadLocal> EXTS = new ThreadLocal<>(); - - @Resource - private OperateLogFrameworkService operateLogFrameworkService; - - @Around("@annotation(operation)") - public Object around(ProceedingJoinPoint joinPoint, Operation operation) throws Throwable { - // 可能也添加了 @ApiOperation 注解 - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class); - return around0(joinPoint, operateLog, operation); - } - - @Around("!@annotation(io.swagger.v3.oas.annotations.Operation) && @annotation(operateLog)") - // 兼容处理,只添加 @OperateLog 注解的情况 - public Object around(ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable { - return around0(joinPoint, operateLog, null); - } - - private Object around0(ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - Operation operation) throws Throwable { - // 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录 - Integer userType = WebFrameworkUtils.getLoginUserType(); - if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) { - return joinPoint.proceed(); - } - - // 记录开始时间 - LocalDateTime startTime = LocalDateTime.now(); - try { - // 执行原有方法 - Object result = joinPoint.proceed(); - // 记录正常执行时的操作日志 - this.log(joinPoint, operateLog, operation, startTime, result, null); - return result; - } catch (Throwable exception) { - this.log(joinPoint, operateLog, operation, startTime, null, exception); - throw exception; - } finally { - clearThreadLocal(); - } - } - - public static void setContent(String content) { - CONTENT.set(content); - } - - public static void addExt(String key, Object value) { - if (EXTS.get() == null) { - EXTS.set(new HashMap<>()); - } - EXTS.get().put(key, value); - } - - private static void clearThreadLocal() { - CONTENT.remove(); - EXTS.remove(); - } - - private void log(ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - Operation operation, - LocalDateTime startTime, Object result, Throwable exception) { - try { - // 判断不记录的情况 - if (!isLogEnable(joinPoint, operateLog)) { - return; - } - // 真正记录操作日志 - this.log0(joinPoint, operateLog, operation, startTime, result, exception); - } catch (Throwable ex) { - log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]", - joinPoint, operateLog, operation, result, exception, ex); - } - } - - private void log0(ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - Operation operation, - LocalDateTime startTime, Object result, Throwable exception) { - OperateLog operateLogObj = new OperateLog(); - // 补全通用字段 - operateLogObj.setTraceId(TracerUtils.getTraceId()); - operateLogObj.setStartTime(startTime); - // 补充用户信息 - fillUserFields(operateLogObj); - // 补全模块信息 - fillModuleFields(operateLogObj, joinPoint, operateLog, operation); - // 补全请求信息 - fillRequestFields(operateLogObj); - // 补全方法信息 - fillMethodFields(operateLogObj, joinPoint, operateLog, startTime, result, exception); - - // 异步记录日志 - operateLogFrameworkService.createOperateLog(operateLogObj); - } - - private static void fillUserFields(OperateLog operateLogObj) { - operateLogObj.setUserId(WebFrameworkUtils.getLoginUserId()); - operateLogObj.setUserType(WebFrameworkUtils.getLoginUserType()); - } - - private static void fillModuleFields(OperateLog operateLogObj, - ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - Operation operation) { - // module 属性 - if (operateLog != null) { - operateLogObj.setModule(operateLog.module()); - } - if (StrUtil.isEmpty(operateLogObj.getModule())) { - Tag tag = getClassAnnotation(joinPoint, Tag.class); - if (tag != null) { - // 优先读取 @Tag 的 name 属性 - if (StrUtil.isNotEmpty(tag.name())) { - operateLogObj.setModule(tag.name()); - } - // 没有的话,读取 @API 的 description 属性 - if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(tag.description())) { - operateLogObj.setModule(tag.description()); - } - } - } - // name 属性 - if (operateLog != null) { - operateLogObj.setName(operateLog.name()); - } - if (StrUtil.isEmpty(operateLogObj.getName()) && operation != null) { - operateLogObj.setName(operation.summary()); - } - // type 属性 - if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) { - operateLogObj.setType(operateLog.type()[0].getType()); - } - if (operateLogObj.getType() == null) { - RequestMethod requestMethod = obtainFirstMatchRequestMethod(obtainRequestMethod(joinPoint)); - OperateTypeEnum operateLogType = convertOperateLogType(requestMethod); - operateLogObj.setType(operateLogType != null ? operateLogType.getType() : null); - } - // content 和 exts 属性 - operateLogObj.setContent(CONTENT.get()); - operateLogObj.setExts(EXTS.get()); - } - - private static void fillRequestFields(OperateLog operateLogObj) { - // 获得 Request 对象 - HttpServletRequest request = ServletUtils.getRequest(); - if (request == null) { - return; - } - // 补全请求信息 - operateLogObj.setRequestMethod(request.getMethod()); - operateLogObj.setRequestUrl(request.getRequestURI()); - operateLogObj.setUserIp(ServletUtils.getClientIP(request)); - operateLogObj.setUserAgent(ServletUtils.getUserAgent(request)); - } - - private static void fillMethodFields(OperateLog operateLogObj, - ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - LocalDateTime startTime, Object result, Throwable exception) { - MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); - operateLogObj.setJavaMethod(methodSignature.toString()); - if (operateLog == null || operateLog.logArgs()) { - operateLogObj.setJavaMethodArgs(obtainMethodArgs(joinPoint)); - } - if (operateLog == null || operateLog.logResultData()) { - operateLogObj.setResultData(obtainResultData(result)); - } - operateLogObj.setDuration((int) (LocalDateTimeUtil.between(startTime, LocalDateTime.now()).toMillis())); - // (正常)处理 resultCode 和 resultMsg 字段 - if (result instanceof CommonResult) { - CommonResult commonResult = (CommonResult) result; - operateLogObj.setResultCode(commonResult.getCode()); - operateLogObj.setResultMsg(commonResult.getMsg()); - } else { - operateLogObj.setResultCode(SUCCESS.getCode()); - } - // (异常)处理 resultCode 和 resultMsg 字段 - if (exception != null) { - operateLogObj.setResultCode(INTERNAL_SERVER_ERROR.getCode()); - operateLogObj.setResultMsg(ExceptionUtil.getRootCauseMessage(exception)); - } - } - - private static boolean isLogEnable(ProceedingJoinPoint joinPoint, - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) { - // 有 @OperateLog 注解的情况下 - if (operateLog != null) { - return operateLog.enable(); - } - // 没有 @ApiOperation 注解的情况下,只记录 POST、PUT、DELETE 的情况 - return obtainFirstLogRequestMethod(obtainRequestMethod(joinPoint)) != null; - } - - private static RequestMethod obtainFirstLogRequestMethod(RequestMethod[] requestMethods) { - if (ArrayUtil.isEmpty(requestMethods)) { - return null; - } - return Arrays.stream(requestMethods).filter(requestMethod -> - requestMethod == RequestMethod.POST - || requestMethod == RequestMethod.PUT - || requestMethod == RequestMethod.DELETE) - .findFirst().orElse(null); - } - - private static RequestMethod obtainFirstMatchRequestMethod(RequestMethod[] requestMethods) { - if (ArrayUtil.isEmpty(requestMethods)) { - return null; - } - // 优先,匹配最优的 POST、PUT、DELETE - RequestMethod result = obtainFirstLogRequestMethod(requestMethods); - if (result != null) { - return result; - } - // 然后,匹配次优的 GET - result = Arrays.stream(requestMethods).filter(requestMethod -> requestMethod == RequestMethod.GET) - .findFirst().orElse(null); - if (result != null) { - return result; - } - // 兜底,获得第一个 - return requestMethods[0]; - } - - private static OperateTypeEnum convertOperateLogType(RequestMethod requestMethod) { - if (requestMethod == null) { - return null; - } - switch (requestMethod) { - case GET: - return OperateTypeEnum.GET; - case POST: - return OperateTypeEnum.CREATE; - case PUT: - return OperateTypeEnum.UPDATE; - case DELETE: - return OperateTypeEnum.DELETE; - default: - return OperateTypeEnum.OTHER; - } - } - - private static RequestMethod[] obtainRequestMethod(ProceedingJoinPoint joinPoint) { - RequestMapping requestMapping = AnnotationUtils.getAnnotation( // 使用 Spring 的工具类,可以处理 @RequestMapping 别名注解 - ((MethodSignature) joinPoint.getSignature()).getMethod(), RequestMapping.class); - return requestMapping != null ? requestMapping.method() : new RequestMethod[]{}; - } - - @SuppressWarnings("SameParameterValue") - private static T getMethodAnnotation(ProceedingJoinPoint joinPoint, Class annotationClass) { - return ((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(annotationClass); - } - - @SuppressWarnings("SameParameterValue") - private static T getClassAnnotation(ProceedingJoinPoint joinPoint, Class annotationClass) { - return ((MethodSignature) joinPoint.getSignature()).getMethod().getDeclaringClass().getAnnotation(annotationClass); - } - - private static String obtainMethodArgs(ProceedingJoinPoint joinPoint) { - // TODO 提升:参数脱敏和忽略 - MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); - String[] argNames = methodSignature.getParameterNames(); - Object[] argValues = joinPoint.getArgs(); - // 拼接参数 - Map args = Maps.newHashMapWithExpectedSize(argValues.length); - for (int i = 0; i < argNames.length; i++) { - String argName = argNames[i]; - Object argValue = argValues[i]; - // 被忽略时,标记为 ignore 字符串,避免和 null 混在一起 - args.put(argName, !isIgnoreArgs(argValue) ? argValue : "[ignore]"); - } - return JsonUtils.toJsonString(args); - } - - private static String obtainResultData(Object result) { - // TODO 提升:结果脱敏和忽略 - if (result instanceof CommonResult) { - result = ((CommonResult) result).getData(); - } - return JsonUtils.toJsonString(result); - } - - private static boolean isIgnoreArgs(Object object) { - Class clazz = object.getClass(); - // 处理数组的情况 - if (clazz.isArray()) { - return IntStream.range(0, Array.getLength(object)) - .anyMatch(index -> isIgnoreArgs(Array.get(object, index))); - } - // 递归,处理数组、Collection、Map 的情况 - if (Collection.class.isAssignableFrom(clazz)) { - return ((Collection) object).stream() - .anyMatch((Predicate) OperateLogAspect::isIgnoreArgs); - } - if (Map.class.isAssignableFrom(clazz)) { - return isIgnoreArgs(((Map) object).values()); - } - // obj - return object instanceof MultipartFile - || object instanceof HttpServletRequest - || object instanceof HttpServletResponse - || object instanceof BindingResult; - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java deleted file mode 100644 index 58aa3d59ee..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLog.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLog.java deleted file mode 100644 index 1e3b8c8a86..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLog.java +++ /dev/null @@ -1,110 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.service; - -import lombok.Data; - -import java.time.LocalDateTime; -import java.util.Map; - -/** - * 操作日志 - * - * @author 芋道源码 - */ -@Data -public class OperateLog { - - /** - * 链路追踪编号 - */ - private String traceId; - - /** - * 用户编号 - */ - private Long userId; - /** - * 用户类型 - */ - private Integer userType; - - /** - * 操作模块 - */ - private String module; - - /** - * 操作名 - */ - private String name; - - /** - * 操作分类 - */ - private Integer type; - - /** - * 操作明细 - */ - private String content; - - /** - * 拓展字段 - */ - private Map exts; - - /** - * 请求方法名 - */ - private String requestMethod; - - /** - * 请求地址 - */ - private String requestUrl; - - /** - * 用户 IP - */ - private String userIp; - - /** - * 浏览器 UserAgent - */ - private String userAgent; - - /** - * Java 方法名 - */ - private String javaMethod; - - /** - * Java 方法的参数 - */ - private String javaMethodArgs; - - /** - * 开始时间 - */ - private LocalDateTime startTime; - - /** - * 执行时长,单位:毫秒 - */ - private Integer duration; - - /** - * 结果码 - */ - private Integer resultCode; - - /** - * 结果提示 - */ - private String resultMsg; - - /** - * 结果数据 - */ - private String resultData; - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java deleted file mode 100644 index 2356162440..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.service; - -/** - * 操作日志 Framework Service 接口 - * - * @author 芋道源码 - */ -public interface OperateLogFrameworkService { - - /** - * 记录操作日志 - * - * @param operateLog 操作日志请求 - */ - void createOperateLog(OperateLog operateLog); - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkServiceImpl.java deleted file mode 100644 index 495193f7cb..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.service; - -import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; -import lombok.RequiredArgsConstructor; -import org.springframework.scheduling.annotation.Async; - -/** - * 操作日志 Framework Service 实现类 - * - * 基于 {@link OperateLogApi} 实现,记录操作日志 - * - * @author 芋道源码 - */ -@RequiredArgsConstructor -public class OperateLogFrameworkServiceImpl implements OperateLogFrameworkService { - - private final OperateLogApi operateLogApi; - - @Override - @Async - public void createOperateLog(OperateLog operateLog) { - OperateLogCreateReqDTO reqDTO = BeanUtil.toBean(operateLog, OperateLogCreateReqDTO.class); - operateLogApi.createOperateLog(reqDTO); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java deleted file mode 100644 index a9801e50e1..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.util; - -import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; - -/** - * 操作日志工具类 - * 目前主要的作用,是提供给业务代码,记录操作明细和拓展字段 - * - * @author 芋道源码 - */ -public class OperateLogUtils { - - public static void setContent(String content) { - OperateLogAspect.setContent(content); - } - - public static void addExt(String key, Object value) { - OperateLogAspect.addExt(key, value); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java deleted file mode 100644 index d272b53b4c..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 用户操作日志:记录用户的操作,用于对用户的操作的审计与追溯,永久保存。 - * - * @author 芋道源码 - */ -package cn.iocoder.yudao.framework.operatelog; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 04ccab1cd2..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogAutoConfiguration \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/LogRecordServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/LogRecordServiceImpl.java index 5f0ba9b6dc..d6aeb3bf0e 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/LogRecordServiceImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/LogRecordServiceImpl.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; import com.mzt.logapi.beans.LogRecord; import com.mzt.logapi.service.ILogRecordService; import jakarta.annotation.Resource; @@ -30,7 +30,7 @@ public class LogRecordServiceImpl implements ILogRecordService { @Override public void record(LogRecord logRecord) { // 1. 补全通用字段 - OperateLogV2CreateReqDTO reqDTO = new OperateLogV2CreateReqDTO(); + OperateLogCreateReqDTO reqDTO = new OperateLogCreateReqDTO(); reqDTO.setTraceId(TracerUtils.getTraceId()); // 补充用户信息 fillUserFields(reqDTO); @@ -40,12 +40,10 @@ public class LogRecordServiceImpl implements ILogRecordService { fillRequestFields(reqDTO); // 2. 异步记录日志 - operateLogApi.createOperateLogV2(reqDTO); - // TODO 测试结束删除或搞个开关 - log.info("操作日志 ===> {}", reqDTO); + operateLogApi.createOperateLog(reqDTO); } - private static void fillUserFields(OperateLogV2CreateReqDTO reqDTO) { + private static void fillUserFields(OperateLogCreateReqDTO reqDTO) { // 使用 SecurityFrameworkUtils。因为要考虑,rpc、mq、job,它其实不是 web; LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); if (loginUser == null) { @@ -55,7 +53,7 @@ public class LogRecordServiceImpl implements ILogRecordService { reqDTO.setUserType(loginUser.getUserType()); } - public static void fillModuleFields(OperateLogV2CreateReqDTO reqDTO, LogRecord logRecord) { + public static void fillModuleFields(OperateLogCreateReqDTO reqDTO, LogRecord logRecord) { reqDTO.setType(logRecord.getType()); // 大模块类型,例如:CRM 客户 reqDTO.setSubType(logRecord.getSubType());// 操作名称,例如:转移客户 reqDTO.setBizId(Long.parseLong(logRecord.getBizNo())); // 业务编号,例如:客户编号 @@ -63,7 +61,7 @@ public class LogRecordServiceImpl implements ILogRecordService { reqDTO.setExtra(logRecord.getExtra()); // 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ),例如说,记录订单编号,{ orderId: "1"} } - private static void fillRequestFields(OperateLogV2CreateReqDTO reqDTO) { + private static void fillRequestFields(OperateLogCreateReqDTO reqDTO) { // 获得 Request 对象 HttpServletRequest request = ServletUtils.getRequest(); if (request == null) { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/operatelog/CrmOperateLogController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/operatelog/CrmOperateLogController.java index a94a32cf5b..5b03191d8c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/operatelog/CrmOperateLogController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/operatelog/CrmOperateLogController.java @@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.crm.controller.admin.operatelog.vo.CrmOperateLogR import cn.iocoder.yudao.module.crm.enums.LogRecordConstants; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; @@ -55,9 +55,9 @@ public class CrmOperateLogController { @Operation(summary = "获得操作日志") @PreAuthorize("@ss.hasPermission('crm:operate-log:query')") public CommonResult> getCustomerOperateLog(@Valid CrmOperateLogPageReqVO pageReqVO) { - OperateLogV2PageReqDTO reqDTO = new OperateLogV2PageReqDTO(); + OperateLogPageReqDTO reqDTO = new OperateLogPageReqDTO(); reqDTO.setPageSize(PAGE_SIZE_NONE); // 默认不分页,需要分页需注释 - reqDTO.setBizType(BIZ_TYPE_MAP.get(pageReqVO.getBizType())).setBizId(pageReqVO.getBizId()); + reqDTO.setType(BIZ_TYPE_MAP.get(pageReqVO.getBizType())).setBizId(pageReqVO.getBizId()); return success(BeanUtils.toBean(operateLogApi.getOperateLogPage(reqDTO), CrmOperateLogRespVO.class)); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index d70452e220..650df057a5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -8,6 +8,8 @@ import cn.hutool.extra.template.TemplateConfig; import cn.hutool.extra.template.TemplateEngine; import cn.hutool.extra.template.engine.velocity.VelocityEngine; import cn.hutool.system.SystemUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; @@ -24,8 +26,6 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; @@ -211,7 +211,7 @@ public class CodegenEngine { globalBindingMap.put("LocalDateTimeUtilsClassName", LocalDateTimeUtils.class.getName()); globalBindingMap.put("ObjectUtilsClassName", ObjectUtils.class.getName()); globalBindingMap.put("DictConvertClassName", DictConvert.class.getName()); - globalBindingMap.put("OperateLogClassName", OperateLog.class.getName()); + globalBindingMap.put("ApiAccessLogClassName", ApiAccessLog.class.getName()); globalBindingMap.put("OperateTypeEnumClassName", OperateTypeEnum.class.getName()); globalBindingMap.put("BeanUtils", BeanUtils.class.getName()); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm index 32d00c7a56..a358d7cc03 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm @@ -23,7 +23,7 @@ import static ${CommonResultClassName}.success; import ${ExcelUtilsClassName}; -import ${OperateLogClassName}; +import ${ApiAccessLogClassName}; import static ${OperateTypeEnumClassName}.*; import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*; @@ -114,7 +114,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:export')") #end - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) #if ( $table.templateType != 2 ) public void export${simpleClassName}Excel(@Valid ${sceneEnum.prefixClass}${table.className}PageReqVO pageReqVO, HttpServletResponse response) throws IOException { diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java index 509d3f0a16..2cf1d6eb0f 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java @@ -2,9 +2,8 @@ package cn.iocoder.yudao.module.system.api.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; import jakarta.validation.Valid; /** @@ -21,19 +20,12 @@ public interface OperateLogApi { */ void createOperateLog(@Valid OperateLogCreateReqDTO createReqDTO); - /** - * 创建操作日志 - * - * @param createReqDTO 请求 - */ - void createOperateLogV2(@Valid OperateLogV2CreateReqDTO createReqDTO); - /** * 获取指定模块的指定数据的操作日志分页 * * @param pageReqVO 请求 * @return 操作日志分页 */ - PageResult getOperateLogPage(OperateLogV2PageReqDTO pageReqVO); + PageResult getOperateLogPage(OperateLogPageReqDTO pageReqVO); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java index 6c2d199e8f..87c0254b73 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java @@ -1,123 +1,84 @@ package cn.iocoder.yudao.module.system.api.logger.dto; -import lombok.Data; - +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; -import java.time.LocalDateTime; -import java.util.Map; +import lombok.Data; /** - * 操作日志创建 Request DTO + * 系统操作日志 Create Request DTO + * + * @author HUIHUI */ @Data public class OperateLogCreateReqDTO { /** * 链路追踪编号 + * + * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 */ private String traceId; - /** * 用户编号 + * + * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 */ @NotNull(message = "用户编号不能为空") private Long userId; /** * 用户类型 + * + * 关联 {@link UserTypeEnum} */ @NotNull(message = "用户类型不能为空") private Integer userType; - /** - * 操作模块 + * 操作模块类型 */ - @NotEmpty(message = "操作模块不能为空") - private String module; - + @NotEmpty(message = "操作模块类型不能为空") + private String type; /** * 操作名 */ - @NotEmpty(message = "操作名") - private String name; - + @NotEmpty(message = "操作名不能为空") + private String subType; /** - * 操作分类 + * 操作模块业务编号 */ - @NotNull(message = "操作分类不能为空") - private Integer type; - + @NotNull(message = "操作模块业务编号不能为空") + private Long bizId; /** - * 操作明细 + * 操作内容,记录整个操作的明细 + * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 */ - private String content; - + @NotEmpty(message = "操作内容不能为空") + private String action; /** - * 拓展字段 + * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) + * 例如说,记录订单编号,{ orderId: "1"} */ - private Map exts; + private String extra; /** * 请求方法名 */ @NotEmpty(message = "请求方法名不能为空") private String requestMethod; - /** * 请求地址 */ @NotEmpty(message = "请求地址不能为空") private String requestUrl; - /** * 用户 IP */ @NotEmpty(message = "用户 IP 不能为空") private String userIp; - /** - * 浏览器 UserAgent + * 浏览器 UA */ - @NotEmpty(message = "浏览器 UserAgent 不能为空") + @NotEmpty(message = "浏览器 UA 不能为空") private String userAgent; - /** - * Java 方法名 - */ - @NotEmpty(message = "Java 方法名不能为空") - private String javaMethod; - - /** - * Java 方法的参数 - */ - private String javaMethodArgs; - - /** - * 开始时间 - */ - @NotNull(message = "开始时间不能为空") - private LocalDateTime startTime; - - /** - * 执行时长,单位:毫秒 - */ - @NotNull(message = "执行时长不能为空") - private Integer duration; - - /** - * 结果码 - */ - @NotNull(message = "结果码不能为空") - private Integer resultCode; - - /** - * 结果提示 - */ - private String resultMsg; - - /** - * 结果数据 - */ - private String resultData; - } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2PageReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogPageReqDTO.java similarity index 81% rename from yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2PageReqDTO.java rename to yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogPageReqDTO.java index aa54c3f5cb..80e52cd5de 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2PageReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogPageReqDTO.java @@ -9,12 +9,12 @@ import lombok.Data; * @author HUIHUI */ @Data -public class OperateLogV2PageReqDTO extends PageParam { +public class OperateLogPageReqDTO extends PageParam { /** * 模块类型 */ - private String bizType; + private String type; /** * 模块数据编号 */ diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2RespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogRespDTO.java similarity index 96% rename from yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2RespDTO.java rename to yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogRespDTO.java index 2e3997cd07..34a7526f9d 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2RespDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogRespDTO.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; * @author HUIHUI */ @Data -public class OperateLogV2RespDTO implements VO { +public class OperateLogRespDTO implements VO { /** * 日志编号 diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2CreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2CreateReqDTO.java deleted file mode 100644 index eed1df1338..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2CreateReqDTO.java +++ /dev/null @@ -1,84 +0,0 @@ -package cn.iocoder.yudao.module.system.api.logger.dto; - -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -/** - * 系统操作日志 Create Request DTO - * - * @author HUIHUI - */ -@Data -public class OperateLogV2CreateReqDTO { - - /** - * 链路追踪编号 - * - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 - */ - private String traceId; - /** - * 用户编号 - * - * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 - */ - @NotNull(message = "用户编号不能为空") - private Long userId; - /** - * 用户类型 - * - * 关联 {@link UserTypeEnum} - */ - @NotNull(message = "用户类型不能为空") - private Integer userType; - /** - * 操作模块类型 - */ - @NotEmpty(message = "操作模块类型不能为空") - private String type; - /** - * 操作名 - */ - @NotEmpty(message = "操作名不能为空") - private String subType; - /** - * 操作模块业务编号 - */ - @NotNull(message = "操作模块业务编号不能为空") - private Long bizId; - /** - * 操作内容,记录整个操作的明细 - * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 - */ - @NotEmpty(message = "操作内容不能为空") - private String action; - /** - * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) - * 例如说,记录订单编号,{ orderId: "1"} - */ - private String extra; - - /** - * 请求方法名 - */ - @NotEmpty(message = "请求方法名不能为空") - private String requestMethod; - /** - * 请求地址 - */ - @NotEmpty(message = "请求地址不能为空") - private String requestUrl; - /** - * 用户 IP - */ - @NotEmpty(message = "用户 IP 不能为空") - private String userIp; - /** - * 浏览器 UA - */ - @NotEmpty(message = "浏览器 UA 不能为空") - private String userAgent; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java index 3f7b66d27e..5705ea1807 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java @@ -1,13 +1,11 @@ package cn.iocoder.yudao.module.system.api.logger; -import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import cn.iocoder.yudao.module.system.service.logger.OperateLogService; import com.fhs.core.trans.anno.TransMethodResult; import jakarta.annotation.Resource; @@ -28,24 +26,16 @@ public class OperateLogApiImpl implements OperateLogApi { private OperateLogService operateLogService; @Override + @Async public void createOperateLog(OperateLogCreateReqDTO createReqDTO) { operateLogService.createOperateLog(createReqDTO); } - @Override - @Async - public void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO) { - operateLogService.createOperateLogV2(createReqDTO); - } - @Override @TransMethodResult - public PageResult getOperateLogPage(OperateLogV2PageReqDTO pageReqVO) { - PageResult operateLogPage = operateLogService.getOperateLogPage(pageReqVO); - if (CollUtil.isEmpty(operateLogPage.getList())) { - return PageResult.empty(); - } - return BeanUtils.toBean(operateLogPage, OperateLogV2RespDTO.class); + public PageResult getOperateLogPage(OperateLogPageReqDTO pageReqVO) { + PageResult operateLogPage = operateLogService.getOperateLogPage(pageReqVO); + return BeanUtils.toBean(operateLogPage, OperateLogRespDTO.class); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java index 5c1742e58c..1061f6d057 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java @@ -13,20 +13,23 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class OperateLogPageReqVO extends PageParam { - @Schema(description = "操作模块,模拟匹配", example = "订单") - private String module; + @Schema(description = "用户编号", example = "芋道") + private Long userId; + + @Schema(description = "操作模块业务编号", example = "1") + private Long bizId; - @Schema(description = "用户昵称,模拟匹配", example = "芋道") - private String userNickname; + @Schema(description = "操作模块,模拟匹配", example = "订单") + private String type; - @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1") - private Integer type; + @Schema(description = "操作名,模拟匹配", example = "创建订单") + private String subType; - @Schema(description = "操作状态", example = "true") - private Boolean success; + @Schema(description = "操作明细,模拟匹配", example = "修改编号为 1 的用户信息") + private String action; @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] startTime; + private LocalDateTime[] createTime; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java index 575dc417b6..e017ba7cbe 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java @@ -1,9 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import com.fhs.core.trans.anno.Trans; @@ -14,7 +11,6 @@ import jakarta.validation.constraints.NotEmpty; import lombok.Data; import java.time.LocalDateTime; -import java.util.Map; @Schema(description = "管理后台 - 操作日志 Response VO") @Data @@ -29,31 +25,29 @@ public class OperateLogRespVO implements VO { private String traceId; @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "userNickname") + @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "userName") private Long userId; - @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") @ExcelProperty("操作人") - private String userNickname; + private String userName; - @Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单") - @ExcelProperty("操作模块") - private String module; + @Schema(description = "操作模块类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单") + @ExcelProperty("操作模块类型") + private String type; @Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "创建订单") @ExcelProperty("操作名") - private String name; + private String subType; - @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty(value = "操作类型", converter = DictConvert.class) - @DictFormat(DictTypeConstants.OPERATE_TYPE) - private Integer type; + @Schema(description = "操作模块业务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("操作模块业务编号") + private Long bizId; @Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") - private String content; + private String action; @Schema(description = "拓展字段", example = "{'orderId': 1}") - private Map exts; + private String extra; @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET") @NotEmpty(message = "请求方法名不能为空") @@ -68,28 +62,7 @@ public class OperateLogRespVO implements VO { @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0") private String userAgent; - @Schema(description = "Java 方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") - private String javaMethod; - - @Schema(description = "Java 方法的参数") - private String javaMethodArgs; - - @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("操作日志") - private LocalDateTime startTime; - - @Schema(description = "执行时长,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("执行时长") - private Integer duration; - - @Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty(value = "结果码") - private Integer resultCode; - - @Schema(description = "结果提示") - private String resultMsg; - - @Schema(description = "结果数据") - private String resultData; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java index d4d4df4971..3c7d171284 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java @@ -1,19 +1,11 @@ package cn.iocoder.yudao.module.system.dal.dataobject.logger; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import com.baomidou.mybatisplus.annotation.KeySequence; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.time.LocalDateTime; -import java.util.Map; /** * 操作日志表 @@ -23,19 +15,8 @@ import java.util.Map; @TableName(value = "system_operate_log", autoResultMap = true) @KeySequence("system_operate_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -@EqualsAndHashCode(callSuper = true) public class OperateLogDO extends BaseDO { - /** - * {@link #javaMethodArgs} 的最大长度 - */ - public static final Integer JAVA_METHOD_ARGS_MAX_LENGTH = 8000; - - /** - * {@link #resultData} 的最大长度 - */ - public static final Integer RESULT_MAX_LENGTH = 4000; - /** * 日志主键 */ @@ -60,30 +41,29 @@ public class OperateLogDO extends BaseDO { */ private Integer userType; /** - * 操作模块 + * 操作模块类型 */ - private String module; + private String type; /** * 操作名 */ - private String name; + private String subType; /** - * 操作分类 - * - * 枚举 {@link OperateTypeEnum} + * 操作模块业务编号 */ - private Integer type; + private Long bizId; /** - * 操作内容,记录整个操作的明细 + * 日志内容,记录整个操作的明细 + * * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 */ - private String content; + private String action; /** - * 拓展字段,有些复杂的业务,需要记录一些字段 - * 例如说,记录订单编号,则可以添加 key 为 "orderId",value 为订单编号 + * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) + * + * 例如说,记录订单编号,{ orderId: "1"} */ - @TableField(typeHandler = JacksonTypeHandler.class) - private Map exts; + private String extra; /** * 请求方法名 @@ -102,43 +82,4 @@ public class OperateLogDO extends BaseDO { */ private String userAgent; - /** - * Java 方法名 - */ - private String javaMethod; - /** - * Java 方法的参数 - * - * 实际格式为 Map - * 不使用 @TableField(typeHandler = FastjsonTypeHandler.class) 注解的原因是,数据库存储有长度限制,会进行裁剪,会导致 JSON 反序列化失败 - * 其中,key 为参数名,value 为参数值 - */ - private String javaMethodArgs; - /** - * 开始时间 - */ - private LocalDateTime startTime; - /** - * 执行时长,单位:毫秒 - */ - private Integer duration; - /** - * 结果码 - * - * 目前使用的 {@link CommonResult#getCode()} 属性 - */ - private Integer resultCode; - /** - * 结果提示 - * - * 目前使用的 {@link CommonResult#getMsg()} 属性 - */ - private String resultMsg; - /** - * 结果数据 - * - * 如果是对象,则使用 JSON 格式化 - */ - private String resultData; - } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogV2DO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogV2DO.java deleted file mode 100644 index 2b3741660d..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogV2DO.java +++ /dev/null @@ -1,87 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.dataobject.logger; - -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.KeySequence; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 操作日志表 V2 - * - * @author 芋道源码 - */ -@TableName(value = "system_operate_log_v2", autoResultMap = true) -@KeySequence("system_operate_log_seq_v2") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -public class OperateLogV2DO extends BaseDO { - - /** - * 日志主键 - */ - @TableId - private Long id; - /** - * 链路追踪编号 - * - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 - */ - private String traceId; - /** - * 用户编号 - * - * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 - */ - private Long userId; - /** - * 用户类型 - * - * 关联 {@link UserTypeEnum} - */ - private Integer userType; - /** - * 操作模块类型 - */ - private String type; - /** - * 操作名 - */ - private String subType; - /** - * 操作模块业务编号 - */ - private Long bizId; - /** - * 日志内容,记录整个操作的明细 - * - * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 - */ - private String action; - /** - * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) - * - * 例如说,记录订单编号,{ orderId: "1"} - */ - private String extra; - - /** - * 请求方法名 - */ - private String requestMethod; - /** - * 请求地址 - */ - private String requestUrl; - /** - * 用户 IP - */ - private String userIp; - /** - * 浏览器 UA - */ - private String userAgent; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java index 0bed6b8cc9..14e308b568 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java @@ -1,31 +1,33 @@ package cn.iocoder.yudao.module.system.dal.mysql.logger; -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import org.apache.ibatis.annotations.Mapper; -import java.util.Collection; - @Mapper public interface OperateLogMapper extends BaseMapperX { - default PageResult selectPage(OperateLogPageReqVO reqVO, Collection userIds) { - LambdaQueryWrapperX query = new LambdaQueryWrapperX() - .likeIfPresent(OperateLogDO::getModule, reqVO.getModule()) - .inIfPresent(OperateLogDO::getUserId, userIds) - .eqIfPresent(OperateLogDO::getType, reqVO.getType()) - .betweenIfPresent(OperateLogDO::getStartTime, reqVO.getStartTime()); - if (Boolean.TRUE.equals(reqVO.getSuccess())) { - query.eq(OperateLogDO::getResultCode, GlobalErrorCodeConstants.SUCCESS.getCode()); - } else if (Boolean.FALSE.equals(reqVO.getSuccess())) { - query.gt(OperateLogDO::getResultCode, GlobalErrorCodeConstants.SUCCESS.getCode()); - } - query.orderByDesc(OperateLogDO::getId); // 降序 - return selectPage(reqVO, query); + default PageResult selectPage(OperateLogPageReqVO pageReqDTO) { + return selectPage(pageReqDTO, new LambdaQueryWrapperX() + .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) + .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) + .likeIfPresent(OperateLogDO::getType, pageReqDTO.getType()) + .likeIfPresent(OperateLogDO::getSubType, pageReqDTO.getSubType()) + .likeIfPresent(OperateLogDO::getAction, pageReqDTO.getAction()) + .betweenIfPresent(OperateLogDO::getCreateTime, pageReqDTO.getCreateTime()) + .orderByDesc(OperateLogDO::getId)); + } + + default PageResult selectPage(OperateLogPageReqDTO pageReqDTO) { + return selectPage(pageReqDTO, new LambdaQueryWrapperX() + .eqIfPresent(OperateLogDO::getType, pageReqDTO.getType()) + .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) + .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) + .orderByDesc(OperateLogDO::getId)); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogV2Mapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogV2Mapper.java deleted file mode 100644 index 117c368e43..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogV2Mapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.mysql.logger; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface OperateLogV2Mapper extends BaseMapperX { - - default PageResult selectPage(OperateLogV2PageReqDTO pageReqDTO) { - return selectPage(pageReqDTO, new LambdaQueryWrapperX() - .eqIfPresent(OperateLogV2DO::getType, pageReqDTO.getBizType()) - .eqIfPresent(OperateLogV2DO::getBizId, pageReqDTO.getBizId()) - .eqIfPresent(OperateLogV2DO::getUserId, pageReqDTO.getUserId()) - .orderByDesc(OperateLogV2DO::getId)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java index 6843f2fb1c..56f713092b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java @@ -2,11 +2,9 @@ package cn.iocoder.yudao.module.system.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; /** * 操作日志 Service 接口 @@ -18,7 +16,7 @@ public interface OperateLogService { /** * 记录操作日志 * - * @param createReqDTO 操作日志请求 + * @param createReqDTO 创建请求 */ void createOperateLog(OperateLogCreateReqDTO createReqDTO); @@ -30,21 +28,12 @@ public interface OperateLogService { */ PageResult getOperateLogPage(OperateLogPageReqVO pageReqVO); - // ======================= LOG V2 ======================= - - /** - * 记录操作日志 V2 - * - * @param createReqDTO 创建请求 - */ - void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO); - /** * 获得操作日志分页列表 * * @param pageReqVO 分页条件 * @return 操作日志分页列表 */ - PageResult getOperateLogPage(OperateLogV2PageReqDTO pageReqVO); + PageResult getOperateLogPage(OperateLogPageReqDTO pageReqVO); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java index 0f31665fd2..6c341d5a11 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java @@ -1,31 +1,17 @@ package cn.iocoder.yudao.module.system.service.logger; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; -import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogV2Mapper; -import cn.iocoder.yudao.module.system.service.user.AdminUserService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import java.util.Collection; - -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.RESULT_MAX_LENGTH; - /** * 操作日志 Service 实现类 * @@ -38,45 +24,21 @@ public class OperateLogServiceImpl implements OperateLogService { @Resource private OperateLogMapper operateLogMapper; - @Resource - private OperateLogV2Mapper operateLogV2Mapper; - - @Resource - private AdminUserService userService; @Override public void createOperateLog(OperateLogCreateReqDTO createReqDTO) { OperateLogDO log = BeanUtils.toBean(createReqDTO, OperateLogDO.class); - log.setJavaMethodArgs(StrUtils.maxLength(log.getJavaMethodArgs(), JAVA_METHOD_ARGS_MAX_LENGTH)); - log.setResultData(StrUtils.maxLength(log.getResultData(), RESULT_MAX_LENGTH)); operateLogMapper.insert(log); } @Override public PageResult getOperateLogPage(OperateLogPageReqVO pageReqVO) { - // 处理基于用户昵称的查询 - Collection userIds = null; - if (StrUtil.isNotEmpty(pageReqVO.getUserNickname())) { - userIds = convertSet(userService.getUserListByNickname(pageReqVO.getUserNickname()), AdminUserDO::getId); - if (CollUtil.isEmpty(userIds)) { - return PageResult.empty(); - } - } - // 查询分页 - return operateLogMapper.selectPage(pageReqVO, userIds); - } - - // ======================= LOG V2 ======================= - - @Override - public void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO) { - OperateLogV2DO log = BeanUtils.toBean(createReqDTO, OperateLogV2DO.class); - operateLogV2Mapper.insert(log); + return operateLogMapper.selectPage(pageReqVO); } @Override - public PageResult getOperateLogPage(OperateLogV2PageReqDTO pageReqDTO) { - return operateLogV2Mapper.selectPage(pageReqDTO); + public PageResult getOperateLogPage(OperateLogPageReqDTO pageReqDTO) { + return operateLogMapper.selectPage(pageReqDTO); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java index a01c6644f3..90ba203b57 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java @@ -1,35 +1,22 @@ package cn.iocoder.yudao.module.system.service.logger; -import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.framework.test.core.util.RandomUtils; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; -import cn.iocoder.yudao.module.system.service.user.AdminUserService; +import jakarta.annotation.Resource; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; -import jakarta.annotation.Resource; -import java.util.Collections; - -import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.when; @Import({OperateLogServiceImpl.class}) public class OperateLogServiceImplTest extends BaseDbUnitTest { @@ -40,13 +27,9 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { @Resource private OperateLogMapper operateLogMapper; - @MockBean - private AdminUserService userService; - @Test public void testCreateOperateLog() { - OperateLogCreateReqDTO reqVO = RandomUtils.randomPojo(OperateLogCreateReqDTO.class, - o -> o.setExts(MapUtil.builder("orderId", randomLongId()).build())); + OperateLogCreateReqDTO reqVO = RandomUtils.randomPojo(OperateLogCreateReqDTO.class); // 调研 operateLogServiceImpl.createOperateLog(reqVO); @@ -56,44 +39,38 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { } @Test - public void testGetOperateLogPage() { - // mock(用户信息) - AdminUserDO user = RandomUtils.randomPojo(AdminUserDO.class, o -> { - o.setNickname("wang"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - }); - when(userService.getUserListByNickname("wang")).thenReturn(Collections.singletonList(user)); - Long userId = user.getId(); - + public void testGetOperateLogPage_vo() { // 构造操作日志 OperateLogDO operateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { - o.setUserId(userId); - o.setUserType(randomEle(UserTypeEnum.values()).getValue()); - o.setModule("order"); - o.setType(OperateTypeEnum.CREATE.getType()); - o.setStartTime(buildTime(2021, 3, 6)); - o.setResultCode(GlobalErrorCodeConstants.SUCCESS.getCode()); - o.setExts(MapUtil.builder("orderId", randomLongId()).build()); + o.setUserId(2048L); + o.setBizId(999L); + o.setType("订单"); + o.setSubType("创建订单"); + o.setAction("修改编号为 1 的用户信息"); + o.setCreateTime(buildTime(2021, 3, 6)); }); operateLogMapper.insert(operateLogDO); // 测试 userId 不匹配 - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(userId + 1))); - // 测试 module 不匹配 - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setModule("user"))); + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(1024L))); + // 测试 bizId 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setBizId(888L))); // 测试 type 不匹配 - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType(OperateTypeEnum.IMPORT.getType()))); + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType("退款"))); + // 测试 subType 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setSubType("创建退款"))); + // 测试 action 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setAction("修改编号为 1 退款信息"))); // 测试 createTime 不匹配 - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setStartTime(buildTime(2021, 2, 6)))); - // 测试 resultCode 不匹配 - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setResultCode(BAD_REQUEST.getCode()))); + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setCreateTime(buildTime(2021, 2, 6)))); // 构造调用参数 OperateLogPageReqVO reqVO = new OperateLogPageReqVO(); - reqVO.setUserNickname("wang"); - reqVO.setModule("order"); - reqVO.setType(OperateTypeEnum.CREATE.getType()); - reqVO.setStartTime(buildBetweenTime(2021, 3, 5, 2021, 3, 7)); - reqVO.setSuccess(true); + reqVO.setUserId(2048L); + reqVO.setBizId(999L); + reqVO.setType("订"); + reqVO.setSubType("订单"); + reqVO.setAction("用户信息"); + reqVO.setCreateTime(buildBetweenTime(2021, 3, 5, 2021, 3, 7)); // 调用 PageResult pageResult = operateLogServiceImpl.getOperateLogPage(reqVO); @@ -103,4 +80,34 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { assertPojoEquals(operateLogDO, pageResult.getList().get(0)); } + @Test + public void testGetOperateLogPage_dto() { + // 构造操作日志 + OperateLogDO operateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { + o.setUserId(2048L); + o.setBizId(999L); + o.setType("订单"); + }); + operateLogMapper.insert(operateLogDO); + // 测试 userId 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(1024L))); + // 测试 bizId 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setBizId(888L))); + // 测试 type 不匹配 + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType("退款"))); + + // 构造调用参数 + OperateLogPageReqDTO reqDTO = new OperateLogPageReqDTO(); + reqDTO.setUserId(2048L); + reqDTO.setBizId(999L); + reqDTO.setType("订单"); + + // 调用 + PageResult pageResult = operateLogServiceImpl.getOperateLogPage(reqDTO); + // 断言,只查到了一条符合条件的 + assertEquals(1, pageResult.getTotal()); + assertEquals(1, pageResult.getList().size()); + assertPojoEquals(operateLogDO, pageResult.getList().get(0)); + } + } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql index 78d4e83dd1..7b4de56159 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql @@ -202,22 +202,15 @@ CREATE TABLE IF NOT EXISTS `system_operate_log` ( `trace_id` varchar(64) NOT NULL DEFAULT '', `user_id` bigint(20) NOT NULL, "user_type" tinyint not null default '0', - `module` varchar(50) NOT NULL, - `name` varchar(50) NOT NULL, - `type` bigint(4) NOT NULL DEFAULT '0', - `content` varchar(2000) NOT NULL DEFAULT '', - `exts` varchar(512) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL, + `sub_type` varchar(50) NOT NULL, + `biz_id` bigint(20) NOT NULL, + `action` varchar(2000) NOT NULL DEFAULT '', + `extra` varchar(512) NOT NULL DEFAULT '', `request_method` varchar(16) DEFAULT '', `request_url` varchar(255) DEFAULT '', `user_ip` varchar(50) DEFAULT NULL, `user_agent` varchar(200) DEFAULT NULL, - `java_method` varchar(512) NOT NULL DEFAULT '', - `java_method_args` varchar(8000) DEFAULT '', - `start_time` datetime NOT NULL, - `duration` int(11) NOT NULL, - `result_code` int(11) NOT NULL DEFAULT '0', - `result_msg` varchar(512) DEFAULT '', - `result_data` varchar(4000) DEFAULT '', `creator` varchar(64) DEFAULT '', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updater` varchar(64) DEFAULT '', -- Gitee From 20583417a4c6a17655104284ef9b231ff3c3a4d1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 01:49:49 +0800 Subject: [PATCH 0155/1557] =?UTF-8?q?=E3=80=90=E9=87=8D=E6=9E=84=E3=80=91V?= =?UTF-8?q?2=20=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=BD=AC=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E5=9F=BA=E4=BA=8E=E6=B3=A8=E8=A7=A3=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8F=98=E9=87=8F=E3=80=81=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=87=BD=E6=95=B0=E7=9A=84=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 5 -- yudao-framework/pom.xml | 1 - .../pom.xml | 52 ----------------- .../core/annotations/OperateLog.java | 57 ------------------- .../core/enums/OperateTypeEnum.java | 55 ------------------ yudao-module-bpm/yudao-module-bpm-biz/pom.xml | 4 -- yudao-module-crm/yudao-module-crm-biz/pom.xml | 4 -- .../admin/business/CrmBusinessController.java | 6 +- .../admin/clue/CrmClueController.java | 6 +- .../admin/contact/CrmContactController.java | 7 +-- .../admin/contract/CrmContractController.java | 6 +- .../admin/customer/CrmCustomerController.java | 6 +- .../admin/product/CrmProductController.java | 6 +- .../receivable/CrmReceivableController.java | 9 +-- .../CrmReceivablePlanController.java | 6 +- yudao-module-erp/yudao-module-erp-biz/pom.xml | 4 -- .../admin/finance/ErpAccountController.java | 6 +- .../finance/ErpFinancePaymentController.java | 6 +- .../finance/ErpFinanceReceiptController.java | 6 +- .../product/ErpProductCategoryController.java | 6 +- .../admin/product/ErpProductController.java | 6 +- .../product/ErpProductUnitController.java | 6 +- .../purchase/ErpPurchaseInController.java | 6 +- .../purchase/ErpPurchaseOrderController.java | 6 +- .../purchase/ErpPurchaseReturnController.java | 6 +- .../admin/purchase/ErpSupplierController.java | 6 +- .../admin/sale/ErpCustomerController.java | 6 +- .../admin/sale/ErpSaleOrderController.java | 7 +-- .../admin/sale/ErpSaleOutController.java | 6 +- .../admin/sale/ErpSaleReturnController.java | 6 +- .../admin/stock/ErpStockCheckController.java | 6 +- .../admin/stock/ErpStockController.java | 6 +- .../admin/stock/ErpStockInController.java | 8 +-- .../admin/stock/ErpStockMoveController.java | 6 +- .../admin/stock/ErpStockOutController.java | 6 +- .../admin/stock/ErpStockRecordController.java | 6 +- .../admin/stock/ErpWarehouseController.java | 8 +-- .../yudao-module-infra-biz/pom.xml | 4 -- .../admin/config/ConfigController.java | 6 +- .../demo/demo01/Demo01ContactController.java | 12 ++-- .../demo/demo02/Demo02CategoryController.java | 12 ++-- .../demo/demo03/Demo03StudentController.java | 12 ++-- .../controller/admin/file/FileController.java | 2 - .../controller/admin/job/JobController.java | 12 ++-- .../admin/job/JobLogController.java | 12 ++-- .../admin/logger/ApiAccessLogController.java | 6 +- .../admin/logger/ApiErrorLogController.java | 6 +- .../yudao-module-product-biz/pom.xml | 4 -- .../admin/spu/ProductSpuController.java | 6 +- .../yudao-module-promotion-biz/pom.xml | 4 -- .../yudao-module-statistics-biz/pom.xml | 4 -- .../yudao-module-trade-biz/pom.xml | 4 -- .../admin/aftersale/AfterSaleController.java | 2 - .../delivery/DeliveryExpressController.java | 12 ++-- .../yudao-module-member-biz/pom.xml | 4 -- .../app/auth/AppAuthController.java | 2 - yudao-module-mp/yudao-module-mp-biz/pom.xml | 4 -- .../admin/open/MpOpenController.java | 2 - yudao-module-pay/yudao-module-pay-biz/pom.xml | 4 -- .../admin/demo/PayDemoOrderController.java | 3 - .../admin/demo/PayDemoTransferController.java | 2 - .../admin/notify/PayNotifyController.java | 3 - .../admin/order/PayOrderController.java | 12 ++-- .../admin/refund/PayRefundController.java | 12 ++-- .../wallet/PayWalletRechargeController.java | 3 - .../yudao-module-report-biz/pom.xml | 4 -- .../admin/goview/GoViewDataController.java | 3 - .../yudao-module-system-biz/pom.xml | 4 -- .../controller/admin/auth/AuthController.java | 7 --- .../admin/captcha/CaptchaController.java | 3 - .../controller/admin/dept/PostController.java | 14 ++--- .../admin/dict/DictDataController.java | 12 ++-- .../admin/dict/DictTypeController.java | 12 ++-- .../admin/errorcode/ErrorCodeController.java | 20 ++++--- .../admin/logger/LoginLogController.java | 12 ++-- .../admin/logger/OperateLogController.java | 6 +- .../admin/oauth2/OAuth2OpenController.java | 5 -- .../admin/permission/RoleController.java | 12 ++-- .../SensitiveWordController.java | 12 ++-- .../admin/sms/SmsCallbackController.java | 3 - .../admin/sms/SmsLogController.java | 12 ++-- .../admin/sms/SmsTemplateController.java | 6 +- .../admin/tenant/TenantController.java | 12 ++-- .../controller/admin/user/UserController.java | 12 ++-- 84 files changed, 223 insertions(+), 484 deletions(-) delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0d512d63ec..f5a03a90bd 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -90,11 +90,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - ${revision} - io.github.mouzt bizlog-sdk diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index 820fc4f2b3..76e674099b 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -25,7 +25,6 @@ yudao-spring-boot-starter-excel yudao-spring-boot-starter-test - yudao-spring-boot-starter-biz-operatelog yudao-spring-boot-starter-biz-tenant yudao-spring-boot-starter-biz-data-permission yudao-spring-boot-starter-biz-ip diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml deleted file mode 100644 index c52d8fc100..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - cn.iocoder.boot - yudao-framework - ${revision} - - 4.0.0 - yudao-spring-boot-starter-biz-operatelog - jar - - ${project.artifactId} - 操作日志 - https://github.com/YunaiV/ruoyi-vue-pro - - - - cn.iocoder.boot - yudao-common - - - - - org.springframework.boot - spring-boot-starter-aop - - - - - cn.iocoder.boot - yudao-spring-boot-starter-web - provided - - - - - cn.iocoder.boot - yudao-module-system-api - ${revision} - - - - - com.google.guava - guava - - - - - diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java deleted file mode 100644 index adac327369..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.annotations; - -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 操作日志注解 - * - * @author 芋道源码 - */ -@Target({ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface OperateLog { - - // ========== 模块字段 ========== - - /** - * 操作模块 - * - * 为空时,会尝试读取 {@link Tag#name()} 属性 - */ - String module() default ""; - /** - * 操作名 - * - * 为空时,会尝试读取 {@link Operation#summary()} 属性 - */ - String name() default ""; - /** - * 操作分类 - * - * 实际并不是数组,因为枚举不能设置 null 作为默认值 - */ - OperateTypeEnum[] type() default {}; - - // ========== 开关字段 ========== - - /** - * 是否记录操作日志 - */ - boolean enable() default true; - /** - * 是否记录方法参数 - */ - boolean logArgs() default true; - /** - * 是否记录方法结果的数据 - */ - boolean logResultData() default true; - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java deleted file mode 100644 index 65ee26d711..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java +++ /dev/null @@ -1,55 +0,0 @@ -package cn.iocoder.yudao.framework.operatelog.core.enums; - -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 操作日志的操作类型 - * - * @author ruoyi - */ -@Getter -@AllArgsConstructor -public enum OperateTypeEnum { - - /** - * 查询 - * - * 绝大多数情况下,不会记录查询动作,因为过于大量显得没有意义。 - * 在有需要的时候,通过声明 {@link OperateLog} 注解来记录 - */ - GET(1), - /** - * 新增 - */ - CREATE(2), - /** - * 修改 - */ - UPDATE(3), - /** - * 删除 - */ - DELETE(4), - /** - * 导出 - */ - EXPORT(5), - /** - * 导入 - */ - IMPORT(6), - /** - * 其它 - * - * 在无法归类时,可以选择使用其它。因为还有操作名可以进一步标识 - */ - OTHER(0); - - /** - * 类型 - */ - private final Integer type; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml index 4ba9929e71..207b166bad 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml +++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml @@ -28,10 +28,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-data-permission diff --git a/yudao-module-crm/yudao-module-crm-biz/pom.xml b/yudao-module-crm/yudao-module-crm-biz/pom.xml index 04e048da79..0af42a825b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/pom.xml +++ b/yudao-module-crm/yudao-module-crm-biz/pom.xml @@ -34,10 +34,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-ip diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java index 505c0ec46f..62aacf5064 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.business; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.*; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessProductDO; @@ -39,11 +39,11 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.CUSTOMER_NOT_EXISTS; @@ -167,7 +167,7 @@ public class CrmBusinessController { @GetMapping("/export-excel") @Operation(summary = "导出商机 Excel") @PreAuthorize("@ss.hasPermission('crm:business:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportBusinessExcel(@Valid CrmBusinessPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PAGE_SIZE_NONE); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java index ecfef7d012..f060e07d9c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.clue; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueRespVO; import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueSaveReqVO; @@ -37,11 +37,11 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static java.util.Collections.singletonList; @@ -112,7 +112,7 @@ public class CrmClueController { @GetMapping("/export-excel") @Operation(summary = "导出线索 Excel") @PreAuthorize("@ss.hasPermission('crm:clue:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportClueExcel(@Valid CrmCluePageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PAGE_SIZE_NONE); List list = clueService.getCluePage(pageReqVO, getLoginUserId()).getList(); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java index 5c7413159d..8d23f5635a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contact; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; @@ -9,7 +10,6 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.*; import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; @@ -37,11 +37,11 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static java.util.Collections.singletonList; @@ -73,7 +73,6 @@ public class CrmContactController { @PutMapping("/update") @Operation(summary = "更新联系人") - @OperateLog(enable = false) @PreAuthorize("@ss.hasPermission('crm:contact:update')") public CommonResult updateContact(@Valid @RequestBody CrmContactSaveReqVO updateReqVO) { contactService.updateContact(updateReqVO); @@ -142,7 +141,7 @@ public class CrmContactController { @GetMapping("/export-excel") @Operation(summary = "导出联系人 Excel") @PreAuthorize("@ss.hasPermission('crm:contact:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportContactExcel(@Valid CrmContactPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageNo(PAGE_SIZE_NONE); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java index d0f30db23c..94b90607a4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contract; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -9,7 +10,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO; import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractSaveReqVO; @@ -47,10 +47,10 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static java.util.Collections.singletonList; @@ -154,7 +154,7 @@ public class CrmContractController { @GetMapping("/export-excel") @Operation(summary = "导出合同 Excel") @PreAuthorize("@ss.hasPermission('crm:contract:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportContractExcel(@Valid CrmContractPageReqVO exportReqVO, HttpServletResponse response) throws IOException { PageResult pageResult = contractService.getContractPage(exportReqVO, getLoginUserId()); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index a7d86d9cfd..e9d5c63a2b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.core.KeyValue; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -14,7 +15,6 @@ import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerPoolConfigDO; @@ -44,10 +44,10 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; import static java.util.Collections.singletonList; @@ -242,7 +242,7 @@ public class CrmCustomerController { @GetMapping("/export-excel") @Operation(summary = "导出客户 Excel") @PreAuthorize("@ss.hasPermission('crm:customer:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportCustomerExcel(@Valid CrmCustomerPageReqVO pageVO, HttpServletResponse response) throws IOException { pageVO.setPageSize(PAGE_SIZE_NONE); // 不分页 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java index b8c1ed2089..c91e67ff85 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.crm.controller.admin.product; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.translate.core.TranslateUtils; import cn.iocoder.yudao.module.crm.controller.admin.product.vo.product.CrmProductPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.product.vo.product.CrmProductRespVO; @@ -27,9 +27,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - CRM 产品") @RestController @@ -94,7 +94,7 @@ public class CrmProductController { @GetMapping("/export-excel") @Operation(summary = "导出产品 Excel") @PreAuthorize("@ss.hasPermission('crm:product:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportProductExcel(@Valid CrmProductPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java index 37cdbb7697..d53cfcf4d0 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java @@ -2,13 +2,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; @@ -39,11 +39,12 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - CRM 回款") @@ -123,7 +124,7 @@ public class CrmReceivableController { @GetMapping("/export-excel") @Operation(summary = "导出回款 Excel") @PreAuthorize("@ss.hasPermission('crm:receivable:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportReceivableExcel(@Valid CrmReceivablePageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PAGE_SIZE_NONE); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java index 73b5b52927..dfb4114af4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanRespVO; import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanSaveReqVO; @@ -39,11 +39,11 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - CRM 回款计划") @@ -123,7 +123,7 @@ public class CrmReceivablePlanController { @GetMapping("/export-excel") @Operation(summary = "导出回款计划 Excel") @PreAuthorize("@ss.hasPermission('crm:receivable-plan:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportReceivablePlanExcel(@Valid CrmReceivablePlanPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/pom.xml b/yudao-module-erp/yudao-module-erp-biz/pom.xml index 53c9349506..f1a3f7a397 100644 --- a/yudao-module-erp/yudao-module-erp-biz/pom.xml +++ b/yudao-module-erp/yudao-module-erp-biz/pom.xml @@ -29,10 +29,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java index 4c8c980584..273d40dd6c 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountRespVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountSaveReqVO; @@ -26,9 +26,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 结算账户") @RestController @@ -103,7 +103,7 @@ public class ErpAccountController { @GetMapping("/export-excel") @Operation(summary = "导出结算账户 Excel") @PreAuthorize("@ss.hasPermission('erp:account:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportAccountExcel(@Valid ErpAccountPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java index b1f028a282..29b71e5dbb 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentRespVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentSaveReqVO; @@ -36,9 +36,9 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 付款单") @RestController @@ -114,7 +114,7 @@ public class ErpFinancePaymentController { @GetMapping("/export-excel") @Operation(summary = "导出付款单 Excel") @PreAuthorize("@ss.hasPermission('erp:finance-payment:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportFinancePaymentExcel(@Valid ErpFinancePaymentPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java index d36ab39900..e374b3c29a 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptRespVO; import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptSaveReqVO; @@ -36,9 +36,9 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 收款单") @RestController @@ -114,7 +114,7 @@ public class ErpFinanceReceiptController { @GetMapping("/export-excel") @Operation(summary = "导出收款单 Excel") @PreAuthorize("@ss.hasPermission('erp:finance-receipt:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportFinanceReceiptExcel(@Valid ErpFinanceReceiptPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java index 85f51c1c60..d56b9d8909 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategoryListReqVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategoryRespVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategorySaveReqVO; @@ -23,9 +23,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 产品分类") @RestController @@ -89,7 +89,7 @@ public class ErpProductCategoryController { @GetMapping("/export-excel") @Operation(summary = "导出产品分类 Excel") @PreAuthorize("@ss.hasPermission('erp:product-category:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportProductCategoryExcel(@Valid ErpProductCategoryListReqVO listReqVO, HttpServletResponse response) throws IOException { List list = productCategoryService.getProductCategoryList(listReqVO); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java index cde7bd704f..40ed30a208 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ProductSaveReqVO; @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 产品") @RestController @@ -92,7 +92,7 @@ public class ErpProductController { @GetMapping("/export-excel") @Operation(summary = "导出产品 Excel") @PreAuthorize("@ss.hasPermission('erp:product:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportProductExcel(@Valid ErpProductPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java index 0be3db01c8..c1f9d1acd0 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitRespVO; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitSaveReqVO; @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 产品单位") @RestController @@ -89,7 +89,7 @@ public class ErpProductUnitController { @GetMapping("/export-excel") @Operation(summary = "导出产品单位 Excel") @PreAuthorize("@ss.hasPermission('erp:product-unit:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportProductUnitExcel(@Valid ErpProductUnitPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java index d33c7ae4d6..754c3548fe 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.in.ErpPurchaseInPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.in.ErpPurchaseInRespVO; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 采购入库") @RestController @@ -125,7 +125,7 @@ public class ErpPurchaseInController { @GetMapping("/export-excel") @Operation(summary = "导出采购入库 Excel") @PreAuthorize("@ss.hasPermission('erp:purchase-in:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportPurchaseInExcel(@Valid ErpPurchaseInPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java index 203d2fec0b..a60fda222e 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.order.ErpPurchaseOrderPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.order.ErpPurchaseOrderRespVO; @@ -36,10 +36,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 采购订单") @RestController @@ -124,7 +124,7 @@ public class ErpPurchaseOrderController { @GetMapping("/export-excel") @Operation(summary = "导出采购订单 Excel") @PreAuthorize("@ss.hasPermission('erp:purchase-create:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java index 0df31bcf19..4afb083ea2 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.returns.ErpPurchaseReturnPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.returns.ErpPurchaseReturnRespVO; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 采购退货") @RestController @@ -125,7 +125,7 @@ public class ErpPurchaseReturnController { @GetMapping("/export-excel") @Operation(summary = "导出采购退货 Excel") @PreAuthorize("@ss.hasPermission('erp:purchase-return:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportPurchaseReturnExcel(@Valid ErpPurchaseReturnPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java index 88253286db..3337b38013 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierRespVO; import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierSaveReqVO; @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 供应商") @RestController @@ -89,7 +89,7 @@ public class ErpSupplierController { @GetMapping("/export-excel") @Operation(summary = "导出供应商 Excel") @PreAuthorize("@ss.hasPermission('erp:supplier:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSupplierExcel(@Valid ErpSupplierPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java index 2c2886460f..88d050ac67 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerRespVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerSaveReqVO; @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 客户") @RestController @@ -89,7 +89,7 @@ public class ErpCustomerController { @GetMapping("/export-excel") @Operation(summary = "导出客户 Excel") @PreAuthorize("@ss.hasPermission('erp:customer:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportCustomerExcel(@Valid ErpCustomerPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java index 0ca56a45eb..acb49e7634 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderRespVO; @@ -36,11 +36,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; - @Tag(name = "管理后台 - ERP 销售订单") @RestController @@ -125,7 +124,7 @@ public class ErpSaleOrderController { @GetMapping("/export-excel") @Operation(summary = "导出销售订单 Excel") @PreAuthorize("@ss.hasPermission('erp:sale-out:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSaleOrderExcel(@Valid ErpSaleOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java index 5875ea39f9..02c5561481 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.out.ErpSaleOutPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.out.ErpSaleOutRespVO; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 销售出库") @RestController @@ -125,7 +125,7 @@ public class ErpSaleOutController { @GetMapping("/export-excel") @Operation(summary = "导出销售出库 Excel") @PreAuthorize("@ss.hasPermission('erp:sale-out:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSaleOutExcel(@Valid ErpSaleOutPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java index 0dfba67e98..2a3a83411b 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.returns.ErpSaleReturnPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.returns.ErpSaleReturnRespVO; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 销售退货") @RestController @@ -125,7 +125,7 @@ public class ErpSaleReturnController { @GetMapping("/export-excel") @Operation(summary = "导出销售退货 Excel") @PreAuthorize("@ss.hasPermission('erp:sale-return:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSaleReturnExcel(@Valid ErpSaleReturnPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java index 298ed54fa7..5eda9617d2 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check.ErpStockCheckPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check.ErpStockCheckRespVO; @@ -32,10 +32,10 @@ import java.io.IOException; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 库存调拨单") @RestController @@ -113,7 +113,7 @@ public class ErpStockCheckController { @GetMapping("/export-excel") @Operation(summary = "导出库存调拨单 Excel") @PreAuthorize("@ss.hasPermission('erp:stock-check:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockCheckExcel(@Valid ErpStockCheckPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java index 912f59731a..f439272fa4 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.stock.ErpStockPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.stock.ErpStockRespVO; @@ -35,9 +35,9 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 产品库存") @RestController @@ -85,7 +85,7 @@ public class ErpStockController { @GetMapping("/export-excel") @Operation(summary = "导出产品库存 Excel") @PreAuthorize("@ss.hasPermission('erp:stock:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockExcel(@Valid ErpStockPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java index 8813da89a0..6f9e8b3143 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInSaveReqVO; +import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpSupplierDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInItemDO; -import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpSupplierDO; import cn.iocoder.yudao.module.erp.service.product.ErpProductService; import cn.iocoder.yudao.module.erp.service.purchase.ErpSupplierService; import cn.iocoder.yudao.module.erp.service.stock.ErpStockInService; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 其它入库单") @RestController @@ -125,7 +125,7 @@ public class ErpStockInController { @GetMapping("/export-excel") @Operation(summary = "导出其它入库单 Excel") @PreAuthorize("@ss.hasPermission('erp:stock-in:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockInExcel(@Valid ErpStockInPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java index 1df3fd7fca..df0ffc81d9 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.move.ErpStockMovePageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.move.ErpStockMoveRespVO; @@ -35,10 +35,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 库存调拨单") @RestController @@ -121,7 +121,7 @@ public class ErpStockMoveController { @GetMapping("/export-excel") @Operation(summary = "导出库存调拨单 Excel") @PreAuthorize("@ss.hasPermission('erp:stock-move:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockMoveExcel(@Valid ErpStockMovePageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java index 9ad592f1ad..10e7d47ab4 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutRespVO; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 其它出库单") @RestController @@ -125,7 +125,7 @@ public class ErpStockOutController { @GetMapping("/export-excel") @Operation(summary = "导出其它出库单 Excel") @PreAuthorize("@ss.hasPermission('erp:stock-out:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockOutExcel(@Valid ErpStockOutPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java index 6ed4538945..e1b0b36f6a 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.record.ErpStockRecordPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.record.ErpStockRecordRespVO; @@ -35,9 +35,9 @@ import java.io.IOException; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 产品库存明细") @RestController @@ -75,7 +75,7 @@ public class ErpStockRecordController { @GetMapping("/export-excel") @Operation(summary = "导出产品库存明细 Excel") @PreAuthorize("@ss.hasPermission('erp:stock-record:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportStockRecordExcel(@Valid ErpStockRecordPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java index 6b970bcb93..46901a2af3 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java @@ -1,15 +1,15 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseRespVO; +import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; import cn.iocoder.yudao.module.erp.service.stock.ErpWarehouseService; import io.swagger.v3.oas.annotations.Operation; @@ -26,9 +26,9 @@ import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - ERP 仓库") @RestController @@ -103,7 +103,7 @@ public class ErpWarehouseController { @GetMapping("/export-excel") @Operation(summary = "导出仓库 Excel") @PreAuthorize("@ss.hasPermission('erp:warehouse:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportWarehouseExcel(@Valid ErpWarehousePageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/pom.xml b/yudao-module-infra/yudao-module-infra-biz/pom.xml index d03084663b..44f3aef67b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/pom.xml +++ b/yudao-module-infra/yudao-module-infra-biz/pom.xml @@ -31,10 +31,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java index 480bff8bb1..edcb222548 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.infra.controller.admin.config; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.config.vo.*; import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; @@ -23,9 +23,9 @@ import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 参数配置") @RestController @@ -93,7 +93,7 @@ public class ConfigController { @GetMapping("/export") @Operation(summary = "导出参数配置") @PreAuthorize("@ss.hasPermission('infra:config:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportConfig(@Valid ConfigPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java index 522aafafdb..2cbf98ffe5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo01; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactRespVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactSaveReqVO; @@ -14,18 +14,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo01.Demo01ContactService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 示例联系人") @RestController @@ -80,7 +80,7 @@ public class Demo01ContactController { @GetMapping("/export-excel") @Operation(summary = "导出示例联系人 Excel") @PreAuthorize("@ss.hasPermission('infra:demo01-contact:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportDemo01ContactExcel(@Valid Demo01ContactPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java index 70cf1bb7ec..62228f5c2c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo02; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategoryListReqVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategoryRespVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategorySaveReqVO; @@ -12,18 +12,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo02.Demo02CategoryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 示例分类") @RestController @@ -78,7 +78,7 @@ public class Demo02CategoryController { @GetMapping("/export-excel") @Operation(summary = "导出示例分类 Excel") @PreAuthorize("@ss.hasPermission('infra:demo02-category:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportDemo02CategoryExcel(@Valid Demo02CategoryListReqVO listReqVO, HttpServletResponse response) throws IOException { List list = demo02CategoryService.getDemo02CategoryList(listReqVO); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java index 7ffd502b7c..624de732f4 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentRespVO; import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentSaveReqVO; @@ -16,18 +16,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo03.Demo03StudentService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 学生") @RestController @@ -82,7 +82,7 @@ public class Demo03StudentController { @GetMapping("/export-excel") @Operation(summary = "导出学生 Excel") @PreAuthorize("@ss.hasPermission('infra:demo03-student:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportDemo03StudentExcel(@Valid Demo03StudentPageReqVO pageReqVO, HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index 7e1dea2e89..bbd29dc291 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.*; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.service.file.FileService; @@ -40,7 +39,6 @@ public class FileController { @PostMapping("/upload") @Operation(summary = "上传文件", description = "模式一:后端上传文件") - @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要 public CommonResult uploadFile(FileUploadReqVO uploadReqVO) throws Exception { MultipartFile file = uploadReqVO.getFile(); String path = uploadReqVO.getPath(); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java index 4a74731dc2..ed9f75df02 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.job; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.quartz.core.util.CronUtils; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobRespVO; @@ -16,21 +16,21 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.quartz.SchedulerException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.time.LocalDateTime; import java.util.Collections; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 定时任务") @RestController @@ -110,7 +110,7 @@ public class JobController { @GetMapping("/export-excel") @Operation(summary = "导出定时任务 Excel") @PreAuthorize("@ss.hasPermission('infra:job:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportJobExcel(@Valid JobPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java index dd861b7497..f1a230eea1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.job; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogRespVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; @@ -13,6 +13,9 @@ import cn.iocoder.yudao.module.infra.service.job.JobLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -20,14 +23,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 定时任务日志") @RestController @@ -58,7 +58,7 @@ public class JobLogController { @GetMapping("/export-excel") @Operation(summary = "导出定时任务日志 Excel") @PreAuthorize("@ss.hasPermission('infra:job:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportJobLogExcel(@Valid JobLogPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java index acaef5290e..d170933df6 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogRespVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO; @@ -24,8 +24,8 @@ import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - API 访问日志") @RestController @@ -47,7 +47,7 @@ public class ApiAccessLogController { @GetMapping("/export-excel") @Operation(summary = "导出API 访问日志 Excel") @PreAuthorize("@ss.hasPermission('infra:api-access-log:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportApiAccessLogExcel(@Valid ApiAccessLogPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java index 772303a9cc..a5b7a455bd 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogRespVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO; @@ -24,8 +24,8 @@ import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - API 错误日志") @@ -61,7 +61,7 @@ public class ApiErrorLogController { @GetMapping("/export-excel") @Operation(summary = "导出 API 错误日志 Excel") @PreAuthorize("@ss.hasPermission('infra:api-error-log:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportApiErrorLogExcel(@Valid ApiErrorLogPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-mall/yudao-module-product-biz/pom.xml b/yudao-module-mall/yudao-module-product-biz/pom.xml index 7cf3364328..c8bad4605f 100644 --- a/yudao-module-mall/yudao-module-product-biz/pom.xml +++ b/yudao-module-mall/yudao-module-product-biz/pom.xml @@ -30,10 +30,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java index ac1a900a1a..31d36ba6d6 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.product.controller.admin.spu; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; @@ -28,9 +28,9 @@ import java.util.Comparator; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 商品 SPU") @RestController @@ -127,7 +127,7 @@ public class ProductSpuController { @GetMapping("/export") @Operation(summary = "导出商品") @PreAuthorize("@ss.hasPermission('product:spu:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSpuList(@Validated ProductSpuPageReqVO reqVO, HttpServletResponse response) throws IOException { reqVO.setPageSize(PAGE_SIZE_NONE); diff --git a/yudao-module-mall/yudao-module-promotion-biz/pom.xml b/yudao-module-mall/yudao-module-promotion-biz/pom.xml index f3d1340ba9..a3bf64965e 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/pom.xml +++ b/yudao-module-mall/yudao-module-promotion-biz/pom.xml @@ -41,10 +41,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-mall/yudao-module-statistics-biz/pom.xml b/yudao-module-mall/yudao-module-statistics-biz/pom.xml index 77c7b1bff9..fc15455603 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/pom.xml +++ b/yudao-module-mall/yudao-module-statistics-biz/pom.xml @@ -50,10 +50,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-mall/yudao-module-trade-biz/pom.xml b/yudao-module-mall/yudao-module-trade-biz/pom.xml index 0ecadd7d35..fb046ee405 100644 --- a/yudao-module-mall/yudao-module-trade-biz/pom.xml +++ b/yudao-module-mall/yudao-module-trade-biz/pom.xml @@ -50,10 +50,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java index 6d20ba15af..d6429b44fa 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.controller.admin.aftersale; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; @@ -135,7 +134,6 @@ public class AfterSaleController { @PostMapping("/update-refunded") @Operation(summary = "更新售后订单为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateAfterRefund(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { // 目前业务逻辑,不需要做任何事情 // 当然,退款会有小概率会失败的情况,可以监控失败状态,进行告警 diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java index 4b7f87279d..5484075c21 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.*; import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; @@ -12,18 +12,18 @@ import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 快递公司") @RestController @@ -85,7 +85,7 @@ public class DeliveryExpressController { @GetMapping("/export-excel") @Operation(summary = "导出快递公司 Excel") @PreAuthorize("@ss.hasPermission('trade:delivery:express:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportDeliveryExpressExcel(@Valid DeliveryExpressExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = deliveryExpressService.getDeliveryExpressList(exportReqVO); diff --git a/yudao-module-member/yudao-module-member-biz/pom.xml b/yudao-module-member/yudao-module-member-biz/pom.xml index 249c061ae0..3c9b81e65b 100644 --- a/yudao-module-member/yudao-module-member-biz/pom.xml +++ b/yudao-module-member/yudao-module-member-biz/pom.xml @@ -35,10 +35,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java index 16c7db2073..d0a75b0448 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.controller.app.auth; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.security.config.SecurityProperties; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.member.controller.app.auth.vo.*; @@ -64,7 +63,6 @@ public class AppAuthController { @PostMapping("/refresh-token") @Operation(summary = "刷新令牌") @Parameter(name = "refreshToken", description = "刷新令牌", required = true) - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult refreshToken(@RequestParam("refreshToken") String refreshToken) { return success(authService.refreshToken(refreshToken)); } diff --git a/yudao-module-mp/yudao-module-mp-biz/pom.xml b/yudao-module-mp/yudao-module-mp-biz/pom.xml index c7d1b49730..5e3fefbadb 100644 --- a/yudao-module-mp/yudao-module-mp-biz/pom.xml +++ b/yudao-module-mp/yudao-module-mp-biz/pom.xml @@ -35,10 +35,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java index 5cfe6b839e..22477b22fc 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.mp.controller.admin.open; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; import cn.iocoder.yudao.module.mp.controller.admin.open.vo.MpOpenCheckSignatureReqVO; import cn.iocoder.yudao.module.mp.controller.admin.open.vo.MpOpenHandleMessageReqVO; @@ -63,7 +62,6 @@ public class MpOpenController { */ @Operation(summary = "处理消息") @PostMapping(value = "/{appId}", produces = "application/xml; charset=UTF-8") - @OperateLog(enable = false) // 回调地址,无需记录操作日志 public String handleMessage(@PathVariable("appId") String appId, @RequestBody String content, MpOpenHandleMessageReqVO reqVO) { diff --git a/yudao-module-pay/yudao-module-pay-biz/pom.xml b/yudao-module-pay/yudao-module-pay-biz/pom.xml index de7afb1734..738b133c11 100644 --- a/yudao-module-pay/yudao-module-pay-biz/pom.xml +++ b/yudao-module-pay/yudao-module-pay-biz/pom.xml @@ -30,10 +30,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-pay diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java index 615be4969e..538fdbc227 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.order.PayDemoOrderCreateReqVO; @@ -50,7 +49,6 @@ public class PayDemoOrderController { @PostMapping("/update-paid") @Operation(summary = "更新示例订单为已支付") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateDemoOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) { payDemoOrderService.updateDemoOrderPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayOrderId()); @@ -68,7 +66,6 @@ public class PayDemoOrderController { @PostMapping("/update-refunded") @Operation(summary = "更新示例订单为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateDemoOrderRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { payDemoOrderService.updateDemoOrderRefunded(Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayRefundId()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoTransferController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoTransferController.java index f35f9190fb..3d399181b6 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoTransferController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoTransferController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.pay.api.notify.dto.PayTransferNotifyReqDTO; import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.transfer.PayDemoTransferCreateReqVO; import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.transfer.PayDemoTransferRespVO; @@ -45,7 +44,6 @@ public class PayDemoTransferController { @PostMapping("/update-status") @Operation(summary = "更新示例转账订单的转账状态") // 由 pay-module 转账服务,进行回调 @PermitAll // 无需登录,安全由 PayDemoTransferService 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateDemoTransferStatus(@RequestBody PayTransferNotifyReqDTO notifyReqDTO) { demoTransferService.updateDemoTransferStatus(Long.valueOf(notifyReqDTO.getMerchantTransferId()), notifyReqDTO.getPayTransferId()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java index 65c8c43c56..631cd7562b 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.notify; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.client.PayClient; import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderRespDTO; import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundRespDTO; @@ -59,7 +58,6 @@ public class PayNotifyController { @PostMapping(value = "/order/{channelId}") @Operation(summary = "支付渠道的统一【支付】回调") @PermitAll - @OperateLog(enable = false) // 回调地址,无需记录操作日志 public String notifyOrder(@PathVariable("channelId") Long channelId, @RequestParam(required = false) Map params, @RequestBody(required = false) String body) { @@ -80,7 +78,6 @@ public class PayNotifyController { @PostMapping(value = "/refund/{channelId}") @Operation(summary = "支付渠道的统一【退款】回调") @PermitAll - @OperateLog(enable = false) // 回调地址,无需记录操作日志 public String notifyRefund(@PathVariable("channelId") Long channelId, @RequestParam(required = false) Map params, @RequestBody(required = false) String body) { diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index 4c9dd84a83..68cdf2e01a 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.pay.controller.admin.order; import cn.hutool.core.collection.CollectionUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; @@ -18,23 +18,23 @@ import com.google.common.collect.Maps; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserType; @@ -107,7 +107,7 @@ public class PayOrderController { @GetMapping("/export-excel") @Operation(summary = "导出支付订单 Excel") @PreAuthorize("@ss.hasPermission('pay:order:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = orderService.getOrderList(exportReqVO); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index 2723d8a642..81255443a0 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund; import cn.hutool.core.collection.CollectionUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; @@ -14,6 +14,9 @@ import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -21,17 +24,14 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 退款订单") @RestController @@ -76,7 +76,7 @@ public class PayRefundController { @GetMapping("/export-excel") @Operation(summary = "导出退款订单 Excel") @PreAuthorize("@ss.hasPermission('pay:refund:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportRefundExcel(@Valid PayRefundExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = refundService.getRefundList(exportReqVO); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java index 63133d2c83..bfa7917a0e 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.wallet; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargeService; @@ -32,7 +31,6 @@ public class PayWalletRechargeController { @PostMapping("/update-paid") @Operation(summary = "更新钱包充值为已充值") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob @PermitAll // 无需登录, 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateWalletRechargerPaid(@Valid @RequestBody PayOrderNotifyReqDTO notifyReqDTO) { walletRechargeService.updateWalletRechargerPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayOrderId()); @@ -51,7 +49,6 @@ public class PayWalletRechargeController { @PostMapping("/update-refunded") @Operation(summary = "更新钱包充值为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob @PermitAll // 无需登录, 内部校验实现 - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 public CommonResult updateWalletRechargeRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { walletRechargeService.updateWalletRechargeRefunded( Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayRefundId()); diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index ddc90b3481..965cb01c86 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -31,10 +31,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-tenant diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/goview/GoViewDataController.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/goview/GoViewDataController.java index cc41dc814d..199341ab1b 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/goview/GoViewDataController.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/goview/GoViewDataController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.report.controller.admin.goview; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.RandomUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.report.controller.admin.goview.vo.data.GoViewDataGetBySqlReqVO; import cn.iocoder.yudao.module.report.controller.admin.goview.vo.data.GoViewDataRespVO; import cn.iocoder.yudao.module.report.service.goview.GoViewDataService; @@ -35,7 +34,6 @@ public class GoViewDataController { @RequestMapping("/get-by-sql") @Operation(summary = "使用 SQL 查询数据") @PreAuthorize("@ss.hasPermission('report:go-view-data:get-by-sql')") - @OperateLog(enable = false) // 不记录操作日志,因为不需要 public CommonResult getDataBySQL(@Valid @RequestBody GoViewDataGetBySqlReqVO reqVO) { return success(goViewDataService.getDataBySQL(reqVO.getSql())); } @@ -43,7 +41,6 @@ public class GoViewDataController { @RequestMapping("/get-by-http") @Operation(summary = "使用 HTTP 查询数据", description = "这个只是示例接口,实际应该每个查询,都要写一个接口") @PreAuthorize("@ss.hasPermission('report:go-view-data:get-by-http')") - @OperateLog(enable = false) // 不记录操作日志,因为不需要 public CommonResult getDataByHttp( @RequestParam(required = false) Map params, @RequestBody(required = false) String body) { // params、body 按照需要去接收,这里仅仅是示例 diff --git a/yudao-module-system/yudao-module-system-biz/pom.xml b/yudao-module-system/yudao-module-system-biz/pom.xml index 3c041c420b..6de1a58a15 100644 --- a/yudao-module-system/yudao-module-system-biz/pom.xml +++ b/yudao-module-system/yudao-module-system-biz/pom.xml @@ -30,10 +30,6 @@ - - cn.iocoder.boot - yudao-spring-boot-starter-biz-operatelog - cn.iocoder.boot yudao-spring-boot-starter-biz-data-permission diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index f24db16a92..cb002d3a2b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.security.config.SecurityProperties; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.controller.admin.auth.vo.*; @@ -66,7 +65,6 @@ public class AuthController { @PostMapping("/login") @PermitAll @Operation(summary = "使用账号密码登录") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult login(@RequestBody @Valid AuthLoginReqVO reqVO) { return success(authService.login(reqVO)); } @@ -74,7 +72,6 @@ public class AuthController { @PostMapping("/logout") @PermitAll @Operation(summary = "登出系统") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult logout(HttpServletRequest request) { String token = SecurityFrameworkUtils.obtainAuthorization(request, securityProperties.getTokenHeader(), securityProperties.getTokenParameter()); @@ -88,7 +85,6 @@ public class AuthController { @PermitAll @Operation(summary = "刷新令牌") @Parameter(name = "refreshToken", description = "刷新令牌", required = true) - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult refreshToken(@RequestParam("refreshToken") String refreshToken) { return success(authService.refreshToken(refreshToken)); } @@ -124,7 +120,6 @@ public class AuthController { @PostMapping("/sms-login") @PermitAll @Operation(summary = "使用短信验证码登录") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) { return success(authService.smsLogin(reqVO)); } @@ -132,7 +127,6 @@ public class AuthController { @PostMapping("/send-sms-code") @PermitAll @Operation(summary = "发送手机验证码") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult sendLoginSmsCode(@RequestBody @Valid AuthSmsSendReqVO reqVO) { authService.sendSmsCode(reqVO); return success(true); @@ -156,7 +150,6 @@ public class AuthController { @PostMapping("/social-login") @PermitAll @Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult socialQuickLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) { return success(authService.socialLogin(reqVO)); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java index ad89535629..174c560c4e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.system.controller.admin.captcha; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import com.xingyuv.captcha.model.common.ResponseModel; import com.xingyuv.captcha.model.vo.CaptchaVO; import com.xingyuv.captcha.service.CaptchaService; @@ -28,7 +27,6 @@ public class CaptchaController { @PostMapping({"/get"}) @Operation(summary = "获得验证码") @PermitAll - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { assert request.getRemoteHost() != null; data.setBrowserInfo(getRemoteId(request)); @@ -38,7 +36,6 @@ public class CaptchaController { @PostMapping("/check") @Operation(summary = "校验验证码") @PermitAll - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { data.setBrowserInfo(getRemoteId(request)); return captchaService.check(data); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java index 4d586ce7f6..cf44cd5eff 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java @@ -1,35 +1,35 @@ package cn.iocoder.yudao.module.system.controller.admin.dept; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostRespVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSimpleRespVO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; import cn.iocoder.yudao.module.system.service.dept.PostService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.Collections; import java.util.Comparator; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 岗位") @RestController @@ -94,7 +94,7 @@ public class PostController { @GetMapping("/export") @Operation(summary = "岗位管理") @PreAuthorize("@ss.hasPermission('system:post:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void export(HttpServletResponse response, @Validated PostPageReqVO reqVO) throws IOException { reqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = postService.getPostPage(reqVO).getList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index 41b90307b0..59b03f0067 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.system.controller.admin.dict; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataRespVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataSaveReqVO; @@ -16,18 +16,18 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 字典数据") @RestController @@ -92,7 +92,7 @@ public class DictDataController { @GetMapping("/export") @Operation(summary = "导出字典数据") @PreAuthorize("@ss.hasPermission('system:dict:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void export(HttpServletResponse response, @Valid DictDataPageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = dictDataService.getDictDataPage(exportReqVO).getList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java index b0e112764b..8873ca4d88 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.dict; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeRespVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeSaveReqVO; @@ -15,18 +15,18 @@ import cn.iocoder.yudao.module.system.service.dict.DictTypeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 字典类型") @RestController @@ -90,7 +90,7 @@ public class DictTypeController { @Operation(summary = "导出数据类型") @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:dict:query')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void export(HttpServletResponse response, @Valid DictTypePageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = dictTypeService.getDictTypePage(exportReqVO).getList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java index 6288bb3d5e..9a28f8d720 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java @@ -1,29 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.*; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeRespVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 错误码") @RestController @@ -78,7 +80,7 @@ public class ErrorCodeController { @GetMapping("/export-excel") @Operation(summary = "导出错误码 Excel") @PreAuthorize("@ss.hasPermission('system:error-code:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportErrorCodeExcel(@Valid ErrorCodePageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index aba876d918..1903ab6e58 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.logger; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.LoginLogDO; import cn.iocoder.yudao.module.system.service.logger.LoginLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 登录日志") @RestController @@ -47,7 +47,7 @@ public class LoginLogController { @GetMapping("/export") @Operation(summary = "导出登录日志 Excel") @PreAuthorize("@ss.hasPermission('system:login-log:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportLoginLog(HttpServletResponse response, @Valid LoginLogPageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = loginLogService.getLoginLogPage(exportReqVO).getList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java index 2933eef291..a7036c8f6c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.logger; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.translate.core.TranslateUtils; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; @@ -25,8 +25,8 @@ import org.springframework.web.bind.annotation.RestController; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 操作日志") @RestController @@ -48,7 +48,7 @@ public class OperateLogController { @Operation(summary = "导出操作日志") @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:operate-log:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportOperateLog(HttpServletResponse response, @Valid OperateLogPageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = operateLogService.getOperateLogPage(exportReqVO).getList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java index e5d37ad3dd..114a156ab8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java @@ -8,7 +8,6 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.http.HttpUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenAccessTokenRespVO; import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenAuthorizeInfoRespVO; import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenCheckTokenRespVO; @@ -95,7 +94,6 @@ public class OAuth2OpenController { @Parameter(name = "scope", example = "user_info"), @Parameter(name = "refresh_token", example = "123424233"), }) - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult postAccessToken(HttpServletRequest request, @RequestParam("grant_type") String grantType, @RequestParam(value = "code", required = false) String code, // 授权码模式 @@ -146,7 +144,6 @@ public class OAuth2OpenController { @PermitAll @Operation(summary = "删除访问令牌") @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult revokeToken(HttpServletRequest request, @RequestParam("token") String token) { // 校验客户端 @@ -165,7 +162,6 @@ public class OAuth2OpenController { @PermitAll @Operation(summary = "校验访问令牌") @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult checkToken(HttpServletRequest request, @RequestParam("token") String token) { // 校验客户端 @@ -216,7 +212,6 @@ public class OAuth2OpenController { @Parameter(name = "auto_approve", required = true, description = "用户是否接受", example = "true"), @Parameter(name = "state", example = "1") }) - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult approveOrDeny(@RequestParam("response_type") String responseType, @RequestParam("client_id") String clientId, @RequestParam(value = "scope", required = false) String scope, diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index b9b96b6e79..e29abe16d9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.permission; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.*; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.service.permission.RoleService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.Comparator; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static java.util.Collections.singleton; @Tag(name = "管理后台 - 角色") @@ -95,7 +95,7 @@ public class RoleController { @GetMapping("/export-excel") @Operation(summary = "导出角色 Excel") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) @PreAuthorize("@ss.hasPermission('system:role:export')") public void export(HttpServletResponse response, @Validated RolePageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java index 0b9b0049ca..16b49f2990 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordRespVO; import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; @@ -14,19 +14,19 @@ import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; import java.util.Set; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 敏感词") @RestController @@ -81,7 +81,7 @@ public class SensitiveWordController { @GetMapping("/export-excel") @Operation(summary = "导出敏感词 Excel") @PreAuthorize("@ss.hasPermission('system:sensitive-word:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSensitiveWordExcel(@Valid SensitiveWordPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java index f392ac7595..06c4ba66fe 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.framework.sms.core.enums.SmsChannelEnum; import cn.iocoder.yudao.module.system.service.sms.SmsSendService; import io.swagger.v3.oas.annotations.Operation; @@ -28,7 +27,6 @@ public class SmsCallbackController { @PostMapping("/aliyun") @PermitAll @Operation(summary = "阿里云短信的回调", description = "参见 https://help.aliyun.com/document_detail/120998.html 文档") - @OperateLog(enable = false) public CommonResult receiveAliyunSmsStatus(HttpServletRequest request) throws Throwable { String text = ServletUtils.getBody(request); smsSendService.receiveSmsStatus(SmsChannelEnum.ALIYUN.getCode(), text); @@ -38,7 +36,6 @@ public class SmsCallbackController { @PostMapping("/tencent") @PermitAll @Operation(summary = "腾讯云短信的回调", description = "参见 https://cloud.tencent.com/document/product/382/52077 文档") - @OperateLog(enable = false) public CommonResult receiveTencentSmsStatus(HttpServletRequest request) throws Throwable { String text = ServletUtils.getBody(request); smsSendService.receiveSmsStatus(SmsChannelEnum.TENCENT.getCode(), text); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index 7496da2f2b..1e468f6e0a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogRespVO; import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO; import cn.iocoder.yudao.module.system.service.sms.SmsLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 短信日志") @RestController @@ -47,7 +47,7 @@ public class SmsLogController { @GetMapping("/export-excel") @Operation(summary = "导出短信日志 Excel") @PreAuthorize("@ss.hasPermission('system:sms-log:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSmsLogExcel(@Valid SmsLogPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java index 8ac5793883..481b6b0335 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.*; @@ -9,7 +10,6 @@ import cn.iocoder.yudao.module.system.service.sms.SmsSendService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; @@ -22,8 +22,8 @@ import jakarta.validation.Valid; import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 短信模板") @RestController @@ -79,7 +79,7 @@ public class SmsTemplateController { @GetMapping("/export-excel") @Operation(summary = "导出短信模板 Excel") @PreAuthorize("@ss.hasPermission('system:sms-template:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportSmsTemplateExcel(@Valid SmsTemplatePageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java index 73112330df..51aab02d6d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantRespVO; import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantSaveReqVO; @@ -15,18 +15,18 @@ import cn.iocoder.yudao.module.system.service.tenant.TenantService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - import jakarta.annotation.Resource; import jakarta.annotation.security.PermitAll; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + import java.io.IOException; import java.util.List; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 租户") @RestController @@ -98,7 +98,7 @@ public class TenantController { @GetMapping("/export-excel") @Operation(summary = "导出租户 Excel") @PreAuthorize("@ss.hasPermission('system:tenant:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportTenantExcel(@Valid TenantPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 9efb49ce60..8f1a376f84 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.system.controller.admin.user; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; import cn.iocoder.yudao.module.system.convert.user.UserConvert; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; @@ -18,22 +18,22 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.IOException; import java.util.Arrays; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 用户") @RestController @@ -127,7 +127,7 @@ public class UserController { @GetMapping("/export") @Operation(summary = "导出用户") @PreAuthorize("@ss.hasPermission('system:user:export')") - @OperateLog(type = EXPORT) + @ApiAccessLog(operateType = EXPORT) public void exportUserList(@Validated UserPageReqVO exportReqVO, HttpServletResponse response) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); -- Gitee From 83623a024fb997204a1d98f8fd9d24610ca5d364 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 02:21:03 +0800 Subject: [PATCH 0156/1557] =?UTF-8?q?=E3=80=90=E9=87=8D=E6=9E=84=E3=80=91V?= =?UTF-8?q?2=20=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=BD=AC=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E5=9F=BA=E4=BA=8E=E6=B3=A8=E8=A7=A3=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8F=98=E9=87=8F=E3=80=81=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=87=BD=E6=95=B0=E7=9A=84=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/purchase/ErpPurchaseOrderController.java | 6 +++--- .../admin/demo/demo01/Demo01ContactController.java | 6 +++--- .../admin/demo/demo02/Demo02CategoryController.java | 6 +++--- .../admin/demo/demo03/Demo03StudentController.java | 6 +++--- .../module/infra/controller/admin/job/JobController.java | 6 +++--- .../infra/controller/admin/job/JobLogController.java | 6 +++--- .../admin/delivery/DeliveryExpressController.java | 6 +++--- .../pay/controller/admin/order/PayOrderController.java | 6 +++--- .../pay/controller/admin/refund/PayRefundController.java | 6 +++--- .../yudao/module/system/api/logger/OperateLogApi.java | 3 ++- .../system/api/logger/dto/OperateLogCreateReqDTO.java | 5 +++-- .../system/controller/admin/dept/PostController.java | 6 +++--- .../system/controller/admin/dict/DictDataController.java | 6 +++--- .../system/controller/admin/dict/DictTypeController.java | 6 +++--- .../controller/admin/errorcode/ErrorCodeController.java | 6 +++--- .../controller/admin/logger/LoginLogController.java | 6 +++--- .../controller/admin/permission/RoleController.java | 6 +++--- .../admin/sensitiveword/SensitiveWordController.java | 6 +++--- .../system/controller/admin/sms/SmsLogController.java | 6 +++--- .../system/controller/admin/tenant/TenantController.java | 8 ++++---- .../system/controller/admin/user/UserController.java | 6 +++--- .../system/service/logger/OperateLogServiceImpl.java | 3 ++- .../system/service/logger/OperateLogServiceImplTest.java | 3 ++- 23 files changed, 67 insertions(+), 63 deletions(-) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java index a60fda222e..49062842b9 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java @@ -24,13 +24,13 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.math.BigDecimal; import java.util.List; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java index 2cbf98ffe5..d072e89b1d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java @@ -14,13 +14,13 @@ import cn.iocoder.yudao.module.infra.service.demo.demo01.Demo01ContactService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java index 62228f5c2c..db88c1fb44 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java @@ -12,13 +12,13 @@ import cn.iocoder.yudao.module.infra.service.demo.demo02.Demo02CategoryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java index 624de732f4..d8c613307e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java @@ -16,13 +16,13 @@ import cn.iocoder.yudao.module.infra.service.demo.demo03.Demo03StudentService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java index ed9f75df02..af7f0c75ea 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java @@ -16,14 +16,14 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.quartz.SchedulerException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.time.LocalDateTime; import java.util.Collections; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java index f1a230eea1..7fce946eb5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java @@ -13,9 +13,6 @@ import cn.iocoder.yudao.module.infra.service.job.JobLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -23,6 +20,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java index 5484075c21..ae69a17249 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java @@ -12,13 +12,13 @@ import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index 68cdf2e01a..66ac62e708 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -18,13 +18,13 @@ import com.google.common.collect.Maps; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index 81255443a0..cb6a85d060 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -14,9 +14,6 @@ import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -24,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java index 2cf1d6eb0f..86962ad3de 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java @@ -4,7 +4,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; -import jakarta.validation.Valid; + +import javax.validation.Valid; /** * 操作日志 API 接口 diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java index 87c0254b73..e7a3db730e 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.system.api.logger.dto; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + /** * 系统操作日志 Create Request DTO * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java index cf44cd5eff..ef74a33f4e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java @@ -16,13 +16,13 @@ import cn.iocoder.yudao.module.system.service.dept.PostService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.Collections; import java.util.Comparator; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index 59b03f0067..e9ab54979c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -16,13 +16,13 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java index 8873ca4d88..a6a1a4d05b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java @@ -15,13 +15,13 @@ import cn.iocoder.yudao.module.system.service.dict.DictTypeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java index 9a28f8d720..2666862adf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java @@ -14,13 +14,13 @@ import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index 1903ab6e58..261eaac5ae 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -12,15 +12,15 @@ import cn.iocoder.yudao.module.system.dal.dataobject.logger.LoginLogDO; import cn.iocoder.yudao.module.system.service.logger.LoginLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index e29abe16d9..327921d06c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -13,13 +13,13 @@ import cn.iocoder.yudao.module.system.service.permission.RoleService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.Comparator; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java index 16b49f2990..e3f3268f8c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java @@ -14,13 +14,13 @@ import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; import java.util.Set; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index 1e468f6e0a..c669004397 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -12,15 +12,15 @@ import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO; import cn.iocoder.yudao.module.system.service.sms.SmsLogService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java index 51aab02d6d..79bd8e9f7b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java @@ -15,13 +15,13 @@ import cn.iocoder.yudao.module.system.service.tenant.TenantService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.annotation.security.PermitAll; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.annotation.security.PermitAll; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 8f1a376f84..c4dce601f3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -18,14 +18,14 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; import java.util.Arrays; import java.util.List; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java index 6c341d5a11..269ec70948 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java @@ -7,11 +7,12 @@ import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; + /** * 操作日志 Service 实现类 * diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java index 90ba203b57..f41d39c237 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java @@ -8,10 +8,11 @@ import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; -import jakarta.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; +import javax.annotation.Resource; + import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; -- Gitee From 87c7b3fac2c291b45c3537d972d0ac3e690d4342 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 09:42:03 +0800 Subject: [PATCH 0157/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91s?= =?UTF-8?q?ystem=20user=20=E5=92=8C=20role=20=E6=8E=A5=E5=85=A5=E6=96=B0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/util/DataPermissionUtils.java | 20 +++++ .../system/enums/LogRecordConstants.java | 33 ++++++++ .../admin/permission/RoleController.java | 12 +-- .../permission/vo/role/RoleSaveReqVO.java | 11 ++- .../vo/role/RoleUpdateStatusReqVO.java | 23 ------ .../admin/user/vo/user/UserSaveReqVO.java | 17 +++- .../core/AdminUserParseFunction.java | 9 ++- .../operatelog/core/AreaParseFunction.java | 3 +- .../operatelog/core/DeptParseFunction.java | 11 +-- .../operatelog/core/PostParseFunction.java | 46 +++++++++++ .../framework/operatelog/package-info.java | 3 + .../service/permission/RoleService.java | 8 -- .../service/permission/RoleServiceImpl.java | 67 +++++++++------- .../service/user/AdminUserServiceImpl.java | 77 +++++++++++++------ 14 files changed, 232 insertions(+), 108 deletions(-) create mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/LogRecordConstants.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java index c154bd5f52..583c482b23 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder; import lombok.SneakyThrows; +import java.util.concurrent.Callable; + /** * 数据权限 Util * @@ -40,4 +42,22 @@ public class DataPermissionUtils { } } + /** + * 忽略数据权限,执行对应的逻辑 + * + * @param callable 逻辑 + * @return 执行结果 + */ + @SneakyThrows + public static T executeIgnore(Callable callable) { + DataPermission dataPermission = getDisableDataPermissionDisable(); + DataPermissionContextHolder.add(dataPermission); + try { + // 执行 callable + return callable.call(); + } finally { + DataPermissionContextHolder.remove(); + } + } + } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/LogRecordConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/LogRecordConstants.java new file mode 100644 index 0000000000..4ee3840734 --- /dev/null +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/LogRecordConstants.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.system.enums; + +/** + * System 操作日志枚举 + * 目的:统一管理,也减少 Service 里各种“复杂”字符串 + * + * @author 芋道源码 + */ +public interface LogRecordConstants { + + // ======================= SYSTEM_USER 用户 ======================= + + String SYSTEM_USER_TYPE = "SYSTEM 用户"; + String SYSTEM_USER_CREATE_SUB_TYPE = "创建用户"; + String SYSTEM_USER_CREATE_SUCCESS = "创建了用户【{{#user.nickname}}】"; + String SYSTEM_USER_UPDATE_SUB_TYPE = "更新用户"; + String SYSTEM_USER_UPDATE_SUCCESS = "更新了用户【{{#user.nickname}}】: {_DIFF{#updateReqVO}}"; + String SYSTEM_USER_DELETE_SUB_TYPE = "删除用户"; + String SYSTEM_USER_DELETE_SUCCESS = "删除了用户【{{#user.nickname}}】"; + String SYSTEM_USER_UPDATE_PASSWORD_SUB_TYPE = "重置用户密码"; + String SYSTEM_USER_UPDATE_PASSWORD_SUCCESS = "将用户【{{#user.nickname}}】的密码从【{{#user.password}}】重置为【{{#newPassword}}】"; + + // ======================= SYSTEM_ROLE 角色 ======================= + + String SYSTEM_ROLE_TYPE = "SYSTEM 角色"; + String SYSTEM_ROLE_CREATE_SUB_TYPE = "创建角色"; + String SYSTEM_ROLE_CREATE_SUCCESS = "创建了角色【{{#role.name}}】"; + String SYSTEM_ROLE_UPDATE_SUB_TYPE = "更新角色"; + String SYSTEM_ROLE_UPDATE_SUCCESS = "更新了角色【{{#role.name}}】: {_DIFF{#updateReqVO}}"; + String SYSTEM_ROLE_DELETE_SUB_TYPE = "删除角色"; + String SYSTEM_ROLE_DELETE_SUCCESS = "删除了角色【{{#role.name}}】"; + +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index e29abe16d9..ee6ae9fbb8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -52,14 +52,6 @@ public class RoleController { return success(true); } - @PutMapping("/update-status") - @Operation(summary = "修改角色状态") - @PreAuthorize("@ss.hasPermission('system:role:update')") - public CommonResult updateRoleStatus(@Valid @RequestBody RoleUpdateStatusReqVO reqVO) { - roleService.updateRoleStatus(reqVO.getId(), reqVO.getStatus()); - return success(true); - } - @DeleteMapping("/delete") @Operation(summary = "删除角色") @Parameter(name = "id", description = "角色编号", required = true, example = "1024") @@ -87,10 +79,10 @@ public class RoleController { @GetMapping({"/list-all-simple", "/simple-list"}) @Operation(summary = "获取角色精简信息列表", description = "只包含被开启的角色,主要用于前端的下拉选项") - public CommonResult> getSimpleRoleList() { + public CommonResult> getSimpleRoleList() { List list = roleService.getRoleListByStatus(singleton(CommonStatusEnum.ENABLE.getStatus())); list.sort(Comparator.comparing(RoleDO::getSort)); - return success(BeanUtils.toBean(list, RoleSimpleRespVO.class)); + return success(BeanUtils.toBean(list, RoleRespVO.class)); } @GetMapping("/export-excel") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java index c6508685bb..dc97bc2767 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; +import com.mzt.logapi.starter.annotation.DiffLogField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -7,7 +8,7 @@ import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -@Schema(description = "管理后台 - 角色创建 Request VO") +@Schema(description = "管理后台 - 角色创建/更新 Request VO") @Data public class RoleSaveReqVO { @@ -16,19 +17,23 @@ public class RoleSaveReqVO { @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员") @NotBlank(message = "角色名称不能为空") - @Size(max = 30, message = "角色名称长度不能超过30个字符") + @Size(max = 30, message = "角色名称长度不能超过 30 个字符") + @DiffLogField(name = "角色名称") private String name; @NotBlank(message = "角色标志不能为空") - @Size(max = 100, message = "角色标志长度不能超过100个字符") + @Size(max = 100, message = "角色标志长度不能超过 100 个字符") @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ADMIN") + @DiffLogField(name = "角色标志") private String code; @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") + @DiffLogField(name = "显示顺序") private Integer sort; @Schema(description = "备注", example = "我是一个角色") + @DiffLogField(name = "备注") private String remark; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java deleted file mode 100644 index 98fb0514b8..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; - -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.validation.InEnum; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotNull; - -@Schema(description = "管理后台 - 角色更新状态 Request VO") -@Data -public class RoleUpdateStatusReqVO { - - @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "角色编号不能为空") - private Long id; - - @Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") - @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") - private Integer status; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java index 4777ee1982..f196e651d8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java @@ -2,12 +2,16 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.validation.Mobile; +import cn.iocoder.yudao.module.system.framework.operatelog.core.DeptParseFunction; +import cn.iocoder.yudao.module.system.framework.operatelog.core.PostParseFunction; +import cn.iocoder.yudao.module.system.framework.operatelog.core.SexParseFunction; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.mzt.logapi.starter.annotation.DiffLogField; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; import lombok.Data; import org.hibernate.validator.constraints.Length; -import jakarta.validation.constraints.*; import java.util.Set; @Schema(description = "管理后台 - 用户创建/修改 Request VO") @@ -21,34 +25,43 @@ public class UserSaveReqVO { @NotBlank(message = "用户账号不能为空") @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") + @DiffLogField(name = "用户账号") private String username; @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过30个字符") + @DiffLogField(name = "用户昵称") private String nickname; @Schema(description = "备注", example = "我是一个用户") + @DiffLogField(name = "备注") private String remark; - @Schema(description = "部门ID", example = "我是一个用户") + @Schema(description = "部门编号", example = "我是一个用户") + @DiffLogField(name = "部门", function = DeptParseFunction.NAME) private Long deptId; @Schema(description = "岗位编号数组", example = "1") + @DiffLogField(name = "岗位", function = PostParseFunction.NAME) private Set postIds; @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") + @DiffLogField(name = "用户邮箱") private String email; @Schema(description = "手机号码", example = "15601691300") @Mobile + @DiffLogField(name = "手机号码") private String mobile; @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") + @DiffLogField(name = "用户性别", function = SexParseFunction.NAME) private Integer sex; @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") + @DiffLogField(name = "用户头像") private String avatar; // ========== 仅【创建】时,需要传递的字段 ========== diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AdminUserParseFunction.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AdminUserParseFunction.java index 8111d4adcc..f071251280 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AdminUserParseFunction.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AdminUserParseFunction.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.module.system.framework.operatelog.core; +import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.mzt.logapi.service.IParseFunction; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; @@ -20,7 +21,7 @@ public class AdminUserParseFunction implements IParseFunction { public static final String NAME = "getAdminUserById"; @Resource - private AdminUserApi adminUserApi; + private AdminUserService adminUserService; @Override public String functionName() { @@ -34,7 +35,7 @@ public class AdminUserParseFunction implements IParseFunction { } // 获取用户信息 - AdminUserRespDTO user = adminUserApi.getUser(Long.parseLong(value.toString())); + AdminUserDO user = adminUserService.getUser(Convert.toLong(value)); if (user == null) { log.warn("[apply][获取用户{{}}为空", value); return ""; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AreaParseFunction.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AreaParseFunction.java index e22ab5cf2d..f2b908901a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AreaParseFunction.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AreaParseFunction.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.framework.operatelog.core; +import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import com.mzt.logapi.service.IParseFunction; @@ -32,7 +33,7 @@ public class AreaParseFunction implements IParseFunction { if (StrUtil.isEmptyIfStr(value)) { return ""; } - return AreaUtils.format(Integer.parseInt(value.toString())); + return AreaUtils.format(Convert.toInt(value)); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/DeptParseFunction.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/DeptParseFunction.java index 1a7ba9d8f4..125c324833 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/DeptParseFunction.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/DeptParseFunction.java @@ -1,15 +1,16 @@ package cn.iocoder.yudao.module.system.framework.operatelog.core; +import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import com.mzt.logapi.service.IParseFunction; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** - * 管理员名字的 {@link IParseFunction} 实现类 + * 部门名字的 {@link IParseFunction} 实现类 * * @author HUIHUI */ @@ -20,7 +21,7 @@ public class DeptParseFunction implements IParseFunction { public static final String NAME = "getDeptById"; @Resource - private DeptApi deptApi; + private DeptService deptService; @Override public String functionName() { @@ -34,7 +35,7 @@ public class DeptParseFunction implements IParseFunction { } // 获取部门信息 - DeptRespDTO dept = deptApi.getDept(Long.parseLong(value.toString())); + DeptDO dept = deptService.getDept(Convert.toLong(value)); if (dept == null) { log.warn("[apply][获取部门{{}}为空", value); return ""; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java new file mode 100644 index 0000000000..e246d12343 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.system.framework.operatelog.core; + +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import com.mzt.logapi.service.IParseFunction; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * 岗位名字的 {@link IParseFunction} 实现类 + * + * @author HUIHUI + */ +@Slf4j +@Component +public class PostParseFunction implements IParseFunction { + + public static final String NAME = "getPostById"; + + @Resource + private PostService postService; + + @Override + public String functionName() { + return NAME; + } + + @Override + public String apply(Object value) { + if (StrUtil.isEmptyIfStr(value)) { + return ""; + } + + // 获取岗位信息 + PostDO post = postService.getPost(Convert.toLong(value)); + if (post == null) { + log.warn("[apply][获取岗位{{}}为空", value); + return ""; + } + return post.getName(); + } + +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/package-info.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/package-info.java index 978444e177..c7f1248325 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/package-info.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/package-info.java @@ -1 +1,4 @@ +/** + * 占位文件,避免文件夹缩进 + */ package cn.iocoder.yudao.module.system.framework.operatelog; \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java index 21e588730a..6de8b515b0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java @@ -40,14 +40,6 @@ public interface RoleService { */ void deleteRole(Long id); - /** - * 更新角色状态 - * - * @param id 角色编号 - * @param status 状态 - */ - void updateRoleStatus(Long id, Integer status); - /** * 设置角色的数据权限 * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java index fcef74f5c7..3f3c17a536 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java @@ -17,6 +17,8 @@ import cn.iocoder.yudao.module.system.enums.permission.DataScopeEnum; import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; import com.google.common.annotations.VisibleForTesting; +import com.mzt.logapi.context.LogRecordContext; +import com.mzt.logapi.starter.annotation.LogRecord; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -30,6 +32,7 @@ import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; /** * 角色 Service 实现类 @@ -48,41 +51,40 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_CREATE_SUB_TYPE, bizNo = "{{#role.id}}", + success = SYSTEM_ROLE_CREATE_SUCCESS) public Long createRole(RoleSaveReqVO createReqVO, Integer type) { - // 校验角色 + // 1. 校验角色 validateRoleDuplicate(createReqVO.getName(), createReqVO.getCode(), null); - // 插入到数据库 - RoleDO role = BeanUtils.toBean(createReqVO, RoleDO.class); - role.setType(ObjectUtil.defaultIfNull(type, RoleTypeEnum.CUSTOM.getType())); - role.setStatus(CommonStatusEnum.ENABLE.getStatus()); - role.setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据。原因是,可能一些项目不需要项目权限 + + // 2. 插入到数据库 + RoleDO role = BeanUtils.toBean(createReqVO, RoleDO.class) + .setType(ObjectUtil.defaultIfNull(type, RoleTypeEnum.CUSTOM.getType())) + .setStatus(CommonStatusEnum.ENABLE.getStatus()) + .setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据。原因是,可能一些项目不需要项目权限 roleMapper.insert(role); - // 返回 + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("role", role); return role.getId(); } @Override @CacheEvict(value = RedisKeyConstants.ROLE, key = "#updateReqVO.id") + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_UPDATE_SUB_TYPE, bizNo = "{{#updateReqVO.id}}", + success = SYSTEM_ROLE_UPDATE_SUCCESS) public void updateRole(RoleSaveReqVO updateReqVO) { - // 校验是否可以更新 - validateRoleForUpdate(updateReqVO.getId()); - // 校验角色的唯一字段是否重复 + // 1.1 校验是否可以更新 + RoleDO role = validateRoleForUpdate(updateReqVO.getId()); + // 1.2 校验角色的唯一字段是否重复 validateRoleDuplicate(updateReqVO.getName(), updateReqVO.getCode(), updateReqVO.getId()); - // 更新到数据库 + // 2. 更新到数据库 RoleDO updateObj = BeanUtils.toBean(updateReqVO, RoleDO.class); roleMapper.updateById(updateObj); - } - - @Override - @CacheEvict(value = RedisKeyConstants.ROLE, key = "#id") - public void updateRoleStatus(Long id, Integer status) { - // 校验是否可以更新 - validateRoleForUpdate(id); - // 更新状态 - RoleDO updateObj = new RoleDO().setId(id).setStatus(status); - roleMapper.updateById(updateObj); + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("role", role); } @Override @@ -102,13 +104,19 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) @CacheEvict(value = RedisKeyConstants.ROLE, key = "#id") + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_DELETE_SUB_TYPE, bizNo = "{{#id}}", + success = SYSTEM_ROLE_DELETE_SUCCESS) public void deleteRole(Long id) { - // 校验是否可以更新 - validateRoleForUpdate(id); - // 标记删除 + // 1. 校验是否可以更新 + RoleDO role = validateRoleForUpdate(id); + + // 2.1 标记删除 roleMapper.deleteById(id); - // 删除相关数据 + // 2.2 删除相关数据 permissionService.processRoleDeleted(id); + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("role", role); } /** @@ -149,15 +157,16 @@ public class RoleServiceImpl implements RoleService { * @param id 角色编号 */ @VisibleForTesting - void validateRoleForUpdate(Long id) { - RoleDO roleDO = roleMapper.selectById(id); - if (roleDO == null) { + RoleDO validateRoleForUpdate(Long id) { + RoleDO role = roleMapper.selectById(id); + if (role == null) { throw exception(ROLE_NOT_EXISTS); } // 内置角色,不允许删除 - if (RoleTypeEnum.SYSTEM.getType().equals(roleDO.getType())) { + if (RoleTypeEnum.SYSTEM.getType().equals(role.getType())) { throw exception(ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); } + return role; } @Override diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java index a8ed7620a0..efae327f8c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java @@ -27,6 +27,10 @@ import cn.iocoder.yudao.module.system.service.dept.PostService; import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.tenant.TenantService; import com.google.common.annotations.VisibleForTesting; +import com.mzt.logapi.context.LogRecordContext; +import com.mzt.logapi.service.impl.DiffParseFunction; +import com.mzt.logapi.starter.annotation.LogRecord; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; @@ -34,7 +38,6 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import jakarta.annotation.Resource; import java.io.InputStream; import java.time.LocalDateTime; import java.util.*; @@ -43,6 +46,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; /** * 后台用户 Service 实现类 @@ -79,42 +83,54 @@ public class AdminUserServiceImpl implements AdminUserService { @Override @Transactional(rollbackFor = Exception.class) + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_CREATE_SUB_TYPE, bizNo = "{{#user.id}}", + success = SYSTEM_USER_CREATE_SUCCESS) public Long createUser(UserSaveReqVO createReqVO) { - // 校验账户配合 + // 1.1 校验账户配合 tenantService.handleTenantInfo(tenant -> { long count = userMapper.selectCount(); if (count >= tenant.getAccountCount()) { throw exception(USER_COUNT_MAX, tenant.getAccountCount()); } }); - // 校验正确性 + // 1.2 校验正确性 validateUserForCreateOrUpdate(null, createReqVO.getUsername(), createReqVO.getMobile(), createReqVO.getEmail(), createReqVO.getDeptId(), createReqVO.getPostIds()); - // 插入用户 + // 2.1 插入用户 AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class); user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启 user.setPassword(encodePassword(createReqVO.getPassword())); // 加密密码 userMapper.insert(user); - // 插入关联岗位 + // 2.2 插入关联岗位 if (CollectionUtil.isNotEmpty(user.getPostIds())) { userPostMapper.insertBatch(convertList(user.getPostIds(), postId -> new UserPostDO().setUserId(user.getId()).setPostId(postId))); } + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("user", user); return user.getId(); } @Override @Transactional(rollbackFor = Exception.class) + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_UPDATE_SUB_TYPE, bizNo = "{{#updateReqVO.id}}", + success = SYSTEM_USER_UPDATE_SUCCESS) public void updateUser(UserSaveReqVO updateReqVO) { updateReqVO.setPassword(null); // 特殊:此处不更新密码 - // 校验正确性 - validateUserForCreateOrUpdate(updateReqVO.getId(), updateReqVO.getUsername(), + // 1. 校验正确性 + AdminUserDO oldUser = validateUserForCreateOrUpdate(updateReqVO.getId(), updateReqVO.getUsername(), updateReqVO.getMobile(), updateReqVO.getEmail(), updateReqVO.getDeptId(), updateReqVO.getPostIds()); - // 更新用户 + + // 2.1 更新用户 AdminUserDO updateObj = BeanUtils.toBean(updateReqVO, AdminUserDO.class); userMapper.updateById(updateObj); - // 更新岗位 + // 2.2 更新岗位 updateUserPost(updateReqVO, updateObj); + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(oldUser, UserSaveReqVO.class)); + LogRecordContext.putVariable("user", oldUser); } private void updateUserPost(UserSaveReqVO reqVO, AdminUserDO updateObj) { @@ -124,7 +140,7 @@ public class AdminUserServiceImpl implements AdminUserService { Set postIds = CollUtil.emptyIfNull(updateObj.getPostIds()); Collection createPostIds = CollUtil.subtract(postIds, dbPostIds); Collection deletePostIds = CollUtil.subtract(dbPostIds, postIds); - // 执行新增和删除。对于已经授权的菜单,不用做任何处理 + // 执行新增和删除。对于已经授权的岗位,不用做任何处理 if (!CollectionUtil.isEmpty(createPostIds)) { userPostMapper.insertBatch(convertList(createPostIds, postId -> new UserPostDO().setUserId(userId).setPostId(postId))); @@ -173,14 +189,21 @@ public class AdminUserServiceImpl implements AdminUserService { } @Override + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_UPDATE_PASSWORD_SUB_TYPE, bizNo = "{{#id}}", + success = SYSTEM_USER_UPDATE_PASSWORD_SUCCESS) public void updateUserPassword(Long id, String password) { - // 校验用户存在 - validateUserExists(id); - // 更新密码 + // 1. 校验用户存在 + AdminUserDO user = validateUserExists(id); + + // 2. 更新密码 AdminUserDO updateObj = new AdminUserDO(); updateObj.setId(id); updateObj.setPassword(encodePassword(password)); // 加密密码 userMapper.updateById(updateObj); + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("user", user); + LogRecordContext.putVariable("newPassword", updateObj.getPassword()); } @Override @@ -196,15 +219,21 @@ public class AdminUserServiceImpl implements AdminUserService { @Override @Transactional(rollbackFor = Exception.class) + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_DELETE_SUB_TYPE, bizNo = "{{#id}}", + success = SYSTEM_USER_DELETE_SUCCESS) public void deleteUser(Long id) { - // 校验用户存在 - validateUserExists(id); - // 删除用户 + // 1. 校验用户存在 + AdminUserDO user = validateUserExists(id); + + // 2.1 删除用户 userMapper.deleteById(id); - // 删除用户关联数据 + // 2.2 删除用户关联数据 permissionService.processUserDeleted(id); - // 删除用户岗位 + // 2.2 删除用户岗位 userPostMapper.deleteByUserId(id); + + // 3. 记录操作日志上下文 + LogRecordContext.putVariable("user", user); } @Override @@ -294,12 +323,12 @@ public class AdminUserServiceImpl implements AdminUserService { return deptIds; } - private void validateUserForCreateOrUpdate(Long id, String username, String mobile, String email, + private AdminUserDO validateUserForCreateOrUpdate(Long id, String username, String mobile, String email, Long deptId, Set postIds) { // 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确 - DataPermissionUtils.executeIgnore(() -> { + return DataPermissionUtils.executeIgnore(() -> { // 校验用户存在 - validateUserExists(id); + AdminUserDO user = validateUserExists(id); // 校验用户名唯一 validateUsernameUnique(id, username); // 校验手机号唯一 @@ -310,18 +339,20 @@ public class AdminUserServiceImpl implements AdminUserService { deptService.validateDeptList(CollectionUtils.singleton(deptId)); // 校验岗位处于开启状态 postService.validatePostList(postIds); + return user; }); } @VisibleForTesting - void validateUserExists(Long id) { + AdminUserDO validateUserExists(Long id) { if (id == null) { - return; + return null; } AdminUserDO user = userMapper.selectById(id); if (user == null) { throw exception(USER_NOT_EXISTS); } + return user; } @VisibleForTesting -- Gitee From f869a5718df38236c7c637e286ae4e13097c55e7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 09:57:06 +0800 Subject: [PATCH 0158/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91s?= =?UTF-8?q?ystem=20user=20=E5=92=8C=20role=20=E6=8E=A5=E5=85=A5=E6=96=B0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/enums/DictTypeConstants.java | 4 ++-- .../vo/apiaccesslog/ApiAccessLogRespVO.java | 2 +- .../module/system/enums/DictTypeConstants.java | 2 -- .../service/permission/RoleServiceImplTest.java | 17 ----------------- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java index 53ab807cbc..36ad63d561 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java @@ -7,8 +7,6 @@ package cn.iocoder.yudao.module.infra.enums; */ public interface DictTypeConstants { - String REDIS_TIMEOUT_TYPE = "infra_redis_timeout_type"; // Redis 超时类型 - String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举 String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举 @@ -17,4 +15,6 @@ public interface DictTypeConstants { String CONFIG_TYPE = "infra_config_type"; // 参数配置类型 String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型 + String OPERATE_TYPE = "infra_operate_type"; // 操作类型 + } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java index ff0fed7a3d..e991450a4c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java @@ -70,7 +70,7 @@ public class ApiAccessLogRespVO { @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @ExcelProperty(value = "操作分类", converter = DictConvert.class) - @DictFormat(DictTypeConstants.OPERATE_TYPE) + @DictFormat(cn.iocoder.yudao.module.infra.enums.DictTypeConstants.OPERATE_TYPE) private Integer operateType; @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java index c0e3423830..d7967fe28f 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java @@ -14,8 +14,6 @@ public interface DictTypeConstants { String USER_SEX = "system_user_sex"; // 用户性别 - String OPERATE_TYPE = "system_operate_type"; // 操作类型 - String LOGIN_TYPE = "system_login_type"; // 登录日志的类型 String LOGIN_RESULT = "system_login_result"; // 登录结果 diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java index d2c4007191..941b7bca19 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java @@ -79,23 +79,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest { assertPojoEquals(reqVO, newRoleDO); } - @Test - public void testUpdateRoleStatus() { - // mock 数据 - RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus()) - .setType(RoleTypeEnum.CUSTOM.getType())); - roleMapper.insert(roleDO); - - // 准备参数 - Long roleId = roleDO.getId(); - - // 调用 - roleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); - // 断言 - RoleDO dbRoleDO = roleMapper.selectById(roleId); - assertEquals(CommonStatusEnum.DISABLE.getStatus(), dbRoleDO.getStatus()); - } - @Test public void testUpdateRoleDataScope() { // mock 数据 -- Gitee From 9ade9686f3fb94e4a9c578f2cbc84408bb018116 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 09:59:33 +0800 Subject: [PATCH 0159/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91s?= =?UTF-8?q?ystem=20user=20=E5=92=8C=20role=20=E6=8E=A5=E5=85=A5=E6=96=B0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/admin/user/vo/user/UserSaveReqVO.java | 2 +- .../system/framework/operatelog/core/PostParseFunction.java | 3 ++- .../yudao/module/system/service/user/AdminUserServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java index f196e651d8..192e0539f1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java @@ -8,10 +8,10 @@ import cn.iocoder.yudao.module.system.framework.operatelog.core.SexParseFunction import com.fasterxml.jackson.annotation.JsonIgnore; import com.mzt.logapi.starter.annotation.DiffLogField; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; import lombok.Data; import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.*; import java.util.Set; @Schema(description = "管理后台 - 用户创建/修改 Request VO") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java index e246d12343..40a13b6638 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java @@ -5,10 +5,11 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; import cn.iocoder.yudao.module.system.service.dept.PostService; import com.mzt.logapi.service.IParseFunction; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +import javax.annotation.Resource; + /** * 岗位名字的 {@link IParseFunction} 实现类 * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java index efae327f8c..d37e093fb9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java @@ -30,7 +30,6 @@ import com.google.common.annotations.VisibleForTesting; import com.mzt.logapi.context.LogRecordContext; import com.mzt.logapi.service.impl.DiffParseFunction; import com.mzt.logapi.starter.annotation.LogRecord; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; @@ -38,6 +37,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.io.InputStream; import java.time.LocalDateTime; import java.util.*; -- Gitee From 98b4fb7ff0842f9292bc9e05b951f7d590722c3a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Apr 2024 19:33:55 +0800 Subject: [PATCH 0160/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20imagine=20?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/MidjourneyClient.java | 17 +++++ .../ai/midjourney/MidjourneyConfig.java | 67 +++++++++++++++++++ ...m.java => MidjourneyInteractionsEnum.java} | 6 +- .../ai/midjourney/demo/MjExecute.java | 4 +- .../ai/midjourney/demo/MjHttpExecute.java | 6 +- .../ai/midjourney/interactions/MjClient.java | 46 +++++++++++++ .../interactions/MjImagineInteractions.java | 58 ++++++++++++++++ .../interactions/MjInteractions.java | 18 +++++ 8 files changed, 214 insertions(+), 8 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/MjCommandEnum.java => MidjourneyInteractionsEnum.java} (71%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyClient.java new file mode 100644 index 0000000000..1c99564e73 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyClient.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.framework.ai.midjourney; + +/** + * midjourney + * + * author: fansili + * time: 2024/4/3 17:09 + */ +public class MidjourneyClient { + + + public void imagine() { + + } + + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java new file mode 100644 index 0000000000..48f43ca604 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.framework.ai.midjourney; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Map; + +/** + * Midjourney 配置 + * + * author: fansili + * time: 2024/4/3 17:10 + */ +@Data +@Accessors(chain = true) +public class MidjourneyConfig { + + public MidjourneyConfig(String token, String guildId, String channelId, Map requestTemplates) { + this.token = token; + this.guildId = guildId; + this.channelId = channelId; + this.serverUrl = serverUrl; + this.apiInteractions = apiInteractions; + this.userAage = userAage; + this.requestTemplates = requestTemplates; + } + + /** + * token信息 + * + * tip: 登录discard F12找 messages 接口 + */ + private String token; + /** + * 服务器id + */ + private String guildId; + /** + * 频道id + */ + private String channelId; + + // + // api 接口 + + /** + * 服务地址 + */ + private String serverUrl = "https://discord.com/"; + /** + * 发送命令 + */ + private String apiInteractions = "api/v9/interactions"; + + + // + // 浏览器配置 + + private String userAage = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"; + + + // + // 请求 json 文件 + + + private Map requestTemplates; +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java similarity index 71% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java index e65ddf294c..20b70b5f9f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjCommandEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; +package cn.iocoder.yudao.framework.ai.midjourney; import lombok.Getter; @@ -6,7 +6,7 @@ import lombok.Getter; * MJ 命令 */ @Getter -public enum MjCommandEnum { +public enum MidjourneyInteractionsEnum { IMAGINE("imagine", "生成图片"), DESCRIBE("describe", "生成描述"), @@ -17,7 +17,7 @@ public enum MjCommandEnum { ; - MjCommandEnum(String value, String message) { + MidjourneyInteractionsEnum(String value, String message) { this.value =value; this.message =message; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java index 887a35e73c..299266c78b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.demo; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; + /** * mj 命令 */ @@ -12,6 +14,6 @@ public interface MjExecute { * @param prompt * @return */ - boolean execute(MjCommandEnum mjCommand, String prompt); + boolean execute(MidjourneyInteractionsEnum mjCommand, String prompt); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java index 4c1a8b20f8..34cf4fd7a6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.demo; import cn.hutool.core.io.FileUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -13,7 +14,7 @@ public class MjHttpExecute implements MjExecute { private static final String URL = "https://discord.com/"; @Override - public boolean execute(MjCommandEnum mjCommand, String prompt) { + public boolean execute(MidjourneyInteractionsEnum mjCommand, String prompt) { // 发送的 uri String uri = "api/v9/interactions"; // restTemplate 发送post请求 @@ -44,9 +45,6 @@ public class MjHttpExecute implements MjExecute { String res = restTemplate.postForObject(URL + uri, requestEntity, String.class); System.err.println("11"); - // -// MjHttpExecute mjHttpExecute = new MjHttpExecute(); -// mjHttpExecute.execute(null, "童话世界应该是什么样?"); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjClient.java new file mode 100644 index 0000000000..17fa16c8b6 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjClient.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.framework.ai.midjourney.interactions; + +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.client.RestTemplate; + +import java.util.Map; + +/** + * mj client + *

+ * author: fansili + * time: 2024/4/3 17:37 + */ +public class MjClient { + + private static RestTemplate restTemplate = new RestTemplate(); + private static HttpHeaders headers = new HttpHeaders(); + + static { + headers.setContentType(MediaType.APPLICATION_JSON); // 设置内容类型为JSON +// headers.set("Authorization", token); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("Referer", "https://discord.com/channels/1221445697157468200/1221445862962630706"); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"); // 如果需要,设置认证信息(例如JWT令牌) + headers.set("Cookie", "__dcfduid=6ca536c0e3fa11eeb7cbe34c31b49caf; __sdcfduid=6ca536c1e3fa11eeb7cbe34c31b49caf52cce5ffd8983d2a052cf6aba75fe5fe566f2c265902e283ce30dbf98b8c9c93; _gcl_au=1.1.245923998.1710853617; _ga=GA1.1.111061823.1710853617; __cfruid=6385bb3f48345a006b25992db7dcf984e395736d-1712124666; _cfuvid=O09la5ms0ypNptiG0iD8A6BKWlTxz1LG0WR7qRStD7o-1712124666575-0.0.1.1-604800000; locale=zh-CN; cf_clearance=l_YGod1_SUtYxpDVeZXiX7DLLPl1DYrquZe8WVltvYs-1712124668-1.0.1.1-Hl2.fToel23EpF2HCu9J20rB4D7OhhCzoajPSdo.9Up.wPxhvq22DP9RHzEBKuIUlKyH.kJLxXJfAt2N.LD5WQ; OptanonConsent=isIABGlobal=false&datestamp=Wed+Apr+03+2024+14%3A11%3A15+GMT%2B0800+(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)&version=6.33.0&hosts=&landingPath=https%3A%2F%2Fdiscord.com%2F&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1; _ga_Q149DFWHT7=GS1.1.1712124668.4.1.1712124679.0.0.0"); // 如果需要,设置认证信息(例如JWT令牌) + } + + public static String post(String url, String token, String body) { + // 设置token + headers.set("Authorization", token); + // 封装请求体和头部信息 + HttpEntity requestEntity = new HttpEntity<>(body, headers); + // 发送请求 + String result = restTemplate.postForObject(url, requestEntity, String.class); + return result; + } + + + public static String setParams(String requestTemplate, Map requestParams) { + for (Map.Entry entry : requestParams.entrySet()) { + requestTemplate = requestTemplate.replace("$".concat(entry.getKey()), entry.getValue()); + } + return requestTemplate; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java new file mode 100644 index 0000000000..ee05e72876 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.framework.ai.midjourney.interactions; + +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Maps; +import lombok.extern.slf4j.Slf4j; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + +/** + * + * + * author: fansili + * time: 2024/4/3 17:36 + */ +@Slf4j +public class MjImagineInteractions implements MjInteractions { + + private MidjourneyConfig midjourneyConfig; + + public MjImagineInteractions(MidjourneyConfig midjourneyConfig) { + this.midjourneyConfig = midjourneyConfig; + } + + @Override + public List supperInteractions() { + return null; + } + + @Override + public Boolean execute(String prompt) { + String url = midjourneyConfig.getServerUrl().concat(midjourneyConfig.getApiInteractions()); + // 获取请求模板 + String requestTemplate = midjourneyConfig.getRequestTemplates().get("imagine"); + // 设置参数 + HashMap requestParams = Maps.newHashMap(); + requestParams.put("guild_id", midjourneyConfig.getGuildId()); + requestParams.put("channel_id", midjourneyConfig.getChannelId()); + requestParams.put("session_id", UUID.randomUUID().toString().replaceAll("-", "")); + requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); + requestParams.put("prompt", prompt); + // 设置参数 + String requestBody = MjClient.setParams(requestTemplate, requestParams); + // 发送请求 + String res = MjClient.post(url, midjourneyConfig.getToken(), requestBody); + // + System.err.println(res); + log.info(res); + // 这个 res 只要不返回值,就是成功! + return StrUtil.isBlank(res); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java new file mode 100644 index 0000000000..9b94abc7a8 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.framework.ai.midjourney.interactions; + +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; + +import java.util.List; + +/** + * mj Interactions + * + * author: fansili + * time: 2024/4/3 17:22 + */ +public interface MjInteractions { + + List supperInteractions(); + + Boolean execute(String prompt); +} -- Gitee From f1f003b76dda730e9c76e8fd65781d1155aaea12 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Apr 2024 19:34:41 +0800 Subject: [PATCH 0161/1557] =?UTF-8?q?imagine=20=E5=8F=91=E9=80=81=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/http-body/imagine.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json new file mode 100644 index 0000000000..f4554cc502 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json @@ -0,0 +1,21 @@ +{ + "type": 2, + "guild_id": "$guild_id", + "channel_id": "$channel_id", + "application_id": "936929561302675456", + "session_id": "$session_id", + "nonce": "$nonce", + "data": { + "version": "1166847114203123795", + "id": "938956540159881230", + "name": "imagine", + "type": 1, + "options": [ + { + "type": 3, + "name": "prompt", + "value": "$prompt" + } + ] + } +} \ No newline at end of file -- Gitee From b77e8f16e9e8948a05ee332a59cb433d00f7cf08 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Apr 2024 19:38:03 +0800 Subject: [PATCH 0162/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20mj=20Imagine=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/image/MjTests.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java new file mode 100644 index 0000000000..df8fea90d4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.framework.ai.image; + +import cn.hutool.core.io.FileUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.interactions.MjImagineInteractions; +import org.junit.Test; + +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * mj + * + * author: fansili + * time: 2024/4/4 18:59 + */ +public class MjTests { + + @Test + public void mjImage() { + String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; + Map requestTemplates = new HashMap<>(); + List files = FileUtil.loopFiles("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body"); + for (File file : files) { + requestTemplates.put(file.getName().replace(".json", ""), FileUtil.readUtf8String(file)); + } + MidjourneyConfig midjourneyConfig = new MidjourneyConfig( + token, "1221445697157468200", "1221445862962630706", requestTemplates); + MjImagineInteractions mjImagineInteractions = new MjImagineInteractions(midjourneyConfig); + mjImagineInteractions.execute("童话里应该是什么样子?"); + } +} -- Gitee From e6bc5cf06955654c23e4f0399346cc07a5a21661 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Apr 2024 19:40:21 +0800 Subject: [PATCH 0163/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/interactions/MjImagineInteractions.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java index ee05e72876..8b49e55c2f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java @@ -4,10 +4,8 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; -import org.checkerframework.checker.nullness.qual.Nullable; import java.util.HashMap; import java.util.List; -- Gitee From 6adb8d657c840917396c5bba99e7ca38659543db Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Apr 2024 19:43:28 +0800 Subject: [PATCH 0164/1557] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=EF=BC=8C=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../midjourney/interactions/MjImagineInteractions.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java index 8b49e55c2f..5768cbe8d2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java @@ -47,10 +47,12 @@ public class MjImagineInteractions implements MjInteractions { String requestBody = MjClient.setParams(requestTemplate, requestParams); // 发送请求 String res = MjClient.post(url, midjourneyConfig.getToken(), requestBody); - // - System.err.println(res); - log.info(res); // 这个 res 只要不返回值,就是成功! - return StrUtil.isBlank(res); + boolean isSuccess = StrUtil.isBlank(res); + if (isSuccess) { + return true; + } + log.error("请求失败! 请求参数:{} 返回结果! {}", requestBody, res); + return isSuccess; } } -- Gitee From 28b2fad7b612e3b1ff4684da022788ba93a3cd77 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 5 Apr 2024 08:46:41 +0800 Subject: [PATCH 0165/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0mj=20web=20socket?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/demo/wss/Main.java | 39 -------------- .../framework/ai/image/MjWebSocketTests.java | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 39 deletions(-) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java deleted file mode 100644 index 25a3327020..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/Main.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; - -import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.SpringUserWebSocketStarter; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.UserMessageListener; - -import java.util.Scanner; - -/** - * author: fansili - * time: 2024/4/3 16:40 - */ -public class Main { - - public static void main(String[] args) { - String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; - - - DiscordHelper discordHelper = new DiscordHelper(); - DiscordAccount discordAccount = new DiscordAccount(); - discordAccount.setUserToken(token); - discordAccount.setGuildId("1221445697157468200"); - discordAccount.setChannelId("1221445862962630706"); - - - var messageListener = new UserMessageListener(); - var webSocketStarter = new SpringUserWebSocketStarter(discordHelper.getWss(), null, discordAccount, messageListener); - - try { - webSocketStarter.start(); - } catch (Exception e) { - throw new RuntimeException(e); - } - - - Scanner scanner = new Scanner(System.in); - scanner.nextLine(); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java new file mode 100644 index 0000000000..177b7c733b --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.framework.ai.image; + +import cn.hutool.core.io.FileUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.MjMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.MjWebSocketStarter; +import org.junit.Before; +import org.junit.Test; + +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +/** + * author: fansili + * time: 2024/4/3 16:40 + */ +public class MjWebSocketTests { + + private MidjourneyConfig midjourneyConfig; + + @Before + public void setup() { + String token = "OTcwNDc3NzQxMjUyMTY5NzI4.GJcVxa.VrzMii8dsHOJAPZn4Mw8GuEo7_nIUJij9JIHD4"; + Map requestTemplates = new HashMap<>(); + List files = FileUtil.loopFiles("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body"); + for (File file : files) { + requestTemplates.put(file.getName().replace(".json", ""), FileUtil.readUtf8String(file)); + } + this.midjourneyConfig = new MidjourneyConfig(token, "1225414986084388926", "1225414986587832385", requestTemplates); + } + + @Test + public void startSocketTest() { + String wssUrl = "wss://gateway.discord.gg"; + var messageListener = new MjMessageListener(midjourneyConfig); + var webSocketStarter = new MjWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener); + + try { + webSocketStarter.start(); + } catch (Exception e) { + throw new RuntimeException(e); + } + + + Scanner scanner = new Scanner(System.in); + scanner.nextLine(); + } +} -- Gitee From 5044a58118408c98367c7d3eaed440abac4accd5 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 5 Apr 2024 09:27:09 +0800 Subject: [PATCH 0166/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0mj=20web=20socket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/constants/MjConstants.java | 8 + .../MjInteractionsEnum.java} | 6 +- .../MjMessageTypeEnum.java} | 6 +- .../MjNotifyCode.java} | 4 +- .../ai/midjourney/demo/DiscordJadMain.java | 10 -- .../demo/DiscordWebSocketClient.java | 141 ------------------ .../ai/midjourney/demo/MidjourneyApi.java | 19 --- .../ai/midjourney/demo/MjExecute.java | 19 --- .../ai/midjourney/demo/MjHttpExecute.java | 50 ------- .../ai/midjourney/demo/jad/Constants.java | 22 --- .../midjourney/demo/jad/DiscordAccount.java | 35 ----- .../ai/midjourney/demo/jad/DomainObject.java | 70 --------- .../midjourney/demo/wss/AsyncLockUtils.java | 61 -------- .../ai/midjourney/demo/wss/DiscordHelper.java | 57 ------- .../demo/wss/user/UserMessageListener.java | 27 ---- .../interactions/MjImagineInteractions.java | 4 +- .../interactions/MjInteractions.java | 4 +- .../framework/ai/midjourney/package-info.java | 5 - .../user => webSocket}/FailureCallback.java | 2 +- .../MjWebSocketStarter.java} | 67 +++------ .../user => webSocket}/SuccessCallback.java | 2 +- .../wss => webSocket}/WebSocketStarter.java | 2 +- .../handler/MjWebSocketHandler.java} | 36 +++-- .../webSocket/listener/MjMessageListener.java | 44 ++++++ .../http-body}/interactions_type2.json | 0 .../http-body}/interactions_type3.json | 0 26 files changed, 110 insertions(+), 591 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{MidjourneyInteractionsEnum.java => constants/MjInteractionsEnum.java} (71%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/MessageType.java => constants/MjMessageTypeEnum.java} (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/ReturnCode.java => constants/MjNotifyCode.java} (86%) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/user => webSocket}/FailureCallback.java (55%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/user/SpringUserWebSocketStarter.java => webSocket/MjWebSocketStarter.java} (65%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/user => webSocket}/SuccessCallback.java (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss => webSocket}/WebSocketStarter.java (55%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{demo/wss/user/SpringWebSocketHandler.java => webSocket/handler/MjWebSocketHandler.java} (84%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/{java/cn/iocoder/yudao/framework/ai/midjourney/demo => resources/http-body}/interactions_type2.json (100%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/{java/cn/iocoder/yudao/framework/ai/midjourney/demo => resources/http-body}/interactions_type3.json (100%) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java new file mode 100644 index 0000000000..79b5b1b55e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.framework.ai.midjourney.constants; + +public final class MjConstants { + + public static final String CHANNEL_ID = "channel_id"; + + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java similarity index 71% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java index 20b70b5f9f..124bc83324 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package cn.iocoder.yudao.framework.ai.midjourney.constants; import lombok.Getter; @@ -6,7 +6,7 @@ import lombok.Getter; * MJ 命令 */ @Getter -public enum MidjourneyInteractionsEnum { +public enum MjInteractionsEnum { IMAGINE("imagine", "生成图片"), DESCRIBE("describe", "生成描述"), @@ -17,7 +17,7 @@ public enum MidjourneyInteractionsEnum { ; - MidjourneyInteractionsEnum(String value, String message) { + MjInteractionsEnum(String value, String message) { this.value =value; this.message =message; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java index cc48fe9834..b47199e91c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/MessageType.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; +package cn.iocoder.yudao.framework.ai.midjourney.constants; -public enum MessageType { +public enum MjMessageTypeEnum { /** * 创建. */ @@ -15,7 +15,7 @@ public enum MessageType { */ DELETE; - public static MessageType of(String type) { + public static MjMessageTypeEnum of(String type) { return switch (type) { case "MESSAGE_CREATE" -> CREATE; case "MESSAGE_UPDATE" -> UPDATE; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java similarity index 86% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java index 0de5390355..823d13fc2a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/ReturnCode.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; +package cn.iocoder.yudao.framework.ai.midjourney.constants; import lombok.experimental.UtilityClass; @UtilityClass -public final class ReturnCode { +public final class MjNotifyCode { /** * 成功. */ diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java deleted file mode 100644 index d9c9dba176..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordJadMain.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; - -/** - * author: fansili - * time: 2024/4/3 15:54 - */ -public class DiscordJadMain { - - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java deleted file mode 100644 index df9705095a..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/DiscordWebSocketClient.java +++ /dev/null @@ -1,141 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; -import cn.hutool.http.useragent.UserAgent; -import cn.hutool.http.useragent.UserAgentUtil; -import cn.hutool.json.JSONObject; -import com.alibaba.fastjson.JSON; -import org.springframework.web.socket.*; -import org.springframework.web.socket.client.standard.StandardWebSocketClient; -import org.springframework.web.socket.handler.TextWebSocketHandler; - -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; - -/** - * https://blog.csdn.net/qq_38490457/article/details/125250135 - */ -public class DiscordWebSocketClient { - - private static final String DISCORD_GATEWAY_URL = "wss://gateway.discord.gg/?v=9&encoding=json"; - - public static void main(String[] args) throws InterruptedException, ExecutionException, IOException, URISyntaxException { - StandardWebSocketClient client = new StandardWebSocketClient(); - DiscordWebSocketHandler handler = new DiscordWebSocketHandler(); - - - WebSocketHttpHeaders headers = new WebSocketHttpHeaders(); - headers.add("Accept-Encoding", "gzip, deflate, br"); - headers.add("Accept-Language", "zh-CN,zh;q=0.9"); - headers.add("Cache-Control", "no-cache"); - headers.add("Pragma", "no-cache"); - headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); - headers.add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"); - - Future futureSession = client.doHandshake(handler, headers, new URI(DISCORD_GATEWAY_URL)); - WebSocketSession session = futureSession.get(); // 这会阻塞直到连接建立 - - // 登录过程(你需要替换 TOKEN 为你的 Discord Bot Token) -// String token = "YOUR_DISCORD_BOT_TOKEN"; // 请替换为你的 Bot Token -// String identifyPayload = "{\"op\":2,\"d\":{\"token\":\"" + token + "\",\"properties\":{\"$os\":\"java\",\"$browser\":\"spring-websocket\",\"$device\":\"spring-websocket\"},\"compress\":false,\"large_threshold\":256,\"shard\":[0,1]}}"; -// session.sendMessage(new TextMessage(identifyPayload)); - - // 发送心跳以保持连接活跃 - Thread heartbeatThread = new Thread(() -> { - int interval = 0; // 初始心跳间隔,后续从 Discord 服务器获取 - while (!Thread.currentThread().isInterrupted()) { - try { - Thread.sleep(interval * 1000); // 等待指定的心跳间隔 - session.sendMessage(new TextMessage("{\"op\":1,\"d\":null}")); // 发送心跳包 - } catch (Exception e) { - e.printStackTrace(); - break; - } - } - }); - heartbeatThread.start(); - - // 等待用户输入来保持程序运行(仅用于示例) - System.in.read(); - - // 关闭连接和线程 - session.close(); - heartbeatThread.interrupt(); - } - - private static class DiscordWebSocketHandler implements WebSocketHandler { - - @Override - public void afterConnectionEstablished(WebSocketSession session) throws Exception { - - } - - @Override - public void handleMessage(WebSocketSession session, WebSocketMessage message) throws Exception { - Object payload = message.getPayload(); - - session.sendMessage(new TextMessage(JSON.toJSONString(createAuthData()))); - String a= ""; - } - - @Override - public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception { - - } - - @Override - public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception { - - } - - @Override - public boolean supportsPartialMessages() { - return false; - } - - - private JSONObject createAuthData() { - String userAgentStr = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"; - UserAgent userAgent = UserAgentUtil.parse(userAgentStr); - String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; - - JSONObject connectionProperties = new JSONObject() - .put("browser", userAgent.getBrowser().getName()) - .put("browser_user_agent", userAgentStr) - .put("browser_version", userAgent.getVersion()) - .put("client_build_number", 222963) - .put("client_event_source", null) - .put("device", "") - .put("os", userAgent.getOs().getName()) - .put("referer", "https://www.midjourney.com") - .put("referrer_current", "") - .put("referring_domain", "www.midjourney.com") - .put("referring_domain_current", "") - .put("release_channel", "stable") - .put("system_locale", "zh-CN"); - JSONObject presence = new JSONObject() - .put("activities", "") - .put("afk", false) - .put("since", 0) - .put("status", "online"); - JSONObject clientState = new JSONObject() - .put("api_code_version", 0) - .put("guild_versions", "") - .put("highest_last_message_id", "0") - .put("private_channels_version", "0") - .put("read_state_version", 0) - .put("user_guild_settings_version", -1) - .put("user_settings_version", -1); - return new JSONObject() - .put("capabilities", 16381) - .put("client_state", clientState) - .put("compress", false) - .put("presence", presence) - .put("properties", connectionProperties) - .put("token", token); - } - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java deleted file mode 100644 index 1c0cbd4804..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MidjourneyApi.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; - -/** - * 文档: https://www.xiubbs.com/t-401-1-1.html - * - * https://github.com/novicezk/midjourney-proxy/blob/main/README_CN.md - * - * discord4j、https://github.com/discord-jda/JDA - * - */ -public class MidjourneyApi { - - -// https://discord.com/api/v9/interactions -// -// payload_json: {"type":2,"application_id":"936929561302675456","guild_id":"1224337694918971392","channel_id":"1224337694918971396","session_id":"696318caed5180a2210e358e44801449","data":{"version":"1166847114203123795","id":"938956540159881230","name":"imagine","type":1,"options":[{"type":3,"name":"prompt","value":"中国的是什么样子"}],"application_command":{"id":"938956540159881230","type":1,"application_id":"936929561302675456","version":"1166847114203123795","name":"imagine","description":"Create images with Midjourney","options":[{"type":3,"name":"prompt","description":"The prompt to imagine","required":true,"description_localized":"The prompt to imagine","name_localized":"prompt"}],"dm_permission":true,"integration_types":[0],"global_popularity_rank":1,"description_localized":"Create images with Midjourney","name_localized":"imagine"},"attachments":[]},"nonce":"1224342266261274624","analytics_location":"slash_ui"} -// - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java deleted file mode 100644 index 299266c78b..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjExecute.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; - -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; - -/** - * mj 命令 - */ -public interface MjExecute { - - /** - * 执行命令 - * - * @param mjCommand - * @param prompt - * @return - */ - boolean execute(MidjourneyInteractionsEnum mjCommand, String prompt); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java deleted file mode 100644 index 34cf4fd7a6..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/MjHttpExecute.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo; - -import cn.hutool.core.io.FileUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.web.client.RestTemplate; - -import java.nio.charset.Charset; - -public class MjHttpExecute implements MjExecute { - - private static final String URL = "https://discord.com/"; - - @Override - public boolean execute(MidjourneyInteractionsEnum mjCommand, String prompt) { - // 发送的 uri - String uri = "api/v9/interactions"; - // restTemplate 发送post请求 -// String result = restTemplate.postForObject(URL + uri, prompt, String.class); - // 加载当前目录下文件 - return false; - } - - public static void main(String[] args) { - RestTemplate restTemplate = new RestTemplate(); - - String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; - String body = FileUtil.readString("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai" + - "/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney" + - "/interactions_type2.json", Charset.forName("utf-8")); - // 创建HTTP头部 - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); // 设置内容类型为JSON - headers.set("Authorization", token); // 如果需要,设置认证信息(例如JWT令牌) - headers.set("Referer", "https://discord.com/channels/1221445697157468200/1221445862962630706"); // 如果需要,设置认证信息(例如JWT令牌) - headers.set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"); // 如果需要,设置认证信息(例如JWT令牌) - headers.set("Cookie", "__dcfduid=6ca536c0e3fa11eeb7cbe34c31b49caf; __sdcfduid=6ca536c1e3fa11eeb7cbe34c31b49caf52cce5ffd8983d2a052cf6aba75fe5fe566f2c265902e283ce30dbf98b8c9c93; _gcl_au=1.1.245923998.1710853617; _ga=GA1.1.111061823.1710853617; __cfruid=6385bb3f48345a006b25992db7dcf984e395736d-1712124666; _cfuvid=O09la5ms0ypNptiG0iD8A6BKWlTxz1LG0WR7qRStD7o-1712124666575-0.0.1.1-604800000; locale=zh-CN; cf_clearance=l_YGod1_SUtYxpDVeZXiX7DLLPl1DYrquZe8WVltvYs-1712124668-1.0.1.1-Hl2.fToel23EpF2HCu9J20rB4D7OhhCzoajPSdo.9Up.wPxhvq22DP9RHzEBKuIUlKyH.kJLxXJfAt2N.LD5WQ; OptanonConsent=isIABGlobal=false&datestamp=Wed+Apr+03+2024+14%3A11%3A15+GMT%2B0800+(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)&version=6.33.0&hosts=&landingPath=https%3A%2F%2Fdiscord.com%2F&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1; _ga_Q149DFWHT7=GS1.1.1712124668.4.1.1712124679.0.0.0"); // 如果需要,设置认证信息(例如JWT令牌) - // 封装请求体和头部信息 - HttpEntity requestEntity = new HttpEntity<>(body, headers); - - // 定义请求URL和返回类型 - String uri = "api/v9/interactions"; - String res = restTemplate.postForObject(URL + uri, requestEntity, String.class); - System.err.println("11"); - - - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java deleted file mode 100644 index 42e1b2f479..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/Constants.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; - -import lombok.experimental.UtilityClass; - -@UtilityClass -public final class Constants { - // 任务扩展属性 start - public static final String TASK_PROPERTY_NOTIFY_HOOK = "notifyHook"; - public static final String TASK_PROPERTY_FINAL_PROMPT = "finalPrompt"; - public static final String TASK_PROPERTY_MESSAGE_ID = "messageId"; - public static final String TASK_PROPERTY_MESSAGE_HASH = "messageHash"; - public static final String TASK_PROPERTY_PROGRESS_MESSAGE_ID = "progressMessageId"; - public static final String TASK_PROPERTY_FLAGS = "flags"; - public static final String TASK_PROPERTY_NONCE = "nonce"; - public static final String TASK_PROPERTY_DISCORD_INSTANCE_ID = "discordInstanceId"; - // 任务扩展属性 end - - public static final String API_SECRET_HEADER_NAME = "mj-api-secret"; - public static final String DEFAULT_DISCORD_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"; - - public static final String MJ_MESSAGE_HANDLED = "mj_proxy_handled"; -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java deleted file mode 100644 index 8fafa9f593..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DiscordAccount.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@EqualsAndHashCode(callSuper = true) - -public class DiscordAccount extends DomainObject { - - - private String guildId; - - private String channelId; - - private String userToken; - - private String userAgent = Constants.DEFAULT_DISCORD_USER_AGENT; - - - private boolean enable = true; - - - private int coreSize = 3; - - private int queueSize = 10; - - private int timeoutMinutes = 5; - - @JsonIgnore - public String getDisplay() { - return this.channelId; - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java deleted file mode 100644 index e12339edcd..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/jad/DomainObject.java +++ /dev/null @@ -1,70 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.jad; - - -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - - -public class DomainObject implements Serializable { - @Getter - @Setter - protected String id; - - @Setter - protected Map properties; // 扩展属性,仅支持基本类型 - - @JsonIgnore - private final transient Object lock = new Object(); - - public void sleep() throws InterruptedException { - synchronized (this.lock) { - this.lock.wait(); - } - } - - public void awake() { - synchronized (this.lock) { - this.lock.notifyAll(); - } - } - - public DomainObject setProperty(String name, Object value) { - getProperties().put(name, value); - return this; - } - - public DomainObject removeProperty(String name) { - getProperties().remove(name); - return this; - } - - public Object getProperty(String name) { - return getProperties().get(name); - } - - @SuppressWarnings("unchecked") - public T getPropertyGeneric(String name) { - return (T) getProperty(name); - } - - public T getProperty(String name, Class clz) { - return getProperty(name, clz, null); - } - - public T getProperty(String name, Class clz, T defaultValue) { - Object value = getProperty(name); - return value == null ? defaultValue : clz.cast(value); - } - - public Map getProperties() { - if (this.properties == null) { - this.properties = new HashMap<>(); - } - return this.properties; - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java deleted file mode 100644 index 365935a8f3..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/AsyncLockUtils.java +++ /dev/null @@ -1,61 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; - -import cn.hutool.cache.CacheUtil; -import cn.hutool.cache.impl.TimedCache; -import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DomainObject; -import lombok.experimental.UtilityClass; - -import java.time.Duration; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -@UtilityClass -public class AsyncLockUtils { - private static final TimedCache LOCK_MAP = CacheUtil.newTimedCache(Duration.ofDays(1).toMillis()); - - public static synchronized LockObject getLock(String key) { - return LOCK_MAP.get(key); - } - - public static LockObject waitForLock(String key, Duration duration) throws TimeoutException { - LockObject lockObject; - synchronized (LOCK_MAP) { - if (LOCK_MAP.containsKey(key)) { - lockObject = LOCK_MAP.get(key); - } else { - lockObject = new LockObject(key); - LOCK_MAP.put(key, lockObject); - } - } - Future future = ThreadUtil.execAsync(() -> { - try { - lockObject.sleep(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - }); - try { - future.get(duration.toMillis(), TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } catch (ExecutionException e) { - // do nothing - } catch (TimeoutException e) { - future.cancel(true); - throw new TimeoutException("Wait Timeout"); - } finally { - LOCK_MAP.remove(lockObject.getId()); - } - return lockObject; - } - - public static class LockObject extends DomainObject { - - public LockObject(String id) { - this.id = id; - } - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java deleted file mode 100644 index 7f57fea086..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/DiscordHelper.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; - -import cn.hutool.core.text.CharSequenceUtil; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@Component -@RequiredArgsConstructor -public class DiscordHelper { - /** - * DISCORD_SERVER_URL. - */ - public static final String DISCORD_SERVER_URL = "https://discord.com"; - /** - * DISCORD_CDN_URL. - */ - public static final String DISCORD_CDN_URL = "https://cdn.discordapp.com"; - /** - * DISCORD_WSS_URL. - */ - public static final String DISCORD_WSS_URL = "wss://gateway.discord.gg"; - /** - * DISCORD_UPLOAD_URL. - */ - public static final String DISCORD_UPLOAD_URL = "https://discord-attachments-uploads-prd.storage.googleapis.com"; - - public String getServer() { - return DISCORD_SERVER_URL; - } - - public String getCdn() { - return DISCORD_CDN_URL; - } - - public String getWss() { - return DISCORD_WSS_URL; - } - - public String getMessageHash(String imageUrl) { - if (CharSequenceUtil.isBlank(imageUrl)) { - return null; - } - if (CharSequenceUtil.endWith(imageUrl, "_grid_0.webp")) { - int hashStartIndex = imageUrl.lastIndexOf("/"); - if (hashStartIndex < 0) { - return null; - } - return CharSequenceUtil.sub(imageUrl, hashStartIndex + 1, imageUrl.length() - "_grid_0.webp".length()); - } - int hashStartIndex = imageUrl.lastIndexOf("_"); - if (hashStartIndex < 0) { - return null; - } - return CharSequenceUtil.subBefore(imageUrl.substring(hashStartIndex + 1), ".", true); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java deleted file mode 100644 index ca97b6caef..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/UserMessageListener.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; - - -import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.MessageType; -import lombok.extern.slf4j.Slf4j; -import net.dv8tion.jda.api.utils.data.DataObject; - -@Slf4j -public class UserMessageListener { - - public void onMessage(DataObject raw) { - MessageType messageType = MessageType.of(raw.getString("t")); - if (messageType == null || MessageType.DELETE == messageType) { - return; - } - DataObject data = raw.getObject("d"); - System.err.println(data); - ThreadUtil.sleep(50); -// for (MessageHandler messageHandler : this.messageHandlers) { -// if (data.getBoolean(Constants.MJ_MESSAGE_HANDLED, false)) { -// return; -// } -// messageHandler.handle(this.instance, messageType, data); -// } - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java index 5768cbe8d2..5e49d67843 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjImagineInteractions.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.interactions; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MjInteractionsEnum; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; @@ -27,7 +27,7 @@ public class MjImagineInteractions implements MjInteractions { } @Override - public List supperInteractions() { + public List supperInteractions() { return null; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java index 9b94abc7a8..38f58f70fc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.ai.midjourney.interactions; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyInteractionsEnum; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MjInteractionsEnum; import java.util.List; @@ -12,7 +12,7 @@ import java.util.List; */ public interface MjInteractions { - List supperInteractions(); + List supperInteractions(); Boolean execute(String prompt); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java deleted file mode 100644 index 2ab1129635..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: fansili - * time: 2024/4/3 17:08 - */ -package cn.iocoder.yudao.framework.ai.midjourney; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java similarity index 55% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java index 9600ddab37..29bdb062c7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/FailureCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.webSocket; public interface FailureCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java similarity index 65% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java index 644a36844e..e6dcafc1a5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringUserWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java @@ -1,13 +1,12 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.webSocket; -import cn.hutool.core.exceptions.ValidateException; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.AsyncLockUtils; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.ReturnCode; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.WebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MjNotifyCode; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler.MjWebSocketHandler; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.websocket.Constants; import org.jetbrains.annotations.NotNull; @@ -19,15 +18,14 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import java.io.IOException; import java.net.URI; -import java.time.Duration; import java.util.concurrent.TimeoutException; @Slf4j -public class SpringUserWebSocketStarter implements WebSocketStarter { +public class MjWebSocketStarter implements WebSocketStarter { private static final int CONNECT_RETRY_LIMIT = 5; - private final DiscordAccount account; - private final UserMessageListener userMessageListener; + private final MidjourneyConfig midjourneyConfig; + private final MjMessageListener userMessageListener; private final String wssServer; private final String resumeWss; @@ -36,10 +34,10 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { private WebSocketSession webSocketSession = null; private ResumeData resumeData = null; - public SpringUserWebSocketStarter(String wssServer, String resumeWss, DiscordAccount account, UserMessageListener userMessageListener) { + public MjWebSocketStarter(String wssServer, String resumeWss, MidjourneyConfig midjourneyConfig, MjMessageListener userMessageListener) { this.wssServer = wssServer; this.resumeWss = resumeWss; - this.account = account; + this.midjourneyConfig = midjourneyConfig; this.userMessageListener = userMessageListener; } @@ -55,8 +53,8 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { headers.add("Cache-Control", "no-cache"); headers.add("Pragma", "no-cache"); headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); - headers.add("User-Agent", this.account.getUserAgent()); - var handler = new SpringWebSocketHandler(this.account, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); + headers.add("User-Agent", this.midjourneyConfig.getUserAage()); + var handler = new MjWebSocketHandler(this.midjourneyConfig, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); String gatewayUrl; if (reconnect) { gatewayUrl = getGatewayServer(this.resumeData.resumeGatewayUrl()) + "/?encoding=json&v=9&compress=zlib-stream"; @@ -72,12 +70,12 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { socketSessionFuture.addCallback(new ListenableFutureCallback<>() { @Override public void onFailure(@NotNull Throwable e) { - onSocketFailure(SpringWebSocketHandler.CLOSE_CODE_EXCEPTION, e.getMessage()); + onSocketFailure(MjWebSocketHandler.CLOSE_CODE_EXCEPTION, e.getMessage()); } @Override public void onSuccess(WebSocketSession session) { - SpringUserWebSocketStarter.this.webSocketSession = session; + MjWebSocketStarter.this.webSocketSession = session; } }); } @@ -85,7 +83,7 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { private void onSocketSuccess(String sessionId, Object sequence, String resumeGatewayUrl) { this.resumeData = new ResumeData(sessionId, sequence, resumeGatewayUrl); this.running = true; - notifyWssLock(ReturnCode.SUCCESS, ""); + notifyWssLock(MjNotifyCode.SUCCESS, ""); } private void onSocketFailure(int code, String reason) { @@ -99,13 +97,12 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { } this.running = false; if (code >= 4000) { - log.warn("[wss-{}] Can't reconnect! Account disabled. Closed by {}({}).", this.account.getDisplay(), code, reason); - disableAccount(); + log.warn("[wss-{}] Can't reconnect! Account disabled. Closed by {}({}).", this.midjourneyConfig.getChannelId(), code, reason); } else if (code == 2001) { - log.warn("[wss-{}] Closed by {}({}). Try reconnect...", this.account.getDisplay(), code, reason); + log.warn("[wss-{}] Closed by {}({}). Try reconnect...", this.midjourneyConfig.getChannelId(), code, reason); tryReconnect(); } else { - log.warn("[wss-{}] Closed by {}({}). Try new connection...", this.account.getDisplay(), code, reason); + log.warn("[wss-{}] Closed by {}({}). Try new connection...", this.midjourneyConfig.getChannelId(), code, reason); tryNewConnect(); } } @@ -117,7 +114,7 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { if (e instanceof TimeoutException) { closeSocketSessionWhenIsOpen(); } - log.warn("[wss-{}] Reconnect fail: {}, Try new connection...", this.account.getDisplay(), e.getMessage()); + log.warn("[wss-{}] Reconnect fail: {}, Try new connection...", this.midjourneyConfig.getChannelId(), e.getMessage()); ThreadUtil.sleep(1000); tryNewConnect(); } @@ -132,39 +129,19 @@ public class SpringUserWebSocketStarter implements WebSocketStarter { if (e instanceof TimeoutException) { closeSocketSessionWhenIsOpen(); } - log.warn("[wss-{}] New connect fail ({}): {}", this.account.getDisplay(), i, e.getMessage()); + log.warn("[wss-{}] New connect fail ({}): {}", this.midjourneyConfig.getChannelId(), i, e.getMessage()); ThreadUtil.sleep(5000); } } - log.error("[wss-{}] Account disabled", this.account.getDisplay()); - disableAccount(); + log.error("[wss-{}] Account disabled", this.midjourneyConfig.getChannelId()); } public void tryStart(boolean reconnect) throws Exception { start(reconnect); - AsyncLockUtils.LockObject lock = AsyncLockUtils.waitForLock("wss:" + this.account.getId(), Duration.ofSeconds(20)); - int code = lock.getProperty("code", Integer.class, 0); - if (code == ReturnCode.SUCCESS) { - log.debug("[wss-{}] {} success.", this.account.getDisplay(), reconnect ? "Reconnect" : "New connect"); - return; - } - throw new ValidateException(lock.getProperty("description", String.class)); } private void notifyWssLock(int code, String reason) { - AsyncLockUtils.LockObject lock = AsyncLockUtils.getLock("wss:" + this.account.getId()); - if (lock != null) { - lock.setProperty("code", code); - lock.setProperty("description", reason); - lock.awake(); - } - } - - private void disableAccount() { - if (Boolean.FALSE.equals(this.account.isEnable())) { - return; - } - this.account.setEnable(false); + System.err.println("notifyWssLock: " + code + " - " + reason); } private void closeSocketSessionWhenIsOpen() { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java index 7ff2bd3af4..729498fbc8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SuccessCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.webSocket; public interface SuccessCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java similarity index 55% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java index 82874f2042..88e2832441 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/WebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss; +package cn.iocoder.yudao.framework.ai.midjourney.webSocket; public interface WebSocketStarter { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java similarity index 84% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java index b9d77784d2..481fa1b0c0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/wss/user/SpringWebSocketHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java @@ -1,11 +1,14 @@ -package cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user; +package cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.http.useragent.UserAgent; import cn.hutool.http.useragent.UserAgentUtil; -import cn.iocoder.yudao.framework.ai.midjourney.demo.jad.DiscordAccount; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.FailureCallback; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.SuccessCallback; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataArray; @@ -26,13 +29,13 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @Slf4j -public class SpringWebSocketHandler implements WebSocketHandler { +public class MjWebSocketHandler implements WebSocketHandler { public static final int CLOSE_CODE_RECONNECT = 2001; public static final int CLOSE_CODE_INVALIDATE = 1009; public static final int CLOSE_CODE_EXCEPTION = 1011; - private final DiscordAccount account; - private final UserMessageListener userMessageListener; + private final MidjourneyConfig midjourneyConfig; + private final MjMessageListener userMessageListener; private final SuccessCallback successCallback; private final FailureCallback failureCallback; @@ -54,8 +57,11 @@ public class SpringWebSocketHandler implements WebSocketHandler { private final Decompressor decompressor = new ZlibDecompressor(2048); - public SpringWebSocketHandler(DiscordAccount account, UserMessageListener userMessageListener, SuccessCallback successCallback, FailureCallback failureCallback) { - this.account = account; + public MjWebSocketHandler(MidjourneyConfig account, + MjMessageListener userMessageListener, + SuccessCallback successCallback, + FailureCallback failureCallback) { + this.midjourneyConfig = account; this.userMessageListener = userMessageListener; this.successCallback = successCallback; this.failureCallback = failureCallback; @@ -70,7 +76,7 @@ public class SpringWebSocketHandler implements WebSocketHandler { @Override public void handleTransportError(@NotNull WebSocketSession session, @NotNull Throwable e) throws Exception { - log.error("[wss-{}] Transport error", this.account.getDisplay(), e); + log.error("[wss-{}] Transport error", this.midjourneyConfig.getChannelId(), e); onFailure(CLOSE_CODE_EXCEPTION, "transport error"); } @@ -108,7 +114,7 @@ public class SpringWebSocketHandler implements WebSocketHandler { case WebSocketCode.RECONNECT -> onFailure(CLOSE_CODE_RECONNECT, "receive server reconnect"); case WebSocketCode.INVALIDATE_SESSION -> onFailure(CLOSE_CODE_INVALIDATE, "receive session invalid"); case WebSocketCode.DISPATCH -> handleDispatch(data); - default -> log.debug("[wss-{}] Receive unknown code: {}.", account.getDisplay(), data); + default -> log.debug("[wss-{}] Receive unknown code: {}.", midjourneyConfig.getChannelId(), data); } } @@ -129,7 +135,7 @@ public class SpringWebSocketHandler implements WebSocketHandler { try { this.userMessageListener.onMessage(raw); } catch (Exception e) { - log.error("[wss-{}] Handle message error", this.account.getDisplay(), e); + log.error("[wss-{}] Handle message error", this.midjourneyConfig.getChannelId(), e); } } } @@ -160,7 +166,7 @@ public class SpringWebSocketHandler implements WebSocketHandler { if (CharSequenceUtil.isBlank(this.sessionId)) { sendMessage(session, WebSocketCode.IDENTIFY, this.authData); } else { - var data = DataObject.empty().put("token", this.account.getUserToken()) + var data = DataObject.empty().put("token", this.midjourneyConfig.getToken()) .put("session_id", this.sessionId).put("seq", this.sequence); sendMessage(session, WebSocketCode.RESUME, data); } @@ -171,7 +177,7 @@ public class SpringWebSocketHandler implements WebSocketHandler { try { session.sendMessage(new TextMessage(data.toString())); } catch (IOException e) { - log.error("[wss-{}] Send message error", this.account.getDisplay(), e); + log.error("[wss-{}] Send message error", this.midjourneyConfig.getChannelId(), e); onFailure(CLOSE_CODE_EXCEPTION, "send message error"); } } @@ -201,10 +207,10 @@ public class SpringWebSocketHandler implements WebSocketHandler { } private DataObject createAuthData() { - UserAgent userAgent = UserAgentUtil.parse(this.account.getUserAgent()); + UserAgent userAgent = UserAgentUtil.parse(this.midjourneyConfig.getUserAage()); DataObject connectionProperties = DataObject.empty() .put("browser", userAgent.getBrowser().getName()) - .put("browser_user_agent", this.account.getUserAgent()) + .put("browser_user_agent", this.midjourneyConfig.getUserAage()) .put("browser_version", userAgent.getVersion()) .put("client_build_number", 222963) .put("client_event_source", null) @@ -235,6 +241,6 @@ public class SpringWebSocketHandler implements WebSocketHandler { .put("compress", false) .put("presence", presence) .put("properties", connectionProperties) - .put("token", this.account.getUserToken()); + .put("token", this.midjourneyConfig.getToken()); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java new file mode 100644 index 0000000000..8e57a46abb --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener; + + +import cn.hutool.core.text.CharSequenceUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MjConstants; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MjMessageTypeEnum; +import lombok.extern.slf4j.Slf4j; +import net.dv8tion.jda.api.utils.data.DataObject; + +@Slf4j +public class MjMessageListener { + + private MidjourneyConfig midjourneyConfig; + + public MjMessageListener(MidjourneyConfig midjourneyConfig) { + this.midjourneyConfig = midjourneyConfig; + } + + public void onMessage(DataObject raw) { + MjMessageTypeEnum messageType = MjMessageTypeEnum.of(raw.getString("t")); + if (messageType == null || MjMessageTypeEnum.DELETE == messageType) { + return; + } + DataObject data = raw.getObject("d"); + if (ignoreAndLogMessage(data, messageType)) { + return; + } + System.err.println(data); +// if (data.getBoolean(Constants.MJ_MESSAGE_HANDLED, false)) { +// return; +// } + } + + private boolean ignoreAndLogMessage(DataObject data, MjMessageTypeEnum messageType) { + String channelId = data.getString(MjConstants.CHANNEL_ID); + if (!CharSequenceUtil.equals(channelId, midjourneyConfig.getChannelId())) { + return true; + } + String authorName = data.optObject("author").map(a -> a.getString("username")).orElse("System"); + log.debug("{} - {} - {}: {}", midjourneyConfig.getChannelId(), messageType.name(), authorName, data.opt("content").orElse("")); + return false; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type2.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/interactions_type2.json similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type2.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/interactions_type2.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type3.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/interactions_type3.json similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/demo/interactions_type3.json rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/interactions_type3.json -- Gitee From 44e44dc4bb1431a293afd2d3cd9c57fccb65258e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 5 Apr 2024 10:15:59 +0800 Subject: [PATCH 0167/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/midjourney/constants/MjNotifyCode.java | 28 ------ .../webSocket/MjWebSocketStarter.java | 99 ++++++++++++++----- .../webSocket/handler/MjWebSocketHandler.java | 39 +++++++- 3 files changed, 113 insertions(+), 53 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java index 823d13fc2a..103bd6fdf5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java @@ -8,35 +8,7 @@ public final class MjNotifyCode { * 成功. */ public static final int SUCCESS = 1; - /** - * 数据未找到. - */ - public static final int NOT_FOUND = 3; - /** - * 校验错误. - */ - public static final int VALIDATION_ERROR = 4; - /** - * 系统异常. - */ - public static final int FAILURE = 9; - /** - * 已存在. - */ - public static final int EXISTED = 21; - /** - * 排队中. - */ - public static final int IN_QUEUE = 22; - /** - * 队列已满. - */ - public static final int QUEUE_REJECTED = 23; - /** - * prompt包含敏感词. - */ - public static final int BANNED_PROMPT = 24; } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java index e6dcafc1a5..0d6a7d0c64 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java @@ -7,9 +7,11 @@ import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; import cn.iocoder.yudao.framework.ai.midjourney.constants.MjNotifyCode; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler.MjWebSocketHandler; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.websocket.Constants; import org.jetbrains.annotations.NotNull; +import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHttpHeaders; @@ -22,19 +24,43 @@ import java.util.concurrent.TimeoutException; @Slf4j public class MjWebSocketStarter implements WebSocketStarter { + /** + * 链接重试次数 + */ private static final int CONNECT_RETRY_LIMIT = 5; - + /** + * mj 配置文件 + */ private final MidjourneyConfig midjourneyConfig; + /** + * mj 监听(所有message 都会 callback到这里) + */ private final MjMessageListener userMessageListener; + /** + * wss 服务器 + */ private final String wssServer; + /** + * + */ private final String resumeWss; - + /** + * + */ + private ResumeData resumeData = null; + /** + * 是否运行成功 + */ private boolean running = false; - + /** + * 链接成功的 session + */ private WebSocketSession webSocketSession = null; - private ResumeData resumeData = null; - public MjWebSocketStarter(String wssServer, String resumeWss, MidjourneyConfig midjourneyConfig, MjMessageListener userMessageListener) { + public MjWebSocketStarter(String wssServer, + String resumeWss, + MidjourneyConfig midjourneyConfig, + MjMessageListener userMessageListener) { this.wssServer = wssServer; this.resumeWss = resumeWss; this.midjourneyConfig = midjourneyConfig; @@ -42,11 +68,12 @@ public class MjWebSocketStarter implements WebSocketStarter { } @Override - public void start() throws Exception { + public void start() { start(false); } private void start(boolean reconnect) { + // 设置header WebSocketHttpHeaders headers = new WebSocketHttpHeaders(); headers.add("Accept-Encoding", "gzip, deflate, br"); headers.add("Accept-Language", "zh-CN,zh;q=0.9"); @@ -54,19 +81,26 @@ public class MjWebSocketStarter implements WebSocketStarter { headers.add("Pragma", "no-cache"); headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); headers.add("User-Agent", this.midjourneyConfig.getUserAage()); - var handler = new MjWebSocketHandler(this.midjourneyConfig, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); + // 创建 mjHeader + MjWebSocketHandler mjWebSocketHandler = new MjWebSocketHandler( + this.midjourneyConfig, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); + // String gatewayUrl; if (reconnect) { - gatewayUrl = getGatewayServer(this.resumeData.resumeGatewayUrl()) + "/?encoding=json&v=9&compress=zlib-stream"; - handler.setSessionId(this.resumeData.sessionId()); - handler.setSequence(this.resumeData.sequence()); - handler.setResumeGatewayUrl(this.resumeData.resumeGatewayUrl()); + gatewayUrl = getGatewayServer(this.resumeData.getResumeGatewayUrl()) + "/?encoding=json&v=9&compress=zlib-stream"; + mjWebSocketHandler.setSessionId(this.resumeData.getSessionId()); + mjWebSocketHandler.setSequence(this.resumeData.getSequence()); + mjWebSocketHandler.setResumeGatewayUrl(this.resumeData.getResumeGatewayUrl()); } else { gatewayUrl = getGatewayServer(null) + "/?encoding=json&v=9&compress=zlib-stream"; } - var webSocketClient = new StandardWebSocketClient(); + // 创建 StandardWebSocketClient + StandardWebSocketClient webSocketClient = new StandardWebSocketClient(); + // 设置 io timeout 时间 webSocketClient.getUserProperties().put(Constants.IO_TIMEOUT_MS_PROPERTY, "10000"); - var socketSessionFuture = webSocketClient.doHandshake(handler, headers, URI.create(gatewayUrl)); + // + ListenableFuture socketSessionFuture = webSocketClient.doHandshake(mjWebSocketHandler, headers, URI.create(gatewayUrl)); + // 添加 callback 进行回调 socketSessionFuture.addCallback(new ListenableFutureCallback<>() { @Override public void onFailure(@NotNull Throwable e) { @@ -87,14 +121,18 @@ public class MjWebSocketStarter implements WebSocketStarter { } private void onSocketFailure(int code, String reason) { + // 1001异常可以忽略 if (code == 1001) { return; } + // 关闭 socket closeSocketSessionWhenIsOpen(); + // 没有运行通知 if (!this.running) { notifyWssLock(code, reason); return; } + // 已经运行先设置为false,发起 this.running = false; if (code >= 4000) { log.warn("[wss-{}] Can't reconnect! Account disabled. Closed by {}({}).", this.midjourneyConfig.getChannelId(), code, reason); @@ -107,36 +145,34 @@ public class MjWebSocketStarter implements WebSocketStarter { } } + /** + * 重连 + */ private void tryReconnect() { try { tryStart(true); } catch (Exception e) { - if (e instanceof TimeoutException) { - closeSocketSessionWhenIsOpen(); - } - log.warn("[wss-{}] Reconnect fail: {}, Try new connection...", this.midjourneyConfig.getChannelId(), e.getMessage()); + log.warn("[wss-{}] Reconnect fail: {}, Try new connection...", this.midjourneyConfig.getChannelId(), e.getMessage()); ThreadUtil.sleep(1000); tryNewConnect(); } } private void tryNewConnect() { + // 链接重试次数5 for (int i = 1; i <= CONNECT_RETRY_LIMIT; i++) { try { tryStart(false); return; } catch (Exception e) { - if (e instanceof TimeoutException) { - closeSocketSessionWhenIsOpen(); - } - log.warn("[wss-{}] New connect fail ({}): {}", this.midjourneyConfig.getChannelId(), i, e.getMessage()); + log.warn("[wss-{}] New connect fail ({}): {}", this.midjourneyConfig.getChannelId(), i, e.getMessage()); ThreadUtil.sleep(5000); } } log.error("[wss-{}] Account disabled", this.midjourneyConfig.getChannelId()); } - public void tryStart(boolean reconnect) throws Exception { + public void tryStart(boolean reconnect) { start(reconnect); } @@ -144,6 +180,9 @@ public class MjWebSocketStarter implements WebSocketStarter { System.err.println("notifyWssLock: " + code + " - " + reason); } + /** + * 关闭 socket session + */ private void closeSocketSessionWhenIsOpen() { try { if (this.webSocketSession != null && this.webSocketSession.isOpen()) { @@ -161,6 +200,20 @@ public class MjWebSocketStarter implements WebSocketStarter { return this.wssServer; } - public record ResumeData(String sessionId, Object sequence, String resumeGatewayUrl) { + @Getter + public static class ResumeData { + + public ResumeData(String sessionId, Object sequence, String resumeGatewayUrl) { + this.sessionId = sessionId; + this.sequence = sequence; + this.resumeGatewayUrl = resumeGatewayUrl; + } + + /** + * socket session + */ + private final String sessionId; + private final Object sequence; + private final String resumeGatewayUrl; } } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java index 481fa1b0c0..55fc7e4bc2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java @@ -30,16 +30,41 @@ import java.util.concurrent.TimeUnit; @Slf4j public class MjWebSocketHandler implements WebSocketHandler { + /** + * close 错误码:重连 + */ public static final int CLOSE_CODE_RECONNECT = 2001; + /** + * close 错误码:无效、作废 + */ public static final int CLOSE_CODE_INVALIDATE = 1009; + /** + * close 错误码:异常 + */ public static final int CLOSE_CODE_EXCEPTION = 1011; - + /** + * mj配置文件 + */ private final MidjourneyConfig midjourneyConfig; + /** + * mj 消息监听 + */ private final MjMessageListener userMessageListener; + /** + * 成功回调 + */ private final SuccessCallback successCallback; + /** + * 失败回调 + */ private final FailureCallback failureCallback; - + /** + * 心跳执行器 + */ private final ScheduledExecutorService heartExecutor; + /** + * auth数据 + */ private final DataObject authData; @Setter @@ -55,6 +80,9 @@ public class MjWebSocketHandler implements WebSocketHandler { private Future heartbeatInterval; private Future heartbeatTimeout; + /** + * 处理 message 消息的 Decompressor + */ private final Decompressor decompressor = new ZlibDecompressor(2048); public MjWebSocketHandler(MidjourneyConfig account, @@ -77,11 +105,13 @@ public class MjWebSocketHandler implements WebSocketHandler { @Override public void handleTransportError(@NotNull WebSocketSession session, @NotNull Throwable e) throws Exception { log.error("[wss-{}] Transport error", this.midjourneyConfig.getChannelId(), e); + // 通知链接异常 onFailure(CLOSE_CODE_EXCEPTION, "transport error"); } @Override public void afterConnectionClosed(@NotNull WebSocketSession session, @NotNull CloseStatus closeStatus) throws Exception { + // 链接关闭 onFailure(closeStatus.getCode(), closeStatus.getReason()); } @@ -92,13 +122,18 @@ public class MjWebSocketHandler implements WebSocketHandler { @Override public void handleMessage(@NotNull WebSocketSession session, WebSocketMessage message) throws Exception { + // 获取 message 消息 ByteBuffer buffer = (ByteBuffer) message.getPayload(); + // 解析 message byte[] decompressed = decompressor.decompress(buffer.array()); if (decompressed == null) { return; } + // 转换 json String json = new String(decompressed, StandardCharsets.UTF_8); + // 转换 jda 自带的 dataObject(和json object 差不多) DataObject data = DataObject.fromJson(json); + // 获取消息类型 int opCode = data.getInt("op"); switch (opCode) { case WebSocketCode.HEARTBEAT -> handleHeartbeat(session); -- Gitee From dfbd75b53c529f50a6a33ff498a623c2539a8baa Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 5 Apr 2024 10:16:46 +0800 Subject: [PATCH 0168/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9test=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0before=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/framework/ai/image/MjTests.java | 15 ++++++++++----- .../framework/ai/image/MjWebSocketTests.java | 8 ++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java index df8fea90d4..b5c434a946 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjTests.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.framework.ai.image; import cn.hutool.core.io.FileUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; import cn.iocoder.yudao.framework.ai.midjourney.interactions.MjImagineInteractions; +import org.junit.Before; import org.junit.Test; import java.io.File; @@ -18,16 +19,20 @@ import java.util.Map; */ public class MjTests { - @Test - public void mjImage() { - String token = "NTY5MDY4NDAxNzEyOTU1Mzky.G4-Fu0.MzD-7ll-ElbXTTgDPHF-WS_UyhMAfbKN3WyyBc"; + private MidjourneyConfig midjourneyConfig; + @Before + public void setup() { + String token = "OTcwNDc3NzQxMjUyMTY5NzI4.GJcVxa.VrzMii8dsHOJAPZn4Mw8GuEo7_nIUJij9JIHD4"; Map requestTemplates = new HashMap<>(); List files = FileUtil.loopFiles("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body"); for (File file : files) { requestTemplates.put(file.getName().replace(".json", ""), FileUtil.readUtf8String(file)); } - MidjourneyConfig midjourneyConfig = new MidjourneyConfig( - token, "1221445697157468200", "1221445862962630706", requestTemplates); + this.midjourneyConfig = new MidjourneyConfig(token, "1225414986084388926", "1225414986587832385", requestTemplates); + } + + @Test + public void mjImage() { MjImagineInteractions mjImagineInteractions = new MjImagineInteractions(midjourneyConfig); mjImagineInteractions.execute("童话里应该是什么样子?"); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java index 177b7c733b..786eb65707 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/MjWebSocketTests.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.framework.ai.image; import cn.hutool.core.io.FileUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.MjMessageListener; -import cn.iocoder.yudao.framework.ai.midjourney.demo.wss.user.MjWebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MjWebSocketStarter; import org.junit.Before; import org.junit.Test; @@ -23,13 +23,13 @@ public class MjWebSocketTests { @Before public void setup() { - String token = "OTcwNDc3NzQxMjUyMTY5NzI4.GJcVxa.VrzMii8dsHOJAPZn4Mw8GuEo7_nIUJij9JIHD4"; + String token = "OTcyNzIxMzA0ODkxNDUzNDUw.G_vMOz.BO_Q0sXAD80u5ZKIHPNYDTRX_FgeKL3cKFc53I"; Map requestTemplates = new HashMap<>(); List files = FileUtil.loopFiles("/Users/fansili/projects/github/ruoyi-vue-pro/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body"); for (File file : files) { requestTemplates.put(file.getName().replace(".json", ""), FileUtil.readUtf8String(file)); } - this.midjourneyConfig = new MidjourneyConfig(token, "1225414986084388926", "1225414986587832385", requestTemplates); + this.midjourneyConfig = new MidjourneyConfig(token, "1225608134878302329", "1225608134878302332", requestTemplates); } @Test -- Gitee From 1b02733c10e70e6ce04da0b462f23e1fdd6fdaaf Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 5 Apr 2024 10:23:35 +0800 Subject: [PATCH 0169/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=94=9F=E6=88=90=20socket=20=E6=8E=A5=E6=94=B6=E5=88=B0?= =?UTF-8?q?=E7=9A=84=E6=B6=88=E6=81=AF=E7=B1=BB=E5=9E=8B=E3=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1.json" | 41 +++++ .../10.json" | 115 ++++++++++++++ .../11.json" | 115 ++++++++++++++ .../12.json" | 145 ++++++++++++++++++ .../2.json" | 103 +++++++++++++ .../3.json" | 102 ++++++++++++ .../4.json" | 102 ++++++++++++ .../5.json" | 102 ++++++++++++ .../6.json" | 102 ++++++++++++ .../7.json" | 102 ++++++++++++ .../8.json" | 102 ++++++++++++ .../9.json" | 115 ++++++++++++++ 12 files changed, 1246 insertions(+) create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/1.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/10.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/11.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/12.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/2.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/3.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/4.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/5.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/6.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/7.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/8.json" create mode 100644 "yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/9.json" diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/1.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/1.json" new file mode 100644 index 0000000000..156a89e68c --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/1.json" @@ -0,0 +1,41 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "author": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + }, + "flags": 0, + "type": 0, + "mention_roles": [], + "nonce": "1225630680067604480", + "edited_timestamp": null, + "content": "南极应该是什么样子?", + "tts": false, + "referenced_message": null, + "mentions": [], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "guild_id": "1225608134878302329", + "id": "1225630681556586556", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:45.600000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/10.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/10.json" new file mode 100644 index 0000000000..e17f83fead --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/10.json" @@ -0,0 +1,115 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [ + { + "filename": "8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp", + "size": 34624, + "content_type": "image/webp", + "width": 512, + "placeholder_version": 1, + "proxy_url": "https://media.discordapp.net/attachments/1225608134878302332/1225630835240210442/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4aa&is=660f5faa&hm=f58106ba5fa0ddf51abe68493cf460ccd70eb7ef379d2d3865d4b45e230c3037&", + "placeholder": "4CcODwJ/hotGl2iHd2iYd3h3d/kJyLQA", + "id": "1225630835240210442", + "url": "https://cdn.discordapp.com/attachments/1225608134878302332/1225630835240210442/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4aa&is=660f5faa&hm=f58106ba5fa0ddf51abe68493cf460ccd70eb7ef379d2d3865d4b45e230c3037&", + "height": 512 + } + ], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:22.200320+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (55%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/11.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/11.json" new file mode 100644 index 0000000000..837c891236 --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/11.json" @@ -0,0 +1,115 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [ + { + "filename": "8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp", + "size": 46376, + "content_type": "image/webp", + "width": 512, + "placeholder_version": 1, + "proxy_url": "https://media.discordapp.net/attachments/1225608134878302332/1225630846317498469/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4ac&is=660f5fac&hm=efe167b852efc37fe4690253697cee2b8fd350d0b724b3a99004ad36baa09c1f&", + "placeholder": "oSgOFwRvtYxVlnl2d1iIh4h3aPdnmC8F", + "id": "1225630846317498469", + "url": "https://cdn.discordapp.com/attachments/1225608134878302332/1225630846317498469/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4ac&is=660f5fac&hm=efe167b852efc37fe4690253697cee2b8fd350d0b724b3a99004ad36baa09c1f&", + "height": 512 + } + ], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:24.805512+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (75%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/12.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/12.json" new file mode 100644 index 0000000000..890297b55d --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/12.json" @@ -0,0 +1,145 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [ + { + "components": [ + { + "custom_id": "MJ::JOB::upsample::1::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "U1", + "type": 2 + }, + { + "custom_id": "MJ::JOB::upsample::2::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "U2", + "type": 2 + }, + { + "custom_id": "MJ::JOB::upsample::3::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "U3", + "type": 2 + }, + { + "custom_id": "MJ::JOB::upsample::4::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "U4", + "type": 2 + }, + { + "emoji": { + "name": "🔄" + }, + "custom_id": "MJ::JOB::reroll::0::8f23f288-6028-468b-8056-1e4adef73985::SOLO", + "style": 2, + "type": 2 + } + ], + "type": 1 + }, + { + "components": [ + { + "custom_id": "MJ::JOB::variation::1::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "V1", + "type": 2 + }, + { + "custom_id": "MJ::JOB::variation::2::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "V2", + "type": 2 + }, + { + "custom_id": "MJ::JOB::variation::3::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "V3", + "type": 2 + }, + { + "custom_id": "MJ::JOB::variation::4::8f23f288-6028-468b-8056-1e4adef73985", + "style": 2, + "label": "V4", + "type": 2 + } + ], + "type": 1 + } + ], + "attachments": [ + { + "filename": "jverbalu4990__8f23f288-6028-468b-8056-1e4adef73985.png", + "size": 7092878, + "content_type": "image/png", + "width": 2048, + "placeholder_version": 1, + "proxy_url": "https://media.discordapp.net/attachments/1225608134878302332/1225630861899333652/jverbalu4990__8f23f288-6028-468b-8056-1e4adef73985.png?ex=6621d4b0&is=660f5fb0&hm=658c7766ac3df7e484ccf2e1a30b0afc266ec38e5b2da6c95f12cb7f9c204886&", + "placeholder": "YRgODwJvpY1XlXl2h0iYh4iIePkQqgkB", + "id": "1225630861899333652", + "url": "https://cdn.discordapp.com/attachments/1225608134878302332/1225630861899333652/jverbalu4990__8f23f288-6028-468b-8056-1e4adef73985.png?ex=6621d4b0&is=660f5fb0&hm=658c7766ac3df7e484ccf2e1a30b0afc266ec38e5b2da6c95f12cb7f9c204886&", + "height": 2048 + } + ], + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 0, + "mention_roles": [], + "edited_timestamp": null, + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)", + "tts": false, + "referenced_message": null, + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "guild_id": "1225608134878302329", + "id": "1225630862393999442", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:19:28.715000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/2.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/2.json" new file mode 100644 index 0000000000..2643136a28 --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/2.json" @@ -0,0 +1,103 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "nonce": "1225630715874377728", + "application_id": "936929561302675456", + "edited_timestamp": null, + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (Waiting to start)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/3.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/3.json" new file mode 100644 index 0000000000..0f6d35cc1c --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/3.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:18:59.141254+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (0%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/4.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/4.json" new file mode 100644 index 0000000000..d41eb22c2e --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/4.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:02.665459+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (10%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/5.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/5.json" new file mode 100644 index 0000000000..7503abd108 --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/5.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:05.339248+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (17%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/6.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/6.json" new file mode 100644 index 0000000000..61dad1272f --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/6.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:08.810399+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (25%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/7.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/7.json" new file mode 100644 index 0000000000..a21f527aa1 --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/7.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:12.017944+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/8.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/8.json" new file mode 100644 index 0000000000..48decf5f6e --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/8.json" @@ -0,0 +1,102 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:15.043965+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (35%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file diff --git "a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/9.json" "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/9.json" new file mode 100644 index 0000000000..10a28991da --- /dev/null +++ "b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/\345\233\276\347\211\207\346\266\210\346\201\257\350\277\207\347\250\213/9.json" @@ -0,0 +1,115 @@ +{ + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [ + { + "filename": "8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp", + "size": 30752, + "content_type": "image/webp", + "width": 512, + "placeholder_version": 1, + "proxy_url": "https://media.discordapp.net/attachments/1225608134878302332/1225630819515764806/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4a6&is=660f5fa6&hm=d46f487fce290539acae4e83322345b35f658c2ec40fb6f015a698dac9e84bb7&", + "placeholder": "HBgSFwJ/hYpEl3iGd3iId3h3R/k0gF4E", + "id": "1225630819515764806", + "url": "https://cdn.discordapp.com/attachments/1225608134878302332/1225630819515764806/8f23f288-6028-468b-8056-1e4adef73985_grid_0.webp?ex=6621d4a6&is=660f5fa6&hm=d46f487fce290539acae4e83322345b35f658c2ec40fb6f015a698dac9e84bb7&", + "height": 512 + } + ], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "imagine", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1225630717426274377", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 0, + "type": 20, + "mention_roles": [], + "application_id": "936929561302675456", + "edited_timestamp": "2024-04-05T02:19:18.460823+00:00", + "content": "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (45%) (fast, stealth)", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [ + { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + ], + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:35.840941+00:00", + "communication_disabled_until": null, + "roles": [ + "1225608242688819214" + ], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "interaction": { + "name": "imagine", + "member": { + "premium_since": null, + "nick": null, + "joined_at": "2024-04-05T00:49:10.062000+00:00", + "communication_disabled_until": null, + "roles": [], + "pending": false, + "flags": 0, + "deaf": false, + "mute": false, + "avatar": null + }, + "id": "1225630717426274377", + "type": 2, + "user": { + "global_name": "JVerbalu", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "guild_id": "1225608134878302329", + "position": 0, + "id": "1225630724431024259", + "embeds": [], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-05T02:18:55.822000+00:00" +} \ No newline at end of file -- Gitee From d9758636b191a4b7d0201b8d3943c15c5b7b220a Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 5 Apr 2024 12:59:37 +0800 Subject: [PATCH 0170/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=E6=8A=84=E9=80=81=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 4 +- .../flowable/core/util/BpmnModelUtils.java | 58 +++++++++++++------ .../task/BpmProcessInstanceCopyService.java | 6 +- .../BpmProcessInstanceCopyServiceImpl.java | 18 +++--- .../service/task/BpmSimpleNodeService.java | 34 +++++++++++ .../bpm/service/task/BpmTaskServiceImpl.java | 3 +- 6 files changed, 90 insertions(+), 33 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 75889985e2..4e26d02d9f 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -20,8 +20,10 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { // TODO @jaosn:-1、0、1、4、-2 是前端已经定义好的么?感觉未来可以考虑搞成和 BPMN 尽量一致的单词哈;类似 usertask 用户审批; START_EVENT_NODE(0, "开始节点"), APPROVE_USER_NODE (1, "审批人节点"), + // 抄送人节点、对应 BPMN 的 ScriptTask. 使用ScriptTask 原因。好像 ServiceTask 自定义属性不能写入 XML + SCRIPT_TASK_NODE(2, "抄送人节点"), EXCLUSIVE_GATEWAY_NODE(4, "排他网关"), - END_NODE(-2, "结束节点"); + END_EVENT_NODE(-2, "结束节点"); public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 17c36623b3..03745adceb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -13,6 +13,7 @@ import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; +import org.flowable.common.engine.impl.scripting.ScriptingEngines; import org.flowable.common.engine.impl.util.io.BytesStreamSource; import java.util.ArrayList; @@ -20,11 +21,15 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import static org.flowable.bpmn.constants.BpmnXMLConstants.*; + /** * 流程模型转操作工具类 */ public class BpmnModelUtils { + public static final String BPMN_SIMPLE_COPY_EXECUTION_SCRIPT = "#{bpmSimpleNodeService.copy(execution)}"; + public static Integer parseCandidateStrategy(FlowElement userTask) { return NumberUtils.parseInt(userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); @@ -379,26 +384,27 @@ public class BpmnModelUtils { Assert.notNull(nodeType, "模型节点类型不支持"); switch (nodeType) { case START_EVENT_NODE: - case APPROVE_USER_NODE: { + case APPROVE_USER_NODE: + case SCRIPT_TASK_NODE: { addBpmnSequenceFlowElement(mainProcess, node.getId(), childNode.getId(), null, null); // 递归调用后续节点 - addBpmnSequenceFlow(mainProcess, childNode,endId); + addBpmnSequenceFlow(mainProcess, childNode, endId); break; } case EXCLUSIVE_GATEWAY_NODE: { - String gateWayEndId = ( childNode == null || childNode.getId() == null ) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); + String gateWayEndId = (childNode == null || childNode.getId() == null) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); for (int i = 0; i < conditionNodes.size(); i++) { BpmSimpleModelNodeVO item = conditionNodes.get(i); - BpmSimpleModelNodeVO nextNodeOnCondition = getNextNodeOnCondition(item); + BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { addBpmnSequenceFlowElement(mainProcess, node.getId(), nextNodeOnCondition.getId(), - String.format("%s_SequenceFlow_%d", node.getId(), i+1), null); + String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); addBpmnSequenceFlow(mainProcess, nextNodeOnCondition, gateWayEndId); } else { addBpmnSequenceFlowElement(mainProcess, node.getId(), gateWayEndId, - String.format("%s_SequenceFlow_%d", node.getId(), i+1), null); + String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); } } // 递归调用后续节点 @@ -412,10 +418,6 @@ public class BpmnModelUtils { } - private static BpmSimpleModelNodeVO getNextNodeOnCondition(BpmSimpleModelNodeVO conditionNode) { - return conditionNode.getChildNode(); - } - private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String seqFlowId, String conditionExpression) { SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); if (StrUtil.isNotEmpty(conditionExpression)) { @@ -439,7 +441,10 @@ public class BpmnModelUtils { addBpmnStartEventNode(mainProcess, simpleModelNode); break; case APPROVE_USER_NODE: - addBpmnUserTaskEventNode(mainProcess, simpleModelNode); + addBpmnUserTaskNode(mainProcess, simpleModelNode); + break; + case SCRIPT_TASK_NODE: + addBpmnScriptTaSskNode(mainProcess, simpleModelNode); break; case EXCLUSIVE_GATEWAY_NODE: addBpmnExclusiveGatewayNode(mainProcess, simpleModelNode); @@ -467,6 +472,25 @@ public class BpmnModelUtils { } } + private static void addBpmnScriptTaSskNode(Process mainProcess, BpmSimpleModelNodeVO node) { + ScriptTask scriptTask = new ScriptTask(); + scriptTask.setId(node.getId()); + scriptTask.setName(node.getName()); + scriptTask.setScriptFormat(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE); + scriptTask.setScript(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); + // 添加自定义属性 + addExtensionAttributes(node, scriptTask); + mainProcess.addFlowElement(scriptTask); + } + + private static void addExtensionAttributes(BpmSimpleModelNodeVO node, FlowElement flowElement) { + Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); + addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, + candidateStrategy == null ? null : String.valueOf(candidateStrategy)); + addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, + MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); + } + private static void addBpmnExclusiveGatewayNode(Process mainProcess, BpmSimpleModelNodeVO node) { Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); @@ -483,25 +507,21 @@ public class BpmnModelUtils { mainProcess.addFlowElement(endEvent); } - private static void addBpmnUserTaskEventNode(Process mainProcess, BpmSimpleModelNodeVO node) { + private static void addBpmnUserTaskNode(Process mainProcess, BpmSimpleModelNodeVO node) { UserTask userTask = new UserTask(); userTask.setId(node.getId()); userTask.setName(node.getName()); - Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); - // 添加自定义属性 - addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, - candidateStrategy == null ? null : String.valueOf(candidateStrategy)); - addExtensionAttribute(userTask, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, - MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); + addExtensionAttributes(node, userTask); mainProcess.addFlowElement(userTask); } - private static void addExtensionAttribute(FlowElement element, String namespace, String name, String value) { + private static void addExtensionAttributes(FlowElement element, String namespace, String name, String value) { if (value == null) { return; } ExtensionAttribute extensionAttribute = new ExtensionAttribute(name, value); extensionAttribute.setNamespace(namespace); + extensionAttribute.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); element.addAttribute(extensionAttribute); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java index bd84490e8e..94df76d4d8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java @@ -17,9 +17,11 @@ public interface BpmProcessInstanceCopyService { * 流程实例的抄送 * * @param userIds 抄送的用户编号 - * @param taskId 流程任务编号 + * @param processInstanceId 流程编号 + * @param taskId 任务编号 + * @param taskName 任务名称 */ - void createProcessInstanceCopy(Collection userIds, String taskId); + void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName); /** * 获得抄送的流程的分页 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index aba8bd9f17..ce1ddd7fd2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.service.task; -import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; @@ -11,7 +10,6 @@ import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; -import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -47,14 +45,14 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy private BpmProcessDefinitionService processDefinitionService; @Override - public void createProcessInstanceCopy(Collection userIds, String taskId) { - // 1.1 校验任务存在 - Task task = taskService.getTask(taskId); - if (ObjectUtil.isNull(task)) { - throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); - } + public void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName) { + // 1.1 校验任务存在 暂时去掉这个校验. 因为任务可能仿钉钉快搭的抄送节点(ScriptTask) +// Task task = taskService.getTask(taskId); +// if (ObjectUtil.isNull(task)) { +// throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); +// } // 1.2 校验流程实例存在 - String processInstanceId = task.getProcessInstanceId(); +// String processInstanceId = task.getProcessInstanceId(); ProcessInstance processInstance = processInstanceService.getProcessInstance(processInstanceId); if (processInstance == null) { throw exception(ErrorCodeConstants.PROCESS_INSTANCE_NOT_EXISTS); @@ -70,7 +68,7 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy List copyList = convertList(userIds, userId -> new BpmProcessInstanceCopyDO() .setUserId(userId).setStartUserId(Long.valueOf(processInstance.getStartUserId())) .setProcessInstanceId(processInstanceId).setProcessInstanceName(processInstance.getName()) - .setCategory(processDefinition.getCategory()).setTaskId(taskId).setTaskName(task.getName())); + .setCategory(processDefinition.getCategory()).setTaskId(taskId).setTaskName(taskName)); processInstanceCopyMapper.insertBatch(copyList); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java new file mode 100644 index 0000000000..89ba0ee84c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bpm.service.task; + +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; +import jakarta.annotation.Resource; +import org.flowable.bpmn.model.FlowElement; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.stereotype.Service; + +import java.util.Set; + +/** + * 仿钉钉快搭各个节点 Service + * @author jason + */ +@Service +public class BpmSimpleNodeService { + + @Resource + private BpmTaskCandidateInvoker taskCandidateInvoker; + @Resource + private BpmProcessInstanceCopyService processInstanceCopyService; + + /** + * 仿钉钉快搭抄送 + * @param execution 执行的任务(ScriptTask) + */ + public Boolean copy(DelegateExecution execution) { + Set userIds = taskCandidateInvoker.calculateUsers(execution); + FlowElement currentFlowElement = execution.getCurrentFlowElement(); + processInstanceCopyService.createProcessInstanceCopy(userIds, execution.getProcessInstanceId(), + currentFlowElement.getId(), currentFlowElement.getName()); + return Boolean.TRUE; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 7afed756b8..5c2de9f483 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -185,7 +185,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2. 抄送用户 if (CollUtil.isNotEmpty(reqVO.getCopyUserIds())) { - processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), reqVO.getId()); + processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), instance.getProcessInstanceId(), + reqVO.getId(), task.getName()); } // 情况一:被委派的任务,不调用 complete 去完成任务 -- Gitee From 05af77b786b0eb370bd721382647646dcc629f58 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 5 Apr 2024 14:44:00 +0800 Subject: [PATCH 0171/1557] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=94=BB=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPortraitServiceImpl.java | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index 9863f62fcf..eae0128664 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -40,21 +40,22 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe @Override public List getCustomerSummaryByArea(CrmStatisticsPortraitReqVO reqVO) { - // 1.1 获得用户编号数组 + // 1. 获得用户编号数组 List userIds = getUserIds(reqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } reqVO.setUserIds(userIds); - // 1.2 获取客户地区统计数据 + + // 2. 获取客户地区统计数据 List list = portraitMapper.selectSummaryListGroupByAreaId(reqVO); if (CollUtil.isEmpty(list)) { return Collections.emptyList(); } - // 2. 拼接数据 + // 3. 拼接数据 List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); - areaList.add(new Area().setId(null).setName("未知")); + areaList.add(new Area().setId(null).setName("未知")); // TODO @puhui999:是不是 65 find 的逻辑改下;不用 findAndThen,直接从 areaMap 拿;拿到就设置,不拿到就设置 null 和 未知;这样,58 本行可以删除掉完事了;这样代码更简单和一致 Map areaMap = convertMap(areaList, Area::getId); return convertList(list, item -> { Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); @@ -76,11 +77,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe reqVO.setUserIds(userIds); // 2. 获取客户行业统计数据 - List industryRespVOList = portraitMapper.selectCustomerIndustryListGroupByIndustryId(reqVO); - if (CollUtil.isEmpty(industryRespVOList)) { - return Collections.emptyList(); - } - return industryRespVOList; + return portraitMapper.selectCustomerIndustryListGroupByIndustryId(reqVO); } @Override @@ -93,11 +90,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe reqVO.setUserIds(userIds); // 2. 获取客户行业统计数据 - List sourceRespVOList = portraitMapper.selectCustomerSourceListGroupBySource(reqVO); - if (CollUtil.isEmpty(sourceRespVOList)) { - return Collections.emptyList(); - } - return sourceRespVOList; + return portraitMapper.selectCustomerSourceListGroupBySource(reqVO); } @Override @@ -110,11 +103,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe reqVO.setUserIds(userIds); // 2. 获取客户级别统计数据 - List levelRespVOList = portraitMapper.selectCustomerLevelListGroupByLevel(reqVO); - if (CollUtil.isEmpty(levelRespVOList)) { - return Collections.emptyList(); - } - return levelRespVOList; + return portraitMapper.selectCustomerLevelListGroupByLevel(reqVO); } /** -- Gitee From e18d26d8a6c004394c5c3fd7cb184d3fde402a2f Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 5 Apr 2024 14:59:00 +0800 Subject: [PATCH 0172/1557] =?UTF-8?q?fix:=20[CRM-=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1]=E6=8C=89=E5=AE=A2=E6=88=B7=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89,=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=90=88=E5=90=8C=E6=98=AF=E5=90=A6=E6=9C=89=E6=88=90?= =?UTF-8?q?=E4=BA=A4=E8=AE=B0=E5=BD=95,=E6=9C=89=E5=88=99=E8=A7=86?= =?UTF-8?q?=E4=B8=BA[=E6=88=90=E4=BA=A4=E5=AE=A2=E6=88=B7]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/CrmStatisticsCustomerMapper.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index b767e20924..7f8b36ba48 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -18,17 +18,18 @@ - SELECT DATE_FORMAT(order_date, '%Y-%m-%d') AS time, - COUNT(DISTINCT customer_id) AS customerDealCount - FROM crm_contract - WHERE deleted = 0 - AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} - AND owner_user_id IN + SELECT DATE_FORMAT(customer.create_time, '%Y-%m-%d') AS time, + COUNT(DISTINCT customer.id) AS customer_deal_count + FROM crm_customer AS customer + LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id + WHERE customer.deleted = 0 AND contract.deleted = 0 + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} + AND customer.owner_user_id IN #{userId} - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} - GROUP BY time + AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + GROUP BY time + - SELECT DATE_FORMAT(customer.create_time, '%Y-%m-%d') AS time, - COUNT(DISTINCT customer.id) AS customer_deal_count + SELECT DATE_FORMAT(customer.create_time, '%Y-%m-%d') AS time, + COUNT(DISTINCT customer.id) AS customer_deal_count FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id - WHERE customer.deleted = 0 AND contract.deleted = 0 + WHERE customer.deleted = 0 + AND contract.deleted = 0 AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} - AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND customer.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY time @@ -53,13 +54,14 @@ COUNT(DISTINCT customer.id) AS customer_deal_count FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id - WHERE customer.deleted = 0 AND contract.deleted = 0 + WHERE customer.deleted = 0 + AND contract.deleted = 0 AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} - AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND customer.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY customer.owner_user_id @@ -221,4 +223,42 @@ GROUP BY customer.owner_user_id + + + + -- Gitee From a44628e436b0bb3d9df60587617da81ec204aad0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 9 Apr 2024 00:10:36 +0800 Subject: [PATCH 0205/1557] =?UTF-8?q?AI=EF=BC=9Acode=20review=20chat=20?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E4=BB=A3=E7=A0=81=EF=BC=88qianwen?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 1 + .../cn/iocoder/yudao/module/ai/enums/AiModelEnum.java | 3 +++ .../yudao/module/ai/controller/admin/ChatController.java | 1 + .../yudao/module/ai/controller/admin/vo/AiChatReqVO.java | 1 + .../src/main/resources/application.properties | 2 +- .../yudao/framework/ai/chatqianwen/QianWenApi.java | 1 + .../yudao/framework/ai/chatqianwen/QianWenChatClient.java | 3 ++- .../java/cn/iocoder/yudao/framework/ai/package-info.java | 8 ++++++++ 8 files changed, 18 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 69795ead26..9ca5f09ad7 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -11,6 +11,7 @@ public interface ErrorCodeConstants { // ========== 模块 ai 错误码区间 [1-022-000-000 ~ 1-023-000-000) ========== + // TODO @fansili:1)类注释不太对;2)中英文之间,有个空格;例如说 AI 模型 ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI模型暂不支持!"); } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java index ff1889fe72..7eac2b61f0 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.enums; import lombok.Getter; +// TODO @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 /** * author: fansili * time: 2024/3/4 12:36 @@ -19,7 +20,9 @@ public enum AiModelEnum { this.message = message; } + // TODO @fan private String value; private String message; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java index eb97f92e59..a6300a5c22 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -26,6 +26,7 @@ import reactor.core.publisher.Flux; import java.util.Scanner; import java.util.function.Consumer; +// TODO @fansili:有了 swagger 注释,就不用类注释了 /** * AI模块 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java index 43b29d2833..187f517413 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java @@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; +// TODO @fansili 1)swagger 注释不太对;2)有了 swagger 注释,就不用类注释了 /** * ai 聊天 req * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties index e53f358d0f..6ec2672e60 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties @@ -1,4 +1,4 @@ -# open ai +# open ai TODO @fansili?????????????? # openAI https://openai.com/ spring.ai.openai.api-key=${OPEN_AI_KEY} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java index aefabc62a4..77d4411f32 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java @@ -9,6 +9,7 @@ import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import reactor.core.publisher.Flux; +// TODO @fansili:是不是挪到 api 包里?按照 spring ai 的结构;根目录只放 client 和 options /** * 阿里 通义千问 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 60b5335598..62c9820959 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -29,7 +29,7 @@ import java.util.stream.Collectors; * time: 2024/3/13 21:06 */ @Slf4j -public class QianWenChatClient implements ChatClient, StreamingChatClient { +public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenApi qianWenApi; @@ -44,6 +44,7 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { this.qianWenOptions = qianWenOptions; } + // TODO @fansili:看看咋公用出来,允许传入类似异常之类的参数; public final RetryTemplate retryTemplate = RetryTemplate.builder() // 最大重试次数 10 .maxAttempts(10) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java index de43c748b8..6e60edaa4f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java @@ -1,5 +1,13 @@ /** * author: fansili * time: 2024/3/12 20:29 + * + * 1. org.springframework.ai:包括 chat、image、model、parser、util 部分 + * + * 2. yudao.framework.models + * \qianwen 通义千问 + * \yiyan 文心一言 + * \xinghuo 星火 + * \midjourney */ package cn.iocoder.yudao.framework.ai; \ No newline at end of file -- Gitee From 337ae045519b8c83cb4ff53aa57cf9426b5fd5ff Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 9 Apr 2024 09:31:56 +0800 Subject: [PATCH 0206/1557] =?UTF-8?q?AI=EF=BC=9Acode=20review=20chat=20?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E4=BB=A3=E7=A0=81=EF=BC=88mj?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 1 + .../constants/MjGennerateStatusEnum.java | 1 + .../midjourney/interactions/MjInteractions.java | 17 +++++++++++------ .../webSocket/MjWebSocketStarter.java | 1 + .../yudao/framework/ai/package-info.java | 2 ++ .../yudao/framework/ai/util/JacksonUtil.java | 1 + 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 6b4f135abf..7a3ee3e0a8 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -629,6 +629,7 @@ ${ureport2.version} + org.springframework.ai diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java index bbe682c5f8..1e8bc6f534 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.constants; import lombok.Getter; +// TODO @fansili:1)Mj 缩写,还是搞成全称。。虽然长一点,但是感觉会相对清晰一些哈;2)lombok 相关的注解,可以用用哈;3)value 改 status; /** * mj 生成状态 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java index 07827e978a..f0bd74daa9 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java @@ -24,6 +24,7 @@ import org.springframework.web.client.RestTemplate; import java.io.IOException; import java.util.HashMap; +// TODO @fansili:按照 spring ai 的封装习惯,这个类是不是 MidjourneyApi /** * 图片生成 * @@ -33,13 +34,12 @@ import java.util.HashMap; @Slf4j public class MjInteractions { - private final String url; private final MidjourneyConfig midjourneyConfig; - private final RestTemplate restTemplate = new RestTemplate(); + private final RestTemplate restTemplate = new RestTemplate(); // TODO @fansili:优先级低:后续搞到统一的管理 + // TODO @fansili:静态变量,放在最前面哈; private static final String HEADER_REFERER = "https://discord.com/channels/%s/%s"; - public MjInteractions(MidjourneyConfig midjourneyConfig) { this.midjourneyConfig = midjourneyConfig; this.url = midjourneyConfig.getServerUrl().concat(midjourneyConfig.getApiInteractions()); @@ -50,10 +50,11 @@ public class MjInteractions { String requestTemplate = midjourneyConfig.getRequestTemplates().get("imagine"); // 设置参数 HashMap requestParams = Maps.newHashMap(); + // TODO @fansili:感觉参数的组装,可以搞成一个公用的方法;就是 config + 入参的感觉; requestParams.put("guild_id", midjourneyConfig.getGuildId()); requestParams.put("channel_id", midjourneyConfig.getChannelId()); requestParams.put("session_id", midjourneyConfig.getSessionId()); - requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); + requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); // TODO @fansili:建议用 uuid 之类的;nextId 跨进程未必合适哈; requestParams.put("prompt", prompt); // 解析 template 参数占位符 String requestBody = MjUtil.parseTemplate(requestTemplate, requestParams); @@ -63,6 +64,7 @@ public class MjInteractions { HttpEntity requestEntity = new HttpEntity<>(requestBody, httpHeaders); String res = restTemplate.postForObject(url, requestEntity, String.class); // 这个 res 只要不返回值,就是成功! + // TODO @fansili:可以直接 if (StrUtil.isBlank(res)) boolean isSuccess = StrUtil.isBlank(res); if (isSuccess) { return true; @@ -70,7 +72,7 @@ public class MjInteractions { log.error("请求失败! 请求参数:{} 返回结果! {}", requestBody, res); return isSuccess; } - + // TODO @fansili:方法和方法之间,空一行哈; public Boolean reRoll(ReRoll reRoll) { @@ -100,12 +102,13 @@ public class MjInteractions { return isSuccess; } - + // TODO @fansili:搞成私有方法,可能会好点; public UploadAttachmentsRes uploadAttachments(Attachments attachments) { // file JSONObject fileObj = new JSONObject(); fileObj.put("id", "0"); fileObj.put("filename", attachments.getFileSystemResource().getFilename()); + // TODO @fansili:这块用 lombok 哪个异常处理,简化下代码; try { fileObj.put("file_size", attachments.getFileSystemResource().contentLength()); } catch (IOException e) { @@ -116,6 +119,7 @@ public class MjInteractions { multipartRequest.put("files", Lists.newArrayList(fileObj)); // 设置header值 HttpHeaders httpHeaders = new HttpHeaders(); + // TODO @fansili:通用的 header 构建,抽一个方法哈; httpHeaders.setContentType(MediaType.APPLICATION_JSON); httpHeaders.set("Authorization", midjourneyConfig.getToken()); httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); @@ -185,4 +189,5 @@ public class MjInteractions { httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); return httpHeaders; } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java index 0d6a7d0c64..b01c4adfe8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.util.concurrent.TimeoutException; +// TODO @fansili:mj 这块 websocket 有点小复杂,虽然代码量 400 多行;感觉可以考虑,有没第三方 sdk,通过它透明接入 mj @Slf4j public class MjWebSocketStarter implements WebSocketStarter { /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java index 6e60edaa4f..ffd2ac9335 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java @@ -2,6 +2,8 @@ * author: fansili * time: 2024/3/12 20:29 * + * TODO @fansili:包的想法,需要重点看看 + * * 1. org.springframework.ai:包括 chat、image、model、parser、util 部分 * * 2. yudao.framework.models diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java index 046a481dcc..b5c96c992f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import java.io.IOException; +// TODO @fansili:看看能不能用 JsonUtils /** * Jackson工具类 * -- Gitee From 0624bfcaf5d43736e0a2e30c0c257beabc6769c8 Mon Sep 17 00:00:00 2001 From: lijiahuan Date: Tue, 9 Apr 2024 11:57:26 +0800 Subject: [PATCH 0207/1557] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=B7=9F=E8=BF=9B=E8=AE=B0=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/crm/service/clue/CrmClueServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java index 304dcc2078..3a9977dfab 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java @@ -120,7 +120,7 @@ public class CrmClueServiceImpl implements CrmClueService { } @Override - @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_FOLLOW_UP_SUB_TYPE, bizNo = "{{#id}", + @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_FOLLOW_UP_SUB_TYPE, bizNo = "{{#id}}", success = CRM_CLUE_FOLLOW_UP_SUCCESS) @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#id", level = CrmPermissionLevelEnum.WRITE) public void updateClueFollowUp(Long id, LocalDateTime contactNextTime, String contactLastContent) { -- Gitee From 325c03dfd4c6b8a5295f55373bced12123df0024 Mon Sep 17 00:00:00 2001 From: yunlongn Date: Tue, 9 Apr 2024 16:35:41 +0800 Subject: [PATCH 0208/1557] =?UTF-8?q?updateCommentVisible=20=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E7=94=A8=E5=89=8D=E7=AB=AF=E4=BC=A0=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/service/comment/ProductCommentServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java index 15a7a4b4f8..3f65b91bf8 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java @@ -113,7 +113,7 @@ public class ProductCommentServiceImpl implements ProductCommentService { // 更新可见状态 productCommentMapper.updateById(new ProductCommentDO().setId(updateReqVO.getId()) - .setVisible(true)); + .setVisible(updateReqVO.getVisible())); } @Override -- Gitee From 32bc632947783ac18dd8618d57e216ac6174892c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 9 Apr 2024 20:12:41 +0800 Subject: [PATCH 0209/1557] =?UTF-8?q?=E5=A4=84=E7=90=86todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/enums/AiModelEnum.java | 28 ------- .../module/ai/enums/OpenAiModelEnum.java | 35 ++++++++ .../ai/controller/admin/ChatController.java | 41 ++-------- .../ai/controller/admin/vo/AiChatReqVO.java | 20 ++--- .../yudao-spring-boot-starter-ai/pom.xml | 4 + .../ai/chatqianwen/QianWenChatClient.java | 1 + .../ai/chatqianwen/{ => api}/QianWenApi.java | 4 +- .../ai/imageopenai/OpenAiImageApi.java | 3 +- ...{MjMessage.java => MidjourneyMessage.java} | 5 +- ...onstants.java => MidjourneyConstants.java} | 2 +- ...ava => MidjourneyGennerateStatusEnum.java} | 21 ++--- ...m.java => MidjourneyInteractionsEnum.java} | 4 +- ...um.java => MidjourneyMessageTypeEnum.java} | 4 +- ...ifyCode.java => MidjourneyNotifyCode.java} | 2 +- ...tions.java => MidjourneyInteractions.java} | 39 +++++---- .../util/{MjUtil.java => MidjourneyUtil.java} | 8 +- ...r.java => MidjourneyWebSocketStarter.java} | 27 +++---- ...r.java => MidjourneyWebSocketHandler.java} | 14 ++-- ...er.java => MidjourneyMessageListener.java} | 50 ++++++------ .../yudao/framework/ai/util/JacksonUtil.java | 80 ------------------- .../ai/chat/QianWenChatClientTests.java | 3 +- .../MidjourneyInteractionsTests.java} | 15 ++-- .../MidjourneyUtilTests.java} | 10 +-- .../MidjourneyWebSocketTests.java} | 13 ++- 24 files changed, 165 insertions(+), 268 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/OpenAiModelEnum.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/{ => api}/QianWenApi.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{MjMessage.java => MidjourneyMessage.java} (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/{MjConstants.java => MidjourneyConstants.java} (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/{MjGennerateStatusEnum.java => MidjourneyGennerateStatusEnum.java} (45%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/{MjInteractionsEnum.java => MidjourneyInteractionsEnum.java} (81%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/{MjMessageTypeEnum.java => MidjourneyMessageTypeEnum.java} (76%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/{MjNotifyCode.java => MidjourneyNotifyCode.java} (81%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/{MjInteractions.java => MidjourneyInteractions.java} (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/{MjUtil.java => MidjourneyUtil.java} (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/{MjWebSocketStarter.java => MidjourneyWebSocketStarter.java} (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/{MjWebSocketHandler.java => MidjourneyWebSocketHandler.java} (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/{MjMessageListener.java => MidjourneyMessageListener.java} (48%) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/{mj/MjInteractionsTests.java => midjourney/MidjourneyInteractionsTests.java} (79%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/{mj/MjUtilTests.java => midjourney/MidjourneyUtilTests.java} (58%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/{mj/MjWebSocketTests.java => midjourney/MidjourneyWebSocketTests.java} (76%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java deleted file mode 100644 index 7eac2b61f0..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.Getter; - -// TODO @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 -/** - * author: fansili - * time: 2024/3/4 12:36 - */ -@Getter -public enum AiModelEnum { - - OPEN_AI_GPT_3_5("gpt-3.5-turbo", "GPT3.5"), - OPEN_AI_GPT_4("gpt-4-turbo", "GPT4") - - ; - - AiModelEnum(String value, String message) { - this.value = value; - this.message = message; - } - - // TODO @fan - private String value; - - private String message; - -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/OpenAiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/OpenAiModelEnum.java new file mode 100644 index 0000000000..3daa3f57b1 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/OpenAiModelEnum.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +// TODO done @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 +/** + * @author: fansili + * @time: 2024/3/4 12:36 + */ +@Getter +@AllArgsConstructor +public enum OpenAiModelEnum { + + /** + * open ai 3.5模型 + */ + OPEN_AI_GPT_3_5("gpt-3.5-turbo", "GPT3.5"), + /** + * open ai 4.0 收费模型 + */ + OPEN_AI_GPT_4("gpt-4-turbo", "GPT4") + + ; + + /** + * 模型 - 用于参数传递 + */ + private String model; + /** + * 模型名字 - 用于展示 + */ + private String name; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java index a6300a5c22..e9f8ab6b5f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; -import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletResponse; @@ -13,7 +13,6 @@ import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.prompt.Prompt; import org.springframework.ai.openai.OpenAiChatClient; -import org.springframework.ai.openai.api.OpenAiApi; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.validation.annotation.Validated; @@ -23,16 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; -import java.util.Scanner; import java.util.function.Consumer; -// TODO @fansili:有了 swagger 注释,就不用类注释了 -/** - * AI模块 - * - * author: fansili - * time: 2024/3/3 20:28 - */ +// TODO done @fansili:有了 swagger 注释,就不用类注释了 @Tag(name = "AI模块") @RestController @RequestMapping("/ai-api") @@ -48,7 +40,7 @@ public class ChatController { ChatClient chatClient = getChatClient(reqVO.getAiModel()); String res; try { - res = chatClient.call(reqVO.getInputText()); + res = chatClient.call(reqVO.getPrompt()); } catch (Exception e) { res = e.getMessage(); } @@ -59,33 +51,14 @@ public class ChatController { @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); - Flux chatResponse = chatClient.stream(new Prompt(reqVO.getInputText())); + Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); chatResponse.subscribe(new Consumer() { @Override public void accept(ChatResponse chatResponse) { System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); } }); - return CommonResult.success("1"); - } - - public static void main(String[] args) { - OpenAiChatClient openAiChatClient = new OpenAiChatClient(new OpenAiApi("openkey")); - Flux responseFlux = openAiChatClient.stream(new Prompt("最好的编程语言!")); - long now = System.currentTimeMillis(); - responseFlux.subscribe(new Consumer() { - @Override - public void accept(ChatResponse chatResponse) { - if (chatResponse.getResults().get(0).getOutput() == null) { - return; - } - System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); - } - }); - - // 阻止退出 - Scanner scanner = new Scanner(System.in); - scanner.nextLine(); + return CommonResult.success(null); } /** @@ -94,8 +67,8 @@ public class ChatController { * @param aiModelEnum * @return */ - private ChatClient getChatClient(AiModelEnum aiModelEnum) { - if (AiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { + private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { + if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { return applicationContext.getBean(OpenAiChatClient.class); } // AI模型暂不支持 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java index 187f517413..643b6600da 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java @@ -1,27 +1,21 @@ package cn.iocoder.yudao.module.ai.controller.admin.vo; -import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO @fansili 1)swagger 注释不太对;2)有了 swagger 注释,就不用类注释了 -/** - * ai 聊天 req - * - * author: fansili - * time: 2024/3/4 12:33 - */ -@Schema(description = "用户 App - 上传文件 Request VO") +// TODO done @fansili 1)swagger 注释不太对;2)有了 swagger 注释,就不用类注释了 @Data +@Schema(description = "用户 App - 上传文件 Request VO") public class AiChatReqVO { - @Schema(description = "输入内容", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "输入内容不能为空") - private String inputText; + @Schema(description = "提示词", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "提示词不能为空!") + private String prompt; @Schema(description = "AI模型", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "AI模型不能为空") - private AiModelEnum aiModel; + private OpenAiModelEnum aiModel; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 6e3f2b2f15..81d303ab6b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -149,6 +149,10 @@ + + cn.iocoder.boot + yudao-common + \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 62c9820959..a8fb9105fa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.ai.chat.*; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; import com.aliyun.broadscope.bailian.sdk.models.*; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java index 77d4411f32..c8170af0fa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen; +package cn.iocoder.yudao.framework.ai.chatqianwen.api; import com.aliyun.broadscope.bailian.sdk.AccessTokenClient; import com.aliyun.broadscope.bailian.sdk.ApplicationClient; @@ -9,7 +9,7 @@ import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import reactor.core.publisher.Flux; -// TODO @fansili:是不是挪到 api 包里?按照 spring ai 的结构;根目录只放 client 和 options +// TODO done @fansili:是不是挪到 api 包里?按照 spring ai 的结构;根目录只放 client 和 options /** * 阿里 通义千问 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java index 0f651ac09f..6c5c8dba31 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java @@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; import cn.iocoder.yudao.framework.ai.util.JacksonUtil; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import io.netty.channel.ChannelOption; import lombok.extern.slf4j.Slf4j; import org.apache.http.HttpEntity; @@ -55,7 +56,7 @@ public class OpenAiImageApi { httpPost.setURI(URI.create(DEFAULT_BASE_URL.concat("/v1/images/generations"))); httpPost.setHeader("Content-Type", "application/json"); httpPost.setHeader("Authorization", "Bearer " + apiKey); - httpPost.setEntity(new StringEntity(JacksonUtil.toJson(request), "UTF-8")); + httpPost.setEntity(new StringEntity(JsonUtils.toJsonString(request), "UTF-8")); CloseableHttpResponse response= null; try { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java index 2160e8e141..f52ba93378 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MjMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.ai.midjourney; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; import lombok.Data; import lombok.experimental.Accessors; @@ -7,7 +8,7 @@ import java.util.List; @Data @Accessors(chain = true) -public class MjMessage { +public class MidjourneyMessage { /** * id是一个重要的字段,在同时生成多个的时候,可以区分生成信息 @@ -41,7 +42,7 @@ public class MjMessage { * 1、等待 * 2、进行中 * 3、完成 - * {@link cn.iocoder.yudao.framework.ai.midjourney.constants.MjGennerateStatusEnum} + * {@link MidjourneyGennerateStatusEnum} */ private String generateStatus; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java index 751652b082..ee180a0f43 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjConstants.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.ai.midjourney.constants; -public final class MjConstants { +public final class MidjourneyConstants { /** * 消息 - 编号 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java similarity index 45% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java index 1e8bc6f534..ef7147beb7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjGennerateStatusEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.framework.ai.midjourney.constants; +import lombok.AllArgsConstructor; import lombok.Getter; -// TODO @fansili:1)Mj 缩写,还是搞成全称。。虽然长一点,但是感觉会相对清晰一些哈;2)lombok 相关的注解,可以用用哈;3)value 改 status; +// TODO done @fansili:1)Mj 缩写,还是搞成全称。。虽然长一点,但是感觉会相对清晰一些哈;2)lombok 相关的注解,可以用用哈;3)value 改 status; /** * mj 生成状态 * @@ -10,8 +11,8 @@ import lombok.Getter; * time: 2024/4/6 21:07 */ @Getter -public enum MjGennerateStatusEnum { - +@AllArgsConstructor +public enum MidjourneyGennerateStatusEnum { WAITING("waiting", "等待..."), IN_PROGRESS("in_progress", "进行中"), @@ -19,12 +20,12 @@ public enum MjGennerateStatusEnum { ; - MjGennerateStatusEnum(String value, String message) { - this.value = value; - this.message = message; - } - - private String value; - + /** + * 状态 + */ + private String status; + /** + * 状态信息 + */ private String message; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java similarity index 81% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java index 124bc83324..08832e78bd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjInteractionsEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java @@ -6,7 +6,7 @@ import lombok.Getter; * MJ 命令 */ @Getter -public enum MjInteractionsEnum { +public enum MidjourneyInteractionsEnum { IMAGINE("imagine", "生成图片"), DESCRIBE("describe", "生成描述"), @@ -17,7 +17,7 @@ public enum MjInteractionsEnum { ; - MjInteractionsEnum(String value, String message) { + MidjourneyInteractionsEnum(String value, String message) { this.value =value; this.message =message; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java similarity index 76% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java index b47199e91c..9c8eb9ed53 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjMessageTypeEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.constants; -public enum MjMessageTypeEnum { +public enum MidjourneyMessageTypeEnum { /** * 创建. */ @@ -15,7 +15,7 @@ public enum MjMessageTypeEnum { */ DELETE; - public static MjMessageTypeEnum of(String type) { + public static MidjourneyMessageTypeEnum of(String type) { return switch (type) { case "MESSAGE_CREATE" -> CREATE; case "MESSAGE_UPDATE" -> UPDATE; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java similarity index 81% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java index 103bd6fdf5..1dccb8a415 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MjNotifyCode.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.constants; import lombok.experimental.UtilityClass; @UtilityClass -public final class MjNotifyCode { +public final class MidjourneyNotifyCode { /** * 成功. */ diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java index f0bd74daa9..104e1dd2c5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MjInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.ai.midjourney.interactions; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MjConstants; -import cn.iocoder.yudao.framework.ai.midjourney.util.MjUtil; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; +import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; import cn.iocoder.yudao.framework.ai.midjourney.vo.Attachments; import cn.iocoder.yudao.framework.ai.midjourney.vo.Describe; import cn.iocoder.yudao.framework.ai.midjourney.vo.ReRoll; @@ -32,15 +32,17 @@ import java.util.HashMap; * time: 2024/4/3 17:36 */ @Slf4j -public class MjInteractions { +public class MidjourneyInteractions { + + // TODO done @fansili:静态变量,放在最前面哈; + private static final String HEADER_REFERER = "https://discord.com/channels/%s/%s"; private final String url; private final MidjourneyConfig midjourneyConfig; private final RestTemplate restTemplate = new RestTemplate(); // TODO @fansili:优先级低:后续搞到统一的管理 - // TODO @fansili:静态变量,放在最前面哈; - private static final String HEADER_REFERER = "https://discord.com/channels/%s/%s"; - public MjInteractions(MidjourneyConfig midjourneyConfig) { + + public MidjourneyInteractions(MidjourneyConfig midjourneyConfig) { this.midjourneyConfig = midjourneyConfig; this.url = midjourneyConfig.getServerUrl().concat(midjourneyConfig.getApiInteractions()); } @@ -57,7 +59,7 @@ public class MjInteractions { requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); // TODO @fansili:建议用 uuid 之类的;nextId 跨进程未必合适哈; requestParams.put("prompt", prompt); // 解析 template 参数占位符 - String requestBody = MjUtil.parseTemplate(requestTemplate, requestParams); + String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 获取 header HttpHeaders httpHeaders = getHttpHeaders(); // 发送请求 @@ -65,14 +67,14 @@ public class MjInteractions { String res = restTemplate.postForObject(url, requestEntity, String.class); // 这个 res 只要不返回值,就是成功! // TODO @fansili:可以直接 if (StrUtil.isBlank(res)) - boolean isSuccess = StrUtil.isBlank(res); - if (isSuccess) { + if (StrUtil.isBlank(res)) { return true; + } else { + log.error("请求失败! 请求参数:{} 返回结果! {}", requestBody, res); + return false; } - log.error("请求失败! 请求参数:{} 返回结果! {}", requestBody, res); - return isSuccess; } - // TODO @fansili:方法和方法之间,空一行哈; + // TODO done @fansili:方法和方法之间,空一行哈; public Boolean reRoll(ReRoll reRoll) { @@ -89,7 +91,7 @@ public class MjInteractions { // 获取 header HttpHeaders httpHeaders = getHttpHeaders(); // 设置参数 - String requestBody = MjUtil.parseTemplate(requestTemplate, requestParams); + String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 发送请求 HttpEntity requestEntity = new HttpEntity<>(requestBody, httpHeaders); String res = restTemplate.postForObject(url, requestEntity, String.class); @@ -123,7 +125,7 @@ public class MjInteractions { httpHeaders.setContentType(MediaType.APPLICATION_JSON); httpHeaders.set("Authorization", midjourneyConfig.getToken()); httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MjConstants.HTTP_COOKIE); + httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); // 创建HttpEntity对象,包含表单数据和头部信息 HttpEntity> multiValueMapHttpEntity = new HttpEntity<>(multipartRequest, httpHeaders); @@ -132,16 +134,13 @@ public class MjInteractions { String response = restTemplate.postForObject(midjourneyConfig.getServerUrl().concat(uri), multiValueMapHttpEntity, String.class); UploadAttachmentsRes uploadAttachmentsRes = JSON.parseObject(response, UploadAttachmentsRes.class); - // // 上传文件 String uploadUrl = uploadAttachmentsRes.getAttachments().getFirst().getUploadUrl(); - String uploadAttachmentsUrl = midjourneyConfig.getApiAttachmentsUpload().concat(uploadUrl); httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); HttpEntity fileSystemResourceHttpEntity = new HttpEntity<>(attachments.getFileSystemResource(), httpHeaders); ResponseEntity exchange = restTemplate.exchange(uploadUrl, HttpMethod.PUT, fileSystemResourceHttpEntity, String.class); String uploadRes = exchange.getBody(); - return uploadAttachmentsRes; } @@ -161,9 +160,9 @@ public class MjInteractions { httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); // 设置内容类型为JSON httpHeaders.set("Authorization", midjourneyConfig.getToken()); httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MjConstants.HTTP_COOKIE); + httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); - String requestBody = MjUtil.parseTemplate(requestTemplate, requestParams); + String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 创建表单数据 MultiValueMap formData = new LinkedMultiValueMap<>(); formData.add("payload_json", requestBody); @@ -185,7 +184,7 @@ public class MjInteractions { httpHeaders.setContentType(MediaType.APPLICATION_JSON); // 设置内容类型为JSON httpHeaders.set("Authorization", midjourneyConfig.getToken()); httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MjConstants.HTTP_COOKIE); + httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); return httpHeaders; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java index 751a79b044..92c7d42e03 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.ai.midjourney.util; import cn.hutool.core.text.CharSequenceUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MjMessage; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; import java.util.Map; import java.util.regex.Matcher; @@ -13,7 +13,7 @@ import java.util.regex.Pattern; * author: fansili * time: 2024/4/6 19:00 */ -public class MjUtil { +public class MidjourneyUtil { /** * content正则匹配prompt和进度. */ @@ -26,12 +26,12 @@ public class MjUtil { * @param content * @return */ - public static MjMessage.Content parseContent(String content) { + public static MidjourneyMessage.Content parseContent(String content) { // 有三种格式。 // 南极应该是什么样子? // "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)", // "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)" - MjMessage.Content mjContent = new MjMessage.Content(); + MidjourneyMessage.Content mjContent = new MidjourneyMessage.Content(); if (CharSequenceUtil.isBlank(content)) { return null; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java index b01c4adfe8..e7ff41cc59 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MjWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java @@ -4,9 +4,9 @@ package cn.iocoder.yudao.framework.ai.midjourney.webSocket; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MjNotifyCode; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler.MjWebSocketHandler; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyNotifyCode; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler.MidjourneyWebSocketHandler; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.websocket.Constants; @@ -20,11 +20,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import java.io.IOException; import java.net.URI; -import java.util.concurrent.TimeoutException; // TODO @fansili:mj 这块 websocket 有点小复杂,虽然代码量 400 多行;感觉可以考虑,有没第三方 sdk,通过它透明接入 mj @Slf4j -public class MjWebSocketStarter implements WebSocketStarter { +public class MidjourneyWebSocketStarter implements WebSocketStarter { /** * 链接重试次数 */ @@ -36,7 +35,7 @@ public class MjWebSocketStarter implements WebSocketStarter { /** * mj 监听(所有message 都会 callback到这里) */ - private final MjMessageListener userMessageListener; + private final MidjourneyMessageListener userMessageListener; /** * wss 服务器 */ @@ -58,10 +57,10 @@ public class MjWebSocketStarter implements WebSocketStarter { */ private WebSocketSession webSocketSession = null; - public MjWebSocketStarter(String wssServer, - String resumeWss, - MidjourneyConfig midjourneyConfig, - MjMessageListener userMessageListener) { + public MidjourneyWebSocketStarter(String wssServer, + String resumeWss, + MidjourneyConfig midjourneyConfig, + MidjourneyMessageListener userMessageListener) { this.wssServer = wssServer; this.resumeWss = resumeWss; this.midjourneyConfig = midjourneyConfig; @@ -83,7 +82,7 @@ public class MjWebSocketStarter implements WebSocketStarter { headers.add("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits"); headers.add("User-Agent", this.midjourneyConfig.getUserAage()); // 创建 mjHeader - MjWebSocketHandler mjWebSocketHandler = new MjWebSocketHandler( + MidjourneyWebSocketHandler mjWebSocketHandler = new MidjourneyWebSocketHandler( this.midjourneyConfig, this.userMessageListener, this::onSocketSuccess, this::onSocketFailure); // String gatewayUrl; @@ -105,12 +104,12 @@ public class MjWebSocketStarter implements WebSocketStarter { socketSessionFuture.addCallback(new ListenableFutureCallback<>() { @Override public void onFailure(@NotNull Throwable e) { - onSocketFailure(MjWebSocketHandler.CLOSE_CODE_EXCEPTION, e.getMessage()); + onSocketFailure(MidjourneyWebSocketHandler.CLOSE_CODE_EXCEPTION, e.getMessage()); } @Override public void onSuccess(WebSocketSession session) { - MjWebSocketStarter.this.webSocketSession = session; + MidjourneyWebSocketStarter.this.webSocketSession = session; } }); } @@ -118,7 +117,7 @@ public class MjWebSocketStarter implements WebSocketStarter { private void onSocketSuccess(String sessionId, Object sequence, String resumeGatewayUrl) { this.resumeData = new ResumeData(sessionId, sequence, resumeGatewayUrl); this.running = true; - notifyWssLock(MjNotifyCode.SUCCESS, ""); + notifyWssLock(MidjourneyNotifyCode.SUCCESS, ""); } private void onSocketFailure(int code, String reason) { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java index 55fc7e4bc2..b6fbf5c217 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MjWebSocketHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java @@ -8,7 +8,7 @@ import cn.hutool.http.useragent.UserAgentUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.FailureCallback; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.SuccessCallback; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataArray; @@ -29,7 +29,7 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @Slf4j -public class MjWebSocketHandler implements WebSocketHandler { +public class MidjourneyWebSocketHandler implements WebSocketHandler { /** * close 错误码:重连 */ @@ -49,7 +49,7 @@ public class MjWebSocketHandler implements WebSocketHandler { /** * mj 消息监听 */ - private final MjMessageListener userMessageListener; + private final MidjourneyMessageListener userMessageListener; /** * 成功回调 */ @@ -85,10 +85,10 @@ public class MjWebSocketHandler implements WebSocketHandler { */ private final Decompressor decompressor = new ZlibDecompressor(2048); - public MjWebSocketHandler(MidjourneyConfig account, - MjMessageListener userMessageListener, - SuccessCallback successCallback, - FailureCallback failureCallback) { + public MidjourneyWebSocketHandler(MidjourneyConfig account, + MidjourneyMessageListener userMessageListener, + SuccessCallback successCallback, + FailureCallback failureCallback) { this.midjourneyConfig = account; this.userMessageListener = userMessageListener; this.successCallback = successCallback; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java similarity index 48% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java index 4893e7b371..31bbe0a972 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MjMessageListener.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java @@ -6,11 +6,11 @@ import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.MjMessage; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MjConstants; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MjGennerateStatusEnum; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MjMessageTypeEnum; -import cn.iocoder.yudao.framework.ai.midjourney.util.MjUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyMessageTypeEnum; +import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataObject; @@ -18,17 +18,17 @@ import net.dv8tion.jda.api.utils.data.DataObject; import java.util.List; @Slf4j -public class MjMessageListener { +public class MidjourneyMessageListener { private MidjourneyConfig midjourneyConfig; - public MjMessageListener(MidjourneyConfig midjourneyConfig) { + public MidjourneyMessageListener(MidjourneyConfig midjourneyConfig) { this.midjourneyConfig = midjourneyConfig; } public void onMessage(DataObject raw) { - MjMessageTypeEnum messageType = MjMessageTypeEnum.of(raw.getString("t")); - if (messageType == null || MjMessageTypeEnum.DELETE == messageType) { + MidjourneyMessageTypeEnum messageType = MidjourneyMessageTypeEnum.of(raw.getString("t")); + if (messageType == null || MidjourneyMessageTypeEnum.DELETE == messageType) { return; } DataObject data = raw.getObject("d"); @@ -37,21 +37,21 @@ public class MjMessageListener { } // 转换几个重要的信息 - MjMessage mjMessage = new MjMessage(); - mjMessage.setId(data.getString(MjConstants.MSG_ID)); - mjMessage.setType(data.getInt(MjConstants.MSG_TYPE)); + MidjourneyMessage mjMessage = new MidjourneyMessage(); + mjMessage.setId(data.getString(MidjourneyConstants.MSG_ID)); + mjMessage.setType(data.getInt(MidjourneyConstants.MSG_TYPE)); mjMessage.setRawData(StrUtil.str(raw.toJson(), "UTF-8")); - mjMessage.setContent(MjUtil.parseContent(data.getString(MjConstants.MSG_CONTENT))); + mjMessage.setContent(MidjourneyUtil.parseContent(data.getString(MidjourneyConstants.MSG_CONTENT))); // 转换 components - if (!data.getArray(MjConstants.MSG_COMPONENTS).isEmpty()) { - String componentsJson = StrUtil.str(data.getArray(MjConstants.MSG_COMPONENTS).toJson(), "UTF-8"); - List components = JSON.parseArray(componentsJson, MjMessage.ComponentType.class); + if (!data.getArray(MidjourneyConstants.MSG_COMPONENTS).isEmpty()) { + String componentsJson = StrUtil.str(data.getArray(MidjourneyConstants.MSG_COMPONENTS).toJson(), "UTF-8"); + List components = JSON.parseArray(componentsJson, MidjourneyMessage.ComponentType.class); mjMessage.setComponents(components); } // 转换附件 - if (!data.getArray(MjConstants.MSG_ATTACHMENTS).isEmpty()) { - String attachmentsJson = StrUtil.str(data.getArray(MjConstants.MSG_ATTACHMENTS).toJson(), "UTF-8"); - List attachments = JSON.parseArray(attachmentsJson, MjMessage.Attachment.class); + if (!data.getArray(MidjourneyConstants.MSG_ATTACHMENTS).isEmpty()) { + String attachmentsJson = StrUtil.str(data.getArray(MidjourneyConstants.MSG_ATTACHMENTS).toJson(), "UTF-8"); + List attachments = JSON.parseArray(attachmentsJson, MidjourneyMessage.Attachment.class); mjMessage.setAttachments(attachments); } // 转换状态 @@ -61,18 +61,18 @@ public class MjMessageListener { System.err.println(JSONUtil.toJsonPrettyStr(mjMessage)); } - private void convertGenerateStatus(MjMessage mjMessage) { + private void convertGenerateStatus(MidjourneyMessage mjMessage) { if (mjMessage.getType() == 20 && mjMessage.getContent().getStatus().contains("Waiting")) { - mjMessage.setGenerateStatus(MjGennerateStatusEnum.WAITING.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.WAITING.getValue()); } else if (mjMessage.getType() == 20 && !StrUtil.isBlank(mjMessage.getContent().getProgress())) { - mjMessage.setGenerateStatus(MjGennerateStatusEnum.IN_PROGRESS.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.IN_PROGRESS.getValue()); } else if (mjMessage.getType() == 0 && !CollUtil.isEmpty(mjMessage.getComponents())) { - mjMessage.setGenerateStatus(MjGennerateStatusEnum.COMPLETED.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.COMPLETED.getValue()); } } - private boolean ignoreAndLogMessage(DataObject data, MjMessageTypeEnum messageType) { - String channelId = data.getString(MjConstants.MSG_CHANNEL_ID); + private boolean ignoreAndLogMessage(DataObject data, MidjourneyMessageTypeEnum messageType) { + String channelId = data.getString(MidjourneyConstants.MSG_CHANNEL_ID); if (!CharSequenceUtil.equals(channelId, midjourneyConfig.getChannelId())) { return true; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java deleted file mode 100644 index b5c96c992f..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/util/JacksonUtil.java +++ /dev/null @@ -1,80 +0,0 @@ -package cn.iocoder.yudao.framework.ai.util; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.module.SimpleModule; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -import java.io.IOException; - -// TODO @fansili:看看能不能用 JsonUtils -/** - * Jackson工具类 - * - * author: fansili - * time: 2024/3/17 10:13 - */ -public class JacksonUtil { - - private static final ObjectMapper objectMapper = new ObjectMapper(); - - /** - * 初始化 ObjectMapper 以美化输出(即格式化JSON内容) - */ - static { - // 美化输出(缩进) - objectMapper.enable(SerializationFeature.INDENT_OUTPUT); - // 忽略值为 null 的属性 - objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - // 配置一个模块来将 Long 类型转换为 String 类型 - SimpleModule module = new SimpleModule(); - module.addSerializer(Long.class, ToStringSerializer.instance); - objectMapper.registerModule(module); - } - - /** - * 将对象转换为 JSON 字符串 - * - * @param obj 需要序列化的Java对象 - * @return 序列化后的 JSON 字符串 - * @throws JsonProcessingException 当 JSON 序列化过程中出现错误时抛出异常 - */ - public static String toJson(Object obj) { - try { - return objectMapper.writeValueAsString(obj); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * 将 JSON 字符串反序列化为指定类型的对象 - * - * @param json JSON 字符串 - * @param clazz 目标类型 Class 对象 - * @param 泛型类型参数 - * @return 反序列化后的 Java 对象 - * @throws IOException 当 JSON 解析过程中出现错误时抛出异常 - */ - public static T fromJson(String json, Class clazz) { - try { - return objectMapper.readValue(json, clazz); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * 将对象转换为格式化的 JSON 字符串(已启用 INDENT_OUTPUT 功能,所以所有方法都会返回格式化后的 JSON) - * - * @param obj 需要序列化的Java对象 - * @return 格式化后的 JSON 字符串 - * @throws JsonProcessingException 当 JSON 序列化过程中出现错误时抛出异常 - */ - public static String toFormattedJson(Object obj) { - // 已在类初始化时设置了 SerializationFeature.INDENT_OUTPUT,此处无需额外操作 - return toJson(obj); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 14b8397478..0a748667b7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenApi; +import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenOptions; -import com.aliyun.broadscope.bailian.sdk.models.CompletionsRequest; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjInteractionsTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java similarity index 79% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjInteractionsTests.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java index 636e9d2d44..10c9a0923c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjInteractionsTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java @@ -1,8 +1,7 @@ -package cn.iocoder.yudao.framework.ai.mj; +package cn.iocoder.yudao.framework.ai.midjourney; import cn.hutool.core.io.FileUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.interactions.MjInteractions; +import cn.iocoder.yudao.framework.ai.midjourney.interactions.MidjourneyInteractions; import cn.iocoder.yudao.framework.ai.midjourney.vo.Attachments; import cn.iocoder.yudao.framework.ai.midjourney.vo.Describe; import cn.iocoder.yudao.framework.ai.midjourney.vo.ReRoll; @@ -23,7 +22,7 @@ import java.util.Map; * author: fansili * time: 2024/4/4 18:59 */ -public class MjInteractionsTests { +public class MidjourneyInteractionsTests { private MidjourneyConfig midjourneyConfig; @Before @@ -39,14 +38,14 @@ public class MjInteractionsTests { @Test public void mjImageTest() { - MjInteractions mjImagineInteractions = new MjInteractions(midjourneyConfig); + MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); mjImagineInteractions.imagine("童话里应该是什么样子?"); } @Test public void reRollTest() { - MjInteractions mjImagineInteractions = new MjInteractions(midjourneyConfig); + MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); mjImagineInteractions.reRoll(new ReRoll() .setMessageId("1226165117448753243") .setCustomId("MJ::JOB::upsample::3::2aeefbef-43e2-4057-bcf1-43b5f39ab6f7")); @@ -54,7 +53,7 @@ public class MjInteractionsTests { @Test public void uploadAttachmentsTest() { - MjInteractions mjImagineInteractions = new MjInteractions(midjourneyConfig); + MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); UploadAttachmentsRes res = mjImagineInteractions.uploadAttachments( new Attachments().setFileSystemResource( new FileSystemResource(new File("/Users/fansili/Downloads/DSC01402.JPG"))) @@ -64,7 +63,7 @@ public class MjInteractionsTests { @Test public void describeTest() { - MjInteractions mjImagineInteractions = new MjInteractions(midjourneyConfig); + MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); mjImagineInteractions.describe(new Describe() .setFileName("DSC01402.JPG") .setFinalFileName("16826931-2873-45ec-8cfb-0ad81f1a075f/DSC01402.JPG") diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java similarity index 58% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java index 521e9b5abb..39d64931f5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.mj; +package cn.iocoder.yudao.framework.ai.midjourney; -import cn.iocoder.yudao.framework.ai.midjourney.util.MjUtil; +import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; import org.junit.Test; /** @@ -9,14 +9,14 @@ import org.junit.Test; * author: fansili * time: 2024/4/6 21:57 */ -public class MjUtilTests { +public class MidjourneyUtilTests { @Test public void parseContentTest() { String content1 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)"; String content2 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)"; - System.err.println(MjUtil.parseContent(content1)); - System.err.println(MjUtil.parseContent(content2)); + System.err.println(MidjourneyUtil.parseContent(content1)); + System.err.println(MidjourneyUtil.parseContent(content2)); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjWebSocketTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java similarity index 76% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjWebSocketTests.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java index 9076923b4e..a0d672873f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjWebSocketTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.framework.ai.mj; +package cn.iocoder.yudao.framework.ai.midjourney; import cn.hutool.core.io.FileUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MjMessageListener; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MjWebSocketStarter; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; +import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; import org.junit.Before; import org.junit.Test; @@ -17,7 +16,7 @@ import java.util.Scanner; * author: fansili * time: 2024/4/3 16:40 */ -public class MjWebSocketTests { +public class MidjourneyWebSocketTests { private MidjourneyConfig midjourneyConfig; @@ -35,8 +34,8 @@ public class MjWebSocketTests { @Test public void startSocketTest() { String wssUrl = "wss://gateway.discord.gg"; - var messageListener = new MjMessageListener(midjourneyConfig); - var webSocketStarter = new MjWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener); + var messageListener = new MidjourneyMessageListener(midjourneyConfig); + var webSocketStarter = new MidjourneyWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener); try { webSocketStarter.start(); -- Gitee From 321f71de73fd91dbaf6f334e12260e3feefd6300 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 10 Apr 2024 13:03:20 +0800 Subject: [PATCH 0210/1557] =?UTF-8?q?=E9=87=8D=E6=9E=84=20LocalDateTimeDes?= =?UTF-8?q?erializer=20=E5=92=8C=20LocalDateTimeSerializer=20=E7=9A=84?= =?UTF-8?q?=E5=91=BD=E5=90=8D=EF=BC=8C=E5=8F=AF=E8=AF=BB=E6=80=A7=E6=9B=B4?= =?UTF-8?q?=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/YudaoJacksonAutoConfiguration.java | 12 ++++++------ ....java => TimestampLocalDateTimeDeserializer.java} | 12 +++++++----- ...er.java => TimestampLocalDateTimeSerializer.java} | 12 +++++++----- 3 files changed, 20 insertions(+), 16 deletions(-) rename yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/{LocalDateTimeDeserializer.java => TimestampLocalDateTimeDeserializer.java} (62%) rename yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/{LocalDateTimeSerializer.java => TimestampLocalDateTimeSerializer.java} (62%) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java index 6ea95b1962..4f94f16ec5 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.framework.jackson.config; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.framework.jackson.core.databind.LocalDateTimeDeserializer; -import cn.iocoder.yudao.framework.jackson.core.databind.LocalDateTimeSerializer; import cn.iocoder.yudao.framework.jackson.core.databind.NumberSerializer; +import cn.iocoder.yudao.framework.jackson.core.databind.TimestampLocalDateTimeDeserializer; +import cn.iocoder.yudao.framework.jackson.core.databind.TimestampLocalDateTimeSerializer; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; @@ -37,13 +37,13 @@ public class YudaoJacksonAutoConfiguration { .addDeserializer(LocalDate.class, LocalDateDeserializer.INSTANCE) .addSerializer(LocalTime.class, LocalTimeSerializer.INSTANCE) .addDeserializer(LocalTime.class, LocalTimeDeserializer.INSTANCE) - // 新增 LocalDateTime 序列化、反序列化规则 - .addSerializer(LocalDateTime.class, LocalDateTimeSerializer.INSTANCE) - .addDeserializer(LocalDateTime.class, LocalDateTimeDeserializer.INSTANCE); + // 新增 LocalDateTime 序列化、反序列化规则,使用 Long 时间戳 + .addSerializer(LocalDateTime.class, TimestampLocalDateTimeSerializer.INSTANCE) + .addDeserializer(LocalDateTime.class, TimestampLocalDateTimeDeserializer.INSTANCE); // 1.2 注册到 objectMapper objectMappers.forEach(objectMapper -> objectMapper.registerModule(simpleModule)); - // 2. 设置 objectMapper 到 JsonUtils { + // 2. 设置 objectMapper 到 JsonUtils JsonUtils.init(CollUtil.getFirst(objectMappers)); log.info("[init][初始化 JsonUtils 成功]"); return new JsonUtils(); diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeDeserializer.java similarity index 62% rename from yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeDeserializer.java index 53c40254b3..71a480fbf2 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeDeserializer.java @@ -10,16 +10,18 @@ import java.time.LocalDateTime; import java.time.ZoneId; /** - * LocalDateTime反序列化规则 - *

- * 会将毫秒级时间戳反序列化为LocalDateTime + * 基于时间戳的 LocalDateTime 反序列化器 + * + * @author 老五 */ -public class LocalDateTimeDeserializer extends JsonDeserializer { +public class TimestampLocalDateTimeDeserializer extends JsonDeserializer { - public static final LocalDateTimeDeserializer INSTANCE = new LocalDateTimeDeserializer(); + public static final TimestampLocalDateTimeDeserializer INSTANCE = new TimestampLocalDateTimeDeserializer(); @Override public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + // 将 Long 时间戳,转换为 LocalDateTime 对象 return LocalDateTime.ofInstant(Instant.ofEpochMilli(p.getValueAsLong()), ZoneId.systemDefault()); } + } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeSerializer.java similarity index 62% rename from yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeSerializer.java index 286fb733ed..e72c47bb81 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/TimestampLocalDateTimeSerializer.java @@ -9,16 +9,18 @@ import java.time.LocalDateTime; import java.time.ZoneId; /** - * LocalDateTime序列化规则 - *

- * 会将LocalDateTime序列化为毫秒级时间戳 + * 基于时间戳的 LocalDateTime 序列化器 + * + * @author 老五 */ -public class LocalDateTimeSerializer extends JsonSerializer { +public class TimestampLocalDateTimeSerializer extends JsonSerializer { - public static final LocalDateTimeSerializer INSTANCE = new LocalDateTimeSerializer(); + public static final TimestampLocalDateTimeSerializer INSTANCE = new TimestampLocalDateTimeSerializer(); @Override public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + // 将 LocalDateTime 对象,转换为 Long 时间戳 gen.writeNumber(value.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli()); } + } -- Gitee From 8f2ce2faae8818542bd806cc8a07fdb630381028 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 19:42:29 +0800 Subject: [PATCH 0211/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9mj=20message=20type?= =?UTF-8?q?=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webSocket/listener/MidjourneyMessageListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java index 31bbe0a972..5e63b079c5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java @@ -63,11 +63,11 @@ public class MidjourneyMessageListener { private void convertGenerateStatus(MidjourneyMessage mjMessage) { if (mjMessage.getType() == 20 && mjMessage.getContent().getStatus().contains("Waiting")) { - mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.WAITING.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.WAITING.getStatus()); } else if (mjMessage.getType() == 20 && !StrUtil.isBlank(mjMessage.getContent().getProgress())) { - mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.IN_PROGRESS.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus()); } else if (mjMessage.getType() == 0 && !CollUtil.isEmpty(mjMessage.getComponents())) { - mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.COMPLETED.getValue()); + mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.COMPLETED.getStatus()); } } -- Gitee From a9e0bc51e9d051bcf67f22ed6387bda8bb218720 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 19:42:42 +0800 Subject: [PATCH 0212/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84=20jsonUtils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java index 6c5c8dba31..efc15a3ba6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.framework.ai.imageopenai; import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; -import cn.iocoder.yudao.framework.ai.util.JacksonUtil; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import io.netty.channel.ChannelOption; import lombok.extern.slf4j.Slf4j; @@ -15,7 +14,6 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.netty.http.client.HttpClient; -- Gitee From 0e277b71e10aee439e31df294620626e4a271f70 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 20:01:05 +0800 Subject: [PATCH 0213/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=20spring-ai-bom=20?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 7a3ee3e0a8..8924245e93 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -628,16 +628,6 @@ ureport2-console ${ureport2.version} - - - - - org.springframework.ai - spring-ai-bom - ${spring-ai-bom.version} - pom - import - -- Gitee From 03f124a82b5e2a083c06b39ea44be9c0373e3d36 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 20:02:06 +0800 Subject: [PATCH 0214/1557] =?UTF-8?q?1=E3=80=81=E8=AF=B7=E6=B1=82=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E9=83=A8=E5=88=86=E6=8A=BD=E7=A6=BB=202=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAapi=E5=92=8Cspring=20ai=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/MidjourneyInteractions.java | 83 +++++++++++++++++++ .../MidjourneyInteractionsApi.java} | 80 ++++-------------- 2 files changed, 101 insertions(+), 62 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{interactions/MidjourneyInteractions.java => api/MidjourneyInteractionsApi.java} (59%) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java new file mode 100644 index 0000000000..4077912a5a --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.framework.ai.midjourney.api; + +import cn.hutool.core.util.IdUtil; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; +import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; +import com.google.common.collect.Maps; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; + +import java.util.HashMap; + +// TODO @fansili:按照 spring ai 的封装习惯,这个类是不是 MidjourneyApi + +/** + * 图片生成 + * + * author: fansili + * time: 2024/4/3 17:36 + */ +@Slf4j +public abstract class MidjourneyInteractions { + + // TODO done @fansili:静态变量,放在最前面哈; + /** + * header - referer 头信息 + */ + private static final String HEADER_REFERER = "https://discord.com/channels/%s/%s"; + /** + * mj配置文件 + */ + protected final MidjourneyConfig midjourneyConfig; + + protected MidjourneyInteractions(MidjourneyConfig midjourneyConfig) { + this.midjourneyConfig = midjourneyConfig; + } + + /** + * 获取headers - application json + * + * @return + */ + protected HttpHeaders getHeadersOfAppJson() { + // 设置header值 + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.APPLICATION_JSON); + httpHeaders.set("Authorization", midjourneyConfig.getToken()); + httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); + httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); + httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); + return httpHeaders; + } + + /** + * 获取headers - http form data + * + * @return + */ + protected HttpHeaders getHeadersOfFormData() { + // 设置header值 + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); + httpHeaders.set("Authorization", midjourneyConfig.getToken()); + httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); + httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); + httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); + return httpHeaders; + } + + /** + * 获取 - 默认参数 + * @return + */ + protected HashMap getDefaultParams() { + HashMap requestParams = Maps.newHashMap(); + // TODO @fansili:感觉参数的组装,可以搞成一个公用的方法;就是 config + 入参的感觉; + requestParams.put("guild_id", midjourneyConfig.getGuildId()); + requestParams.put("channel_id", midjourneyConfig.getChannelId()); + requestParams.put("session_id", midjourneyConfig.getSessionId()); + requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); // TODO @fansili:建议用 uuid 之类的;nextId 跨进程未必合适哈; + return requestParams; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java similarity index 59% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java index 104e1dd2c5..f71a816671 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/interactions/MidjourneyInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java @@ -1,20 +1,16 @@ -package cn.iocoder.yudao.framework.ai.midjourney.interactions; +package cn.iocoder.yudao.framework.ai.midjourney.api; -import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; -import cn.iocoder.yudao.framework.ai.midjourney.vo.Attachments; -import cn.iocoder.yudao.framework.ai.midjourney.vo.Describe; -import cn.iocoder.yudao.framework.ai.midjourney.vo.ReRoll; -import cn.iocoder.yudao.framework.ai.midjourney.vo.UploadAttachmentsRes; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.AttachmentsReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.DescribeReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.res.UploadAttachmentsRes; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.springframework.core.io.FileSystemResource; import org.springframework.http.*; import org.springframework.util.LinkedMultiValueMap; @@ -32,18 +28,13 @@ import java.util.HashMap; * time: 2024/4/3 17:36 */ @Slf4j -public class MidjourneyInteractions { - - // TODO done @fansili:静态变量,放在最前面哈; - private static final String HEADER_REFERER = "https://discord.com/channels/%s/%s"; +public class MidjourneyInteractionsApi extends MidjourneyInteractions { private final String url; - private final MidjourneyConfig midjourneyConfig; private final RestTemplate restTemplate = new RestTemplate(); // TODO @fansili:优先级低:后续搞到统一的管理 - - public MidjourneyInteractions(MidjourneyConfig midjourneyConfig) { - this.midjourneyConfig = midjourneyConfig; + public MidjourneyInteractionsApi(MidjourneyConfig midjourneyConfig) { + super(midjourneyConfig); this.url = midjourneyConfig.getServerUrl().concat(midjourneyConfig.getApiInteractions()); } @@ -51,17 +42,12 @@ public class MidjourneyInteractions { // 获取请求模板 String requestTemplate = midjourneyConfig.getRequestTemplates().get("imagine"); // 设置参数 - HashMap requestParams = Maps.newHashMap(); - // TODO @fansili:感觉参数的组装,可以搞成一个公用的方法;就是 config + 入参的感觉; - requestParams.put("guild_id", midjourneyConfig.getGuildId()); - requestParams.put("channel_id", midjourneyConfig.getChannelId()); - requestParams.put("session_id", midjourneyConfig.getSessionId()); - requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); // TODO @fansili:建议用 uuid 之类的;nextId 跨进程未必合适哈; + HashMap requestParams = getDefaultParams(); requestParams.put("prompt", prompt); // 解析 template 参数占位符 String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 获取 header - HttpHeaders httpHeaders = getHttpHeaders(); + HttpHeaders httpHeaders = getHeadersOfAppJson(); // 发送请求 HttpEntity requestEntity = new HttpEntity<>(requestBody, httpHeaders); String res = restTemplate.postForObject(url, requestEntity, String.class); @@ -77,19 +63,15 @@ public class MidjourneyInteractions { // TODO done @fansili:方法和方法之间,空一行哈; - public Boolean reRoll(ReRoll reRoll) { + public Boolean reRoll(ReRollReq reRoll) { // 获取请求模板 String requestTemplate = midjourneyConfig.getRequestTemplates().get("reroll"); // 设置参数 - HashMap requestParams = Maps.newHashMap(); - requestParams.put("guild_id", midjourneyConfig.getGuildId()); - requestParams.put("channel_id", midjourneyConfig.getChannelId()); - requestParams.put("session_id", midjourneyConfig.getSessionId()); - requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); + HashMap requestParams = getDefaultParams(); requestParams.put("custom_id", reRoll.getCustomId()); requestParams.put("message_id", reRoll.getMessageId()); // 获取 header - HttpHeaders httpHeaders = getHttpHeaders(); + HttpHeaders httpHeaders = getHeadersOfAppJson(); // 设置参数 String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 发送请求 @@ -105,7 +87,7 @@ public class MidjourneyInteractions { } // TODO @fansili:搞成私有方法,可能会好点; - public UploadAttachmentsRes uploadAttachments(Attachments attachments) { + public UploadAttachmentsRes uploadAttachments(AttachmentsReq attachments) { // file JSONObject fileObj = new JSONObject(); fileObj.put("id", "0"); @@ -120,13 +102,7 @@ public class MidjourneyInteractions { MultiValueMap multipartRequest = new LinkedMultiValueMap<>(); multipartRequest.put("files", Lists.newArrayList(fileObj)); // 设置header值 - HttpHeaders httpHeaders = new HttpHeaders(); - // TODO @fansili:通用的 header 构建,抽一个方法哈; - httpHeaders.setContentType(MediaType.APPLICATION_JSON); - httpHeaders.set("Authorization", midjourneyConfig.getToken()); - httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); - httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); + HttpHeaders httpHeaders = getHeadersOfAppJson(); // 创建HttpEntity对象,包含表单数据和头部信息 HttpEntity> multiValueMapHttpEntity = new HttpEntity<>(multipartRequest, httpHeaders); // 发送POST请求并接收响应 @@ -144,24 +120,15 @@ public class MidjourneyInteractions { return uploadAttachmentsRes; } - public Boolean describe(Describe describe) { + public Boolean describe(DescribeReq describe) { // 获取请求模板 String requestTemplate = midjourneyConfig.getRequestTemplates().get("describe"); // 设置参数 - HashMap requestParams = Maps.newHashMap(); - requestParams.put("guild_id", midjourneyConfig.getGuildId()); - requestParams.put("channel_id", midjourneyConfig.getChannelId()); - requestParams.put("session_id", midjourneyConfig.getSessionId()); - requestParams.put("nonce", String.valueOf(IdUtil.getSnowflakeNextId())); + HashMap requestParams = getDefaultParams(); requestParams.put("file_name", describe.getFileName()); requestParams.put("final_file_name", describe.getFinalFileName()); // 设置 header - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); // 设置内容类型为JSON - httpHeaders.set("Authorization", midjourneyConfig.getToken()); - httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); - httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); + HttpHeaders httpHeaders = getHeadersOfFormData(); String requestBody = MidjourneyUtil.parseTemplate(requestTemplate, requestParams); // 创建表单数据 MultiValueMap formData = new LinkedMultiValueMap<>(); @@ -178,15 +145,4 @@ public class MidjourneyInteractions { return isSuccess; } - @NotNull - private HttpHeaders getHttpHeaders() { - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.setContentType(MediaType.APPLICATION_JSON); // 设置内容类型为JSON - httpHeaders.set("Authorization", midjourneyConfig.getToken()); - httpHeaders.set("User-Agent", midjourneyConfig.getUserAage()); - httpHeaders.set("Cookie", MidjourneyConstants.HTTP_COOKIE); - httpHeaders.set("Referer", String.format(HEADER_REFERER, midjourneyConfig.getGuildId(), midjourneyConfig.getChannelId())); - return httpHeaders; - } - } -- Gitee From 9476a05949bc5039b3bc19b822a58acf84027523 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 20:02:33 +0800 Subject: [PATCH 0215/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E6=B1=82=E5=A2=9E=E5=8A=A0=20req=20res=20?= =?UTF-8?q?=E5=90=8E=E7=BC=80=EF=BC=8C=E7=A7=BB=E5=8A=A8=E5=88=B0api?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{vo/Attachments.java => api/req/AttachmentsReq.java} | 4 ++-- .../{vo/Describe.java => api/req/DescribeReq.java} | 6 ++---- .../midjourney/{vo/ReRoll.java => api/req/ReRollReq.java} | 4 ++-- .../ai/midjourney/{vo => api/res}/UploadAttachmentsRes.java | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{vo/Attachments.java => api/req/AttachmentsReq.java} (78%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{vo/Describe.java => api/req/DescribeReq.java} (76%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{vo/ReRoll.java => api/req/ReRollReq.java} (82%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/{vo => api/res}/UploadAttachmentsRes.java (91%) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Attachments.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java similarity index 78% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Attachments.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java index 133a7031fb..ed18a4834b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Attachments.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.vo; +package cn.iocoder.yudao.framework.ai.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; @@ -12,7 +12,7 @@ import org.springframework.core.io.FileSystemResource; */ @Data @Accessors(chain = true) -public class Attachments { +public class AttachmentsReq { /** * 创建文件系统资源对象 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Describe.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java similarity index 76% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Describe.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java index 6517f7b862..49a4ab31ac 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/Describe.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java @@ -1,10 +1,8 @@ -package cn.iocoder.yudao.framework.ai.midjourney.vo; +package cn.iocoder.yudao.framework.ai.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; -import java.io.File; - /** * describe * @@ -13,7 +11,7 @@ import java.io.File; */ @Data @Accessors(chain = true) -public class Describe { +public class DescribeReq { /** * 文件名字 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/ReRoll.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java similarity index 82% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/ReRoll.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java index a285174199..0d83689875 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/ReRoll.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.vo; +package cn.iocoder.yudao.framework.ai.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; @@ -9,7 +9,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class ReRoll { +public class ReRollReq { /** * socket 消息里面收到的 messageId diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/UploadAttachmentsRes.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/UploadAttachmentsRes.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java index b06c1c3180..cba21c974f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/vo/UploadAttachmentsRes.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.vo; +package cn.iocoder.yudao.framework.ai.midjourney.api.res; import lombok.Data; import lombok.experimental.Accessors; -- Gitee From c8a2c8369fdb7bfd992c64b6fbbe2aa83ccede73 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Apr 2024 20:02:50 +0800 Subject: [PATCH 0216/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MidjourneyInteractionsTests.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java index 10c9a0923c..1ed3afc1d7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.framework.ai.midjourney; import cn.hutool.core.io.FileUtil; -import cn.iocoder.yudao.framework.ai.midjourney.interactions.MidjourneyInteractions; -import cn.iocoder.yudao.framework.ai.midjourney.vo.Attachments; -import cn.iocoder.yudao.framework.ai.midjourney.vo.Describe; -import cn.iocoder.yudao.framework.ai.midjourney.vo.ReRoll; -import cn.iocoder.yudao.framework.ai.midjourney.vo.UploadAttachmentsRes; +import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.AttachmentsReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.DescribeReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; +import cn.iocoder.yudao.framework.ai.midjourney.api.res.UploadAttachmentsRes; import com.alibaba.fastjson.JSON; import org.junit.Before; import org.junit.Test; @@ -38,24 +38,24 @@ public class MidjourneyInteractionsTests { @Test public void mjImageTest() { - MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); + MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig); mjImagineInteractions.imagine("童话里应该是什么样子?"); } @Test public void reRollTest() { - MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); - mjImagineInteractions.reRoll(new ReRoll() + MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig); + mjImagineInteractions.reRoll(new ReRollReq() .setMessageId("1226165117448753243") .setCustomId("MJ::JOB::upsample::3::2aeefbef-43e2-4057-bcf1-43b5f39ab6f7")); } @Test public void uploadAttachmentsTest() { - MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); + MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig); UploadAttachmentsRes res = mjImagineInteractions.uploadAttachments( - new Attachments().setFileSystemResource( + new AttachmentsReq().setFileSystemResource( new FileSystemResource(new File("/Users/fansili/Downloads/DSC01402.JPG"))) ); System.err.println(JSON.toJSONString(res)); @@ -63,8 +63,8 @@ public class MidjourneyInteractionsTests { @Test public void describeTest() { - MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig); - mjImagineInteractions.describe(new Describe() + MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig); + mjImagineInteractions.describe(new DescribeReq() .setFileName("DSC01402.JPG") .setFinalFileName("16826931-2873-45ec-8cfb-0ad81f1a075f/DSC01402.JPG") ); -- Gitee From 38db5fe0087afd98c61dd7b54e811f40ae93cdde Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 10 Apr 2024 20:13:31 +0800 Subject: [PATCH 0217/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20UserIdempotentKeyResolver=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=99=A8=EF=BC=8C=E6=94=AF=E6=8C=81=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E7=9A=84=E5=B9=82=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pom.xml | 7 +++++ .../config/YudaoIdempotentConfiguration.java | 6 ++++ .../core/annotation/Idempotent.java | 17 +++++++++++ .../idempotent/core/aop/IdempotentAspect.java | 24 ++++++++++++---- .../impl/DefaultIdempotentKeyResolver.java | 2 +- .../impl/UserIdempotentKeyResolver.java | 28 +++++++++++++++++++ .../core/redis/IdempotentRedisDAO.java | 5 ++++ .../controller/admin/user/UserController.http | 1 + 8 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/UserIdempotentKeyResolver.java diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index e4e970f29f..46fd97e438 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -16,6 +16,13 @@ https://github.com/YunaiV/ruoyi-vue-pro + + + cn.iocoder.boot + yudao-spring-boot-starter-web + provided + + cn.iocoder.boot diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/config/YudaoIdempotentConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/config/YudaoIdempotentConfiguration.java index 23a75588f8..de74963d23 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/config/YudaoIdempotentConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/config/YudaoIdempotentConfiguration.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.idempotent.core.aop.IdempotentAspect; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.ExpressionIdempotentKeyResolver; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.IdempotentKeyResolver; +import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.UserIdempotentKeyResolver; import cn.iocoder.yudao.framework.idempotent.core.redis.IdempotentRedisDAO; import org.springframework.boot.autoconfigure.AutoConfiguration; import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; @@ -32,6 +33,11 @@ public class YudaoIdempotentConfiguration { return new DefaultIdempotentKeyResolver(); } + @Bean + public UserIdempotentKeyResolver userIdempotentKeyResolver() { + return new UserIdempotentKeyResolver(); + } + @Bean public ExpressionIdempotentKeyResolver expressionIdempotentKeyResolver() { return new ExpressionIdempotentKeyResolver(); diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/annotation/Idempotent.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/annotation/Idempotent.java index 579a07c589..cd6add8ca3 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/annotation/Idempotent.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/annotation/Idempotent.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.framework.idempotent.core.annotation; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.IdempotentKeyResolver; +import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.ExpressionIdempotentKeyResolver; +import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.UserIdempotentKeyResolver; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -36,6 +38,10 @@ public @interface Idempotent { /** * 使用的 Key 解析器 + * + * @see DefaultIdempotentKeyResolver 全局级别 + * @see UserIdempotentKeyResolver 用户级别 + * @see ExpressionIdempotentKeyResolver 自定义表达式,通过 {@link #keyArg()} 计算 */ Class keyResolver() default DefaultIdempotentKeyResolver.class; /** @@ -43,4 +49,15 @@ public @interface Idempotent { */ String keyArg() default ""; + /** + * 删除 Key,当发生异常时候 + * + * 问题:为什么发生异常时,需要删除 Key 呢? + * 回答:发生异常时,说明业务发生错误,此时需要删除 Key,避免下次请求无法正常执行。 + * + * 问题:为什么不搞 deleteWhenSuccess 执行成功时,需要删除 Key 呢? + * 回答:这种情况下,本质上是分布式锁,推荐使用 @Lock4j 注解 + */ + boolean deleteKeyWhenException() default true; + } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java index 9453444f86..2d8c76d558 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java @@ -2,14 +2,14 @@ package cn.iocoder.yudao.framework.idempotent.core.aop; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent; import cn.iocoder.yudao.framework.idempotent.core.keyresolver.IdempotentKeyResolver; import cn.iocoder.yudao.framework.idempotent.core.redis.IdempotentRedisDAO; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; import org.springframework.util.Assert; import java.util.List; @@ -36,21 +36,33 @@ public class IdempotentAspect { this.idempotentRedisDAO = idempotentRedisDAO; } - @Before("@annotation(idempotent)") - public void beforePointCut(JoinPoint joinPoint, Idempotent idempotent) { + @Around(value = "@annotation(idempotent)") + public Object beforePointCut(ProceedingJoinPoint joinPoint, Idempotent idempotent) throws Throwable { // 获得 IdempotentKeyResolver IdempotentKeyResolver keyResolver = keyResolvers.get(idempotent.keyResolver()); Assert.notNull(keyResolver, "找不到对应的 IdempotentKeyResolver"); // 解析 Key String key = keyResolver.resolver(joinPoint, idempotent); - // 锁定 Key。 + // 1. 锁定 Key boolean success = idempotentRedisDAO.setIfAbsent(key, idempotent.timeout(), idempotent.timeUnit()); // 锁定失败,抛出异常 if (!success) { log.info("[beforePointCut][方法({}) 参数({}) 存在重复请求]", joinPoint.getSignature().toString(), joinPoint.getArgs()); throw new ServiceException(GlobalErrorCodeConstants.REPEATED_REQUESTS.getCode(), idempotent.message()); } + + // 2. 执行逻辑 + try { + return joinPoint.proceed(); + } catch (Throwable throwable) { + // 3. 异常时,删除 Key + // 参考美团 GTIS 思路:https://tech.meituan.com/2016/09/29/distributed-system-mutually-exclusive-idempotence-cerberus-gtis.html + if (idempotent.deleteKeyWhenException()) { + idempotentRedisDAO.delete(key); + } + throw throwable; + } } } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/DefaultIdempotentKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/DefaultIdempotentKeyResolver.java index 56856993ba..7b5e145e4c 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/DefaultIdempotentKeyResolver.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/DefaultIdempotentKeyResolver.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.idempotent.core.keyresolver.IdempotentKeyResol import org.aspectj.lang.JoinPoint; /** - * 默认幂等 Key 解析器,使用方法名 + 方法参数,组装成一个 Key + * 默认(全局级别)幂等 Key 解析器,使用方法名 + 方法参数,组装成一个 Key * * 为了避免 Key 过长,使用 MD5 进行“压缩” * diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/UserIdempotentKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/UserIdempotentKeyResolver.java new file mode 100644 index 0000000000..2fa91ff976 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/keyresolver/impl/UserIdempotentKeyResolver.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent; +import cn.iocoder.yudao.framework.idempotent.core.keyresolver.IdempotentKeyResolver; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; +import org.aspectj.lang.JoinPoint; + +/** + * 用户级别的幂等 Key 解析器,使用方法名 + 方法参数 + userId + userType,组装成一个 Key + * + * 为了避免 Key 过长,使用 MD5 进行“压缩” + * + * @author 芋道源码 + */ +public class UserIdempotentKeyResolver implements IdempotentKeyResolver { + + @Override + public String resolver(JoinPoint joinPoint, Idempotent idempotent) { + String methodName = joinPoint.getSignature().toString(); + String argsStr = StrUtil.join(",", joinPoint.getArgs()); + Long userId = WebFrameworkUtils.getLoginUserId(); + Integer userType = WebFrameworkUtils.getLoginUserType(); + return SecureUtil.md5(methodName + argsStr + userId + userType); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/redis/IdempotentRedisDAO.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/redis/IdempotentRedisDAO.java index e3a79414d4..a8d981dec3 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/redis/IdempotentRedisDAO.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/redis/IdempotentRedisDAO.java @@ -29,6 +29,11 @@ public class IdempotentRedisDAO { return redisTemplate.opsForValue().setIfAbsent(redisKey, "", timeout, timeUnit); } + public void delete(String key) { + String redisKey = formatKey(key); + redisTemplate.delete(redisKey); + } + private static String formatKey(String key) { return String.format(IDEMPOTENT, key); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http index 6d9cea8010..7d7f6227e8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http @@ -1,4 +1,5 @@ ### 请求 /system/user/page 接口 => 没有权限 GET {{baseUrl}}/system/user/page?pageNo=1&pageSize=10 Authorization: Bearer {{token}} +#Authorization: Bearer test100 tenant-id: {{adminTenentId}} -- Gitee From 2e03dcba6946b4039fcd2b5b54c5f45106734918 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 10 Apr 2024 20:57:44 +0800 Subject: [PATCH 0218/1557] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20resilience4j=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 12 ---------- .../pom.xml | 6 ----- .../framework/resilience4j/package-info.java | 9 ------- ...j \345\205\245\351\227\250\343\200\213.md" | 1 - .../core/handler/GlobalExceptionHandler.java | 24 ++++--------------- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../application-integration-test.yaml | 10 -------- .../test/resources/application-unit-test.yaml | 2 -- .../test/resources/application-unit-test.yaml | 2 -- .../application-integration-test.yaml | 10 -------- .../test/resources/application-unit-test.yaml | 2 -- .../src/main/resources/application-dev.yaml | 10 -------- .../src/main/resources/application-local.yaml | 10 -------- 19 files changed, 5 insertions(+), 107 deletions(-) delete mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/package-info.java delete mode 100644 "yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/\343\200\212\350\212\213\351\201\223 Spring Boot \346\234\215\345\212\241\345\256\271\351\224\231 Resilience4j \345\205\245\351\227\250\343\200\213.md" diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index f5a03a90bd..09067a2a4e 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -34,7 +34,6 @@ 2.2.3 2.2.7 - 2.1.0 9.0.0 3.2.1 @@ -282,17 +281,6 @@ - - io.github.resilience4j - resilience4j-ratelimiter - ${resilience4j.version} - - - io.github.resilience4j - resilience4j-spring-boot2 - ${resilience4j.version} - - cn.iocoder.boot diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index 46fd97e438..a93991ff51 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -35,12 +35,6 @@ lock4j-redisson-spring-boot-starter true - - - io.github.resilience4j - resilience4j-spring-boot2 - true - diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/package-info.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/package-info.java deleted file mode 100644 index 649e8a0eaa..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * 使用 Resilience4j 组件,实现服务保障,包括: - * 1. 熔断器 - * 2. 限流器 - * 3. 舱壁隔离 - * 4. 重试 - * 5. 限时器 - */ -package cn.iocoder.yudao.framework.resilience4j; diff --git "a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/\343\200\212\350\212\213\351\201\223 Spring Boot \346\234\215\345\212\241\345\256\271\351\224\231 Resilience4j \345\205\245\351\227\250\343\200\213.md" "b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/\343\200\212\350\212\213\351\201\223 Spring Boot \346\234\215\345\212\241\345\256\271\351\224\231 Resilience4j \345\205\245\351\227\250\343\200\213.md" deleted file mode 100644 index 8d6d0335b1..0000000000 --- "a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/resilience4j/\343\200\212\350\212\213\351\201\223 Spring Boot \346\234\215\345\212\241\345\256\271\351\224\231 Resilience4j \345\205\245\351\227\250\343\200\213.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index 243f949f28..7c60141953 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -11,6 +11,10 @@ import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.ValidationException; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -26,13 +30,8 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; import org.springframework.web.servlet.NoHandlerFoundException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.ValidationException; import java.time.LocalDateTime; import java.util.Map; -import java.util.Objects; import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.*; @@ -181,14 +180,6 @@ public class GlobalExceptionHandler { return CommonResult.error(METHOD_NOT_ALLOWED.getCode(), String.format("请求方法不正确:%s", ex.getMessage())); } - /** - * 处理 Resilience4j 限流抛出的异常 - */ - public CommonResult requestNotPermittedExceptionHandler(HttpServletRequest req, Throwable ex) { - log.warn("[requestNotPermittedExceptionHandler][url({}) 访问过于频繁]", req.getRequestURL(), ex); - return CommonResult.error(TOO_MANY_REQUESTS); - } - /** * 处理 Spring Security 权限不足的异常 * @@ -223,12 +214,7 @@ public class GlobalExceptionHandler { return tableNotExistsResult; } - // 情况二:部分特殊的库的处理 - if (Objects.equals("io.github.resilience4j.ratelimiter.RequestNotPermitted", ex.getClass().getName())) { - return requestNotPermittedExceptionHandler(req, ex); - } - - // 情况三:处理异常 + // 情况二:处理异常 log.error("[defaultExceptionHandler]", ex); // 插入异常日志 this.createExceptionLog(req, ex); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml index 1bbe0f530c..dd9b95bfb9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml @@ -32,8 +32,6 @@ mybatis-plus: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-crm/yudao-module-crm-biz/src/test/resources/application-unit-test.yaml b/yudao-module-crm/yudao-module-crm-biz/src/test/resources/application-unit-test.yaml index 0f28838da5..a55b301c69 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-crm/yudao-module-crm-biz/src/test/resources/application-unit-test.yaml @@ -39,8 +39,6 @@ mybatis-plus: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml index 2d0d827d29..d88a15a600 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml @@ -39,8 +39,6 @@ mybatis-plus: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml index 518fa712b9..36aec5c43d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml @@ -39,8 +39,6 @@ mybatis-plus: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml index 7b76570fd8..f05f050744 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml index 0aa14e897a..4168a2bdad 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml b/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml index 7b76570fd8..f05f050744 100644 --- a/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/resources/application-integration-test.yaml b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/resources/application-integration-test.yaml index 0e55d5639a..5a030df7bb 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/resources/application-integration-test.yaml +++ b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/resources/application-integration-test.yaml @@ -71,16 +71,6 @@ mybatis-plus: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 -resilience4j: - ratelimiter: - instances: - backendA: - limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50 - limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500 - timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s - register-health-indicator: true # 是否注册到健康监测 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml b/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml index 7b76570fd8..f05f050744 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-report/yudao-module-report-biz/src/test/resources/application-unit-test.yaml b/yudao-module-report/yudao-module-report-biz/src/test/resources/application-unit-test.yaml index 6bfd9953d7..c0da26010c 100644 --- a/yudao-module-report/yudao-module-report-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-report/yudao-module-report-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml b/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml index 4a1880178f..9b025ac8ef 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml @@ -75,16 +75,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 -resilience4j: - ratelimiter: - instances: - backendA: - limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50 - limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500 - timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s - register-health-indicator: true # 是否注册到健康监测 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml b/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml index 78d1d9c68b..58bbf921bd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml @@ -38,8 +38,6 @@ mybatis: # Lock4j 配置项(单元测试,禁用 Lock4j) -# Resilience4j 配置项 - --- #################### 监控相关配置 #################### --- #################### 芋道相关配置 #################### diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 8caf15b088..c10cdcb45b 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -115,16 +115,6 @@ lock4j: acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 -# Resilience4j 配置项 -resilience4j: - ratelimiter: - instances: - backendA: - limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50 - limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500 - timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s - register-health-indicator: true # 是否注册到健康监测 - --- #################### 监控相关配置 #################### # Actuator 监控端点的配置项 diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 89a0378307..555030b576 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -135,16 +135,6 @@ lock4j: acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 -# Resilience4j 配置项 -resilience4j: - ratelimiter: - instances: - backendA: - limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50 - limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500 - timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s - register-health-indicator: true # 是否注册到健康监测 - --- #################### 监控相关配置 #################### # Actuator 监控端点的配置项 -- Gitee From 51999be6b07990aa4c1c5092391bba65ec026ddc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 10 Apr 2024 21:01:15 +0800 Subject: [PATCH 0219/1557] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20resilience4j=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0283fd8e24..f146cd268d 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -35,7 +35,6 @@ 2.2.3 2.2.7 - 1.7.1 8.12.0 2.7.15 @@ -277,17 +276,6 @@ - - io.github.resilience4j - resilience4j-ratelimiter - ${resilience4j.version} - - - io.github.resilience4j - resilience4j-spring-boot2 - ${resilience4j.version} - - cn.iocoder.boot -- Gitee From e1d3e90565bd0e969b0d15e64b52bfb1ca7ee81c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 20:44:47 +0800 Subject: [PATCH 0220/1557] job message --- .../requestTestJson/job-message.json | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/job-message.json diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/job-message.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/job-message.json new file mode 100644 index 0000000000..46f77310fd --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/job-message.json @@ -0,0 +1,70 @@ +{ + "op": 0, + "s": 10, + "t": "MESSAGE_CREATE", + "d": { + "mention_everyone": false, + "pinned": false, + "components": [], + "attachments": [], + "interaction_metadata": { + "user_id": "972721304891453450", + "name": "blend", + "authorizing_integration_owners": { + "0": "1225608134878302329" + }, + "id": "1226901083708723310", + "type": 2 + }, + "author": { + "global_name": null, + "bot": true, + "avatar_decoration_data": null, + "public_flags": 589824, + "id": "936929561302675456", + "avatar": "f6ce562a6b4979c4b1cbc5b436d3be76", + "username": "Midjourney Bot", + "discriminator": "9282" + }, + "flags": 64, + "type": 20, + "mention_roles": [], + "nonce": "1226901080604934144", + "application_id": "936929561302675456", + "edited_timestamp": null, + "content": "", + "tts": false, + "webhook_id": "936929561302675456", + "mentions": [], + "interaction": { + "name": "blend", + "id": "1226901083708723310", + "type": 2, + "user": { + "global_name": "tiger", + "avatar_decoration_data": null, + "public_flags": 0, + "id": "972721304891453450", + "avatar": "3646118d04fd12dfd301c4fd17afd801", + "username": "jverbalu4990", + "discriminator": "0" + } + }, + "position": 0, + "id": "1226901087286591558", + "embeds": [ + { + "content_scan_version": 0, + "color": 16239475, + "footer": { + "text": "/imagine https://cdn.discordapp.com/ephemeral-attachments/1062880104792997970/1226901079514419221/srchttp___c-ssl.duitang.com_uploads_item_202001_20_20200120152231_lncpq.thumb.1000_0.jpgreferhttp___c-ssl.duitang.webp?ex=662673ac&is=6613feac&hm=bf9a400940c747fa869b8e4bf2a38238639b67b4b5e799ce1ef2c1f42bab178f& https://cdn.discordapp.com/ephemeral-attachments/1062880104792997970/1226901080970100736/xiyangyang20151021171455974.png?ex=662673ac&is=6613feac&hm=9c8f42ad2dfb1963a9e424c1942c59568544faed4d38f94b678bfcaa60f47b04& --v 5.2 --s 250" + }, + "description": "You have reached the maximum allowed number of concurrent jobs. Don't worry, this job will start as soon as another one finishes!", + "type": "rich", + "title": "Job queued" + } + ], + "channel_id": "1225608134878302332", + "timestamp": "2024-04-08T14:26:53.929000+00:00" + } +} -- Gitee From 9456d461f9337c6cc590d0201c31501ca9a4074b Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 11 Apr 2024 21:02:38 +0800 Subject: [PATCH 0221/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82=E6=89=A9=E5=B1=95=E5=B1=9E=E6=80=A7=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=20extensionElement=20=E5=B0=9D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 35 +-- .../flowable/core/util/BpmnModelUtils.java | 259 +---------------- .../flowable/core/util/SimpleModelUtils.java | 270 ++++++++++++++++++ .../definition/BpmSimpleModelServiceImpl.java | 19 +- .../BpmProcessInstanceCopyServiceImpl.java | 2 +- .../service/task/BpmSimpleNodeService.java | 6 +- 6 files changed, 318 insertions(+), 273 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index a19fa18479..7daa819263 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -18,20 +18,17 @@ import java.util.Objects; public enum BpmSimpleModelNodeType implements IntArrayValuable { // TODO @jaosn:-1、0、1、4、-2 是前端已经定义好的么?感觉未来可以考虑搞成和 BPMN 尽量一致的单词哈;类似 usertask 用户审批; - // TODO @jason:_NODE 都删除掉哈; - START_EVENT_NODE(0, "开始节点"), - END_EVENT_NODE(-2, "结束节点"), // TODO @jaosn:挪到 START_EVENT_NODE 后; - - APPROVE_USER_NODE(1, "审批人节点"), // TODO @jaosn:是不是这里从 10 开始好点;相当于说,0-9 给开始和结束;10-19 给各种节点;20-29 给各种条件;TODO @jason:改成 USER_TASK 是不是好点呀 - // 抄送人节点、对应 BPMN 的 ScriptTask. 使用ScriptTask 原因。好像 ServiceTask 自定义属性不能写入 XML; - // TODO @jason:ServiceTask 自定义 xml,有没啥报错信息; - SCRIPT_TASK_NODE(2, "抄送人节点"), // TODO @jason:是不是改成 COPY_TASK 好一点哈; - - EXCLUSIVE_GATEWAY_NODE(4, "排他网关"), // TODO @jason:是不是改成叫 条件分支? - PARALLEL_GATEWAY_FORK_NODE(5, "并行网关分叉节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? - PARALLEL_GATEWAY_JOIN_NODE(6, "并行网关聚合节点"), - INCLUSIVE_GATEWAY_FORK_NODE(7, "包容网关分叉节点"), - INCLUSIVE_GATEWAY_JOIN_NODE(8, "包容网关聚合节点"), + START_EVENT(0, "开始节点"), + END_EVENT(-2, "结束节点"), // TODO @jaosn:挪到 START_EVENT_NODE 后; + + USER_TASK(1, "审批人节点"), // TODO @jaosn:是不是这里从 10 开始好点;相当于说,0-9 给开始和结束;10-19 给各种节点;20-29 给各种条件; TODO 后面改改 + COPY_TASK(2, "抄送人节点"), + + EXCLUSIVE_GATEWAY(4, "排他网关"), // TODO @jason:是不是改成叫 条件分支? + PARALLEL_GATEWAY_FORK(5, "并行网关分叉节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? 后面是否去掉并行网关。只用包容网关 + PARALLEL_GATEWAY_JOIN(6, "并行网关聚合节点"), + INCLUSIVE_GATEWAY_FORK(7, "包容网关分叉节点"), + INCLUSIVE_GATEWAY_JOIN(8, "包容网关聚合节点"), ; public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); @@ -39,9 +36,13 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { private final Integer type; private final String name; - public static boolean isGatewayNode(Integer type) { - return Objects.equals(EXCLUSIVE_GATEWAY_NODE.getType(), type) || Objects.equals(PARALLEL_GATEWAY_FORK_NODE.getType(), type) - || Objects.equals(INCLUSIVE_GATEWAY_FORK_NODE.getType(), type) ; + /** + * 判断是否为分支节点 + * @param type 节点类型 + */ + public static boolean isBranchNode(Integer type) { + return Objects.equals(EXCLUSIVE_GATEWAY.getType(), type) || Objects.equals(PARALLEL_GATEWAY_FORK.getType(), type) + || Objects.equals(INCLUSIVE_GATEWAY_FORK.getType(), type) ; } public static BpmSimpleModelNodeType valueOf(Integer type) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 812150dc88..c514a97d7e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -1,43 +1,41 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.Assert; -import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; -import org.flowable.common.engine.impl.scripting.ScriptingEngines; import org.flowable.common.engine.impl.util.io.BytesStreamSource; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.flowable.bpmn.constants.BpmnXMLConstants.*; +import java.util.*; /** * 流程模型转操作工具类 */ public class BpmnModelUtils { - public static final String BPMN_SIMPLE_COPY_EXECUTION_SCRIPT = "#{bpmSimpleNodeService.copy(execution)}"; - public static Integer parseCandidateStrategy(FlowElement userTask) { - return NumberUtils.parseInt(userTask.getAttributeValue( + Integer candidateStrategy = NumberUtils.parseInt(userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); + // @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限 + if (candidateStrategy == null) { + ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); + candidateStrategy = NumberUtils.parseInt(Optional.ofNullable(element).map(ExtensionElement::getElementText).orElse(null)); + + } + return candidateStrategy; } public static String parseCandidateParam(FlowElement userTask) { - return userTask.getAttributeValue( + String candidateParam = userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM); + if (candidateParam == null) { + ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); + candidateParam = Optional.ofNullable(element).map(ExtensionElement::getElementText).orElse(null); + } + return candidateParam; } /** @@ -339,231 +337,4 @@ public class BpmnModelUtils { } return userTaskList; } - - // ========== TODO @jason:单独出一个 SimpleModelUtils;定位上,它是 BPMN 的精简模式 ========== - - /** - * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) - * - * @param processId 流程标识 - * @param processName 流程名称 - * @param simpleModelNode 仿钉钉流程设计模型数据结构 - * @return Bpmn Model - */ - public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { - BpmnModel bpmnModel = new BpmnModel(); - Process mainProcess = new Process(); - mainProcess.setId(processId); - mainProcess.setName(processName); - mainProcess.setExecutable(Boolean.TRUE); - bpmnModel.addProcess(mainProcess); - // 前端模型数据结构。 有 start event 节点. 没有 end event 节点。 - // 添加 FlowNode - addBpmnFlowNode(mainProcess, simpleModelNode); - // 单独添加 end event 节点 - addBpmnEndEventNode(mainProcess); - // 添加节点之间的连线 Sequence Flow - addBpmnSequenceFlow(mainProcess, simpleModelNode, BpmnModelConstants.END_EVENT_ID); - // 自动布局 - new BpmnAutoLayout(bpmnModel).execute(); - return bpmnModel; - } - - private static void addBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String endId) { - // 节点为 null 退出 - if (node == null || node.getId() == null) { - return; - } - BpmSimpleModelNodeVO childNode = node.getChildNode(); - // 如果不是网关节点、且后续节点为 null. 添加与结束节点的连线 - if (!BpmSimpleModelNodeType.isGatewayNode(node.getType()) && (childNode == null || childNode.getId() == null)) { - addBpmnSequenceFlowElement(mainProcess, node.getId(), endId, null, null); - return; - } - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); - Assert.notNull(nodeType, "模型节点类型不支持"); - // TODO @jason:建议是,addXXX 都改成 buildXXX,构建出一个什么;然后返回之后,让这个方法添加到自己的结果里; - switch (nodeType) { - case START_EVENT_NODE: - case APPROVE_USER_NODE: - case SCRIPT_TASK_NODE: - case PARALLEL_GATEWAY_JOIN_NODE: - case INCLUSIVE_GATEWAY_JOIN_NODE:{ - addBpmnSequenceFlowElement(mainProcess, node.getId(), childNode.getId(), null, null); - // 递归调用后续节点 - addBpmnSequenceFlow(mainProcess, childNode, endId); - break; - } - case PARALLEL_GATEWAY_FORK_NODE: - case EXCLUSIVE_GATEWAY_NODE: - case INCLUSIVE_GATEWAY_FORK_NODE:{ - String gateWayEndId = (childNode == null || childNode.getId() == null) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); - List conditionNodes = node.getConditionNodes(); - Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); - for (int i = 0; i < conditionNodes.size(); i++) { - BpmSimpleModelNodeVO item = conditionNodes.get(i); - BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); - if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { - addBpmnSequenceFlowElement(mainProcess, node.getId(), nextNodeOnCondition.getId(), - String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); - addBpmnSequenceFlow(mainProcess, nextNodeOnCondition, gateWayEndId); - } else { - addBpmnSequenceFlowElement(mainProcess, node.getId(), gateWayEndId, - String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); - } - } - // 递归调用后续节点 - addBpmnSequenceFlow(mainProcess, childNode, endId); - break; - } - default: { - // TODO 其它节点类型的实现 - } - } - - } - - private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String seqFlowId, String conditionExpression) { - SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); - if (StrUtil.isNotEmpty(conditionExpression)) { - sequenceFlow.setConditionExpression(conditionExpression); - } - if (StrUtil.isNotEmpty(seqFlowId)) { - sequenceFlow.setId(seqFlowId); - } - mainProcess.addFlowElement(sequenceFlow); - } - - private static void addBpmnFlowNode(Process mainProcess, BpmSimpleModelNodeVO simpleModelNode) { - // 节点为 null 退出 - if (simpleModelNode == null || simpleModelNode.getId() == null) { - return; - } - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); - Assert.notNull(nodeType, "模型节点类型不支持"); - switch (nodeType) { - case START_EVENT_NODE: - addBpmnStartEventNode(mainProcess, simpleModelNode); - break; - case APPROVE_USER_NODE: - addBpmnUserTaskNode(mainProcess, simpleModelNode); - break; - case SCRIPT_TASK_NODE: - addBpmnScriptTaSskNode(mainProcess, simpleModelNode); - break; - case EXCLUSIVE_GATEWAY_NODE: - addBpmnExclusiveGatewayNode(mainProcess, simpleModelNode); - break; - case PARALLEL_GATEWAY_FORK_NODE: - case PARALLEL_GATEWAY_JOIN_NODE: - addBpmnParallelGatewayNode(mainProcess, simpleModelNode); - break; - case INCLUSIVE_GATEWAY_FORK_NODE: - addBpmnInclusiveGatewayNode(mainProcess, simpleModelNode, Boolean.TRUE); - break; - case INCLUSIVE_GATEWAY_JOIN_NODE: - addBpmnInclusiveGatewayNode(mainProcess, simpleModelNode, Boolean.FALSE); - break; - default: { - // TODO 其它节点类型的实现 - } - } - - // 如果不是网关类型的接口, 并且chileNode为空退出 - if (!BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { - return; - } - - // 如果是网关类型接口. 递归添加条件节点 - if (BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { - for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { - addBpmnFlowNode(mainProcess, node.getChildNode()); - } - } - - // chileNode不为空,递归添加子节点 - if (simpleModelNode.getChildNode() != null) { - addBpmnFlowNode(mainProcess, simpleModelNode.getChildNode()); - } - } - - private static void addBpmnParallelGatewayNode(Process mainProcess, BpmSimpleModelNodeVO node) { - ParallelGateway parallelGateway = new ParallelGateway(); - parallelGateway.setId(node.getId()); - mainProcess.addFlowElement(parallelGateway); - } - - private static void addBpmnScriptTaSskNode(Process mainProcess, BpmSimpleModelNodeVO node) { - ScriptTask scriptTask = new ScriptTask(); - scriptTask.setId(node.getId()); - scriptTask.setName(node.getName()); - // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; - scriptTask.setScriptFormat(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE); - scriptTask.setScript(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); - // 添加自定义属性 - // TODO @jason:可以使用 ServiceTask 搞 ExtensionAttribute 么? - addExtensionAttributes(node, scriptTask); - mainProcess.addFlowElement(scriptTask); - } - - private static void addExtensionAttributes(BpmSimpleModelNodeVO node, FlowElement flowElement) { - Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); - addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, - candidateStrategy == null ? null : String.valueOf(candidateStrategy)); - addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, - MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); - } - - private static void addBpmnExclusiveGatewayNode(Process mainProcess, BpmSimpleModelNodeVO node) { - Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); - ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); - exclusiveGateway.setId(node.getId()); - // 网关的最后一个条件为 网关的 default sequence flow - exclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); - mainProcess.addFlowElement(exclusiveGateway); - } - - private static void addBpmnInclusiveGatewayNode(Process mainProcess, BpmSimpleModelNodeVO node, Boolean isFork) { - InclusiveGateway inclusiveGateway = new InclusiveGateway(); - inclusiveGateway.setId(node.getId()); - if (isFork) { - Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); - // 网关的最后一个条件为 网关的 default sequence flow - inclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); - } - mainProcess.addFlowElement(inclusiveGateway); - } - - private static void addBpmnEndEventNode(Process mainProcess) { - EndEvent endEvent = new EndEvent(); - endEvent.setId(BpmnModelConstants.END_EVENT_ID); - endEvent.setName("结束"); - mainProcess.addFlowElement(endEvent); - } - - private static void addBpmnUserTaskNode(Process mainProcess, BpmSimpleModelNodeVO node) { - UserTask userTask = new UserTask(); - userTask.setId(node.getId()); - userTask.setName(node.getName()); - addExtensionAttributes(node, userTask); - mainProcess.addFlowElement(userTask); - } - - private static void addExtensionAttributes(FlowElement element, String namespace, String name, String value) { - if (value == null) { - return; - } - ExtensionAttribute extensionAttribute = new ExtensionAttribute(name, value); - extensionAttribute.setNamespace(namespace); - extensionAttribute.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); - element.addAttribute(extensionAttribute); - } - - private static void addBpmnStartEventNode(Process mainProcess, BpmSimpleModelNodeVO node) { - StartEvent startEvent = new StartEvent(); - startEvent.setId(node.getId()); - startEvent.setName(node.getName()); - mainProcess.addFlowElement(startEvent); - } - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java new file mode 100644 index 0000000000..dbf7d64732 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -0,0 +1,270 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; + +import cn.hutool.core.lang.Assert; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import org.flowable.bpmn.BpmnAutoLayout; +import org.flowable.bpmn.model.*; +import org.flowable.bpmn.model.Process; + +import java.util.List; + +import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; +import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX; + +/** + * 仿钉钉快搭模型相关的工具方法 + * + * @author jason + */ +public class SimpleModelUtils { + + public static final String BPMN_SIMPLE_COPY_EXECUTION_SCRIPT = "#{bpmSimpleNodeService.copy(execution)}"; + + /** + * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) + * + * @param processId 流程标识 + * @param processName 流程名称 + * @param simpleModelNode 仿钉钉流程设计模型数据结构 + * @return Bpmn Model + */ + public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { + BpmnModel bpmnModel = new BpmnModel(); + Process mainProcess = new Process(); + mainProcess.setId(processId); + mainProcess.setName(processName); + mainProcess.setExecutable(Boolean.TRUE); + bpmnModel.addProcess(mainProcess); + // 前端模型数据结构。 有 start event 节点. 没有 end event 节点。 + // 从 SimpleModel 构建 FlowNode 并添加到 Main Process + buildAndAddBpmnFlowNode(simpleModelNode, mainProcess); + // 单独构建 end event 节点 + buildAndAddBpmnEndEvent(mainProcess); + // 构建并添加节点之间的连线 Sequence Flow + buildAndAddBpmnSequenceFlow(mainProcess, simpleModelNode, BpmnModelConstants.END_EVENT_ID); + // 自动布局 + new BpmnAutoLayout(bpmnModel).execute(); + return bpmnModel; + } + + private static void buildAndAddBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String targetId) { + // 节点为 null 退出 + if (node == null || node.getId() == null) { + return; + } + BpmSimpleModelNodeVO childNode = node.getChildNode(); + // 如果不是网关节点、且后续节点为 null. 添加与结束节点的连线 + if (!BpmSimpleModelNodeType.isBranchNode(node.getType()) && (childNode == null || childNode.getId() == null)) { + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetId, null, null); + mainProcess.addFlowElement(sequenceFlow); + return; + } + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); + Assert.notNull(nodeType, "模型节点类型不支持"); + switch (nodeType) { + case START_EVENT: + case USER_TASK: + case COPY_TASK: + case PARALLEL_GATEWAY_JOIN: + case INCLUSIVE_GATEWAY_JOIN:{ + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null); + mainProcess.addFlowElement(sequenceFlow); + // 递归调用后续节点 + buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); + break; + } + case PARALLEL_GATEWAY_FORK: + case EXCLUSIVE_GATEWAY: + case INCLUSIVE_GATEWAY_FORK:{ + String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); + List conditionNodes = node.getConditionNodes(); + Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); + for (int i = 0; i < conditionNodes.size(); i++) { + BpmSimpleModelNodeVO item = conditionNodes.get(i); + BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); + if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), + String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); + mainProcess.addFlowElement(sequenceFlow); + // 递归调用后续节点 + buildAndAddBpmnSequenceFlow(mainProcess, nextNodeOnCondition, sequenceFlowTargetId); + } else { + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), sequenceFlowTargetId, + String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); + mainProcess.addFlowElement(sequenceFlow); + } + } + // 递归调用后续节点 + buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); + break; + } + default: { + // TODO 其它节点类型的实现 + } + } + + } + + private static SequenceFlow buildBpmnSequenceFlow(String sourceId, String targetId, String seqFlowId, String conditionExpression) { + SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); + if (StrUtil.isNotEmpty(conditionExpression)) { + sequenceFlow.setConditionExpression(conditionExpression); + } + if (StrUtil.isNotEmpty(seqFlowId)) { + sequenceFlow.setId(seqFlowId); + } + return sequenceFlow; + } + + private static void buildAndAddBpmnFlowNode(BpmSimpleModelNodeVO simpleModelNode, Process mainProcess) { + // 节点为 null 退出 + if (simpleModelNode == null || simpleModelNode.getId() == null) { + return; + } + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); + Assert.notNull(nodeType, "模型节点类型不支持"); + switch (nodeType) { + case START_EVENT: { + StartEvent startEvent = buildBpmnStartEvent(simpleModelNode); + mainProcess.addFlowElement(startEvent); + break; + } + case USER_TASK: { + UserTask userTask = buildBpmnUserTask(simpleModelNode); + mainProcess.addFlowElement(userTask); + break; + } + case COPY_TASK: { + ServiceTask serviceTask = buildBpmnServiceTask(simpleModelNode); + mainProcess.addFlowElement(serviceTask); + break; + } + case EXCLUSIVE_GATEWAY: { + ExclusiveGateway exclusiveGateway = buildBpmnExclusiveGateway(simpleModelNode); + mainProcess.addFlowElement(exclusiveGateway); + break; + } + case PARALLEL_GATEWAY_FORK: + case PARALLEL_GATEWAY_JOIN: { + ParallelGateway parallelGateway = buildBpmnParallelGateway(simpleModelNode); + mainProcess.addFlowElement(parallelGateway); + break; + } + case INCLUSIVE_GATEWAY_FORK: { + InclusiveGateway inclusiveGateway = buildBpmnInclusiveGateway(simpleModelNode, Boolean.TRUE); + mainProcess.addFlowElement(inclusiveGateway); + break; + } + case INCLUSIVE_GATEWAY_JOIN: { + InclusiveGateway inclusiveGateway = buildBpmnInclusiveGateway(simpleModelNode, Boolean.FALSE); + mainProcess.addFlowElement(inclusiveGateway); + break; + } + default: { + // TODO 其它节点类型的实现 + } + } + + // 如果不是网关类型的接口, 并且chileNode为空退出 + if (!BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { + return; + } + + // 如果是网关类型接口. 递归添加条件节点 + if (BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { + for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { + buildAndAddBpmnFlowNode(node.getChildNode(), mainProcess); + } + } + + // chileNode不为空,递归添加子节点 + if (simpleModelNode.getChildNode() != null) { + buildAndAddBpmnFlowNode(simpleModelNode.getChildNode(), mainProcess); + } + } + + private static ParallelGateway buildBpmnParallelGateway(BpmSimpleModelNodeVO node) { + ParallelGateway parallelGateway = new ParallelGateway(); + parallelGateway.setId(node.getId()); + return parallelGateway; + } + + private static ServiceTask buildBpmnServiceTask(BpmSimpleModelNodeVO node) { + ServiceTask serviceTask = new ServiceTask(); + serviceTask.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION); + serviceTask.setImplementation(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); + serviceTask.setId(node.getId()); + serviceTask.setName(node.getName()); + // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; + // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners + addExtensionElement(node, serviceTask); + return serviceTask; + } + + private static void addExtensionElement(BpmSimpleModelNodeVO node, FlowElement flowElement) { + Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); + addExtensionElement(flowElement, FLOWABLE_EXTENSIONS_NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, + candidateStrategy == null ? null : String.valueOf(candidateStrategy)); + addExtensionElement(flowElement, FLOWABLE_EXTENSIONS_NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, + MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); + } + + private static ExclusiveGateway buildBpmnExclusiveGateway(BpmSimpleModelNodeVO node) { + Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); + ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); + exclusiveGateway.setId(node.getId()); + // 网关的最后一个条件为 网关的 default sequence flow + exclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); + return exclusiveGateway; + } + + private static InclusiveGateway buildBpmnInclusiveGateway(BpmSimpleModelNodeVO node, Boolean isFork) { + InclusiveGateway inclusiveGateway = new InclusiveGateway(); + inclusiveGateway.setId(node.getId()); + if (isFork) { + Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); + // 网关的最后一个条件为 网关的 default sequence flow + inclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); + } + return inclusiveGateway; + } + + private static void buildAndAddBpmnEndEvent(Process mainProcess) { + EndEvent endEvent = new EndEvent(); + endEvent.setId(BpmnModelConstants.END_EVENT_ID); + endEvent.setName("结束"); + mainProcess.addFlowElement(endEvent); + } + + private static UserTask buildBpmnUserTask(BpmSimpleModelNodeVO node) { + UserTask userTask = new UserTask(); + userTask.setId(node.getId()); + userTask.setName(node.getName()); + addExtensionElement(node, userTask); + return userTask; + } + + private static void addExtensionElement(FlowElement element, String namespace, String name, String value) { + if (value == null) { + return; + } + ExtensionElement extensionElement = new ExtensionElement(); + extensionElement.setNamespace(namespace); + extensionElement.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); + extensionElement.setElementText(value); + extensionElement.setName(name); + element.addExtensionElement(extensionElement); + } + + private static StartEvent buildBpmnStartEvent(BpmSimpleModelNodeVO node) { + StartEvent startEvent = new StartEvent(); + startEvent.setId(node.getId()); + startEvent.setName(node.getName()); + return startEvent; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java index 9cd03be3c2..53af051dc4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java @@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimp import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.SimpleModelUtils; import jakarta.annotation.Resource; import org.flowable.bpmn.model.*; import org.flowable.engine.repository.Model; @@ -22,7 +23,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.START_EVENT_NODE; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.START_EVENT; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_PARAM; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY; @@ -56,7 +57,7 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { // return Boolean.FALSE; // } // 1. JSON 转换成 bpmnModel - BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + BpmnModel bpmnModel = SimpleModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); // 2.1 保存 Bpmn XML bpmModelService.saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); // 2.2 保存 JSON 数据 @@ -93,7 +94,7 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { return null; } BpmSimpleModelNodeVO rootNode = new BpmSimpleModelNodeVO(); - rootNode.setType(START_EVENT_NODE.getType()); + rootNode.setType(START_EVENT.getType()); rootNode.setId(startEvent.getId()); rootNode.setName(startEvent.getName()); recursiveBuildSimpleModelNode(startEvent, rootNode); @@ -105,10 +106,10 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { Assert.notNull(nodeType, "节点类型不支持"); // 校验节点是否支持转仿钉钉的流程模型 List outgoingFlows = validateCanConvertSimpleNode(nodeType, currentFlowNode); - if (CollUtil.isEmpty(outgoingFlows) || outgoingFlows.get(0).getTargetFlowElement() == null) { + if (CollUtil.isEmpty(outgoingFlows) || CollUtil.getFirst(outgoingFlows).getTargetFlowElement() == null) { return; } - FlowElement targetElement = outgoingFlows.get(0).getTargetFlowElement(); + FlowElement targetElement = CollUtil.getFirst(outgoingFlows).getTargetFlowElement(); // 如果是 EndEvent 直接退出 if (targetElement instanceof EndEvent) { return; @@ -123,7 +124,7 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { private BpmSimpleModelNodeVO convertUserTaskToSimpleModelNode(UserTask userTask) { BpmSimpleModelNodeVO simpleModelNodeVO = new BpmSimpleModelNodeVO(); - simpleModelNodeVO.setType(BpmSimpleModelNodeType.APPROVE_USER_NODE.getType()); + simpleModelNodeVO.setType(BpmSimpleModelNodeType.USER_TASK.getType()); simpleModelNodeVO.setName(userTask.getName()); simpleModelNodeVO.setId(userTask.getId()); Map attributes = MapUtil.newHashMap(); @@ -137,13 +138,13 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { private List validateCanConvertSimpleNode(BpmSimpleModelNodeType nodeType, FlowNode currentFlowNode) { switch (nodeType) { - case START_EVENT_NODE: - case APPROVE_USER_NODE: { + case START_EVENT: + case USER_TASK: { List outgoingFlows = currentFlowNode.getOutgoingFlows(); if (CollUtil.isNotEmpty(outgoingFlows) && outgoingFlows.size() > 1) { throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); } - validIsSupportFlowNode(outgoingFlows.get(0).getTargetFlowElement()); + validIsSupportFlowNode(CollUtil.getFirst(outgoingFlows).getTargetFlowElement()); return outgoingFlows; } default: { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index 506fc89195..e4d66f8c43 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -47,7 +47,7 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy // TODO @芋艿:这里多加了一个 name; @Override public void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName) { - // 1.1 校验任务存在 暂时去掉这个校验. 因为任务可能仿钉钉快搭的抄送节点(ScriptTask) TODO jason:抄送节点,会没有来源的 taskId 么? + // 1.1 校验任务存在 暂时去掉这个校验. 因为任务可能仿钉钉快搭的抄送节点(ScriptTask) TODO jason:抄送节点,会没有来源的 taskId 么? @芋艿 是否校验一下 传递进来的 id 不为空就行 // Task task = taskService.getTask(taskId); // if (ObjectUtil.isNull(task)) { // throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java index 06e1f6342b..b0233e03e7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java @@ -9,7 +9,8 @@ import org.springframework.stereotype.Service; import java.util.Set; /** - * 仿钉钉快搭各个节点 Service TODO @jason:注释要有空行哈; + * 仿钉钉快搭各个节点 Service + * * @author jason */ @Service @@ -21,7 +22,8 @@ public class BpmSimpleNodeService { private BpmProcessInstanceCopyService processInstanceCopyService; /** - * 仿钉钉快搭抄送 TODO @jason:注释要有空行哈; + * 仿钉钉快搭抄送 + * * @param execution 执行的任务(ScriptTask) */ public Boolean copy(DelegateExecution execution) { -- Gitee From 4267686d7b87f55acb6dda827fe5447ef9b2ca45 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:50:14 +0800 Subject: [PATCH 0222/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20message=20DO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/dataobject/AiChatMessage.java | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java new file mode 100644 index 0000000000..e4968b91be --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.ai.dataobject; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * ai 聊天 message + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatMessage { + + /** + * 编号,作为每条聊天记录的唯一标识符 + */ + private Long id; + + /** + * 聊天ID,关联到特定的会话或对话 + */ + private Long chatId; + + /** + * 角色ID,用于标识发送消息的用户或系统的身份 + */ + private String userId; + + /** + * 消息具体内容,存储用户的发言或者系统响应的文字信息 + */ + private String message; + + /** + * 消息类型,枚举值可能包括'system'(系统消息)、'user'(用户消息)和'assistant'(助手消息) + */ + private Double messageType; + + /** + * 在生成消息时采用的Top-K采样大小, + * 表示模型生成回复时考虑的候选项集合的大小 + */ + private Double topK; + + /** + * Top-P核采样方法的概率阈值, + * 在语言模型生成过程中控制采样的过滤标准 + */ + private Double topP; + + /** + * 温度参数,用于调整生成回复的随机性和多样性程度, + * 较低的温度值会使输出更收敛于高频词汇,较高的则增加多样性 + */ + private Double temperature; + + /** + * 创建该记录的操作员ID + */ + private Long createdBy; + + /** + * 记录创建的时间戳 + */ + private Date createdTime; + + /** + * 最后更新该记录的操作员ID + */ + private Long updatedBy; + + /** + * 记录最后更新的时间戳 + */ + private Date updatedTime; +} -- Gitee From 632b21991da902275b806aaa5baa99720b211903 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:50:25 +0800 Subject: [PATCH 0223/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20chat=20role=20DO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/dataobject/AiChatRole.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java new file mode 100644 index 0000000000..04ebfe0cf4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.ai.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * ai 聊天角色 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatRole extends BaseDO { + /** + * 编号,表示聊天角色在数据库中的唯一标识符 + */ + private Long id; + + /** + * 用户ID,关联到使用该聊天角色的用户 + */ + private Long userId; + + /** + * 模型编号,关联到角色使用的特定模型 + */ + private String modelId; + + /** + * 角色名,角色的显示名称 + */ + private String roleName; + + /** + * 角色介绍,详细描述角色的功能或用途 + */ + private String roleIntroduce; + + /** + * 角色来源,如 system(系统预置)、customer(用户自定义) + */ + private String roleSource; + + /** + * 分类,角色所属的类别,如娱乐、创作等 + */ + private String classify; + + /** + * 发布状态,0表示仅自己可见,1表示公开,2表示禁用 + */ + private String visibility; + + /** + * 生成时的Top-K采样候选集大小 + */ + private Double topK; + + /** + * 生成时使用的核采样方法的概率阈值 + */ + private Double topP; + + /** + * 用于控制随机性和多样性的温度参数 + */ + private Double temperature; + + /** + * 角色的使用次数统计 + */ + private Integer useCount; + +} -- Gitee From c273da8934fe046b0d1156037ed6bd0316c55243 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:50:44 +0800 Subject: [PATCH 0224/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20chat.sql(?= =?UTF-8?q?=E5=8F=AA=E4=BD=9C=E4=B8=BA=E5=8F=82=E8=80=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/chat.sql | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql new file mode 100644 index 0000000000..e06f3e9bc2 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql @@ -0,0 +1,79 @@ +DROP TABLE IF EXISTS chat_role; +CREATE TABLE chat_role( + `id` bigint COMMENT '编号' , + `user_id` bigint COMMENT '用户id' , + `model_id` VARCHAR(255) COMMENT '模型编号' , + `role_name` VARCHAR(32) COMMENT '角色名' , + `role_introduce` VARCHAR(255) COMMENT '介绍' , + `role_source` VARCHAR(32) COMMENT '角色来源(system、customer)' , + `classify` VARCHAR(32) COMMENT '分类(娱乐、创作)' , + `publish` tinyint COMMENT '发布(0、自己可见 1、公开 2、禁用)' , + `top_k` DECIMAL(4,2) COMMENT '生成时,采样候选集的大小' , + `top_p` DECIMAL(24,6) COMMENT '生成时,核采样方法的概率阈值。' , + `temperature` DECIMAL(24,6) COMMENT '用于控制随机性和多样性的程度' , + `use_count` INT COMMENT '使用次数' , + `CREATED_BY` bigint COMMENT '创建人' , + `CREATED_TIME` DATETIME COMMENT '创建时间' , + `UPDATED_BY` bigint COMMENT '更新人' , + `UPDATED_TIME` DATETIME COMMENT '更新时间' +) COMMENT = 'chat角色;'; + +DROP TABLE IF EXISTS chat_history; +CREATE TABLE chat_history( + `id` bigint COMMENT '编号' , + `chat_id` bigint COMMENT '聊天id' , + `user_id` VARCHAR(32) COMMENT '角色名' , + `message` TEXT COMMENT '消息' , + `message_type` DECIMAL(4,2) COMMENT 'system、user、assistant' , + `top_k` DECIMAL(4,2) COMMENT '生成时,采样候选集的大小' , + `top_p` DECIMAL(24,6) COMMENT '生成时,核采样方法的概率阈值。' , + `temperature` DECIMAL(24,6) COMMENT '用于控制随机性和多样性的程度' , + `CREATED_BY` bigint COMMENT '创建人' , + `CREATED_TIME` DATETIME COMMENT '创建时间' , + `UPDATED_BY` bigint COMMENT '更新人' , + `UPDATED_TIME` DATETIME COMMENT '更新时间' +) COMMENT = '聊天记录;'; + +DROP TABLE IF EXISTS user; +CREATE TABLE user( + `id` bigint COMMENT '编号' , + `username` VARCHAR(32) COMMENT '用户名' , + `nickname` VARCHAR(32) COMMENT '昵称' , + `mobile` VARCHAR(32) COMMENT '手机号' , + `avatar_url` VARCHAR(128) COMMENT '头像' , + `password` VARCHAR(32) COMMENT '密码' , + `publish` tinyint COMMENT '发布(0、未发布 1、已发布)' , + `disable` VARCHAR(255) COMMENT '禁用(0、正常 1、禁用)' , + `CREATED_BY` bigint COMMENT '创建人' , + `CREATED_TIME` DATETIME COMMENT '创建时间' , + `UPDATED_BY` bigint COMMENT '更新人' , + `UPDATED_TIME` DATETIME COMMENT '更新时间' +) COMMENT = '用户;'; + +DROP TABLE IF EXISTS chat; +CREATE TABLE chat( + `id` bigint COMMENT '编号' , + `user_id` bigint COMMENT '用户id' , + `chat_role_id` VARCHAR(255) COMMENT '模型id' , + `chat_title` VARCHAR(128) COMMENT '聊天标题' , + `chat_count` INT COMMENT '聊天次数' , + `CREATED_BY` bigint COMMENT '创建人' , + `CREATED_TIME` DATETIME COMMENT '创建时间' , + `UPDATED_BY` bigint COMMENT '更人' , + `UPDATED_TIME` DATETIME COMMENT '更新时间' +) COMMENT = '聊天;'; + +DROP TABLE IF EXISTS chat_model; +CREATE TABLE chat_model( + `id` bigint COMMENT '编号' , + `model_name` bigint COMMENT '模型名字' , + `model_type` VARCHAR(32) COMMENT '模型类型(qianwen、yiyan、xinghuo、openai)' , + `model_config` TEXT(128) COMMENT '模型配置JSON' , + `model_image` VARCHAR(255) COMMENT '模型图片' , + `disable` tinyint COMMENT '禁用 0、正常 1、禁用' , + `CREATED_BY` bigint COMMENT '创建人' , + `CREATED_TIME` DATETIME COMMENT '创建时间' , + `UPDATED_BY` bigint COMMENT '更新人' , + `UPDATED_TIME` DATETIME COMMENT '更新时间' +) COMMENT = '聊天模型;'; + -- Gitee From d494c313025b42d027acc901e8fdd9f7bb3c40a7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:51:09 +0800 Subject: [PATCH 0225/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20chat.sql(?= =?UTF-8?q?=E5=8F=AA=E4=BD=9C=E4=B8=BA=E5=8F=82=E8=80=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index 0281c9ece0..2646412965 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -31,13 +31,12 @@ - org.springframework.ai - spring-ai-openai-spring-boot-starter + cn.iocoder.boot + yudao-spring-boot-starter-security - cn.iocoder.boot - yudao-spring-boot-starter-security + yudao-spring-boot-starter-mybatis -- Gitee From 238ef898263c0bb72cea2e0e4c7090bdbfae413e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:51:30 +0800 Subject: [PATCH 0226/1557] =?UTF-8?q?=E5=AE=9A=E4=B9=89=20message=20?= =?UTF-8?q?=E5=92=8C=20role=20mapper=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/mapper/AiChatMessageMapper.java | 17 +++++++++++++++++ .../module/ai/mapper/AiChatRoleMapper.java | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java new file mode 100644 index 0000000000..91526ab79c --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.ai.mapper; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.ai.dataobject.AiChatMessage; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * message mapper + * + * @fansili + * @since v1.0 + */ +@Repository +@Mapper +public interface AiChatMessageMapper extends BaseMapperX { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java new file mode 100644 index 0000000000..09a662fe70 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.ai.mapper; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.ai.dataobject.AiChatRole; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * role mapper + * + * @fansili + * @since v1.0 + */ +@Repository +@Mapper +public interface AiChatRoleMapper extends BaseMapperX { +} -- Gitee From 1ea94d9245c33e4f21bcbbf8511375836df980df Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:51:54 +0800 Subject: [PATCH 0227/1557] =?UTF-8?q?=E6=B3=A8=E9=87=8A=20chat=20controlle?= =?UTF-8?q?r=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=B2=A1=E7=94=A8=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/ChatController.java | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java index e9f8ab6b5f..49fae6b623 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -1,77 +1,77 @@ -package cn.iocoder.yudao.module.ai.controller.admin; - -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; -import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletResponse; -import lombok.extern.slf4j.Slf4j; -import org.springframework.ai.chat.ChatClient; -import org.springframework.ai.chat.ChatResponse; -import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.openai.OpenAiChatClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Flux; - -import java.util.function.Consumer; - -// TODO done @fansili:有了 swagger 注释,就不用类注释了 -@Tag(name = "AI模块") -@RestController -@RequestMapping("/ai-api") -@Slf4j -public class ChatController { - - @Autowired - private ApplicationContext applicationContext; - - @PostMapping("/chat") - @Operation(summary = "对话聊天", description = "简单的ai聊天") - public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { - ChatClient chatClient = getChatClient(reqVO.getAiModel()); - String res; - try { - res = chatClient.call(reqVO.getPrompt()); - } catch (Exception e) { - res = e.getMessage(); - } - return CommonResult.success(res); - } - - @PostMapping("/chatStream") - @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") - public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { - OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); - Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); - chatResponse.subscribe(new Consumer() { - @Override - public void accept(ChatResponse chatResponse) { - System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); - } - }); - return CommonResult.success(null); - } - - /** - * 根据 ai模型 获取对于的 模型实现类 - * - * @param aiModelEnum - * @return - */ - private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { - if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { - return applicationContext.getBean(OpenAiChatClient.class); - } - // AI模型暂不支持 - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); - } -} +//package cn.iocoder.yudao.module.ai.controller.admin; +// +//import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +//import cn.iocoder.yudao.framework.common.pojo.CommonResult; +//import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +//import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; +//import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; +//import io.swagger.v3.oas.annotations.Operation; +//import io.swagger.v3.oas.annotations.tags.Tag; +//import jakarta.servlet.http.HttpServletResponse; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.ai.chat.ChatClient; +//import org.springframework.ai.chat.ChatResponse; +//import org.springframework.ai.chat.prompt.Prompt; +//import org.springframework.ai.openai.OpenAiChatClient; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.ApplicationContext; +//import org.springframework.validation.annotation.Validated; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import reactor.core.publisher.Flux; +// +//import java.util.function.Consumer; +// +//// TODO done @fansili:有了 swagger 注释,就不用类注释了 +//@Tag(name = "AI模块") +//@RestController +//@RequestMapping("/ai-api") +//@Slf4j +//public class ChatController { +// +// @Autowired +// private ApplicationContext applicationContext; +// +// @PostMapping("/chat") +// @Operation(summary = "对话聊天", description = "简单的ai聊天") +// public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { +// ChatClient chatClient = getChatClient(reqVO.getAiModel()); +// String res; +// try { +// res = chatClient.call(reqVO.getPrompt()); +// } catch (Exception e) { +// res = e.getMessage(); +// } +// return CommonResult.success(res); +// } +// +// @PostMapping("/chatStream") +// @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") +// public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { +// OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); +// Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); +// chatResponse.subscribe(new Consumer() { +// @Override +// public void accept(ChatResponse chatResponse) { +// System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); +// } +// }); +// return CommonResult.success(null); +// } +// +// /** +// * 根据 ai模型 获取对于的 模型实现类 +// * +// * @param aiModelEnum +// * @return +// */ +// private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { +// if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { +// return applicationContext.getBean(OpenAiChatClient.class); +// } +// // AI模型暂不支持 +// throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); +// } +//} -- Gitee From 687eef95b64d27a5582d6de4aa7d9febea573233 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:52:14 +0800 Subject: [PATCH 0228/1557] =?UTF-8?q?=E5=AE=9A=E4=B9=89chat=20role=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/AiChatRoleController.java | 57 +++++++++++++++++++ .../ai/controller/app/vo/ChatRoleAddReq.java | 20 +++++++ .../ai/controller/app/vo/ChatRoleListReq.java | 20 +++++++ .../ai/controller/app/vo/ChatRoleListRes.java | 15 +++++ .../controller/app/vo/ChatRoleUpdateReq.java | 20 +++++++ .../app/vo/ChatRoleUpdateVisibilityReq.java | 20 +++++++ .../module/ai/service/ChatRoleService.java | 52 +++++++++++++++++ .../ai/service/ChatRoleServiceImpl.java | 45 +++++++++++++++ 8 files changed, 249 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java new file mode 100644 index 0000000000..7103e37023 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.ai.controller.app; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.vo.*; +import cn.iocoder.yudao.module.ai.service.ChatRoleService; +import io.swagger.v3.oas.annotations.Operation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * ai chat 角色 + * + * @fansili + * @since v1.0 + */ +@RestController +@RequestMapping("/chat-role") +@AllArgsConstructor +public class AiChatRoleController { + + private final ChatRoleService chatRoleService; + + @Operation(summary = "chat角色 - 角色列表") + @GetMapping("/list") + public CommonResult list(@Validated @ModelAttribute ChatRoleListReq req) { + return chatRoleService.list(req); + } + + @Operation(summary = "chat角色 - 添加") + @PutMapping("/add") + public CommonResult add(@Validated @RequestBody ChatRoleAddReq req) { + chatRoleService.add(req); + return CommonResult.success(null); + } + + @Operation(summary = "chat角色 - 修改") + @PostMapping("/update") + public CommonResult update(@Validated @RequestBody ChatRoleUpdateReq req) { + chatRoleService.update(req); + return CommonResult.success(null); + } + + @Operation(summary = "chat角色 - 修改可见性") + @PostMapping("/update-visibility") + public CommonResult updateVisibility(@Validated @RequestBody ChatRoleUpdateVisibilityReq req) { + chatRoleService.updateVisibility(req); + return CommonResult.success(null); + } + + @Operation(summary = "chat角色 - 修改可见性") + @DeleteMapping("/delete") + public CommonResult delete(@RequestParam("chatRoleId") Long chatRoleId) { + chatRoleService.delete(chatRoleId); + return CommonResult.success(null); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java new file mode 100644 index 0000000000..b3957fafdb --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.controller.app.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色列表 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class ChatRoleAddReq extends PageParam { + + @Schema(description = "查询") + private String search; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java new file mode 100644 index 0000000000..355f00cf6f --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.controller.app.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色列表 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class ChatRoleListReq extends PageParam { + + @Schema(description = "查询") + private String search; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java new file mode 100644 index 0000000000..d788e78767 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.module.ai.controller.app.vo; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色列表 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class ChatRoleListRes { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java new file mode 100644 index 0000000000..f5a8948814 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.controller.app.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色 - 更新 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class ChatRoleUpdateReq extends PageParam { + + @Schema(description = "查询") + private String search; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java new file mode 100644 index 0000000000..bd1836b5eb --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.controller.app.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色 - 修改可见性 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class ChatRoleUpdateVisibilityReq extends PageParam { + + @Schema(description = "查询") + private String search; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java new file mode 100644 index 0000000000..725ce77797 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.ai.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.vo.*; + +/** + * chat 角色 + * + * @fansili + * @since v1.0 + */ +public interface ChatRoleService { + + /** + * 获取聊天角色列表 + * + * @param req + * @return + */ + CommonResult list(ChatRoleListReq req); + + /** + * chat角色 - 添加 + * + * @param req + * @return + */ + ChatRoleListRes add(ChatRoleAddReq req); + + /** + * chat角色 - 修改 + * + * @param req + */ + void update(ChatRoleUpdateReq req); + + + /** + * chat角色 - 修改可见性 + * + * @param req + */ + void updateVisibility(ChatRoleUpdateVisibilityReq req); + + /** + * chat角色 - 删除 + * + * @param chatRoleId + */ + void delete(Long chatRoleId); + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java new file mode 100644 index 0000000000..7b930218a7 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.ai.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.vo.*; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * chat 角色 + * + * @fansili + * @since v1.0 + */ +@Service +@AllArgsConstructor +@Slf4j +public class ChatRoleServiceImpl implements ChatRoleService { + + + @Override + public CommonResult list(ChatRoleListReq req) { + return null; + } + + @Override + public ChatRoleListRes add(ChatRoleAddReq req) { + return null; + } + + @Override + public void update(ChatRoleUpdateReq req) { + + } + + @Override + public void updateVisibility(ChatRoleUpdateVisibilityReq req) { + + } + + @Override + public void delete(Long chatRoleId) { + + } +} -- Gitee From d60cfcd54bc9580d5a7bd663854936c6e2a600f6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Apr 2024 21:52:32 +0800 Subject: [PATCH 0229/1557] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=20package=20-=20in?= =?UTF-8?q?fo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/{ => service}/package-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => service}/package-info.java (54%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java similarity index 54% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java index 6fa1f167a0..671d5534fd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/package-info.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java @@ -2,4 +2,4 @@ * author: fansili * time: 2024/3/3 18:14 */ -package cn.iocoder.yudao.module.ai; \ No newline at end of file +package cn.iocoder.yudao.module.ai.service; \ No newline at end of file -- Gitee From cc50891632d91a84c9eacf2a540af01fe94594c2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 11 Apr 2024 22:43:37 +0800 Subject: [PATCH 0230/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91R?= =?UTF-8?q?ateLimiter=20=E9=99=90=E6=B5=81=E5=99=A8=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=85=A8=E5=B1=80=E3=80=81=E7=94=A8=E6=88=B7=E3=80=81?= =?UTF-8?q?IP=20=E7=AD=89=E7=BA=A7=E5=88=AB=E7=9A=84=E9=99=90=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +- .../pom.xml | 2 +- .../idempotent/core/aop/IdempotentAspect.java | 4 +- .../config/YudaoRateLimiterConfiguration.java | 55 ++++++++++++++++ .../core/annotation/RateLimiter.java | 62 ++++++++++++++++++ .../core/aop/RateLimiterAspect.java | 60 +++++++++++++++++ .../keyresolver/RateLimiterKeyResolver.java | 22 +++++++ .../impl/ClientIpRateLimiterKeyResolver.java | 27 ++++++++ .../impl/DefaultRateLimiterKeyResolver.java | 25 ++++++++ .../ExpressionRateLimiterKeyResolver.java | 64 +++++++++++++++++++ .../ServerNodeRateLimiterKeyResolver.java | 27 ++++++++ .../impl/UserRateLimiterKeyResolver.java | 28 ++++++++ .../core/redis/RateLimiterRedisDAO.java | 60 +++++++++++++++++ .../framework/ratelimiter/package-info.java | 4 ++ ...ot.autoconfigure.AutoConfiguration.imports | 3 +- 15 files changed, 440 insertions(+), 8 deletions(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/config/YudaoRateLimiterConfiguration.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/annotation/RateLimiter.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/aop/RateLimiterAspect.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/RateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ClientIpRateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/DefaultRateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ExpressionRateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ServerNodeRateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/UserRateLimiterKeyResolver.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/redis/RateLimiterRedisDAO.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/package-info.java diff --git a/README.md b/README.md index 4787c4d4f0..cf023ea79f 100644 --- a/README.md +++ b/README.md @@ -207,9 +207,7 @@ | 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 | | 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 | | 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 | -| 🚀 | 分布式锁 | 基于 Redis 实现分布式锁,满足并发场景 | -| 🚀 | 幂等组件 | 基于 Redis 实现幂等组件,解决重复请求问题 | -| 🚀 | 服务保障 | 基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能 | +| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 | | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | @@ -304,7 +302,6 @@ | [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 7.0.0 | [文档](https://doc.iocoder.cn/bpm/) | | [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) | | [Springdoc](https://springdoc.org/) | Swagger 文档 | 2.2.0 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) | -| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 2.1.0 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) | | [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 9.0.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) | | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 3.1.8 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.15.3 | | diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index a93991ff51..bbb5b12ebe 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -20,7 +20,7 @@ cn.iocoder.boot yudao-spring-boot-starter-web - provided + provided diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java index 2d8c76d558..11ff765760 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/idempotent/core/aop/IdempotentAspect.java @@ -37,7 +37,7 @@ public class IdempotentAspect { } @Around(value = "@annotation(idempotent)") - public Object beforePointCut(ProceedingJoinPoint joinPoint, Idempotent idempotent) throws Throwable { + public Object aroundPointCut(ProceedingJoinPoint joinPoint, Idempotent idempotent) throws Throwable { // 获得 IdempotentKeyResolver IdempotentKeyResolver keyResolver = keyResolvers.get(idempotent.keyResolver()); Assert.notNull(keyResolver, "找不到对应的 IdempotentKeyResolver"); @@ -48,7 +48,7 @@ public class IdempotentAspect { boolean success = idempotentRedisDAO.setIfAbsent(key, idempotent.timeout(), idempotent.timeUnit()); // 锁定失败,抛出异常 if (!success) { - log.info("[beforePointCut][方法({}) 参数({}) 存在重复请求]", joinPoint.getSignature().toString(), joinPoint.getArgs()); + log.info("[aroundPointCut][方法({}) 参数({}) 存在重复请求]", joinPoint.getSignature().toString(), joinPoint.getArgs()); throw new ServiceException(GlobalErrorCodeConstants.REPEATED_REQUESTS.getCode(), idempotent.message()); } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/config/YudaoRateLimiterConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/config/YudaoRateLimiterConfiguration.java new file mode 100644 index 0000000000..68b910feae --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/config/YudaoRateLimiterConfiguration.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.framework.ratelimiter.config; + +import cn.iocoder.yudao.framework.ratelimiter.core.aop.RateLimiterAspect; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl.*; +import cn.iocoder.yudao.framework.ratelimiter.core.redis.RateLimiterRedisDAO; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; +import org.redisson.api.RedissonClient; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.context.annotation.Bean; + +import java.util.List; + +@AutoConfiguration(after = YudaoRedisAutoConfiguration.class) +public class YudaoRateLimiterConfiguration { + + @Bean + public RateLimiterAspect rateLimiterAspect(List keyResolvers, RateLimiterRedisDAO rateLimiterRedisDAO) { + return new RateLimiterAspect(keyResolvers, rateLimiterRedisDAO); + } + + @Bean + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") + public RateLimiterRedisDAO rateLimiterRedisDAO(RedissonClient redissonClient) { + return new RateLimiterRedisDAO(redissonClient); + } + + // ========== 各种 RateLimiterRedisDAO Bean ========== + + @Bean + public DefaultRateLimiterKeyResolver defaultRateLimiterKeyResolver() { + return new DefaultRateLimiterKeyResolver(); + } + + @Bean + public UserRateLimiterKeyResolver userRateLimiterKeyResolver() { + return new UserRateLimiterKeyResolver(); + } + + @Bean + public ClientIpRateLimiterKeyResolver clientIpRateLimiterKeyResolver() { + return new ClientIpRateLimiterKeyResolver(); + } + + @Bean + public ServerNodeRateLimiterKeyResolver serverNodeRateLimiterKeyResolver() { + return new ServerNodeRateLimiterKeyResolver(); + } + + @Bean + public ExpressionRateLimiterKeyResolver expressionRateLimiterKeyResolver() { + return new ExpressionRateLimiterKeyResolver(); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/annotation/RateLimiter.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/annotation/RateLimiter.java new file mode 100644 index 0000000000..417c4d642e --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/annotation/RateLimiter.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.annotation; + +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.idempotent.core.keyresolver.impl.ExpressionIdempotentKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl.ClientIpRateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl.DefaultRateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl.ServerNodeRateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl.UserRateLimiterKeyResolver; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.util.concurrent.TimeUnit; + +/** + * 限流注解 + * + * @author 芋道源码 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface RateLimiter { + + /** + * 限流的时间,默认为 1 秒 + */ + int time() default 1; + /** + * 时间单位,默认为 SECONDS 秒 + */ + TimeUnit timeUnit() default TimeUnit.SECONDS; + + /** + * 限流次数 + */ + int count() default 100; + + /** + * 提示信息,请求过快的提示 + * + * @see GlobalErrorCodeConstants#TOO_MANY_REQUESTS + */ + String message() default ""; // 为空时,使用 TOO_MANY_REQUESTS 错误提示 + + /** + * 使用的 Key 解析器 + * + * @see DefaultRateLimiterKeyResolver 全局级别 + * @see UserRateLimiterKeyResolver 用户 ID 级别 + * @see ClientIpRateLimiterKeyResolver 用户 IP 级别 + * @see ServerNodeRateLimiterKeyResolver 服务器 Node 级别 + * @see ExpressionIdempotentKeyResolver 自定义表达式,通过 {@link #keyArg()} 计算 + */ + Class keyResolver() default DefaultRateLimiterKeyResolver.class; + /** + * 使用的 Key 参数 + */ + String keyArg() default ""; + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/aop/RateLimiterAspect.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/aop/RateLimiterAspect.java new file mode 100644 index 0000000000..6ede62bea0 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/aop/RateLimiterAspect.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.aop; + +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import cn.iocoder.yudao.framework.ratelimiter.core.redis.RateLimiterRedisDAO; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; + +/** + * 拦截声明了 {@link RateLimiter} 注解的方法,实现限流操作 + * + * @author 芋道源码 + */ +@Aspect +@Slf4j +public class RateLimiterAspect { + + /** + * RateLimiterKeyResolver 集合 + */ + private final Map, RateLimiterKeyResolver> keyResolvers; + + private final RateLimiterRedisDAO rateLimiterRedisDAO; + + public RateLimiterAspect(List keyResolvers, RateLimiterRedisDAO rateLimiterRedisDAO) { + this.keyResolvers = CollectionUtils.convertMap(keyResolvers, RateLimiterKeyResolver::getClass); + this.rateLimiterRedisDAO = rateLimiterRedisDAO; + } + + @Before("@annotation(rateLimiter)") + public void beforePointCut(JoinPoint joinPoint, RateLimiter rateLimiter) { + // 获得 IdempotentKeyResolver 对象 + RateLimiterKeyResolver keyResolver = keyResolvers.get(rateLimiter.keyResolver()); + Assert.notNull(keyResolver, "找不到对应的 RateLimiterKeyResolver"); + // 解析 Key + String key = keyResolver.resolver(joinPoint, rateLimiter); + + // 获取 1 次限流 + boolean success = rateLimiterRedisDAO.tryAcquire(key, + rateLimiter.count(), rateLimiter.time(), rateLimiter.timeUnit()); + if (!success) { + log.info("[beforePointCut][方法({}) 参数({}) 请求过于频繁]", joinPoint.getSignature().toString(), joinPoint.getArgs()); + String message = StrUtil.blankToDefault(rateLimiter.message(), + GlobalErrorCodeConstants.TOO_MANY_REQUESTS.getMsg()); + throw new ServiceException(GlobalErrorCodeConstants.TOO_MANY_REQUESTS.getCode(), message); + } + } + +} + diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/RateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/RateLimiterKeyResolver.java new file mode 100644 index 0000000000..44d7bdff50 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/RateLimiterKeyResolver.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver; + +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import org.aspectj.lang.JoinPoint; + +/** + * 限流 Key 解析器接口 + * + * @author 芋道源码 + */ +public interface RateLimiterKeyResolver { + + /** + * 解析一个 Key + * + * @param rateLimiter 限流注解 + * @param joinPoint AOP 切面 + * @return Key + */ + String resolver(JoinPoint joinPoint, RateLimiter rateLimiter); + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ClientIpRateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ClientIpRateLimiterKeyResolver.java new file mode 100644 index 0000000000..8d6253caa7 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ClientIpRateLimiterKeyResolver.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import org.aspectj.lang.JoinPoint; + +/** + * IP 级别的限流 Key 解析器,使用方法名 + 方法参数 + IP,组装成一个 Key + * + * 为了避免 Key 过长,使用 MD5 进行“压缩” + * + * @author 芋道源码 + */ +public class ClientIpRateLimiterKeyResolver implements RateLimiterKeyResolver { + + @Override + public String resolver(JoinPoint joinPoint, RateLimiter rateLimiter) { + String methodName = joinPoint.getSignature().toString(); + String argsStr = StrUtil.join(",", joinPoint.getArgs()); + String clientIp = ServletUtils.getClientIP(); + return SecureUtil.md5(methodName + argsStr + clientIp); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/DefaultRateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/DefaultRateLimiterKeyResolver.java new file mode 100644 index 0000000000..236ea45cb6 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/DefaultRateLimiterKeyResolver.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import org.aspectj.lang.JoinPoint; + +/** + * 默认(全局级别)限流 Key 解析器,使用方法名 + 方法参数,组装成一个 Key + * + * 为了避免 Key 过长,使用 MD5 进行“压缩” + * + * @author 芋道源码 + */ +public class DefaultRateLimiterKeyResolver implements RateLimiterKeyResolver { + + @Override + public String resolver(JoinPoint joinPoint, RateLimiter rateLimiter) { + String methodName = joinPoint.getSignature().toString(); + String argsStr = StrUtil.join(",", joinPoint.getArgs()); + return SecureUtil.md5(methodName + argsStr); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ExpressionRateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ExpressionRateLimiterKeyResolver.java new file mode 100644 index 0000000000..118581e352 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ExpressionRateLimiterKeyResolver.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl; + +import cn.hutool.core.util.ArrayUtil; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.core.DefaultParameterNameDiscoverer; +import org.springframework.core.ParameterNameDiscoverer; +import org.springframework.expression.Expression; +import org.springframework.expression.ExpressionParser; +import org.springframework.expression.spel.standard.SpelExpressionParser; +import org.springframework.expression.spel.support.StandardEvaluationContext; + +import java.lang.reflect.Method; + +/** + * 基于 Spring EL 表达式的 {@link RateLimiterKeyResolver} 实现类 + * + * @author 芋道源码 + */ +public class ExpressionRateLimiterKeyResolver implements RateLimiterKeyResolver { + + private final ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer(); + + private final ExpressionParser expressionParser = new SpelExpressionParser(); + + @Override + public String resolver(JoinPoint joinPoint, RateLimiter rateLimiter) { + // 获得被拦截方法参数名列表 + Method method = getMethod(joinPoint); + Object[] args = joinPoint.getArgs(); + String[] parameterNames = this.parameterNameDiscoverer.getParameterNames(method); + // 准备 Spring EL 表达式解析的上下文 + StandardEvaluationContext evaluationContext = new StandardEvaluationContext(); + if (ArrayUtil.isNotEmpty(parameterNames)) { + for (int i = 0; i < parameterNames.length; i++) { + evaluationContext.setVariable(parameterNames[i], args[i]); + } + } + + // 解析参数 + Expression expression = expressionParser.parseExpression(rateLimiter.keyArg()); + return expression.getValue(evaluationContext, String.class); + } + + private static Method getMethod(JoinPoint point) { + // 处理,声明在类上的情况 + MethodSignature signature = (MethodSignature) point.getSignature(); + Method method = signature.getMethod(); + if (!method.getDeclaringClass().isInterface()) { + return method; + } + + // 处理,声明在接口上的情况 + try { + return point.getTarget().getClass().getDeclaredMethod( + point.getSignature().getName(), method.getParameterTypes()); + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ServerNodeRateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ServerNodeRateLimiterKeyResolver.java new file mode 100644 index 0000000000..300a4d2f1e --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/ServerNodeRateLimiterKeyResolver.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.system.SystemUtil; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import org.aspectj.lang.JoinPoint; + +/** + * Server 节点级别的限流 Key 解析器,使用方法名 + 方法参数 + IP,组装成一个 Key + * + * 为了避免 Key 过长,使用 MD5 进行“压缩” + * + * @author 芋道源码 + */ +public class ServerNodeRateLimiterKeyResolver implements RateLimiterKeyResolver { + + @Override + public String resolver(JoinPoint joinPoint, RateLimiter rateLimiter) { + String methodName = joinPoint.getSignature().toString(); + String argsStr = StrUtil.join(",", joinPoint.getArgs()); + String serverNode = String.format("%s@%d", SystemUtil.getHostInfo().getAddress(), SystemUtil.getCurrentPID()); + return SecureUtil.md5(methodName + argsStr + serverNode); + } + +} \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/UserRateLimiterKeyResolver.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/UserRateLimiterKeyResolver.java new file mode 100644 index 0000000000..a8d1c3a98c --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/keyresolver/impl/UserRateLimiterKeyResolver.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.impl; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.iocoder.yudao.framework.ratelimiter.core.annotation.RateLimiter; +import cn.iocoder.yudao.framework.ratelimiter.core.keyresolver.RateLimiterKeyResolver; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; +import org.aspectj.lang.JoinPoint; + +/** + * 用户级别的限流 Key 解析器,使用方法名 + 方法参数 + userId + userType,组装成一个 Key + * + * 为了避免 Key 过长,使用 MD5 进行“压缩” + * + * @author 芋道源码 + */ +public class UserRateLimiterKeyResolver implements RateLimiterKeyResolver { + + @Override + public String resolver(JoinPoint joinPoint, RateLimiter rateLimiter) { + String methodName = joinPoint.getSignature().toString(); + String argsStr = StrUtil.join(",", joinPoint.getArgs()); + Long userId = WebFrameworkUtils.getLoginUserId(); + Integer userType = WebFrameworkUtils.getLoginUserType(); + return SecureUtil.md5(methodName + argsStr + userId + userType); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/redis/RateLimiterRedisDAO.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/redis/RateLimiterRedisDAO.java new file mode 100644 index 0000000000..fc1378f3bd --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/core/redis/RateLimiterRedisDAO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.framework.ratelimiter.core.redis; + +import lombok.AllArgsConstructor; +import org.redisson.api.*; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +/** + * 限流 Redis DAO + * + * @author 芋道源码 + */ +@AllArgsConstructor +public class RateLimiterRedisDAO { + + /** + * 限流操作 + * + * KEY 格式:rate_limiter:%s // 参数为 uuid + * VALUE 格式:String + * 过期时间:不固定 + */ + private static final String RATE_LIMITER = "rate_limiter:%s"; + + private final RedissonClient redissonClient; + + public Boolean tryAcquire(String key, int count, int time, TimeUnit timeUnit) { + // 1. 获得 RRateLimiter,并设置 rate 速率 + RRateLimiter rateLimiter = getRRateLimiter(key, count, time, timeUnit); + // 2. 尝试获取 1 个 + return rateLimiter.tryAcquire(); + } + + private static String formatKey(String key) { + return String.format(RATE_LIMITER, key); + } + + private RRateLimiter getRRateLimiter(String key, long count, int time, TimeUnit timeUnit) { + String redisKey = formatKey(key); + RRateLimiter rateLimiter = redissonClient.getRateLimiter(redisKey); + long rateInterval = timeUnit.toSeconds(time); + // 1. 如果不存在,设置 rate 速率 + RateLimiterConfig config = rateLimiter.getConfig(); + if (config == null) { + rateLimiter.trySetRate(RateType.OVERALL, count, rateInterval, RateIntervalUnit.SECONDS); + return rateLimiter; + } + // 2. 如果存在,并且配置相同,则直接返回 + if (config.getRateType() == RateType.OVERALL + && Objects.equals(config.getRate(), count) + && Objects.equals(config.getRateInterval(), TimeUnit.SECONDS.toMillis(rateInterval))) { + return rateLimiter; + } + // 3. 如果存在,并且配置不同,则进行新建 + rateLimiter.setRate(RateType.OVERALL, count, rateInterval, RateIntervalUnit.SECONDS); + return rateLimiter; + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/package-info.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/package-info.java new file mode 100644 index 0000000000..36a408c8e0 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/ratelimiter/package-info.java @@ -0,0 +1,4 @@ +/** + * 限流组件,基于 Redisson {@link org.redisson.api.RRateLimiter} 限流实现 + */ +package cn.iocoder.yudao.framework.ratelimiter; \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index be5c0990d4..d7cd3a8830 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,2 +1,3 @@ cn.iocoder.yudao.framework.idempotent.config.YudaoIdempotentConfiguration -cn.iocoder.yudao.framework.lock4j.config.YudaoLock4jConfiguration \ No newline at end of file +cn.iocoder.yudao.framework.lock4j.config.YudaoLock4jConfiguration +cn.iocoder.yudao.framework.ratelimiter.config.YudaoRateLimiterConfiguration \ No newline at end of file -- Gitee From 1e348dbf8381657388a470b6424b5521890a49d8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 11 Apr 2024 22:52:34 +0800 Subject: [PATCH 0231/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=B0=86=E9=A1=B9=E7=9B=AE=E7=9A=84=20annotations=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BF=AE=E6=94=B9=E6=88=90=20annotation=20=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apilog/core/{annotations => annotation}/ApiAccessLog.java | 2 +- .../yudao/framework/apilog/core/filter/ApiAccessLogFilter.java | 2 +- .../crm/controller/admin/business/CrmBusinessController.java | 2 +- .../module/crm/controller/admin/clue/CrmClueController.java | 2 +- .../crm/controller/admin/contact/CrmContactController.java | 2 +- .../crm/controller/admin/contract/CrmContractController.java | 2 +- .../crm/controller/admin/customer/CrmCustomerController.java | 2 +- .../crm/controller/admin/product/CrmProductController.java | 2 +- .../controller/admin/receivable/CrmReceivableController.java | 2 +- .../admin/receivable/CrmReceivablePlanController.java | 2 +- .../erp/controller/admin/finance/ErpAccountController.java | 2 +- .../controller/admin/finance/ErpFinancePaymentController.java | 2 +- .../controller/admin/finance/ErpFinanceReceiptController.java | 2 +- .../controller/admin/product/ErpProductCategoryController.java | 2 +- .../erp/controller/admin/product/ErpProductController.java | 2 +- .../erp/controller/admin/product/ErpProductUnitController.java | 2 +- .../erp/controller/admin/purchase/ErpPurchaseInController.java | 2 +- .../controller/admin/purchase/ErpPurchaseOrderController.java | 2 +- .../controller/admin/purchase/ErpPurchaseReturnController.java | 2 +- .../erp/controller/admin/purchase/ErpSupplierController.java | 2 +- .../module/erp/controller/admin/sale/ErpCustomerController.java | 2 +- .../erp/controller/admin/sale/ErpSaleOrderController.java | 2 +- .../module/erp/controller/admin/sale/ErpSaleOutController.java | 2 +- .../erp/controller/admin/sale/ErpSaleReturnController.java | 2 +- .../erp/controller/admin/stock/ErpStockCheckController.java | 2 +- .../module/erp/controller/admin/stock/ErpStockController.java | 2 +- .../module/erp/controller/admin/stock/ErpStockInController.java | 2 +- .../erp/controller/admin/stock/ErpStockMoveController.java | 2 +- .../erp/controller/admin/stock/ErpStockOutController.java | 2 +- .../erp/controller/admin/stock/ErpStockRecordController.java | 2 +- .../erp/controller/admin/stock/ErpWarehouseController.java | 2 +- .../module/infra/controller/admin/config/ConfigController.java | 2 +- .../controller/admin/demo/demo01/Demo01ContactController.java | 2 +- .../controller/admin/demo/demo02/Demo02CategoryController.java | 2 +- .../controller/admin/demo/demo03/Demo03StudentController.java | 2 +- .../yudao/module/infra/controller/admin/job/JobController.java | 2 +- .../module/infra/controller/admin/job/JobLogController.java | 2 +- .../infra/controller/admin/logger/ApiAccessLogController.java | 2 +- .../infra/controller/admin/logger/ApiErrorLogController.java | 2 +- .../yudao/module/infra/service/codegen/inner/CodegenEngine.java | 2 +- .../product/controller/admin/spu/ProductSpuController.java | 2 +- .../controller/admin/delivery/DeliveryExpressController.java | 2 +- .../module/pay/controller/admin/order/PayOrderController.java | 2 +- .../module/pay/controller/admin/refund/PayRefundController.java | 2 +- .../module/system/controller/admin/dept/PostController.java | 2 +- .../module/system/controller/admin/dict/DictDataController.java | 2 +- .../module/system/controller/admin/dict/DictTypeController.java | 2 +- .../system/controller/admin/errorcode/ErrorCodeController.java | 2 +- .../system/controller/admin/logger/LoginLogController.java | 2 +- .../system/controller/admin/logger/OperateLogController.java | 2 +- .../system/controller/admin/notify/NotifyMessageController.java | 2 +- .../system/controller/admin/permission/RoleController.java | 2 +- .../controller/admin/sensitiveword/SensitiveWordController.java | 2 +- .../module/system/controller/admin/sms/SmsLogController.java | 2 +- .../system/controller/admin/sms/SmsTemplateController.java | 2 +- .../module/system/controller/admin/tenant/TenantController.java | 2 +- .../module/system/controller/admin/user/UserController.java | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-) rename yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/{annotations => annotation}/ApiAccessLog.java (96%) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotation/ApiAccessLog.java similarity index 96% rename from yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotation/ApiAccessLog.java index 096c3bef23..fe93ef6014 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotation/ApiAccessLog.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.apilog.core.annotations; +package cn.iocoder.yudao.framework.apilog.core.annotation; import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java index 654db7a6ed..b092683384 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java @@ -7,7 +7,7 @@ import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.BooleanUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java index 62aacf5064..a2bbd06362 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.business; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java index f060e07d9c..992549b315 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.clue; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java index 8d23f5635a..58ea20d493 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contact; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java index 94b90607a4..b9fd295183 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contract; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java index e9d5c63a2b..a4cc996e73 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.core.KeyValue; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java index c91e67ff85..bf98a80606 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.product; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java index d53cfcf4d0..58e02d187b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java index dfb4114af4..0e879ae38c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java index 273d40dd6c..5c68ed9504 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java index 29b71e5dbb..09e2469160 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java index e374b3c29a..0d71e6f859 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.finance; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java index d56b9d8909..d7bc7a7958 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java index 40ed30a208..04f9068df7 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java index c1f9d1acd0..3be6dd9739 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.product; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java index 754c3548fe..3a63540f48 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java index a60fda222e..47569b97c3 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java index 4afb083ea2..2847e2b870 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java index 3337b38013..7212507635 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.purchase; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java index 88d050ac67..2eb974df63 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java index acb49e7634..b0ec991718 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java index 02c5561481..f67398b16c 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java index 2a3a83411b..77e6106afd 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.sale; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java index 5eda9617d2..2c35cb8ed2 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java index f439272fa4..981cb92f78 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java index 6f9e8b3143..49f640f697 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java index df0ffc81d9..d2b343fb82 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java index 10e7d47ab4..2ab548b052 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java index e1b0b36f6a..943df16b12 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java index 46901a2af3..6adc383db4 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.erp.controller.admin.stock; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java index edcb222548..e0f9a81e91 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.config; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java index 2cbf98ffe5..cf6935e505 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo01; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java index 62228f5c2c..5cdc332219 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo02; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java index 624de732f4..bee5984751 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java index ed9f75df02..1881db53aa 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.job; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java index f1a230eea1..71b098b948 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.job; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java index d170933df6..b4ee86c0d8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java index a5b7a455bd..25eb2e99c2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 650df057a5..e4b7e18c84 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -8,7 +8,7 @@ import cn.hutool.extra.template.TemplateConfig; import cn.hutool.extra.template.TemplateEngine; import cn.hutool.extra.template.engine.velocity.VelocityEngine; import cn.hutool.system.SystemUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java index 31d36ba6d6..076170138e 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.spu; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java index 5484075c21..dedfe2d318 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index 68cdf2e01a..a5322c9eb2 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.pay.controller.admin.order; import cn.hutool.core.collection.CollectionUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index 81255443a0..a476ff9b5d 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund; import cn.hutool.core.collection.CollectionUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java index cf44cd5eff..897cea267c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dept; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index 59b03f0067..c05de995e8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dict; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java index 8873ca4d88..c40980cfc5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dict; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java index 9a28f8d720..a0d14c5570 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index 1903ab6e58..f2ff3a4f0f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.logger; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java index a7036c8f6c..57b9b619bd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.logger; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java index 1909046779..752ad28e8c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.notify; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index ee6ae9fbb8..cf22687529 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.permission; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java index 16b49f2990..15da9d9529 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index 1e468f6e0a..4646e785e8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java index 481b6b0335..80c6082265 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.*; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java index 51aab02d6d..090c6a80ff 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 8f1a376f84..51ec808575 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; -- Gitee From 048c6ed7b93949cfaded3824ec2f2ae6a3357244 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 11 Apr 2024 22:53:05 +0800 Subject: [PATCH 0232/1557] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20resilience4j=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index c6563b0bb2..f7be31a034 100644 --- a/README.md +++ b/README.md @@ -207,9 +207,7 @@ | 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 | | 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 | | 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 | -| 🚀 | 分布式锁 | 基于 Redis 实现分布式锁,满足并发场景 | -| 🚀 | 幂等组件 | 基于 Redis 实现幂等组件,解决重复请求问题 | -| 🚀 | 服务保障 | 基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能 | +| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 | | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | @@ -304,7 +302,6 @@ | [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 6.8.0 | [文档](https://doc.iocoder.cn/bpm/) | | [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) | | [Springdoc](https://springdoc.org/) | Swagger 文档 | 1.6.15 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) | -| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.1 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) | | [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.12.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) | | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | | -- Gitee From 48aef10d2dc2663587373779a633320001fb902c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=8B=E9=81=93=E6=BA=90=E7=A0=81?= Date: Fri, 12 Apr 2024 11:13:11 +0000 Subject: [PATCH 0233/1557] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request?= =?UTF-8?q?=20!937=20:=20feat:=20=E5=AE=A2=E6=88=B7=E6=88=90=E4=BA=A4?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E5=88=86=E6=9E=90(=E6=8C=89=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E3=80=81=E6=8C=89=E4=BA=A7=E5=93=81)'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 4 - .../definition/BpmSimpleModelNodeType.java | 47 ---- .../definition/BpmSimpleModelController.java | 39 ---- .../vo/simple/BpmSimpleModelNodeVO.java | 40 ---- .../vo/simple/BpmSimpleModelSaveReqVO.java | 23 -- .../core/enums/BpmnModelConstants.java | 16 -- .../flowable/core/util/BpmnModelUtils.java | 208 +----------------- .../service/definition/BpmModelService.java | 24 -- .../definition/BpmModelServiceImpl.java | 25 +-- .../definition/BpmSimpleModelService.java | 29 --- .../definition/BpmSimpleModelServiceImpl.java | 170 -------------- .../task/BpmProcessInstanceCopyService.java | 6 +- .../BpmProcessInstanceCopyServiceImpl.java | 18 +- .../service/task/BpmSimpleNodeService.java | 34 --- .../bpm/service/task/BpmTaskServiceImpl.java | 3 +- .../CrmStatisticsCustomerController.http | 10 - .../CrmStatisticsCustomerController.java | 14 +- ...atisticsCustomerDealCycleByAreaRespVO.java | 24 -- ...sticsCustomerDealCycleByProductRespVO.java | 19 -- .../CrmStatisticsCustomerMapper.java | 17 -- .../CrmStatisticsCustomerService.java | 18 +- .../CrmStatisticsCustomerServiceImpl.java | 49 ----- .../CrmStatisticsCustomerMapper.xml | 52 +---- 23 files changed, 27 insertions(+), 862 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java delete mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index e344a2145e..ec167719cc 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -75,8 +75,4 @@ public interface ErrorCodeConstants { // ========== BPM 流程表达式 1-009-014-000 ========== ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在"); - // ========== BPM 仿钉钉流程设计器 1-009-015-000 ========== - // TODO @芋艿:这个错误码,需要关注下 - ErrorCode CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT = new ErrorCode(1_009_015_000, "该流程模型不支持仿钉钉设计流程"); - } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java deleted file mode 100644 index 4e26d02d9f..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ /dev/null @@ -1,47 +0,0 @@ -package cn.iocoder.yudao.module.bpm.enums.definition; - -import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.Arrays; -import java.util.Objects; - -/** - * 仿钉钉的流程器设计器的模型节点类型 - * - * @author jason - */ -@Getter -@AllArgsConstructor -public enum BpmSimpleModelNodeType implements IntArrayValuable { - - // TODO @jaosn:-1、0、1、4、-2 是前端已经定义好的么?感觉未来可以考虑搞成和 BPMN 尽量一致的单词哈;类似 usertask 用户审批; - START_EVENT_NODE(0, "开始节点"), - APPROVE_USER_NODE (1, "审批人节点"), - // 抄送人节点、对应 BPMN 的 ScriptTask. 使用ScriptTask 原因。好像 ServiceTask 自定义属性不能写入 XML - SCRIPT_TASK_NODE(2, "抄送人节点"), - EXCLUSIVE_GATEWAY_NODE(4, "排他网关"), - END_EVENT_NODE(-2, "结束节点"); - - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); - - private final Integer type; - private final String name; - - public static boolean isGatewayNode(Integer type) { - // TODO 后续增加并行网关的支持 - return Objects.equals(EXCLUSIVE_GATEWAY_NODE.getType(), type); - } - - public static BpmSimpleModelNodeType valueOf(Integer type) { - return ArrayUtil.firstMatch(nodeType -> nodeType.getType().equals(type), values()); - } - - @Override - public int[] array() { - return ARRAYS; - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java deleted file mode 100644 index 2f88c6b6d5..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import cn.iocoder.yudao.module.bpm.service.definition.BpmSimpleModelService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -// TODO @芋艿:后续考虑下,怎么放这个 Controller -@Tag(name = "管理后台 - BPM 仿钉钉流程设计器") -@RestController -@RequestMapping("/bpm/simple") -public class BpmSimpleModelController { - @Resource - private BpmSimpleModelService bpmSimpleModelService; - - @PostMapping("/save") - @Operation(summary = "保存仿钉钉流程设计模型") - @PreAuthorize("@ss.hasPermission('bpm:model:update')") - public CommonResult saveSimpleModel(@Valid @RequestBody BpmSimpleModelSaveReqVO reqVO) { - return success(bpmSimpleModelService.saveSimpleModel(reqVO)); - } - - @GetMapping("/get") - @Operation(summary = "获得仿钉钉流程设计模型") - @Parameter(name = "modelId", description = "流程模型编号", required = true, example = "a2c5eee0-eb6c-11ee-abf4-0c37967c420a") - public CommonResult getSimpleModel(@RequestParam("modelId") String modelId){ - return success(bpmSimpleModelService.getSimpleModel(modelId)); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java deleted file mode 100644 index 09db4764c4..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; - -import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.util.List; -import java.util.Map; - -@Schema(description = "管理后台 - 仿钉钉流程设计模型节点 VO") -@Data -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BpmSimpleModelNodeVO { - - @Schema(description = "模型节点编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent_1") - @NotEmpty(message = "模型节点编号不能为空") - private String id; - - @Schema(description = "模型节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "模型节点类型不能为空") - @InEnum(BpmSimpleModelNodeType.class) - private Integer type; - - @Schema(description = "模型节点名称", example = "领导审批") - private String name; - - @Schema(description = "孩子节点") - private BpmSimpleModelNodeVO childNode; - - @Schema(description = "网关节点的条件节点") - private List conditionNodes; - - @Schema(description = "节点的属性") - private Map attributes; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java deleted file mode 100644 index 54e0191d56..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -// TODO @芋艿:或许挪到 model 里的 simple 包 -@Schema(description = "管理后台 - 仿钉钉流程设计模型的新增/修改 Request VO") -@Data -public class BpmSimpleModelSaveReqVO { - - @Schema(description = "流程模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotEmpty(message = "流程模型编号不能为空") - private String modelId; // 对应 Flowable act_re_model 表 ID_ 字段 - - @Schema(description = "仿钉钉流程设计模型对象", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "仿钉钉流程设计模型对象不能为空") - @Valid - private BpmSimpleModelNodeVO simpleModelBody; - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index 7513a64c88..3eb6981ef9 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -1,10 +1,5 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; -import com.google.common.collect.ImmutableSet; -import org.flowable.bpmn.model.*; - -import java.util.Set; - /** * BPMN XML 常量信息 * @@ -28,15 +23,4 @@ public interface BpmnModelConstants { */ String USER_TASK_CANDIDATE_PARAM = "candidateParam"; - // TODO @芋艿:这里后面得关注下; - /** - * BPMN End Event 节点 Id, 用于后端生成 End Event 节点 - */ - String END_EVENT_ID = "EndEvent_1"; - - /** - * 支持转仿钉钉设计模型的 Bpmn 节点 - */ - Set> SUPPORT_CONVERT_SIMPLE_FlOW_NODES = ImmutableSet.of(UserTask.class, EndEvent.class); - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 03745adceb..bcf82d731c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -1,35 +1,21 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.Assert; -import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; -import org.flowable.common.engine.impl.scripting.ScriptingEngines; import org.flowable.common.engine.impl.util.io.BytesStreamSource; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.flowable.bpmn.constants.BpmnXMLConstants.*; +import java.util.*; /** * 流程模型转操作工具类 */ public class BpmnModelUtils { - public static final String BPMN_SIMPLE_COPY_EXECUTION_SCRIPT = "#{bpmSimpleNodeService.copy(execution)}"; - public static Integer parseCandidateStrategy(FlowElement userTask) { return NumberUtils.parseInt(userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); @@ -340,196 +326,4 @@ public class BpmnModelUtils { return userTaskList; } - // ========== TODO 芋艿:这里得捉摸下; ========== - - /** - * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) - * - * @param processId 流程标识 - * @param processName 流程名称 - * @param simpleModelNode 仿钉钉流程设计模型数据结构 - * @return Bpmn Model - */ - public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { - BpmnModel bpmnModel = new BpmnModel(); - Process mainProcess = new Process(); - mainProcess.setId(processId); - mainProcess.setName(processName); - mainProcess.setExecutable(Boolean.TRUE); - bpmnModel.addProcess(mainProcess); - // 前端模型数据结构。 有 start event 节点. 没有 end event 节点。 - // 添加 FlowNode - addBpmnFlowNode(mainProcess, simpleModelNode); - // 单独添加 end event 节点 - addBpmnEndEventNode(mainProcess); - // 添加节点之间的连线 Sequence Flow - addBpmnSequenceFlow(mainProcess, simpleModelNode, BpmnModelConstants.END_EVENT_ID); - // 自动布局 - new BpmnAutoLayout(bpmnModel).execute(); - return bpmnModel; - } - - private static void addBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String endId) { - // 节点为 null 退出 - if (node == null || node.getId() == null) { - return; - } - BpmSimpleModelNodeVO childNode = node.getChildNode(); - // 如果不是网关节点、且后续节点为 null. 添加与结束节点的连线 - if (!BpmSimpleModelNodeType.isGatewayNode(node.getType()) && (childNode == null || childNode.getId() == null)) { - addBpmnSequenceFlowElement(mainProcess, node.getId(), endId, null, null); - return; - } - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); - Assert.notNull(nodeType, "模型节点类型不支持"); - switch (nodeType) { - case START_EVENT_NODE: - case APPROVE_USER_NODE: - case SCRIPT_TASK_NODE: { - addBpmnSequenceFlowElement(mainProcess, node.getId(), childNode.getId(), null, null); - // 递归调用后续节点 - addBpmnSequenceFlow(mainProcess, childNode, endId); - break; - } - case EXCLUSIVE_GATEWAY_NODE: { - String gateWayEndId = (childNode == null || childNode.getId() == null) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); - List conditionNodes = node.getConditionNodes(); - Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); - for (int i = 0; i < conditionNodes.size(); i++) { - BpmSimpleModelNodeVO item = conditionNodes.get(i); - BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); - if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { - addBpmnSequenceFlowElement(mainProcess, node.getId(), nextNodeOnCondition.getId(), - String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); - addBpmnSequenceFlow(mainProcess, nextNodeOnCondition, gateWayEndId); - } else { - addBpmnSequenceFlowElement(mainProcess, node.getId(), gateWayEndId, - String.format("%s_SequenceFlow_%d", node.getId(), i + 1), null); - } - } - // 递归调用后续节点 - addBpmnSequenceFlow(mainProcess, childNode, endId); - break; - } - default: { - // TODO 其它节点类型的实现 - } - } - - } - - private static void addBpmnSequenceFlowElement(Process mainProcess, String sourceId, String targetId, String seqFlowId, String conditionExpression) { - SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); - if (StrUtil.isNotEmpty(conditionExpression)) { - sequenceFlow.setConditionExpression(conditionExpression); - } - if (StrUtil.isNotEmpty(seqFlowId)) { - sequenceFlow.setId(seqFlowId); - } - mainProcess.addFlowElement(sequenceFlow); - } - - private static void addBpmnFlowNode(Process mainProcess, BpmSimpleModelNodeVO simpleModelNode) { - // 节点为 null 退出 - if (simpleModelNode == null || simpleModelNode.getId() == null) { - return; - } - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); - Assert.notNull(nodeType, "模型节点类型不支持"); - switch (nodeType) { - case START_EVENT_NODE: - addBpmnStartEventNode(mainProcess, simpleModelNode); - break; - case APPROVE_USER_NODE: - addBpmnUserTaskNode(mainProcess, simpleModelNode); - break; - case SCRIPT_TASK_NODE: - addBpmnScriptTaSskNode(mainProcess, simpleModelNode); - break; - case EXCLUSIVE_GATEWAY_NODE: - addBpmnExclusiveGatewayNode(mainProcess, simpleModelNode); - break; - default: { - // TODO 其它节点类型的实现 - } - } - - // 如果不是网关类型的接口, 并且chileNode为空退出 - if (!BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { - return; - } - - // 如果是网关类型接口. 递归添加条件节点 - if (BpmSimpleModelNodeType.isGatewayNode(simpleModelNode.getType()) && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { - for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { - addBpmnFlowNode(mainProcess, node.getChildNode()); - } - } - - // chileNode不为空,递归添加子节点 - if (simpleModelNode.getChildNode() != null) { - addBpmnFlowNode(mainProcess, simpleModelNode.getChildNode()); - } - } - - private static void addBpmnScriptTaSskNode(Process mainProcess, BpmSimpleModelNodeVO node) { - ScriptTask scriptTask = new ScriptTask(); - scriptTask.setId(node.getId()); - scriptTask.setName(node.getName()); - scriptTask.setScriptFormat(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE); - scriptTask.setScript(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); - // 添加自定义属性 - addExtensionAttributes(node, scriptTask); - mainProcess.addFlowElement(scriptTask); - } - - private static void addExtensionAttributes(BpmSimpleModelNodeVO node, FlowElement flowElement) { - Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); - addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, - candidateStrategy == null ? null : String.valueOf(candidateStrategy)); - addExtensionAttributes(flowElement, BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, - MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); - } - - private static void addBpmnExclusiveGatewayNode(Process mainProcess, BpmSimpleModelNodeVO node) { - Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); - ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); - exclusiveGateway.setId(node.getId()); - // 条件节点的最后一个条件为 网关的 default sequence flow - exclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); - mainProcess.addFlowElement(exclusiveGateway); - } - - private static void addBpmnEndEventNode(Process mainProcess) { - EndEvent endEvent = new EndEvent(); - endEvent.setId(BpmnModelConstants.END_EVENT_ID); - endEvent.setName("结束"); - mainProcess.addFlowElement(endEvent); - } - - private static void addBpmnUserTaskNode(Process mainProcess, BpmSimpleModelNodeVO node) { - UserTask userTask = new UserTask(); - userTask.setId(node.getId()); - userTask.setName(node.getName()); - addExtensionAttributes(node, userTask); - mainProcess.addFlowElement(userTask); - } - - private static void addExtensionAttributes(FlowElement element, String namespace, String name, String value) { - if (value == null) { - return; - } - ExtensionAttribute extensionAttribute = new ExtensionAttribute(name, value); - extensionAttribute.setNamespace(namespace); - extensionAttribute.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); - element.addAttribute(extensionAttribute); - } - - private static void addBpmnStartEventNode(Process mainProcess, BpmSimpleModelNodeVO node) { - StartEvent startEvent = new StartEvent(); - startEvent.setId(node.getId()); - startEvent.setName(node.getName()); - mainProcess.addFlowElement(startEvent); - } - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java index c5f1c962c1..e1acce0649 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java @@ -46,30 +46,6 @@ public interface BpmModelService { */ byte[] getModelBpmnXML(String id); - - /** - * 保存流程模型的 BPMN XML - * - * @param id 编号 - * @param xmlBytes BPMN XML bytes - */ - // TODO @芋艿:可能要关注下; - void saveModelBpmnXml(String id, byte[] xmlBytes); - - /** - * 获得仿钉钉快搭模型的 JSON 数据 - * @param id 编号 - * @return JSON bytes - */ - byte[] getModelSimpleJson(String id); - - /** - * 保存仿钉钉快搭模型的 JSON 数据 - * @param id 编号 - * @param jsonBytes JSON bytes - */ - void saveModelSimpleJson(String id, byte[] jsonBytes); - /** * 修改流程模型 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 9a12b7acdf..abfa0d568d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -104,7 +103,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 保存流程定义 repositoryService.saveModel(model); // 保存 BPMN XML - saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(bpmnXml)); + saveModelBpmnXml(model, bpmnXml); return model.getId(); } @@ -122,7 +121,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 更新模型 repositoryService.saveModel(model); // 更新 BPMN XML - saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(updateReqVO.getBpmnXml())); + saveModelBpmnXml(model, updateReqVO.getBpmnXml()); } @Override @@ -237,25 +236,11 @@ public class BpmModelServiceImpl implements BpmModelService { } } - @Override - public void saveModelBpmnXml(String id, byte[] xmlBytes) { - if (ArrayUtil.isEmpty(xmlBytes)) { - return; - } - repositoryService.addModelEditorSource(id, xmlBytes); - } - - @Override - public byte[] getModelSimpleJson(String id) { - return repositoryService.getModelEditorSourceExtra(id); - } - - @Override - public void saveModelSimpleJson(String id, byte[] jsonBytes) { - if (ArrayUtil.isEmpty(jsonBytes)) { + private void saveModelBpmnXml(Model model, String bpmnXml) { + if (StrUtil.isEmpty(bpmnXml)) { return; } - repositoryService.addModelEditorSourceExtra(id, jsonBytes); + repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(bpmnXml)); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java deleted file mode 100644 index e06dff7c66..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import jakarta.validation.Valid; - -/** - * 仿钉钉流程设计 Service 接口 - * - * @author jason - */ -public interface BpmSimpleModelService { - - /** - * 保存仿钉钉流程设计模型 - * - * @param reqVO 请求信息 - */ - Boolean saveSimpleModel(@Valid BpmSimpleModelSaveReqVO reqVO); - - /** - * 获取仿钉钉流程设计模型结构 - * - * @param modelId 流程模型编号 - * @return 仿钉钉流程设计模型结构 - */ - BpmSimpleModelNodeVO getSimpleModel(String modelId); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java deleted file mode 100644 index cbdabbf7a1..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.Assert; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; -import jakarta.annotation.Resource; -import org.flowable.bpmn.model.*; -import org.flowable.engine.repository.Model; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import java.util.List; -import java.util.Map; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.START_EVENT_NODE; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_PARAM; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY; - -/** - * 仿钉钉流程设计 Service 实现类 - * - * @author jason - */ -@Service -@Validated -public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { - - @Resource - private BpmModelService bpmModelService; - - @Override - public Boolean saveSimpleModel(BpmSimpleModelSaveReqVO reqVO) { - Model model = bpmModelService.getModel(reqVO.getModelId()); - if (model == null) { - throw exception(MODEL_NOT_EXISTS); - } -// byte[] bpmnBytes = bpmModelService.getModelBpmnXML(reqVO.getModelId()); -// if (ArrayUtil.isEmpty(bpmnBytes)) { -// // BPMN XML 不存在。新增 -// BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); -// bpmModelService.saveModelBpmnXml(model.getId(), BpmnModelUtils.getBpmnXml(bpmnModel)); -// return Boolean.TRUE; -// } else { -// // TODO BPMN XML 已经存在。如何修改 ?? TODO add by 芋艿:感觉一个流程,只能二选一,要么 bpmn、要么 simple -// return Boolean.FALSE; -// } - // 1. JSON 转换成 bpmnModel - BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); - // 2.1 保存 Bpmn XML - bpmModelService.saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); - // 2.2 保存 JSON 数据 - bpmModelService.saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModelBody())); - return Boolean.TRUE; - } - - @Override - public BpmSimpleModelNodeVO getSimpleModel(String modelId) { - Model model = bpmModelService.getModel(modelId); - if (model == null) { - throw exception(MODEL_NOT_EXISTS); - } - // 暂时不用 bpmn 转 json, 有点复杂, - // 通过 ACT_RE_MODEL 表 EDITOR_SOURCE_EXTRA_VALUE_ID_ 获取 仿钉钉快搭模型的JSON 数据 - byte[] jsonBytes = bpmModelService.getModelSimpleJson(model.getId()); - return JsonUtils.parseObject(jsonBytes, BpmSimpleModelNodeVO.class); - } - - // TODO @jason:一般要支持这个么?感觉 bpmn 转 json 支持会不会太复杂。可以优先级低一点,做下调研~ - - /** - * Bpmn Model 转换成 仿钉钉流程设计模型数据结构(json) 待完善 - * - * @param bpmnModel Bpmn Model - * @return 仿钉钉流程设计模型数据结构 - */ - private BpmSimpleModelNodeVO convertBpmnModelToSimpleModel(BpmnModel bpmnModel) { - if (bpmnModel == null) { - return null; - } - StartEvent startEvent = BpmnModelUtils.getStartEvent(bpmnModel); - if (startEvent == null) { - return null; - } - BpmSimpleModelNodeVO rootNode = new BpmSimpleModelNodeVO(); - rootNode.setType(START_EVENT_NODE.getType()); - rootNode.setId(startEvent.getId()); - rootNode.setName(startEvent.getName()); - recursiveBuildSimpleModelNode(startEvent, rootNode); - return rootNode; - } - - private void recursiveBuildSimpleModelNode(FlowNode currentFlowNode, BpmSimpleModelNodeVO currentSimpleModeNode) { - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(currentSimpleModeNode.getType()); - Assert.notNull(nodeType, "节点类型不支持"); - // 校验节点是否支持转仿钉钉的流程模型 - List outgoingFlows = validateCanConvertSimpleNode(nodeType, currentFlowNode); - if (CollUtil.isEmpty(outgoingFlows) || outgoingFlows.get(0).getTargetFlowElement() == null) { - return; - } - FlowElement targetElement = outgoingFlows.get(0).getTargetFlowElement(); - // 如果是 EndEvent 直接退出 - if (targetElement instanceof EndEvent) { - return; - } - if (targetElement instanceof UserTask) { - BpmSimpleModelNodeVO childNode = convertUserTaskToSimpleModelNode((UserTask) targetElement); - currentSimpleModeNode.setChildNode(childNode); - recursiveBuildSimpleModelNode((FlowNode) targetElement, childNode); - } - // TODO 其它节点类型待实现 - } - - private BpmSimpleModelNodeVO convertUserTaskToSimpleModelNode(UserTask userTask) { - BpmSimpleModelNodeVO simpleModelNodeVO = new BpmSimpleModelNodeVO(); - simpleModelNodeVO.setType(BpmSimpleModelNodeType.APPROVE_USER_NODE.getType()); - simpleModelNodeVO.setName(userTask.getName()); - simpleModelNodeVO.setId(userTask.getId()); - Map attributes = MapUtil.newHashMap(); - // TODO 暂时是普通审批,需要加会签 - attributes.put("approveMethod", 1); - attributes.computeIfAbsent(USER_TASK_CANDIDATE_STRATEGY, (key) -> BpmnModelUtils.parseCandidateStrategy(userTask)); - attributes.computeIfAbsent(USER_TASK_CANDIDATE_PARAM, (key) -> BpmnModelUtils.parseCandidateParam(userTask)); - simpleModelNodeVO.setAttributes(attributes); - return simpleModelNodeVO; - } - - private List validateCanConvertSimpleNode(BpmSimpleModelNodeType nodeType, FlowNode currentFlowNode) { - switch (nodeType) { - case START_EVENT_NODE: - case APPROVE_USER_NODE: { - List outgoingFlows = currentFlowNode.getOutgoingFlows(); - if (CollUtil.isNotEmpty(outgoingFlows) && outgoingFlows.size() > 1) { - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - validIsSupportFlowNode(outgoingFlows.get(0).getTargetFlowElement()); - return outgoingFlows; - } - default: { - // TODO 其它节点类型待实现 - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - } - } - - private void validIsSupportFlowNode(FlowElement targetElement) { - if (targetElement == null) { - return; - } - boolean isSupport = false; - for (Class item : BpmnModelConstants.SUPPORT_CONVERT_SIMPLE_FlOW_NODES) { - if (item.isInstance(targetElement)) { - isSupport = true; - break; - } - } - if (!isSupport) { - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - } -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java index 94df76d4d8..bd84490e8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java @@ -17,11 +17,9 @@ public interface BpmProcessInstanceCopyService { * 流程实例的抄送 * * @param userIds 抄送的用户编号 - * @param processInstanceId 流程编号 - * @param taskId 任务编号 - * @param taskName 任务名称 + * @param taskId 流程任务编号 */ - void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName); + void createProcessInstanceCopy(Collection userIds, String taskId); /** * 获得抄送的流程的分页 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index ce1ddd7fd2..aba8bd9f17 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.service.task; +import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO; import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO; @@ -10,6 +11,7 @@ import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; +import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -45,14 +47,14 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy private BpmProcessDefinitionService processDefinitionService; @Override - public void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName) { - // 1.1 校验任务存在 暂时去掉这个校验. 因为任务可能仿钉钉快搭的抄送节点(ScriptTask) -// Task task = taskService.getTask(taskId); -// if (ObjectUtil.isNull(task)) { -// throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); -// } + public void createProcessInstanceCopy(Collection userIds, String taskId) { + // 1.1 校验任务存在 + Task task = taskService.getTask(taskId); + if (ObjectUtil.isNull(task)) { + throw exception(ErrorCodeConstants.TASK_NOT_EXISTS); + } // 1.2 校验流程实例存在 -// String processInstanceId = task.getProcessInstanceId(); + String processInstanceId = task.getProcessInstanceId(); ProcessInstance processInstance = processInstanceService.getProcessInstance(processInstanceId); if (processInstance == null) { throw exception(ErrorCodeConstants.PROCESS_INSTANCE_NOT_EXISTS); @@ -68,7 +70,7 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy List copyList = convertList(userIds, userId -> new BpmProcessInstanceCopyDO() .setUserId(userId).setStartUserId(Long.valueOf(processInstance.getStartUserId())) .setProcessInstanceId(processInstanceId).setProcessInstanceName(processInstance.getName()) - .setCategory(processDefinition.getCategory()).setTaskId(taskId).setTaskName(taskName)); + .setCategory(processDefinition.getCategory()).setTaskId(taskId).setTaskName(task.getName())); processInstanceCopyMapper.insertBatch(copyList); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java deleted file mode 100644 index 89ba0ee84c..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmSimpleNodeService.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.task; - -import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; -import jakarta.annotation.Resource; -import org.flowable.bpmn.model.FlowElement; -import org.flowable.engine.delegate.DelegateExecution; -import org.springframework.stereotype.Service; - -import java.util.Set; - -/** - * 仿钉钉快搭各个节点 Service - * @author jason - */ -@Service -public class BpmSimpleNodeService { - - @Resource - private BpmTaskCandidateInvoker taskCandidateInvoker; - @Resource - private BpmProcessInstanceCopyService processInstanceCopyService; - - /** - * 仿钉钉快搭抄送 - * @param execution 执行的任务(ScriptTask) - */ - public Boolean copy(DelegateExecution execution) { - Set userIds = taskCandidateInvoker.calculateUsers(execution); - FlowElement currentFlowElement = execution.getCurrentFlowElement(); - processInstanceCopyService.createProcessInstanceCopy(userIds, execution.getProcessInstanceId(), - currentFlowElement.getId(), currentFlowElement.getName()); - return Boolean.TRUE; - } -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index c18ea5398f..aa5326ddd4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -186,8 +186,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2. 抄送用户 if (CollUtil.isNotEmpty(reqVO.getCopyUserIds())) { - processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), instance.getProcessInstanceId(), - reqVO.getId(), task.getName()); + processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), reqVO.getId()); } // 情况一:被委派的任务,不调用 complete 去完成任务 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 6b960512d8..389bf4ac90 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -53,13 +53,3 @@ tenant-id: {{adminTenentId}} GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} - -### 6.3 获取客户成交周期(按区域) -GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-area?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 -Authorization: Bearer {{token}} -tenant-id: {{adminTenentId}} - -### 6.4 获取客户成交周期(按产品) -GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-product?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 -Authorization: Bearer {{token}} -tenant-id: {{adminTenentId}} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 3539b5db5c..51d1499006 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -96,18 +96,6 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerDealCycleByUser(reqVO)); } - @GetMapping("/get-customer-deal-cycle-by-area") - @Operation(summary = "获取客户成交周期(按用户)") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerDealCycleByArea(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerDealCycleByArea(reqVO)); - } - - @GetMapping("/get-customer-deal-cycle-by-product") - @Operation(summary = "获取客户成交周期(按用户)") - @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") - public CommonResult> getCustomerDealCycleByProduct(@Valid CrmStatisticsCustomerReqVO reqVO) { - return success(customerService.getCustomerDealCycleByProduct(reqVO)); - } + // TODO dhb52:【成交周期分析】里,有按照员工(已实现)、地区(未实现)、产品(未实现),需要在看看哈;可以把 CustomerDealCycle 拆成 3 个 tab,员工客户成交周期分析、地区客户成交周期分析、产品客户成交周期分析; } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java deleted file mode 100644 index 3698378278..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - CRM 客户成交周期分析(按区域) VO") -@Data -public class CrmStatisticsCustomerDealCycleByAreaRespVO { - - @Schema(description = "省份编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @JsonIgnore - private Integer areaId; - - @Schema(description = "省份名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "浙江省") - private String areaName; - - @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") - private Double customerDealCycle; - - @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerDealCount; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java deleted file mode 100644 index 442c195aae..0000000000 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Schema(description = "管理后台 - CRM 客户成交周期分析(按产品) VO") -@Data -public class CrmStatisticsCustomerDealCycleByProductRespVO { - - @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "演示产品") - private String productName; - - @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") - private Double customerDealCycle; - - @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer customerDealCount; - -} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 171d432b02..458ef79c3d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -53,7 +53,6 @@ public interface CrmStatisticsCustomerMapper { /** * 合同总金额(按用户) - * * @return 统计数据@return 统计数据@param reqVO 请求参数 * @return 统计数据 */ @@ -192,20 +191,4 @@ public interface CrmStatisticsCustomerMapper { */ List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); - /** - * 客户成交周期(按区域) - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List selectCustomerDealCycleGroupByAreaId(CrmStatisticsCustomerReqVO reqVO); - - /** - * 客户成交周期(按产品) - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List selectCustomerDealCycleGroupByProductId(CrmStatisticsCustomerReqVO reqVO); - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 56ecf975ed..0e00e9c222 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService { /** * 客户成交周期(按日期) - *

+ * * 成交周期的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 * * @param reqVO 请求参数 @@ -93,20 +93,4 @@ public interface CrmStatisticsCustomerService { */ List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO); - /** - * 客户成交周期(按区域) - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerDealCycleByArea(CrmStatisticsCustomerReqVO reqVO); - - /** - * 客户成交周期(按产品) - * - * @param reqVO 请求参数 - * @return 统计数据 - */ - List getCustomerDealCycleByProduct(CrmStatisticsCustomerReqVO reqVO); - } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index c5b933c439..f4787b20fa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -4,9 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.framework.ip.core.Area; -import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; -import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -22,7 +19,6 @@ import java.time.LocalDateTime; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.function.Function; import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; @@ -294,51 +290,6 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return summaryList; } - @Override - public List getCustomerDealCycleByArea(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - - // 2. 获取客户地区统计数据 - List dealCycleByAreaList = customerMapper.selectCustomerDealCycleGroupByAreaId(reqVO); - if (CollUtil.isEmpty(dealCycleByAreaList)) { - return Collections.emptyList(); - } - - // 3. 拼接数据 - Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), - Area::getId); - return convertList(dealCycleByAreaList, vo -> { - if (vo.getAreaId() != null) { - Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE); - findAndThen(areaMap, parentId, area -> vo.setAreaId(parentId).setAreaName(area.getName())); - } - return vo; - }); - } - - @Override - public List getCustomerDealCycleByProduct(CrmStatisticsCustomerReqVO reqVO) { - // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return Collections.emptyList(); - } - reqVO.setUserIds(userIds); - - // 2. 获取客户产品统计数据 - List dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); - if (CollUtil.isEmpty(dealCycleByProductList)) { - return Collections.emptyList(); - } - - return dealCycleByProductList; - } - /** * 拼接用户信息(昵称) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index e850a0c882..44c6c4b84a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -19,18 +19,17 @@ @@ -54,14 +53,13 @@ COUNT(DISTINCT customer.id) AS customer_deal_count FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id - WHERE customer.deleted = 0 - AND contract.deleted = 0 + WHERE customer.deleted = 0 AND contract.deleted = 0 AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} - AND customer.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY customer.owner_user_id @@ -223,42 +221,4 @@ GROUP BY customer.owner_user_id - - - - -- Gitee From 62c6c4b9bd7c6fa5ba555bb7f333fd73f357e8af Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 12 Apr 2024 19:17:49 +0800 Subject: [PATCH 0234/1557] =?UTF-8?q?=E5=90=8C=E6=AD=A5=20develop=20?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- yudao-server/pom.xml | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 9cf34eb372..3a66524bc1 100644 --- a/pom.xml +++ b/pom.xml @@ -16,12 +16,12 @@ yudao-module-system yudao-module-infra - yudao-module-bpm + - yudao-module-crm + diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index ade54c0685..bc850b5902 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -46,11 +46,11 @@ - - cn.iocoder.boot - yudao-module-bpm-biz - ${revision} - + + + + + @@ -88,11 +88,11 @@ - - cn.iocoder.boot - yudao-module-crm-biz - ${revision} - + + + + + -- Gitee From 8e86706d50c4eab78541063983fc7b0044603094 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 12 Apr 2024 20:31:33 +0800 Subject: [PATCH 0235/1557] =?UTF-8?q?=E5=90=8C=E6=AD=A5=20develop=20?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/util/date/LocalDateTimeUtils.java | 20 +++++++++---------- .../vo/business/CrmBusinessTransferReqVO.java | 3 ++- .../contact/vo/CrmContactTransferReqVO.java | 4 ++-- .../vo/contract/CrmContractTransferReqVO.java | 4 ++-- .../vo/customer/CrmCustomerTransferReqVO.java | 2 +- .../permission/CrmPermissionController.java | 19 ++++++------------ .../permission/vo/CrmPermissionRespVO.java | 2 +- .../CrmStatisticsCustomerController.java | 4 ++-- .../CrmStatisticsPerformanceController.java | 4 ++-- .../CrmStatisticsPortraitController.java | 10 +++------- .../customer/CrmStatisticsCustomerReqVO.java | 4 ++-- .../CrmStatisticsPerformanceReqVO.java | 4 ++-- .../portrait/CrmStatisticsPortraitReqVO.java | 2 +- .../permission/CrmPermissionServiceImpl.java | 2 +- .../CrmReceivablePlanServiceImpl.java | 2 +- .../CrmStatisticsCustomerServiceImpl.java | 5 +++-- .../CrmStatisticsPerformanceServiceImpl.java | 5 +++-- .../CrmStatisticsPortraitServiceImpl.java | 5 +++-- .../app/cart/vo/AppCartAddReqVO.java | 5 +++-- 19 files changed, 50 insertions(+), 56 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java index acc93ad8c9..c3b3b53fbb 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java @@ -227,27 +227,27 @@ public class LocalDateTimeUtils { // 2. 循环,生成时间范围 List timeRanges = new ArrayList<>(); switch (intervalEnum) { - case DateIntervalEnum.DAY: + case DAY: while (startTime.isBefore(endTime)) { timeRanges.add(new LocalDateTime[]{startTime, startTime.plusDays(1).minusNanos(1)}); startTime = startTime.plusDays(1); } break; - case DateIntervalEnum.WEEK: + case WEEK: while (startTime.isBefore(endTime)) { LocalDateTime endOfWeek = startTime.with(DayOfWeek.SUNDAY).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfWeek}); startTime = endOfWeek.plusNanos(1); } break; - case DateIntervalEnum.MONTH: + case MONTH: while (startTime.isBefore(endTime)) { LocalDateTime endOfMonth = startTime.with(TemporalAdjusters.lastDayOfMonth()).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfMonth}); startTime = endOfMonth.plusNanos(1); } break; - case DateIntervalEnum.QUARTER: + case QUARTER: while (startTime.isBefore(endTime)) { int quarterOfYear = getQuarterOfYear(startTime); LocalDateTime quarterEnd = quarterOfYear == 4 @@ -257,7 +257,7 @@ public class LocalDateTimeUtils { startTime = quarterEnd.plusNanos(1); } break; - case DateIntervalEnum.YEAR: + case YEAR: while (startTime.isBefore(endTime)) { LocalDateTime endOfYear = startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfYear}); @@ -290,16 +290,16 @@ public class LocalDateTimeUtils { // 2. 循环,生成时间范围 switch (intervalEnum) { - case DateIntervalEnum.DAY: + case DAY: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN); - case DateIntervalEnum.WEEK: + case WEEK: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN) + StrUtil.format("(第 {} 周)", LocalDateTimeUtil.weekOfYear(startTime)); - case DateIntervalEnum.MONTH: + case MONTH: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_MONTH_PATTERN); - case DateIntervalEnum.QUARTER: + case QUARTER: return StrUtil.format("{}-Q{}", startTime.getYear(), getQuarterOfYear(startTime)); - case DateIntervalEnum.YEAR: + case YEAR: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_YEAR_PATTERN); default: throw new IllegalArgumentException("Invalid interval: " + interval); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java index e26ddfa63f..da3a87fca2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java @@ -2,11 +2,12 @@ package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - 商机转移 Request VO") @Data @NoArgsConstructor diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java index 0cd128cf93..4f94ee2ac4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java @@ -4,10 +4,10 @@ import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; - -import jakarta.validation.constraints.NotNull; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - CRM 联系人转移 Request VO") @Data @NoArgsConstructor diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java index 3860844f41..e234a02301 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; - -import jakarta.validation.constraints.NotNull; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotNull; + @Schema(description = "管理后台 - CRM 合同转移 Request VO") @Data @NoArgsConstructor diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java index 547ca63665..79578f6606 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotNull; import java.util.List; @Schema(description = "管理后台 - CRM 客户转移 Request VO") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java index a39c4a6d8f..5143ac2a4a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.permission; import cn.hutool.core.collection.CollUtil; -import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; @@ -9,18 +8,10 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionRespVO; import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionSaveReqVO; import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionUpdateReqVO; -import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; import cn.iocoder.yudao.module.crm.dal.dataobject.permission.CrmPermissionDO; -import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPermission; -import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; -import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; -import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; -import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.PostApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -32,14 +23,16 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.*; +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java index aeddf1a5de..28985aef62 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/vo/CrmPermissionRespVO.java @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.Set; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 51d1499006..6acd9dcbf1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -5,14 +5,14 @@ import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java index 32cf7429ca..a7ce4768f3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPerformanceController.java @@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java index 986e2268c4..101b9c0c68 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsPortraitController.java @@ -1,22 +1,18 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticsPortraitReqVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerAreaRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerIndustryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerLevelRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.CrmStatisticCustomerSourceRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait.*; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsPortraitService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java index b32a35ee9c..620a008486 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java @@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java index de76acbb32..1bed9ed61f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java @@ -4,8 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java index c284e7457f..90ab3fdee9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java index e6d1c5b2b8..22773a81b6 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/permission/CrmPermissionServiceImpl.java @@ -22,12 +22,12 @@ import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferRe import cn.iocoder.yudao.module.crm.util.CrmPermissionUtils; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java index dd3de19b1a..127ef72c1a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java @@ -19,11 +19,11 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import com.mzt.logapi.context.LogRecordContext; import com.mzt.logapi.service.impl.DiffParseFunction; import com.mzt.logapi.starter.annotation.LogRecord; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.Collection; import java.util.List; import java.util.Objects; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index f4787b20fa..57ad943a49 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; @@ -10,10 +11,10 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Collections; @@ -310,7 +311,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index 450d691ff8..f94630665a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; @@ -12,7 +13,7 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; +import javax.annotation.Resource; import java.util.Collections; import java.util.List; import java.util.function.Function; @@ -88,7 +89,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform private List getUserIds(CrmStatisticsPerformanceReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index eae0128664..4f11530f61 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; @@ -11,9 +12,9 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.Collections; import java.util.List; import java.util.Map; @@ -115,7 +116,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe private List getUserIds(CrmStatisticsPortraitReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java index 0c33b86269..57eb0582eb 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotNull; import lombok.Data; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + @Schema(description = "用户 App - 购物车添加购物项 Request VO") @Data public class AppCartAddReqVO { -- Gitee From 67b02c7e5b6a64942829bb525f1f1c9c0d4d11b6 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 12 Apr 2024 22:15:24 +0800 Subject: [PATCH 0236/1557] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E6=88=90?= =?UTF-8?q?=E4=BA=A4=E5=91=A8=E6=9C=9F=E5=88=86=E6=9E=90(=E6=8C=89?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E3=80=81=E6=8C=89=E4=BA=A7=E5=93=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsCustomerController.http | 10 ++++ .../CrmStatisticsCustomerController.java | 14 ++++- ...atisticsCustomerDealCycleByAreaRespVO.java | 24 +++++++++ ...sticsCustomerDealCycleByProductRespVO.java | 19 +++++++ .../CrmStatisticsCustomerMapper.java | 17 ++++++ .../CrmStatisticsCustomerService.java | 18 ++++++- .../CrmStatisticsCustomerServiceImpl.java | 49 +++++++++++++++++ .../CrmStatisticsCustomerMapper.xml | 52 ++++++++++++++++--- 8 files changed, 195 insertions(+), 8 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 389bf4ac90..6b960512d8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -53,3 +53,13 @@ tenant-id: {{adminTenentId}} GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-user?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} + +### 6.3 获取客户成交周期(按区域) +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-area?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} + +### 6.4 获取客户成交周期(按产品) +GET {{baseUrl}}/crm/statistics-customer/get-customer-deal-cycle-by-product?deptId=100×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index 51d1499006..3539b5db5c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -96,6 +96,18 @@ public class CrmStatisticsCustomerController { return success(customerService.getCustomerDealCycleByUser(reqVO)); } - // TODO dhb52:【成交周期分析】里,有按照员工(已实现)、地区(未实现)、产品(未实现),需要在看看哈;可以把 CustomerDealCycle 拆成 3 个 tab,员工客户成交周期分析、地区客户成交周期分析、产品客户成交周期分析; + @GetMapping("/get-customer-deal-cycle-by-area") + @Operation(summary = "获取客户成交周期(按用户)") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerDealCycleByArea(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerDealCycleByArea(reqVO)); + } + + @GetMapping("/get-customer-deal-cycle-by-product") + @Operation(summary = "获取客户成交周期(按用户)") + @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") + public CommonResult> getCustomerDealCycleByProduct(@Valid CrmStatisticsCustomerReqVO reqVO) { + return success(customerService.getCustomerDealCycleByProduct(reqVO)); + } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java new file mode 100644 index 0000000000..3698378278 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByAreaRespVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户成交周期分析(按区域) VO") +@Data +public class CrmStatisticsCustomerDealCycleByAreaRespVO { + + @Schema(description = "省份编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @JsonIgnore + private Integer areaId; + + @Schema(description = "省份名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "浙江省") + private String areaName; + + @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") + private Double customerDealCycle; + + @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerDealCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java new file mode 100644 index 0000000000..442c195aae --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerDealCycleByProductRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - CRM 客户成交周期分析(按产品) VO") +@Data +public class CrmStatisticsCustomerDealCycleByProductRespVO { + + @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "演示产品") + private String productName; + + @Schema(description = "成交周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0") + private Double customerDealCycle; + + @Schema(description = "成交客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer customerDealCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index 458ef79c3d..171d432b02 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -53,6 +53,7 @@ public interface CrmStatisticsCustomerMapper { /** * 合同总金额(按用户) + * * @return 统计数据@return 统计数据@param reqVO 请求参数 * @return 统计数据 */ @@ -191,4 +192,20 @@ public interface CrmStatisticsCustomerMapper { */ List selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); + /** + * 客户成交周期(按区域) + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List selectCustomerDealCycleGroupByAreaId(CrmStatisticsCustomerReqVO reqVO); + + /** + * 客户成交周期(按产品) + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List selectCustomerDealCycleGroupByProductId(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 0e00e9c222..56ecf975ed 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService { /** * 客户成交周期(按日期) - * + *

* 成交周期的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 * * @param reqVO 请求参数 @@ -93,4 +93,20 @@ public interface CrmStatisticsCustomerService { */ List getCustomerDealCycleByUser(CrmStatisticsCustomerReqVO reqVO); + /** + * 客户成交周期(按区域) + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerDealCycleByArea(CrmStatisticsCustomerReqVO reqVO); + + /** + * 客户成交周期(按产品) + * + * @param reqVO 请求参数 + * @return 统计数据 + */ + List getCustomerDealCycleByProduct(CrmStatisticsCustomerReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index f4787b20fa..c5b933c439 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -4,6 +4,9 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.*; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsCustomerMapper; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -19,6 +22,7 @@ import java.time.LocalDateTime; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.function.Function; import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; @@ -290,6 +294,51 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe return summaryList; } + @Override + public List getCustomerDealCycleByArea(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取客户地区统计数据 + List dealCycleByAreaList = customerMapper.selectCustomerDealCycleGroupByAreaId(reqVO); + if (CollUtil.isEmpty(dealCycleByAreaList)) { + return Collections.emptyList(); + } + + // 3. 拼接数据 + Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), + Area::getId); + return convertList(dealCycleByAreaList, vo -> { + if (vo.getAreaId() != null) { + Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE); + findAndThen(areaMap, parentId, area -> vo.setAreaId(parentId).setAreaName(area.getName())); + } + return vo; + }); + } + + @Override + public List getCustomerDealCycleByProduct(CrmStatisticsCustomerReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return Collections.emptyList(); + } + reqVO.setUserIds(userIds); + + // 2. 获取客户产品统计数据 + List dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); + if (CollUtil.isEmpty(dealCycleByProductList)) { + return Collections.emptyList(); + } + + return dealCycleByProductList; + } + /** * 拼接用户信息(昵称) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 44c6c4b84a..e850a0c882 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -19,17 +19,18 @@ @@ -53,13 +54,14 @@ COUNT(DISTINCT customer.id) AS customer_deal_count FROM crm_customer AS customer LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id - WHERE customer.deleted = 0 AND contract.deleted = 0 + WHERE customer.deleted = 0 + AND contract.deleted = 0 AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND customer.owner_user_id IN #{userId} - AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} + AND customer.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY customer.owner_user_id @@ -221,4 +223,42 @@ GROUP BY customer.owner_user_id + + + + -- Gitee From 733c416500f56380015a417d39fe893284d1da83 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 16:00:39 +0800 Subject: [PATCH 0237/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20yudao=20ai=20boo?= =?UTF-8?q?t=20starter=20=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index 2646412965..d5e12e5129 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -29,14 +29,15 @@ yudao-common - + cn.iocoder.boot - yudao-spring-boot-starter-security + yudao-spring-boot-starter-ai + ${revision} cn.iocoder.boot - yudao-spring-boot-starter-mybatis + yudao-spring-boot-starter-test -- Gitee From ec6ad9da7482ce43227828f1a33a672dabe83c67 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 16:01:42 +0800 Subject: [PATCH 0238/1557] =?UTF-8?q?api=E7=A7=BB=E5=8A=A8=E5=88=B0api?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/chatxinghuo/{ => api}/XingHuoApi.java | 3 ++- .../yudao/framework/ai/chatyiyan/{ => api}/YiYanApi.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/{ => api}/XingHuoApi.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/{ => api}/YiYanApi.java (97%) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java index 323b8a7b7d..e2a85779e6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java @@ -1,7 +1,8 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo; +package cn.iocoder.yudao.framework.ai.chatxinghuo.api; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java index d22e8ffc94..ad1059b1aa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java @@ -1,5 +1,6 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan; +package cn.iocoder.yudao.framework.ai.chatyiyan.api; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanAuthRes; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; -- Gitee From 17f7970259d3e3456fce1235fbdfaebf64268403 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 16:08:47 +0800 Subject: [PATCH 0239/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/config/YudaoAiAutoConfiguration.java | 32 +++++++ .../ai/config/YudaoAiProperties.java | 85 +++++++++++++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../src/main/resources/application-local.yaml | 37 ++++++-- 4 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java new file mode 100644 index 0000000000..2725c9a33d --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.framework.ai.config; + +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; + +/** + * ai 自动配置 + * + * @author fansili + * @time 2024/4/12 16:29 + * @since 1.0 + */ +@AutoConfiguration +@EnableConfigurationProperties(YudaoAiProperties.class) +public class YudaoAiAutoConfiguration { + + @Bean + public XingHuoChatClient xingHuoChatClient(YudaoAiProperties yudaoAiProperties) { + return new XingHuoChatClient( + new XingHuoApi( + yudaoAiProperties.getXingHuo().getAppId(), + yudaoAiProperties.getXingHuo().getAppKey(), + yudaoAiProperties.getXingHuo().getSecretKey() + ), + new XingHuoOptions().setChatModel(yudaoAiProperties.getXingHuo().getChatModel()) + ); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java new file mode 100644 index 0000000000..2e7bff5c5a --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.framework.ai.config; + +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; +import lombok.Data; +import lombok.experimental.Accessors; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * ai 自动配置 + * + * @author fansili + * @time 2024/4/12 16:29 + * @since 1.0 + */ +@Data +@ConfigurationProperties(prefix = "yudao.ai") +public class YudaoAiProperties { + + private QianWenProperties qianWen; + private XingHuoProperties xingHuo; + private YiYanProperties yiYan; + + @Data + @Accessors(chain = true) + public static class ChatProperties { + + private Float temperature; + + private Float topP; + + private Integer topK; + } + + @Data + @Accessors(chain = true) + public static class QianWenProperties extends ChatProperties { + /** + * 阿里云:服务器接入点 + */ + private String endpoint = "bailian.cn-beijing.aliyuncs.com"; + /** + * 阿里云:权限 accessKeyId + */ + private String accessKeyId; + /** + * 阿里云:权限 accessKeySecret + */ + private String accessKeySecret; + /** + * 阿里云:agentKey(相当于应用id) + */ + private String agentKey; + } + + @Data + @Accessors(chain = true) + public static class XingHuoProperties extends ChatProperties { + private String appId; + private String appKey; + private String secretKey; + private XingHuoChatModel chatModel; + } + + @Data + @Accessors(chain = true) + public static class YiYanProperties extends ChatProperties { + /** + * appKey + */ + private String appKey; + /** + * secretKey + */ + private String secretKey; + /** + * 模型 + */ + private YiYanChatModel chatModel = YiYanChatModel.ERNIE4_3_5_8K; + /** + * token 刷新时间(默认 86400 = 24小时) + */ + private int refreshTokenSecondTime = 86400; + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..6eedc9cc88 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.iocoder.yudao.framework.ai.config.YudaoAiAutoConfiguration diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index cddf42014b..59f1d0098f 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -54,7 +54,7 @@ spring: # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root - password: 123456 + password: root # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # username: SYSDBA # DM 连接的示例 @@ -68,7 +68,7 @@ spring: # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 username: root - password: 123456 + password: root # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W @@ -196,12 +196,12 @@ debug: false --- #################### 微信公众号、小程序相关配置 #################### wx: mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档 -# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的) -# secret: 5abee519483bc9f8cb37ce280e814bd0 + # app-id: wx041349c6f39b268b # 测试号(牛希尧提供的) + # secret: 5abee519483bc9f8cb37ce280e814bd0 app-id: wx5b23ba7a5589ecbb # 测试号(自己的) secret: 2a7b3b20c537e52e74afd395eb85f61f -# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的) -# secret: bd4f9fab889591b62aeac0d7b8d8b4a0 + # app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的) + # secret: bd4f9fab889591b62aeac0d7b8d8b4a0 # 存储配置,解决 AccessToken 的跨节点的共享 config-storage: type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 @@ -212,8 +212,8 @@ wx: # secret: 333ae72f41552af1e998fe1f54e1584a appid: wx63c280fe3248a3e7 # wenhualian的接口测试号 secret: 6f270509224a7ae1296bbf1c8cb97aed -# appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的) -# secret: 4a1a04e07f6a4a0751b39c3064a92c8b + # appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的) + # secret: 4a1a04e07f6a4a0751b39c3064a92c8b config-storage: type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 key-prefix: wa # Redis Key 的前缀 @@ -223,6 +223,25 @@ wx: # 芋道配置项,设置当前项目所有自定义的配置 yudao: + ai: + temperature: 1 + topP: 1 + topK: 1 + qianWen: + endpoint: bailian.cn-beijing.aliyuncs.com + accessKeyId: LTAI5tNTVhXW4fLKUjMrr98z + accessKeySecret: ZJ0JQeyjzxxm5CfeTV6k1wNE9UsvZP + agentKey: f0c1088824594f589c8f10567ccd929f_p_efm + xingHuo: + appId: 13c8cca6 + appKey: cb6415c19d6162cda07b47316fcb0416 + secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh + chatModel: XING_HUO_3_5 + yiYan: + appKey: x0cuLZ7XsaTCU08vuJWO87Lg + secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK + refreshTokenSecondTime: 86400 + chatModel: ERNIE4_3_5_8K captcha: enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试; security: @@ -235,6 +254,7 @@ yudao: pay: order-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址 refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址 + access-log: # 访问日志的配置项 enable: false error-code: # 错误码相关配置项 @@ -267,7 +287,6 @@ justauth: type: REDIS prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - # TODO 赤焰:这个配置的目的是? #ureport配置 #ureport: -- Gitee From 1875a49ba39e05740b935061a3b0c96b071d8e15 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 16:09:16 +0800 Subject: [PATCH 0240/1557] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/chatxinghuo/XingHuoChatClient.java | 7 ++++--- .../yudao/framework/ai/chatxinghuo/XingHuoOptions.java | 2 +- .../yudao/framework/ai/chat/XingHuoChatClientTests.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java index eef59cac00..849a70d75c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java @@ -5,6 +5,7 @@ import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.chat.*; import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; import lombok.extern.slf4j.Slf4j; @@ -69,7 +70,7 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { // 创建 request 请求,stream模式需要供应商支持 XingHuoChatCompletionRequest request = this.createRequest(prompt, chatOptions); // 调用 callWithFunctionSupport 发送请求 - ResponseEntity response = xingHuoApi.chatCompletionEntity(request, chatOptions.getDomain()); + ResponseEntity response = xingHuoApi.chatCompletionEntity(request, chatOptions.getChatModel()); // 获取结果封装 ChatResponse return new ChatResponse(List.of(new Generation(response.getBody().getPayload().getChoices().getText().get(0).getContent()))); }); @@ -82,7 +83,7 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { // 创建 request 请求,stream模式需要供应商支持 XingHuoChatCompletionRequest request = this.createRequest(prompt, chatOptions); // 发送请求 - Flux response = this.xingHuoApi.chatCompletionStream(request, chatOptions.getDomain()); + Flux response = this.xingHuoApi.chatCompletionStream(request, chatOptions.getChatModel()); return response.map(res -> { String content = res.getPayload().getChoices().getText().stream() .map(item -> item.getContent()).collect(Collectors.joining()); @@ -113,7 +114,7 @@ public class XingHuoChatClient implements ChatClient, StreamingChatClient { // 创建 params XingHuoChatCompletionRequest.Parameter.Chat chatParameter = new XingHuoChatCompletionRequest.Parameter.Chat(); BeanUtil.copyProperties(xingHuoOptions, chatParameter); - chatParameter.setDomain(xingHuoOptions.getDomain().getValue()); + chatParameter.setDomain(xingHuoOptions.getChatModel().getValue()); XingHuoChatCompletionRequest.Parameter parameter = new XingHuoChatCompletionRequest.Parameter().setChat(chatParameter); // 创建 payload text 信息 XingHuoChatCompletionRequest.Payload.Message.Text text = new XingHuoChatCompletionRequest.Payload.Message.Text(); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java index 5c539d4918..dd839403e1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java @@ -24,7 +24,7 @@ public class XingHuoOptions implements ChatOptions { * generalv3.5指向V3.5版本; * 注意:不同的取值对应的url也不一样! */ - private XingHuoChatModel domain = XingHuoChatModel.XING_HUO_3_5; + private XingHuoChatModel chatModel = XingHuoChatModel.XING_HUO_3_5; /** * 取值范围 (0,1] ,默认值0.5 */ diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java index 4a4b06b818..2340ad9a36 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoApi; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; @@ -31,7 +31,7 @@ public class XingHuoChatClientTests { "cb6415c19d6162cda07b47316fcb0416", "Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh" ), - new XingHuoOptions().setDomain(XingHuoChatModel.XING_HUO_3_5) + new XingHuoOptions().setChatModel(XingHuoChatModel.XING_HUO_3_5) ); } -- Gitee From 02ac6f30cf18cd195b67fe9f69663a760bf68c26 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 16:09:47 +0800 Subject: [PATCH 0241/1557] =?UTF-8?q?yiyan=20api=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0api=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java | 1 + .../java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java index c38dae4938..c4be256da7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java @@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.framework.ai.chat.*; import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java index cff4caa174..326f52552f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanApi; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; -- Gitee From ac0de5d485d5447d8eb8ad062d455b6105c2d3a0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 13 Apr 2024 18:20:28 +0800 Subject: [PATCH 0242/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/ChatController.java | 103 ++++--------- .../controller/admin/OldChatController.java | 77 ++++++++++ .../yudao/framework/ai/AiPlatformEnum.java | 38 +++++ .../ai/config/YudaoAiAutoConfiguration.java | 141 ++++++++++++++++-- .../ai/config/YudaoAiProperties.java | 21 ++- .../framework/ai/exception/AiException.java | 15 ++ .../src/main/resources/application-local.yaml | 16 +- 7 files changed, 320 insertions(+), 91 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java index 49fae6b623..8fbc6d9e63 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java @@ -1,77 +1,34 @@ -//package cn.iocoder.yudao.module.ai.controller.admin; -// -//import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -//import cn.iocoder.yudao.framework.common.pojo.CommonResult; -//import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -//import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; -//import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; -//import io.swagger.v3.oas.annotations.Operation; -//import io.swagger.v3.oas.annotations.tags.Tag; -//import jakarta.servlet.http.HttpServletResponse; -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.ai.chat.ChatClient; -//import org.springframework.ai.chat.ChatResponse; -//import org.springframework.ai.chat.prompt.Prompt; -//import org.springframework.ai.openai.OpenAiChatClient; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.ApplicationContext; -//import org.springframework.validation.annotation.Validated; -//import org.springframework.web.bind.annotation.PostMapping; -//import org.springframework.web.bind.annotation.RequestBody; -//import org.springframework.web.bind.annotation.RequestMapping; -//import org.springframework.web.bind.annotation.RestController; -//import reactor.core.publisher.Flux; -// -//import java.util.function.Consumer; -// -//// TODO done @fansili:有了 swagger 注释,就不用类注释了 -//@Tag(name = "AI模块") -//@RestController -//@RequestMapping("/ai-api") -//@Slf4j -//public class ChatController { +package cn.iocoder.yudao.module.ai.controller.admin; + +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +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.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author fansili + * @since 1.0 + * @time 2024/4/13 17:44 + */ +@Tag(name = "AI模块") +@RestController +@RequestMapping("/ai-api") +@Slf4j +@AllArgsConstructor +public class ChatController { + // // @Autowired -// private ApplicationContext applicationContext; -// -// @PostMapping("/chat") -// @Operation(summary = "对话聊天", description = "简单的ai聊天") -// public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { -// ChatClient chatClient = getChatClient(reqVO.getAiModel()); -// String res; -// try { -// res = chatClient.call(reqVO.getPrompt()); -// } catch (Exception e) { -// res = e.getMessage(); -// } -// return CommonResult.success(res); -// } -// -// @PostMapping("/chatStream") -// @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") -// public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { -// OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); -// Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); -// chatResponse.subscribe(new Consumer() { -// @Override -// public void accept(ChatResponse chatResponse) { -// System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); -// } -// }); -// return CommonResult.success(null); -// } +// private QianWenChatClient qianWenChatClient; // -// /** -// * 根据 ai模型 获取对于的 模型实现类 -// * -// * @param aiModelEnum -// * @return -// */ -// private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { -// if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { -// return applicationContext.getBean(OpenAiChatClient.class); -// } -// // AI模型暂不支持 -// throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); +// @GetMapping("/chat") +// public String chat(@RequestParam("prompt") String prompt) { +// return qianWenChatClient.call(prompt); // } -//} + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java new file mode 100644 index 0000000000..49fae6b623 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java @@ -0,0 +1,77 @@ +//package cn.iocoder.yudao.module.ai.controller.admin; +// +//import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +//import cn.iocoder.yudao.framework.common.pojo.CommonResult; +//import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +//import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; +//import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; +//import io.swagger.v3.oas.annotations.Operation; +//import io.swagger.v3.oas.annotations.tags.Tag; +//import jakarta.servlet.http.HttpServletResponse; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.ai.chat.ChatClient; +//import org.springframework.ai.chat.ChatResponse; +//import org.springframework.ai.chat.prompt.Prompt; +//import org.springframework.ai.openai.OpenAiChatClient; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.ApplicationContext; +//import org.springframework.validation.annotation.Validated; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import reactor.core.publisher.Flux; +// +//import java.util.function.Consumer; +// +//// TODO done @fansili:有了 swagger 注释,就不用类注释了 +//@Tag(name = "AI模块") +//@RestController +//@RequestMapping("/ai-api") +//@Slf4j +//public class ChatController { +// +// @Autowired +// private ApplicationContext applicationContext; +// +// @PostMapping("/chat") +// @Operation(summary = "对话聊天", description = "简单的ai聊天") +// public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { +// ChatClient chatClient = getChatClient(reqVO.getAiModel()); +// String res; +// try { +// res = chatClient.call(reqVO.getPrompt()); +// } catch (Exception e) { +// res = e.getMessage(); +// } +// return CommonResult.success(res); +// } +// +// @PostMapping("/chatStream") +// @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") +// public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { +// OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); +// Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); +// chatResponse.subscribe(new Consumer() { +// @Override +// public void accept(ChatResponse chatResponse) { +// System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); +// } +// }); +// return CommonResult.success(null); +// } +// +// /** +// * 根据 ai模型 获取对于的 模型实现类 +// * +// * @param aiModelEnum +// * @return +// */ +// private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { +// if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { +// return applicationContext.getBean(OpenAiChatClient.class); +// } +// // AI模型暂不支持 +// throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); +// } +//} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java new file mode 100644 index 0000000000..8a11dac7f3 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.framework.ai; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 讯飞星火 模型 + * + * 文档地址:https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E + * + * 1tokens 约等于1.5个中文汉字 或者 0.8个英文单词 + * 星火V1.5支持[搜索]内置插件;星火V2.0、V3.0和V3.5支持[搜索]、[天气]、[日期]、[诗词]、[字词]、[股票]六个内置插件 + * 星火V3.5 现已支持system、Function Call 功能。 + * + * author: fansili + * time: 2024/3/11 10:12 + */ +@Getter +@AllArgsConstructor +public enum AiPlatformEnum { + + + YI_YAN("yiyan"), + QIAN_WEN("qianwen"), + XING_HUO("xinghuo"), + + ; + + public static final Map mapValues + = Arrays.stream(values()).collect(Collectors.toMap(AiPlatformEnum::name, o -> o)); + + private String value; + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 2725c9a33d..751b9df065 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -1,11 +1,29 @@ package cn.iocoder.yudao.framework.ai.config; +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenOptions; +import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; +import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; +import cn.iocoder.yudao.framework.ai.exception.AiException; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; +import org.springframework.context.support.GenericApplicationContext; + +import java.util.Map; /** * ai 自动配置 @@ -18,15 +36,118 @@ import org.springframework.context.annotation.Bean; @EnableConfigurationProperties(YudaoAiProperties.class) public class YudaoAiAutoConfiguration { + // TODO @芋艿:我看sharding jdbc 差不多这么玩的 @Bean - public XingHuoChatClient xingHuoChatClient(YudaoAiProperties yudaoAiProperties) { - return new XingHuoChatClient( - new XingHuoApi( - yudaoAiProperties.getXingHuo().getAppId(), - yudaoAiProperties.getXingHuo().getAppKey(), - yudaoAiProperties.getXingHuo().getSecretKey() - ), - new XingHuoOptions().setChatModel(yudaoAiProperties.getXingHuo().getChatModel()) - ); + @ConditionalOnMissingBean(value = InitChatClient.class) + public InitChatClient initChatClient(YudaoAiProperties yudaoAiProperties) { + return new InitChatClient(yudaoAiProperties); + } + + public static class InitChatClient implements InitializingBean, ApplicationContextAware { + + private GenericApplicationContext applicationContext; + private YudaoAiProperties yudaoAiProperties; + + public InitChatClient(YudaoAiProperties yudaoAiProperties) { + this.yudaoAiProperties = yudaoAiProperties; + } + + @Override + public void afterPropertiesSet() throws Exception { + for (Map.Entry> properties : yudaoAiProperties.entrySet()) { + String beanName = properties.getKey(); + Map aiPlatformMap = properties.getValue(); + + // 检查平台类型是否正确 + String aiPlatform = String.valueOf(aiPlatformMap.get("aiPlatform")); + if (!AiPlatformEnum.mapValues.containsKey(aiPlatform)) { + throw new AiException("AI平台名称错误! 可以参考 AiPlatformEnum 类!"); + } + // 获取平台类型 + AiPlatformEnum aiPlatformEnum = AiPlatformEnum.mapValues.get(aiPlatform); + // 获取 chat properties + YudaoAiProperties.ChatProperties chatProperties = getChatProperties(aiPlatformEnum, aiPlatformMap); + // 创建客户端 + registerChatClient(applicationContext, chatProperties, beanName); +// applicationContext.refresh(); + + + } + + System.err.println(applicationContext.getBean("qianWen")); + System.err.println(applicationContext.getBean("yiYan")); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = (GenericApplicationContext) applicationContext; + } + } + + private static void registerChatClient(GenericApplicationContext applicationContext, YudaoAiProperties.ChatProperties chatProperties, String beanName) { + ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory(); + Object wrapperBean = null; + if (AiPlatformEnum.XING_HUO == chatProperties.getAiPlatform()) { + YudaoAiProperties.XingHuoProperties xingHuoProperties = (YudaoAiProperties.XingHuoProperties) chatProperties; + wrapperBean = beanFactory.initializeBean( + new XingHuoChatClient( + new XingHuoApi( + xingHuoProperties.getAppId(), + xingHuoProperties.getAppKey(), + xingHuoProperties.getSecretKey() + ), + new XingHuoOptions().setChatModel(xingHuoProperties.getChatModel()) + ), + beanName + ); + } else if (AiPlatformEnum.QIAN_WEN == chatProperties.getAiPlatform()) { + YudaoAiProperties.QianWenProperties qianWenProperties = (YudaoAiProperties.QianWenProperties) chatProperties; + wrapperBean = beanFactory.initializeBean(new QianWenChatClient( + new QianWenApi( + qianWenProperties.getAccessKeyId(), + qianWenProperties.getAccessKeySecret(), + qianWenProperties.getAgentKey(), + qianWenProperties.getEndpoint() + ), + new QianWenOptions() + .setAppId(qianWenProperties.getAppId()) + ), + beanName + ); + } else if (AiPlatformEnum.YI_YAN == chatProperties.getAiPlatform()) { + YudaoAiProperties.YiYanProperties yiYanProperties = (YudaoAiProperties.YiYanProperties) chatProperties; + + wrapperBean = beanFactory.initializeBean(new YiYanChatClient( + new YiYanApi( + yiYanProperties.getAppKey(), + yiYanProperties.getSecretKey(), + yiYanProperties.getChatModel(), + yiYanProperties.getRefreshTokenSecondTime() + ), + new YiYanOptions().setMax_output_tokens(2048)), + beanName + ); + } + if (wrapperBean != null) { + beanFactory.registerSingleton(beanName, wrapperBean); + } + } + + + private static YudaoAiProperties.ChatProperties getChatProperties(AiPlatformEnum aiPlatformEnum, Map aiPlatformMap) { + if (AiPlatformEnum.XING_HUO == aiPlatformEnum) { + YudaoAiProperties.XingHuoProperties xingHuoProperties = new YudaoAiProperties.XingHuoProperties(); + BeanUtil.fillBeanWithMap(aiPlatformMap, xingHuoProperties, true); + return xingHuoProperties; + } else if (AiPlatformEnum.YI_YAN == aiPlatformEnum) { + YudaoAiProperties.YiYanProperties yiYanProperties = new YudaoAiProperties.YiYanProperties(); + BeanUtil.fillBeanWithMap(aiPlatformMap, yiYanProperties, true); + return yiYanProperties; + } else if (AiPlatformEnum.QIAN_WEN == aiPlatformEnum) { + YudaoAiProperties.QianWenProperties qianWenProperties = new YudaoAiProperties.QianWenProperties(); + BeanUtil.fillBeanWithMap(aiPlatformMap, qianWenProperties, true); + return qianWenProperties; + } + throw new AiException("不支持的Ai类型!"); } -} +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 2e7bff5c5a..58d08af3ef 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -1,11 +1,15 @@ package cn.iocoder.yudao.framework.ai.config; +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; +import java.util.LinkedHashMap; +import java.util.Map; + /** * ai 自动配置 * @@ -15,16 +19,18 @@ import org.springframework.boot.context.properties.ConfigurationProperties; */ @Data @ConfigurationProperties(prefix = "yudao.ai") -public class YudaoAiProperties { +public class YudaoAiProperties extends LinkedHashMap> { - private QianWenProperties qianWen; - private XingHuoProperties xingHuo; - private YiYanProperties yiYan; +// private QianWenProperties qianWen; +// private XingHuoProperties xingHuo; +// private YiYanProperties yiYan; @Data @Accessors(chain = true) public static class ChatProperties { + private AiPlatformEnum aiPlatform; + private Float temperature; private Float topP; @@ -48,9 +54,14 @@ public class YudaoAiProperties { */ private String accessKeySecret; /** - * 阿里云:agentKey(相当于应用id) + * 阿里云:agentKey */ private String agentKey; + /** + * 阿里云:agentKey(相当于应用id) + */ + private String appId; + } @Data diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java new file mode 100644 index 0000000000..d98b7afc23 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.framework.ai.exception; + +/** + * ai 异常 + * + * @author fansili + * @time 2024/4/13 17:05 + * @since 1.0 + */ +public class AiException extends RuntimeException { + + public AiException(String message) { + super(message); + } +} diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 59f1d0098f..fc3f358f10 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -224,20 +224,30 @@ wx: # 芋道配置项,设置当前项目所有自定义的配置 yudao: ai: - temperature: 1 - topP: 1 - topK: 1 qianWen: + aiPlatform: QIAN_WEN + temperature: 1 + topP: 1 + topK: 1 endpoint: bailian.cn-beijing.aliyuncs.com accessKeyId: LTAI5tNTVhXW4fLKUjMrr98z accessKeySecret: ZJ0JQeyjzxxm5CfeTV6k1wNE9UsvZP agentKey: f0c1088824594f589c8f10567ccd929f_p_efm + appId: 5f14955f201a44eb8dbe0c57250a32ce xingHuo: + aiPlatform: XING_HUO + temperature: 1 + topP: 1 + topK: 1 appId: 13c8cca6 appKey: cb6415c19d6162cda07b47316fcb0416 secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh chatModel: XING_HUO_3_5 yiYan: + aiPlatform: YI_YAN + temperature: 1 + topP: 1 + topK: 1 appKey: x0cuLZ7XsaTCU08vuJWO87Lg secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK refreshTokenSecondTime: 86400 -- Gitee From 6c9a3b0e119bd924b5201dd3e359e5fc306628ed Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 13 Apr 2024 23:30:11 +0800 Subject: [PATCH 0243/1557] =?UTF-8?q?CRM:=20=E5=AE=8C=E5=96=84=E9=94=80?= =?UTF-8?q?=E5=94=AE=E6=BC=8F=E6=96=97=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/collection/CollectionUtils.java | 4 + .../CrmStatisticsFunnelController.java | 46 ++++++++ .../CrmStatisticBusinessEndStatusRespVO.java | 25 +++++ .../vo/funnel/CrmStatisticFunnelRespVO.java | 23 ++++ .../vo/funnel/CrmStatisticsFunnelReqVO.java | 42 +++++++ .../dal/mysql/business/CrmBusinessMapper.java | 19 +++- .../dal/mysql/customer/CrmCustomerMapper.java | 8 ++ .../statistics/CrmStatisticsFunnelMapper.java | 14 +++ .../service/business/CrmBusinessService.java | 19 ++++ .../business/CrmBusinessServiceImpl.java | 16 +++ .../service/customer/CrmCustomerService.java | 21 +++- .../customer/CrmCustomerServiceImpl.java | 9 ++ .../CrmStatisticsFunnelService.java | 32 ++++++ .../CrmStatisticsFunnelServiceImpl.java | 105 ++++++++++++++++++ .../CrmStatisticsPortraitServiceImpl.java | 14 ++- .../statistics/CrmStatisticsFunnelMapper.xml | 5 + 16 files changed, 388 insertions(+), 14 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticBusinessEndStatusRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticFunnelRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java index 0d06bc799f..91f534788c 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java @@ -97,6 +97,10 @@ public class CollectionUtils { .collect(Collectors.toList()); } + public static Set convertSet(Collection from) { + return convertSet(from, v -> v); + } + public static Set convertSet(Collection from, Function func) { if (CollUtil.isEmpty(from)) { return new HashSet<>(); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java new file mode 100644 index 0000000000..cbcd95265b --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsFunnelService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - CRM 销售漏斗") +@RestController +@RequestMapping("/crm/statistics-funnel") +@Validated +public class CrmStatisticsFunnelController { + + @Resource + private CrmStatisticsFunnelService crmStatisticsFunnelService; + + @GetMapping("/get-funnel-summary") + @Operation(summary = "获取销售漏斗统计数据", description = "用于【销售漏斗】页面") + @PreAuthorize("@ss.hasPermission('crm:statistics-funnel:query')") + public CommonResult getFunnelSummary(@Valid CrmStatisticsFunnelReqVO reqVO) { + return success(crmStatisticsFunnelService.getFunnelSummary(reqVO)); + } + + + @GetMapping("/get-business-end-status-summary") + @Operation(summary = "获取商机结束状态统计", description = "用于【销售漏斗】页面") + @PreAuthorize("@ss.hasPermission('crm:statistics-funnel:query')") + public CommonResult> getBusinessEndStatusSummary(@Valid CrmStatisticsFunnelReqVO reqVO) { + return success(crmStatisticsFunnelService.getBusinessEndStatusSummary(reqVO)); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticBusinessEndStatusRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticBusinessEndStatusRespVO.java new file mode 100644 index 0000000000..fbec539d99 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticBusinessEndStatusRespVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - CRM 商机结束状态统计 Response VO") +@NoArgsConstructor +@AllArgsConstructor +@Data +public class CrmStatisticBusinessEndStatusRespVO { + + @Schema(description = "结束状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer endStatus; + + @Schema(description = "商机数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long businessCount; + + @Schema(description = "商机总金额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private BigDecimal totalPrice; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticFunnelRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticFunnelRespVO.java new file mode 100644 index 0000000000..b2e36d406d --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticFunnelRespVO.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Schema(description = "管理后台 - CRM 销售漏斗 Response VO") +@NoArgsConstructor +@AllArgsConstructor +@Data +public class CrmStatisticFunnelRespVO { + + @Schema(description = "客户数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long customerCount; + + @Schema(description = "商机数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long businessCount; + + @Schema(description = "赢单数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long winCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java new file mode 100644 index 0000000000..7edc6c59c7 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - CRM 销售漏斗 Request VO") +@Data +public class CrmStatisticsFunnelReqVO { + + @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "部门 id 不能为空") + private Long deptId; + + /** + * 负责人用户 id, 当用户为空, 则计算部门下用户 + */ + @Schema(description = "负责人用户 id", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + private Long userId; + + /** + * userIds 目前不用前端传递,目前是方便后端通过 deptId 读取编号后,设置回来 + * 后续,可能会支持选择部分用户进行查询 + */ + @Schema(description = "负责人用户 id 集合", hidden = true, example = "2") + private List userIds; + + /** + * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 + * 并作为参数传递给Mapper + */ + @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] times; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java index fc5b070f46..88cfaa9fb2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java @@ -6,14 +6,15 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessPageReqVO; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; -import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.util.CrmPermissionUtils; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import org.apache.ibatis.annotations.Mapper; +import java.time.LocalDateTime; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 商机 Mapper @@ -59,10 +60,24 @@ public interface CrmBusinessMapper extends BaseMapperX { return selectCount(CrmBusinessDO::getStatusTypeId, statusTypeId); } - default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId){ + default List selectListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) { return selectList(new LambdaQueryWrapperX() .eq(CrmBusinessDO::getCustomerId, customerId) .eq(CrmBusinessDO::getOwnerUserId, ownerUserId)); } + default Long selectCountByOwnerUserIdsAndEndStatus(Collection ownerUserIds, LocalDateTime[] times, Integer endStatus) { + return selectCount(new LambdaQueryWrapperX() + .in(CrmBusinessDO::getOwnerUserId, ownerUserIds) + .eqIfPresent(CrmBusinessDO::getEndStatus, endStatus) + .betweenIfPresent(CrmBusinessDO::getCreateTime, times)); + } + + default List selectListByOwnerUserIdsAndEndStatusNotNull(Collection ownerUserIds, LocalDateTime[] times){ + return selectList(new LambdaQueryWrapperX() + .in(CrmBusinessDO::getOwnerUserId, ownerUserIds) + .betweenIfPresent(CrmBusinessDO::getCreateTime, times) + .isNotNull(CrmBusinessDO::getEndStatus)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java index 6157839509..b61dbeba2d 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java @@ -19,9 +19,11 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.lang.Nullable; import org.springframework.util.Assert; +import javax.management.ObjectName; import java.time.LocalDateTime; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 客户 Mapper @@ -186,4 +188,10 @@ public interface CrmCustomerMapper extends BaseMapperX { return selectCount(query); } + default Long selectCountByOwnerUserIds(Collection ownerUserIds, LocalDateTime[] times){ + return selectCount(new LambdaQueryWrapperX() + .in(CrmCustomerDO::getOwnerUserId, ownerUserIds) + .betweenIfPresent(CrmCustomerDO::getCreateTime, times)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java new file mode 100644 index 0000000000..bd19c75393 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.crm.dal.mysql.statistics; + +import org.apache.ibatis.annotations.Mapper; + +/** + * CRM 销售漏斗 Mapper + * + * @author HUIHUI + */ +@Mapper +public interface CrmStatisticsFunnelMapper { + + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java index 7bd899b64c..9ea2813994 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java @@ -194,4 +194,23 @@ public interface CrmBusinessService { */ List getBusinessListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId); + /** + * 获得商机数 + * + * @param ownerUserIds 负责人编号 + * @param times 时间范围 + * @param endStatus 商机结束状态 + * @return 商机数 + */ + Long getBusinessCountByOwnerUserIdsAndEndStatus(List ownerUserIds, LocalDateTime[] times, Integer endStatus); + + /** + * 获得商机列表【数据统计】 + * + * @param ownerUserIds 负责人编号 + * @param times 时间范围 + * @return 商机列表 + */ + List getBusinessListByOwnerUserIdsAndEndStatusNotNull(List ownerUserIds, LocalDateTime[] times); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index 26f02b2f00..f94d27e857 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -375,4 +375,20 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { return businessMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId); } + @Override + public Long getBusinessCountByOwnerUserIdsAndEndStatus(List ownerUserIds, LocalDateTime[] times, Integer endStatus) { + if (CollUtil.isEmpty(ownerUserIds)) { + return 0L; + } + return businessMapper.selectCountByOwnerUserIdsAndEndStatus(convertSet(ownerUserIds), times, endStatus); + } + + @Override + public List getBusinessListByOwnerUserIdsAndEndStatusNotNull(List ownerUserIds, LocalDateTime[] times) { + if (CollUtil.isEmpty(ownerUserIds)) { + return Collections.emptyList(); + } + return businessMapper.selectListByOwnerUserIdsAndEndStatusNotNull(convertSet(ownerUserIds), times); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerService.java index a99269e08a..0307dd890a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerService.java @@ -39,7 +39,7 @@ public interface CrmCustomerService { /** * 更新客户的跟进状态 * - * @param id 编号 + * @param id 编号 * @param dealStatus 跟进状态 */ void updateCustomerDealStatus(Long id, Boolean dealStatus); @@ -47,8 +47,8 @@ public interface CrmCustomerService { /** * 更新客户相关的跟进信息 * - * @param id 编号 - * @param contactNextTime 下次联系时间 + * @param id 编号 + * @param contactNextTime 下次联系时间 * @param contactLastContent 最后联系内容 */ void updateCustomerFollowUp(Long id, LocalDateTime contactNextTime, String contactLastContent); @@ -99,8 +99,8 @@ public interface CrmCustomerService { /** * 获得放入公海提醒的客户分页 * - * @param pageVO 分页查询 - * @param userId 用户编号 + * @param pageVO 分页查询 + * @param userId 用户编号 * @return 客户分页 */ PageResult getPutPoolRemindCustomerPage(CrmCustomerPageReqVO pageVO, Long userId); @@ -108,7 +108,7 @@ public interface CrmCustomerService { /** * 获得待进入公海的客户数量 * - * @param userId 用户编号 + * @param userId 用户编号 * @return 提醒数量 */ Long getPutPoolRemindCustomerCount(Long userId); @@ -195,4 +195,13 @@ public interface CrmCustomerService { */ int autoPutCustomerPool(); + /** + * 获得客户数 + * + * @param ownerUserIds 负责人编号 + * @param times 时间范围 + * @return 客户数 + */ + Long getCustomerCountByOwnerUserIds(List ownerUserIds, LocalDateTime[] times); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java index cdb7a32d9e..be708d3e3f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java @@ -47,6 +47,7 @@ import java.time.LocalDateTime; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.crm.enums.LogRecordConstants.*; @@ -650,6 +651,14 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { } } + @Override + public Long getCustomerCountByOwnerUserIds(List ownerUserIds, LocalDateTime[] times) { + if (CollUtil.isEmpty(ownerUserIds)) { + return 0L; + } + return customerMapper.selectCountByOwnerUserIds(convertSet(ownerUserIds), times); + } + /** * 获得自身的代理对象,解决 AOP 生效问题 * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java new file mode 100644 index 0000000000..d3d0b6d4cb --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; + +import java.util.List; + +/** + * CRM 销售漏斗分析 Service + * + * @author HUIHUI + */ +public interface CrmStatisticsFunnelService { + + /** + * 获得销售漏斗数据 + * + * @param reqVO 请求 + * @return 销售漏斗数据 + */ + CrmStatisticFunnelRespVO getFunnelSummary(CrmStatisticsFunnelReqVO reqVO); + + /** + * 获得商机结束状态统计 + * + * @param reqVO 请求 + * @return 商机结束状态统计 + */ + List getBusinessEndStatusSummary(CrmStatisticsFunnelReqVO reqVO); + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java new file mode 100644 index 0000000000..8dedb1c718 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.crm.service.statistics; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; +import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsFunnelMapper; +import cn.iocoder.yudao.module.crm.enums.business.CrmBusinessEndStatusEnum; +import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; +import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; + +/** + * CRM 销售漏斗分析 Service 实现类 + * + * @author HUIHUI + */ +@Service +public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelService { + + @Resource + private CrmStatisticsFunnelMapper funnelMapper; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private CrmCustomerService customerService; + @Resource + private CrmBusinessService businessService; + @Resource + private DeptApi deptApi; + + @Override + public CrmStatisticFunnelRespVO getFunnelSummary(CrmStatisticsFunnelReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return null; + } + reqVO.setUserIds(userIds); + + // 2. 获得漏斗数据 + return new CrmStatisticFunnelRespVO( + customerService.getCustomerCountByOwnerUserIds(userIds, reqVO.getTimes()), + businessService.getBusinessCountByOwnerUserIdsAndEndStatus(userIds, reqVO.getTimes(), null), + businessService.getBusinessCountByOwnerUserIdsAndEndStatus(userIds, reqVO.getTimes(), CrmBusinessEndStatusEnum.WIN.getStatus()) + ); + } + + @Override + public List getBusinessEndStatusSummary(CrmStatisticsFunnelReqVO reqVO) { + // 1. 获得用户编号数组 + List userIds = getUserIds(reqVO); + if (CollUtil.isEmpty(userIds)) { + return null; + } + reqVO.setUserIds(userIds); + + // 2.1 获得用户负责的商机 + List businessList = businessService.getBusinessListByOwnerUserIdsAndEndStatusNotNull(userIds, reqVO.getTimes()); + // 2.2 统计各阶段数据 + Map> businessMap = convertMultiMap(businessList, CrmBusinessDO::getEndStatus); + return convertList(CrmBusinessEndStatusEnum.values(), endStatusEnum -> { + List list = businessMap.get(endStatusEnum.getStatus()); + if (CollUtil.isEmpty(list)) { + return new CrmStatisticBusinessEndStatusRespVO(endStatusEnum.getStatus(), 0L, BigDecimal.ZERO); + } + return new CrmStatisticBusinessEndStatusRespVO(endStatusEnum.getStatus(), (long) list.size(), + getSumValue(list, CrmBusinessDO::getTotalPrice, BigDecimal::add)); + }); + } + + /** + * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 + * + * @param reqVO 请求参数 + * @return 用户编号数组 + */ + private List getUserIds(CrmStatisticsFunnelReqVO reqVO) { + // 情况一:选中某个用户 + if (ObjUtil.isNotNull(reqVO.getUserId())) { + return List.of(reqVO.getUserId()); + } + // 情况二:选中某个部门 + // 2.1 获得部门列表 + List deptIds = convertList(deptApi.getChildDeptList(reqVO.getDeptId()), DeptRespDTO::getId); + deptIds.add(reqVO.getDeptId()); + // 2.2 获得用户编号 + return convertList(adminUserApi.getUserListByDeptIds(deptIds), AdminUserRespDTO::getId); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index eae0128664..83cbb53e7a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -20,7 +20,6 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; -import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; /** * CRM 客户画像 Service 实现类 @@ -55,15 +54,18 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe // 3. 拼接数据 List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); - areaList.add(new Area().setId(null).setName("未知")); // TODO @puhui999:是不是 65 find 的逻辑改下;不用 findAndThen,直接从 areaMap 拿;拿到就设置,不拿到就设置 null 和 未知;这样,58 本行可以删除掉完事了;这样代码更简单和一致 Map areaMap = convertMap(areaList, Area::getId); return convertList(list, item -> { Integer parentId = AreaUtils.getParentIdByType(item.getAreaId(), AreaTypeEnum.PROVINCE); - if (parentId == null) { // 找不到,归到未知 - return item.setAreaId(null).setAreaName("未知"); + if (parentId != null) { + Area area = areaMap.get(parentId); + if (area != null) { + item.setAreaId(parentId).setAreaName(area.getName()); + return item; + } } - findAndThen(areaMap, parentId, area -> item.setAreaId(parentId).setAreaName(area.getName())); - return item; + // 找不到,归到未知 + return item.setAreaId(null).setAreaName("未知"); }); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml new file mode 100644 index 0000000000..8f68be5011 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml @@ -0,0 +1,5 @@ + + + + + -- Gitee From 85cd07aa87dbd1f95368e74f6a87cca7180a40b9 Mon Sep 17 00:00:00 2001 From: lihaiyang Date: Sat, 13 Apr 2024 23:30:34 +0800 Subject: [PATCH 0244/1557] =?UTF-8?q?bugfix=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=9C=A8?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=8E=88=E6=9D=83=E8=A7=92=E8=89=B2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/service/permission/MenuServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index 594094135c..25bc3e0293 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; import cn.iocoder.yudao.module.system.service.tenant.TenantService; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.utils.Lists; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.context.annotation.Lazy; @@ -130,6 +131,10 @@ public class MenuServiceImpl implements MenuService { @Override public List getMenuList(Collection ids) { + // 当ids为空时,返回一个空的实例对象 + if (CollUtil.isEmpty(ids)) { + return Lists.newArrayList(); + } return menuMapper.selectBatchIds(ids); } -- Gitee From 98319f68c32ce899bd90cbb6caf36da981297599 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 09:38:29 +0800 Subject: [PATCH 0245/1557] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0openapi?= =?UTF-8?q?=20=E4=BE=9D=E8=B5=96=E3=80=81mybatis=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index d5e12e5129..406c05c140 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -39,7 +39,14 @@ cn.iocoder.boot yudao-spring-boot-starter-test - + + cn.iocoder.boot + yudao-spring-boot-starter-mybatis + + + cn.iocoder.boot + yudao-spring-boot-starter-web + -- Gitee From 1e30e4851a3841606292bf572c6a866bffae8c04 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 14 Apr 2024 10:07:55 +0800 Subject: [PATCH 0246/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E6=B5=81=E7=A8=8B=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=AD=97=E6=AE=B5=E6=9D=83=E9=99=90=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmFieldPermissionEnum.java | 26 +++++++ .../admin/task/BpmTaskController.java | 8 ++- .../bpm/convert/task/BpmTaskConvert.java | 8 ++- .../core/enums/SimpleModelConstants.java | 24 +++++++ .../flowable/core/util/BpmnModelUtils.java | 23 +++++++ .../flowable/core/util/SimpleModelUtils.java | 61 ++++++++++++++--- .../bpm/service/util/BpmnFormUtils.java | 68 +++++++++++++++++++ 7 files changed, 206 insertions(+), 12 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java new file mode 100644 index 0000000000..18cc5e4ca1 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import cn.hutool.core.util.ArrayUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * BPM 表单权限的枚举 + * + * @author jason + */ +@Getter +@AllArgsConstructor +public enum BpmFieldPermissionEnum { + + EDITABLE(1, "可编辑"), + READONLY(2, "只读"), + HIDE(3, "隐藏"); + + private final Integer permission; + private final String name; + + public static BpmFieldPermissionEnum valueOf(Integer permission) { + return ArrayUtil.firstMatch(item -> item.getPermission().equals(permission), values()); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 7d72a133bd..1491e5fddf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; +import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; @@ -19,6 +20,7 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; +import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; @@ -50,6 +52,8 @@ public class BpmTaskController { private BpmProcessInstanceService processInstanceService; @Resource private BpmFormService formService; + @Resource + private BpmProcessDefinitionService bpmProcessDefinitionService; @Resource private AdminUserApi adminUserApi; @@ -134,8 +138,10 @@ public class BpmTaskController { // 获得 Form Map Map formMap = formService.getFormMap( convertSet(taskList, task -> NumberUtils.parseLong(task.getFormKey()))); + // 获得 BpmnModel + BpmnModel bpmnModel = bpmProcessDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()); return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, - formMap, userMap, deptMap)); + formMap, userMap, deptMap,bpmnModel)); } @PutMapping("/approve") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 5f4e915d3f..25fa107b06 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.Task; @@ -81,7 +82,8 @@ public interface BpmTaskConvert { HistoricProcessInstance processInstance, Map formMap, Map userMap, - Map deptMap) { + Map deptMap, + BpmnModel bpmnModel) { List taskVOList = CollectionUtils.convertList(taskList, task -> { BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)); @@ -92,6 +94,10 @@ public interface BpmTaskConvert { // 表单信息 BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class); if (form != null) { + // 测试一下权限处理 +// List afterChangedFields = BpmnFormUtils.changeCreateFormFiledPermissionRule(form.getFields(), +// BpmnModelUtils.parseFormFieldsPermission(bpmnModel, task.getTaskDefinitionKey())); + taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf()) .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java new file mode 100644 index 0000000000..bada4ecb87 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; + +/** + * 仿钉钉快搭 JSON 常量信息 + * + * @author jason + */ +public interface SimpleModelConstants { + + /** + * 流程表单字段权限, 用于标记字段权限 + */ + String FIELDS_PERMISSION = "fieldsPermission"; + + /** + * 字段属性 + */ + String FIELD_ATTRIBUTE = "field"; + + /** + * 权限属性 + */ + String PERMISSION_ATTRIBUTE = "permission"; +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index c514a97d7e..56edb8c3dc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -1,9 +1,12 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; @@ -11,6 +14,9 @@ import org.flowable.common.engine.impl.util.io.BytesStreamSource; import java.util.*; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELD_ATTRIBUTE; +import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; + /** * 流程模型转操作工具类 */ @@ -38,6 +44,23 @@ public class BpmnModelUtils { return candidateParam; } + public static Map parseFormFieldsPermission(BpmnModel bpmnModel, String flowElementId) { + FlowElement flowElement = getFlowElementById(bpmnModel, flowElementId); + if (flowElement == null) { + return null; + } + final HashMap fieldsPermission = MapUtil.newHashMap(); + List extensionElements = flowElement.getExtensionElements().get(SimpleModelConstants.FIELDS_PERMISSION); + extensionElements.forEach(el -> { + String field = el.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FIELD_ATTRIBUTE); + String permission = el.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, SimpleModelConstants.PERMISSION_ATTRIBUTE); + if (StrUtil.isNotEmpty(field) && StrUtil.isNotEmpty(permission)) { + fieldsPermission.put(field, Integer.parseInt(permission)); + } + }); + return fieldsPermission; + } + /** * 根据节点,获取入口连线 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index dbf7d64732..c4d39709ea 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; +import cn.hutool.core.lang.TypeReference; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; @@ -8,11 +10,13 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimp import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import org.flowable.bpmn.BpmnAutoLayout; -import org.flowable.bpmn.model.*; import org.flowable.bpmn.model.Process; +import org.flowable.bpmn.model.*; import java.util.List; +import java.util.Map; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELDS_PERMISSION; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX; @@ -71,7 +75,7 @@ public class SimpleModelUtils { case USER_TASK: case COPY_TASK: case PARALLEL_GATEWAY_JOIN: - case INCLUSIVE_GATEWAY_JOIN:{ + case INCLUSIVE_GATEWAY_JOIN: { SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null); mainProcess.addFlowElement(sequenceFlow); // 递归调用后续节点 @@ -80,7 +84,7 @@ public class SimpleModelUtils { } case PARALLEL_GATEWAY_FORK: case EXCLUSIVE_GATEWAY: - case INCLUSIVE_GATEWAY_FORK:{ + case INCLUSIVE_GATEWAY_FORK: { String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? BpmnModelConstants.END_EVENT_ID : childNode.getId(); List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); @@ -202,15 +206,20 @@ public class SimpleModelUtils { serviceTask.setName(node.getName()); // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners - addExtensionElement(node, serviceTask); + addCandidateElements(node, serviceTask); + return serviceTask; } - private static void addExtensionElement(BpmSimpleModelNodeVO node, FlowElement flowElement) { + + /** + * 给节点添加候选人元素 + */ + private static void addCandidateElements(BpmSimpleModelNodeVO node, FlowElement flowElement) { Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); - addExtensionElement(flowElement, FLOWABLE_EXTENSIONS_NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, + addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, candidateStrategy == null ? null : String.valueOf(candidateStrategy)); - addExtensionElement(flowElement, FLOWABLE_EXTENSIONS_NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, + addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); } @@ -245,16 +254,48 @@ public class SimpleModelUtils { UserTask userTask = new UserTask(); userTask.setId(node.getId()); userTask.setName(node.getName()); - addExtensionElement(node, userTask); + // TODO 暂时测试,后面去掉 + userTask.setFormKey("24"); + // 添加候选人元素 + addCandidateElements(node, userTask); + // 添加表单字段权限属性元素 + addFormFieldsPermission(node, userTask); return userTask; } - private static void addExtensionElement(FlowElement element, String namespace, String name, String value) { + /** + * 给节点添加表单字段权限元素 + */ + private static void addFormFieldsPermission(BpmSimpleModelNodeVO node, FlowElement flowElement) { + List> fieldsPermissions = MapUtil.get(node.getAttributes(), + FIELDS_PERMISSION, new TypeReference<>() {}); + if (CollUtil.isNotEmpty(fieldsPermissions)) { + fieldsPermissions.forEach(item -> addExtensionElement(flowElement, FIELDS_PERMISSION, item)); + } + } + + private static void addExtensionElement(FlowElement element, String name, Map attributes) { + if (attributes == null) { + return; + } + ExtensionElement extensionElement = new ExtensionElement(); + extensionElement.setNamespace(FLOWABLE_EXTENSIONS_NAMESPACE); + extensionElement.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); + extensionElement.setName(name); + attributes.forEach((key, value) -> { + ExtensionAttribute extensionAttribute = new ExtensionAttribute(key, value); + extensionAttribute.setNamespace(FLOWABLE_EXTENSIONS_NAMESPACE); + extensionElement.addAttribute(extensionAttribute); + }); + element.addExtensionElement(extensionElement); + } + + private static void addExtensionElement(FlowElement element, String name, String value) { if (value == null) { return; } ExtensionElement extensionElement = new ExtensionElement(); - extensionElement.setNamespace(namespace); + extensionElement.setNamespace(FLOWABLE_EXTENSIONS_NAMESPACE); extensionElement.setNamespacePrefix(FLOWABLE_EXTENSIONS_PREFIX); extensionElement.setElementText(value); extensionElement.setName(name); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java new file mode 100644 index 0000000000..c22385ea8c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.bpm.service.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmFieldPermissionEnum; +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELD_ATTRIBUTE; + +/** + * Bpmn 流程表单相关工具方法 + * + * @author jason + */ +public class BpmnFormUtils { + private static final String CREATE_FORM_DISPLAY_ATTRIBUTE = "display"; + private static final String CREATE_FORM_DISABLED_ATTRIBUTE = "disabled"; + + /** + * 修改 form-create 表单组件字段权限规则: 包括可编辑、只读、隐藏规则 + * @param fields 字段规则 + * @param fieldsPermission 字段权限 + * @return 修改权限后的字段规则 + */ + public static List changeCreateFormFiledPermissionRule(List fields, Map fieldsPermission) { + if ( CollUtil.isEmpty(fields) || MapUtil.isEmpty(fieldsPermission)) { + return fields; + } + List afterChangedFields = new ArrayList<>(fields.size()); + fields.forEach( f-> { + Map fieldMap = JsonUtils.parseObject(f, new TypeReference<>() {}); + String field = ObjUtil.defaultIfNull(fieldMap.get(FIELD_ATTRIBUTE), Object::toString, ""); + if (StrUtil.isEmpty(field) || !fieldsPermission.containsKey(field)) { + afterChangedFields.add(f); + return; + } + BpmFieldPermissionEnum fieldPermission = BpmFieldPermissionEnum.valueOf(fieldsPermission.get(field)); + Assert.notNull(fieldPermission, "字段权限不匹配"); + if (BpmFieldPermissionEnum.HIDE == fieldPermission) { + fieldMap.put(CREATE_FORM_DISPLAY_ATTRIBUTE, Boolean.FALSE); + } else if (BpmFieldPermissionEnum.EDITABLE == fieldPermission){ + Map props = MapUtil.get(fieldMap, "props", new cn.hutool.core.lang.TypeReference<>() {}); + if (props == null) { + props = MapUtil.newHashMap(); + fieldMap.put("props", props); + } + props.put(CREATE_FORM_DISABLED_ATTRIBUTE, Boolean.FALSE); + } else if (BpmFieldPermissionEnum.READONLY == fieldPermission) { + Map props = MapUtil.get(fieldMap, "props", new cn.hutool.core.lang.TypeReference<>() {}); + if (props == null) { + props = MapUtil.newHashMap(); + fieldMap.put("props", props); + } + props.put(CREATE_FORM_DISABLED_ATTRIBUTE, Boolean.TRUE); + } + afterChangedFields.add(JsonUtils.toJsonString(fieldMap)); + }); + return afterChangedFields; + } +} -- Gitee From 3c371dd4db625c22d63ce8cc34ac75162fb5a35a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:37:16 +0800 Subject: [PATCH 0247/1557] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/{ => chat}/ChatController.java | 30 +++++++++---------- .../app/{ => chat}/vo/ChatRoleAddReq.java | 2 +- .../app/{ => chat}/vo/ChatRoleListReq.java | 2 +- .../app/{ => chat}/vo/ChatRoleListRes.java | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/{ => chat}/ChatController.java (32%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/vo/ChatRoleAddReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/vo/ChatRoleListReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/vo/ChatRoleListRes.java (75%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java similarity index 32% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java index 8fbc6d9e63..90710a3dd3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java @@ -1,14 +1,15 @@ -package cn.iocoder.yudao.module.ai.controller.admin; +package cn.iocoder.yudao.module.ai.controller.admin.chat; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.config.AiClient; +import cn.iocoder.yudao.framework.ai.config.YudaoAiClient; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; 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.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * @author fansili @@ -17,18 +18,17 @@ import org.springframework.web.bind.annotation.RestController; */ @Tag(name = "AI模块") @RestController -@RequestMapping("/ai-api") +@RequestMapping("/admin-api/ai") @Slf4j @AllArgsConstructor public class ChatController { -// -// @Autowired -// private QianWenChatClient qianWenChatClient; -// -// @GetMapping("/chat") -// public String chat(@RequestParam("prompt") String prompt) { -// return qianWenChatClient.call(prompt); -// } + private final AiClient aiClient; + + @PostMapping("/chat") + public CommonResult chat(@RequestParam("prompt") String prompt) { + ChatResponse callRes = aiClient.call(new Prompt(prompt), "qianWen"); + return CommonResult.success(callRes.getResult().getOutput().getContent()); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java index b3957fafdb..b1c08e2862 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.vo; +package cn.iocoder.yudao.module.ai.controller.app.chat.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java index 355f00cf6f..18f3d46c0d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.vo; +package cn.iocoder.yudao.module.ai.controller.app.chat.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java similarity index 75% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java index d788e78767..6480296f21 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.vo; +package cn.iocoder.yudao.module.ai.controller.app.chat.vo; import lombok.Data; import lombok.experimental.Accessors; -- Gitee From 652a8f96332c5a59169b5e07ca0a5166dae910aa Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:38:31 +0800 Subject: [PATCH 0248/1557] =?UTF-8?q?=E8=B0=83=E6=95=B4=20chat=20role=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/OldChatController.java | 77 ------------------- .../ai/controller/admin/package-info.java | 5 ++ .../app/{ => chat}/vo/ChatRoleUpdateReq.java | 2 +- .../vo/ChatRoleUpdateVisibilityReq.java | 2 +- .../ai/controller/{ => app}/package-info.java | 2 +- 5 files changed, 8 insertions(+), 80 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/vo/ChatRoleUpdateReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/vo/ChatRoleUpdateVisibilityReq.java (87%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{ => app}/package-info.java (50%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java deleted file mode 100644 index 49fae6b623..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/OldChatController.java +++ /dev/null @@ -1,77 +0,0 @@ -//package cn.iocoder.yudao.module.ai.controller.admin; -// -//import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -//import cn.iocoder.yudao.framework.common.pojo.CommonResult; -//import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -//import cn.iocoder.yudao.module.ai.controller.admin.vo.AiChatReqVO; -//import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; -//import io.swagger.v3.oas.annotations.Operation; -//import io.swagger.v3.oas.annotations.tags.Tag; -//import jakarta.servlet.http.HttpServletResponse; -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.ai.chat.ChatClient; -//import org.springframework.ai.chat.ChatResponse; -//import org.springframework.ai.chat.prompt.Prompt; -//import org.springframework.ai.openai.OpenAiChatClient; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.ApplicationContext; -//import org.springframework.validation.annotation.Validated; -//import org.springframework.web.bind.annotation.PostMapping; -//import org.springframework.web.bind.annotation.RequestBody; -//import org.springframework.web.bind.annotation.RequestMapping; -//import org.springframework.web.bind.annotation.RestController; -//import reactor.core.publisher.Flux; -// -//import java.util.function.Consumer; -// -//// TODO done @fansili:有了 swagger 注释,就不用类注释了 -//@Tag(name = "AI模块") -//@RestController -//@RequestMapping("/ai-api") -//@Slf4j -//public class ChatController { -// -// @Autowired -// private ApplicationContext applicationContext; -// -// @PostMapping("/chat") -// @Operation(summary = "对话聊天", description = "简单的ai聊天") -// public CommonResult chat(@RequestBody @Validated AiChatReqVO reqVO) { -// ChatClient chatClient = getChatClient(reqVO.getAiModel()); -// String res; -// try { -// res = chatClient.call(reqVO.getPrompt()); -// } catch (Exception e) { -// res = e.getMessage(); -// } -// return CommonResult.success(res); -// } -// -// @PostMapping("/chatStream") -// @Operation(summary = "对话聊天chatStream", description = "简单的ai聊天") -// public CommonResult chatStream(HttpServletResponse response, @RequestBody @Validated AiChatReqVO reqVO) throws InterruptedException { -// OpenAiChatClient chatClient = applicationContext.getBean(OpenAiChatClient.class); -// Flux chatResponse = chatClient.stream(new Prompt(reqVO.getPrompt())); -// chatResponse.subscribe(new Consumer() { -// @Override -// public void accept(ChatResponse chatResponse) { -// System.err.println(chatResponse.getResults().get(0).getOutput().getContent()); -// } -// }); -// return CommonResult.success(null); -// } -// -// /** -// * 根据 ai模型 获取对于的 模型实现类 -// * -// * @param aiModelEnum -// * @return -// */ -// private ChatClient getChatClient(OpenAiModelEnum aiModelEnum) { -// if (OpenAiModelEnum.OPEN_AI_GPT_3_5 == aiModelEnum) { -// return applicationContext.getBean(OpenAiChatClient.class); -// } -// // AI模型暂不支持 -// throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODULE_NOT_SUPPORTED); -// } -//} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java new file mode 100644 index 0000000000..81fe7e4bb4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java @@ -0,0 +1,5 @@ +/** + * author: fansili + * time: 2024/3/4 13:08 + */ +package cn.iocoder.yudao.module.ai.controller.admin; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java index f5a8948814..0874fd6914 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.vo; +package cn.iocoder.yudao.module.ai.controller.app.chat.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java similarity index 87% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java index bd1836b5eb..fc76b5d4ca 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/vo/ChatRoleUpdateVisibilityReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.vo; +package cn.iocoder.yudao.module.ai.controller.app.chat.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java similarity index 50% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java index f154471727..a7675c99bd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java @@ -2,4 +2,4 @@ * author: fansili * time: 2024/3/4 13:08 */ -package cn.iocoder.yudao.module.ai.controller; \ No newline at end of file +package cn.iocoder.yudao.module.ai.controller.app; \ No newline at end of file -- Gitee From 97df2755f985fa7d9d92613a3236e4933d0480ad Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:39:09 +0800 Subject: [PATCH 0249/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0yudao=20ai=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/chatqianwen/QianWenChatClient.java | 2 + .../yudao/framework/ai/config/AiClient.java | 19 +++ .../ai/config/YudaoAiAutoConfiguration.java | 112 ++++++++---------- .../framework/ai/config/YudaoAiClient.java | 44 +++++++ 4 files changed, 117 insertions(+), 60 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/AiClient.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiClient.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index a8fb9105fa..7bab375866 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -36,6 +36,8 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenOptions qianWenOptions; + + public QianWenChatClient() {} public QianWenChatClient(QianWenApi qianWenApi) { this.qianWenApi = qianWenApi; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/AiClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/AiClient.java new file mode 100644 index 0000000000..f976dcfbf3 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/AiClient.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.framework.ai.config; + +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import reactor.core.publisher.Flux; + +/** + * ai client传入 + * + * @author fansili + * @time 2024/4/14 10:27 + * @since 1.0 + */ +public interface AiClient { + + ChatResponse call(Prompt prompt, String clientName); + + Flux stream(Prompt prompt, String clientName); +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 751b9df065..7e734cd2a9 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -14,7 +14,6 @@ import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; import cn.iocoder.yudao.framework.ai.exception.AiException; import org.springframework.beans.BeansException; import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -23,6 +22,7 @@ import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; import org.springframework.context.support.GenericApplicationContext; +import java.util.HashMap; import java.util.Map; /** @@ -36,11 +36,33 @@ import java.util.Map; @EnableConfigurationProperties(YudaoAiProperties.class) public class YudaoAiAutoConfiguration { - // TODO @芋艿:我看sharding jdbc 差不多这么玩的 @Bean - @ConditionalOnMissingBean(value = InitChatClient.class) - public InitChatClient initChatClient(YudaoAiProperties yudaoAiProperties) { - return new InitChatClient(yudaoAiProperties); + @ConditionalOnMissingBean(value = AiClient.class) + public AiClient aiClient(YudaoAiProperties yudaoAiProperties) { + Map chatClientMap = buildChatClientMap(yudaoAiProperties); + return new YudaoAiClient(chatClientMap); + } + + public Map buildChatClientMap(YudaoAiProperties yudaoAiProperties) { + Map chatMap = new HashMap<>(); + for (Map.Entry> properties : yudaoAiProperties.entrySet()) { + String beanName = properties.getKey(); + Map aiPlatformMap = properties.getValue(); + + // 检查平台类型是否正确 + String aiPlatform = String.valueOf(aiPlatformMap.get("aiPlatform")); + if (!AiPlatformEnum.mapValues.containsKey(aiPlatform)) { + throw new AiException("AI平台名称错误! 可以参考 AiPlatformEnum 类!"); + } + // 获取平台类型 + AiPlatformEnum aiPlatformEnum = AiPlatformEnum.mapValues.get(aiPlatform); + // 获取 chat properties + YudaoAiProperties.ChatProperties chatProperties = getChatProperties(aiPlatformEnum, aiPlatformMap); + // 创建客户端 + Object chatClient = createChatClient(chatProperties); + chatMap.put(beanName, chatClient); + } + return chatMap; } public static class InitChatClient implements InitializingBean, ApplicationContextAware { @@ -53,26 +75,8 @@ public class YudaoAiAutoConfiguration { } @Override - public void afterPropertiesSet() throws Exception { - for (Map.Entry> properties : yudaoAiProperties.entrySet()) { - String beanName = properties.getKey(); - Map aiPlatformMap = properties.getValue(); - - // 检查平台类型是否正确 - String aiPlatform = String.valueOf(aiPlatformMap.get("aiPlatform")); - if (!AiPlatformEnum.mapValues.containsKey(aiPlatform)) { - throw new AiException("AI平台名称错误! 可以参考 AiPlatformEnum 类!"); - } - // 获取平台类型 - AiPlatformEnum aiPlatformEnum = AiPlatformEnum.mapValues.get(aiPlatform); - // 获取 chat properties - YudaoAiProperties.ChatProperties chatProperties = getChatProperties(aiPlatformEnum, aiPlatformMap); - // 创建客户端 - registerChatClient(applicationContext, chatProperties, beanName); -// applicationContext.refresh(); - + public void afterPropertiesSet() { - } System.err.println(applicationContext.getBean("qianWen")); System.err.println(applicationContext.getBean("yiYan")); @@ -84,53 +88,41 @@ public class YudaoAiAutoConfiguration { } } - private static void registerChatClient(GenericApplicationContext applicationContext, YudaoAiProperties.ChatProperties chatProperties, String beanName) { - ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory(); - Object wrapperBean = null; + private static Object createChatClient(YudaoAiProperties.ChatProperties chatProperties) { if (AiPlatformEnum.XING_HUO == chatProperties.getAiPlatform()) { YudaoAiProperties.XingHuoProperties xingHuoProperties = (YudaoAiProperties.XingHuoProperties) chatProperties; - wrapperBean = beanFactory.initializeBean( - new XingHuoChatClient( - new XingHuoApi( - xingHuoProperties.getAppId(), - xingHuoProperties.getAppKey(), - xingHuoProperties.getSecretKey() - ), - new XingHuoOptions().setChatModel(xingHuoProperties.getChatModel()) + return new XingHuoChatClient( + new XingHuoApi( + xingHuoProperties.getAppId(), + xingHuoProperties.getAppKey(), + xingHuoProperties.getSecretKey() ), - beanName + new XingHuoOptions().setChatModel(xingHuoProperties.getChatModel()) ); } else if (AiPlatformEnum.QIAN_WEN == chatProperties.getAiPlatform()) { YudaoAiProperties.QianWenProperties qianWenProperties = (YudaoAiProperties.QianWenProperties) chatProperties; - wrapperBean = beanFactory.initializeBean(new QianWenChatClient( - new QianWenApi( - qianWenProperties.getAccessKeyId(), - qianWenProperties.getAccessKeySecret(), - qianWenProperties.getAgentKey(), - qianWenProperties.getEndpoint() - ), - new QianWenOptions() - .setAppId(qianWenProperties.getAppId()) + return new QianWenChatClient( + new QianWenApi( + qianWenProperties.getAccessKeyId(), + qianWenProperties.getAccessKeySecret(), + qianWenProperties.getAgentKey(), + qianWenProperties.getEndpoint() ), - beanName + new QianWenOptions() + .setAppId(qianWenProperties.getAppId()) ); } else if (AiPlatformEnum.YI_YAN == chatProperties.getAiPlatform()) { YudaoAiProperties.YiYanProperties yiYanProperties = (YudaoAiProperties.YiYanProperties) chatProperties; - - wrapperBean = beanFactory.initializeBean(new YiYanChatClient( - new YiYanApi( - yiYanProperties.getAppKey(), - yiYanProperties.getSecretKey(), - yiYanProperties.getChatModel(), - yiYanProperties.getRefreshTokenSecondTime() - ), - new YiYanOptions().setMax_output_tokens(2048)), - beanName - ); - } - if (wrapperBean != null) { - beanFactory.registerSingleton(beanName, wrapperBean); + return new YiYanChatClient( + new YiYanApi( + yiYanProperties.getAppKey(), + yiYanProperties.getSecretKey(), + yiYanProperties.getChatModel(), + yiYanProperties.getRefreshTokenSecondTime() + ), + new YiYanOptions().setMax_output_tokens(2048)); } + throw new AiException("不支持的Ai类型!"); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiClient.java new file mode 100644 index 0000000000..2f584c40a9 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiClient.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.framework.ai.config; + +import cn.iocoder.yudao.framework.ai.chat.ChatClient; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.exception.AiException; +import reactor.core.publisher.Flux; + +import java.util.Map; + +/** + * yudao ai client + * + * @author fansili + * @time 2024/4/14 10:27 + * @since 1.0 + */ +public class YudaoAiClient implements AiClient{ + + protected Map chatClientMap; + + public YudaoAiClient(Map chatClientMap) { + this.chatClientMap = chatClientMap; + } + + @Override + public ChatResponse call(Prompt prompt, String clientName) { + if (!chatClientMap.containsKey(clientName)) { + throw new AiException("clientName不存在!"); + } + ChatClient chatClient = (ChatClient) chatClientMap.get(clientName); + return chatClient.call(prompt); + } + + @Override + public Flux stream(Prompt prompt, String clientName) { + if (!chatClientMap.containsKey(clientName)) { + throw new AiException("clientName不存在!"); + } + StreamingChatClient streamingChatClient = (StreamingChatClient) chatClientMap.get(clientName); + return streamingChatClient.stream(prompt); + } +} -- Gitee From 239bc21f02809f33787163e63eb6d472a605bd39 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:39:37 +0800 Subject: [PATCH 0250/1557] =?UTF-8?q?=E8=B0=83=E6=95=B4=20chat=20role=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/admin/{ => chat}/vo/AiChatReqVO.java | 2 +- .../ai/controller/app/{ => chat}/AiChatRoleController.java | 3 ++- .../cn/iocoder/yudao/module/ai/service/ChatRoleService.java | 1 + .../iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/{ => chat}/vo/AiChatReqVO.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/{ => chat}/AiChatRoleController.java (94%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java index 643b6600da..881982a574 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/vo/AiChatReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.admin.vo; +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo; import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java similarity index 94% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java index 7103e37023..e59ae9b5d8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java @@ -1,6 +1,7 @@ -package cn.iocoder.yudao.module.ai.controller.app; +package cn.iocoder.yudao.module.ai.controller.app.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; import cn.iocoder.yudao.module.ai.controller.app.vo.*; import cn.iocoder.yudao.module.ai.service.ChatRoleService; import io.swagger.v3.oas.annotations.Operation; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java index 725ce77797..ac922939c5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; import cn.iocoder.yudao.module.ai.controller.app.vo.*; /** diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java index 7b930218a7..c386fb4680 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; import cn.iocoder.yudao.module.ai.controller.app.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -- Gitee From 330faf7b97b831ac7a1a3589a2f94cdfefb0963b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:40:14 +0800 Subject: [PATCH 0251/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/app/chat/AiChatRoleController.java | 1 - .../java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java | 1 - .../cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java | 1 - 3 files changed, 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java index e59ae9b5d8..785abdc12c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.ai.controller.app.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; -import cn.iocoder.yudao.module.ai.controller.app.vo.*; import cn.iocoder.yudao.module.ai.service.ChatRoleService; import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java index ac922939c5..e91429715c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; -import cn.iocoder.yudao.module.ai.controller.app.vo.*; /** * chat 角色 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java index c386fb4680..dc839c4b37 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; -import cn.iocoder.yudao.module.ai.controller.app.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -- Gitee From 73f334e2b4a64a8de7782e3fbb87a9b58b5d690c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:40:42 +0800 Subject: [PATCH 0252/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index 406c05c140..cb13949c0e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -26,26 +26,26 @@ cn.iocoder.boot - yudao-common + yudao-spring-boot-starter-ai + ${revision} - - + cn.iocoder.boot - yudao-spring-boot-starter-ai - ${revision} + yudao-common cn.iocoder.boot - yudao-spring-boot-starter-test + yudao-spring-boot-starter-web cn.iocoder.boot yudao-spring-boot-starter-mybatis + cn.iocoder.boot - yudao-spring-boot-starter-web + yudao-spring-boot-starter-test -- Gitee From 8b310c1dcef593d4ddd6fff0a3de00dea465484c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 13:40:54 +0800 Subject: [PATCH 0253/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20chat=20http?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/http/chat.http | 39 +++++++++++++++++++ .../main/resources/http/http-client.env.json | 6 +++ 2 files changed, 45 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http new file mode 100644 index 0000000000..03c829b856 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http @@ -0,0 +1,39 @@ + + +### 登录 + +POST {{baseUrl}}/admin-api/system/auth/login +Content-Type: application/json +tenant-id: 1 + +{ + "username": "admin", + "password": "123456", + "captchaVerification": "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", + "socialCode": "1024", + "socialState": "9b2ffbc1-7425-4155-9894-9d5c08541d62", + "socialCodeValid": true +} + +### chat call +POST {{baseUrl}}/admin-api/ai/chat?prompt=中国怎么样 +tenant-id: 1 +Authorization: {{token}} + + +### chat call +POST {{baseUrl}}/ai-api/chat +tenant-id: 1 +Authorization: {{token}} + + +### chat call +GET {{baseUrl}}/chat-role/list +tenant-id: 1 +Authorization: {{token}} + + + + + + diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json new file mode 100644 index 0000000000..5fd488f507 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json @@ -0,0 +1,6 @@ +{ + "dev": { + "baseUrl": "http://127.0.0.1:48080", + "token": "Bearer 07390ff2824a4798bcfd7f9395092181" + } +} \ No newline at end of file -- Gitee From 4b5910f97272fdeea053fddfa795eb9e00d17d14 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 15:51:57 +0800 Subject: [PATCH 0254/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Utf8SseEmitter?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=20=E4=B8=AD=E6=96=87=E4=B9=B1=E7=A0=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/Utf8SseEmitter.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java new file mode 100644 index 0000000000..d23f4e9b15 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.ai.controller; + +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +import java.nio.charset.StandardCharsets; + +/** + * 解决中文乱码 + * + * @author fansili + * @time 2024/4/14 15:13 + * @since 1.0 + */ +public class Utf8SseEmitter extends SseEmitter { + + @Override + protected void extendResponse(ServerHttpResponse outputMessage) { + super.extendResponse(outputMessage); + + HttpHeaders headers = outputMessage.getHeaders(); + headers.setContentType(new MediaType(MediaType.TEXT_EVENT_STREAM, StandardCharsets.UTF_8)); + } +} -- Gitee From a3530555ca82d259fc4cde2f84ece4467a39553f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 15:52:35 +0800 Subject: [PATCH 0255/1557] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=20chat?= =?UTF-8?q?=20=E5=92=8C=20chatStream?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{app/chat => }/AiChatRoleController.java | 4 +- .../module/ai/controller/ChatController.java | 76 +++++++++++++++++++ .../controller/admin/chat/ChatController.java | 34 --------- .../ai/controller/admin/package-info.java | 5 -- .../ai/controller/app/package-info.java | 5 -- .../module/ai/service/ChatRoleService.java | 2 +- .../{ => impl}/ChatRoleServiceImpl.java | 5 +- .../yudao/module/ai/service/package-info.java | 5 -- .../admin/chat => }/vo/AiChatReqVO.java | 2 +- .../app/chat => }/vo/ChatRoleAddReq.java | 2 +- .../app/chat => }/vo/ChatRoleListReq.java | 2 +- .../app/chat => }/vo/ChatRoleListRes.java | 2 +- .../app/chat => }/vo/ChatRoleUpdateReq.java | 2 +- .../vo/ChatRoleUpdateVisibilityReq.java | 2 +- .../src/main/resources/http/chat.http | 11 +-- .../main/resources/http/http-client.env.json | 2 +- .../ai/chatyiyan/YiYanChatClient.java | 6 ++ 17 files changed, 97 insertions(+), 70 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{app/chat => }/AiChatRoleController.java (93%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{ => impl}/ChatRoleServiceImpl.java (83%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/admin/chat => }/vo/AiChatReqVO.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/app/chat => }/vo/ChatRoleAddReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/app/chat => }/vo/ChatRoleListReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/app/chat => }/vo/ChatRoleListRes.java (75%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/app/chat => }/vo/ChatRoleUpdateReq.java (86%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{controller/app/chat => }/vo/ChatRoleUpdateVisibilityReq.java (87%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java index 785abdc12c..543754e911 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat; +package cn.iocoder.yudao.module.ai.controller; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; import cn.iocoder.yudao.module.ai.service.ChatRoleService; +import cn.iocoder.yudao.module.ai.vo.*; import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java new file mode 100644 index 0000000000..a465740468 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.ai.controller; + +import cn.hutool.core.exceptions.ExceptionUtil; +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.config.AiClient; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; +import reactor.core.publisher.Flux; + +import java.io.IOException; +import java.util.function.Consumer; + +/** + * @author fansili + * @time 2024/4/13 17:44 + * @since 1.0 + */ +@Tag(name = "AI模块") +@RestController +@RequestMapping("/ai") +@Slf4j +@AllArgsConstructor +public class ChatController { + + + + @Autowired + private AiClient aiClient; + + @GetMapping("/chat") + public CommonResult chat(@RequestParam("prompt") String prompt) { + ChatResponse callRes = aiClient.call(new Prompt(prompt), "qianWen"); + return CommonResult.success(callRes.getResult().getOutput().getContent()); + } + + // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed. + @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) + public SseEmitter chatStream(@RequestParam("prompt") String prompt) { + Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); + Flux streamResponse = aiClient.stream(new Prompt(prompt), "qianWen"); + streamResponse.subscribe( + new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + String content = chatResponse.getResults().get(0).getOutput().getContent(); + try { + sseEmitter.send(content, MediaType.APPLICATION_JSON); + } catch (IOException e) { + log.error("发送异常{}", ExceptionUtil.getMessage(e)); + // 如果不是因为关闭而抛出异常,则重新连接 + sseEmitter.completeWithError(e); + } + } + }, + error -> { + // + log.error("subscribe错误 {}", ExceptionUtil.getMessage(error)); + }, + () -> { + log.info("发送完成!"); + sseEmitter.complete(); + } + ); + return sseEmitter; + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java deleted file mode 100644 index 90710a3dd3..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatController.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat; - -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.config.AiClient; -import cn.iocoder.yudao.framework.ai.config.YudaoAiClient; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @author fansili - * @since 1.0 - * @time 2024/4/13 17:44 - */ -@Tag(name = "AI模块") -@RestController -@RequestMapping("/admin-api/ai") -@Slf4j -@AllArgsConstructor -public class ChatController { - - private final AiClient aiClient; - - @PostMapping("/chat") - public CommonResult chat(@RequestParam("prompt") String prompt) { - ChatResponse callRes = aiClient.call(new Prompt(prompt), "qianWen"); - return CommonResult.success(callRes.getResult().getOutput().getContent()); - } - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java deleted file mode 100644 index 81fe7e4bb4..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: fansili - * time: 2024/3/4 13:08 - */ -package cn.iocoder.yudao.module.ai.controller.admin; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java deleted file mode 100644 index a7675c99bd..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: fansili - * time: 2024/3/4 13:08 - */ -package cn.iocoder.yudao.module.ai.controller.app; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java index e91429715c..c4c46a5ef3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleService.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; +import cn.iocoder.yudao.module.ai.vo.*; /** * chat 角色 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatRoleServiceImpl.java similarity index 83% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatRoleServiceImpl.java index dc839c4b37..310e8f7660 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatRoleServiceImpl.java @@ -1,7 +1,8 @@ -package cn.iocoder.yudao.module.ai.service; +package cn.iocoder.yudao.module.ai.service.impl; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.app.chat.vo.*; +import cn.iocoder.yudao.module.ai.service.ChatRoleService; +import cn.iocoder.yudao.module.ai.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java deleted file mode 100644 index 671d5534fd..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: fansili - * time: 2024/3/3 18:14 - */ -package cn.iocoder.yudao.module.ai.service; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java index 881982a574..eafbecda56 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/AiChatReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import cn.iocoder.yudao.module.ai.enums.OpenAiModelEnum; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleAddReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleAddReq.java index b1c08e2862..2c2dfcbff8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleAddReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListReq.java index 18f3d46c0d..32a028b94c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListRes.java similarity index 75% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListRes.java index 6480296f21..8423c66b9c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleListRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateReq.java similarity index 86% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateReq.java index 0874fd6914..2f98e4f79f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateVisibilityReq.java similarity index 87% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateVisibilityReq.java index fc76b5d4ca..3ae25f4ab7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/chat/vo/ChatRoleUpdateVisibilityReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatRoleUpdateVisibilityReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.controller.app.chat.vo; +package cn.iocoder.yudao.module.ai.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http index 03c829b856..95a9284806 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http @@ -16,24 +16,17 @@ tenant-id: 1 } ### chat call -POST {{baseUrl}}/admin-api/ai/chat?prompt=中国怎么样 +GET {{baseUrl}}/ai/chat?prompt=中国怎么样 tenant-id: 1 Authorization: {{token}} -### chat call -POST {{baseUrl}}/ai-api/chat -tenant-id: 1 -Authorization: {{token}} - ### chat call -GET {{baseUrl}}/chat-role/list +GET {{baseUrl}}/ai/chatStream?prompt=苹果是什么颜色? tenant-id: 1 Authorization: {{token}} - - diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json index 5fd488f507..5beca6fd1b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json @@ -1,6 +1,6 @@ { "dev": { "baseUrl": "http://127.0.0.1:48080", - "token": "Bearer 07390ff2824a4798bcfd7f9395092181" + "token": "Bearer cff0ce99ddb14ea89c62ff4de1c31180" } } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java index c4be256da7..fae550da83 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java @@ -82,6 +82,12 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { YiYanChatCompletionRequest request = this.createRequest(prompt, true); // 调用 callWithFunctionSupport 发送请求 Flux response = this.yiYanApi.chatCompletionStream(request); + response.doOnComplete(new Runnable() { + @Override + public void run() { + String a = ";"; + } + }); return response.map(res -> new ChatResponse(List.of(new Generation(res.getResult())))); } -- Gitee From 009914ed73f125a21f6e07793a53b53595b81b9d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 15:55:08 +0800 Subject: [PATCH 0256/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20swagger=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/ai/controller/ChatController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java index a465740468..26d1d99224 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.config.AiClient; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -32,11 +33,10 @@ import java.util.function.Consumer; @AllArgsConstructor public class ChatController { - - @Autowired private AiClient aiClient; + @Operation(summary = "聊天-chat", description = "这个一般等待时间比较久,需要全部完成才会返回!") @GetMapping("/chat") public CommonResult chat(@RequestParam("prompt") String prompt) { ChatResponse callRes = aiClient.call(new Prompt(prompt), "qianWen"); @@ -44,6 +44,7 @@ public class ChatController { } // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed. + @Operation(summary = "聊天-stream", description = "这里跟通义千问一样采用的是 Server-Sent Events (SSE) 通讯模式") @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) public SseEmitter chatStream(@RequestParam("prompt") String prompt) { Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); -- Gitee From 7024c5ab608832e69da3321f7f05f4516a6cd565 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 16:05:29 +0800 Subject: [PATCH 0257/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20client=20name=20?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/enums/AiClientNameEnum.java | 28 +++++++++++++++++++ .../module/ai/controller/ChatController.java | 9 ++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java new file mode 100644 index 0000000000..8e1418e626 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ai client 名字 + * + * 这个需要根据配置文件起的来决定 + * + * @author fansili + * @time 2024/4/14 16:02 + * @since 1.0 + */ +@AllArgsConstructor +@Getter +public enum AiClientNameEnum { + + QIAN_WEN("qianWen", "千问模型!"), + YI_YAN("yiYan", "一言模型!"), + XING_HUO("xingHuo", "星火模型!"), + + ; + + private String name; + + private String message; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java index 26d1d99224..f873d6c52e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.config.AiClient; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import cn.iocoder.yudao.module.ai.service.ChatService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -22,6 +24,8 @@ import java.io.IOException; import java.util.function.Consumer; /** + * ia 模块 + * * @author fansili * @time 2024/4/13 17:44 * @since 1.0 @@ -35,11 +39,12 @@ public class ChatController { @Autowired private AiClient aiClient; + private final ChatService chatService; @Operation(summary = "聊天-chat", description = "这个一般等待时间比较久,需要全部完成才会返回!") @GetMapping("/chat") public CommonResult chat(@RequestParam("prompt") String prompt) { - ChatResponse callRes = aiClient.call(new Prompt(prompt), "qianWen"); + ChatResponse callRes = aiClient.call(new Prompt(prompt), AiClientNameEnum.QIAN_WEN.getName()); return CommonResult.success(callRes.getResult().getOutput().getContent()); } @@ -48,7 +53,7 @@ public class ChatController { @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) public SseEmitter chatStream(@RequestParam("prompt") String prompt) { Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - Flux streamResponse = aiClient.stream(new Prompt(prompt), "qianWen"); + Flux streamResponse = aiClient.stream(new Prompt(prompt), AiClientNameEnum.QIAN_WEN.getName()); streamResponse.subscribe( new Consumer() { @Override -- Gitee From 20b4bfd1b03fbcca713aa7d107491f53d592be9f Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 14 Apr 2024 16:31:53 +0800 Subject: [PATCH 0258/1557] =?UTF-8?q?CRM:=20=E5=AE=8C=E5=96=84=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=95=86=E6=9C=BA=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsFunnelController.java | 86 +++++++++++++- .../funnel/CrmStatisticsBusinessRespVO.java | 109 ++++++++++++++++++ ...StatisticsBusinessSummaryByDateRespVO.java | 21 ++++ .../vo/funnel/CrmStatisticsFunnelReqVO.java | 13 ++- .../dal/mysql/business/CrmBusinessMapper.java | 16 ++- .../statistics/CrmStatisticsFunnelMapper.java | 6 + .../service/business/CrmBusinessService.java | 19 +++ .../business/CrmBusinessServiceImpl.java | 14 +++ .../CrmStatisticsFunnelService.java | 19 +++ .../CrmStatisticsFunnelServiceImpl.java | 59 +++++++++- .../statistics/CrmStatisticsFunnelMapper.xml | 14 +++ 11 files changed, 367 insertions(+), 9 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessRespVO.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java index cbcd95265b..0880b12a16 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java @@ -1,10 +1,28 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessStatusDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessStatusTypeDO; +import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; +import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; +import cn.iocoder.yudao.module.crm.service.business.CrmBusinessStatusService; +import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsFunnelService; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; @@ -15,9 +33,14 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Collections; import java.util.List; +import java.util.Map; +import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @Tag(name = "管理后台 - CRM 销售漏斗") @RestController @@ -27,6 +50,19 @@ public class CrmStatisticsFunnelController { @Resource private CrmStatisticsFunnelService crmStatisticsFunnelService; + @Resource + private CrmBusinessService businessService; + @Resource + private CrmCustomerService customerService; + @Resource + private CrmBusinessStatusService businessStatusTypeService; + @Resource + private CrmBusinessStatusService businessStatusService; + + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; @GetMapping("/get-funnel-summary") @Operation(summary = "获取销售漏斗统计数据", description = "用于【销售漏斗】页面") @@ -35,7 +71,6 @@ public class CrmStatisticsFunnelController { return success(crmStatisticsFunnelService.getFunnelSummary(reqVO)); } - @GetMapping("/get-business-end-status-summary") @Operation(summary = "获取商机结束状态统计", description = "用于【销售漏斗】页面") @PreAuthorize("@ss.hasPermission('crm:statistics-funnel:query')") @@ -43,4 +78,53 @@ public class CrmStatisticsFunnelController { return success(crmStatisticsFunnelService.getBusinessEndStatusSummary(reqVO)); } + @GetMapping("/get-business-summary-by-date") + @Operation(summary = "获取新增商机分析(按日期)", description = "用于【销售漏斗】页面") + @PreAuthorize("@ss.hasPermission('crm:statistics-funnel:query')") + public CommonResult> getBusinessSummaryByDate(@Valid CrmStatisticsFunnelReqVO reqVO) { + return success(crmStatisticsFunnelService.getBusinessSummaryByDate(reqVO)); + } + + @GetMapping("/get-business-page-by-date") + @Operation(summary = "获得商机分页(按日期)", description = "用于【销售漏斗】页面") + @PreAuthorize("@ss.hasPermission('crm:business:query')") + public CommonResult> getBusinessPageByDate(@Valid CrmStatisticsFunnelReqVO pageVO) { + PageResult pageResult = crmStatisticsFunnelService.getBusinessPageByDate(pageVO); + return success(new PageResult<>(buildBusinessDetailList(pageResult.getList()), pageResult.getTotal())); + } + + private List buildBusinessDetailList(List list) { + if (CollUtil.isEmpty(list)) { + return Collections.emptyList(); + } + // 1.1 获取客户列表 + Map customerMap = customerService.getCustomerMap( + convertSet(list, CrmBusinessDO::getCustomerId)); + // 1.2 获取创建人、负责人列表 + Map userMap = adminUserApi.getUserMap(convertListByFlatMap(list, + contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); + Map deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); + // 1.3 获得商机状态组 + Map statusTypeMap = businessStatusTypeService.getBusinessStatusTypeMap( + convertSet(list, CrmBusinessDO::getStatusTypeId)); + Map statusMap = businessStatusService.getBusinessStatusMap( + convertSet(list, CrmBusinessDO::getStatusId)); + // 2. 拼接数据 + return BeanUtils.toBean(list, CrmBusinessRespVO.class, businessVO -> { + // 2.1 设置客户名称 + MapUtils.findAndThen(customerMap, businessVO.getCustomerId(), customer -> businessVO.setCustomerName(customer.getName())); + // 2.2 设置创建人、负责人名称 + MapUtils.findAndThen(userMap, NumberUtils.parseLong(businessVO.getCreator()), + user -> businessVO.setCreatorName(user.getNickname())); + MapUtils.findAndThen(userMap, businessVO.getOwnerUserId(), user -> { + businessVO.setOwnerUserName(user.getNickname()); + MapUtils.findAndThen(deptMap, user.getDeptId(), dept -> businessVO.setOwnerUserDeptName(dept.getName())); + }); + // 2.3 设置商机状态 + MapUtils.findAndThen(statusTypeMap, businessVO.getStatusTypeId(), statusType -> businessVO.setStatusTypeName(statusType.getName())); + MapUtils.findAndThen(statusMap, businessVO.getStatusId(), status -> businessVO.setStatusName( + businessService.getBusinessStatusName(businessVO.getEndStatus(), status))); + }); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessRespVO.java new file mode 100644 index 0000000000..48e4817acd --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessRespVO.java @@ -0,0 +1,109 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - CRM 商机 Response VO") +@Data +@ExcelIgnoreUnannotated +public class CrmStatisticsBusinessRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32129") + @ExcelProperty("编号") + private Long id; + + @Schema(description = "商机名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("商机名称") + private String name; + + @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10299") + private Long customerId; + @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("客户名称") + private String customerName; + + @Schema(description = "跟进状态", requiredMode = Schema.RequiredMode.REQUIRED, example ="true") + @ExcelProperty("跟进状态") + private Boolean followUpStatus; + + @Schema(description = "最后跟进时间") + @ExcelProperty("最后跟进时间") + private LocalDateTime contactLastTime; + + @Schema(description = "下次联系时间") + @ExcelProperty("下次联系时间") + private LocalDateTime contactNextTime; + + @Schema(description = "负责人的用户编号", example = "25682") + @ExcelProperty("负责人的用户编号") + private Long ownerUserId; + @Schema(description = "负责人名字", example = "25682") + @ExcelProperty("负责人名字") + private String ownerUserName; + @Schema(description = "负责人部门") + @ExcelProperty("负责人部门") + private String ownerUserDeptName; + + @Schema(description = "商机状态组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "25714") + private Long statusTypeId; + @Schema(description = "商机状组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "进行中") + @ExcelProperty("商机状态组") + private String statusTypeName; + + @Schema(description = "商机状态编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30320") + private Long statusId; + @Schema(description = "状态名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "跟进中") + @ExcelProperty("商机状态") + private String statusName; + + @Schema + @ExcelProperty("结束状态") + private Integer endStatus; + + @ExcelProperty("结束时的备注") + private String endRemark; + + @Schema(description = "预计成交日期") + @ExcelProperty("预计成交日期") + private LocalDateTime dealTime; + + @Schema(description = "产品总金额", example = "12025") + @ExcelProperty("产品总金额") + private BigDecimal totalProductPrice; + + @Schema(description = "整单折扣") + @ExcelProperty("整单折扣") + private BigDecimal discountPercent; + + @Schema(description = "商机总金额", example = "12371") + @ExcelProperty("商机总金额") + private BigDecimal totalPrice; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建人", example = "1024") + @ExcelProperty("创建人") + private String creator; + @Schema(description = "创建人名字", example = "芋道源码") + @ExcelProperty("创建人名字") + private String creatorName; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("更新时间") + private LocalDateTime updateTime; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java new file mode 100644 index 0000000000..7e5323525a --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - CRM 新增商机分析(按日期) VO") +@Data +public class CrmStatisticsBusinessSummaryByDateRespVO { + + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String time; + + @Schema(description = "新增商机数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer businessCreateCount; + + @Schema(description = "新增商机金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private BigDecimal businessDealCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java index 7edc6c59c7..fe15bc4995 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java @@ -1,8 +1,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; +import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; @@ -12,7 +17,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Schema(description = "管理后台 - CRM 销售漏斗 Request VO") @Data -public class CrmStatisticsFunnelReqVO { +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CrmStatisticsFunnelReqVO extends PageParam { @Schema(description = "部门 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "部门 id 不能为空") @@ -31,6 +38,10 @@ public class CrmStatisticsFunnelReqVO { @Schema(description = "负责人用户 id 集合", hidden = true, example = "2") private List userIds; + @Schema(description = "时间间隔类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @InEnum(value = DateIntervalEnum.class, message = "时间间隔类型,必须是 {value}") + private Integer interval; + /** * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 * 并作为参数传递给Mapper diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java index 88cfaa9fb2..5ee0908dc7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/business/CrmBusinessMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.crm.dal.mysql.business; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -14,7 +15,6 @@ import org.apache.ibatis.annotations.Mapper; import java.time.LocalDateTime; import java.util.Collection; import java.util.List; -import java.util.Set; /** * 商机 Mapper @@ -73,11 +73,23 @@ public interface CrmBusinessMapper extends BaseMapperX { .betweenIfPresent(CrmBusinessDO::getCreateTime, times)); } - default List selectListByOwnerUserIdsAndEndStatusNotNull(Collection ownerUserIds, LocalDateTime[] times){ + default List selectListByOwnerUserIdsAndEndStatusNotNull(Collection ownerUserIds, LocalDateTime[] times) { return selectList(new LambdaQueryWrapperX() .in(CrmBusinessDO::getOwnerUserId, ownerUserIds) .betweenIfPresent(CrmBusinessDO::getCreateTime, times) .isNotNull(CrmBusinessDO::getEndStatus)); } + default List selectListByOwnerUserIdsAndDate(Collection ownerUserIds, LocalDateTime[] times) { + return selectList(new LambdaQueryWrapperX() + .in(CrmBusinessDO::getOwnerUserId, ownerUserIds) + .betweenIfPresent(CrmBusinessDO::getCreateTime, times)); + } + + default PageResult selectPage(Collection ownerUserIds, LocalDateTime[] times, Integer pageNo, Integer pageSize) { + return selectPage(new PageParam().setPageNo(pageNo).setPageSize(pageSize), new LambdaQueryWrapperX() + .in(CrmBusinessDO::getOwnerUserId, ownerUserIds) + .betweenIfPresent(CrmBusinessDO::getCreateTime, times)); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java index bd19c75393..db84c0a502 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java @@ -1,7 +1,12 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerSummaryByDateRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * CRM 销售漏斗 Mapper * @@ -10,5 +15,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface CrmStatisticsFunnelMapper { + List selectBusinessCreateCountGroupByDate(CrmStatisticsFunnelReqVO reqVO); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java index 9ea2813994..950993d9b2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessService.java @@ -213,4 +213,23 @@ public interface CrmBusinessService { */ List getBusinessListByOwnerUserIdsAndEndStatusNotNull(List ownerUserIds, LocalDateTime[] times); + /** + * 获得商机列表【数据统计】 + * + * @param ownerUserIds 负责人编号 + * @param times 时间范围 + * @return 商机列表 + */ + List getBusinessListByOwnerUserIdsAndDate(List ownerUserIds, LocalDateTime[] times); + + /** + * 商机分页【数据统计】 + * @param ownerUserIds 负责人编号 + * @param times 时间范围 + * @param pageNo 页码 + * @param pageSize 数量 + * @return 商机分页 + */ + PageResult getBusinessPageByDate(List ownerUserIds, LocalDateTime[] times, Integer pageNo, Integer pageSize); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index f94d27e857..30debf3241 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -391,4 +391,18 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { return businessMapper.selectListByOwnerUserIdsAndEndStatusNotNull(convertSet(ownerUserIds), times); } + @Override + public List getBusinessListByOwnerUserIdsAndDate(List ownerUserIds, LocalDateTime[] times) { + if (CollUtil.isEmpty(ownerUserIds)) { + return Collections.emptyList(); + } + + return businessMapper.selectListByOwnerUserIdsAndDate(convertSet(ownerUserIds), times); + } + + @Override + public PageResult getBusinessPageByDate(List ownerUserIds, LocalDateTime[] times, Integer pageNo, Integer pageSize) { + return businessMapper.selectPage(ownerUserIds, times, pageNo, pageSize); + } + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java index d3d0b6d4cb..04fcada701 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java @@ -1,8 +1,11 @@ package cn.iocoder.yudao.module.crm.service.statistics; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import java.util.List; @@ -29,4 +32,20 @@ public interface CrmStatisticsFunnelService { */ List getBusinessEndStatusSummary(CrmStatisticsFunnelReqVO reqVO); + /** + * 获取新增商机分析(按日期) + * + * @param reqVO 请求 + * @return 新增商机分析 + */ + List getBusinessSummaryByDate(CrmStatisticsFunnelReqVO reqVO); + + /** + * 获得商机分页(按日期) + * + * @param pageVO 请求 + * @return 商机分页 + */ + PageResult getBusinessPageByDate(CrmStatisticsFunnelReqVO pageVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java index 8dedb1c718..03aac4aa93 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java @@ -2,8 +2,11 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticBusinessEndStatusRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelRespVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsFunnelMapper; @@ -18,10 +21,15 @@ import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; /** * CRM 销售漏斗分析 Service 实现类 @@ -63,14 +71,13 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic @Override public List getBusinessEndStatusSummary(CrmStatisticsFunnelReqVO reqVO) { // 1. 获得用户编号数组 - List userIds = getUserIds(reqVO); - if (CollUtil.isEmpty(userIds)) { - return null; + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { + return Collections.emptyList(); } - reqVO.setUserIds(userIds); // 2.1 获得用户负责的商机 - List businessList = businessService.getBusinessListByOwnerUserIdsAndEndStatusNotNull(userIds, reqVO.getTimes()); + List businessList = businessService.getBusinessListByOwnerUserIdsAndEndStatusNotNull(reqVO.getUserIds(), reqVO.getTimes()); // 2.2 统计各阶段数据 Map> businessMap = convertMultiMap(businessList, CrmBusinessDO::getEndStatus); return convertList(CrmBusinessEndStatusEnum.values(), endStatusEnum -> { @@ -83,6 +90,48 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic }); } + @Override + public List getBusinessSummaryByDate(CrmStatisticsFunnelReqVO reqVO) { + // 1. 获得用户编号数组 + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { + return Collections.emptyList(); + } + + // 2. 按天统计,获取分项统计数据 + List businessCreateCountList = funnelMapper.selectBusinessCreateCountGroupByDate(reqVO); + List businessList = businessService.getBusinessListByOwnerUserIdsAndDate(reqVO.getUserIds(), reqVO.getTimes()); + Map businessDealCountMap = businessList.stream().collect(Collectors.groupingBy(business -> + business.getCreateTime().format(DateTimeFormatter.ofPattern(FORMAT_YEAR_MONTH_DAY)), + Collectors.reducing(BigDecimal.ZERO, CrmBusinessDO::getTotalPrice, BigDecimal::add))); + + // 3. 按照日期间隔,合并数据 + List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); + return convertList(timeRanges, times -> { + Integer businessCreateCount = businessCreateCountList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToInt(CrmStatisticsBusinessSummaryByDateRespVO::getBusinessCreateCount).sum(); + BigDecimal businessDealCount = businessDealCountMap.entrySet().stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getKey())) + .map(Map.Entry::getValue) + .reduce(BigDecimal.ZERO, BigDecimal::add); + return new CrmStatisticsBusinessSummaryByDateRespVO() + .setTime(LocalDateTimeUtils.formatDateRange(times[0], times[1], reqVO.getInterval())) + .setBusinessCreateCount(businessCreateCount).setBusinessDealCount(businessDealCount); + }); + } + + @Override + public PageResult getBusinessPageByDate(CrmStatisticsFunnelReqVO pageVO) { + // 1. 获得用户编号数组 + pageVO.setUserIds(getUserIds(pageVO)); + if (CollUtil.isEmpty(pageVO.getUserIds())) { + return PageResult.empty(); + } + + return businessService.getBusinessPageByDate(pageVO.getUserIds(), pageVO.getTimes(), pageVO.getPageNo(), pageVO.getPageSize()); + } + /** * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml index 8f68be5011..c01cf1ddc8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml @@ -2,4 +2,18 @@ + + -- Gitee From ef701167b76fd2757da5e0d23b08b02a1b7af057 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 17:24:02 +0800 Subject: [PATCH 0259/1557] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=20chat?= =?UTF-8?q?=20service=202=E3=80=81=E5=8F=AF=E5=8A=A8=E6=80=81=E4=BC=A0?= =?UTF-8?q?=E5=85=A5=20modal=EF=BC=8C=E9=80=89=E6=8B=A9=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/enums/AiClientNameEnum.java | 9 +++ .../module/ai/controller/ChatController.java | 15 +++-- ...ontroller.java => ChatRoleController.java} | 2 +- .../yudao/module/ai/service/ChatService.java | 33 ++++++++++ .../ai/service/impl/ChatServiceImpl.java | 62 +++++++++++++++++++ .../iocoder/yudao/module/ai/vo/ChatReq.java | 42 +++++++++++++ 6 files changed, 154 insertions(+), 9 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{AiChatRoleController.java => ChatRoleController.java} (98%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java index 8e1418e626..13c06bdd35 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java @@ -25,4 +25,13 @@ public enum AiClientNameEnum { private String name; private String message; + + public static AiClientNameEnum valueOfName(String name) { + for (AiClientNameEnum nameEnum : AiClientNameEnum.values()) { + if (nameEnum.getName().equals(name)) { + return nameEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + name); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java index f873d6c52e..3a71c54345 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -2,20 +2,20 @@ package cn.iocoder.yudao.module.ai.controller; import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.config.AiClient; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; import cn.iocoder.yudao.module.ai.service.ChatService; +import cn.iocoder.yudao.module.ai.vo.ChatReq; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import reactor.core.publisher.Flux; @@ -43,17 +43,16 @@ public class ChatController { @Operation(summary = "聊天-chat", description = "这个一般等待时间比较久,需要全部完成才会返回!") @GetMapping("/chat") - public CommonResult chat(@RequestParam("prompt") String prompt) { - ChatResponse callRes = aiClient.call(new Prompt(prompt), AiClientNameEnum.QIAN_WEN.getName()); - return CommonResult.success(callRes.getResult().getOutput().getContent()); + public CommonResult chat(@Validated @ModelAttribute ChatReq req) { + return CommonResult.success(chatService.chat(req)); } // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed. @Operation(summary = "聊天-stream", description = "这里跟通义千问一样采用的是 Server-Sent Events (SSE) 通讯模式") @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) - public SseEmitter chatStream(@RequestParam("prompt") String prompt) { + public SseEmitter chatStream(@Validated @ModelAttribute ChatReq req) { Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - Flux streamResponse = aiClient.stream(new Prompt(prompt), AiClientNameEnum.QIAN_WEN.getName()); + Flux streamResponse = chatService.chatStream(req); streamResponse.subscribe( new Consumer() { @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java similarity index 98% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java index 543754e911..4b3e61c091 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java @@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/chat-role") @AllArgsConstructor -public class AiChatRoleController { +public class ChatRoleController { private final ChatRoleService chatRoleService; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java new file mode 100644 index 0000000000..aa1c54fb0d --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.ai.service; + +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import cn.iocoder.yudao.module.ai.vo.ChatReq; +import reactor.core.publisher.Flux; + +/** + * 聊天 chat + * + * @author fansili + * @time 2024/4/14 15:55 + * @since 1.0 + */ +public interface ChatService { + + /** + * chat + * + * @param req + * @return + */ + String chat(ChatReq req); + + /** + * chat stream + * + * @param req + * @param clientNameEnum + * @return + */ + Flux chatStream(ChatReq req); +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java new file mode 100644 index 0000000000..8531594db3 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.ai.service.impl; + +import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.config.AiClient; +import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import cn.iocoder.yudao.module.ai.service.ChatService; +import cn.iocoder.yudao.module.ai.vo.ChatReq; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import reactor.core.publisher.Flux; + +/** + * 聊天 service + * + * @author fansili + * @time 2024/4/14 15:55 + * @since 1.0 + */ +@Slf4j +@Service +@AllArgsConstructor +public class ChatServiceImpl implements ChatService { + + private final AiClient aiClient; + + /** + * chat + * + * @param req + * @return + */ + public String chat(ChatReq req) { + AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); + // 创建 chat 需要的 Prompt + Prompt prompt = new Prompt(req.getPrompt()); + req.setTopK(req.getTopK()); + req.setTopP(req.getTopP()); + req.setTemperature(req.getTemperature()); + // 发送 call 调用 + ChatResponse call = aiClient.call(prompt, clientNameEnum.getName()); + return call.getResult().getOutput().getContent(); + } + + /** + * chat stream + * + * @param req + * @return + */ + @Override + public Flux chatStream(ChatReq req) { + AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); + // 创建 chat 需要的 Prompt + Prompt prompt = new Prompt(req.getPrompt()); + req.setTopK(req.getTopK()); + req.setTopP(req.getTopP()); + req.setTemperature(req.getTemperature()); + return aiClient.stream(prompt, clientNameEnum.getName()); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java new file mode 100644 index 0000000000..754cb05728 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.ai.vo; + +import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat req + * + * @author fansili + * @time 2024/4/14 16:12 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class ChatReq { + + + @NotNull(message = "提示词不能为空!") + @Size(max = 3000, message = "提示词最大3000个字符!") + @Schema(description = "填入固定值,1 issues, 2 pr") + private String prompt; + + @Schema(description = "用于控制随机性和多样性的温度参数") + private Float temperature; + + @Schema(description = "生成时,核采样方法的概率阈值。例如,取值为0.8时,仅保留累计概率之和大于等于0.8的概率分布中的token,\n" + + " * 作为随机采样的候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的随机性越低。\n" + + " * 默认值为0.8。注意,取值不要大于等于1\n") + private Float topP; + + @Schema(description = "在生成消息时采用的Top-K采样大小,表示模型生成回复时考虑的候选项集合的大小") + private Integer topK; + + @Schema(description = "ai模型(查看 AiClientNameEnum)") + @NotNull(message = "模型不能为空!") + @Size(max = 30, message = "模型字符最大30个字符!") + private String modal; +} -- Gitee From 15b76c1d1a43fff26cf917e7bde164020b4e842a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 17:24:43 +0800 Subject: [PATCH 0260/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/module/ai/service/ChatService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java index aa1c54fb0d..f72c52493b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java @@ -26,7 +26,6 @@ public interface ChatService { * chat stream * * @param req - * @param clientNameEnum * @return */ Flux chatStream(ChatReq req); -- Gitee From 7c8ec404dbdfea597aa2c8aaf59219fc48c75c0d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 17:31:54 +0800 Subject: [PATCH 0261/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A8=A1=E5=9E=8B=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java | 2 +- yudao-server/src/main/resources/application-local.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java index 13c06bdd35..9dc5149e75 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiClientNameEnum.java @@ -17,7 +17,7 @@ import lombok.Getter; public enum AiClientNameEnum { QIAN_WEN("qianWen", "千问模型!"), - YI_YAN("yiYan", "一言模型!"), + YI_YAN_3_5_8K("yiYan3_5_8k", "文心一言(3.5-8k)"), XING_HUO("xingHuo", "星火模型!"), ; diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index fc3f358f10..87b40adb26 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -243,7 +243,7 @@ yudao: appKey: cb6415c19d6162cda07b47316fcb0416 secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh chatModel: XING_HUO_3_5 - yiYan: + yiYan3_5_8k: aiPlatform: YI_YAN temperature: 1 topP: 1 -- Gitee From bff0ad65dcbf15e5fa683fd864b9a43a8ce224d7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 17:39:30 +0800 Subject: [PATCH 0262/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0do=E5=90=8E?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataobject/{AiChatMessage.java => AiChatMessageDO.java} | 2 +- .../ai/dataobject/{AiChatRole.java => AiChatRoleDO.java} | 2 +- .../iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java | 4 ++-- .../cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/{AiChatMessage.java => AiChatMessageDO.java} (98%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/{AiChatRole.java => AiChatRoleDO.java} (97%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java similarity index 98% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java index e4968b91be..416b3f0f9f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessage.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java @@ -13,7 +13,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class AiChatMessage { +public class AiChatMessageDO { /** * 编号,作为每条聊天记录的唯一标识符 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java similarity index 97% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java index 04ebfe0cf4..a049e3cfc7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRole.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRole extends BaseDO { +public class AiChatRoleDO extends BaseDO { /** * 编号,表示聊天角色在数据库中的唯一标识符 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java index 91526ab79c..0545a7e2f7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dataobject.AiChatMessage; +import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -13,5 +13,5 @@ import org.springframework.stereotype.Repository; */ @Repository @Mapper -public interface AiChatMessageMapper extends BaseMapperX { +public interface AiChatMessageMapper extends BaseMapperX { } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java index 09a662fe70..32393c4091 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dataobject.AiChatRole; +import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -13,5 +13,5 @@ import org.springframework.stereotype.Repository; */ @Repository @Mapper -public interface AiChatRoleMapper extends BaseMapperX { +public interface AiChatRoleMapper extends BaseMapperX { } -- Gitee From be0c81458d7d0e9a11fec8a5c1ba615fb61ed261 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 18:38:06 +0800 Subject: [PATCH 0263/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=EF=BC=8Cnew=E8=BF=98=E6=98=AF=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/enums/ChatConversationTypeEnum.java | 36 ++++++++++++++++ .../ai/dataobject/AiChatConversationDO.java | 42 +++++++++++++++++++ .../ai/mapper/AiChatConversationMapper.java | 24 +++++++++++ 3 files changed, 102 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java new file mode 100644 index 0000000000..4a699618d9 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 对话类型 + * 创建对话、继续对话 + * + * @author fansili + * @time 2024/4/14 18:15 + * @since 1.0 + */ +@AllArgsConstructor +@Getter +public enum ChatConversationTypeEnum { + + NEW("new", "新建对话"), + CONTINUE("continue", "继续对话"), + + ; + + private String type; + + private String name; + + public static ChatConversationTypeEnum valueOfType(String type) { + for (ChatConversationTypeEnum itemEnum : ChatConversationTypeEnum.values()) { + if (itemEnum.getType().equals(type)) { + return itemEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + type); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java new file mode 100644 index 0000000000..8f19563929 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.ai.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 交谈 + * + * @author fansili + * @time 2024/4/14 17:35 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +@TableName("ai_chat_conversation") +public class AiChatConversationDO extends BaseDO { + + @Schema(description = "id") + private Long id; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "chat角色Id") + private Long chatRoleId; + + @Schema(description = "chat角色名称") + private String chatRoleName; + + @Schema(description = "对话标题(有程序自动生成)") + private String chatTitle; + + @Schema(description = "对话标题(有程序自动生成)") + private Integer chatCount; + + @Schema(description = "对话类型(roleChat、userChat)") + private String chatType; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java new file mode 100644 index 0000000000..6e018a8923 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.ai.mapper; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** + * message mapper + * + * @fansili + * @since v1.0 + */ +@Repository +@Mapper +public interface AiChatConversationMapper extends BaseMapperX { + + + @Update("update ai_chat_conversation set chat_count = chat_count + 1 where id = #{id}") + void updateIncrChatCount(@Param("id") Long id); + +} -- Gitee From a2bd9b710e95bf1def28a9955cbf8b4cc69ee119 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 18:39:30 +0800 Subject: [PATCH 0264/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E5=BC=82=E5=B8=B8=E3=80=81role=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 9ca5f09ad7..d4ecf4df83 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -14,4 +14,6 @@ public interface ErrorCodeConstants { // TODO @fansili:1)类注释不太对;2)中英文之间,有个空格;例如说 AI 模型 ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI模型暂不支持!"); + ErrorCode AI_CHAT_ROLE_NOT_EXISTENT = new ErrorCode(1_022_000_001, "AI Role 不存在!");; + ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话id不能为空!");; } -- Gitee From 779499222507f20c2a4fe1157fabde3881f280e0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 18:40:42 +0800 Subject: [PATCH 0265/1557] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=20=E5=88=9B=E5=BB=BA=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E3=80=81=E8=BF=98=E6=98=AF=E7=BB=A7=E7=BB=AD=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/enums/ChatTypeEnum.java | 34 ++++++ .../module/ai/dataobject/AiChatMessageDO.java | 6 +- .../ai/service/impl/ChatServiceImpl.java | 102 ++++++++++++++++-- .../iocoder/yudao/module/ai/vo/ChatReq.java | 16 ++- .../ai/chat/messages/AbstractMessage.java | 2 +- 5 files changed, 145 insertions(+), 15 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatTypeEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatTypeEnum.java new file mode 100644 index 0000000000..cdf7c3ba0a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatTypeEnum.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 聊天类型 + * + * @author fansili + * @time 2024/4/14 17:58 + * @since 1.0 + */ +@AllArgsConstructor +@Getter +public enum ChatTypeEnum { + + ROLE_CHAT("roleChat", "角色模板聊天"), + USER_CHAT("userChat", "用户普通聊天"), + + ; + + private String type; + + private String name; + + public static ChatTypeEnum valueOfType(String type) { + for (ChatTypeEnum itemEnum : ChatTypeEnum.values()) { + if (itemEnum.getType().equals(type)) { + return itemEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + type); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java index 416b3f0f9f..9047180ec0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java @@ -23,12 +23,12 @@ public class AiChatMessageDO { /** * 聊天ID,关联到特定的会话或对话 */ - private Long chatId; + private Long chatConversationId; /** * 角色ID,用于标识发送消息的用户或系统的身份 */ - private String userId; + private Long userId; /** * 消息具体内容,存储用户的发言或者系统响应的文字信息 @@ -38,7 +38,7 @@ public class AiChatMessageDO { /** * 消息类型,枚举值可能包括'system'(系统消息)、'user'(用户消息)和'assistant'(助手消息) */ - private Double messageType; + private String messageType; /** * 在生成消息时采用的Top-K采样大小, diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 8531594db3..6fe2261811 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -1,14 +1,28 @@ package cn.iocoder.yudao.module.ai.service.impl; +import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.chat.ChatResponse; +import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.config.AiClient; +import cn.iocoder.yudao.framework.common.exception.ServerException; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import cn.iocoder.yudao.module.ai.enums.ChatConversationTypeEnum; +import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; +import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; +import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.ChatService; import cn.iocoder.yudao.module.ai.vo.ChatReq; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; /** @@ -24,6 +38,10 @@ import reactor.core.publisher.Flux; public class ChatServiceImpl implements ChatService { private final AiClient aiClient; + private final AiChatRoleMapper aiChatRoleMapper; + private final AiChatMessageMapper aiChatMessageMapper; + private final AiChatConversationMapper aiChatConversationMapper; + /** * chat @@ -31,16 +49,84 @@ public class ChatServiceImpl implements ChatService { * @param req * @return */ + @Transactional(rollbackFor = Exception.class) public String chat(ChatReq req) { + // 获取 client 类型 AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); - // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(req.getPrompt()); - req.setTopK(req.getTopK()); - req.setTopP(req.getTopP()); - req.setTemperature(req.getTemperature()); - // 发送 call 调用 - ChatResponse call = aiClient.call(prompt, clientNameEnum.getName()); - return call.getResult().getOutput().getContent(); + // 获取 对话类型(新建还是继续) + ChatConversationTypeEnum chatConversationTypeEnum = ChatConversationTypeEnum.valueOfType(req.getConversationType()); + + AiChatConversationDO aiChatConversationDO; + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { + // 创建一个新的对话 + aiChatConversationDO = createNewChatConversation(req, loginUserId); + } else { + // 继续对话 + if (req.getConversationId() == null) { + throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); + } + aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); + } + + String content; + try { + // 创建 chat 需要的 Prompt + Prompt prompt = new Prompt(req.getPrompt()); + req.setTopK(req.getTopK()); + req.setTopP(req.getTopP()); + req.setTemperature(req.getTemperature()); + // 发送 call 调用 + ChatResponse call = aiClient.call(prompt, clientNameEnum.getName()); + content = call.getResult().getOutput().getContent(); + } catch (Exception e) { + content = ExceptionUtil.getMessage(e); + } + + // 增加 chat message 记录 + aiChatMessageMapper.insert( + new AiChatMessageDO() + .setId(null) + .setChatConversationId(aiChatConversationDO.getId()) + .setUserId(loginUserId) + .setMessage(req.getPrompt()) + .setMessageType(MessageType.USER.getValue()) + .setTopK(req.getTopK()) + .setTopP(req.getTopP()) + .setTemperature(req.getTemperature()) + ); + + // chat count 先+1 + aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); + return content; + } + + private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { + // 获取 chat 角色 + String chatRoleName = null; + ChatTypeEnum chatTypeEnum = null; + Long chatRoleId = req.getChatRoleId(); + if (req.getChatRoleId() != null) { + AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(chatRoleId); + if (aiChatRoleDO == null) { + throw new ServerException(ErrorCodeConstants.AI_CHAT_ROLE_NOT_EXISTENT); + } + chatTypeEnum = ChatTypeEnum.ROLE_CHAT; + chatRoleName = aiChatRoleDO.getRoleName(); + } else { + chatTypeEnum = ChatTypeEnum.USER_CHAT; + } + // + AiChatConversationDO insertChatConversation = new AiChatConversationDO() + .setId(null) + .setUserId(loginUserId) + .setChatRoleId(req.getChatRoleId()) + .setChatRoleName(chatRoleName) + .setChatType(chatTypeEnum.getType()) + .setChatCount(1) + .setChatTitle(req.getPrompt().substring(0, 20) + "..."); + aiChatConversationMapper.insert(insertChatConversation); + return insertChatConversation; } /** diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java index 754cb05728..321d429c5e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java @@ -24,19 +24,29 @@ public class ChatReq { @Schema(description = "填入固定值,1 issues, 2 pr") private String prompt; + @Schema(description = "chat角色模板") + private Long chatRoleId; + @Schema(description = "用于控制随机性和多样性的温度参数") - private Float temperature; + private Double temperature; @Schema(description = "生成时,核采样方法的概率阈值。例如,取值为0.8时,仅保留累计概率之和大于等于0.8的概率分布中的token,\n" + " * 作为随机采样的候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的随机性越低。\n" + " * 默认值为0.8。注意,取值不要大于等于1\n") - private Float topP; + private Double topP; @Schema(description = "在生成消息时采用的Top-K采样大小,表示模型生成回复时考虑的候选项集合的大小") - private Integer topK; + private Double topK; @Schema(description = "ai模型(查看 AiClientNameEnum)") @NotNull(message = "模型不能为空!") @Size(max = 30, message = "模型字符最大30个字符!") private String modal; + + @Schema(description = "对话类型(new、continue)") + @NotNull(message = "对话类型,不能为空!") + private String conversationType; + + @Schema(description = "对话Id") + private Long conversationId; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java index d622cf9f87..8c8e60d5a6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java @@ -59,7 +59,7 @@ public abstract class AbstractMessage implements Message { } protected AbstractMessage(MessageType messageType, String textContent, List mediaData, - Map messageProperties) { + Map messageProperties) { Assert.notNull(messageType, "Message type must not be null"); Assert.notNull(textContent, "Content must not be null"); -- Gitee From b925c2c7ccaa00336cf4e8b024db63d61d995173 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 18:41:03 +0800 Subject: [PATCH 0266/1557] =?UTF-8?q?spring-web=20=E6=94=B9=E4=B8=BA=20sta?= =?UTF-8?q?rt=20security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index cb13949c0e..d87818569e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -36,7 +36,7 @@ cn.iocoder.boot - yudao-spring-boot-starter-web + yudao-spring-boot-starter-security cn.iocoder.boot -- Gitee From efab5517d79c1b4eb025db8e90810516ee8b7e0e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 14 Apr 2024 18:41:21 +0800 Subject: [PATCH 0267/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20chat=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-module-ai-biz/src/main/resources/http/chat.http | 4 ++-- .../src/main/resources/http/http-client.env.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http index 95a9284806..1b645017ee 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http @@ -16,14 +16,14 @@ tenant-id: 1 } ### chat call -GET {{baseUrl}}/ai/chat?prompt=中国怎么样 +GET {{baseUrl}}/ai/chat?prompt=中国怎么样&modal=qianWen tenant-id: 1 Authorization: {{token}} ### chat call -GET {{baseUrl}}/ai/chatStream?prompt=苹果是什么颜色? +GET {{baseUrl}}/ai/chatStream?prompt=苹果是什么颜色?&modal=yiYan3_5_8k tenant-id: 1 Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json index 5beca6fd1b..c5adaf3e14 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json @@ -1,6 +1,6 @@ { "dev": { "baseUrl": "http://127.0.0.1:48080", - "token": "Bearer cff0ce99ddb14ea89c62ff4de1c31180" + "token": "Bearer 7d25823e225f4e0d8f9a96b0fa608649" } } \ No newline at end of file -- Gitee From 5159da30b4b5cf0fe290b8a1f411709ade6bcdd4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 14 Apr 2024 20:13:31 +0800 Subject: [PATCH 0268/1557] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E5=AE=A2=E6=88=B7=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/CrmStatisticsCustomerService.java | 2 +- .../statistics/CrmStatisticsCustomerServiceImpl.java | 11 +++-------- .../mapper/statistics/CrmStatisticsCustomerMapper.xml | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 56ecf975ed..70c720b9ea 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService { /** * 客户成交周期(按日期) - *

+ * * 成交周期的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 * * @param reqVO 请求参数 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index c5b933c439..b7b9a08d17 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -310,8 +310,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } // 3. 拼接数据 - Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), - Area::getId); + Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), Area::getId); return convertList(dealCycleByAreaList, vo -> { if (vo.getAreaId() != null) { Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE); @@ -331,12 +330,8 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取客户产品统计数据 - List dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); - if (CollUtil.isEmpty(dealCycleByProductList)) { - return Collections.emptyList(); - } - - return dealCycleByProductList; + // TODO @dhb52:未读取产品名 + return customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index e850a0c882..7c1016dffa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -16,7 +16,6 @@ GROUP BY time - - SELECT DATE_FORMAT(create_time, '%Y-%m-%d') AS time, COUNT(*) AS businessCreateCount + SELECT + DATE_FORMAT(create_time, '%Y-%m-%d') AS time, + COUNT(*) AS businessCreateCount FROM crm_business WHERE deleted = 0 AND owner_user_id IN - - #{userId} - - AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND - #{times[1],javaType=java.time.LocalDateTime} + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} GROUP BY time -- Gitee From 488f99b512390f497556f31a7909cb5804c1343c Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 14 Apr 2024 21:55:45 +0800 Subject: [PATCH 0270/1557] =?UTF-8?q?fix:=20selectCustomerDealCycleGroupBy?= =?UTF-8?q?ProductId=E4=BD=BF=E7=94=A8LEFT=20JOIN=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E5=AD=90=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/statistics/CrmStatisticsCustomerMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 7c1016dffa..dc10f12218 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -243,14 +243,17 @@ + SELECT COUNT(*) + FROM crm_customer + WHERE deleted = 0 + AND owner_user_id IN + + #{userId} + + AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND + #{times[1],javaType=java.time.LocalDateTime} + + + + + + + -- Gitee From c573585e75a292a9e35d5c73a4ec3bee015eedd2 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 15 Apr 2024 16:40:36 +0800 Subject: [PATCH 0274/1557] =?UTF-8?q?CRM:=20=E6=96=B0=E5=A2=9E=E5=95=86?= =?UTF-8?q?=E6=9C=BA=E8=B5=A2=E5=8D=95=E8=BD=AC=E5=8C=96=E7=8E=87=E5=88=86?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsFunnelController.java | 12 ++++--- ...inessInversionRateSummaryByDateRespVO.java | 21 ++++++++++++ ...StatisticsBusinessSummaryByDateRespVO.java | 2 +- .../statistics/CrmStatisticsFunnelMapper.java | 3 ++ .../CrmStatisticsFunnelService.java | 13 ++++--- .../CrmStatisticsFunnelServiceImpl.java | 34 +++++++++++++++---- .../statistics/CrmStatisticsFunnelMapper.xml | 17 ++++++++++ 7 files changed, 87 insertions(+), 15 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessInversionRateSummaryByDateRespVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java index 2750c211e6..85e0c3d4e3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java @@ -5,10 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.crm.controller.admin.business.CrmBusinessController; import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByEndStatusRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelSummaryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.*; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsFunnelService; import io.swagger.v3.oas.annotations.Operation; @@ -55,6 +52,13 @@ public class CrmStatisticsFunnelController { return success(funnelService.getBusinessSummaryByDate(reqVO)); } + @GetMapping("/get-business-inversion-rate-summary-by-date") + @Operation(summary = "获取商机转化率分析(按日期)", description = "用于【销售漏斗】页面") + @PreAuthorize("@ss.hasPermission('crm:statistics-funnel:query')") + public CommonResult> getBusinessInversionRateSummaryByDate(@Valid CrmStatisticsFunnelReqVO reqVO) { + return success(funnelService.getBusinessInversionRateSummaryByDate(reqVO)); + } + @GetMapping("/get-business-page-by-date") @Operation(summary = "获得商机分页(按日期)", description = "用于【销售漏斗】页面的【新增商机分析】") @PreAuthorize("@ss.hasPermission('crm:business:query')") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessInversionRateSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessInversionRateSummaryByDateRespVO.java new file mode 100644 index 0000000000..b7650a91d2 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessInversionRateSummaryByDateRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - CRM 商机转化率分析(按日期) VO") +@Data +public class CrmStatisticsBusinessInversionRateSummaryByDateRespVO { + + @Schema(description = "时间轴", requiredMode = Schema.RequiredMode.REQUIRED, example = "202401") + private String time; + + @Schema(description = "商机数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long businessCount; + + @Schema(description = "赢单商机数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long businessWinCount; + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java index f364409d9a..1f8056c466 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsBusinessSummaryByDateRespVO.java @@ -13,7 +13,7 @@ public class CrmStatisticsBusinessSummaryByDateRespVO { private String time; @Schema(description = "新增商机数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Integer businessCreateCount; + private Long businessCreateCount; @Schema(description = "新增商机金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private BigDecimal totalPrice; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java index e300b6636d..d69fa62906 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsFunnelMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.crm.dal.mysql.statistics; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessInversionRateSummaryByDateRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByEndStatusRespVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; @@ -24,4 +25,6 @@ public interface CrmStatisticsFunnelMapper { List selectBusinessSummaryGroupByDate(CrmStatisticsFunnelReqVO reqVO); + List selectBusinessInversionRateSummaryByDate(CrmStatisticsFunnelReqVO reqVO); + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java index 141ba068a3..10458daac4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelService.java @@ -1,10 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByEndStatusRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelSummaryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.*; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import java.util.List; @@ -40,6 +37,14 @@ public interface CrmStatisticsFunnelService { */ List getBusinessSummaryByDate(CrmStatisticsFunnelReqVO reqVO); + /** + * 获得商机转化率分析(按日期) + * + * @param reqVO 请求 + * @return 商机转化率分析 + */ + List getBusinessInversionRateSummaryByDate(CrmStatisticsFunnelReqVO reqVO); + /** * 获得商机分页(按日期) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java index 5f5efb0469..635f577d16 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java @@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticFunnelSummaryRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByEndStatusRespVO; -import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsFunnelReqVO; +import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.*; import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsFunnelMapper; import cn.iocoder.yudao.module.crm.enums.business.CrmBusinessEndStatusEnum; @@ -85,9 +82,9 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic // 3. 按照日期间隔,合并数据 List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); return convertList(timeRanges, times -> { - Integer businessCreateCount = businessSummaryList.stream() + Long businessCreateCount = businessSummaryList.stream() .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) - .mapToInt(CrmStatisticsBusinessSummaryByDateRespVO::getBusinessCreateCount).sum(); + .mapToLong(CrmStatisticsBusinessSummaryByDateRespVO::getBusinessCreateCount).sum(); BigDecimal businessDealCount = businessSummaryList.stream() .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) .map(CrmStatisticsBusinessSummaryByDateRespVO::getTotalPrice) @@ -98,6 +95,31 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic }); } + @Override + public List getBusinessInversionRateSummaryByDate(CrmStatisticsFunnelReqVO reqVO) { + // 1. 获得用户编号数组 + reqVO.setUserIds(getUserIds(reqVO)); + if (CollUtil.isEmpty(reqVO.getUserIds())) { + return Collections.emptyList(); + } + + // 2. 按天统计,获取分项统计数据 + List businessSummaryList = funnelMapper.selectBusinessInversionRateSummaryByDate(reqVO); + // 3. 按照日期间隔,合并数据 + List timeRanges = LocalDateTimeUtils.getDateRangeList(reqVO.getTimes()[0], reqVO.getTimes()[1], reqVO.getInterval()); + return convertList(timeRanges, times -> { + Long businessCount = businessSummaryList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToLong(CrmStatisticsBusinessInversionRateSummaryByDateRespVO::getBusinessCount).sum(); + Long businessWinCount = businessSummaryList.stream() + .filter(vo -> LocalDateTimeUtils.isBetween(times[0], times[1], vo.getTime())) + .mapToLong(CrmStatisticsBusinessInversionRateSummaryByDateRespVO::getBusinessWinCount).sum(); + return new CrmStatisticsBusinessInversionRateSummaryByDateRespVO() + .setTime(LocalDateTimeUtils.formatDateRange(times[0], times[1], reqVO.getInterval())) + .setBusinessCount(businessCount).setBusinessWinCount(businessWinCount); + }); + } + @Override public PageResult getBusinessPageByDate(CrmStatisticsFunnelReqVO pageVO) { // 1. 获得用户编号数组 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml index 27c205de90..f61b4dfc23 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml @@ -60,4 +60,21 @@ GROUP BY time + + -- Gitee From 1d239c98776b22d055550a8b4db708e3d974efd7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 16 Apr 2024 09:17:11 +0800 Subject: [PATCH 0275/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20rabbitmq=20?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E6=96=B9=E5=BC=8F=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20Jackson2JsonMessageConverter=20=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YudaoRabbitMQAutoConfiguration.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java index 770c50ff7d..af14673764 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.framework.mq.rabbitmq.config; -import cn.hutool.core.util.ReflectUtil; import lombok.extern.slf4j.Slf4j; -import org.springframework.amqp.utils.SerializationUtils; +import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; +import org.springframework.amqp.support.converter.MessageConverter; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; - -import java.lang.reflect.Field; +import org.springframework.context.annotation.Bean; /** * RabbitMQ 消息队列配置类 @@ -18,12 +17,12 @@ import java.lang.reflect.Field; @ConditionalOnClass(name = "org.springframework.amqp.rabbit.core.RabbitTemplate") public class YudaoRabbitMQAutoConfiguration { - static { - // 强制设置 SerializationUtils 的 TRUST_ALL 为 true,避免 RabbitMQ Consumer 反序列化消息报错 - // 为什么不通过设置 spring.amqp.deserialization.trust.all 呢?因为可能在 SerializationUtils static 初始化后 - Field trustAllField = ReflectUtil.getField(SerializationUtils.class, "TRUST_ALL"); - ReflectUtil.removeFinalModify(trustAllField); - ReflectUtil.setFieldValue(SerializationUtils.class, trustAllField, true); + /** + * Jackson2JsonMessageConverter Bean:使用 jackson 序列化消息 + */ + @Bean + public MessageConverter createMessageConverter() { + return new Jackson2JsonMessageConverter(); } } -- Gitee From 905ce773e92b811c343853931bebfc0f8b896360 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 16 Apr 2024 20:39:52 +0800 Subject: [PATCH 0276/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96swagger=20=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/ai/vo/ChatReq.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java index 321d429c5e..67828e6ba2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.ai.vo; -import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; @@ -18,14 +17,25 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class ChatReq { + @Schema(description = "chat角色模板") + private Long chatRoleId; + + @Schema(description = "对话Id") + private Long conversationId; + + @Schema(description = "对话类型(new、continue),如果是new会创建一个新的对话,continue就会继续对话!") + @NotNull(message = "对话类型,不能为空!") + private String conversationType; @NotNull(message = "提示词不能为空!") - @Size(max = 3000, message = "提示词最大3000个字符!") + @Size(max = 5000, message = "提示词最大5000个字符!") @Schema(description = "填入固定值,1 issues, 2 pr") private String prompt; - @Schema(description = "chat角色模板") - private Long chatRoleId; + @Schema(description = "ai模型(查看 AiClientNameEnum)") + @NotNull(message = "模型不能为空!") + @Size(max = 30, message = "模型字符最大30个字符!") + private String modal; @Schema(description = "用于控制随机性和多样性的温度参数") private Double temperature; @@ -38,15 +48,4 @@ public class ChatReq { @Schema(description = "在生成消息时采用的Top-K采样大小,表示模型生成回复时考虑的候选项集合的大小") private Double topK; - @Schema(description = "ai模型(查看 AiClientNameEnum)") - @NotNull(message = "模型不能为空!") - @Size(max = 30, message = "模型字符最大30个字符!") - private String modal; - - @Schema(description = "对话类型(new、continue)") - @NotNull(message = "对话类型,不能为空!") - private String conversationType; - - @Schema(description = "对话Id") - private Long conversationId; } -- Gitee From b5af357dfc7ec6426f6a427ddb7d1411c61e1933 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 14 Apr 2024 22:09:11 +0800 Subject: [PATCH 0277/1557] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=9A=84=20bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/crm/service/clue/CrmClueServiceImpl.java | 2 +- .../service/comment/ProductCommentServiceImpl.java | 2 +- .../system/controller/admin/dept/vo/dept/DeptRespVO.java | 2 +- .../controller/admin/dept/vo/dept/DeptSaveReqVO.java | 2 +- .../system/controller/admin/dept/vo/post/PostRespVO.java | 2 +- .../controller/admin/dept/vo/post/PostSaveReqVO.java | 2 +- .../controller/admin/dict/vo/data/DictDataRespVO.java | 2 +- .../controller/admin/dict/vo/data/DictDataSaveReqVO.java | 2 +- .../controller/admin/permission/vo/menu/MenuRespVO.java | 2 +- .../controller/admin/permission/vo/menu/MenuSaveVO.java | 2 +- .../controller/admin/permission/vo/role/RoleRespVO.java | 2 +- .../admin/permission/vo/role/RoleSaveReqVO.java | 2 +- .../system/service/permission/MenuServiceImpl.java | 9 +++++++-- 13 files changed, 19 insertions(+), 14 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java index 70ebeb44da..9724eeaf27 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java @@ -120,7 +120,7 @@ public class CrmClueServiceImpl implements CrmClueService { } @Override - @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_FOLLOW_UP_SUB_TYPE, bizNo = "{{#id}", + @LogRecord(type = CRM_CLUE_TYPE, subType = CRM_CLUE_FOLLOW_UP_SUB_TYPE, bizNo = "{{#id}}", success = CRM_CLUE_FOLLOW_UP_SUCCESS) @CrmPermission(bizType = CrmBizTypeEnum.CRM_CLUE, bizId = "#id", level = CrmPermissionLevelEnum.WRITE) public void updateClueFollowUp(Long id, LocalDateTime contactNextTime, String contactLastContent) { diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java index a089e26734..83c8e93a18 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/comment/ProductCommentServiceImpl.java @@ -113,7 +113,7 @@ public class ProductCommentServiceImpl implements ProductCommentService { // 更新可见状态 productCommentMapper.updateById(new ProductCommentDO().setId(updateReqVO.getId()) - .setVisible(true)); + .setVisible(updateReqVO.getVisible())); } @Override diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java index 777cb75de1..83e6ed085f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java @@ -18,7 +18,7 @@ public class DeptRespVO { @Schema(description = "父部门 ID", example = "1024") private Long parentId; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Integer sort; @Schema(description = "负责人的用户编号", example = "2048") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java index 7b395dac8a..4d25b7cfbc 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java @@ -25,7 +25,7 @@ public class DeptSaveReqVO { @Schema(description = "父部门 ID", example = "1024") private Long parentId; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java index a037a132a3..dde6f95097 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java @@ -27,7 +27,7 @@ public class PostRespVO { @ExcelProperty("岗位编码") private String code; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("岗位排序") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSaveReqVO.java index 91f69e5456..5ac2be3729 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSaveReqVO.java @@ -26,7 +26,7 @@ public class PostSaveReqVO { @Size(max = 64, message = "岗位编码长度不能超过64个字符") private String code; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java index e0b940a58a..8857a7059c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java @@ -19,7 +19,7 @@ public class DictDataRespVO { @ExcelProperty("字典编码") private Long id; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("字典排序") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java index 8e4ee4f272..ca71572acc 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java @@ -16,7 +16,7 @@ public class DictDataSaveReqVO { @Schema(description = "字典数据编号", example = "1024") private Long id; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java index 39e752942a..8dff186e04 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java @@ -28,7 +28,7 @@ public class MenuRespVO { @NotNull(message = "菜单类型不能为空") private Integer type; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSaveVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSaveVO.java index beb4b38691..9f96f19ad0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSaveVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSaveVO.java @@ -27,7 +27,7 @@ public class MenuSaveVO { @NotNull(message = "菜单类型不能为空") private Integer type; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java index f249406fa2..e7b48c8bcc 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java @@ -30,7 +30,7 @@ public class RoleRespVO { @ExcelProperty("角色标志") private String code; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("角色排序") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java index dc97bc2767..ee5951fc00 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java @@ -27,7 +27,7 @@ public class RoleSaveReqVO { @DiffLogField(name = "角色标志") private String code; - @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "显示顺序不能为空") @DiffLogField(name = "显示顺序") private Integer sort; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index 694a64d2f9..beee296d11 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -2,14 +2,16 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuSaveVO; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuSaveVO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.MenuMapper; import cn.iocoder.yudao.module.system.dal.redis.RedisKeyConstants; import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; import cn.iocoder.yudao.module.system.service.tenant.TenantService; import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.Lists; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -17,7 +19,6 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; @@ -130,6 +131,10 @@ public class MenuServiceImpl implements MenuService { @Override public List getMenuList(Collection ids) { + // 当 ids 为空时,返回一个空的实例对象 + if (CollUtil.isEmpty(ids)) { + return Lists.newArrayList(); + } return menuMapper.selectBatchIds(ids); } -- Gitee From 98743db4806d34a84947d0ffdd65756b5fdeeaa4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 15 Apr 2024 12:34:06 +0800 Subject: [PATCH 0278/1557] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20rocketmq=20?= =?UTF-8?q?=E5=9C=A8=20spring=20boot=203.x=20=E7=9A=84=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index f5a03a90bd..025269a4fa 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -31,7 +31,7 @@ 3.26.0 8.1.3.62 - 2.2.3 + 2.3.0 2.2.7 2.1.0 -- Gitee From 222afd48af6f7f435ec92b6fa86597e25175bbb6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 16 Apr 2024 09:17:11 +0800 Subject: [PATCH 0279/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20rabbitmq=20?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E6=96=B9=E5=BC=8F=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20Jackson2JsonMessageConverter=20=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YudaoRabbitMQAutoConfiguration.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java index 770c50ff7d..af14673764 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/rabbitmq/config/YudaoRabbitMQAutoConfiguration.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.framework.mq.rabbitmq.config; -import cn.hutool.core.util.ReflectUtil; import lombok.extern.slf4j.Slf4j; -import org.springframework.amqp.utils.SerializationUtils; +import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; +import org.springframework.amqp.support.converter.MessageConverter; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; - -import java.lang.reflect.Field; +import org.springframework.context.annotation.Bean; /** * RabbitMQ 消息队列配置类 @@ -18,12 +17,12 @@ import java.lang.reflect.Field; @ConditionalOnClass(name = "org.springframework.amqp.rabbit.core.RabbitTemplate") public class YudaoRabbitMQAutoConfiguration { - static { - // 强制设置 SerializationUtils 的 TRUST_ALL 为 true,避免 RabbitMQ Consumer 反序列化消息报错 - // 为什么不通过设置 spring.amqp.deserialization.trust.all 呢?因为可能在 SerializationUtils static 初始化后 - Field trustAllField = ReflectUtil.getField(SerializationUtils.class, "TRUST_ALL"); - ReflectUtil.removeFinalModify(trustAllField); - ReflectUtil.setFieldValue(SerializationUtils.class, trustAllField, true); + /** + * Jackson2JsonMessageConverter Bean:使用 jackson 序列化消息 + */ + @Bean + public MessageConverter createMessageConverter() { + return new Jackson2JsonMessageConverter(); } } -- Gitee From b20ff55511c2206a0b78d8081aeeb8e3895ecb3b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 18 Apr 2024 09:19:07 +0800 Subject: [PATCH 0280/1557] =?UTF-8?q?code=20review=EF=BC=9A=E9=94=80?= =?UTF-8?q?=E5=94=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/CrmStatisticsFunnelMapper.xml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml index f61b4dfc23..a07406259e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml @@ -3,19 +3,23 @@ - SELECT end_status AS endStatus,COUNT(*) AS businessCount, SUM(total_price) AS totalPrice + SELECT + end_status AS endStatus, + COUNT(*) AS businessCount, + SUM(total_price) AS totalPrice FROM crm_business WHERE deleted = 0 AND end_status IS NOT NULL AND owner_user_id IN @@ -46,9 +53,9 @@ SELECT - DATE_FORMAT(create_time, '%Y-%m-%d') AS time, - COUNT(*) AS businessCount, - SUM(IF(end_status = 1, 1, 0)) AS businessWinCount + DATE_FORMAT(create_time, '%Y-%m-%d') AS time, + COUNT(*) AS businessCount, + SUM(IF(end_status = 1, 1, 0)) AS businessWinCount FROM crm_business WHERE deleted = 0 AND owner_user_id IN -- Gitee From 5d390d2d65fb2213c97f333fb59837874cd62bcf Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 18 Apr 2024 12:38:38 +0800 Subject: [PATCH 0281/1557] =?UTF-8?q?bpm=EF=BC=9Acode=20review=20=E5=BF=AB?= =?UTF-8?q?=E6=90=AD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/definition/BpmFieldPermissionEnum.java | 8 ++++++++ .../enums/definition/BpmSimpleModelNodeType.java | 1 + .../controller/admin/task/BpmTaskController.java | 2 +- .../module/bpm/convert/task/BpmTaskConvert.java | 1 + .../core/enums/SimpleModelConstants.java | 7 +++++-- .../flowable/core/util/BpmnModelUtils.java | 16 +++++++++------- .../flowable/core/util/SimpleModelUtils.java | 1 - .../module/bpm/service/util/BpmnFormUtils.java | 3 +++ 8 files changed, 28 insertions(+), 11 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java index 18cc5e4ca1..d5410e2181 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java @@ -13,14 +13,22 @@ import lombok.Getter; @AllArgsConstructor public enum BpmFieldPermissionEnum { + // TODO @jason:改成 WRITE、READ、NONE,更符合权限的感觉哈 EDITABLE(1, "可编辑"), READONLY(2, "只读"), HIDE(3, "隐藏"); + /** + * 权限 + */ private final Integer permission; + /** + * 名字 + */ private final String name; public static BpmFieldPermissionEnum valueOf(Integer permission) { return ArrayUtil.firstMatch(item -> item.getPermission().equals(permission), values()); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 7daa819263..12cda1d3d0 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -38,6 +38,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { /** * 判断是否为分支节点 + * * @param type 节点类型 */ public static boolean isBranchNode(Integer type) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index 1491e5fddf..f5e6be863c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -141,7 +141,7 @@ public class BpmTaskController { // 获得 BpmnModel BpmnModel bpmnModel = bpmProcessDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()); return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance, - formMap, userMap, deptMap,bpmnModel)); + formMap, userMap, deptMap, bpmnModel)); } @PutMapping("/approve") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 25fa107b06..dbacd03978 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -95,6 +95,7 @@ public interface BpmTaskConvert { BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class); if (form != null) { // 测试一下权限处理 + // TODO @jason:这里是不是还没实现完哈? // List afterChangedFields = BpmnFormUtils.changeCreateFormFiledPermissionRule(form.getFields(), // BpmnModelUtils.parseFormFieldsPermission(bpmnModel, task.getTaskDefinitionKey())); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java index bada4ecb87..dc09a831c3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; +// TODO @jason:这个类,挪到 BpmnModelConstants 里,会不会好点,因为后续 BPMN 标准也需要使用这些字段哈; /** * 仿钉钉快搭 JSON 常量信息 * @@ -7,18 +8,20 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; */ public interface SimpleModelConstants { + // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT 会不会更精准哈; /** * 流程表单字段权限, 用于标记字段权限 */ String FIELDS_PERMISSION = "fieldsPermission"; - + // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE 会不会更精准哈; /** * 字段属性 */ String FIELD_ATTRIBUTE = "field"; - + // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT_PERMISSION_ATTRIBUTE 会不会更精准哈; /** * 权限属性 */ String PERMISSION_ATTRIBUTE = "permission"; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 56edb8c3dc..1f2e084f8e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -25,11 +25,12 @@ public class BpmnModelUtils { public static Integer parseCandidateStrategy(FlowElement userTask) { Integer candidateStrategy = NumberUtils.parseInt(userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); - // @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限 + // TODO @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限 if (candidateStrategy == null) { ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); + // TODO @jason:改成下面这样,是不是看着更简洁哈 +// candidateStrategy = element != null ? NumberUtils.parseInt(element.getElementText()) : null; candidateStrategy = NumberUtils.parseInt(Optional.ofNullable(element).map(ExtensionElement::getElementText).orElse(null)); - } return candidateStrategy; } @@ -44,16 +45,17 @@ public class BpmnModelUtils { return candidateParam; } - public static Map parseFormFieldsPermission(BpmnModel bpmnModel, String flowElementId) { + // TODO @jason:貌似这个没地方调用??? + public static Map parseFormFieldsPermission(BpmnModel bpmnModel, String flowElementId) { FlowElement flowElement = getFlowElementById(bpmnModel, flowElementId); if (flowElement == null) { return null; } - final HashMap fieldsPermission = MapUtil.newHashMap(); + Map fieldsPermission = MapUtil.newHashMap(); List extensionElements = flowElement.getExtensionElements().get(SimpleModelConstants.FIELDS_PERMISSION); - extensionElements.forEach(el -> { - String field = el.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FIELD_ATTRIBUTE); - String permission = el.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, SimpleModelConstants.PERMISSION_ATTRIBUTE); + extensionElements.forEach(element -> { + String field = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FIELD_ATTRIBUTE); + String permission = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, SimpleModelConstants.PERMISSION_ATTRIBUTE); if (StrUtil.isNotEmpty(field) && StrUtil.isNotEmpty(permission)) { fieldsPermission.put(field, Integer.parseInt(permission)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index c4d39709ea..d9208697de 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -207,7 +207,6 @@ public class SimpleModelUtils { // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners addCandidateElements(node, serviceTask); - return serviceTask; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java index c22385ea8c..2fc59e522b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java @@ -15,12 +15,14 @@ import java.util.Map; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELD_ATTRIBUTE; +// TODO @jason:这个类,挪到 framework 那的 util 包下哈; /** * Bpmn 流程表单相关工具方法 * * @author jason */ public class BpmnFormUtils { + private static final String CREATE_FORM_DISPLAY_ATTRIBUTE = "display"; private static final String CREATE_FORM_DISABLED_ATTRIBUTE = "disabled"; @@ -65,4 +67,5 @@ public class BpmnFormUtils { }); return afterChangedFields; } + } -- Gitee From f84d25d3b710f0788c0427f5f0d59739a291033d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 16:09:45 +0800 Subject: [PATCH 0282/1557] =?UTF-8?q?stream=20=E4=BF=9D=E5=AD=98=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/ChatController.java | 27 +---- .../yudao/module/ai/service/ChatService.java | 7 +- .../ai/service/impl/ChatServiceImpl.java | 105 +++++++++++++++--- 3 files changed, 92 insertions(+), 47 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java index 3a71c54345..d9f2d2b973 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.ai.controller; import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.config.AiClient; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.service.ChatService; import cn.iocoder.yudao.module.ai.vo.ChatReq; @@ -38,7 +37,6 @@ import java.util.function.Consumer; public class ChatController { @Autowired - private AiClient aiClient; private final ChatService chatService; @Operation(summary = "聊天-chat", description = "这个一般等待时间比较久,需要全部完成才会返回!") @@ -52,30 +50,7 @@ public class ChatController { @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) public SseEmitter chatStream(@Validated @ModelAttribute ChatReq req) { Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - Flux streamResponse = chatService.chatStream(req); - streamResponse.subscribe( - new Consumer() { - @Override - public void accept(ChatResponse chatResponse) { - String content = chatResponse.getResults().get(0).getOutput().getContent(); - try { - sseEmitter.send(content, MediaType.APPLICATION_JSON); - } catch (IOException e) { - log.error("发送异常{}", ExceptionUtil.getMessage(e)); - // 如果不是因为关闭而抛出异常,则重新连接 - sseEmitter.completeWithError(e); - } - } - }, - error -> { - // - log.error("subscribe错误 {}", ExceptionUtil.getMessage(error)); - }, - () -> { - log.info("发送完成!"); - sseEmitter.complete(); - } - ); + chatService.chatStream(req, sseEmitter); return sseEmitter; } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java index f72c52493b..fd19d822ac 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatService.java @@ -1,9 +1,7 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; +import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.vo.ChatReq; -import reactor.core.publisher.Flux; /** * 聊天 chat @@ -26,7 +24,8 @@ public interface ChatService { * chat stream * * @param req + * @param sseEmitter * @return */ - Flux chatStream(ChatReq req); + void chatStream(ChatReq req, Utf8SseEmitter sseEmitter); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 6fe2261811..a2d8e54e23 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.ai.config.AiClient; import cn.iocoder.yudao.framework.common.exception.ServerException; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; @@ -21,10 +22,14 @@ import cn.iocoder.yudao.module.ai.service.ChatService; import cn.iocoder.yudao.module.ai.vo.ChatReq; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; +import java.io.IOException; +import java.util.function.Consumer; + /** * 聊天 service * @@ -51,25 +56,17 @@ public class ChatServiceImpl implements ChatService { */ @Transactional(rollbackFor = Exception.class) public String chat(ChatReq req) { + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 获取 client 类型 AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); // 获取 对话类型(新建还是继续) ChatConversationTypeEnum chatConversationTypeEnum = ChatConversationTypeEnum.valueOfType(req.getConversationType()); + AiChatConversationDO aiChatConversationDO = getChatConversationNoExistToCreate(req, chatConversationTypeEnum, loginUserId); - AiChatConversationDO aiChatConversationDO; - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { - // 创建一个新的对话 - aiChatConversationDO = createNewChatConversation(req, loginUserId); - } else { - // 继续对话 - if (req.getConversationId() == null) { - throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); - } - aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); - } + // 保存 chat message + saveChatMessage(req, aiChatConversationDO.getId(), loginUserId); - String content; + String content = null; try { // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getPrompt()); @@ -81,13 +78,19 @@ public class ChatServiceImpl implements ChatService { content = call.getResult().getOutput().getContent(); } catch (Exception e) { content = ExceptionUtil.getMessage(e); + } finally { + // 保存 chat message + saveSystemChatMessage(req, aiChatConversationDO.getId(), loginUserId, content); } + return content; + } + private void saveChatMessage(ChatReq req, Long chatConversationId, Long loginUserId) { // 增加 chat message 记录 aiChatMessageMapper.insert( new AiChatMessageDO() .setId(null) - .setChatConversationId(aiChatConversationDO.getId()) + .setChatConversationId(chatConversationId) .setUserId(loginUserId) .setMessage(req.getPrompt()) .setMessageType(MessageType.USER.getValue()) @@ -98,7 +101,39 @@ public class ChatServiceImpl implements ChatService { // chat count 先+1 aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); - return content; + } + + public void saveSystemChatMessage(ChatReq req, Long chatConversationId, Long loginUserId, String systemPrompts) { + // 增加 chat message 记录 + aiChatMessageMapper.insert( + new AiChatMessageDO() + .setId(null) + .setChatConversationId(chatConversationId) + .setUserId(loginUserId) + .setMessage(systemPrompts) + .setMessageType(MessageType.SYSTEM.getValue()) + .setTopK(req.getTopK()) + .setTopP(req.getTopP()) + .setTemperature(req.getTemperature()) + ); + + // chat count 先+1 + aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); + } + + private AiChatConversationDO getChatConversationNoExistToCreate(ChatReq req, ChatConversationTypeEnum chatConversationTypeEnum, Long loginUserId) { + AiChatConversationDO aiChatConversationDO; + if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { + // 创建一个新的对话 + aiChatConversationDO = createNewChatConversation(req, loginUserId); + } else { + // 继续对话 + if (req.getConversationId() == null) { + throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); + } + aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); + } + return aiChatConversationDO; } private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { @@ -133,16 +168,52 @@ public class ChatServiceImpl implements ChatService { * chat stream * * @param req + * @param sseEmitter * @return */ @Override - public Flux chatStream(ChatReq req) { + public void chatStream(ChatReq req, Utf8SseEmitter sseEmitter) { + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 获取 client 类型 AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); + // 获取 对话类型(新建还是继续) + ChatConversationTypeEnum chatConversationTypeEnum = ChatConversationTypeEnum.valueOfType(req.getConversationType()); + AiChatConversationDO aiChatConversationDO = getChatConversationNoExistToCreate(req, chatConversationTypeEnum, loginUserId); // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getPrompt()); req.setTopK(req.getTopK()); req.setTopP(req.getTopP()); req.setTemperature(req.getTemperature()); - return aiClient.stream(prompt, clientNameEnum.getName()); + // 保存 chat message + saveChatMessage(req, aiChatConversationDO.getId(), loginUserId); + Flux streamResponse = aiClient.stream(prompt, clientNameEnum.getName()); + + StringBuffer contentBuffer = new StringBuffer(); + streamResponse.subscribe( + new Consumer() { + @Override + public void accept(ChatResponse chatResponse) { + String content = chatResponse.getResults().get(0).getOutput().getContent(); + try { + contentBuffer.append(content); + sseEmitter.send(content, MediaType.APPLICATION_JSON); + } catch (IOException e) { + log.error("发送异常{}", ExceptionUtil.getMessage(e)); + // 如果不是因为关闭而抛出异常,则重新连接 + sseEmitter.completeWithError(e); + } + } + }, + error -> { + // + log.error("subscribe错误 {}", ExceptionUtil.getMessage(error)); + }, + () -> { + log.info("发送完成!"); + sseEmitter.complete(); + // 保存 chat message + saveSystemChatMessage(req, aiChatConversationDO.getId(), loginUserId, contentBuffer.toString()); + } + ); } } -- Gitee From 00c2ca8b48267b464327a1a14cc6fa1fab34625d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 16:59:15 +0800 Subject: [PATCH 0283/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0chat=20=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=EF=BC=8C=E5=88=97=E8=A1=A8=E3=80=81=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E3=80=81=E5=8D=95=E4=B8=AA=E3=80=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChatConversationController.java | 58 +++++++++++++++ .../ai/convert/ChatConversationConvert.java | 37 ++++++++++ .../ai/service/ChatConversationService.java | 48 ++++++++++++ .../impl/ChatConversationServiceImpl.java | 74 +++++++++++++++++++ .../ai/vo/ChatConversationCreateReq.java | 23 ++++++ .../ai/vo/ChatConversationCreateRes.java | 11 +++ .../module/ai/vo/ChatConversationListReq.java | 20 +++++ .../module/ai/vo/ChatConversationRes.java | 11 +++ 8 files changed, 282 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationListReq.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java new file mode 100644 index 0000000000..4fc1b7fd8b --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.ai.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.service.ChatConversationService; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRes; +import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * ia 模块 + * + * @author fansili + * @time 2024/4/13 17:44 + * @since 1.0 + */ +@Tag(name = "A2聊天-对话") +@RestController +@RequestMapping("/ai/chat/conversation") +@Slf4j +@AllArgsConstructor +public class ChatConversationController { + + private final ChatConversationService chatConversationService; + + @Operation(summary = "创建 - 对话") + @PostMapping("/create") + public CommonResult create(@RequestBody @Validated ChatConversationCreateReq req) { + return CommonResult.success(chatConversationService.create(req)); + } + + @Operation(summary = "获取 - 获取对话") + @GetMapping("/getConversation") + public CommonResult getConversation(@RequestParam("id") Long id) { + return CommonResult.success(chatConversationService.getConversation(id)); + } + + @Operation(summary = "获取 - 获取对话list") + @GetMapping("/listConversation") + public CommonResult> listConversation(@ModelAttribute @Validated ChatConversationListReq req) { + return CommonResult.success(chatConversationService.listConversation(req)); + } + + @Operation(summary = "删除") + @DeleteMapping("/listConversation") + public CommonResult delete(@RequestParam("id") Long id) { + chatConversationService.delete(id); + return CommonResult.success(null); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java new file mode 100644 index 0000000000..3ecabcc7cf --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.ai.convert; + +import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 聊天 对话 convert + * + * @author fansili + * @time 2024/4/18 16:39 + * @since 1.0 + */ +@Mapper +public interface ChatConversationConvert { + + ChatConversationConvert INSTANCE = Mappers.getMapper(ChatConversationConvert.class); + + /** + * 转换 - 多个 ChatConversationRes + * + * @param top100Conversation + * @return + */ + List covnertChatConversationResList(List top100Conversation); + + /** + * 转换 - 单个 ChatConversationRes + * + * @param aiChatConversationDO + * @return + */ + ChatConversationRes covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java new file mode 100644 index 0000000000..cb52f725c4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.ai.service; + +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRes; +import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; + +import java.util.List; + +/** + * chat 对话 + * + * @fansili + * @since v1.0 + */ +public interface ChatConversationService { + + /** + * 对话 - 创建 + * + * @param req + * @return + */ + ChatConversationRes create(ChatConversationCreateReq req); + + /** + * 获取 - 对话 + * + * @param id + * @return + */ + ChatConversationRes getConversation(Long id); + + /** + * 获取 - 对话列表 + * + * @param req + * @return + */ + List listConversation(ChatConversationListReq req); + + /** + * 删除 - 根据id + * + * @param id + */ + void delete(Long id); +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java new file mode 100644 index 0000000000..2278df935e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.ai.service.impl; + +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.convert.ChatConversationConvert; +import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.service.ChatConversationService; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * chat 对话 + * + * @fansili + * @since v1.0 + */ +@Service +@Slf4j +@AllArgsConstructor +public class ChatConversationServiceImpl implements ChatConversationService { + + private final AiChatConversationMapper aiChatConversationMapper; + + @Override + public ChatConversationRes create(ChatConversationCreateReq req) { + // 获取用户id + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询最新的对话 + AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); + // 如果有对话没有被使用过,那就返回这个 + if (latestConversation != null && latestConversation.getChatCount() <= 0) { + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); + } + // 创建新的 Conversation + AiChatConversationDO insertConversation = new AiChatConversationDO(); + insertConversation.setId(null); + insertConversation.setUserId(loginUserId); + insertConversation.setChatRoleId(null); + insertConversation.setChatRoleName(null); + insertConversation.setChatTitle(null); + insertConversation.setChatCount(0); + insertConversation.setChatType(req.getChatType()); + aiChatConversationMapper.insert(insertConversation); + // 转换 res + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); + } + + @Override + public ChatConversationRes getConversation(Long id) { + AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); + } + + @Override + public List listConversation(ChatConversationListReq req) { + // 获取用户id + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询前100对话 + List top100Conversation + = aiChatConversationMapper.selectTop100Conversation(loginUserId, req.getSearch()); + return ChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); + } + + @Override + public void delete(Long id) { + aiChatConversationMapper.deleteById(id); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java new file mode 100644 index 0000000000..a39c9e2ed6 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.ai.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 聊天对话 + * + * @author fansili + * @time 2024/4/18 16:24 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class ChatConversationCreateReq { + + @Schema(description = "对话类型(roleChat、userChat)") + @NotNull(message = "聊天类型不能为空!") + private String chatType; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java new file mode 100644 index 0000000000..3117aad9d0 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.ai.vo; + +/** + * 聊天对话 res + * + * @author fansili + * @time 2024/4/18 16:24 + * @since 1.0 + */ +public class ChatConversationCreateRes { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationListReq.java new file mode 100644 index 0000000000..846c8b2bc4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationListReq.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 聊天对话 list req + * + * @author fansili + * @time 2024/4/18 16:24 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class ChatConversationListReq { + + @Schema(description = "查询根据title") + private String search; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java new file mode 100644 index 0000000000..95eca40e31 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.ai.vo; + +/** + * 聊天对话 res + * + * @author fansili + * @time 2024/4/18 16:24 + * @since 1.0 + */ +public class ChatConversationRes { +} -- Gitee From 66d020892019ead137c71a9263c2b99ca0103a3c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 16:59:46 +0800 Subject: [PATCH 0284/1557] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=9C=80=E6=96=B0=E7=9A=84=E5=AF=B9=E8=AF=9D=202?= =?UTF-8?q?=E3=80=81=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96top100=E7=9A=84?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dataobject/AiChatConversationDO.java | 4 +- .../ai/mapper/AiChatConversationMapper.java | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java index 8f19563929..c48baa1c6a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java @@ -30,10 +30,10 @@ public class AiChatConversationDO extends BaseDO { @Schema(description = "chat角色名称") private String chatRoleName; - @Schema(description = "对话标题(有程序自动生成)") + @Schema(description = "聊天标题(有程序自动生成)") private String chatTitle; - @Schema(description = "对话标题(有程序自动生成)") + @Schema(description = "聊天次数(有程序自动生成)") private Integer chatCount; @Schema(description = "对话类型(roleChat、userChat)") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java index 6e018a8923..f6f58e7a05 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -1,12 +1,19 @@ package cn.iocoder.yudao.module.ai.mapper; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; +import java.util.List; + /** * message mapper * @@ -21,4 +28,34 @@ public interface AiChatConversationMapper extends BaseMapperX pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), + new LambdaQueryWrapper() + .eq(AiChatConversationDO::getUserId, loginUserId) + .orderByDesc(AiChatConversationDO::getId)); + if (CollUtil.isEmpty(pageResult.getList())) { + return null; + } + return pageResult.getList().get(0); + } + + /** + * 查询 - 前100 + * + * @param search + */ + default List selectTop100Conversation(Long loginUserId, String search) { + LambdaQueryWrapper queryWrapper + = new LambdaQueryWrapper().eq(AiChatConversationDO::getUserId, loginUserId); + if (!StrUtil.isBlank(search)) { + queryWrapper.like(AiChatConversationDO::getChatTitle, search); + } + queryWrapper.orderByDesc(AiChatConversationDO::getId); + return selectPage(new PageParam().setPageNo(1).setPageSize(100), queryWrapper).getList(); + } } -- Gitee From e8f4dd790599dc172362235b295e4b570b297eef Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:00:45 +0800 Subject: [PATCH 0285/1557] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=20res=20=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/vo/ChatConversationRes.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java index 95eca40e31..3a2bb16d5e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java @@ -1,5 +1,9 @@ package cn.iocoder.yudao.module.ai.vo; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + /** * 聊天对话 res * @@ -7,5 +11,28 @@ package cn.iocoder.yudao.module.ai.vo; * @time 2024/4/18 16:24 * @since 1.0 */ +@Data +@Accessors(chain = true) public class ChatConversationRes { + + @Schema(description = "id") + private Long id; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "chat角色Id") + private Long chatRoleId; + + @Schema(description = "chat角色名称") + private String chatRoleName; + + @Schema(description = "聊天标题(有程序自动生成)") + private String chatTitle; + + @Schema(description = "聊天次数(有程序自动生成)") + private Integer chatCount; + + @Schema(description = "对话类型(roleChat、userChat)") + private String chatType; } -- Gitee From a33ea4aa820ce49d4bc42d0a6b89e4f206374eaf Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:08:45 +0800 Subject: [PATCH 0286/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/vo/ChatReq.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java index 67828e6ba2..87ac955440 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java @@ -17,26 +17,23 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class ChatReq { - @Schema(description = "chat角色模板") - private Long chatRoleId; + @Schema(description = "ai模型(查看 AiClientNameEnum)") + @NotNull(message = "模型不能为空!") + @Size(max = 30, message = "模型字符最大30个字符!") + private String modal; @Schema(description = "对话Id") + @NotNull(message = "对话id不能为空") private Long conversationId; - @Schema(description = "对话类型(new、continue),如果是new会创建一个新的对话,continue就会继续对话!") - @NotNull(message = "对话类型,不能为空!") - private String conversationType; + @Schema(description = "chat角色模板") + private Long chatRoleId; @NotNull(message = "提示词不能为空!") @Size(max = 5000, message = "提示词最大5000个字符!") @Schema(description = "填入固定值,1 issues, 2 pr") private String prompt; - @Schema(description = "ai模型(查看 AiClientNameEnum)") - @NotNull(message = "模型不能为空!") - @Size(max = 30, message = "模型字符最大30个字符!") - private String modal; - @Schema(description = "用于控制随机性和多样性的温度参数") private Double temperature; -- Gitee From 2ce5c805de98fc8594d808f4725edfe9f3ed15b0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:09:00 +0800 Subject: [PATCH 0287/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20chat=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E4=B8=8D=E5=AD=98=E5=9C=A8errorCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index d4ecf4df83..e3e1c869d6 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -15,5 +15,14 @@ public interface ErrorCodeConstants { ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI模型暂不支持!"); ErrorCode AI_CHAT_ROLE_NOT_EXISTENT = new ErrorCode(1_022_000_001, "AI Role 不存在!");; + + ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话id不能为空!");; + + + + ErrorCode AI_CHAT_CONTINUE_NOT_EXIST = new ErrorCode(1_022_000_020, "chat对话不存在!");; + + + } -- Gitee From 97d4e56c8136a6f6306f7a67432c51fc8ec3e05b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:09:27 +0800 Subject: [PATCH 0288/1557] =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=97=B6=EF=BC=8Cthow=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/impl/ChatConversationServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java index 2278df935e..0dd5339594 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.ai.service.impl; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.ChatConversationConvert; import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; @@ -54,6 +56,9 @@ public class ChatConversationServiceImpl implements ChatConversationService { @Override public ChatConversationRes getConversation(Long id) { AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); + if (aiChatConversationDO == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_CONTINUE_NOT_EXIST); + } return ChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); } -- Gitee From 25523fd53ee0d9cd9657c14f85f7f298a6094728 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:10:08 +0800 Subject: [PATCH 0289/1557] =?UTF-8?q?=E8=B0=83=E6=95=B4=20chat=20=E5=92=8C?= =?UTF-8?q?=20steamChat=20=E8=8E=B7=E5=8F=96=E5=AF=B9=E8=AF=9D=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/impl/ChatServiceImpl.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index a2d8e54e23..913944dc07 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -18,7 +18,9 @@ import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.service.ChatConversationService; import cn.iocoder.yudao.module.ai.service.ChatService; +import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; import cn.iocoder.yudao.module.ai.vo.ChatReq; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -46,6 +48,7 @@ public class ChatServiceImpl implements ChatService { private final AiChatRoleMapper aiChatRoleMapper; private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationMapper aiChatConversationMapper; + private final ChatConversationService chatConversationService; /** @@ -59,13 +62,10 @@ public class ChatServiceImpl implements ChatService { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 获取 client 类型 AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); - // 获取 对话类型(新建还是继续) - ChatConversationTypeEnum chatConversationTypeEnum = ChatConversationTypeEnum.valueOfType(req.getConversationType()); - AiChatConversationDO aiChatConversationDO = getChatConversationNoExistToCreate(req, chatConversationTypeEnum, loginUserId); - + // 获取对话信息 + ChatConversationRes conversationRes = chatConversationService.getConversation(req.getConversationId()); // 保存 chat message - saveChatMessage(req, aiChatConversationDO.getId(), loginUserId); - + saveChatMessage(req, conversationRes.getId(), loginUserId); String content = null; try { // 创建 chat 需要的 Prompt @@ -80,7 +80,7 @@ public class ChatServiceImpl implements ChatService { content = ExceptionUtil.getMessage(e); } finally { // 保存 chat message - saveSystemChatMessage(req, aiChatConversationDO.getId(), loginUserId, content); + saveSystemChatMessage(req, conversationRes.getId(), loginUserId, content); } return content; } @@ -176,16 +176,15 @@ public class ChatServiceImpl implements ChatService { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 获取 client 类型 AiClientNameEnum clientNameEnum = AiClientNameEnum.valueOfName(req.getModal()); - // 获取 对话类型(新建还是继续) - ChatConversationTypeEnum chatConversationTypeEnum = ChatConversationTypeEnum.valueOfType(req.getConversationType()); - AiChatConversationDO aiChatConversationDO = getChatConversationNoExistToCreate(req, chatConversationTypeEnum, loginUserId); + // 获取对话信息 + ChatConversationRes conversationRes = chatConversationService.getConversation(req.getConversationId()); // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getPrompt()); req.setTopK(req.getTopK()); req.setTopP(req.getTopP()); req.setTemperature(req.getTemperature()); // 保存 chat message - saveChatMessage(req, aiChatConversationDO.getId(), loginUserId); + saveChatMessage(req, conversationRes.getId(), loginUserId); Flux streamResponse = aiClient.stream(prompt, clientNameEnum.getName()); StringBuffer contentBuffer = new StringBuffer(); @@ -212,7 +211,7 @@ public class ChatServiceImpl implements ChatService { log.info("发送完成!"); sseEmitter.complete(); // 保存 chat message - saveSystemChatMessage(req, aiChatConversationDO.getId(), loginUserId, contentBuffer.toString()); + saveSystemChatMessage(req, conversationRes.getId(), loginUserId, contentBuffer.toString()); } ); } -- Gitee From 2e4dca2d6f7c6e8fe88c667e443dfb18f3b882f4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:10:44 +0800 Subject: [PATCH 0290/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=20chat=20old?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/impl/ChatServiceImpl.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 913944dc07..069de70922 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -13,7 +13,6 @@ import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; -import cn.iocoder.yudao.module.ai.enums.ChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; @@ -121,21 +120,6 @@ public class ChatServiceImpl implements ChatService { aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - private AiChatConversationDO getChatConversationNoExistToCreate(ChatReq req, ChatConversationTypeEnum chatConversationTypeEnum, Long loginUserId) { - AiChatConversationDO aiChatConversationDO; - if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { - // 创建一个新的对话 - aiChatConversationDO = createNewChatConversation(req, loginUserId); - } else { - // 继续对话 - if (req.getConversationId() == null) { - throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); - } - aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); - } - return aiChatConversationDO; - } - private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { // 获取 chat 角色 String chatRoleName = null; -- Gitee From b68117c846947f9835fcc135861688798ce38bc6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:31:05 +0800 Subject: [PATCH 0291/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=20create=20res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/vo/ChatConversationCreateRes.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java deleted file mode 100644 index 3117aad9d0..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRes.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -/** - * 聊天对话 res - * - * @author fansili - * @time 2024/4/18 16:24 - * @since 1.0 - */ -public class ChatConversationCreateRes { -} -- Gitee From 97c12d193203c380f36f4839004d1b9e435f4cdb Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:31:58 +0800 Subject: [PATCH 0292/1557] =?UTF-8?q?conversation=20=E5=85=85=E6=BB=A1=20t?= =?UTF-8?q?itle=20=E5=92=8C=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dataobject/AiChatConversationDO.java | 11 ++++---- .../module/ai/dataobject/AiChatMessageDO.java | 26 +++---------------- .../ai/mapper/AiChatConversationMapper.java | 2 +- .../impl/ChatConversationServiceImpl.java | 4 +-- .../ai/service/impl/ChatServiceImpl.java | 4 +-- .../module/ai/vo/ChatConversationRes.java | 10 +++---- 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java index c48baa1c6a..79bb281e7a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java @@ -30,13 +30,12 @@ public class AiChatConversationDO extends BaseDO { @Schema(description = "chat角色名称") private String chatRoleName; - @Schema(description = "聊天标题(有程序自动生成)") - private String chatTitle; - - @Schema(description = "聊天次数(有程序自动生成)") - private Integer chatCount; + @Schema(description = "标题(有程序自动生成)") + private String title; @Schema(description = "对话类型(roleChat、userChat)") - private String chatType; + private String type; + @Schema(description = "聊天次数(有程序自动生成)") + private Integer chatCount; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java index 9047180ec0..53d274ae1e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.ai.dataobject; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.experimental.Accessors; -import java.util.Date; - /** * ai 聊天 message * @@ -13,7 +13,8 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class AiChatMessageDO { +@TableName("ai_chat_message") +public class AiChatMessageDO extends BaseDO { /** * 编号,作为每条聊天记录的唯一标识符 @@ -58,23 +59,4 @@ public class AiChatMessageDO { */ private Double temperature; - /** - * 创建该记录的操作员ID - */ - private Long createdBy; - - /** - * 记录创建的时间戳 - */ - private Date createdTime; - - /** - * 最后更新该记录的操作员ID - */ - private Long updatedBy; - - /** - * 记录最后更新的时间戳 - */ - private Date updatedTime; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java index f6f58e7a05..bfc7bc0aa4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -53,7 +53,7 @@ public interface AiChatConversationMapper extends BaseMapperX queryWrapper = new LambdaQueryWrapper().eq(AiChatConversationDO::getUserId, loginUserId); if (!StrUtil.isBlank(search)) { - queryWrapper.like(AiChatConversationDO::getChatTitle, search); + queryWrapper.like(AiChatConversationDO::getTitle, search); } queryWrapper.orderByDesc(AiChatConversationDO::getId); return selectPage(new PageParam().setPageNo(1).setPageSize(100), queryWrapper).getList(); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java index 0dd5339594..52af7f7b55 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java @@ -45,9 +45,9 @@ public class ChatConversationServiceImpl implements ChatConversationService { insertConversation.setUserId(loginUserId); insertConversation.setChatRoleId(null); insertConversation.setChatRoleName(null); - insertConversation.setChatTitle(null); + insertConversation.setTitle(null); insertConversation.setChatCount(0); - insertConversation.setChatType(req.getChatType()); + insertConversation.setType(req.getChatType()); aiChatConversationMapper.insert(insertConversation); // 转换 res return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 069de70922..bf3c9ff623 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -141,9 +141,9 @@ public class ChatServiceImpl implements ChatService { .setUserId(loginUserId) .setChatRoleId(req.getChatRoleId()) .setChatRoleName(chatRoleName) - .setChatType(chatTypeEnum.getType()) + .setType(chatTypeEnum.getType()) .setChatCount(1) - .setChatTitle(req.getPrompt().substring(0, 20) + "..."); + .setTitle(req.getPrompt().substring(0, 20) + "..."); aiChatConversationMapper.insert(insertChatConversation); return insertChatConversation; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java index 3a2bb16d5e..aa11c0464e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationRes.java @@ -27,12 +27,12 @@ public class ChatConversationRes { @Schema(description = "chat角色名称") private String chatRoleName; - @Schema(description = "聊天标题(有程序自动生成)") - private String chatTitle; + @Schema(description = "标题(有程序自动生成)") + private String title; + + @Schema(description = "对话类型(roleChat、userChat)") + private String type; @Schema(description = "聊天次数(有程序自动生成)") private Integer chatCount; - - @Schema(description = "对话类型(roleChat、userChat)") - private String chatType; } -- Gitee From 1a08be9a27689c983d95a33ff0a8b3ae22e1e8a1 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:32:30 +0800 Subject: [PATCH 0293/1557] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/controller/ChatConversationController.java | 1 - .../iocoder/yudao/module/ai/service/ChatConversationService.java | 1 - 2 files changed, 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java index 4fc1b7fd8b..110937c610 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.ai.controller; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.service.ChatConversationService; import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; -import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRes; import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; import io.swagger.v3.oas.annotations.Operation; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java index cb52f725c4..e5073bd6b6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; -import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRes; import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; -- Gitee From 27bfb0d25dabdfb9b4310af0ca3026190f7914cb Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:37:28 +0800 Subject: [PATCH 0294/1557] =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=A7=9F=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-server/src/main/resources/application-local.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 87b40adb26..8fede47851 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -271,6 +271,8 @@ yudao: enable: false demo: false # 关闭演示模式 tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc + tenant: + enable: false justauth: enabled: true -- Gitee From cb5cfd31f0136782012f376ad75157fb22ab3c2f Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 18 Apr 2024 20:47:02 +0800 Subject: [PATCH 0295/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmFieldPermissionEnum.java | 7 +++---- .../module/bpm/convert/task/BpmTaskConvert.java | 1 + .../flowable/core/enums/BpmnModelConstants.java | 15 +++++++++++++++ .../core/enums/SimpleModelConstants.java | 17 ----------------- .../flowable/core}/util/BpmnFormUtils.java | 14 +++++++------- .../flowable/core/util/BpmnModelUtils.java | 15 ++++++--------- .../flowable/core/util/SimpleModelUtils.java | 6 +++--- 7 files changed, 35 insertions(+), 40 deletions(-) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{service => framework/flowable/core}/util/BpmnFormUtils.java (84%) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java index d5410e2181..a71f1f51bc 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmFieldPermissionEnum.java @@ -13,10 +13,9 @@ import lombok.Getter; @AllArgsConstructor public enum BpmFieldPermissionEnum { - // TODO @jason:改成 WRITE、READ、NONE,更符合权限的感觉哈 - EDITABLE(1, "可编辑"), - READONLY(2, "只读"), - HIDE(3, "隐藏"); + WRITE(1, "可编辑"), + READ(2, "只读"), + NONE(3, "隐藏"); /** * 权限 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index dbacd03978..2a04d712de 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -96,6 +96,7 @@ public interface BpmTaskConvert { if (form != null) { // 测试一下权限处理 // TODO @jason:这里是不是还没实现完哈? + // TODO @芋艿 测试了一下。 暂时注释掉。 前端不知道要怎样改, 可能需要讨论一下如何改 // List afterChangedFields = BpmnFormUtils.changeCreateFormFiledPermissionRule(form.getFields(), // BpmnModelUtils.parseFormFieldsPermission(bpmnModel, task.getTaskDefinitionKey())); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index 7513a64c88..1138fc5a0e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -28,6 +28,21 @@ public interface BpmnModelConstants { */ String USER_TASK_CANDIDATE_PARAM = "candidateParam"; + /** + * BPMN ExtensionElement 流程表单字段权限元素, 用于标记字段权限 + */ + String FORM_FIELD_PERMISSION_ELEMENT = "fieldsPermission"; + + /** + * BPMN ExtensionElement Attribute, 用于标记表单字段 + */ + String FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE = "field"; + + /** + * BPMN ExtensionElement Attribute, 用于标记表单权限 + */ + String FORM_FIELD_PERMISSION_ELEMENT_PERMISSION_ATTRIBUTE = "permission"; + // TODO @芋艿:这里后面得关注下; /** * BPMN End Event 节点 Id, 用于后端生成 End Event 节点 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java index dc09a831c3..d02f9a4f12 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; -// TODO @jason:这个类,挪到 BpmnModelConstants 里,会不会好点,因为后续 BPMN 标准也需要使用这些字段哈; /** * 仿钉钉快搭 JSON 常量信息 * @@ -8,20 +7,4 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; */ public interface SimpleModelConstants { - // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT 会不会更精准哈; - /** - * 流程表单字段权限, 用于标记字段权限 - */ - String FIELDS_PERMISSION = "fieldsPermission"; - // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE 会不会更精准哈; - /** - * 字段属性 - */ - String FIELD_ATTRIBUTE = "field"; - // TODO @jason:改成 FORM_FIELD_PERMISSION_ELEMENT_PERMISSION_ATTRIBUTE 会不会更精准哈; - /** - * 权限属性 - */ - String PERMISSION_ATTRIBUTE = "permission"; - } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnFormUtils.java similarity index 84% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnFormUtils.java index 2fc59e522b..fb8be1ef4e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/util/BpmnFormUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnFormUtils.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.service.util; +package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; @@ -13,9 +13,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELD_ATTRIBUTE; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE; + -// TODO @jason:这个类,挪到 framework 那的 util 包下哈; /** * Bpmn 流程表单相关工具方法 * @@ -39,23 +39,23 @@ public class BpmnFormUtils { List afterChangedFields = new ArrayList<>(fields.size()); fields.forEach( f-> { Map fieldMap = JsonUtils.parseObject(f, new TypeReference<>() {}); - String field = ObjUtil.defaultIfNull(fieldMap.get(FIELD_ATTRIBUTE), Object::toString, ""); + String field = ObjUtil.defaultIfNull(fieldMap.get(FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE), Object::toString, ""); if (StrUtil.isEmpty(field) || !fieldsPermission.containsKey(field)) { afterChangedFields.add(f); return; } BpmFieldPermissionEnum fieldPermission = BpmFieldPermissionEnum.valueOf(fieldsPermission.get(field)); Assert.notNull(fieldPermission, "字段权限不匹配"); - if (BpmFieldPermissionEnum.HIDE == fieldPermission) { + if (BpmFieldPermissionEnum.NONE == fieldPermission) { fieldMap.put(CREATE_FORM_DISPLAY_ATTRIBUTE, Boolean.FALSE); - } else if (BpmFieldPermissionEnum.EDITABLE == fieldPermission){ + } else if (BpmFieldPermissionEnum.WRITE == fieldPermission){ Map props = MapUtil.get(fieldMap, "props", new cn.hutool.core.lang.TypeReference<>() {}); if (props == null) { props = MapUtil.newHashMap(); fieldMap.put("props", props); } props.put(CREATE_FORM_DISABLED_ATTRIBUTE, Boolean.FALSE); - } else if (BpmFieldPermissionEnum.READONLY == fieldPermission) { + } else if (BpmFieldPermissionEnum.READ == fieldPermission) { Map props = MapUtil.get(fieldMap, "props", new cn.hutool.core.lang.TypeReference<>() {}); if (props == null) { props = MapUtil.newHashMap(); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 1f2e084f8e..9e9af0e654 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -6,7 +6,6 @@ import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; @@ -14,7 +13,7 @@ import org.flowable.common.engine.impl.util.io.BytesStreamSource; import java.util.*; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELD_ATTRIBUTE; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; /** @@ -28,15 +27,13 @@ public class BpmnModelUtils { // TODO @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限 if (candidateStrategy == null) { ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY)); - // TODO @jason:改成下面这样,是不是看着更简洁哈 -// candidateStrategy = element != null ? NumberUtils.parseInt(element.getElementText()) : null; candidateStrategy = NumberUtils.parseInt(Optional.ofNullable(element).map(ExtensionElement::getElementText).orElse(null)); } return candidateStrategy; } public static String parseCandidateParam(FlowElement userTask) { - String candidateParam = userTask.getAttributeValue( + String candidateParam = userTask.getAttributeValue( BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM); if (candidateParam == null) { ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); @@ -45,17 +42,17 @@ public class BpmnModelUtils { return candidateParam; } - // TODO @jason:貌似这个没地方调用??? + // TODO @jason:貌似这个没地方调用??? @芋艿 在 BpmTaskConvert里面。暂时注释掉了。 public static Map parseFormFieldsPermission(BpmnModel bpmnModel, String flowElementId) { FlowElement flowElement = getFlowElementById(bpmnModel, flowElementId); if (flowElement == null) { return null; } Map fieldsPermission = MapUtil.newHashMap(); - List extensionElements = flowElement.getExtensionElements().get(SimpleModelConstants.FIELDS_PERMISSION); + List extensionElements = flowElement.getExtensionElements().get(FORM_FIELD_PERMISSION_ELEMENT); extensionElements.forEach(element -> { - String field = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FIELD_ATTRIBUTE); - String permission = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, SimpleModelConstants.PERMISSION_ATTRIBUTE); + String field = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FORM_FIELD_PERMISSION_ELEMENT_FIELD_ATTRIBUTE); + String permission = element.getAttributeValue(FLOWABLE_EXTENSIONS_NAMESPACE, FORM_FIELD_PERMISSION_ELEMENT_PERMISSION_ATTRIBUTE); if (StrUtil.isNotEmpty(field) && StrUtil.isNotEmpty(permission)) { fieldsPermission.put(field, Integer.parseInt(permission)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index d9208697de..26b709120c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -16,7 +16,7 @@ import org.flowable.bpmn.model.*; import java.util.List; import java.util.Map; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.FIELDS_PERMISSION; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.FORM_FIELD_PERMISSION_ELEMENT; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX; @@ -267,9 +267,9 @@ public class SimpleModelUtils { */ private static void addFormFieldsPermission(BpmSimpleModelNodeVO node, FlowElement flowElement) { List> fieldsPermissions = MapUtil.get(node.getAttributes(), - FIELDS_PERMISSION, new TypeReference<>() {}); + FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() {}); if (CollUtil.isNotEmpty(fieldsPermissions)) { - fieldsPermissions.forEach(item -> addExtensionElement(flowElement, FIELDS_PERMISSION, item)); + fieldsPermissions.forEach(item -> addExtensionElement(flowElement, FORM_FIELD_PERMISSION_ELEMENT, item)); } } -- Gitee From 1274f925449e12f4fff9105d52cfc698ff5e3592 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 18 Apr 2024 22:19:26 +0800 Subject: [PATCH 0296/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=20job=20=E8=B0=83?= =?UTF-8?q?=E5=BA=A6=EF=BC=9A=201.=20=E6=96=B0=E5=A2=9E=E6=88=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20job=20=E9=85=8D=E7=BD=AE=E6=97=B6=EF=BC=8C=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=20handlerName=20=E5=AF=B9=E5=BA=94=E7=9A=84=20Spring?= =?UTF-8?q?=20Bean=20=E5=AD=98=E5=9C=A8=202.=20=E5=88=A0=E9=99=A4=20job=20?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=A2=9D=E5=A4=96=E6=9A=82=E5=81=9C=20Trigge?= =?UTF-8?q?r=E3=80=81=E5=8F=96=E6=B6=88=E8=B0=83=E5=BA=A6=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/scheduler/SchedulerManager.java | 6 +- .../infra/enums/ErrorCodeConstants.java | 2 + .../infra/service/job/JobServiceImpl.java | 39 ++++++---- .../infra/service/job/JobServiceImplTest.java | 71 ++++++++++++------- 4 files changed, 79 insertions(+), 39 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/core/scheduler/SchedulerManager.java b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/core/scheduler/SchedulerManager.java index cb2dad455a..d56682e0cd 100644 --- a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/core/scheduler/SchedulerManager.java +++ b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/core/scheduler/SchedulerManager.java @@ -48,7 +48,7 @@ public class SchedulerManager { .withIdentity(jobHandlerName).build(); // 创建 Trigger 对象 Trigger trigger = this.buildTrigger(jobHandlerName, jobHandlerParam, cronExpression, retryCount, retryInterval); - // 新增调度 + // 新增 Job 调度 scheduler.scheduleJob(jobDetail, trigger); } @@ -80,6 +80,10 @@ public class SchedulerManager { */ public void deleteJob(String jobHandlerName) throws SchedulerException { validateScheduler(); + // 暂停 Trigger 对象 + scheduler.pauseTrigger(new TriggerKey(jobHandlerName)); + // 取消并删除 Job 调度 + scheduler.unscheduleJob(new TriggerKey(jobHandlerName)); scheduler.deleteJob(new JobKey(jobHandlerName)); } diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java index 19aa4e7186..3385596ad6 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java @@ -22,6 +22,8 @@ public interface ErrorCodeConstants { ErrorCode JOB_CHANGE_STATUS_EQUALS = new ErrorCode(1_001_001_003, "定时任务已经处于该状态,无需修改"); ErrorCode JOB_UPDATE_ONLY_NORMAL_STATUS = new ErrorCode(1_001_001_004, "只有开启状态的任务,才可以修改"); ErrorCode JOB_CRON_EXPRESSION_VALID = new ErrorCode(1_001_001_005, "CRON 表达式不正确"); + ErrorCode JOB_HANDLER_BEAN_NOT_EXISTS = new ErrorCode(1_001_001_006, "定时任务的处理器 Bean 不存在"); + ErrorCode JOB_HANDLER_BEAN_TYPE_ERROR = new ErrorCode(1_001_001_007, "定时任务的处理器 Bean 类型不正确,未实现 JobHandler 接口"); // ========== API 错误日志 1-001-002-000 ========== ErrorCode API_ERROR_LOG_NOT_FOUND = new ErrorCode(1_001_002_000, "API 错误日志不存在"); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java index 094177202e..dd887e165c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.infra.service.job; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; import cn.iocoder.yudao.framework.quartz.core.util.CronUtils; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobPageReqVO; @@ -9,13 +11,12 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.dal.mysql.job.JobMapper; import cn.iocoder.yudao.module.infra.enums.job.JobStatusEnum; +import jakarta.annotation.Resource; import org.quartz.SchedulerException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; - import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.containsAny; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; @@ -39,24 +40,25 @@ public class JobServiceImpl implements JobService { @Transactional(rollbackFor = Exception.class) public Long createJob(JobSaveReqVO createReqVO) throws SchedulerException { validateCronExpression(createReqVO.getCronExpression()); - // 校验唯一性 + // 1.1 校验唯一性 if (jobMapper.selectByHandlerName(createReqVO.getHandlerName()) != null) { throw exception(JOB_HANDLER_EXISTS); } - // 插入 + // 1.2 校验 JobHandler 是否存在 + validateJobHandlerExists(createReqVO.getHandlerName()); + + // 2. 插入 JobDO JobDO job = BeanUtils.toBean(createReqVO, JobDO.class); job.setStatus(JobStatusEnum.INIT.getStatus()); fillJobMonitorTimeoutEmpty(job); jobMapper.insert(job); - // 添加 Job 到 Quartz 中 + // 3.1 添加 Job 到 Quartz 中 schedulerManager.addJob(job.getId(), job.getHandlerName(), job.getHandlerParam(), job.getCronExpression(), createReqVO.getRetryCount(), createReqVO.getRetryInterval()); - // 更新 + // 3.2 更新 JobDO JobDO updateObj = JobDO.builder().id(job.getId()).status(JobStatusEnum.NORMAL.getStatus()).build(); jobMapper.updateById(updateObj); - - // 返回 return job.getId(); } @@ -64,22 +66,35 @@ public class JobServiceImpl implements JobService { @Transactional(rollbackFor = Exception.class) public void updateJob(JobSaveReqVO updateReqVO) throws SchedulerException { validateCronExpression(updateReqVO.getCronExpression()); - // 校验存在 + // 1.1 校验存在 JobDO job = validateJobExists(updateReqVO.getId()); - // 只有开启状态,才可以修改.原因是,如果出暂停状态,修改 Quartz Job 时,会导致任务又开始执行 + // 1.2 只有开启状态,才可以修改.原因是,如果出暂停状态,修改 Quartz Job 时,会导致任务又开始执行 if (!job.getStatus().equals(JobStatusEnum.NORMAL.getStatus())) { throw exception(JOB_UPDATE_ONLY_NORMAL_STATUS); } - // 更新 + // 1.3 校验 JobHandler 是否存在 + validateJobHandlerExists(updateReqVO.getHandlerName()); + + // 2. 更新 JobDO JobDO updateObj = BeanUtils.toBean(updateReqVO, JobDO.class); fillJobMonitorTimeoutEmpty(updateObj); jobMapper.updateById(updateObj); - // 更新 Job 到 Quartz 中 + // 3. 更新 Job 到 Quartz 中 schedulerManager.updateJob(job.getHandlerName(), updateReqVO.getHandlerParam(), updateReqVO.getCronExpression(), updateReqVO.getRetryCount(), updateReqVO.getRetryInterval()); } + private void validateJobHandlerExists(String handlerName) { + Object handler = SpringUtil.getBean(handlerName); + if (handler == null) { + throw exception(JOB_HANDLER_BEAN_NOT_EXISTS); + } + if (!(handler instanceof JobHandler)) { + throw exception(JOB_HANDLER_BEAN_TYPE_ERROR); + } + } + @Override @Transactional(rollbackFor = Exception.class) public void updateJobStatus(Long id, Integer status) throws SchedulerException { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImplTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImplTest.java index eedbb1d507..7cd160c3d3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImplTest.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.infra.service.job; +import cn.hutool.extra.spring.SpringUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; @@ -8,7 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.dal.mysql.job.JobMapper; import cn.iocoder.yudao.module.infra.enums.job.JobStatusEnum; +import cn.iocoder.yudao.module.infra.job.job.JobLogCleanJob; import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; import org.quartz.SchedulerException; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -23,6 +26,7 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mockStatic; import static org.mockito.Mockito.verify; @Import(JobServiceImpl.class) @@ -35,6 +39,9 @@ public class JobServiceImplTest extends BaseDbUnitTest { @MockBean private SchedulerManager schedulerManager; + @MockBean + private JobLogCleanJob jobLogCleanJob; + @Test public void testCreateJob_cronExpressionValid() { // 准备参数。Cron 表达式为 String 类型,默认随机字符串。 @@ -48,11 +55,15 @@ public class JobServiceImplTest extends BaseDbUnitTest { public void testCreateJob_jobHandlerExists() throws SchedulerException { // 准备参数 指定 Cron 表达式 JobSaveReqVO reqVO = randomPojo(JobSaveReqVO.class, o -> o.setCronExpression("0 0/1 * * * ? *")); - - // 调用 - jobService.createJob(reqVO); - // 调用,并断言异常 - assertServiceException(() -> jobService.createJob(reqVO), JOB_HANDLER_EXISTS); + try (MockedStatic springUtilMockedStatic = mockStatic(SpringUtil.class)) { + springUtilMockedStatic.when(() -> SpringUtil.getBean(eq(reqVO.getHandlerName()))) + .thenReturn(jobLogCleanJob); + + // 调用 + jobService.createJob(reqVO); + // 调用,并断言异常 + assertServiceException(() -> jobService.createJob(reqVO), JOB_HANDLER_EXISTS); + } } @Test @@ -60,18 +71,22 @@ public class JobServiceImplTest extends BaseDbUnitTest { // 准备参数 指定 Cron 表达式 JobSaveReqVO reqVO = randomPojo(JobSaveReqVO.class, o -> o.setCronExpression("0 0/1 * * * ? *")) .setId(null); - - // 调用 - Long jobId = jobService.createJob(reqVO); - // 断言 - assertNotNull(jobId); - // 校验记录的属性是否正确 - JobDO job = jobMapper.selectById(jobId); - assertPojoEquals(reqVO, job, "id"); - assertEquals(JobStatusEnum.NORMAL.getStatus(), job.getStatus()); - // 校验调用 - verify(schedulerManager).addJob(eq(job.getId()), eq(job.getHandlerName()), eq(job.getHandlerParam()), - eq(job.getCronExpression()), eq(reqVO.getRetryCount()), eq(reqVO.getRetryInterval())); + try (MockedStatic springUtilMockedStatic = mockStatic(SpringUtil.class)) { + springUtilMockedStatic.when(() -> SpringUtil.getBean(eq(reqVO.getHandlerName()))) + .thenReturn(jobLogCleanJob); + + // 调用 + Long jobId = jobService.createJob(reqVO); + // 断言 + assertNotNull(jobId); + // 校验记录的属性是否正确 + JobDO job = jobMapper.selectById(jobId); + assertPojoEquals(reqVO, job, "id"); + assertEquals(JobStatusEnum.NORMAL.getStatus(), job.getStatus()); + // 校验调用 + verify(schedulerManager).addJob(eq(job.getId()), eq(job.getHandlerName()), eq(job.getHandlerParam()), + eq(job.getCronExpression()), eq(reqVO.getRetryCount()), eq(reqVO.getRetryInterval())); + } } @Test @@ -109,15 +124,19 @@ public class JobServiceImplTest extends BaseDbUnitTest { o.setId(job.getId()); o.setCronExpression("0 0/1 * * * ? *"); }); - - // 调用 - jobService.updateJob(updateReqVO); - // 校验记录的属性是否正确 - JobDO updateJob = jobMapper.selectById(updateReqVO.getId()); - assertPojoEquals(updateReqVO, updateJob); - // 校验调用 - verify(schedulerManager).updateJob(eq(job.getHandlerName()), eq(updateReqVO.getHandlerParam()), - eq(updateReqVO.getCronExpression()), eq(updateReqVO.getRetryCount()), eq(updateReqVO.getRetryInterval())); + try (MockedStatic springUtilMockedStatic = mockStatic(SpringUtil.class)) { + springUtilMockedStatic.when(() -> SpringUtil.getBean(eq(updateReqVO.getHandlerName()))) + .thenReturn(jobLogCleanJob); + + // 调用 + jobService.updateJob(updateReqVO); + // 校验记录的属性是否正确 + JobDO updateJob = jobMapper.selectById(updateReqVO.getId()); + assertPojoEquals(updateReqVO, updateJob); + // 校验调用 + verify(schedulerManager).updateJob(eq(job.getHandlerName()), eq(updateReqVO.getHandlerParam()), + eq(updateReqVO.getCronExpression()), eq(updateReqVO.getRetryCount()), eq(updateReqVO.getRetryInterval())); + } } @Test -- Gitee From de8b80699eca2f0c50063e271592fce61a23a48a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 19 Apr 2024 06:18:24 +0800 Subject: [PATCH 0297/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20http=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/http/chat-conversation.http | 36 +++++++++++++++++++ .../src/main/resources/http/chat.http | 2 +- .../main/resources/http/http-client.env.json | 5 ++- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http new file mode 100644 index 0000000000..2c04298837 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http @@ -0,0 +1,36 @@ + +### 登录 详细使用 https://www.jetbrains.com/help/idea/testing-restful-web-services.html、https://www.cnblogs.com/crazymakercircle/p/14317222.html + +POST {{baseUrl}}/admin-api/system/auth/login +Content-Type: application/json +tenant-id: 1 + +{ + "username": "admin", + "password": "123456", + "captchaVerification": "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", + "socialCode": "1024", + "socialState": "9b2ffbc1-7425-4155-9894-9d5c08541d62", + "socialCodeValid": true +} + + +> {% + client.log(`Today is ${$isoTimestamp}`) +%} + +### chat call +GET {{baseUrl}}/ai/chat?modal=qianWen&conversationId=111&prompt=中国好看吗? +tenant-id: 1 +Authorization: {{xtoken}} + + + +### chat call +GET {{baseUrl}}/ai/chatStream?prompt=苹果是什么颜色?&modal=yiYan3_5_8k +tenant-id: 1 +Authorization: {{token}} + + + + diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http index 1b645017ee..e850d79a8c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http @@ -16,7 +16,7 @@ tenant-id: 1 } ### chat call -GET {{baseUrl}}/ai/chat?prompt=中国怎么样&modal=qianWen +GET {{baseUrl}}/ai/chat?modal=qianWen&conversationId=111&prompt=中国好看吗? tenant-id: 1 Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json index c5adaf3e14..a76673c48e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json @@ -1,6 +1,9 @@ { + "global": { + "token": "--" + }, "dev": { "baseUrl": "http://127.0.0.1:48080", - "token": "Bearer 7d25823e225f4e0d8f9a96b0fa608649" + "token": "Bearer 2f807aacab534a4095cec0bac9c2af40" } } \ No newline at end of file -- Gitee From 9e6474a123fd6fec6be055002ca309abe2a012f2 Mon Sep 17 00:00:00 2001 From: scholar <1145227973@qq.com> Date: Fri, 19 Apr 2024 17:09:12 +0800 Subject: [PATCH 0298/1557] =?UTF-8?q?1=EF=BC=8C=E4=BC=98=E5=8C=96mapper.xm?= =?UTF-8?q?l=E7=9A=84sql=E8=AF=AD=E5=8F=A5=EF=BC=9B=202=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E4=BA=8E=E6=97=A0=E9=94=80=E5=94=AE=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=9C=88=E4=BB=BD=EF=BC=8C=E6=8F=92=E5=85=A5=E9=94=80=E5=94=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=BA0=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceServiceImpl.java | 81 ++++++++++-- .../CrmStatisticsPerformanceMapper.xml | 116 ++---------------- 2 files changed, 83 insertions(+), 114 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index 067be4f431..c93951f81f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; @@ -13,8 +14,9 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import jakarta.annotation.Resource; -import java.util.Collections; -import java.util.List; + +import java.math.BigDecimal; +import java.util.*; import java.util.function.Function; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -56,24 +58,87 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform * 获得员工业绩数据 * * @param performanceReqVO 参数 - * @param performanceFunction 排行榜方法 - * @return 排行版数据 + * @param performanceFunction 员工业绩统计方法 + * @return 员工业绩数据 */ private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, Function> performanceFunction) { + List performanceRespVOList; + // 1. 获得用户编号数组 final List userIds = getUserIds(performanceReqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } performanceReqVO.setUserIds(userIds); - // 2. 获得排行数据 + // 2. 获得业绩数据 List performance = performanceFunction.apply(performanceReqVO); - if (CollUtil.isEmpty(performance)) { - return Collections.emptyList(); + + // 获取查询的年份 + String currentYear = LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"); + + // 构造查询当年和前一年,每年12个月的年月组合 + List allMonths = new ArrayList<>(); + for (int year = Integer.parseInt(currentYear)-1; year <= Integer.parseInt(currentYear); year++) { + for (int month = 1; month <= 12; month++) { + allMonths.add(String.format("%d%02d", year, month)); + } + } + + List computedList = new ArrayList<>(); + List respVOList = new ArrayList<>(); + + // 生成computedList基础数据 + // 构造完整的2*12个月的数据,如果某月数据缺失,需要补上0,一年12个月不能有缺失 + for (String month : allMonths) { + CrmStatisticsPerformanceRespVO foundData = performance.stream() + .filter(data -> data.getTime().equals(month)) + .findFirst() + .orElse(null); + + if (foundData != null) { + computedList.add(foundData); + } else { + CrmStatisticsPerformanceRespVO missingData = new CrmStatisticsPerformanceRespVO(); + missingData.setTime(month); + missingData.setCurrentMonthCount(BigDecimal.ZERO); + missingData.setLastMonthCount(BigDecimal.ZERO); + missingData.setLastYearCount(BigDecimal.ZERO); + computedList.add(missingData); + } + } + //根据查询年份和前一年的数据,计算查询年份的同比环比数据 + for (CrmStatisticsPerformanceRespVO currentData : computedList) { + String currentMonth = currentData.getTime(); + + // 根据当年和前一年的月销售数据,计算currentYear的完整数据 + if (currentMonth.startsWith(currentYear)) { + // 计算 LastMonthCount + int currentIndex = computedList.indexOf(currentData); + if (currentIndex > 0) { + CrmStatisticsPerformanceRespVO lastMonthData = computedList.get(currentIndex - 1); + currentData.setLastMonthCount(lastMonthData.getCurrentMonthCount()); + } else { + currentData.setLastMonthCount(BigDecimal.ZERO); // 第一个月的 LastMonthCount 设为0 + } + + // 计算 LastYearCount + String lastYearMonth = String.valueOf(Integer.parseInt(currentMonth) - 100); + CrmStatisticsPerformanceRespVO lastYearData = computedList.stream() + .filter(data -> data.getTime().equals(lastYearMonth)) + .findFirst() + .orElse(null); + + if (lastYearData != null) { + currentData.setLastYearCount(lastYearData.getCurrentMonthCount()); + } else { + currentData.setLastYearCount(BigDecimal.ZERO); // 如果去年同月数据不存在,设为0 + } + respVOList.add(currentData);//给前端只需要返回查询当年的数据,不需要前一年数据 + } } - return performance; + return respVOList; } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml index 10b952bac2..ee9ec4e445 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml @@ -5,27 +5,8 @@ + - -- Gitee From 8b84e24f96c9dee8cb1160f658407f2246243bd4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 20 Apr 2024 17:49:58 +0800 Subject: [PATCH 0299/1557] =?UTF-8?q?dataobject=20=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=20dal=20=E9=87=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/iocoder/yudao/module/ai/dal/1 | 0 .../module/ai/{ => dal}/dataobject/AiChatConversationDO.java | 2 +- .../module/ai/{ => dal}/dataobject/AiChatMessageDO.java | 2 +- .../yudao/module/ai/{ => dal}/dataobject/AiChatRoleDO.java | 5 ++++- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/1 rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => dal}/dataobject/AiChatConversationDO.java (95%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => dal}/dataobject/AiChatMessageDO.java (96%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => dal}/dataobject/AiChatRoleDO.java (88%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/1 b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/1 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java index 79bb281e7a..7f5a142b3f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java similarity index 96% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java index 53d274ae1e..5ed372ab48 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java index a049e3cfc7..49ff42f877 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dataobject/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java @@ -1,6 +1,8 @@ -package cn.iocoder.yudao.module.ai.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import lombok.Data; import lombok.experimental.Accessors; @@ -16,6 +18,7 @@ public class AiChatRoleDO extends BaseDO { /** * 编号,表示聊天角色在数据库中的唯一标识符 */ + @TableId(type = IdType.AUTO) private Long id; /** -- Gitee From 01031bcdf65f87018e17763a0c143776d8583f37 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 20 Apr 2024 17:50:23 +0800 Subject: [PATCH 0300/1557] =?UTF-8?q?=E7=A7=BB=E5=8A=A8dataobject=20?= =?UTF-8?q?=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/convert/ChatConversationConvert.java | 2 +- .../yudao/module/ai/mapper/AiChatConversationMapper.java | 2 +- .../cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java | 2 +- .../cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java index 3ecabcc7cf..b2f6951e49 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/ChatConversationConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java index bfc7bc0aa4..30aa1dff56 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java index 0545a7e2f7..b121a0601f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java index 32393c4091..9f415cadfb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; -- Gitee From 5d6a3ff0b4eefee0c32d30fa0bc0be3d898e99d7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 20 Apr 2024 17:50:56 +0800 Subject: [PATCH 0301/1557] =?UTF-8?q?service=20=E7=A7=BB=E5=8A=A8dataobjec?= =?UTF-8?q?t=20=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/impl/ChatConversationServiceImpl.java | 4 ++-- .../yudao/module/ai/service/impl/ChatServiceImpl.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java index 52af7f7b55..1318351cd3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.ChatConversationConvert; -import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.service.ChatConversationService; import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; @@ -50,7 +50,7 @@ public class ChatConversationServiceImpl implements ChatConversationService { insertConversation.setType(req.getChatType()); aiChatConversationMapper.insert(insertConversation); // 转换 res - return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index bf3c9ff623..0bb7211cb7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.framework.common.exception.ServerException; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; -- Gitee From 83d17051bea6ea09377f2063764c5d841a644b73 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 20 Apr 2024 17:51:03 +0800 Subject: [PATCH 0302/1557] =?UTF-8?q?=E8=B0=83=E6=95=B4=20controller=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/ChatConversationController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java index 110937c610..d17a385a17 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java @@ -37,20 +37,20 @@ public class ChatConversationController { } @Operation(summary = "获取 - 获取对话") - @GetMapping("/getConversation") - public CommonResult getConversation(@RequestParam("id") Long id) { + @GetMapping("/{id}") + public CommonResult getConversation(@PathVariable("id") Long id) { return CommonResult.success(chatConversationService.getConversation(id)); } @Operation(summary = "获取 - 获取对话list") - @GetMapping("/listConversation") + @GetMapping("/list") public CommonResult> listConversation(@ModelAttribute @Validated ChatConversationListReq req) { return CommonResult.success(chatConversationService.listConversation(req)); } @Operation(summary = "删除") - @DeleteMapping("/listConversation") - public CommonResult delete(@RequestParam("id") Long id) { + @DeleteMapping("/{id}") + public CommonResult delete(@PathVariable("id") Long id) { chatConversationService.delete(id); return CommonResult.success(null); } -- Gitee From dc44fe1cf9843496a57aabfe210707c118a9dd9b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 20 Apr 2024 17:53:41 +0800 Subject: [PATCH 0303/1557] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 8196 bytes .../resources/http/chat-conversation.http | 32 +++++------------- .../main/resources/http/http-client.env.json | 2 +- 3 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8406d508bca176e90b7f717667ad1c8f1a08dc3d GIT binary patch literal 8196 zcmeHM&2G~`5S~p!0GT#hp-9~~HE2>@BaY1uGG9Uw7wF59^rXHr68Gpim%4i$NcAu>4DZB~bD z=W?9M3{E10lgM`#d4(e6?!ehnokTm6W;6^K1|}Kc+PzATX`NPRtysUuE>`$vT1IdD zlnpbYISMJJ9=RCzs6kth5p7dIJ6Yv_g8Zx@tJIgs2E7A5RJFxTO}j=L@MxJ<=?P>5 z2v0-2*AO$5!kYx1^l6~!{?K&G(0!}>P}?2y9Mc6BVOx2xA z-!vO@iVYvJJBXzZ7JU_2UeS=36y!D{W28?bc$3hchW;`Y-2=u$EZ7y1I25Sp$}J6D zSN2xXF1+t)_z!=9=WC?lWtM#^WZAU+ec=1*{=~Uf#H&|M^*@mL3N}?6G6Rb?E>Gd0 z2M$9$e*|Y_(ZbcK7JOVy7uO@v{NP+IT2b>rjRl#cqGb*j(bJghBZ>nJ&-q)#Pm3Xe z_k2$$`u!$z`A@B+U@4^mY-w3h=A15Cxv21&GIz8;$)L>UBF<89!-?$Y?47Fbj?%sx z$|u`bw;u-SpxOK`O6AIhnW|N_X06xV-FVa;ID=u@agvvO^em1;_jvBO&jWw7S--Xt zM*}B_{6qo*&xgvZ7eVC3qfR`Gyi{Vl*@9KGYMb>Nhlj1!!}|+%>)zd?1^ckIwA94G zQuD#lQO&x3`_7|{&AqS}#T*8j$iI>Bs8-uY98OTN-%X-0j`-1cj8jqO=!`N@&f=Qq z`hV^8-~Z2O^d>CBfMI|c5S7*LYKJGM@WHjVjs6Cm8|#fTDIpkSISwhyambTD3^BK% h%9wU8$C<<#w156Xz#_ha^{-#^{x|P`nT_XX_ys@j>-_)# literal 0 HcmV?d00001 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http index 2c04298837..02c147e038 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http @@ -1,36 +1,22 @@ ### 登录 详细使用 https://www.jetbrains.com/help/idea/testing-restful-web-services.html、https://www.cnblogs.com/crazymakercircle/p/14317222.html -POST {{baseUrl}}/admin-api/system/auth/login +### 对话 - 创建对话 +POST {{baseUrl}}/ai/chat/conversation/create Content-Type: application/json -tenant-id: 1 +Authorization: {{token}} { - "username": "admin", - "password": "123456", - "captchaVerification": "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", - "socialCode": "1024", - "socialState": "9b2ffbc1-7425-4155-9894-9d5c08541d62", - "socialCodeValid": true + "chatType": "userChat" } -> {% - client.log(`Today is ${$isoTimestamp}`) -%} - -### chat call -GET {{baseUrl}}/ai/chat?modal=qianWen&conversationId=111&prompt=中国好看吗? -tenant-id: 1 -Authorization: {{xtoken}} - - - -### chat call -GET {{baseUrl}}/ai/chatStream?prompt=苹果是什么颜色?&modal=yiYan3_5_8k -tenant-id: 1 +### 对话 - id获取 +GET {{baseUrl}}/ai/chat/conversation/1781604279872581644 Authorization: {{token}} - +### 对话 - id获取 +DELETE {{baseUrl}}/ai/chat/conversation/1781604279872581644 +Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json index a76673c48e..b66e855a55 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/http-client.env.json @@ -4,6 +4,6 @@ }, "dev": { "baseUrl": "http://127.0.0.1:48080", - "token": "Bearer 2f807aacab534a4095cec0bac9c2af40" + "token": "Bearer a9bf9c8c10cb47fc92bc9aac95b63f5b" } } \ No newline at end of file -- Gitee From 5d58037d05ccf8623cba01a5b539d69bd00cabeb Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 19:01:25 +0800 Subject: [PATCH 0304/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=B0=86?= =?UTF-8?q?=20hutool-all=206.0=20=E7=89=88=E6=9C=AC=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E6=88=90=20hutool-extra=EF=BC=8C=E5=87=8F=E5=B0=91=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 2 +- yudao-framework/yudao-common/pom.xml | 4 ---- .../BpmTaskCandidateExpressionStrategy.java | 4 ++-- .../yudao-module-system-biz/pom.xml | 6 ++++++ .../convert/mail/MailAccountConvert.java | 21 ------------------- .../service/mail/MailSendServiceImpl.java | 15 ++++++++----- .../service/mail/MailSendServiceImplTest.java | 3 +-- 7 files changed, 20 insertions(+), 35 deletions(-) delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailAccountConvert.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 09067a2a4e..2ee3a30371 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -443,7 +443,7 @@ org.dromara.hutool - hutool-all + hutool-extra ${hutool-6.version} diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index e735856a81..b28da08fe2 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -127,10 +127,6 @@ cn.hutool hutool-all - - org.dromara.hutool - hutool-all - com.alibaba diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java index e51ab76e00..e0f9dabe5a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategy.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; +import cn.hutool.core.convert.Convert; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; -import org.dromara.hutool.core.convert.Convert; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; diff --git a/yudao-module-system/yudao-module-system-biz/pom.xml b/yudao-module-system/yudao-module-system-biz/pom.xml index 6de1a58a15..082b6b470d 100644 --- a/yudao-module-system/yudao-module-system-biz/pom.xml +++ b/yudao-module-system/yudao-module-system-biz/pom.xml @@ -127,6 +127,12 @@ com.xingyuv spring-boot-starter-captcha-plus + + + org.dromara.hutool + hutool-extra + + diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailAccountConvert.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailAccountConvert.java deleted file mode 100644 index f538197d79..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailAccountConvert.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.mail; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; -import org.dromara.hutool.extra.mail.MailAccount; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface MailAccountConvert { - - MailAccountConvert INSTANCE = Mappers.getMapper(MailAccountConvert.class); - - default MailAccount convert(MailAccountDO account, String nickname) { - String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail(); - return new MailAccount().setFrom(from).setAuth(true) - .setUser(account.getUsername()).setPass(account.getPassword().toCharArray()) - .setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable()); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java index 61ff83d8be..178a64aec9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.system.service.mail; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; @@ -12,13 +11,12 @@ import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; import cn.iocoder.yudao.module.system.service.member.MemberService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.google.common.annotations.VisibleForTesting; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.dromara.hutool.extra.mail.MailAccount; -import org.dromara.hutool.extra.mail.MailUtil; +import org.dromara.hutool.extra.mail.*; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -105,7 +103,7 @@ public class MailSendServiceImpl implements MailSendService { public void doSendMail(MailSendMessage message) { // 1. 创建发送账号 MailAccountDO account = validateMailAccount(message.getAccountId()); - MailAccount mailAccount = MailAccountConvert.INSTANCE.convert(account, message.getNickname()); + MailAccount mailAccount = buildMailAccount(account, message.getNickname()); // 2. 发送邮件 try { String messageId = MailUtil.send(mailAccount, message.getMail(), @@ -118,6 +116,13 @@ public class MailSendServiceImpl implements MailSendService { } } + private MailAccount buildMailAccount(MailAccountDO account, String nickname) { + String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail(); + return new MailAccount().setFrom(from).setAuth(true) + .setUser(account.getUsername()).setPass(account.getPassword().toCharArray()) + .setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable()); + } + @VisibleForTesting MailTemplateDO validateMailTemplate(String templateCode) { // 获得邮件模板。考虑到效率,从缓存中获取 diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java index eaea39fe96..1ef1e12322 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java @@ -13,8 +13,7 @@ import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; import cn.iocoder.yudao.module.system.service.member.MemberService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import org.assertj.core.util.Lists; -import org.dromara.hutool.extra.mail.MailAccount; -import org.dromara.hutool.extra.mail.MailUtil; +import org.dromara.hutool.extra.mail.*; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; -- Gitee From 24dacacf156262624212ad1727e71fb3812dadde Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 19:08:25 +0800 Subject: [PATCH 0305/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=B0=86?= =?UTF-8?q?=20hutool-all=206.0=20=E7=89=88=E6=9C=AC=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E6=88=90=20hutool-extra=EF=BC=8C=E5=87=8F=E5=B0=91=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/infra/service/job/JobServiceImpl.java | 3 ++- yudao-module-system/yudao-module-system-biz/pom.xml | 6 ------ .../module/system/service/mail/MailSendServiceImpl.java | 6 +++--- .../system/service/mail/MailSendServiceImplTest.java | 8 ++++---- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java index dd887e165c..b27574b159 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java @@ -11,12 +11,13 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.dal.mysql.job.JobMapper; import cn.iocoder.yudao.module.infra.enums.job.JobStatusEnum; -import jakarta.annotation.Resource; import org.quartz.SchedulerException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.containsAny; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; diff --git a/yudao-module-system/yudao-module-system-biz/pom.xml b/yudao-module-system/yudao-module-system-biz/pom.xml index 082b6b470d..6de1a58a15 100644 --- a/yudao-module-system/yudao-module-system-biz/pom.xml +++ b/yudao-module-system/yudao-module-system-biz/pom.xml @@ -127,12 +127,6 @@ com.xingyuv spring-boot-starter-captcha-plus - - - org.dromara.hutool - hutool-extra - - diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java index 178a64aec9..5b649b5f3a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.system.service.mail; import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.mail.*; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; @@ -11,12 +12,11 @@ import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; import cn.iocoder.yudao.module.system.service.member.MemberService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.google.common.annotations.VisibleForTesting; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.dromara.hutool.extra.mail.*; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -119,7 +119,7 @@ public class MailSendServiceImpl implements MailSendService { private MailAccount buildMailAccount(MailAccountDO account, String nickname) { String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail(); return new MailAccount().setFrom(from).setAuth(true) - .setUser(account.getUsername()).setPass(account.getPassword().toCharArray()) + .setUser(account.getUsername()).setPass(account.getPassword()) .setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable()); } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java index 1ef1e12322..b87315276d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.system.service.mail; import cn.hutool.core.map.MapUtil; +import cn.hutool.extra.mail.*; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; @@ -13,7 +14,6 @@ import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; import cn.iocoder.yudao.module.system.service.member.MemberService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import org.assertj.core.util.Lists; -import org.dromara.hutool.extra.mail.*; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; @@ -59,7 +59,7 @@ public class MailSendServiceImplTest extends BaseMockitoUnitTest { // .setFrom("奥特曼 ") .setFrom("ydym_test@163.com") // 邮箱地址 .setHost("smtp.163.com").setPort(465).setSslEnable(true) // SMTP 服务器 - .setAuth(true).setUser("ydym_test@163.com").setPass("WBZTEINMIFVRYSOE".toCharArray()); // 登录账号密码 + .setAuth(true).setUser("ydym_test@163.com").setPass("WBZTEINMIFVRYSOE"); // 登录账号密码 String messageId = MailUtil.send(mailAccount, "7685413@qq.com", "主题", "内容", false); System.out.println("发送结果:" + messageId); } @@ -281,7 +281,7 @@ public class MailSendServiceImplTest extends BaseMockitoUnitTest { assertEquals("芋艿 <7685@qq.com>", mailAccount.getFrom()); assertTrue(mailAccount.isAuth()); assertEquals(account.getUsername(), mailAccount.getUser()); - assertArrayEquals(account.getPassword().toCharArray(), mailAccount.getPass()); + assertEquals(account.getPassword(), mailAccount.getPass()); assertEquals(account.getHost(), mailAccount.getHost()); assertEquals(account.getPort(), mailAccount.getPort()); assertEquals(account.getSslEnable(), mailAccount.isSslEnable()); @@ -312,7 +312,7 @@ public class MailSendServiceImplTest extends BaseMockitoUnitTest { assertEquals("芋艿 <7685@qq.com>", mailAccount.getFrom()); assertTrue(mailAccount.isAuth()); assertEquals(account.getUsername(), mailAccount.getUser()); - assertArrayEquals(account.getPassword().toCharArray(), mailAccount.getPass()); + assertEquals(account.getPassword(), mailAccount.getPass()); assertEquals(account.getHost(), mailAccount.getHost()); assertEquals(account.getPort(), mailAccount.getPort()); assertEquals(account.getSslEnable(), mailAccount.isSslEnable()); -- Gitee From ff5276998cb956fc0878bf39a194040378ce7363 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 19:14:10 +0800 Subject: [PATCH 0306/1557] =?UTF-8?q?=E3=80=90=E7=A7=BB=E9=99=A4=E3=80=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=96=87=E6=A1=A3=EF=BC=8C=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=A4=8D=E6=9D=82=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 16 -- .../yudao-module-infra-biz/pom.xml | 5 - .../admin/db/DatabaseDocController.java | 154 ------------------ 3 files changed, 175 deletions(-) delete mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 2ee3a30371..e25014d419 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -475,22 +475,6 @@ ${fastjson.version} - - cn.smallbun.screw - screw-core - ${screw.version} - - - org.freemarker - freemarker - - - com.alibaba - fastjson - - - - com.google.guava guava diff --git a/yudao-module-infra/yudao-module-infra-biz/pom.xml b/yudao-module-infra/yudao-module-infra-biz/pom.xml index 44f3aef67b..f2840cfc7a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/pom.xml +++ b/yudao-module-infra/yudao-module-infra-biz/pom.xml @@ -95,11 +95,6 @@ velocity-engine-core - - cn.smallbun.screw - screw-core - - cn.iocoder.boot diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java deleted file mode 100644 index ea66645b4f..0000000000 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java +++ /dev/null @@ -1,154 +0,0 @@ -package cn.iocoder.yudao.module.infra.controller.admin.db; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.util.IdUtil; -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.smallbun.screw.core.Configuration; -import cn.smallbun.screw.core.engine.EngineConfig; -import cn.smallbun.screw.core.engine.EngineFileType; -import cn.smallbun.screw.core.engine.EngineTemplateType; -import cn.smallbun.screw.core.execute.DocumentationExecute; -import cn.smallbun.screw.core.process.ProcessConfig; -import com.baomidou.dynamic.datasource.creator.DataSourceProperty; -import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; -import com.zaxxer.hikari.HikariConfig; -import com.zaxxer.hikari.HikariDataSource; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Operation; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.Arrays; - -@Tag(name = "管理后台 - 数据库文档") -@RestController -@RequestMapping("/infra/db-doc") -public class DatabaseDocController { - - @Resource - private DynamicDataSourceProperties dynamicDataSourceProperties; - - private static final String FILE_OUTPUT_DIR = System.getProperty("java.io.tmpdir") + File.separator - + "db-doc"; - private static final String DOC_FILE_NAME = "数据库文档"; - private static final String DOC_VERSION = "1.0.0"; - private static final String DOC_DESCRIPTION = "文档描述"; - - @GetMapping("/export-html") - @Operation(summary = "导出 html 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") - public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, - HttpServletResponse response) throws IOException { - doExportFile(EngineFileType.HTML, deleteFile, response); - } - - @GetMapping("/export-word") - @Operation(summary = "导出 word 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") - public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, - HttpServletResponse response) throws IOException { - doExportFile(EngineFileType.WORD, deleteFile, response); - } - - @GetMapping("/export-markdown") - @Operation(summary = "导出 markdown 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") - public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile, - HttpServletResponse response) throws IOException { - doExportFile(EngineFileType.MD, deleteFile, response); - } - - private void doExportFile(EngineFileType fileOutputType, Boolean deleteFile, - HttpServletResponse response) throws IOException { - String docFileName = DOC_FILE_NAME + "_" + IdUtil.fastSimpleUUID(); - String filePath = doExportFile(fileOutputType, docFileName); - String downloadFileName = DOC_FILE_NAME + fileOutputType.getFileSuffix(); //下载后的文件名 - try { - // 读取,返回 - ServletUtils.writeAttachment(response, downloadFileName, FileUtil.readBytes(filePath)); - } finally { - handleDeleteFile(deleteFile, filePath); - } - } - - /** - * 输出文件,返回文件路径 - * - * @param fileOutputType 文件类型 - * @param fileName 文件名, 无需 ".docx" 等文件后缀 - * @return 生成的文件所在路径 - */ - private String doExportFile(EngineFileType fileOutputType, String fileName) { - try (HikariDataSource dataSource = buildDataSource()) { - // 创建 screw 的配置 - Configuration config = Configuration.builder() - .version(DOC_VERSION) // 版本 - .description(DOC_DESCRIPTION) // 描述 - .dataSource(dataSource) // 数据源 - .engineConfig(buildEngineConfig(fileOutputType, fileName)) // 引擎配置 - .produceConfig(buildProcessConfig()) // 处理配置 - .build(); - - // 执行 screw,生成数据库文档 - new DocumentationExecute(config).execute(); - - return FILE_OUTPUT_DIR + File.separator + fileName + fileOutputType.getFileSuffix(); - } - } - - private void handleDeleteFile(Boolean deleteFile, String filePath) { - if (!deleteFile) { - return; - } - FileUtil.del(filePath); - } - - /** - * 创建数据源 - */ - // TODO 芋艿:screw 暂时不支持 druid,尴尬 - private HikariDataSource buildDataSource() { - // 获得 DataSource 数据源,目前只支持首个 - String primary = dynamicDataSourceProperties.getPrimary(); - DataSourceProperty dataSourceProperty = dynamicDataSourceProperties.getDatasource().get(primary); - // 创建 HikariConfig 配置类 - HikariConfig hikariConfig = new HikariConfig(); - hikariConfig.setJdbcUrl(dataSourceProperty.getUrl()); - hikariConfig.setUsername(dataSourceProperty.getUsername()); - hikariConfig.setPassword(dataSourceProperty.getPassword()); - hikariConfig.addDataSourceProperty("useInformationSchema", "true"); // 设置可以获取 tables remarks 信息 - // 创建数据源 - return new HikariDataSource(hikariConfig); - } - - /** - * 创建 screw 的引擎配置 - */ - private static EngineConfig buildEngineConfig(EngineFileType fileOutputType, String docFileName) { - return EngineConfig.builder() - .fileOutputDir(FILE_OUTPUT_DIR) // 生成文件路径 - .openOutputDir(false) // 打开目录 - .fileType(fileOutputType) // 文件类型 - .produceType(EngineTemplateType.velocity) // 文件类型 - .fileName(docFileName) // 自定义文件名称 - .build(); - } - - /** - * 创建 screw 的处理配置,一般可忽略 - * 指定生成逻辑、当存在指定表、指定表前缀、指定表后缀时,将生成指定表,其余表不生成、并跳过忽略表配置 - */ - private static ProcessConfig buildProcessConfig() { - return ProcessConfig.builder() - .ignoreTablePrefix(Arrays.asList("QRTZ_", "ACT_", "FLW_")) // 忽略表前缀 - .build(); - } - -} -- Gitee From 8093ef3b968d566c9b42e9442a100932540683a7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 19:42:45 +0800 Subject: [PATCH 0307/1557] =?UTF-8?q?=E3=80=90=E7=A7=BB=E9=99=A4=E3=80=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E7=9A=84=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=A4=8D=E6=9D=82?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exception/util/ServiceExceptionUtil.java | 54 +-- .../errorcode/config/ErrorCodeProperties.java | 30 -- .../YudaoErrorCodeAutoConfiguration.java | 39 --- .../generator/ErrorCodeAutoGenerator.java | 15 - .../generator/ErrorCodeAutoGeneratorImpl.java | 108 ------ .../core/loader/ErrorCodeLoader.java | 34 -- .../core/loader/ErrorCodeLoaderImpl.java | 82 ----- .../framework/errorcode/package-info.java | 10 - ...ot.autoconfigure.AutoConfiguration.imports | 3 +- .../system/api/errorcode/ErrorCodeApi.java | 35 -- .../dto/ErrorCodeAutoGenerateReqDTO.java | 34 -- .../api/errorcode/dto/ErrorCodeRespDTO.java | 28 -- .../enums/errorcode/ErrorCodeTypeEnum.java | 39 --- .../api/errorcode/ErrorCodeApiImpl.java | 33 -- .../admin/errorcode/ErrorCodeController.http | 13 - .../admin/errorcode/ErrorCodeController.java | 93 ------ .../errorcode/vo/ErrorCodePageReqVO.java | 36 -- .../admin/errorcode/vo/ErrorCodeRespVO.java | 47 --- .../errorcode/vo/ErrorCodeSaveReqVO.java | 30 -- .../dal/dataobject/errorcode/ErrorCodeDO.java | 52 --- .../dal/mysql/errorcode/ErrorCodeMapper.java | 40 --- .../service/errorcode/ErrorCodeService.java | 77 ----- .../errorcode/ErrorCodeServiceImpl.java | 167 ---------- .../errorcode/ErrorCodeServiceTest.java | 308 ------------------ .../src/test/resources/sql/clean.sql | 1 - .../src/test/resources/sql/create_tables.sql | 15 - .../src/main/resources/application-local.yaml | 2 - .../src/main/resources/application.yaml | 8 - 28 files changed, 3 insertions(+), 1430 deletions(-) delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/ErrorCodeProperties.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeAutoConfiguration.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoader.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java delete mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/package-info.java delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeAutoGenerateReqDTO.java delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeRespDTO.java delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApiImpl.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeSaveReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/util/ServiceExceptionUtil.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/util/ServiceExceptionUtil.java index 966109fbf8..03c0859408 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/util/ServiceExceptionUtil.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/util/ServiceExceptionUtil.java @@ -6,74 +6,24 @@ import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstant import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - /** * {@link ServiceException} 工具类 * * 目的在于,格式化异常信息提示。 * 考虑到 String.format 在参数不正确时会报错,因此使用 {} 作为占位符,并使用 {@link #doFormat(int, String, Object...)} 方法来格式化 * - * 因为 {@link #MESSAGES} 里面默认是没有异常信息提示的模板的,所以需要使用方自己初始化进去。目前想到的有几种方式: - * - * 1. 异常提示信息,写在枚举类中,例如说,cn.iocoder.oceans.user.api.constants.ErrorCodeEnum 类 + ServiceExceptionConfiguration - * 2. 异常提示信息,写在 .properties 等等配置文件 - * 3. 异常提示信息,写在 Apollo 等等配置中心中,从而实现可动态刷新 - * 4. 异常提示信息,存储在 db 等等数据库中,从而实现可动态刷新 */ @Slf4j public class ServiceExceptionUtil { - /** - * 错误码提示模板 - */ - private static final ConcurrentMap MESSAGES = new ConcurrentHashMap<>(); - - public static void putAll(Map messages) { - ServiceExceptionUtil.MESSAGES.putAll(messages); - } - - public static void put(Integer code, String message) { - ServiceExceptionUtil.MESSAGES.put(code, message); - } - - public static void delete(Integer code, String message) { - ServiceExceptionUtil.MESSAGES.remove(code, message); - } - // ========== 和 ServiceException 的集成 ========== public static ServiceException exception(ErrorCode errorCode) { - String messagePattern = MESSAGES.getOrDefault(errorCode.getCode(), errorCode.getMsg()); - return exception0(errorCode.getCode(), messagePattern); + return exception0(errorCode.getCode(), errorCode.getMsg()); } public static ServiceException exception(ErrorCode errorCode, Object... params) { - String messagePattern = MESSAGES.getOrDefault(errorCode.getCode(), errorCode.getMsg()); - return exception0(errorCode.getCode(), messagePattern, params); - } - - /** - * 创建指定编号的 ServiceException 的异常 - * - * @param code 编号 - * @return 异常 - */ - public static ServiceException exception(Integer code) { - return exception0(code, MESSAGES.get(code)); - } - - /** - * 创建指定编号的 ServiceException 的异常 - * - * @param code 编号 - * @param params 消息提示的占位符对应的参数 - * @return 异常 - */ - public static ServiceException exception(Integer code, Object... params) { - return exception0(code, MESSAGES.get(code), params); + return exception0(errorCode.getCode(), errorCode.getMsg(), params); } public static ServiceException exception0(Integer code, String messagePattern, Object... params) { diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/ErrorCodeProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/ErrorCodeProperties.java deleted file mode 100644 index 5e6aab49a7..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/ErrorCodeProperties.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.validation.annotation.Validated; - -import jakarta.validation.constraints.NotNull; -import java.util.List; - -/** - * 错误码的配置属性类 - * - * @author dlyan - */ -@ConfigurationProperties("yudao.error-code") -@Data -@Validated -public class ErrorCodeProperties { - - /** - * 是否开启 - */ - private Boolean enable = true; - /** - * 错误码枚举类 - */ - @NotNull(message = "错误码枚举类不能为空") - private List constantsClassList; - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeAutoConfiguration.java deleted file mode 100644 index ed2c92fc2a..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeAutoConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.config; - -import cn.iocoder.yudao.framework.errorcode.core.generator.ErrorCodeAutoGenerator; -import cn.iocoder.yudao.framework.errorcode.core.generator.ErrorCodeAutoGeneratorImpl; -import cn.iocoder.yudao.framework.errorcode.core.loader.ErrorCodeLoader; -import cn.iocoder.yudao.framework.errorcode.core.loader.ErrorCodeLoaderImpl; -import cn.iocoder.yudao.module.system.api.errorcode.ErrorCodeApi; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.scheduling.annotation.EnableScheduling; - -/** - * 错误码配置类 - * - * @author 芋道源码 - */ -@AutoConfiguration -@ConditionalOnProperty(prefix = "yudao.error-code", value = "enable", matchIfMissing = true) // 允许使用 yudao.error-code.enable=false 禁用访问日志 -@EnableConfigurationProperties(ErrorCodeProperties.class) -@EnableScheduling // 开启调度任务的功能,因为 ErrorCodeRemoteLoader 通过定时刷新错误码 -public class YudaoErrorCodeAutoConfiguration { - - @Bean - public ErrorCodeAutoGenerator errorCodeAutoGenerator(@Value("${spring.application.name}") String applicationName, - ErrorCodeProperties errorCodeProperties, - ErrorCodeApi errorCodeApi) { - return new ErrorCodeAutoGeneratorImpl(applicationName, errorCodeProperties.getConstantsClassList(), errorCodeApi); - } - - @Bean - public ErrorCodeLoader errorCodeLoader(@Value("${spring.application.name}") String applicationName, - ErrorCodeApi errorCodeApi) { - return new ErrorCodeLoaderImpl(applicationName, errorCodeApi); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java deleted file mode 100644 index b13cacaa2f..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java +++ /dev/null @@ -1,15 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.core.generator; - -/** - * 错误码的自动生成器 - * - * @author dylan - */ -public interface ErrorCodeAutoGenerator { - - /** - * 将配置类到错误码写入数据库 - */ - void execute(); - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java deleted file mode 100644 index 00fbc03ca4..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.core.generator; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.exceptions.ExceptionUtil; -import cn.hutool.core.util.ClassUtil; -import cn.hutool.core.util.ReflectUtil; -import cn.iocoder.yudao.framework.common.exception.ErrorCode; -import cn.iocoder.yudao.module.system.api.errorcode.ErrorCodeApi; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.context.event.ApplicationReadyEvent; -import org.springframework.context.event.EventListener; -import org.springframework.scheduling.annotation.Async; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * ErrorCodeAutoGenerator 的实现类 - * 目的是,扫描指定的 {@link #constantsClassList} 类,写入到 system 服务中 - * - * @author dylan - */ -@RequiredArgsConstructor -@Slf4j -public class ErrorCodeAutoGeneratorImpl implements ErrorCodeAutoGenerator { - - /** - * 应用分组 - */ - private final String applicationName; - /** - * 错误码枚举类 - */ - private final List constantsClassList; - /** - * 错误码 Api - */ - private final ErrorCodeApi errorCodeApi; - - @Override - @EventListener(ApplicationReadyEvent.class) - @Async // 异步,保证项目的启动过程,毕竟非关键流程 - public void execute() { - // 第一步,解析错误码 - List autoGenerateDTOs = parseErrorCode(); - log.info("[execute][解析到错误码数量为 ({}) 个]", autoGenerateDTOs.size()); - - // 第二步,写入到 system 服务 - try { - errorCodeApi.autoGenerateErrorCodeList(autoGenerateDTOs); - log.info("[execute][写入到 system 组件完成]"); - } catch (Exception ex) { - log.error("[execute][写入到 system 组件失败({})]", ExceptionUtil.getRootCauseMessage(ex)); - } - } - - /** - * 解析 constantsClassList 变量,转换成错误码数组 - * - * @return 错误码数组 - */ - private List parseErrorCode() { - // 校验 errorCodeConstantsClass 参数 - if (CollUtil.isEmpty(constantsClassList)) { - log.info("[execute][未配置 yudao.error-code.constants-class-list 配置项,不进行自动写入到 system 服务中]"); - return new ArrayList<>(); - } - - // 解析错误码 - List autoGenerateDTOs = new ArrayList<>(); - constantsClassList.forEach(constantsClass -> { - try { - // 解析错误码枚举类 - Class errorCodeConstantsClazz = ClassUtil.loadClass(constantsClass); - // 解析错误码 - autoGenerateDTOs.addAll(parseErrorCode(errorCodeConstantsClazz)); - } catch (Exception ex) { - log.warn("[parseErrorCode][constantsClass({}) 加载失败({})]", constantsClass, - ExceptionUtil.getRootCauseMessage(ex)); - } - }); - return autoGenerateDTOs; - } - - /** - * 解析错误码类,获得错误码数组 - * - * @return 错误码数组 - */ - private List parseErrorCode(Class constantsClass) { - List autoGenerateDTOs = new ArrayList<>(); - Arrays.stream(constantsClass.getFields()).forEach(field -> { - if (field.getType() != ErrorCode.class) { - return; - } - // 转换成 ErrorCodeAutoGenerateReqDTO 对象 - ErrorCode errorCode = (ErrorCode) ReflectUtil.getFieldValue(constantsClass, field); - autoGenerateDTOs.add(new ErrorCodeAutoGenerateReqDTO().setApplicationName(applicationName) - .setCode(errorCode.getCode()).setMessage(errorCode.getMsg())); - }); - return autoGenerateDTOs; - } - -} - diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoader.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoader.java deleted file mode 100644 index 0bf70211f2..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoader.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.core.loader; - -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; - -/** - * 错误码加载器 - * - * 注意,错误码最终加载到 {@link ServiceExceptionUtil} 的 MESSAGES 变量中! - * - * @author dlyan - */ -public interface ErrorCodeLoader { - - /** - * 添加错误码 - * - * @param code 错误码的编号 - * @param msg 错误码的提示 - */ - default void putErrorCode(Integer code, String msg) { - ServiceExceptionUtil.put(code, msg); - } - - /** - * 刷新错误码 - */ - void refreshErrorCodes(); - - /** - * 加载错误码 - */ - void loadErrorCodes(); - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java deleted file mode 100644 index 4d1febfd72..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package cn.iocoder.yudao.framework.errorcode.core.loader; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.exceptions.ExceptionUtil; -import cn.iocoder.yudao.framework.common.util.date.DateUtils; -import cn.iocoder.yudao.module.system.api.errorcode.ErrorCodeApi; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.context.event.ApplicationReadyEvent; -import org.springframework.context.event.EventListener; -import org.springframework.scheduling.annotation.Async; -import org.springframework.scheduling.annotation.Scheduled; - -import java.time.LocalDateTime; -import java.util.List; - -/** - * ErrorCodeLoader 的实现类,从 infra 的数据库中,加载错误码。 - * - * 考虑到错误码会刷新,所以按照 {@link #REFRESH_ERROR_CODE_PERIOD} 频率,增量加载错误码。 - * - * @author dlyan - */ -@RequiredArgsConstructor -@Slf4j -public class ErrorCodeLoaderImpl implements ErrorCodeLoader { - - /** - * 刷新错误码的频率,单位:毫秒 - */ - private static final int REFRESH_ERROR_CODE_PERIOD = 60 * 1000; - - /** - * 应用分组 - */ - private final String applicationName; - /** - * 错误码 Api - */ - private final ErrorCodeApi errorCodeApi; - - /** - * 缓存错误码的最大更新时间,用于后续的增量轮询,判断是否有更新 - */ - private LocalDateTime maxUpdateTime; - - @Override - @EventListener(ApplicationReadyEvent.class) - @Async // 异步,保证项目的启动过程,毕竟非关键流程 - public void loadErrorCodes() { - loadErrorCodes0(); - } - - @Override - @Scheduled(fixedDelay = REFRESH_ERROR_CODE_PERIOD, initialDelay = REFRESH_ERROR_CODE_PERIOD) - public void refreshErrorCodes() { - loadErrorCodes0(); - } - - private void loadErrorCodes0() { - try { - // 加载错误码 - List errorCodeRespDTOs = errorCodeApi.getErrorCodeList(applicationName, maxUpdateTime); - if (CollUtil.isEmpty(errorCodeRespDTOs)) { - return; - } - log.info("[loadErrorCodes0][加载到 ({}) 个错误码]", errorCodeRespDTOs.size()); - - // 刷新错误码的缓存 - errorCodeRespDTOs.forEach(errorCodeRespDTO -> { - // 写入到错误码的缓存 - putErrorCode(errorCodeRespDTO.getCode(), errorCodeRespDTO.getMessage()); - // 记录下更新时间,方便增量更新 - maxUpdateTime = DateUtils.max(maxUpdateTime, errorCodeRespDTO.getUpdateTime()); - }); - } catch (Exception ex) { - log.error("[loadErrorCodes0][加载错误码失败({})]", ExceptionUtil.getRootCauseMessage(ex)); - } - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/package-info.java deleted file mode 100644 index ddba4f78a5..0000000000 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/errorcode/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 错误码 ErrorCode 的自动配置功能,提供如下功能: - * - * 1. 远程读取:项目启动时,从 system-service 服务,读取数据库中的 ErrorCode 错误码,实现错误码的提水可配置; - * 2. 自动更新:管理员在管理后台修数据库中的 ErrorCode 错误码时,项目自动从 system-service 服务加载最新的 ErrorCode 错误码; - * 3. 自动写入:项目启动时,将项目本地的错误码写到 system-server 服务中,方便管理员在管理后台编辑; - * - * @author 芋道源码 - */ -package cn.iocoder.yudao.framework.errorcode; diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 36ba94cbb7..9cdcd09c4e 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -3,5 +3,4 @@ cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration -cn.iocoder.yudao.framework.banner.config.YudaoBannerAutoConfiguration -cn.iocoder.yudao.framework.errorcode.config.YudaoErrorCodeAutoConfiguration \ No newline at end of file +cn.iocoder.yudao.framework.banner.config.YudaoBannerAutoConfiguration \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java deleted file mode 100644 index a86a999af6..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.system.api.errorcode; - -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; - -import jakarta.validation.Valid; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 错误码 Api 接口 - * - * @author 芋道源码 - */ -public interface ErrorCodeApi { - - /** - * 自动创建错误码 - * - * @param autoGenerateDTOs 错误码信息 - */ - void autoGenerateErrorCodeList(@Valid List autoGenerateDTOs); - - /** - * 增量获得错误码数组 - * - * 如果 minUpdateTime 为空时,则获取所有错误码 - * - * @param applicationName 应用名 - * @param minUpdateTime 最小更新时间 - * @return 错误码数组 - */ - List getErrorCodeList(String applicationName, LocalDateTime minUpdateTime); - -} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeAutoGenerateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeAutoGenerateReqDTO.java deleted file mode 100644 index cb8935a0ac..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeAutoGenerateReqDTO.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.system.api.errorcode.dto; - -import lombok.Data; -import lombok.experimental.Accessors; - -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; - -/** - * 错误码自动生成 DTO - * - * @author dylan - */ -@Data -@Accessors(chain = true) -public class ErrorCodeAutoGenerateReqDTO { - - /** - * 应用名 - */ - @NotNull(message = "应用名不能为空") - private String applicationName; - /** - * 错误码编码 - */ - @NotNull(message = "错误码编码不能为空") - private Integer code; - /** - * 错误码错误提示 - */ - @NotEmpty(message = "错误码错误提示不能为空") - private String message; - -} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeRespDTO.java deleted file mode 100644 index 99372300b9..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/dto/ErrorCodeRespDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.system.api.errorcode.dto; - -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * 错误码的 Response DTO - * - * @author 芋道源码 - */ -@Data -public class ErrorCodeRespDTO { - - /** - * 错误码编码 - */ - private Integer code; - /** - * 错误码错误提示 - */ - private String message; - /** - * 更新时间 - */ - private LocalDateTime updateTime; - -} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java deleted file mode 100644 index 97349e763c..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.system.enums.errorcode; - -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.Arrays; - -/** - * 错误码的类型枚举 - * - * @author dylan - */ -@AllArgsConstructor -@Getter -public enum ErrorCodeTypeEnum implements IntArrayValuable { - - /** - * 自动生成 - */ - AUTO_GENERATION(1), - /** - * 手动编辑 - */ - MANUAL_OPERATION(2); - - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErrorCodeTypeEnum::getType).toArray(); - - /** - * 类型 - */ - private final Integer type; - - @Override - public int[] array() { - return ARRAYS; - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApiImpl.java deleted file mode 100644 index dd630205cc..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApiImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.system.api.errorcode; - -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 错误码 Api 实现类 - * - * @author 芋道源码 - */ -@Service -public class ErrorCodeApiImpl implements ErrorCodeApi { - - @Resource - private ErrorCodeService errorCodeService; - - @Override - public void autoGenerateErrorCodeList(List autoGenerateDTOs) { - errorCodeService.autoGenerateErrorCodes(autoGenerateDTOs); - } - - @Override - public List getErrorCodeList(String applicationName, LocalDateTime minUpdateTime) { - return errorCodeService.getErrorCodeList(applicationName, minUpdateTime); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http deleted file mode 100644 index 06b8723185..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http +++ /dev/null @@ -1,13 +0,0 @@ -### 创建错误码 -POST {{baseUrl}}/inra/error-code/create -Authorization: Bearer {{token}} -Content-Type: application/json -tenant-id: {{adminTenentId}} - -{ - "code": 200, - "message": "成功", - "group": "test", - "type": 1 -} - diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java deleted file mode 100644 index a0d14c5570..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java +++ /dev/null @@ -1,93 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.errorcode; - -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeRespVO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; -import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.io.IOException; -import java.util.List; - -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - 错误码") -@RestController -@RequestMapping("/system/error-code") -@Validated -public class ErrorCodeController { - - @Resource - private ErrorCodeService errorCodeService; - - @PostMapping("/create") - @Operation(summary = "创建错误码") - @PreAuthorize("@ss.hasPermission('system:error-code:create')") - public CommonResult createErrorCode(@Valid @RequestBody ErrorCodeSaveReqVO createReqVO) { - return success(errorCodeService.createErrorCode(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新错误码") - @PreAuthorize("@ss.hasPermission('system:error-code:update')") - public CommonResult updateErrorCode(@Valid @RequestBody ErrorCodeSaveReqVO updateReqVO) { - errorCodeService.updateErrorCode(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除错误码") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('system:error-code:delete')") - public CommonResult deleteErrorCode(@RequestParam("id") Long id) { - errorCodeService.deleteErrorCode(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得错误码") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('system:error-code:query')") - public CommonResult getErrorCode(@RequestParam("id") Long id) { - ErrorCodeDO errorCode = errorCodeService.getErrorCode(id); - return success(BeanUtils.toBean(errorCode, ErrorCodeRespVO.class)); - } - - @GetMapping("/page") - @Operation(summary = "获得错误码分页") - @PreAuthorize("@ss.hasPermission('system:error-code:query')") - public CommonResult> getErrorCodePage(@Valid ErrorCodePageReqVO pageVO) { - PageResult pageResult = errorCodeService.getErrorCodePage(pageVO); - return success(BeanUtils.toBean(pageResult, ErrorCodeRespVO.class)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出错误码 Excel") - @PreAuthorize("@ss.hasPermission('system:error-code:export')") - @ApiAccessLog(operateType = EXPORT) - public void exportErrorCodeExcel(@Valid ErrorCodePageReqVO exportReqVO, - HttpServletResponse response) throws IOException { - exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = errorCodeService.getErrorCodePage(exportReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "错误码.xls", "数据", ErrorCodeRespVO.class, - BeanUtils.toBean(list, ErrorCodeRespVO.class)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java deleted file mode 100644 index ba565d94c0..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import org.springframework.format.annotation.DateTimeFormat; - -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 错误码分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ErrorCodePageReqVO extends PageParam { - - @Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", example = "1") - private Integer type; - - @Schema(description = "应用名", example = "dashboard") - private String applicationName; - - @Schema(description = "错误码编码", example = "1234") - private Integer code; - - @Schema(description = "错误码错误提示", example = "帅气") - private String message; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java deleted file mode 100644 index 31f72bf930..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java +++ /dev/null @@ -1,47 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; - -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 错误码 Response VO") -@Data -@ExcelIgnoreUnannotated -public class ErrorCodeRespVO { - - @Schema(description = "错误码编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @ExcelProperty("错误码编号") - private Long id; - - @Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty(value = "错误码类型", converter = DictConvert.class) - @DictFormat(DictTypeConstants.ERROR_CODE_TYPE) - private Integer type; - - @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "dashboard") - @ExcelProperty("应用名") - private String applicationName; - - @Schema(description = "错误码编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1234") - @ExcelProperty("错误码编码") - private Integer code; - - @Schema(description = "错误码错误提示", requiredMode = Schema.RequiredMode.REQUIRED, example = "帅气") - @ExcelProperty("错误码错误提示") - private String message; - - @Schema(description = "备注", example = "哈哈哈") - @ExcelProperty("备注") - private String memo; - - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeSaveReqVO.java deleted file mode 100644 index 1fd2e0cc94..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeSaveReqVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotNull; - -@Schema(description = "管理后台 - 错误码创建/修改 Request VO") -@Data -public class ErrorCodeSaveReqVO { - - @Schema(description = "错误码编号", example = "1024") - private Long id; - - @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "dashboard") - @NotNull(message = "应用名不能为空") - private String applicationName; - - @Schema(description = "错误码编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1234") - @NotNull(message = "错误码编码不能为空") - private Integer code; - - @Schema(description = "错误码错误提示", requiredMode = Schema.RequiredMode.REQUIRED, example = "帅气") - @NotNull(message = "错误码错误提示不能为空") - private String message; - - @Schema(description = "备注", example = "哈哈哈") - private String memo; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java deleted file mode 100644 index 9ad5633957..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java +++ /dev/null @@ -1,52 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.dataobject.errorcode; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; -import com.baomidou.mybatisplus.annotation.KeySequence; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -/** - * 错误码表 - * - * @author 芋道源码 - */ -@TableName(value = "system_error_code") -@KeySequence("system_error_code_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ErrorCodeDO extends BaseDO { - - /** - * 错误码编号,自增 - */ - @TableId - private Long id; - /** - * 错误码类型 - * - * 枚举 {@link ErrorCodeTypeEnum} - */ - private Integer type; - /** - * 应用名 - */ - private String applicationName; - /** - * 错误码编码 - */ - private Integer code; - /** - * 错误码错误提示 - */ - private String message; - /** - * 错误码备注 - */ - private String memo; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java deleted file mode 100644 index 2e345e3ad3..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.mysql.errorcode; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; -import org.apache.ibatis.annotations.Mapper; - -import java.time.LocalDateTime; -import java.util.Collection; -import java.util.List; - -@Mapper -public interface ErrorCodeMapper extends BaseMapperX { - - default PageResult selectPage(ErrorCodePageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(ErrorCodeDO::getType, reqVO.getType()) - .likeIfPresent(ErrorCodeDO::getApplicationName, reqVO.getApplicationName()) - .eqIfPresent(ErrorCodeDO::getCode, reqVO.getCode()) - .likeIfPresent(ErrorCodeDO::getMessage, reqVO.getMessage()) - .betweenIfPresent(ErrorCodeDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(ErrorCodeDO::getCode)); - } - - default List selectListByCodes(Collection codes) { - return selectList(ErrorCodeDO::getCode, codes); - } - - default ErrorCodeDO selectByCode(Integer code) { - return selectOne(ErrorCodeDO::getCode, code); - } - - default List selectListByApplicationNameAndUpdateTimeGt(String applicationName, LocalDateTime minUpdateTime) { - return selectList(new LambdaQueryWrapperX().eq(ErrorCodeDO::getApplicationName, applicationName) - .gtIfPresent(ErrorCodeDO::getUpdateTime, minUpdateTime)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java deleted file mode 100644 index 1c7db3e315..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java +++ /dev/null @@ -1,77 +0,0 @@ -package cn.iocoder.yudao.module.system.service.errorcode; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; - -import jakarta.validation.Valid; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 错误码 Service 接口 - * - * @author 芋道源码 - */ -public interface ErrorCodeService { - - /** - * 自动创建错误码 - * - * @param autoGenerateDTOs 错误码信息 - */ - void autoGenerateErrorCodes(@Valid List autoGenerateDTOs); - - /** - * 增量获得错误码数组 - * - * 如果 minUpdateTime 为空时,则获取所有错误码 - * - * @param applicationName 应用名 - * @param minUpdateTime 最小更新时间 - * @return 错误码数组 - */ - List getErrorCodeList(String applicationName, LocalDateTime minUpdateTime); - - /** - * 创建错误码 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Long createErrorCode(@Valid ErrorCodeSaveReqVO createReqVO); - - /** - * 更新错误码 - * - * @param updateReqVO 更新信息 - */ - void updateErrorCode(@Valid ErrorCodeSaveReqVO updateReqVO); - - /** - * 删除错误码 - * - * @param id 编号 - */ - void deleteErrorCode(Long id); - - /** - * 获得错误码 - * - * @param id 编号 - * @return 错误码 - */ - ErrorCodeDO getErrorCode(Long id); - - /** - * 获得错误码分页 - * - * @param pageReqVO 分页查询 - * @return 错误码分页 - */ - PageResult getErrorCodePage(ErrorCodePageReqVO pageReqVO); - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java deleted file mode 100644 index 2664f28714..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -package cn.iocoder.yudao.module.system.service.errorcode; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; -import cn.iocoder.yudao.module.system.dal.mysql.errorcode.ErrorCodeMapper; -import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; -import com.google.common.annotations.VisibleForTesting; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.annotation.Validated; - -import jakarta.annotation.Resource; -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_DUPLICATE; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_NOT_EXISTS; - -/** - * 错误码 Service 实现类 - * - * @author dlyan - */ -@Service -@Validated -@Slf4j -public class ErrorCodeServiceImpl implements ErrorCodeService { - - @Resource - private ErrorCodeMapper errorCodeMapper; - - @Override - public Long createErrorCode(ErrorCodeSaveReqVO createReqVO) { - // 校验 code 重复 - validateCodeDuplicate(createReqVO.getCode(), null); - - // 插入 - ErrorCodeDO errorCode = BeanUtils.toBean(createReqVO, ErrorCodeDO.class) - .setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()); - errorCodeMapper.insert(errorCode); - // 返回 - return errorCode.getId(); - } - - @Override - public void updateErrorCode(ErrorCodeSaveReqVO updateReqVO) { - // 校验存在 - validateErrorCodeExists(updateReqVO.getId()); - // 校验 code 重复 - validateCodeDuplicate(updateReqVO.getCode(), updateReqVO.getId()); - - // 更新 - ErrorCodeDO updateObj = BeanUtils.toBean(updateReqVO, ErrorCodeDO.class) - .setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()); - errorCodeMapper.updateById(updateObj); - } - - @Override - public void deleteErrorCode(Long id) { - // 校验存在 - validateErrorCodeExists(id); - // 删除 - errorCodeMapper.deleteById(id); - } - - /** - * 校验错误码的唯一字段是否重复 - * - * 是否存在相同编码的错误码 - * - * @param code 错误码编码 - * @param id 错误码编号 - */ - @VisibleForTesting - public void validateCodeDuplicate(Integer code, Long id) { - ErrorCodeDO errorCodeDO = errorCodeMapper.selectByCode(code); - if (errorCodeDO == null) { - return; - } - // 如果 id 为空,说明不用比较是否为相同 id 的错误码 - if (id == null) { - throw exception(ERROR_CODE_DUPLICATE); - } - if (!errorCodeDO.getId().equals(id)) { - throw exception(ERROR_CODE_DUPLICATE); - } - } - - @VisibleForTesting - void validateErrorCodeExists(Long id) { - if (errorCodeMapper.selectById(id) == null) { - throw exception(ERROR_CODE_NOT_EXISTS); - } - } - - @Override - public ErrorCodeDO getErrorCode(Long id) { - return errorCodeMapper.selectById(id); - } - - @Override - public PageResult getErrorCodePage(ErrorCodePageReqVO pageReqVO) { - return errorCodeMapper.selectPage(pageReqVO); - } - - @Override - @Transactional - public void autoGenerateErrorCodes(List autoGenerateDTOs) { - if (CollUtil.isEmpty(autoGenerateDTOs)) { - return; - } - // 获得错误码 - List errorCodeDOs = errorCodeMapper.selectListByCodes( - convertSet(autoGenerateDTOs, ErrorCodeAutoGenerateReqDTO::getCode)); - Map errorCodeDOMap = convertMap(errorCodeDOs, ErrorCodeDO::getCode); - - // 遍历 autoGenerateBOs 数组,逐个插入或更新。考虑到每次量级不大,就不走批量了 - autoGenerateDTOs.forEach(autoGenerateDTO -> { - ErrorCodeDO errorCode = errorCodeDOMap.get(autoGenerateDTO.getCode()); - // 不存在,则进行新增 - if (errorCode == null) { - errorCode = BeanUtils.toBean(autoGenerateDTO, ErrorCodeDO.class) - .setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); - errorCodeMapper.insert(errorCode); - return; - } - // 存在,则进行更新。更新有三个前置条件: - // 条件 1. 只更新自动生成的错误码,即 Type 为 ErrorCodeTypeEnum.AUTO_GENERATION - if (!ErrorCodeTypeEnum.AUTO_GENERATION.getType().equals(errorCode.getType())) { - return; - } - // 条件 2. 分组 applicationName 必须匹配,避免存在错误码冲突的情况 - if (!autoGenerateDTO.getApplicationName().equals(errorCode.getApplicationName())) { - log.error("[autoGenerateErrorCodes][自动创建({}/{}) 错误码失败,数据库中已经存在({}/{})]", - autoGenerateDTO.getCode(), autoGenerateDTO.getApplicationName(), - errorCode.getCode(), errorCode.getApplicationName()); - return; - } - // 条件 3. 错误提示语存在差异 - if (autoGenerateDTO.getMessage().equals(errorCode.getMessage())) { - return; - } - // 最终匹配,进行更新 - errorCodeMapper.updateById(new ErrorCodeDO().setId(errorCode.getId()).setMessage(autoGenerateDTO.getMessage())); - }); - } - - @Override - public List getErrorCodeList(String applicationName, LocalDateTime minUpdateTime) { - List list = errorCodeMapper.selectListByApplicationNameAndUpdateTimeGt( - applicationName, minUpdateTime); - return BeanUtils.toBean(list, ErrorCodeRespDTO.class); - } - -} - diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java deleted file mode 100644 index b337e037af..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java +++ /dev/null @@ -1,308 +0,0 @@ -package cn.iocoder.yudao.module.system.service.errorcode; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; -import cn.iocoder.yudao.module.system.dal.mysql.errorcode.ErrorCodeMapper; -import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; -import org.assertj.core.util.Lists; -import org.junit.jupiter.api.Test; -import org.springframework.context.annotation.Import; - -import jakarta.annotation.Resource; -import java.time.LocalDateTime; -import java.util.List; -import java.util.function.Consumer; - -import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_DUPLICATE; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_NOT_EXISTS; -import static org.junit.jupiter.api.Assertions.*; - -@Import(ErrorCodeServiceImpl.class) -public class ErrorCodeServiceTest extends BaseDbUnitTest { - - @Resource - private ErrorCodeServiceImpl errorCodeService; - - @Resource - private ErrorCodeMapper errorCodeMapper; - - @Test - public void testCreateErrorCode_success() { - // 准备参数 - ErrorCodeSaveReqVO reqVO = randomPojo(ErrorCodeSaveReqVO.class) - .setId(null); // 防止 id 被赋值 - - // 调用 - Long errorCodeId = errorCodeService.createErrorCode(reqVO); - // 断言 - assertNotNull(errorCodeId); - // 校验记录的属性是否正确 - ErrorCodeDO errorCode = errorCodeMapper.selectById(errorCodeId); - assertPojoEquals(reqVO, errorCode, "id"); - assertEquals(ErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); - } - - @Test - public void testUpdateErrorCode_success() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(); - errorCodeMapper.insert(dbErrorCode);// @Sql: 先插入出一条存在的数据 - // 准备参数 - ErrorCodeSaveReqVO reqVO = randomPojo(ErrorCodeSaveReqVO.class, o -> { - o.setId(dbErrorCode.getId()); // 设置更新的 ID - }); - - // 调用 - errorCodeService.updateErrorCode(reqVO); - // 校验是否更新正确 - ErrorCodeDO errorCode = errorCodeMapper.selectById(reqVO.getId()); // 获取最新的 - assertPojoEquals(reqVO, errorCode); - assertEquals(ErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); - } - - @Test - public void testDeleteErrorCode_success() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(); - errorCodeMapper.insert(dbErrorCode);// @Sql: 先插入出一条存在的数据 - // 准备参数 - Long id = dbErrorCode.getId(); - - // 调用 - errorCodeService.deleteErrorCode(id); - // 校验数据不存在了 - assertNull(errorCodeMapper.selectById(id)); - } - - @Test - public void testGetErrorCodePage() { - // mock 数据 - ErrorCodeDO dbErrorCode = initGetErrorCodePage(); - // 准备参数 - ErrorCodePageReqVO reqVO = new ErrorCodePageReqVO(); - reqVO.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); - reqVO.setApplicationName("tu"); - reqVO.setCode(1); - reqVO.setMessage("ma"); - reqVO.setCreateTime(buildBetweenTime(2020, 11, 1, 2020, 11, 30)); - - // 调用 - PageResult pageResult = errorCodeService.getErrorCodePage(reqVO); - // 断言 - assertEquals(1, pageResult.getTotal()); - assertEquals(1, pageResult.getList().size()); - assertPojoEquals(dbErrorCode, pageResult.getList().get(0)); - } - - /** - * 初始化 getErrorCodePage 方法的测试数据 - */ - private ErrorCodeDO initGetErrorCodePage() { - ErrorCodeDO dbErrorCode = randomErrorCodeDO(o -> { // 等会查询到 - o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); - o.setApplicationName("tudou"); - o.setCode(1); - o.setMessage("yuanma"); - o.setCreateTime(buildTime(2020, 11, 11)); - }); - errorCodeMapper.insert(dbErrorCode); - // 测试 type 不匹配 - errorCodeMapper.insert(cloneIgnoreId(dbErrorCode, o -> o.setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()))); - // 测试 applicationName 不匹配 - errorCodeMapper.insert(cloneIgnoreId(dbErrorCode, o -> o.setApplicationName("yuan"))); - // 测试 code 不匹配 - errorCodeMapper.insert(cloneIgnoreId(dbErrorCode, o -> o.setCode(2))); - // 测试 message 不匹配 - errorCodeMapper.insert(cloneIgnoreId(dbErrorCode, o -> o.setMessage("nai"))); - // 测试 createTime 不匹配 - errorCodeMapper.insert(cloneIgnoreId(dbErrorCode, o -> o.setCreateTime(buildTime(2020, 12, 12)))); - return dbErrorCode; - } - - @Test - public void testValidateCodeDuplicate_codeDuplicateForCreate() { - // 准备参数 - Integer code = randomInteger(); - // mock 数据 - errorCodeMapper.insert(randomErrorCodeDO(o -> o.setCode(code))); - - // 调用,校验异常 - assertServiceException(() -> errorCodeService.validateCodeDuplicate(code, null), - ERROR_CODE_DUPLICATE); - } - - @Test - public void testValidateCodeDuplicate_codeDuplicateForUpdate() { - // 准备参数 - Long id = randomLongId(); - Integer code = randomInteger(); - // mock 数据 - errorCodeMapper.insert(randomErrorCodeDO(o -> o.setCode(code))); - - // 调用,校验异常 - assertServiceException(() -> errorCodeService.validateCodeDuplicate(code, id), - ERROR_CODE_DUPLICATE); - } - - @Test - public void testValidateErrorCodeExists_notExists() { - assertServiceException(() -> errorCodeService.validateErrorCodeExists(null), - ERROR_CODE_NOT_EXISTS); - } - - /** - * 情况 1,错误码不存在的情况 - */ - @Test - public void testAutoGenerateErrorCodes_01() { - // 准备参数 - ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class); - // mock 方法 - - // 调用 - errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); - // 断言 - ErrorCodeDO errorCode = errorCodeMapper.selectOne(null); - assertPojoEquals(generateReqDTO, errorCode); - assertEquals(ErrorCodeTypeEnum.AUTO_GENERATION.getType(), errorCode.getType()); - } - - /** - * 情况 2.1,错误码存在,但是是 ErrorCodeTypeEnum.MANUAL_OPERATION 类型 - */ - @Test - public void testAutoGenerateErrorCodes_021() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType())); - errorCodeMapper.insert(dbErrorCode); - // 准备参数 - ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, - o -> o.setCode(dbErrorCode.getCode())); - // mock 方法 - - // 调用 - errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); - // 断言,相等,说明不会更新 - ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); - assertPojoEquals(dbErrorCode, errorCode); - } - - /** - * 情况 2.2,错误码存在,但是是 applicationName 不匹配 - */ - @Test - public void testAutoGenerateErrorCodes_022() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); - errorCodeMapper.insert(dbErrorCode); - // 准备参数 - ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, - o -> o.setCode(dbErrorCode.getCode()).setApplicationName(randomString())); - // mock 方法 - - // 调用 - errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); - // 断言,相等,说明不会更新 - ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); - assertPojoEquals(dbErrorCode, errorCode); - } - - /** - * 情况 2.3,错误码存在,但是是 message 相同 - */ - @Test - public void testAutoGenerateErrorCodes_023() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); - errorCodeMapper.insert(dbErrorCode); - // 准备参数 - ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, - o -> o.setCode(dbErrorCode.getCode()).setApplicationName(dbErrorCode.getApplicationName()) - .setMessage(dbErrorCode.getMessage())); - // mock 方法 - - // 调用 - errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); - // 断言,相等,说明不会更新 - ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); - assertPojoEquals(dbErrorCode, errorCode); - } - - /** - * 情况 2.3,错误码存在,但是是 message 不同,则进行更新 - */ - @Test - public void testAutoGenerateErrorCodes_024() { - // mock 数据 - ErrorCodeDO dbErrorCode = randomErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); - errorCodeMapper.insert(dbErrorCode); - // 准备参数 - ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, - o -> o.setCode(dbErrorCode.getCode()).setApplicationName(dbErrorCode.getApplicationName())); - // mock 方法 - - // 调用 - errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); - // 断言,匹配 - ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); - assertPojoEquals(generateReqDTO, errorCode); - } - - @Test - public void testGetErrorCode() { - // 准备参数 - ErrorCodeDO errorCodeDO = randomErrorCodeDO(); - errorCodeMapper.insert(errorCodeDO); - // mock 方法 - Long id = errorCodeDO.getId(); - - // 调用 - ErrorCodeDO dbErrorCode = errorCodeService.getErrorCode(id); - // 断言 - assertPojoEquals(errorCodeDO, dbErrorCode); - } - - @Test - public void testGetErrorCodeList() { - // 准备参数 - ErrorCodeDO errorCodeDO01 = randomErrorCodeDO( - o -> o.setApplicationName("yunai_server").setUpdateTime(buildTime(2022, 1, 10))); - errorCodeMapper.insert(errorCodeDO01); - ErrorCodeDO errorCodeDO02 = randomErrorCodeDO( - o -> o.setApplicationName("yunai_server").setUpdateTime(buildTime(2022, 1, 12))); - errorCodeMapper.insert(errorCodeDO02); - // mock 方法 - String applicationName = "yunai_server"; - LocalDateTime minUpdateTime = buildTime(2022, 1, 11); - - // 调用 - List errorCodeList = errorCodeService.getErrorCodeList(applicationName, minUpdateTime); - // 断言 - assertEquals(1, errorCodeList.size()); - assertPojoEquals(errorCodeDO02, errorCodeList.get(0)); - } - - // ========== 随机对象 ========== - - @SafeVarargs - private static ErrorCodeDO randomErrorCodeDO(Consumer... consumers) { - Consumer consumer = (o) -> { - o.setType(randomEle(ErrorCodeTypeEnum.values()).getType()); // 保证 key 的范围 - }; - return randomPojo(ErrorCodeDO.class, ArrayUtils.append(consumer, consumers)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql index 55778022ec..8b516869f2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql @@ -16,7 +16,6 @@ DELETE FROM "system_sms_channel"; DELETE FROM "system_sms_template"; DELETE FROM "system_sms_log"; DELETE FROM "system_sms_code"; -DELETE FROM "system_error_code"; DELETE FROM "system_social_client"; DELETE FROM "system_social_user"; DELETE FROM "system_social_user_bind"; diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql index 731b2850e8..9a213ef12d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql @@ -332,21 +332,6 @@ CREATE TABLE IF NOT EXISTS "system_sms_code" ( PRIMARY KEY ("id") ) COMMENT '短信日志'; -CREATE TABLE IF NOT EXISTS "system_error_code" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "type" tinyint NOT NULL DEFAULT '0', - "application_name" varchar(50) NOT NULL, - "code" int NOT NULL DEFAULT '0', - "message" varchar(512) NOT NULL DEFAULT '', - "memo" varchar(512) DEFAULT '', - "creator" varchar(64) DEFAULT '', - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar(64) DEFAULT '', - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, - PRIMARY KEY ("id") -) COMMENT '错误码表'; - CREATE TABLE IF NOT EXISTS "system_social_client" ( "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "name" varchar(255) NOT NULL, diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 555030b576..9917ac9e73 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -227,8 +227,6 @@ yudao: refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址 access-log: # 访问日志的配置项 enable: false - error-code: # 错误码相关配置项 - enable: false demo: false # 关闭演示模式 tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index d8d6c493d0..ae336f4293 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -181,14 +181,6 @@ yudao: base-package: ${yudao.info.base-package} db-schemas: ${spring.datasource.dynamic.datasource.master.name} front-type: 10 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类 - error-code: # 错误码相关配置项 - constants-class-list: - - cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants - - cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants - - cn.iocoder.yudao.module.member.enums.ErrorCodeConstants - - cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants - - cn.iocoder.yudao.module.system.enums.ErrorCodeConstants - - cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants tenant: # 多租户相关配置项 enable: true ignore-urls: -- Gitee From 9a31613e5b766977df62a4977a40ef08bdeefa0b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 19:53:01 +0800 Subject: [PATCH 0308/1557] =?UTF-8?q?=E3=80=90=E7=A7=BB=E9=99=A4=E3=80=91?= =?UTF-8?q?=E6=95=8F=E6=84=9F=E8=AF=8D=E7=9A=84=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=A4=8D=E6=9D=82?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/sensitiveword/SensitiveWordApi.java | 30 -- .../system/enums/ErrorCodeConstants.java | 8 - .../sensitiveword/SensitiveWordApiImpl.java | 29 -- .../SensitiveWordController.http | 4 - .../SensitiveWordController.java | 108 ------- .../vo/SensitiveWordPageReqVO.java | 33 -- .../sensitiveword/vo/SensitiveWordRespVO.java | 45 --- .../sensitiveword/vo/SensitiveWordSaveVO.java | 31 -- .../sensitiveword/SensitiveWordDO.java | 58 ---- .../sensitiveword/SensitiveWordMapper.java | 36 --- .../sensitiveword/SensitiveWordService.java | 89 ----- .../SensitiveWordServiceImpl.java | 262 --------------- .../system/util/collection/SimpleTrie.java | 152 --------- .../SensitiveWordServiceImplTest.java | 303 ------------------ .../src/test/resources/sql/clean.sql | 1 - .../src/test/resources/sql/create_tables.sql | 14 - .../src/main/resources/application-local.yaml | 1 - 17 files changed, 1204 deletions(-) delete mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApiImpl.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.http delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordSaveVO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sensitiveword/SensitiveWordMapper.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/util/collection/SimpleTrie.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java deleted file mode 100644 index 951cfbc6f4..0000000000 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.system.api.sensitiveword; - -import java.util.List; - -/** - * 敏感词 API 接口 - * - * @author 永不言败 - */ -public interface SensitiveWordApi { - - /** - * 获得文本所包含的不合法的敏感词数组 - * - * @param text 文本 - * @param tags 标签数组 - * @return 不合法的敏感词数组 - */ - List validateText(String text, List tags); - - /** - * 判断文本是否包含敏感词 - * - * @param text 文本 - * @param tags 表述数组 - * @return 是否包含 - */ - boolean isTextValid(String text, List tags); - -} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java index 481c9be54c..1b4c313c83 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java @@ -115,10 +115,6 @@ public interface ErrorCodeConstants { ErrorCode TENANT_PACKAGE_USED = new ErrorCode(1_002_016_001, "租户正在使用该套餐,请给租户重新设置套餐后再尝试删除"); ErrorCode TENANT_PACKAGE_DISABLE = new ErrorCode(1_002_016_002, "名字为【{}】的租户套餐已被禁用"); - // ========== 错误码模块 1-002-017-000 ========== - ErrorCode ERROR_CODE_NOT_EXISTS = new ErrorCode(1_002_017_000, "错误码不存在"); - ErrorCode ERROR_CODE_DUPLICATE = new ErrorCode(1_002_017_001, "已经存在编码为【{}】的错误码"); - // ========== 社交用户 1-002-018-000 ========== ErrorCode SOCIAL_USER_AUTH_FAILURE = new ErrorCode(1_002_018_000, "社交授权失败,原因是:{}"); ErrorCode SOCIAL_USER_NOT_FOUND = new ErrorCode(1_002_018_001, "社交授权失败,找不到对应的用户"); @@ -127,10 +123,6 @@ public interface ErrorCodeConstants { ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_201, "社交客户端不存在"); ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_202, "社交客户端已存在配置"); - // ========== 系统敏感词 1-002-019-000 ========= - ErrorCode SENSITIVE_WORD_NOT_EXISTS = new ErrorCode(1_002_019_000, "系统敏感词在所有标签中都不存在"); - ErrorCode SENSITIVE_WORD_EXISTS = new ErrorCode(1_002_019_001, "系统敏感词已在标签中存在"); - // ========== OAuth2 客户端 1-002-020-000 ========= ErrorCode OAUTH2_CLIENT_NOT_EXISTS = new ErrorCode(1_002_020_000, "OAuth2 客户端不存在"); ErrorCode OAUTH2_CLIENT_EXISTS = new ErrorCode(1_002_020_001, "OAuth2 客户端编号已存在"); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApiImpl.java deleted file mode 100644 index 9dc25e4b8b..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApiImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.system.api.sensitiveword; - -import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.List; - -/** - * 敏感词 API 实现类 - * - * @author 永不言败 - */ -@Service -public class SensitiveWordApiImpl implements SensitiveWordApi { - - @Resource - private SensitiveWordService sensitiveWordService; - - @Override - public List validateText(String text, List tags) { - return sensitiveWordService.validateText(text, tags); - } - - @Override - public boolean isTextValid(String text, List tags) { - return sensitiveWordService.isTextValid(text, tags); - } -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.http b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.http deleted file mode 100644 index cd97d2de5c..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.http +++ /dev/null @@ -1,4 +0,0 @@ -### 请求 /system/sensitive-word/validate-text 接口 => 成功 -GET {{baseUrl}}/system/sensitive-word/validate-text?text=XXX&tags=短信&tags=蔬菜 -Authorization: Bearer {{token}} -tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java deleted file mode 100644 index 15da9d9529..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java +++ /dev/null @@ -1,108 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.sensitiveword; - -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordRespVO; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; -import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; -import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.io.IOException; -import java.util.List; -import java.util.Set; - -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - 敏感词") -@RestController -@RequestMapping("/system/sensitive-word") -@Validated -public class SensitiveWordController { - - @Resource - private SensitiveWordService sensitiveWordService; - - @PostMapping("/create") - @Operation(summary = "创建敏感词") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:create')") - public CommonResult createSensitiveWord(@Valid @RequestBody SensitiveWordSaveVO createReqVO) { - return success(sensitiveWordService.createSensitiveWord(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新敏感词") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:update')") - public CommonResult updateSensitiveWord(@Valid @RequestBody SensitiveWordSaveVO updateReqVO) { - sensitiveWordService.updateSensitiveWord(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除敏感词") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('system:sensitive-word:delete')") - public CommonResult deleteSensitiveWord(@RequestParam("id") Long id) { - sensitiveWordService.deleteSensitiveWord(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得敏感词") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") - public CommonResult getSensitiveWord(@RequestParam("id") Long id) { - SensitiveWordDO sensitiveWord = sensitiveWordService.getSensitiveWord(id); - return success(BeanUtils.toBean(sensitiveWord, SensitiveWordRespVO.class)); - } - - @GetMapping("/page") - @Operation(summary = "获得敏感词分页") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") - public CommonResult> getSensitiveWordPage(@Valid SensitiveWordPageReqVO pageVO) { - PageResult pageResult = sensitiveWordService.getSensitiveWordPage(pageVO); - return success(BeanUtils.toBean(pageResult, SensitiveWordRespVO.class)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出敏感词 Excel") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:export')") - @ApiAccessLog(operateType = EXPORT) - public void exportSensitiveWordExcel(@Valid SensitiveWordPageReqVO exportReqVO, - HttpServletResponse response) throws IOException { - exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = sensitiveWordService.getSensitiveWordPage(exportReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "敏感词.xls", "数据", SensitiveWordRespVO.class, - BeanUtils.toBean(list, SensitiveWordRespVO.class)); - } - - @GetMapping("/get-tags") - @Operation(summary = "获取所有敏感词的标签数组") - @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") - public CommonResult> getSensitiveWordTagSet() { - return success(sensitiveWordService.getSensitiveWordTagSet()); - } - - @GetMapping("/validate-text") - @Operation(summary = "获得文本所包含的不合法的敏感词数组") - public CommonResult> validateText(@RequestParam("text") String text, - @RequestParam(value = "tags", required = false) List tags) { - return success(sensitiveWordService.validateText(text, tags)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java deleted file mode 100644 index 642773a551..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import org.springframework.format.annotation.DateTimeFormat; - -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 敏感词分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class SensitiveWordPageReqVO extends PageParam { - - @Schema(description = "敏感词", example = "敏感词") - private String name; - - @Schema(description = "标签", example = "短信,评论") - private String tag; - - @Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1") - private Integer status; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java deleted file mode 100644 index 43d041ecc5..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; - -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; -import cn.iocoder.yudao.framework.excel.core.convert.JsonConvert; -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; -import java.util.List; - -@Schema(description = "管理后台 - 敏感词 Response VO") -@Data -public class SensitiveWordRespVO { - - @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty("编号") - private Long id; - - @Schema(description = "敏感词", requiredMode = Schema.RequiredMode.REQUIRED, example = "敏感词") - @ExcelProperty("敏感词") - private String name; - - @Schema(description = "标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "短信,评论") - @ExcelProperty(value = "标签", converter = JsonConvert.class) - private List tags; - - @Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty(value = "状态", converter = DictConvert.class) - @DictFormat(DictTypeConstants.COMMON_STATUS) - private Integer status; - - @Schema(description = "描述", example = "污言秽语") - @ExcelProperty("描述") - private String description; - - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordSaveVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordSaveVO.java deleted file mode 100644 index 452086d7c9..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordSaveVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotNull; -import java.util.List; - -@Schema(description = "管理后台 - 敏感词创建/修改 Request VO") -@Data -public class SensitiveWordSaveVO { - - @Schema(description = "编号", example = "1") - private Long id; - - @Schema(description = "敏感词", requiredMode = Schema.RequiredMode.REQUIRED, example = "敏感词") - @NotNull(message = "敏感词不能为空") - private String name; - - @Schema(description = "标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "短信,评论") - @NotNull(message = "标签不能为空") - private List tags; - - @Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") - private Integer status; - - @Schema(description = "描述", example = "污言秽语") - private String description; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java deleted file mode 100644 index 37dc57968a..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java +++ /dev/null @@ -1,58 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword; - -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.framework.mybatis.core.type.StringListTypeHandler; -import com.baomidou.mybatisplus.annotation.KeySequence; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.*; - -import java.util.List; - -/** - * 敏感词 DO - * - * @author 永不言败 - */ -@TableName(value = "system_sensitive_word", autoResultMap = true) -@KeySequence("system_sensitive_word_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class SensitiveWordDO extends BaseDO { - - /** - * 编号 - */ - @TableId - private Long id; - /** - * 敏感词 - */ - private String name; - /** - * 描述 - */ - private String description; - /** - * 标签数组 - * - * 用于实现不同的业务场景下,需要使用不同标签的敏感词。 - * 例如说,tag 有短信、论坛两种,敏感词 "推广" 在短信下是敏感词,在论坛下不是敏感词。 - * 此时,我们会存储一条敏感词记录,它的 name 为"推广",tag 为短信。 - */ - @TableField(typeHandler = StringListTypeHandler.class) - private List tags; - /** - * 状态 - * - * 枚举 {@link CommonStatusEnum} - */ - private Integer status; - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sensitiveword/SensitiveWordMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sensitiveword/SensitiveWordMapper.java deleted file mode 100644 index f4bf8cc691..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sensitiveword/SensitiveWordMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.system.dal.mysql.sensitiveword; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Select; - -import java.time.LocalDateTime; - -/** - * 敏感词 Mapper - * - * @author 永不言败 - */ -@Mapper -public interface SensitiveWordMapper extends BaseMapperX { - - default PageResult selectPage(SensitiveWordPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .likeIfPresent(SensitiveWordDO::getName, reqVO.getName()) - .likeIfPresent(SensitiveWordDO::getTags, reqVO.getTag()) - .eqIfPresent(SensitiveWordDO::getStatus, reqVO.getStatus()) - .betweenIfPresent(SensitiveWordDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(SensitiveWordDO::getId)); - } - default SensitiveWordDO selectByName(String name) { - return selectOne(SensitiveWordDO::getName, name); - } - - @Select("SELECT COUNT(*) FROM system_sensitive_word WHERE update_time > #{maxUpdateTime}") - Long selectCountByUpdateTimeGt(LocalDateTime maxTime); - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java deleted file mode 100644 index 0dd71d9701..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java +++ /dev/null @@ -1,89 +0,0 @@ -package cn.iocoder.yudao.module.system.service.sensitiveword; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; -import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; - -import jakarta.validation.Valid; -import java.util.List; -import java.util.Set; - -/** - * 敏感词 Service 接口 - * - * @author 永不言败 - */ -public interface SensitiveWordService { - - /** - * 创建敏感词 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Long createSensitiveWord(@Valid SensitiveWordSaveVO createReqVO); - - /** - * 更新敏感词 - * - * @param updateReqVO 更新信息 - */ - void updateSensitiveWord(@Valid SensitiveWordSaveVO updateReqVO); - - /** - * 删除敏感词 - * - * @param id 编号 - */ - void deleteSensitiveWord(Long id); - - /** - * 获得敏感词 - * - * @param id 编号 - * @return 敏感词 - */ - SensitiveWordDO getSensitiveWord(Long id); - - /** - * 获得敏感词列表 - * - * @return 敏感词列表 - */ - List getSensitiveWordList(); - - /** - * 获得敏感词分页 - * - * @param pageReqVO 分页查询 - * @return 敏感词分页 - */ - PageResult getSensitiveWordPage(SensitiveWordPageReqVO pageReqVO); - - /** - * 获得所有敏感词的标签数组 - * - * @return 标签数组 - */ - Set getSensitiveWordTagSet(); - - /** - * 获得文本所包含的不合法的敏感词数组 - * - * @param text 文本 - * @param tags 标签数组 - * @return 不合法的敏感词数组 - */ - List validateText(String text, List tags); - - /** - * 判断文本是否包含敏感词 - * - * @param text 文本 - * @param tags 标签数组 - * @return 是否包含敏感词 - */ - boolean isTextValid(String text, List tags); - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java deleted file mode 100644 index f6910e8ec8..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -package cn.iocoder.yudao.module.system.service.sensitiveword; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; -import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; -import cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper; -import cn.iocoder.yudao.module.system.util.collection.SimpleTrie; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import org.springframework.util.Assert; -import org.springframework.validation.annotation.Validated; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import java.time.LocalDateTime; -import java.util.*; -import java.util.concurrent.TimeUnit; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.getMaxValue; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SENSITIVE_WORD_EXISTS; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SENSITIVE_WORD_NOT_EXISTS; - -/** - * 敏感词 Service 实现类 - * - * @author 永不言败 - */ -@Service -@Slf4j -@Validated -public class SensitiveWordServiceImpl implements SensitiveWordService { - - /** - * 是否开启敏感词功能 - */ - public static Boolean ENABLED = false; - - /** - * 敏感词列表缓存 - */ - @Getter - private volatile List sensitiveWordCache = Collections.emptyList(); - /** - * 敏感词标签缓存 - * key:敏感词编号 {@link SensitiveWordDO#getId()} - *

- * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 - */ - @Getter - private volatile Set sensitiveWordTagsCache = Collections.emptySet(); - - @Resource - private SensitiveWordMapper sensitiveWordMapper; - - /** - * 默认的敏感词的字典树,包含所有敏感词 - */ - @Getter - private volatile SimpleTrie defaultSensitiveWordTrie = new SimpleTrie(Collections.emptySet()); - /** - * 标签与敏感词的字段数的映射 - */ - @Getter - private volatile Map tagSensitiveWordTries = Collections.emptyMap(); - - /** - * 初始化缓存 - */ - @PostConstruct - public void initLocalCache() { - if (!ENABLED) { - return; - } - - // 第一步:查询数据 - List sensitiveWords = sensitiveWordMapper.selectList(); - log.info("[initLocalCache][缓存敏感词,数量为:{}]", sensitiveWords.size()); - - // 第二步:构建缓存 - // 写入 sensitiveWordTagsCache 缓存 - Set tags = new HashSet<>(); - sensitiveWords.forEach(word -> tags.addAll(word.getTags())); - sensitiveWordTagsCache = tags; - sensitiveWordCache = sensitiveWords; - // 写入 defaultSensitiveWordTrie、tagSensitiveWordTries 缓存 - initSensitiveWordTrie(sensitiveWords); - } - - private void initSensitiveWordTrie(List wordDOs) { - // 过滤禁用的敏感词 - wordDOs = filterList(wordDOs, word -> word.getStatus().equals(CommonStatusEnum.ENABLE.getStatus())); - - // 初始化默认的 defaultSensitiveWordTrie - this.defaultSensitiveWordTrie = new SimpleTrie(CollectionUtils.convertList(wordDOs, SensitiveWordDO::getName)); - - // 初始化 tagSensitiveWordTries - Multimap tagWords = HashMultimap.create(); - for (SensitiveWordDO word : wordDOs) { - if (CollUtil.isEmpty(word.getTags())) { - continue; - } - word.getTags().forEach(tag -> tagWords.put(tag, word.getName())); - } - // 添加到 tagSensitiveWordTries 中 - Map tagSensitiveWordTries = new HashMap<>(); - tagWords.asMap().forEach((tag, words) -> tagSensitiveWordTries.put(tag, new SimpleTrie(words))); - this.tagSensitiveWordTries = tagSensitiveWordTries; - } - - /** - * 通过定时任务轮询,刷新缓存 - * - * 目的:多节点部署时,通过轮询”通知“所有节点,进行刷新 - */ - @Scheduled(initialDelay = 60, fixedRate = 60, timeUnit = TimeUnit.SECONDS) - public void refreshLocalCache() { - // 情况一:如果缓存里没有数据,则直接刷新缓存 - if (CollUtil.isEmpty(sensitiveWordCache)) { - initLocalCache(); - return; - } - - // 情况二,如果缓存里数据,则通过 updateTime 判断是否有数据变更,有变更则刷新缓存 - LocalDateTime maxTime = getMaxValue(sensitiveWordCache, SensitiveWordDO::getUpdateTime); - if (sensitiveWordMapper.selectCountByUpdateTimeGt(maxTime) > 0) { - initLocalCache(); - } - } - - @Override - public Long createSensitiveWord(SensitiveWordSaveVO createReqVO) { - // 校验唯一性 - validateSensitiveWordNameUnique(null, createReqVO.getName()); - - // 插入 - SensitiveWordDO sensitiveWord = BeanUtils.toBean(createReqVO, SensitiveWordDO.class); - sensitiveWordMapper.insert(sensitiveWord); - - // 刷新缓存 - initLocalCache(); - return sensitiveWord.getId(); - } - - @Override - public void updateSensitiveWord(SensitiveWordSaveVO updateReqVO) { - // 校验唯一性 - validateSensitiveWordExists(updateReqVO.getId()); - validateSensitiveWordNameUnique(updateReqVO.getId(), updateReqVO.getName()); - - // 更新 - SensitiveWordDO updateObj = BeanUtils.toBean(updateReqVO, SensitiveWordDO.class); - sensitiveWordMapper.updateById(updateObj); - - // 刷新缓存 - initLocalCache(); - } - - @Override - public void deleteSensitiveWord(Long id) { - // 校验存在 - validateSensitiveWordExists(id); - // 删除 - sensitiveWordMapper.deleteById(id); - - // 刷新缓存 - initLocalCache(); - } - - private void validateSensitiveWordNameUnique(Long id, String name) { - SensitiveWordDO word = sensitiveWordMapper.selectByName(name); - if (word == null) { - return; - } - // 如果 id 为空,说明不用比较是否为相同 id 的敏感词 - if (id == null) { - throw exception(SENSITIVE_WORD_EXISTS); - } - if (!word.getId().equals(id)) { - throw exception(SENSITIVE_WORD_EXISTS); - } - } - - private void validateSensitiveWordExists(Long id) { - if (sensitiveWordMapper.selectById(id) == null) { - throw exception(SENSITIVE_WORD_NOT_EXISTS); - } - } - - @Override - public SensitiveWordDO getSensitiveWord(Long id) { - return sensitiveWordMapper.selectById(id); - } - - @Override - public List getSensitiveWordList() { - return sensitiveWordMapper.selectList(); - } - - @Override - public PageResult getSensitiveWordPage(SensitiveWordPageReqVO pageReqVO) { - return sensitiveWordMapper.selectPage(pageReqVO); - } - - @Override - public Set getSensitiveWordTagSet() { - return sensitiveWordTagsCache; - } - - @Override - public List validateText(String text, List tags) { - Assert.isTrue(ENABLED, "敏感词功能未开启,请将 ENABLED 设置为 true"); - - // 无标签时,默认所有 - if (CollUtil.isEmpty(tags)) { - return defaultSensitiveWordTrie.validate(text); - } - // 有标签的情况 - Set result = new HashSet<>(); - tags.forEach(tag -> { - SimpleTrie trie = tagSensitiveWordTries.get(tag); - if (trie == null) { - return; - } - result.addAll(trie.validate(text)); - }); - return new ArrayList<>(result); - } - - @Override - public boolean isTextValid(String text, List tags) { - Assert.isTrue(ENABLED, "敏感词功能未开启,请将 ENABLED 设置为 true"); - - // 无标签时,默认所有 - if (CollUtil.isEmpty(tags)) { - return defaultSensitiveWordTrie.isValid(text); - } - // 有标签的情况 - for (String tag : tags) { - SimpleTrie trie = tagSensitiveWordTries.get(tag); - if (trie == null) { - continue; - } - // 如果有一个标签不合法,则返回 false 不合法 - if (!trie.isValid(text)) { - return false; - } - } - return true; - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/util/collection/SimpleTrie.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/util/collection/SimpleTrie.java deleted file mode 100644 index 8c3e4bc0fa..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/util/collection/SimpleTrie.java +++ /dev/null @@ -1,152 +0,0 @@ -package cn.iocoder.yudao.module.system.util.collection; - -import cn.hutool.core.collection.CollUtil; - -import java.util.*; - -/** - * 基于前缀树,实现敏感词的校验 - *

- * 相比 Apache Common 提供的 PatriciaTrie 来说,性能可能会更加好一些。 - * - * @author 芋道源码 - */ -@SuppressWarnings("unchecked") -public class SimpleTrie { - - /** - * 一个敏感词结束后对应的 key - */ - private static final Character CHARACTER_END = '\0'; - - /** - * 使用敏感词,构建的前缀树 - */ - private final Map children; - - /** - * 基于字符串,构建前缀树 - * - * @param strs 字符串数组 - */ - public SimpleTrie(Collection strs) { - // 排序,优先使用较短的前缀 - strs = CollUtil.sort(strs, String::compareTo); - // 构建树 - children = new HashMap<>(); - for (String str : strs) { - Map child = children; - // 遍历每个字符 - for (Character c : str.toCharArray()) { - // 如果已经到达结束,就没必要在添加更长的敏感词。 - // 例如说,有两个敏感词是:吃饭啊、吃饭。输入一句话是 “我要吃饭啊”,则只要匹配到 “吃饭” 这个敏感词即可。 - if (child.containsKey(CHARACTER_END)) { - break; - } - if (!child.containsKey(c)) { - child.put(c, new HashMap<>()); - } - child = (Map) child.get(c); - } - // 结束 - child.put(CHARACTER_END, null); - } - } - - /** - * 验证文本是否合法,即不包含敏感词 - * - * @param text 文本 - * @return 是否 true-合法 false-不合法 - */ - public boolean isValid(String text) { - // 遍历 text,使用每一个 [i, n) 段的字符串,使用 children 前缀树匹配,是否包含敏感词 - for (int i = 0; i < text.length(); i++) { - Map child = (Map) children.get(text.charAt(i)); - if (child == null) { - continue; - } - boolean ok = recursion(text, i + 1, child); - if (!ok) { - return false; - } - } - return true; - } - - /** - * 验证文本从指定位置开始,是否不包含某个敏感词 - * - * @param text 文本 - * @param index 开始位置 - * @param child 节点(当前遍历到的) - * @return 是否不包含 true-不包含 false-包含 - */ - private boolean recursion(String text, int index, Map child) { - if (child.containsKey(CHARACTER_END)) { - return false; - } - if (index == text.length()) { - return true; - } - child = (Map) child.get(text.charAt(index)); - return child == null || !child.containsKey(CHARACTER_END) && recursion(text, ++index, child); - } - - /** - * 获得文本所包含的不合法的敏感词 - * - * 注意,才当即最短匹配原则。例如说:当敏感词存在 “煞笔”,“煞笔二货 ”时,只会返回 “煞笔”。 - * - * @param text 文本 - * @return 匹配的敏感词 - */ - public List validate(String text) { - Set results = new HashSet<>(); - for (int i = 0; i < text.length(); i++) { - Character c = text.charAt(i); - Map child = (Map) children.get(c); - if (child == null) { - continue; - } - StringBuilder result = new StringBuilder().append(c); - boolean ok = recursionWithResult(text, i + 1, child, result); - if (!ok) { - results.add(result.toString()); - } - } - return new ArrayList<>(results); - } - - /** - * 返回文本从 index 开始的敏感词,并使用 StringBuilder 参数进行返回 - * - * 逻辑和 {@link #recursion(String, int, Map)} 是一致,只是多了 result 返回结果 - * - * @param text 文本 - * @param index 开始未知 - * @param child 节点(当前遍历到的) - * @param result 返回敏感词 - * @return 是否有敏感词 - */ - @SuppressWarnings("unchecked") - private static boolean recursionWithResult(String text, int index, Map child, StringBuilder result) { - if (child.containsKey(CHARACTER_END)) { - return false; - } - if (index == text.length()) { - return true; - } - Character c = text.charAt(index); - child = (Map) child.get(c); - if (child == null) { - return true; - } - if (child.containsKey(CHARACTER_END)) { - result.append(c); - return false; - } - return recursionWithResult(text, ++index, child, result.append(c)); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java deleted file mode 100644 index ed5c896342..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java +++ /dev/null @@ -1,303 +0,0 @@ -package cn.iocoder.yudao.module.system.service.sensitiveword; - -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.SetUtils; -import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; -import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; -import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; -import cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.context.annotation.Import; - -import jakarta.annotation.Resource; -import java.time.Duration; -import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SENSITIVE_WORD_NOT_EXISTS; -import static java.util.Collections.singletonList; -import static org.junit.jupiter.api.Assertions.*; - -/** - * {@link SensitiveWordServiceImpl} 的单元测试类 - * - * @author 永不言败 - */ -@Import(SensitiveWordServiceImpl.class) -public class SensitiveWordServiceImplTest extends BaseDbUnitTest { - - @Resource - private SensitiveWordServiceImpl sensitiveWordService; - - @Resource - private SensitiveWordMapper sensitiveWordMapper; - - @BeforeEach - public void setUp() { - SensitiveWordServiceImpl.ENABLED = true; - } - - @Test - public void testInitLocalCache() { - SensitiveWordDO wordDO1 = randomPojo(SensitiveWordDO.class, o -> o.setName("傻瓜") - .setTags(singletonList("论坛")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - sensitiveWordMapper.insert(wordDO1); - SensitiveWordDO wordDO2 = randomPojo(SensitiveWordDO.class, o -> o.setName("笨蛋") - .setTags(singletonList("蔬菜")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - sensitiveWordMapper.insert(wordDO2); - SensitiveWordDO wordDO3 = randomPojo(SensitiveWordDO.class, o -> o.setName("白") - .setTags(singletonList("测试")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - sensitiveWordMapper.insert(wordDO3); - SensitiveWordDO wordDO4 = randomPojo(SensitiveWordDO.class, o -> o.setName("白痴") - .setTags(singletonList("测试")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - sensitiveWordMapper.insert(wordDO4); - - // 调用 - sensitiveWordService.initLocalCache(); - // 断言 sensitiveWordTagsCache 缓存 - assertEquals(SetUtils.asSet("论坛", "蔬菜", "测试"), sensitiveWordService.getSensitiveWordTagSet()); - // 断言 sensitiveWordCache - assertEquals(4, sensitiveWordService.getSensitiveWordCache().size()); - assertPojoEquals(wordDO1, sensitiveWordService.getSensitiveWordCache().get(0)); - assertPojoEquals(wordDO2, sensitiveWordService.getSensitiveWordCache().get(1)); - assertPojoEquals(wordDO3, sensitiveWordService.getSensitiveWordCache().get(2)); - // 断言 tagSensitiveWordTries 缓存 - assertNotNull(sensitiveWordService.getDefaultSensitiveWordTrie()); - assertEquals(3, sensitiveWordService.getTagSensitiveWordTries().size()); - assertNotNull(sensitiveWordService.getTagSensitiveWordTries().get("论坛")); - assertNotNull(sensitiveWordService.getTagSensitiveWordTries().get("蔬菜")); - assertNotNull(sensitiveWordService.getTagSensitiveWordTries().get("测试")); - } - - @Test - public void testRefreshLocalCache() { - // mock 数据 - SensitiveWordDO wordDO1 = randomPojo(SensitiveWordDO.class, o -> o.setName("傻瓜") - .setTags(singletonList("论坛")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - wordDO1.setUpdateTime(LocalDateTime.now()); - sensitiveWordMapper.insert(wordDO1); - sensitiveWordService.initLocalCache(); - // mock 数据 ② - SensitiveWordDO wordDO2 = randomPojo(SensitiveWordDO.class, o -> o.setName("笨蛋") - .setTags(singletonList("蔬菜")).setStatus(CommonStatusEnum.ENABLE.getStatus())); - wordDO2.setUpdateTime(LocalDateTimeUtils.addTime(Duration.ofMinutes(1))); // 避免时间相同 - sensitiveWordMapper.insert(wordDO2); - - // 调用 - sensitiveWordService.refreshLocalCache(); - // 断言 sensitiveWordTagsCache 缓存 - assertEquals(SetUtils.asSet("论坛", "蔬菜"), sensitiveWordService.getSensitiveWordTagSet()); - // 断言 sensitiveWordCache - assertEquals(2, sensitiveWordService.getSensitiveWordCache().size()); - assertPojoEquals(wordDO1, sensitiveWordService.getSensitiveWordCache().get(0)); - assertPojoEquals(wordDO2, sensitiveWordService.getSensitiveWordCache().get(1)); - // 断言 tagSensitiveWordTries 缓存 - assertNotNull(sensitiveWordService.getDefaultSensitiveWordTrie()); - assertEquals(2, sensitiveWordService.getTagSensitiveWordTries().size()); - assertNotNull(sensitiveWordService.getTagSensitiveWordTries().get("论坛")); - assertNotNull(sensitiveWordService.getTagSensitiveWordTries().get("蔬菜")); - } - - @Test - public void testCreateSensitiveWord_success() { - // 准备参数 - SensitiveWordSaveVO reqVO = randomPojo(SensitiveWordSaveVO.class) - .setId(null); // 防止 id 被赋值 - - // 调用 - Long sensitiveWordId = sensitiveWordService.createSensitiveWord(reqVO); - // 断言 - assertNotNull(sensitiveWordId); - // 校验记录的属性是否正确 - SensitiveWordDO sensitiveWord = sensitiveWordMapper.selectById(sensitiveWordId); - assertPojoEquals(reqVO, sensitiveWord, "id"); - } - - @Test - public void testUpdateSensitiveWord_success() { - // mock 数据 - SensitiveWordDO dbSensitiveWord = randomPojo(SensitiveWordDO.class); - sensitiveWordMapper.insert(dbSensitiveWord);// @Sql: 先插入出一条存在的数据 - // 准备参数 - SensitiveWordSaveVO reqVO = randomPojo(SensitiveWordSaveVO.class, o -> { - o.setId(dbSensitiveWord.getId()); // 设置更新的 ID - }); - - // 调用 - sensitiveWordService.updateSensitiveWord(reqVO); - // 校验是否更新正确 - SensitiveWordDO sensitiveWord = sensitiveWordMapper.selectById(reqVO.getId()); // 获取最新的 - assertPojoEquals(reqVO, sensitiveWord); - } - - @Test - public void testUpdateSensitiveWord_notExists() { - // 准备参数 - SensitiveWordSaveVO reqVO = randomPojo(SensitiveWordSaveVO.class); - - // 调用, 并断言异常 - assertServiceException(() -> sensitiveWordService.updateSensitiveWord(reqVO), SENSITIVE_WORD_NOT_EXISTS); - } - - @Test - public void testDeleteSensitiveWord_success() { - // mock 数据 - SensitiveWordDO dbSensitiveWord = randomPojo(SensitiveWordDO.class); - sensitiveWordMapper.insert(dbSensitiveWord);// @Sql: 先插入出一条存在的数据 - // 准备参数 - Long id = dbSensitiveWord.getId(); - - // 调用 - sensitiveWordService.deleteSensitiveWord(id); - // 校验数据不存在了 - assertNull(sensitiveWordMapper.selectById(id)); - } - - @Test - public void testDeleteSensitiveWord_notExists() { - // 准备参数 - Long id = randomLongId(); - - // 调用, 并断言异常 - assertServiceException(() -> sensitiveWordService.deleteSensitiveWord(id), SENSITIVE_WORD_NOT_EXISTS); - } - - @Test - public void testGetSensitiveWord() { - // mock 数据 - SensitiveWordDO sensitiveWord = randomPojo(SensitiveWordDO.class); - sensitiveWordMapper.insert(sensitiveWord); - // 准备参数 - Long id = sensitiveWord.getId(); - - // 调用 - SensitiveWordDO dbSensitiveWord = sensitiveWordService.getSensitiveWord(id); - // 断言 - assertPojoEquals(sensitiveWord, dbSensitiveWord); - } - - @Test - public void testGetSensitiveWordList() { - // mock 数据 - SensitiveWordDO sensitiveWord01 = randomPojo(SensitiveWordDO.class); - sensitiveWordMapper.insert(sensitiveWord01); - SensitiveWordDO sensitiveWord02 = randomPojo(SensitiveWordDO.class); - sensitiveWordMapper.insert(sensitiveWord02); - - // 调用 - List list = sensitiveWordService.getSensitiveWordList(); - // 断言 - assertEquals(2, list.size()); - assertEquals(sensitiveWord01, list.get(0)); - assertEquals(sensitiveWord02, list.get(1)); - } - - @Test - public void testGetSensitiveWordPage() { - // mock 数据 - SensitiveWordDO dbSensitiveWord = randomPojo(SensitiveWordDO.class, o -> { // 等会查询到 - o.setName("笨蛋"); - o.setTags(Arrays.asList("论坛", "蔬菜")); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setCreateTime(buildTime(2022, 2, 8)); - }); - sensitiveWordMapper.insert(dbSensitiveWord); - // 测试 name 不匹配 - sensitiveWordMapper.insert(cloneIgnoreId(dbSensitiveWord, o -> o.setName("傻瓜"))); - // 测试 tags 不匹配 - sensitiveWordMapper.insert(cloneIgnoreId(dbSensitiveWord, o -> o.setTags(Arrays.asList("短信", "日用品")))); - // 测试 createTime 不匹配 - sensitiveWordMapper.insert(cloneIgnoreId(dbSensitiveWord, o -> o.setCreateTime(buildTime(2022, 2, 16)))); - // 准备参数 - SensitiveWordPageReqVO reqVO = new SensitiveWordPageReqVO(); - reqVO.setName("笨"); - reqVO.setTag("论坛"); - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - reqVO.setCreateTime(buildBetweenTime(2022, 2, 1, 2022, 2, 12)); - - // 调用 - PageResult pageResult = sensitiveWordService.getSensitiveWordPage(reqVO); - // 断言 - assertEquals(1, pageResult.getTotal()); - assertEquals(1, pageResult.getList().size()); - assertPojoEquals(dbSensitiveWord, pageResult.getList().get(0)); - } - - @Test - public void testValidateText_noTag() { - testInitLocalCache(); - // 准备参数 - String text = "你是傻瓜,你是笨蛋"; - // 调用 - List result = sensitiveWordService.validateText(text, null); - // 断言 - assertEquals(Arrays.asList("傻瓜", "笨蛋"), result); - - // 准备参数 - String text2 = "你是傻瓜,你是笨蛋,你是白"; - // 调用 - List result2 = sensitiveWordService.validateText(text2, null); - // 断言 - assertEquals(Arrays.asList("傻瓜", "笨蛋","白"), result2); - } - - @Test - public void testValidateText_hasTag() { - testInitLocalCache(); - // 准备参数 - String text = "你是傻瓜,你是笨蛋"; - // 调用 - List result = sensitiveWordService.validateText(text, singletonList("论坛")); - // 断言 - assertEquals(singletonList("傻瓜"), result); - - - // 准备参数 - String text2 = "你是白"; - // 调用 - List result2 = sensitiveWordService.validateText(text2, singletonList("测试")); - // 断言 - assertEquals(singletonList("白"), result2); - } - - @Test - public void testIsTestValid_noTag() { - testInitLocalCache(); - // 准备参数 - String text = "你是傻瓜,你是笨蛋"; - // 调用,断言 - assertFalse(sensitiveWordService.isTextValid(text, null)); - - // 准备参数 - String text2 = "你是白"; - // 调用,断言 - assertFalse(sensitiveWordService.isTextValid(text2, null)); - } - - @Test - public void testIsTestValid_hasTag() { - testInitLocalCache(); - // 准备参数 - String text = "你是傻瓜,你是笨蛋"; - // 调用,断言 - assertFalse(sensitiveWordService.isTextValid(text, singletonList("论坛"))); - - // 准备参数 - String text2 = "你是白"; - // 调用,断言 - assertFalse(sensitiveWordService.isTextValid(text2, singletonList("测试"))); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql index 8b516869f2..e7946a105f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/clean.sql @@ -21,7 +21,6 @@ DELETE FROM "system_social_user"; DELETE FROM "system_social_user_bind"; DELETE FROM "system_tenant"; DELETE FROM "system_tenant_package"; -DELETE FROM "system_sensitive_word"; DELETE FROM "system_oauth2_client"; DELETE FROM "system_oauth2_approve"; DELETE FROM "system_oauth2_access_token"; diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql index 9a213ef12d..8f1ac5e0a0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql @@ -416,20 +416,6 @@ CREATE TABLE IF NOT EXISTS "system_tenant_package" ( PRIMARY KEY ("id") ) COMMENT '租户套餐表'; -CREATE TABLE IF NOT EXISTS "system_sensitive_word" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "name" varchar(255) NOT NULL, - "tags" varchar(1024) NOT NULL, - "status" bit NOT NULL DEFAULT FALSE, - "description" varchar(512), - "creator" varchar(64) DEFAULT '', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar(64) DEFAULT '', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, - PRIMARY KEY ("id") -) COMMENT '系统敏感词'; - CREATE TABLE IF NOT EXISTS "system_oauth2_client" ( "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "client_id" varchar NOT NULL, diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 9917ac9e73..328e9c27b9 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -170,7 +170,6 @@ logging: cn.iocoder.yudao.module.pay.dal.mysql: debug cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 JobLogMapper 的日志级别为 info cn.iocoder.yudao.module.system.dal.mysql: debug - cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info cn.iocoder.yudao.module.tool.dal.mysql: debug cn.iocoder.yudao.module.member.dal.mysql: debug -- Gitee From 075157417c90218244e0c369eb15cf20ad912536 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 21:00:02 +0800 Subject: [PATCH 0309/1557] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=9A=E6=97=A0=E7=94=A8=E7=9A=84=20test-integration=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=EF=BC=8C=E6=9A=82=E6=97=B6=E4=B8=8D=E8=80=83?= =?UTF-8?q?=E8=99=91=E9=9B=86=E6=88=90=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/util/cache/CacheUtils.java | 34 +++++-- .../infra/enums/ErrorCodeConstants.java | 4 - .../system/job/SchedulerManagerTest.java | 53 ---------- .../module/system/mq/RedisStreamTest.java | 62 ------------ .../module/system/service/package-info.java | 4 - .../sms/SmsServiceIntegrationTest.java | 55 ----------- .../test/BaseDbAndRedisIntegrationTest.java | 38 ------- .../system/test/BaseRedisIntegrationTest.java | 23 ----- .../application-integration-test.yaml | 99 ------------------- 9 files changed, 25 insertions(+), 347 deletions(-) delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/job/SchedulerManagerTest.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/mq/RedisStreamTest.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/package-info.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/sms/SmsServiceIntegrationTest.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseDbAndRedisIntegrationTest.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseRedisIntegrationTest.java delete mode 100644 yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java index acd48aa121..12a6e17246 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java @@ -1,13 +1,10 @@ package cn.iocoder.yudao.framework.common.util.cache; -import com.alibaba.ttl.threadpool.TtlExecutors; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import java.time.Duration; -import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** @@ -17,17 +14,36 @@ import java.util.concurrent.Executors; */ public class CacheUtils { + /** + * 构建异步刷新的 LoadingCache 对象 + * + * 注意:如果你的缓存和 ThreadLocal 有关系,要么自己处理 ThreadLocal 的传递,要么使用 {@link #buildCache(Duration, CacheLoader)} 方法 + * + * 或者简单理解: + * 1、和“人”相关的,使用 {@link #buildCache(Duration, CacheLoader)} 方法 + * 2、和“全局”、“系统”相关的,使用当前缓存方法 + * + * @param duration 过期时间 + * @param loader CacheLoader 对象 + * @return LoadingCache 对象 + */ public static LoadingCache buildAsyncReloadingCache(Duration duration, CacheLoader loader) { - // 1. 使用 TTL 包装 ExecutorService,实现 ThreadLocal 的透传 - // https://github.com/YunaiV/ruoyi-vue-pro/issues/432 - ExecutorService executorService = Executors.newCachedThreadPool(); // TODO 芋艿:可能要思考下,未来要不要做成可配置 - Executor executor = TtlExecutors.getTtlExecutorService(executorService); - // 2. 创建 Guava LoadingCache return CacheBuilder.newBuilder() // 只阻塞当前数据加载线程,其他线程返回旧值 .refreshAfterWrite(duration) // 通过 asyncReloading 实现全异步加载,包括 refreshAfterWrite 被阻塞的加载线程 - .build(CacheLoader.asyncReloading(loader, executor)); + .build(CacheLoader.asyncReloading(loader, Executors.newCachedThreadPool())); // TODO 芋艿:可能要思考下,未来要不要做成可配置 + } + + /** + * 构建同步刷新的 LoadingCache 对象 + * + * @param duration 过期时间 + * @param loader CacheLoader 对象 + * @return LoadingCache 对象 + */ + public static LoadingCache buildCache(Duration duration, CacheLoader loader) { + return CacheBuilder.newBuilder().refreshAfterWrite(duration).build(loader); } } diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java index 3385596ad6..e9f39a81fe 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants.java @@ -47,7 +47,6 @@ public interface ErrorCodeConstants { ErrorCode CODEGEN_MASTER_TABLE_NOT_EXISTS = new ErrorCode(1_001_004_010, "主表(id={})定义不存在,请检查"); ErrorCode CODEGEN_SUB_COLUMN_NOT_EXISTS = new ErrorCode(1_001_004_011, "子表的字段(id={})不存在,请检查"); ErrorCode CODEGEN_MASTER_GENERATION_FAIL_NO_SUB_TABLE = new ErrorCode(1_001_004_012, "主表生成代码失败,原因:它没有子表"); - ErrorCode CODEGEN_MASTER_GENERATION_FAIL_NO_SUB_COLUMN = new ErrorCode(1_001_004_013, "主表生成代码失败,原因:它的子表({})没有字段"); // ========== 文件配置 1-001-006-000 ========== ErrorCode FILE_CONFIG_NOT_EXISTS = new ErrorCode(1_001_006_000, "文件配置不存在"); @@ -57,9 +56,6 @@ public interface ErrorCodeConstants { ErrorCode DATA_SOURCE_CONFIG_NOT_EXISTS = new ErrorCode(1_001_007_000, "数据源配置不存在"); ErrorCode DATA_SOURCE_CONFIG_NOT_OK = new ErrorCode(1_001_007_001, "数据源配置不正确,无法进行连接"); - // ========== 数据源配置 1-001-107-000 ========== - ErrorCode DEMO_STUDENT_NOT_EXISTS = new ErrorCode(1_001_107_000, "学生不存在"); - // ========== 学生 1-001-201-000 ========== ErrorCode DEMO01_CONTACT_NOT_EXISTS = new ErrorCode(1_001_201_000, "示例联系人不存在"); ErrorCode DEMO02_CATEGORY_NOT_EXISTS = new ErrorCode(1_001_201_001, "示例分类不存在"); diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/job/SchedulerManagerTest.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/job/SchedulerManagerTest.java deleted file mode 100644 index 2b145a741e..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/job/SchedulerManagerTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package cn.iocoder.yudao.module.system.job; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; -import cn.iocoder.yudao.module.system.job.auth.UserSessionTimeoutJob; -import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; -import org.junit.jupiter.api.Test; -import org.quartz.SchedulerException; - -import jakarta.annotation.Resource; - -public class SchedulerManagerTest extends BaseDbUnitTest { - - @Resource - private SchedulerManager schedulerManager; - - @Test - public void testAddJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.addJob(1L, jobHandlerName, "test", "0/10 * * * * ? *", 0, 0); - } - - @Test - public void testUpdateJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.updateJob(jobHandlerName, "hahaha", "0/20 * * * * ? *", 0, 0); - } - - @Test - public void testDeleteJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.deleteJob(jobHandlerName); - } - - @Test - public void testPauseJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.pauseJob(jobHandlerName); - } - - @Test - public void testResumeJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.resumeJob(jobHandlerName); - } - - @Test - public void testTriggerJob() throws SchedulerException { - String jobHandlerName = StrUtil.lowerFirst(UserSessionTimeoutJob.class.getSimpleName()); - schedulerManager.triggerJob(1L, jobHandlerName, "niubi!!!"); - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/mq/RedisStreamTest.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/mq/RedisStreamTest.java deleted file mode 100644 index 9d431c288e..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/mq/RedisStreamTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.iocoder.yudao.module.system.mq; - -import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; -import cn.iocoder.yudao.module.system.mq.consumer.mail.MailSendConsumer; -import cn.iocoder.yudao.module.system.mq.consumer.sms.SmsSendConsumer; -import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; -import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessage; -import cn.iocoder.yudao.module.system.test.BaseRedisIntegrationTest; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.springframework.context.annotation.Import; -import org.springframework.data.redis.core.RedisTemplate; - -import jakarta.annotation.Resource; -import java.util.concurrent.TimeUnit; - -public class RedisStreamTest { - - @Import({SmsSendConsumer.class, MailSendConsumer.class}) - @Disabled - public static class ConsumerTest extends BaseRedisIntegrationTest { - - @Test - public void testConsumer() { - ThreadUtil.sleep(1, TimeUnit.DAYS); - } - - } - - @Disabled - public static class ProducerTest extends BaseRedisIntegrationTest { - - @Resource - private RedisMQTemplate redisMQTemplate; - - @Resource - private RedisTemplate redisTemplate; - - @Test - public void testProducer01() { - for (int i = 0; i < 100; i++) { - // 创建消息 - SmsSendMessage message = new SmsSendMessage(); - message.setMobile("15601691300").setApiTemplateId("test:" + i); - // 发送消息 - redisMQTemplate.send(message); - } - } - - @Test - public void testProducer02() { - // 创建消息 - MailSendMessage message = new MailSendMessage(); - message.setAddress("fangfang@mihayou.com").setTemplateCode("test"); - // 发送消息 - redisMQTemplate.send(message); - } - - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/package-info.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/package-info.java deleted file mode 100644 index 7b475e53e4..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 占位 - */ -package cn.iocoder.yudao.module.system.service; diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/sms/SmsServiceIntegrationTest.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/sms/SmsServiceIntegrationTest.java deleted file mode 100644 index a8ce00a192..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/service/sms/SmsServiceIntegrationTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package cn.iocoder.yudao.module.system.service.sms; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration; -import cn.iocoder.yudao.module.system.test.BaseDbAndRedisIntegrationTest; -import cn.iocoder.yudao.module.system.mq.consumer.sms.SmsSendConsumer; -import cn.iocoder.yudao.module.system.mq.producer.sms.SmsProducer; -import cn.iocoder.yudao.module.system.service.user.AdminUserService; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; - -import jakarta.annotation.Resource; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -// TODO @芋艿:需要迁移 -@Import({YudaoSmsAutoConfiguration.class, - SmsChannelServiceImpl.class, SmsSendServiceImpl.class, SmsTemplateServiceImpl.class, SmsLogServiceImpl.class, - SmsProducer.class, SmsSendConsumer.class}) -public class SmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest { - - @Resource - private SmsSendServiceImpl smsService; - @Resource - private SmsChannelServiceImpl smsChannelService; - - @MockBean - private AdminUserService userService; - - @Test - public void testSendSingleSms_aliyunSuccess() { - // 参数准备 - String mobile = "15601691399"; - Long userId = 1L; - Integer userType = UserTypeEnum.ADMIN.getValue(); - String templateCode = "test_02"; - Map templateParams = MapUtil.builder() - .put("code", "1234").build(); - // 调用 - smsService.sendSingleSms(mobile, userId, userType, templateCode, templateParams); - - // 等待 MQ 消费 - ThreadUtil.sleep(1, TimeUnit.HOURS); - } - -// @Test -// public void testDoSendSms() { -// // 等待 MQ 消费 -// ThreadUtil.sleep(1, TimeUnit.HOURS); -// } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseDbAndRedisIntegrationTest.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseDbAndRedisIntegrationTest.java deleted file mode 100644 index 5b9b21ffd5..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseDbAndRedisIntegrationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.iocoder.yudao.module.system.test; - -import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; -import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; -import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; -import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration; -import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; -import org.redisson.spring.starter.RedissonAutoConfiguration; -import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Import; -import org.springframework.test.context.ActiveProfiles; - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisIntegrationTest.Application.class) -@ActiveProfiles("integration-test") // 设置使用 application-integration-test 配置文件 -public class BaseDbAndRedisIntegrationTest { - - @Import({ - // DB 配置类 - DynamicDataSourceAutoConfiguration.class, // Dynamic Datasource 配置类 - YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类 - DataSourceAutoConfiguration.class, // Spring DB 自动配置类 - DataSourceTransactionManagerAutoConfiguration.class, // Spring 事务自动配置类 - // MyBatis 配置类 - YudaoMybatisAutoConfiguration.class, // 自己的 MyBatis 配置类 - MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类 - - // Redis 配置类 - RedisAutoConfiguration.class, // Spring Redis 自动配置类 - YudaoRedisAutoConfiguration.class, // 自己的 Redis 配置类 - RedissonAutoConfiguration.class, // Redisson 自动高配置类 - }) - public static class Application { - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseRedisIntegrationTest.java b/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseRedisIntegrationTest.java deleted file mode 100644 index f48b2891df..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/java/cn/iocoder/yudao/module/system/test/BaseRedisIntegrationTest.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.module.system.test; - -import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; -import org.redisson.spring.starter.RedissonAutoConfiguration; -import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Import; -import org.springframework.test.context.ActiveProfiles; - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseRedisIntegrationTest.Application.class) -@ActiveProfiles("integration-test") // 设置使用 application-integration-test 配置文件 -public class BaseRedisIntegrationTest { - - @Import({ - // Redis 配置类 - RedisAutoConfiguration.class, // Spring Redis 自动配置类 - YudaoRedisAutoConfiguration.class, // 自己的 Redis 配置类 - RedissonAutoConfiguration.class, // Redisson 自动高配置类 - }) - public static class Application { - } - -} diff --git a/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml b/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml deleted file mode 100644 index 9b025ac8ef..0000000000 --- a/yudao-module-system/yudao-module-system-biz/src/test-integration/resources/application-integration-test.yaml +++ /dev/null @@ -1,99 +0,0 @@ -spring: - main: - lazy-initialization: true # 开启懒加载,加快速度 - banner-mode: off # 单元测试,禁用 Banner - ---- #################### 数据库相关配置 #################### - -spring: - # 数据源配置项 - autoconfigure: - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT - driver-class-name: com.mysql.jdbc.Driver - username: root - password: 123456 - slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT - driver-class-name: com.mysql.jdbc.Driver - username: root - password: 123456 - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 127.0.0.1 # 地址 - port: 16379 # 端口(单元测试,使用 16379 端口) - database: 0 # 数据库索引 - -mybatis: - lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试 - ---- #################### 定时任务相关配置 #################### - ---- #################### 配置中心相关配置 #################### - ---- #################### 服务保障相关配置 #################### - -# Lock4j 配置项(单元测试,禁用 Lock4j) - ---- #################### 监控相关配置 #################### - ---- #################### 芋道相关配置 #################### - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - security: - token-header: Authorization - token-secret: abcdefghijklmnopqrstuvwxyz - token-timeout: 1d - session-timeout: 30m - mock-enable: true - mock-secret: test - swagger: - enable: false # 单元测试,禁用 Swagger - file: - base-path: http://127.0.0.1:${server.port}/${yudao.web.api-prefix}/file/get/ - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 -- Gitee From fd832e23fd1d5395d385d92dad0a31d59fb6d95d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 22 Apr 2024 23:31:50 +0800 Subject: [PATCH 0310/1557] =?UTF-8?q?bugfix=EF=BC=9A=E9=9D=9E=20json=20?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=EF=BC=88=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=EF=BC=89=E6=97=B6=EF=BC=8Ctoken=20=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E9=94=99=E8=AF=AF=E8=AF=BB=E5=8F=96=20request=20body?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/util/servlet/ServletUtils.java | 12 ++++++++++-- .../src/test/resources/sql/clean.sql | 1 - .../src/test/resources/sql/create_tables.sql | 15 --------------- .../dal/mysql/oauth2/OAuth2AccessTokenMapper.java | 2 ++ .../src/main/resources/application-local.yaml | 3 ++- yudao-server/src/main/resources/application.yaml | 1 - 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java index bc592d8908..00b4687d42 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java @@ -93,11 +93,19 @@ public class ServletUtils { } public static String getBody(HttpServletRequest request) { - return JakartaServletUtil.getBody(request); + // 只有在 json 请求在读取,因为只有 CacheRequestBodyFilter 才会进行缓存,支持重复读取 + if (isJsonRequest(request)) { + return JakartaServletUtil.getBody(request); + } + return null; } public static byte[] getBodyBytes(HttpServletRequest request) { - return JakartaServletUtil.getBodyBytes(request); + // 只有在 json 请求在读取,因为只有 CacheRequestBodyFilter 才会进行缓存,支持重复读取 + if (isJsonRequest(request)) { + return JakartaServletUtil.getBodyBytes(request); + } + return null; } public static String getClientIP(HttpServletRequest request) { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/clean.sql b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/clean.sql index a3e0fd0299..58345edd85 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/clean.sql +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/clean.sql @@ -6,7 +6,6 @@ DELETE FROM "infra_job_log"; DELETE FROM "infra_api_access_log"; DELETE FROM "infra_api_error_log"; DELETE FROM "infra_file_config"; -DELETE FROM "infra_test_demo"; DELETE FROM "infra_data_source_config"; DELETE FROM "infra_codegen_table"; DELETE FROM "infra_codegen_column"; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql index 9f383ac5a2..d4ca2b80eb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql @@ -146,21 +146,6 @@ CREATE TABLE IF NOT EXISTS "infra_api_error_log" ( primary key ("id") ) COMMENT '系统异常日志'; -CREATE TABLE IF NOT EXISTS "infra_test_demo" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "name" varchar(100) NOT NULL, - "status" tinyint NOT NULL, - "type" tinyint NOT NULL, - "category" tinyint NOT NULL, - "remark" varchar(500), - "creator" varchar(64) DEFAULT '''', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar(64) DEFAULT '''', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, - PRIMARY KEY ("id") -) COMMENT '字典类型表'; - CREATE TABLE IF NOT EXISTS "infra_data_source_config" ( "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "name" varchar(100) NOT NULL, diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/oauth2/OAuth2AccessTokenMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/oauth2/OAuth2AccessTokenMapper.java index 8a1e2876de..81ca13fad7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/oauth2/OAuth2AccessTokenMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/oauth2/OAuth2AccessTokenMapper.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.oauth2; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.token.OAuth2AccessTokenPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; import org.apache.ibatis.annotations.Mapper; @@ -13,6 +14,7 @@ import java.util.List; @Mapper public interface OAuth2AccessTokenMapper extends BaseMapperX { + @TenantIgnore // 获取 token 的时候,需要忽略租户编号。原因是:一些场景下,可能不会传递 tenant-id 请求头,例如说文件上传、积木报表等等 default OAuth2AccessTokenDO selectByAccessToken(String accessToken) { return selectOne(OAuth2AccessTokenDO::getAccessToken, accessToken); } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 328e9c27b9..7f348da846 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -165,10 +165,11 @@ logging: # 配置自己写的 MyBatis Mapper 打印日志 cn.iocoder.yudao.module.bpm.dal.mysql: debug cn.iocoder.yudao.module.infra.dal.mysql: debug + cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印 cn.iocoder.yudao.module.infra.dal.mysql.job.JobLogMapper: INFO # 配置 JobLogMapper 的日志级别为 info cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info cn.iocoder.yudao.module.pay.dal.mysql: debug - cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 JobLogMapper 的日志级别为 info + cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 PayNotifyTaskMapper 的日志级别为 info cn.iocoder.yudao.module.system.dal.mysql: debug cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info cn.iocoder.yudao.module.tool.dal.mysql: debug diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index ae336f4293..6cb5386e3d 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -211,7 +211,6 @@ yudao: - system_notify_template - infra_codegen_column - infra_codegen_table - - infra_test_demo - infra_config - infra_file_config - infra_file -- Gitee From 7f0485e872ca78e6b98e8bbfa1a9af39da475611 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 23 Apr 2024 09:41:10 +0800 Subject: [PATCH 0311/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A7=86=E9=A2=91=E5=9C=B0=E5=9D=80=E5=9C=A8?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=92=AD=E6=94=BE=E7=9A=84=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/util/servlet/ServletUtils.java | 18 ------------ .../admin/codegen/CodegenController.java | 14 +++++----- .../controller/admin/file/FileController.java | 4 +-- .../file/core/utils/FileTypeUtils.java | 28 +++++++++++++++++++ 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java index 00b4687d42..12731edad6 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.framework.common.util.servlet; -import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.servlet.JakartaServletUtil; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -12,8 +11,6 @@ import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import java.io.IOException; -import java.net.URLEncoder; import java.util.Map; /** @@ -35,21 +32,6 @@ public class ServletUtils { JakartaServletUtil.write(response, content, MediaType.APPLICATION_JSON_UTF8_VALUE); } - /** - * 返回附件 - * - * @param response 响应 - * @param filename 文件名 - * @param content 附件内容 - */ - public static void writeAttachment(HttpServletResponse response, String filename, byte[] content) throws IOException { - // 设置 header 和 contentType - response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); - // 输出附件 - IoUtil.write(response.getOutputStream(), false, content); - } - /** * @param request 请求 * @return ua diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java index 356bb41394..ed4c34446e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.ZipUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenCreateListReqVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenDetailRespVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenPreviewRespVO; @@ -17,17 +16,17 @@ import cn.iocoder.yudao.module.infra.convert.codegen.CodegenConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; import cn.iocoder.yudao.module.infra.service.codegen.CodegenService; -import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -36,6 +35,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils.writeAttachment; @Tag(name = "管理后台 - 代码生成器") @RestController @@ -145,7 +145,7 @@ public class CodegenController { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ZipUtil.zip(outputStream, paths, ins); // 输出 - ServletUtils.writeAttachment(response, "codegen.zip", outputStream.toByteArray()); + writeAttachment(response, "codegen.zip", outputStream.toByteArray()); } } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index bbd29dc291..2f92adc0e0 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -6,7 +6,6 @@ import cn.hutool.core.util.URLUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.*; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.service.file.FileService; @@ -26,6 +25,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils.writeAttachment; @Tag(name = "管理后台 - 文件存储") @RestController @@ -88,7 +88,7 @@ public class FileController { response.setStatus(HttpStatus.NOT_FOUND.value()); return; } - ServletUtils.writeAttachment(response, path, content); + writeAttachment(response, path, content); } @GetMapping("/page") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java index ea71f58810..8970c004cf 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java @@ -1,9 +1,15 @@ package cn.iocoder.yudao.module.infra.framework.file.core.utils; +import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; import com.alibaba.ttl.TransmittableThreadLocal; +import jakarta.servlet.http.HttpServletResponse; import lombok.SneakyThrows; import org.apache.tika.Tika; +import java.io.IOException; +import java.net.URLEncoder; + /** * 文件类型 Utils * @@ -45,4 +51,26 @@ public class FileTypeUtils { return TIKA.get().detect(data, name); } + /** + * 返回附件 + * + * @param response 响应 + * @param filename 文件名 + * @param content 附件内容 + */ + public static void writeAttachment(HttpServletResponse response, String filename, byte[] content) throws IOException { + // 设置 header 和 contentType + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); + String contentType = getMineType(content, filename); + response.setContentType(contentType); + // 针对 video 的特殊处理,解决视频地址在移动端播放的兼容性问题 + if (StrUtil.containsIgnoreCase(contentType, "video")) { + response.setHeader("Content-Length", String.valueOf(content.length - 1)); + response.setHeader("Content-Range", String.valueOf(content.length - 1)); + response.setHeader("Accept-Ranges", "bytes"); + } + // 输出附件 + IoUtil.write(response.getOutputStream(), false, content); + } + } -- Gitee From c553a7b5a0dc0ed57e8ab68d7b4a26abb484ac2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=AB=98?= <171376172@qq.com> Date: Tue, 23 Apr 2024 07:07:21 +0000 Subject: [PATCH 0312/1557] =?UTF-8?q?update=20AccessLogCleanJob.java=20?= =?UTF-8?q?=E5=B0=86=E8=BF=94=E5=9B=9E=E6=96=87=E6=A1=88=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E2=80=9C=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=E2=80=9D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E2=80=9C=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高高 <171376172@qq.com> --- .../yudao/module/infra/job/logger/AccessLogCleanJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java index 9ddab41639..6b8b87cea6 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java @@ -35,7 +35,7 @@ public class AccessLogCleanJob implements JobHandler { public String execute(String param) { Integer count = apiAccessLogService.cleanAccessLog(JOB_CLEAN_RETAIN_DAY, DELETE_LIMIT); log.info("[execute][定时执行清理访问日志数量 ({}) 个]", count); - return String.format("定时执行清理错误日志数量 %s 个", count); + return String.format("定时执行清理访问日志数量 %s 个", count); } } -- Gitee From 1ab1538afebe6bfa3de9206c56fa6660e387e94f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 23 Apr 2024 16:29:26 +0800 Subject: [PATCH 0313/1557] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=BB=BAr?= =?UTF-8?q?ole=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/enums/ChatConversationTypeEnum.java | 5 +- .../ChatConversationController.java | 17 ++++-- .../ai/mapper/AiChatConversationMapper.java | 6 ++- .../ai/service/ChatConversationService.java | 17 ++++-- .../impl/ChatConversationServiceImpl.java | 52 +++++++++++++++---- .../ai/service/impl/ChatServiceImpl.java | 51 ++++-------------- .../ai/vo/ChatConversationCreateRoleReq.java | 26 ++++++++++ ...ava => ChatConversationCreateUserReq.java} | 9 ++-- .../resources/http/chat-conversation.http | 7 ++- 9 files changed, 123 insertions(+), 67 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRoleReq.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/{ChatConversationCreateReq.java => ChatConversationCreateUserReq.java} (62%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java index 4a699618d9..18891bbe72 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatConversationTypeEnum.java @@ -15,8 +15,9 @@ import lombok.Getter; @Getter public enum ChatConversationTypeEnum { - NEW("new", "新建对话"), - CONTINUE("continue", "继续对话"), + // roleChat、userChat + ROLE_CHAT("roleChat", "角色对话"), + USER_CHAT("userChat", "用户对话"), ; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java index d17a385a17..2133ccb602 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java @@ -2,7 +2,8 @@ package cn.iocoder.yudao.module.ai.controller; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.service.ChatConversationService; -import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRoleReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateUserReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; import io.swagger.v3.oas.annotations.Operation; @@ -30,10 +31,16 @@ public class ChatConversationController { private final ChatConversationService chatConversationService; - @Operation(summary = "创建 - 对话") - @PostMapping("/create") - public CommonResult create(@RequestBody @Validated ChatConversationCreateReq req) { - return CommonResult.success(chatConversationService.create(req)); + @Operation(summary = "创建 - 对话普通对话") + @PostMapping("/createConversation") + public CommonResult createConversation(@RequestBody @Validated ChatConversationCreateUserReq req) { + return CommonResult.success(chatConversationService.createConversation(req)); + } + + @Operation(summary = "创建 - 对话角色对话") + @PostMapping("/createRoleConversation") + public CommonResult createRoleConversation(@RequestBody @Validated ChatConversationCreateRoleReq req) { + return CommonResult.success(chatConversationService.createRoleConversation(req)); } @Operation(summary = "获取 - 获取对话") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java index 30aa1dff56..6da3fdc5b3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -24,7 +24,11 @@ import java.util.List; @Mapper public interface AiChatConversationMapper extends BaseMapperX { - + /** + * 更新 - chat count + * + * @param id + */ @Update("update ai_chat_conversation set chat_count = chat_count + 1 where id = #{id}") void updateIncrChatCount(@Param("id") Long id); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java index e5073bd6b6..428a26e108 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/ChatConversationService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRoleReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateUserReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; @@ -15,12 +16,21 @@ import java.util.List; public interface ChatConversationService { /** - * 对话 - 创建 + * 对话 - 创建普通对话 * * @param req * @return */ - ChatConversationRes create(ChatConversationCreateReq req); + ChatConversationRes createConversation(ChatConversationCreateUserReq req); + + /** + * 对话 - 创建role对话 + * + * @param req + * @return + */ + ChatConversationRes createRoleConversation(ChatConversationCreateRoleReq req); + /** * 获取 - 对话 @@ -44,4 +54,5 @@ public interface ChatConversationService { * @param id */ void delete(Long id); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java index 1318351cd3..7b6f5fa8de 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatConversationServiceImpl.java @@ -5,13 +5,18 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.ChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.enums.ChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.ChatConversationService; -import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateRoleReq; +import cn.iocoder.yudao.module.ai.vo.ChatConversationCreateUserReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationListReq; import cn.iocoder.yudao.module.ai.vo.ChatConversationRes; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; import java.util.List; @@ -27,10 +32,11 @@ import java.util.List; @AllArgsConstructor public class ChatConversationServiceImpl implements ChatConversationService { + private final AiChatRoleMapper aiChatRoleMapper; private final AiChatConversationMapper aiChatConversationMapper; @Override - public ChatConversationRes create(ChatConversationCreateReq req) { + public ChatConversationRes createConversation(ChatConversationCreateUserReq req) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询最新的对话 @@ -40,17 +46,45 @@ public class ChatConversationServiceImpl implements ChatConversationService { return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); } // 创建新的 Conversation + AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, + null, null, ChatConversationTypeEnum.USER_CHAT); + // 转换 res + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); + } + + @Override + public ChatConversationRes createRoleConversation(ChatConversationCreateRoleReq req) { + // 获取用户id + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询最新的对话 + AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); + // 如果有对话没有被使用过,那就返回这个 + if (latestConversation != null && latestConversation.getChatCount() <= 0) { + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); + } + AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(req.getChatRoleId()); + // 创建新的 Conversation + AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, + req.getChatRoleId(), aiChatRoleDO.getRoleName(), ChatConversationTypeEnum.ROLE_CHAT); + // 转换 res + return ChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); + } + + private @NotNull AiChatConversationDO saveConversation(String title, + Long userId, + Long chatRoleId, + String chatRoleName, + ChatConversationTypeEnum typeEnum) { AiChatConversationDO insertConversation = new AiChatConversationDO(); insertConversation.setId(null); - insertConversation.setUserId(loginUserId); - insertConversation.setChatRoleId(null); - insertConversation.setChatRoleName(null); - insertConversation.setTitle(null); + insertConversation.setUserId(userId); + insertConversation.setChatRoleId(chatRoleId); + insertConversation.setChatRoleName(chatRoleName); + insertConversation.setTitle(title); insertConversation.setChatCount(0); - insertConversation.setType(req.getChatType()); + insertConversation.setType(typeEnum.getType()); aiChatConversationMapper.insert(insertConversation); - // 转换 res - return ChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); + return insertConversation; } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 0bb7211cb7..57e6b73588 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -5,15 +5,10 @@ import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.ai.config.AiClient; -import cn.iocoder.yudao.framework.common.exception.ServerException; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; -import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; @@ -49,7 +44,6 @@ public class ChatServiceImpl implements ChatService { private final AiChatConversationMapper aiChatConversationMapper; private final ChatConversationService chatConversationService; - /** * chat * @@ -64,7 +58,7 @@ public class ChatServiceImpl implements ChatService { // 获取对话信息 ChatConversationRes conversationRes = chatConversationService.getConversation(req.getConversationId()); // 保存 chat message - saveChatMessage(req, conversationRes.getId(), loginUserId); + saveChatMessage(req, conversationRes, loginUserId); String content = null; try { // 创建 chat 需要的 Prompt @@ -75,16 +69,19 @@ public class ChatServiceImpl implements ChatService { // 发送 call 调用 ChatResponse call = aiClient.call(prompt, clientNameEnum.getName()); content = call.getResult().getOutput().getContent(); + // 更新 conversation + } catch (Exception e) { content = ExceptionUtil.getMessage(e); } finally { // 保存 chat message - saveSystemChatMessage(req, conversationRes.getId(), loginUserId, content); + saveSystemChatMessage(req, conversationRes, loginUserId, content); } return content; } - private void saveChatMessage(ChatReq req, Long chatConversationId, Long loginUserId) { + private void saveChatMessage(ChatReq req, ChatConversationRes conversationRes, Long loginUserId) { + Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( new AiChatMessageDO() @@ -97,12 +94,12 @@ public class ChatServiceImpl implements ChatService { .setTopP(req.getTopP()) .setTemperature(req.getTemperature()) ); - // chat count 先+1 aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - public void saveSystemChatMessage(ChatReq req, Long chatConversationId, Long loginUserId, String systemPrompts) { + public void saveSystemChatMessage(ChatReq req, ChatConversationRes conversationRes, Long loginUserId, String systemPrompts) { + Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( new AiChatMessageDO() @@ -120,34 +117,6 @@ public class ChatServiceImpl implements ChatService { aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { - // 获取 chat 角色 - String chatRoleName = null; - ChatTypeEnum chatTypeEnum = null; - Long chatRoleId = req.getChatRoleId(); - if (req.getChatRoleId() != null) { - AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(chatRoleId); - if (aiChatRoleDO == null) { - throw new ServerException(ErrorCodeConstants.AI_CHAT_ROLE_NOT_EXISTENT); - } - chatTypeEnum = ChatTypeEnum.ROLE_CHAT; - chatRoleName = aiChatRoleDO.getRoleName(); - } else { - chatTypeEnum = ChatTypeEnum.USER_CHAT; - } - // - AiChatConversationDO insertChatConversation = new AiChatConversationDO() - .setId(null) - .setUserId(loginUserId) - .setChatRoleId(req.getChatRoleId()) - .setChatRoleName(chatRoleName) - .setType(chatTypeEnum.getType()) - .setChatCount(1) - .setTitle(req.getPrompt().substring(0, 20) + "..."); - aiChatConversationMapper.insert(insertChatConversation); - return insertChatConversation; - } - /** * chat stream * @@ -168,7 +137,7 @@ public class ChatServiceImpl implements ChatService { req.setTopP(req.getTopP()); req.setTemperature(req.getTemperature()); // 保存 chat message - saveChatMessage(req, conversationRes.getId(), loginUserId); + saveChatMessage(req, conversationRes, loginUserId); Flux streamResponse = aiClient.stream(prompt, clientNameEnum.getName()); StringBuffer contentBuffer = new StringBuffer(); @@ -195,7 +164,7 @@ public class ChatServiceImpl implements ChatService { log.info("发送完成!"); sseEmitter.complete(); // 保存 chat message - saveSystemChatMessage(req, conversationRes.getId(), loginUserId, contentBuffer.toString()); + saveSystemChatMessage(req, conversationRes, loginUserId, contentBuffer.toString()); } ); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRoleReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRoleReq.java new file mode 100644 index 0000000000..9af6a44ef7 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateRoleReq.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.ai.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 聊天对话 + * + * @author fansili + * @time 2024/4/18 16:24 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class ChatConversationCreateRoleReq { + + @Schema(description = "chat角色Id") + @NotNull(message = "聊天角色id不能为空!") + private Long chatRoleId; + + @Schema(description = "标题(有程序自动生成)") + @NotNull(message = "标题不能为空!") + private String title; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateUserReq.java similarity index 62% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateUserReq.java index a39c9e2ed6..9f967175ec 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatConversationCreateUserReq.java @@ -14,10 +14,9 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class ChatConversationCreateReq { - - @Schema(description = "对话类型(roleChat、userChat)") - @NotNull(message = "聊天类型不能为空!") - private String chatType; +public class ChatConversationCreateUserReq { + @Schema(description = "对话标题") + @NotNull(message = "标题不能为空!") + private String title; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http index 02c147e038..65230d9e9d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http @@ -16,7 +16,12 @@ GET {{baseUrl}}/ai/chat/conversation/1781604279872581644 Authorization: {{token}} -### 对话 - id获取 +### 对话 - list +GET {{baseUrl}}/ai/chat/conversation/list +Authorization: {{token}} + + +### 对话 - 删除 DELETE {{baseUrl}}/ai/chat/conversation/1781604279872581644 Authorization: {{token}} -- Gitee From d2061ecdc2a581f4f62c15cf38b45e452fc04b6f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 23 Apr 2024 22:40:52 +0800 Subject: [PATCH 0314/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A7=86=E9=A2=91=E5=9C=B0=E5=9D=80=E5=9C=A8?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=92=AD=E6=94=BE=E7=9A=84=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/controller/admin/codegen/CodegenController.java | 6 +++--- .../infra/framework/file/core/utils/FileTypeUtils.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java index ed4c34446e..6889d03ca2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java @@ -20,13 +20,13 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java index 8970c004cf..a4147afad8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.infra.framework.file.core.utils; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.ttl.TransmittableThreadLocal; -import jakarta.servlet.http.HttpServletResponse; import lombok.SneakyThrows; import org.apache.tika.Tika; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URLEncoder; -- Gitee From 9ab53ee2637a8e04a2134642b62421c879e5d779 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 23 Apr 2024 23:12:36 +0800 Subject: [PATCH 0315/1557] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E4=B8=9A=E7=BB=A9=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceServiceImpl.java | 10 +++++++++- .../CrmStatisticsPerformanceMapper.xml | 20 +++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index 4c4193f7b3..fcd7267a8b 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -40,7 +40,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform @Override public List getContractCountPerformance(CrmStatisticsPerformanceReqVO performanceReqVO) { - // TODO @scholar:我们可以换个思路实现,减少数据库的计算量; + // TODO @scholar:可以把下面这个注释,你理解后,重新整理下,写到 getPerformance 里; // 比如说,2024 年的合同数据,是不是 2022-12 到 2024-12-31,每个月的统计呢? // 理解之后,我们可以数据 group by 年-月,20222-12 到 2024-12-31 的,然后内存在聚合出 CrmStatisticsPerformanceRespVO 这样 // 这样,我们就可以减少数据库的计算量,提升性能;同时 SQL 也会很简单,开发者理解起来也简单哈; @@ -57,6 +57,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform return getPerformance(performanceReqVO, performanceMapper::selectReceivablePricePerformance); } + // TODO @scholar:代码注释,应该有 3 个变量哈; /** * 获得员工业绩数据 * @@ -64,9 +65,11 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform * @param performanceFunction 员工业绩统计方法 * @return 员工业绩数据 */ + // TODO @scholar:下面一行的变量,超过一行了,阅读不美观;可以考虑每一行一个变量; private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, Function> performanceFunction) { + // TODO @scholar:没使用到的变量,建议删除; List performanceRespVOList; // 1. 获得用户编号数组 @@ -75,10 +78,15 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform return Collections.emptyList(); } performanceReqVO.setUserIds(userIds); + // TODO @scholar:1. 和 2. 之间,可以考虑换一行;保证每一块逻辑的间隔; // 2. 获得业绩数据 + // TODO @scholar:复数变量,建议使用 s 或者 list 结果;这里用 performanceList 好列; List performance = performanceFunction.apply(performanceReqVO); // 获取查询的年份 + // TODO @scholar:逻辑可以简化一下; + // TODO 1)把 performance 转换成 map;key 是 time,value 是 count + // TODO 2)当前年,遍历 1-12 月份,去 map 拿到 count;接着月份 -1,去 map 拿 count;再年份 -1,拿 count String currentYear = LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"); // 构造查询当年和前一年,每年12个月的年月组合 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml index ee9ec4e445..79ff454719 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml @@ -5,20 +5,23 @@ + +
-密码:
- - - - -- Gitee From 06dacb747bf151c3880b52ee583b8e3ef27a2032 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Tue, 30 Apr 2024 23:41:25 +0800 Subject: [PATCH 0424/1557] =?UTF-8?q?feat:=20Oracle=E6=95=B0=E6=8D=AE=20DD?= =?UTF-8?q?L=20=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/{ => docker}/docker-compose.yaml | 14 +- .../oracle/1_create_user.sql | 2 - .../oracle/2_create_schema.sh | 0 .../sqlserver/create_schema.sh | 0 sql/oracle/ruoyi-vue-pro.sql | 12083 ++++++++-------- .../src/main/resources/application-local.yaml | 11 +- 6 files changed, 5937 insertions(+), 6173 deletions(-) rename sql/{ => docker}/docker-compose.yaml (76%) rename sql/{_docker => docker}/oracle/1_create_user.sql (98%) rename sql/{_docker => docker}/oracle/2_create_schema.sh (100%) rename sql/{_docker => docker}/sqlserver/create_schema.sh (100%) diff --git a/sql/docker-compose.yaml b/sql/docker/docker-compose.yaml similarity index 76% rename from sql/docker-compose.yaml rename to sql/docker/docker-compose.yaml index f9d78dd4d6..64e578ff0c 100644 --- a/sql/docker-compose.yaml +++ b/sql/docker/docker-compose.yaml @@ -38,8 +38,8 @@ services: volumes: - postgres:/var/lib/postgresql/data # 注入初始化脚本 - - ./postgresql/quartz.sql:/docker-entrypoint-initdb.d/quartz.sql:ro - - ./postgresql/ruoyi-vue-pro.sql:/docker-entrypoint-initdb.d/ruoyi-vue-pro.sql:ro + - ../postgresql/quartz.sql:/docker-entrypoint-initdb.d/quartz.sql:ro + - ../postgresql/ruoyi-vue-pro.sql:/docker-entrypoint-initdb.d/ruoyi-vue-pro.sql:ro oracle: image: gvenzl/oracle-xe:18-slim-faststart @@ -49,10 +49,10 @@ services: ports: - "1521:1521" volumes: - - ./oracle/ruoyi-vue-pro.sql:/tmp/schema.sql:ro + - ../oracle/ruoyi-vue-pro.sql:/tmp/schema.sql:ro # 创建app用户: ROOT/123456@//localhost/XEPDB1 - - ./_docker/oracle/1_create_user.sql:/docker-entrypoint-initdb.d/1_create_user.sql:ro - - ./_docker/oracle/2_create_schema.sh:/docker-entrypoint-initdb.d/2_create_schema.sh:ro + - ./oracle/1_create_user.sql:/docker-entrypoint-initdb.d/1_create_user.sql:ro + - ./oracle/2_create_schema.sh:/docker-entrypoint-initdb.d/2_create_schema.sh:ro sqlserver: image: mcr.microsoft.com/mssql/server:2017-latest @@ -65,6 +65,6 @@ services: - "1433:1433" volumes: - sqlserver:/var/opt/mssql - - ./sqlserver/ruoyi-vue-pro.sql:/tmp/schema.sql:ro + - ../sqlserver/ruoyi-vue-pro.sql:/tmp/schema.sql:ro # docker compose exec sqlserver bash /tmp/create_schema.sh - - ./_docker/sqlserver/create_schema.sh:/tmp/create_schema.sh:ro + - ./sqlserver/create_schema.sh:/tmp/create_schema.sh:ro diff --git a/sql/_docker/oracle/1_create_user.sql b/sql/docker/oracle/1_create_user.sql similarity index 98% rename from sql/_docker/oracle/1_create_user.sql rename to sql/docker/oracle/1_create_user.sql index 5589e0d711..58c96585ed 100644 --- a/sql/_docker/oracle/1_create_user.sql +++ b/sql/docker/oracle/1_create_user.sql @@ -1,5 +1,3 @@ ALTER SESSION SET CONTAINER=XEPDB1; - CREATE USER ROOT IDENTIFIED BY 123456 QUOTA UNLIMITED ON USERS; - GRANT CONNECT, RESOURCE TO ROOT; diff --git a/sql/_docker/oracle/2_create_schema.sh b/sql/docker/oracle/2_create_schema.sh similarity index 100% rename from sql/_docker/oracle/2_create_schema.sh rename to sql/docker/oracle/2_create_schema.sh diff --git a/sql/_docker/sqlserver/create_schema.sh b/sql/docker/sqlserver/create_schema.sh similarity index 100% rename from sql/_docker/sqlserver/create_schema.sh rename to sql/docker/sqlserver/create_schema.sh diff --git a/sql/oracle/ruoyi-vue-pro.sql b/sql/oracle/ruoyi-vue-pro.sql index dbe0e6a7b6..ca79b5ed04 100644 --- a/sql/oracle/ruoyi-vue-pro.sql +++ b/sql/oracle/ruoyi-vue-pro.sql @@ -1,6229 +1,5994 @@ -/* - Navicat Premium Data Transfer - - Source Server : 127.0.0.1 Oracle - Source Server Type : Oracle - Source Server Version : 110200 - Source Host : 127.0.0.1:1521 - Source Schema : ROOT - - Target Server Type : Oracle - Target Server Version : 110200 - File Encoding : 65001 - - Date: 15/06/2022 08:20:08 -*/ - - --- ---------------------------- --- Table structure for BPM_FORM --- ---------------------------- -DROP TABLE "BPM_FORM"; -CREATE TABLE "BPM_FORM" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(64), - "STATUS" NUMBER(4,0) NOT NULL, - "CONF" NVARCHAR2(1000), - "FIELDS" NCLOB, - "REMARK" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_FORM"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_FORM"."NAME" IS '表单名'; -COMMENT ON COLUMN "BPM_FORM"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "BPM_FORM"."CONF" IS '表单的配置'; -COMMENT ON COLUMN "BPM_FORM"."FIELDS" IS '表单项的数组'; -COMMENT ON COLUMN "BPM_FORM"."REMARK" IS '备注'; -COMMENT ON COLUMN "BPM_FORM"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_FORM"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_FORM"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_FORM"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_FORM"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_FORM"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_FORM" IS '工作流的表单定义'; - --- ---------------------------- --- Records of BPM_FORM --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_OA_LEAVE --- ---------------------------- -DROP TABLE "BPM_OA_LEAVE"; -CREATE TABLE "BPM_OA_LEAVE" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "REASON" NVARCHAR2(200), - "START_TIME" DATE NOT NULL, - "END_TIME" DATE NOT NULL, - "DAY" NUMBER(4,0) NOT NULL, - "RESULT" NUMBER(4,0) NOT NULL, - "PROCESS_INSTANCE_ID" NVARCHAR2(64), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_OA_LEAVE"."ID" IS '请假表单主键'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."USER_ID" IS '申请人的用户编号'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."TYPE" IS '请假类型'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."REASON" IS '请假原因'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."START_TIME" IS '开始时间'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."END_TIME" IS '结束时间'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."DAY" IS '请假天数'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."RESULT" IS '请假结果'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_OA_LEAVE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_OA_LEAVE" IS 'OA 请假申请表'; - --- ---------------------------- --- Records of BPM_OA_LEAVE --- ---------------------------- -INSERT INTO "BPM_OA_LEAVE" ("ID", "USER_ID", "TYPE", "REASON", "START_TIME", "END_TIME", "DAY", "RESULT", "PROCESS_INSTANCE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', '1', '2', '123', TO_DATE('2022-05-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-05-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '9', '2', '64394b8d-c947-11ec-a43c-3e2374911326', '1', TO_DATE('2022-05-01 20:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 20:30:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_PROCESS_DEFINITION_EXT --- ---------------------------- -DROP TABLE "BPM_PROCESS_DEFINITION_EXT"; -CREATE TABLE "BPM_PROCESS_DEFINITION_EXT" ( - "ID" NUMBER(20,0) NOT NULL, - "PROCESS_DEFINITION_ID" NVARCHAR2(64), - "MODEL_ID" NVARCHAR2(64), - "DESCRIPTION" NVARCHAR2(255), - "FORM_TYPE" NUMBER(4,0) NOT NULL, - "FORM_ID" NUMBER(20,0), - "FORM_CONF" NVARCHAR2(1000), - "FORM_FIELDS" NCLOB, - "FORM_CUSTOM_CREATE_PATH" NVARCHAR2(255), - "FORM_CUSTOM_VIEW_PATH" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."MODEL_ID" IS '流程模型的编号'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."DESCRIPTION" IS '描述'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_TYPE" IS '表单类型'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_ID" IS '表单编号'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_CONF" IS '表单的配置'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_FIELDS" IS '表单项的数组'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_CUSTOM_CREATE_PATH" IS '自定义表单的提交路径'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."FORM_CUSTOM_VIEW_PATH" IS '自定义表单的查看路径'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_PROCESS_DEFINITION_EXT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_PROCESS_DEFINITION_EXT" IS 'Bpm 流程定义的拓展表 -'; - --- ---------------------------- --- Records of BPM_PROCESS_DEFINITION_EXT --- ---------------------------- -INSERT INTO "BPM_PROCESS_DEFINITION_EXT" ("ID", "PROCESS_DEFINITION_ID", "MODEL_ID", "DESCRIPTION", "FORM_TYPE", "FORM_ID", "FORM_CONF", "FORM_FIELDS", "FORM_CUSTOM_CREATE_PATH", "FORM_CUSTOM_VIEW_PATH", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', 'oa_leave:1:5b8f470c-c947-11ec-a43c-3e2374911326', 'd0d2e04c-c945-11ec-baf6-3e2374911326', NULL, '20', NULL, NULL, NULL, '/bpm/oa/leave/create', '/bpm/oa/leave/detail', '1', TO_DATE('2022-05-01 20:08:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 20:08:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_PROCESS_INSTANCE_EXT --- ---------------------------- -DROP TABLE "BPM_PROCESS_INSTANCE_EXT"; -CREATE TABLE "BPM_PROCESS_INSTANCE_EXT" ( - "ID" NUMBER(20,0) NOT NULL, - "START_USER_ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(64), - "PROCESS_INSTANCE_ID" NVARCHAR2(64), - "PROCESS_DEFINITION_ID" NVARCHAR2(64), - "CATEGORY" NVARCHAR2(64), - "STATUS" NUMBER(4,0) NOT NULL, - "RESULT" NUMBER(4,0) NOT NULL, - "END_TIME" DATE, - "FORM_VARIABLES" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."START_USER_ID" IS '发起流程的用户编号'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."NAME" IS '流程实例的名字'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."CATEGORY" IS '流程分类'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."STATUS" IS '流程实例的状态'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."RESULT" IS '流程实例的结果'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."END_TIME" IS '结束时间'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."FORM_VARIABLES" IS '表单值'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_PROCESS_INSTANCE_EXT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_PROCESS_INSTANCE_EXT" IS '工作流的流程实例的拓展'; - -- ---------------------------- --- Records of BPM_PROCESS_INSTANCE_EXT --- ---------------------------- -INSERT INTO "BPM_PROCESS_INSTANCE_EXT" ("ID", "START_USER_ID", "NAME", "PROCESS_INSTANCE_ID", "PROCESS_DEFINITION_ID", "CATEGORY", "STATUS", "RESULT", "END_TIME", "FORM_VARIABLES", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', '1', 'OA 请假', '64394b8d-c947-11ec-a43c-3e2374911326', 'oa_leave:1:5b8f470c-c947-11ec-a43c-3e2374911326', '2', '2', '2', TO_DATE('2022-05-01 20:30:02', 'SYYYY-MM-DD HH24:MI:SS'), '{"day":9}', '1', TO_DATE('2022-05-01 20:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 20:30:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_TASK_ASSIGN_RULE --- ---------------------------- -DROP TABLE "BPM_TASK_ASSIGN_RULE"; -CREATE TABLE "BPM_TASK_ASSIGN_RULE" ( - "ID" NUMBER(20,0) NOT NULL, - "MODEL_ID" NVARCHAR2(64), - "PROCESS_DEFINITION_ID" NVARCHAR2(64) DEFAULT '', - "TASK_DEFINITION_KEY" NVARCHAR2(64) DEFAULT '', - "TYPE" NUMBER(4,0) NOT NULL, - "OPTIONS" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."MODEL_ID" IS '流程模型的编号'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."TASK_DEFINITION_KEY" IS '流程任务定义的 key'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."TYPE" IS '规则类型'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."OPTIONS" IS '规则值,JSON 数组'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_TASK_ASSIGN_RULE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_TASK_ASSIGN_RULE" IS 'Bpm 任务规则表'; - --- ---------------------------- --- Records of BPM_TASK_ASSIGN_RULE --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_TASK_EXT --- ---------------------------- -DROP TABLE "BPM_TASK_EXT"; -CREATE TABLE "BPM_TASK_EXT" ( - "ID" NUMBER(20,0) NOT NULL, - "ASSIGNEE_USER_ID" NUMBER(20,0), - "NAME" NVARCHAR2(64), - "TASK_ID" NVARCHAR2(64), - "RESULT" NUMBER(4,0) NOT NULL, - "REASON" NVARCHAR2(255), - "END_TIME" DATE, - "PROCESS_INSTANCE_ID" NVARCHAR2(64), - "PROCESS_DEFINITION_ID" NVARCHAR2(64), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_TASK_EXT"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_TASK_EXT"."ASSIGNEE_USER_ID" IS '任务的审批人'; -COMMENT ON COLUMN "BPM_TASK_EXT"."NAME" IS '任务的名字'; -COMMENT ON COLUMN "BPM_TASK_EXT"."TASK_ID" IS '任务的编号'; -COMMENT ON COLUMN "BPM_TASK_EXT"."RESULT" IS '任务的结果'; -COMMENT ON COLUMN "BPM_TASK_EXT"."REASON" IS '审批建议'; -COMMENT ON COLUMN "BPM_TASK_EXT"."END_TIME" IS '任务的结束时间'; -COMMENT ON COLUMN "BPM_TASK_EXT"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; -COMMENT ON COLUMN "BPM_TASK_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; -COMMENT ON COLUMN "BPM_TASK_EXT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_TASK_EXT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_TASK_EXT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_TASK_EXT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_TASK_EXT"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_TASK_EXT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_TASK_EXT" IS '工作流的流程任务的拓展表'; - --- ---------------------------- --- Records of BPM_TASK_EXT --- ---------------------------- -INSERT INTO "BPM_TASK_EXT" ("ID", "ASSIGNEE_USER_ID", "NAME", "TASK_ID", "RESULT", "REASON", "END_TIME", "PROCESS_INSTANCE_ID", "PROCESS_DEFINITION_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', '1', 'task01', '6445a7a5-c947-11ec-a43c-3e2374911326', '2', '123', TO_DATE('2022-05-01 20:30:02', 'SYYYY-MM-DD HH24:MI:SS'), '64394b8d-c947-11ec-a43c-3e2374911326', 'oa_leave:1:5b8f470c-c947-11ec-a43c-3e2374911326', '1', TO_DATE('2022-05-01 20:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 20:30:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for BPM_USER_GROUP --- ---------------------------- -DROP TABLE "BPM_USER_GROUP"; -CREATE TABLE "BPM_USER_GROUP" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(30), - "DESCRIPTION" NVARCHAR2(255), - "MEMBER_USER_IDS" NCLOB NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "BPM_USER_GROUP"."ID" IS '编号'; -COMMENT ON COLUMN "BPM_USER_GROUP"."NAME" IS '组名'; -COMMENT ON COLUMN "BPM_USER_GROUP"."DESCRIPTION" IS '描述'; -COMMENT ON COLUMN "BPM_USER_GROUP"."MEMBER_USER_IDS" IS '成员编号数组'; -COMMENT ON COLUMN "BPM_USER_GROUP"."STATUS" IS '状态(0正常 1停用)'; -COMMENT ON COLUMN "BPM_USER_GROUP"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "BPM_USER_GROUP"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BPM_USER_GROUP"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "BPM_USER_GROUP"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BPM_USER_GROUP"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "BPM_USER_GROUP"."DELETED" IS '是否删除'; -COMMENT ON TABLE "BPM_USER_GROUP" IS '用户组'; - --- ---------------------------- --- Records of BPM_USER_GROUP --- ---------------------------- -COMMIT; -COMMIT; +-- infra_api_access_log +-- ------------------------------ +CREATE TABLE infra_api_access_log +( + id number NOT NULL, + trace_id varchar2(64) DEFAULT '' NULL, + user_id number DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + application_name varchar2(50) NOT NULL, + request_method varchar2(16) DEFAULT '' NULL, + request_url varchar2(255) DEFAULT '' NULL, + request_params clob NULL, + response_body clob NULL, + user_ip varchar2(50) NOT NULL, + user_agent varchar2(512) NOT NULL, + operate_module varchar2(50) DEFAULT NULL NULL, + operate_name varchar2(50) DEFAULT NULL NULL, + operate_type smallint DEFAULT 0 NULL, + begin_time date NOT NULL, + end_time date NOT NULL, + duration number NOT NULL, + result_code number DEFAULT 0 NOT NULL, + result_msg varchar2(512) DEFAULT '' NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_API_ACCESS_LOG --- ---------------------------- -DROP TABLE "INFRA_API_ACCESS_LOG"; -CREATE TABLE "INFRA_API_ACCESS_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "TRACE_ID" NVARCHAR2(64), - "USER_ID" NUMBER(20,0) DEFAULT 0 NOT NULL, - "USER_TYPE" NUMBER(4,0) DEFAULT 0 NOT NULL, - "APPLICATION_NAME" NVARCHAR2(50), - "REQUEST_METHOD" NVARCHAR2(16), - "REQUEST_URL" NVARCHAR2(255), - "REQUEST_PARAMS" NCLOB, - "USER_IP" NVARCHAR2(50), - "USER_AGENT" NVARCHAR2(512), - "BEGIN_TIME" DATE NOT NULL, - "END_TIME" DATE NOT NULL, - "DURATION" NUMBER(11,0) NOT NULL, - "RESULT_CODE" NUMBER(11,0) NOT NULL, - "RESULT_MSG" NVARCHAR2(512), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."ID" IS '日志主键'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."TRACE_ID" IS '链路追踪编号'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."APPLICATION_NAME" IS '应用名'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."REQUEST_METHOD" IS '请求方法名'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."REQUEST_URL" IS '请求地址'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."REQUEST_PARAMS" IS '请求参数'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."USER_AGENT" IS '浏览器 UA'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."BEGIN_TIME" IS '开始请求时间'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."END_TIME" IS '结束请求时间'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."DURATION" IS '执行时长'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."RESULT_CODE" IS '结果码'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."RESULT_MSG" IS '结果提示'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_API_ACCESS_LOG"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "INFRA_API_ACCESS_LOG" IS 'API 访问日志表'; +ALTER TABLE infra_api_access_log + ADD CONSTRAINT pk_infra_api_access_log PRIMARY KEY (id); + +CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); + +COMMENT ON COLUMN infra_api_access_log.id IS '日志主键'; +COMMENT ON COLUMN infra_api_access_log.user_id IS '用户编号'; +COMMENT ON COLUMN infra_api_access_log.user_type IS '用户类型'; +COMMENT ON COLUMN infra_api_access_log.application_name IS '应用名'; +COMMENT ON COLUMN infra_api_access_log.request_params IS '请求参数'; +COMMENT ON COLUMN infra_api_access_log.response_body IS '响应结果'; +COMMENT ON COLUMN infra_api_access_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN infra_api_access_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN infra_api_access_log.operate_module IS '操作模块'; +COMMENT ON COLUMN infra_api_access_log.operate_name IS '操作名'; +COMMENT ON COLUMN infra_api_access_log.operate_type IS '操作分类'; +COMMENT ON COLUMN infra_api_access_log.begin_time IS '开始请求时间'; +COMMENT ON COLUMN infra_api_access_log.end_time IS '结束请求时间'; +COMMENT ON COLUMN infra_api_access_log.duration IS '执行时长'; +COMMENT ON COLUMN infra_api_access_log.result_code IS '结果码'; +COMMENT ON COLUMN infra_api_access_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_access_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; + +CREATE SEQUENCE infra_api_access_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_api_error_log +-- ------------------------------ +CREATE TABLE infra_api_error_log +( + id number NOT NULL, + trace_id varchar2(64) NOT NULL, + user_id number DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + application_name varchar2(50) NOT NULL, + request_method varchar2(16) NOT NULL, + request_url varchar2(255) NOT NULL, + request_params varchar2(4000) NOT NULL, + user_ip varchar2(50) NOT NULL, + user_agent varchar2(512) NOT NULL, + exception_time date NOT NULL, + exception_name varchar2(128) DEFAULT '' NULL, + exception_message clob NOT NULL, + exception_root_cause_message clob NOT NULL, + exception_stack_trace clob NOT NULL, + exception_class_name varchar2(512) NOT NULL, + exception_file_name varchar2(512) NOT NULL, + exception_method_name varchar2(512) NOT NULL, + exception_line_number number NOT NULL, + process_status smallint NOT NULL, + process_time date DEFAULT NULL NULL, + process_user_id number DEFAULT 0 NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_API_ACCESS_LOG --- ---------------------------- -INSERT INTO "INFRA_API_ACCESS_LOG" ("ID", "TRACE_ID", "USER_ID", "USER_TYPE", "APPLICATION_NAME", "REQUEST_METHOD", "REQUEST_URL", "REQUEST_PARAMS", "USER_IP", "USER_AGENT", "BEGIN_TIME", "END_TIME", "DURATION", "RESULT_CODE", "RESULT_MSG", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', NULL, '0', '2', 'yudao-server', 'GET', '/admin-api/system/dict-data/list-all-simple', '{"query":{},"body":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36', TO_DATE('2022-05-13 01:26:54', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-05-13 01:26:54', 'SYYYY-MM-DD HH24:MI:SS'), '94', '0', NULL, NULL, TO_DATE('2022-05-13 01:26:54', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-13 01:26:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; +ALTER TABLE infra_api_error_log + ADD CONSTRAINT pk_infra_api_error_log PRIMARY KEY (id); --- ---------------------------- --- Table structure for INFRA_API_ERROR_LOG --- ---------------------------- -DROP TABLE "INFRA_API_ERROR_LOG"; -CREATE TABLE "INFRA_API_ERROR_LOG" ( - "ID" NUMBER(11,0) NOT NULL, - "TRACE_ID" NVARCHAR2(64), - "USER_ID" NUMBER(11,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "APPLICATION_NAME" NVARCHAR2(50), - "REQUEST_METHOD" NVARCHAR2(16), - "REQUEST_URL" NVARCHAR2(255), - "REQUEST_PARAMS" NCLOB, - "USER_IP" NVARCHAR2(50), - "USER_AGENT" NVARCHAR2(512), - "EXCEPTION_TIME" DATE NOT NULL, - "EXCEPTION_NAME" NVARCHAR2(128), - "EXCEPTION_MESSAGE" NCLOB NOT NULL, - "EXCEPTION_ROOT_CAUSE_MESSAGE" NCLOB NOT NULL, - "EXCEPTION_STACK_TRACE" NCLOB NOT NULL, - "EXCEPTION_CLASS_NAME" NVARCHAR2(512), - "EXCEPTION_FILE_NAME" NVARCHAR2(512), - "EXCEPTION_METHOD_NAME" NVARCHAR2(512), - "EXCEPTION_LINE_NUMBER" NUMBER(11,0) NOT NULL, - "PROCESS_STATUS" NUMBER(4,0) NOT NULL, - "PROCESS_TIME" DATE, - "PROCESS_USER_ID" NUMBER(11,0), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."TRACE_ID" IS '链路追踪编号 +COMMENT ON COLUMN infra_api_error_log.id IS '编号'; +COMMENT ON COLUMN infra_api_error_log.trace_id IS '链路追踪编号 * * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."APPLICATION_NAME" IS '应用名 +COMMENT ON COLUMN infra_api_error_log.user_id IS '用户编号'; +COMMENT ON COLUMN infra_api_error_log.user_type IS '用户类型'; +COMMENT ON COLUMN infra_api_error_log.application_name IS '应用名 * * 目前读取 spring.application.name'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."REQUEST_METHOD" IS '请求方法名'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."REQUEST_URL" IS '请求地址'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."REQUEST_PARAMS" IS '请求参数'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."USER_AGENT" IS '浏览器 UA'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_TIME" IS '异常发生时间'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_NAME" IS '异常名 - * - * {@link Throwable#getClass()} 的类全名'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_MESSAGE" IS '异常导致的消息 +COMMENT ON COLUMN infra_api_error_log.request_method IS '请求方法名'; +COMMENT ON COLUMN infra_api_error_log.request_url IS '请求地址'; +COMMENT ON COLUMN infra_api_error_log.request_params IS '请求参数'; +COMMENT ON COLUMN infra_api_error_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN infra_api_error_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN infra_api_error_log.exception_time IS '异常发生时间'; +COMMENT ON COLUMN infra_api_error_log.exception_message IS '异常导致的消息 * * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_ROOT_CAUSE_MESSAGE" IS '异常导致的根消息 +COMMENT ON COLUMN infra_api_error_log.exception_root_cause_message IS '异常导致的根消息 * * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_STACK_TRACE" IS '异常的栈轨迹 +COMMENT ON COLUMN infra_api_error_log.exception_stack_trace IS '异常的栈轨迹 * * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_CLASS_NAME" IS '异常发生的类全名 +COMMENT ON COLUMN infra_api_error_log.exception_class_name IS '异常发生的类全名 * * {@link StackTraceElement#getClassName()}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_FILE_NAME" IS '异常发生的类文件 +COMMENT ON COLUMN infra_api_error_log.exception_file_name IS '异常发生的类文件 * * {@link StackTraceElement#getFileName()}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_METHOD_NAME" IS '异常发生的方法名 +COMMENT ON COLUMN infra_api_error_log.exception_method_name IS '异常发生的方法名 * * {@link StackTraceElement#getMethodName()}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."EXCEPTION_LINE_NUMBER" IS '异常发生的方法所在行 +COMMENT ON COLUMN infra_api_error_log.exception_line_number IS '异常发生的方法所在行 * * {@link StackTraceElement#getLineNumber()}'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."PROCESS_STATUS" IS '处理状态'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."PROCESS_TIME" IS '处理时间'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."PROCESS_USER_ID" IS '处理用户编号'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_API_ERROR_LOG"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "INFRA_API_ERROR_LOG" IS '系统异常日志'; +COMMENT ON COLUMN infra_api_error_log.process_status IS '处理状态'; +COMMENT ON COLUMN infra_api_error_log.process_time IS '处理时间'; +COMMENT ON COLUMN infra_api_error_log.process_user_id IS '处理用户编号'; +COMMENT ON COLUMN infra_api_error_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_error_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; + +CREATE SEQUENCE infra_api_error_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_codegen_column +-- ------------------------------ +CREATE TABLE infra_codegen_column +( + id number NOT NULL, + table_id number NOT NULL, + column_name varchar2(200) NOT NULL, + data_type varchar2(100) NOT NULL, + column_comment varchar2(500) NOT NULL, + nullable number(1, 0) NOT NULL, + primary_key number(1, 0) NOT NULL, + ordinal_position number NOT NULL, + java_type varchar2(32) NOT NULL, + java_field varchar2(64) NOT NULL, + dict_type varchar2(200) DEFAULT '' NULL, + example varchar2(64) DEFAULT NULL NULL, + create_operation number(1, 0) NOT NULL, + update_operation number(1, 0) NOT NULL, + list_operation number(1, 0) NOT NULL, + list_operation_condition varchar2(32) DEFAULT '=' NOT NULL, + list_operation_result number(1, 0) NOT NULL, + html_type varchar2(32) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_API_ERROR_LOG --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE infra_codegen_column + ADD CONSTRAINT pk_infra_codegen_column PRIMARY KEY (id); + +COMMENT ON COLUMN infra_codegen_column.id IS '编号'; +COMMENT ON COLUMN infra_codegen_column.table_id IS '表编号'; +COMMENT ON COLUMN infra_codegen_column.column_name IS '字段名'; +COMMENT ON COLUMN infra_codegen_column.data_type IS '字段类型'; +COMMENT ON COLUMN infra_codegen_column.column_comment IS '字段描述'; +COMMENT ON COLUMN infra_codegen_column.nullable IS '是否允许为空'; +COMMENT ON COLUMN infra_codegen_column.primary_key IS '是否主键'; +COMMENT ON COLUMN infra_codegen_column.ordinal_position IS '排序'; +COMMENT ON COLUMN infra_codegen_column.java_type IS 'Java 属性类型'; +COMMENT ON COLUMN infra_codegen_column.java_field IS 'Java 属性名'; +COMMENT ON COLUMN infra_codegen_column.example IS '数据示例'; +COMMENT ON COLUMN infra_codegen_column.create_operation IS '是否为 Create 创建操作的字段'; +COMMENT ON COLUMN infra_codegen_column.update_operation IS '是否为 Update 更新操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation IS '是否为 List 查询操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation_result IS '是否为 List 查询操作的返回字段'; +COMMENT ON COLUMN infra_codegen_column.html_type IS '显示类型'; +COMMENT ON COLUMN infra_codegen_column.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; +COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; + +CREATE SEQUENCE infra_codegen_column_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_codegen_table +-- ------------------------------ +CREATE TABLE infra_codegen_table +( + id number NOT NULL, + data_source_config_id number NOT NULL, + scene smallint DEFAULT 1 NOT NULL, + table_name varchar2(200) DEFAULT '' NULL, + table_comment varchar2(500) DEFAULT '' NULL, + remark varchar2(500) DEFAULT NULL NULL, + module_name varchar2(30) NOT NULL, + business_name varchar2(30) NOT NULL, + class_name varchar2(100) DEFAULT '' NULL, + class_comment varchar2(50) NOT NULL, + author varchar2(50) NOT NULL, + template_type smallint DEFAULT 1 NOT NULL, + front_type smallint NOT NULL, + parent_menu_id number DEFAULT NULL NULL, + master_table_id number DEFAULT NULL NULL, + sub_join_column_id number DEFAULT NULL NULL, + sub_join_many number(1, 0) DEFAULT NULL NULL, + tree_parent_column_id number DEFAULT NULL NULL, + tree_name_column_id number DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_CODEGEN_COLUMN --- ---------------------------- -DROP TABLE "INFRA_CODEGEN_COLUMN"; -CREATE TABLE "INFRA_CODEGEN_COLUMN" ( - "ID" NUMBER(20,0) NOT NULL, - "TABLE_ID" NUMBER(20,0) NOT NULL, - "COLUMN_NAME" NVARCHAR2(200), - "DATA_TYPE" NVARCHAR2(100), - "COLUMN_COMMENT" NVARCHAR2(500), - "NULLABLE" NUMBER(4,0), - "PRIMARY_KEY" NUMBER(4,0), - "ORDINAL_POSITION" NUMBER(11,0) NOT NULL, - "JAVA_TYPE" NVARCHAR2(32), - "JAVA_FIELD" NVARCHAR2(64), - "DICT_TYPE" NVARCHAR2(200), - "EXAMPLE" NVARCHAR2(64), - "CREATE_OPERATION" NUMBER(4,0), - "UPDATE_OPERATION" NUMBER(4,0), - "LIST_OPERATION" NUMBER(4,0), - "LIST_OPERATION_CONDITION" NVARCHAR2(32) NOT NULL, - "LIST_OPERATION_RESULT" NUMBER(4,0), - "HTML_TYPE" NVARCHAR2(32), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."TABLE_ID" IS '表编号'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."COLUMN_NAME" IS '字段名'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."DATA_TYPE" IS '字段类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."COLUMN_COMMENT" IS '字段描述'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."NULLABLE" IS '是否允许为空'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."PRIMARY_KEY" IS '是否主键'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."ORDINAL_POSITION" IS '排序'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."JAVA_TYPE" IS 'Java 属性类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."JAVA_FIELD" IS 'Java 属性名'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."DICT_TYPE" IS '字典类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."EXAMPLE" IS '数据示例'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."CREATE_OPERATION" IS '是否为 Create 创建操作的字段'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."UPDATE_OPERATION" IS '是否为 Update 更新操作的字段'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."LIST_OPERATION" IS '是否为 List 查询操作的字段'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."LIST_OPERATION_CONDITION" IS 'List 查询操作的条件类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."LIST_OPERATION_RESULT" IS '是否为 List 查询操作的返回字段'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."HTML_TYPE" IS '显示类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_CODEGEN_COLUMN" IS '代码生成表字段定义'; +ALTER TABLE infra_codegen_table + ADD CONSTRAINT pk_infra_codegen_table PRIMARY KEY (id); + +COMMENT ON COLUMN infra_codegen_table.id IS '编号'; +COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS '数据源配置的编号'; +COMMENT ON COLUMN infra_codegen_table.scene IS '生成场景'; +COMMENT ON COLUMN infra_codegen_table.remark IS '备注'; +COMMENT ON COLUMN infra_codegen_table.module_name IS '模块名'; +COMMENT ON COLUMN infra_codegen_table.business_name IS '业务名'; +COMMENT ON COLUMN infra_codegen_table.class_comment IS '类描述'; +COMMENT ON COLUMN infra_codegen_table.author IS '作者'; +COMMENT ON COLUMN infra_codegen_table.template_type IS '模板类型'; +COMMENT ON COLUMN infra_codegen_table.front_type IS '前端类型'; +COMMENT ON COLUMN infra_codegen_table.parent_menu_id IS '父菜单编号'; +COMMENT ON COLUMN infra_codegen_table.master_table_id IS '主表的编号'; +COMMENT ON COLUMN infra_codegen_table.sub_join_column_id IS '子表关联主表的字段编号'; +COMMENT ON COLUMN infra_codegen_table.sub_join_many IS '主表与子表是否一对多'; +COMMENT ON COLUMN infra_codegen_table.tree_parent_column_id IS '树表的父字段编号'; +COMMENT ON COLUMN infra_codegen_table.tree_name_column_id IS '树表的名字字段编号'; +COMMENT ON COLUMN infra_codegen_table.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; +COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; + +CREATE SEQUENCE infra_codegen_table_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_config +-- ------------------------------ +CREATE TABLE infra_config +( + id number NOT NULL, + category varchar2(50) NOT NULL, + type smallint NOT NULL, + name varchar2(100) DEFAULT '' NULL, + config_key varchar2(100) DEFAULT '' NULL, + value varchar2(500) DEFAULT '' NULL, + visible number(1, 0) NOT NULL, + remark varchar2(500) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_CODEGEN_COLUMN --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE infra_config + ADD CONSTRAINT pk_infra_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_config.id IS '参数主键'; +COMMENT ON COLUMN infra_config.category IS '参数分组'; +COMMENT ON COLUMN infra_config.type IS '参数类型'; +COMMENT ON COLUMN infra_config.visible IS '是否可见'; +COMMENT ON COLUMN infra_config.remark IS '备注'; +COMMENT ON COLUMN infra_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_config.update_time IS '更新时间'; +COMMENT ON TABLE infra_config IS '参数配置表'; + +-- @formatter:off +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', '0', '初始化密码 123456', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-03 17:22:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', '1', '', '1', to_date('2023-04-07 13:41:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-07 14:33:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 'url', 2, 'SkyWalking 监控的地址', 'url.skywalking', '', '1', '', '1', to_date('2023-04-07 13:41:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-07 14:57:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 'url', 2, 'Spring Boot Admin 监控的地址', 'url.spring-boot-admin', '', '1', '', '1', to_date('2023-04-07 13:41:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-07 14:52:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (10, 'url', 2, 'Swagger 接口文档的地址', 'url.swagger', '', '1', '', '1', to_date('2023-04-07 13:41:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-07 14:59:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (11, 'ui', 2, '腾讯地图 key', 'tencent.lbs.key', 'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E', '1', '腾讯地图 key', '1', to_date('2023-06-03 19:16:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-03 19:16:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 'test2', 2, 'test3', 'test4', 'test5', '1', 'test6', '1', to_date('2023-12-03 09:55:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-03 09:55:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_config_seq + START WITH 13 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_data_source_config +-- ------------------------------ +CREATE TABLE infra_data_source_config +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + url varchar2(1024) NOT NULL, + username varchar2(255) NOT NULL, + password varchar2(255) DEFAULT '' NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_CODEGEN_TABLE --- ---------------------------- -DROP TABLE "INFRA_CODEGEN_TABLE"; -CREATE TABLE "INFRA_CODEGEN_TABLE" ( - "ID" NUMBER(20,0) NOT NULL, - "DATA_SOURCE_CONFIG_ID" NUMBER NOT NULL, - "SCENE" NUMBER(4,0) NOT NULL, - "TABLE_NAME" NVARCHAR2(200), - "TABLE_COMMENT" NVARCHAR2(500), - "REMARK" NVARCHAR2(500), - "MODULE_NAME" NVARCHAR2(30), - "BUSINESS_NAME" NVARCHAR2(30), - "CLASS_NAME" NVARCHAR2(100), - "CLASS_COMMENT" NVARCHAR2(50), - "AUTHOR" NVARCHAR2(50), - "TEMPLATE_TYPE" NUMBER(4,0) NOT NULL, - "PARENT_MENU_ID" NUMBER(20,0), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."DATA_SOURCE_CONFIG_ID" IS '数据源配置的编号'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."SCENE" IS '生成场景'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."TABLE_NAME" IS '表名称'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."TABLE_COMMENT" IS '表描述'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."REMARK" IS '备注'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."MODULE_NAME" IS '模块名'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."BUSINESS_NAME" IS '业务名'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."CLASS_NAME" IS '类名称'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."CLASS_COMMENT" IS '类描述'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."AUTHOR" IS '作者'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."TEMPLATE_TYPE" IS '模板类型'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."PARENT_MENU_ID" IS '父菜单编号'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_CODEGEN_TABLE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_CODEGEN_TABLE" IS '代码生成表定义'; +ALTER TABLE infra_data_source_config + ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_data_source_config.id IS '主键编号'; +COMMENT ON COLUMN infra_data_source_config.url IS '数据源连接'; +COMMENT ON COLUMN infra_data_source_config.username IS '用户名'; +COMMENT ON COLUMN infra_data_source_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; +COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; + +CREATE SEQUENCE infra_data_source_config_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_demo01_contact +-- ------------------------------ +CREATE TABLE infra_demo01_contact +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday date NOT NULL, + description varchar2(255) NOT NULL, + avatar varchar2(512) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_CODEGEN_TABLE --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE infra_demo01_contact + ADD CONSTRAINT pk_infra_demo01_contact PRIMARY KEY (id); + +COMMENT ON COLUMN infra_demo01_contact.id IS '编号'; +COMMENT ON COLUMN infra_demo01_contact.sex IS '性别'; +COMMENT ON COLUMN infra_demo01_contact.birthday IS '出生年'; +COMMENT ON COLUMN infra_demo01_contact.description IS '简介'; +COMMENT ON COLUMN infra_demo01_contact.avatar IS '头像'; +COMMENT ON COLUMN infra_demo01_contact.create_time IS '创建时间'; +COMMENT ON COLUMN infra_demo01_contact.update_time IS '更新时间'; +COMMENT ON COLUMN infra_demo01_contact.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_demo01_contact IS '示例联系人表'; + +-- @formatter:off +INSERT INTO infra_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:47:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_demo01_contact_seq + START WITH 2 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_demo02_category +-- ------------------------------ +CREATE TABLE infra_demo02_category +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + parent_id number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_CONFIG --- ---------------------------- -DROP TABLE "INFRA_CONFIG"; -CREATE TABLE "INFRA_CONFIG" ( - "ID" NUMBER(11,0) NOT NULL, - "CATEGORY" NVARCHAR2(50), - "TYPE" NUMBER(4,0) NOT NULL, - "NAME" NVARCHAR2(100), - "CONFIG_KEY" NVARCHAR2(100), - "VALUE" NVARCHAR2(500), - "VISIBLE" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_CONFIG"."ID" IS '参数主键'; -COMMENT ON COLUMN "INFRA_CONFIG"."CATEGORY" IS '参数分组'; -COMMENT ON COLUMN "INFRA_CONFIG"."TYPE" IS '参数类型'; -COMMENT ON COLUMN "INFRA_CONFIG"."NAME" IS '参数名称'; -COMMENT ON COLUMN "INFRA_CONFIG"."CONFIG_KEY" IS '参数键名'; -COMMENT ON COLUMN "INFRA_CONFIG"."VALUE" IS '参数键值'; -COMMENT ON COLUMN "INFRA_CONFIG"."VISIBLE" IS '是否可见'; -COMMENT ON COLUMN "INFRA_CONFIG"."REMARK" IS '备注'; -COMMENT ON COLUMN "INFRA_CONFIG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_CONFIG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_CONFIG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_CONFIG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON TABLE "INFRA_CONFIG" IS '参数配置表'; +ALTER TABLE infra_demo02_category + ADD CONSTRAINT pk_infra_demo02_category PRIMARY KEY (id); + +COMMENT ON COLUMN infra_demo02_category.id IS '编号'; +COMMENT ON COLUMN infra_demo02_category.parent_id IS '父级编号'; +COMMENT ON COLUMN infra_demo02_category.create_time IS '创建时间'; +COMMENT ON COLUMN infra_demo02_category.update_time IS '更新时间'; +COMMENT ON COLUMN infra_demo02_category.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_demo02_category IS '示例分类表'; + +-- @formatter:off +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', to_date('2023-11-16 20:24:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:15', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_demo02_category_seq + START WITH 7 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_demo03_course +-- ------------------------------ +CREATE TABLE infra_demo03_course +( + id number NOT NULL, + student_id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + score smallint NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_CONFIG --- ---------------------------- -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', 'ui', '1', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', '0', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 12:21:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', 'biz', '1', '用户管理-账号初始密码', 'sys.user.init-password', '123456', '0', '初始化密码 123456', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-20 02:25:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('3', 'ui', '1', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', '0', '深色主题theme-dark,浅色主题theme-light', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-01-19 03:05:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('4', '1', '2', 'xxx', 'demo.test', '10', '0', '5', NULL, TO_DATE('2021-01-19 03:10:26', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-01-20 09:25:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('5', 'xxx', '2', 'xxx', 'xxx', 'xxx', '1', 'xxx', NULL, TO_DATE('2021-02-09 20:06:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-02-09 20:06:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_CONFIG" ("ID", "CATEGORY", "TYPE", "NAME", "CONFIG_KEY", "VALUE", "VISIBLE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('6', 'biz', '2', '登陆验证码的开关', 'yudao.captcha.enable', 'true', '1', NULL, '1', TO_DATE('2022-02-17 00:03:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-17 00:15:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; +ALTER TABLE infra_demo03_course + ADD CONSTRAINT pk_infra_demo03_course PRIMARY KEY (id); + +COMMENT ON COLUMN infra_demo03_course.id IS '编号'; +COMMENT ON COLUMN infra_demo03_course.student_id IS '学生编号'; +COMMENT ON COLUMN infra_demo03_course.score IS '分数'; +COMMENT ON COLUMN infra_demo03_course.create_time IS '创建时间'; +COMMENT ON COLUMN infra_demo03_course.update_time IS '更新时间'; +COMMENT ON COLUMN infra_demo03_course.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_demo03_course IS '学生课程表'; + +-- @formatter:off +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', to_date('2023-11-17 00:20:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 16:20:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_demo03_course_seq + START WITH 14 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_demo03_grade +-- ------------------------------ +CREATE TABLE infra_demo03_grade +( + id number NOT NULL, + student_id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + teacher varchar2(255) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_DATA_SOURCE_CONFIG --- ---------------------------- -DROP TABLE "INFRA_DATA_SOURCE_CONFIG"; -CREATE TABLE "INFRA_DATA_SOURCE_CONFIG" ( - "ID" NUMBER NOT NULL, - "NAME" NVARCHAR2(100) NOT NULL, - "URL" NCLOB NOT NULL, - "USERNAME" NVARCHAR2(255) NOT NULL, - "PASSWORD" NVARCHAR2(255) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."ID" IS '主键编号'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."NAME" IS '参数名称'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."URL" IS '数据源连接'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."USERNAME" IS '用户名'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."PASSWORD" IS '密码'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_DATA_SOURCE_CONFIG"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_DATA_SOURCE_CONFIG" IS '数据源配置表'; +ALTER TABLE infra_demo03_grade + ADD CONSTRAINT pk_infra_demo03_grade PRIMARY KEY (id); + +COMMENT ON COLUMN infra_demo03_grade.id IS '编号'; +COMMENT ON COLUMN infra_demo03_grade.student_id IS '学生编号'; +COMMENT ON COLUMN infra_demo03_grade.teacher IS '班主任'; +COMMENT ON COLUMN infra_demo03_grade.create_time IS '创建时间'; +COMMENT ON COLUMN infra_demo03_grade.update_time IS '更新时间'; +COMMENT ON COLUMN infra_demo03_grade.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_demo03_grade IS '学生班级表'; + +-- @formatter:off +INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_demo03_grade_seq + START WITH 10 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_demo03_student +-- ------------------------------ +CREATE TABLE infra_demo03_student +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday date NOT NULL, + description varchar2(255) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_DATA_SOURCE_CONFIG --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE infra_demo03_student + ADD CONSTRAINT pk_infra_demo03_student PRIMARY KEY (id); + +COMMENT ON COLUMN infra_demo03_student.id IS '编号'; +COMMENT ON COLUMN infra_demo03_student.sex IS '性别'; +COMMENT ON COLUMN infra_demo03_student.birthday IS '出生日期'; +COMMENT ON COLUMN infra_demo03_student.description IS '简介'; +COMMENT ON COLUMN infra_demo03_student.create_time IS '创建时间'; +COMMENT ON COLUMN infra_demo03_student.update_time IS '更新时间'; +COMMENT ON COLUMN infra_demo03_student.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_demo03_student IS '学生表'; + +-- @formatter:off +INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, to_date('2023-11-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

厉害

', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, to_date('2023-11-13 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

你在教我做事?

', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:07', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

哈哈哈

', '1', to_date('2023-11-17 00:04:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_demo03_student_seq + START WITH 10 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_file +-- ------------------------------ +CREATE TABLE infra_file +( + id number NOT NULL, + config_id number DEFAULT NULL NULL, + name varchar2(256) DEFAULT NULL NULL, + path varchar2(512) NOT NULL, + url varchar2(1024) NOT NULL, + type varchar2(128) DEFAULT NULL NULL, + "size" number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_FILE --- ---------------------------- -DROP TABLE "INFRA_FILE"; -CREATE TABLE "INFRA_FILE" ( - "ID" NUMBER(20,0) NOT NULL, - "CONFIG_ID" NUMBER(20,0), - "PATH" NVARCHAR2(512), - "URL" NCLOB, - "TYPE" NVARCHAR2(64), - "SIZE" NUMBER(11,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0, - "NAME" NVARCHAR2(512) -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_FILE"."ID" IS '文件编号'; -COMMENT ON COLUMN "INFRA_FILE"."CONFIG_ID" IS '配置编号'; -COMMENT ON COLUMN "INFRA_FILE"."PATH" IS '文件路径'; -COMMENT ON COLUMN "INFRA_FILE"."URL" IS '文件 URL'; -COMMENT ON COLUMN "INFRA_FILE"."TYPE" IS '文件MIME类型'; -COMMENT ON COLUMN "INFRA_FILE"."SIZE" IS '文件大小'; -COMMENT ON COLUMN "INFRA_FILE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_FILE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_FILE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_FILE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_FILE"."NAME" IS '文件名'; -COMMENT ON TABLE "INFRA_FILE" IS '文件表'; +ALTER TABLE infra_file + ADD CONSTRAINT pk_infra_file PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file.id IS '文件编号'; +COMMENT ON COLUMN infra_file.config_id IS '配置编号'; +COMMENT ON COLUMN infra_file.name IS '文件名'; +COMMENT ON COLUMN infra_file.path IS '文件路径'; +COMMENT ON COLUMN infra_file.url IS '文件 URL'; +COMMENT ON COLUMN infra_file.type IS '文件类型'; +COMMENT ON COLUMN infra_file.size IS '文件大小'; +COMMENT ON COLUMN infra_file.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file.update_time IS '更新时间'; +COMMENT ON TABLE infra_file IS '文件表'; + +CREATE SEQUENCE infra_file_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_file_config +-- ------------------------------ +CREATE TABLE infra_file_config +( + id number NOT NULL, + name varchar2(63) NOT NULL, + storage smallint NOT NULL, + remark varchar2(255) DEFAULT NULL NULL, + master number(1, 0) NOT NULL, + config varchar2(4000) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_FILE --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE infra_file_config + ADD CONSTRAINT pk_infra_file_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file_config.id IS '编号'; +COMMENT ON COLUMN infra_file_config.name IS '配置名'; +COMMENT ON COLUMN infra_file_config.storage IS '存储器'; +COMMENT ON COLUMN infra_file_config.remark IS '备注'; +COMMENT ON COLUMN infra_file_config.master IS '是否为主配置'; +COMMENT ON COLUMN infra_file_config.config IS '存储配置'; +COMMENT ON COLUMN infra_file_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_config.update_time IS '更新时间'; +COMMENT ON TABLE infra_file_config IS '文件配置表'; + +-- @formatter:off +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库', 1, '我是数据库', '0', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', to_date('2022-03-15 23:56:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-28 22:54:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器', 20, '', '1', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', '1', to_date('2024-01-13 22:11:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-03 19:38:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_file_config_seq + START WITH 23 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_file_content +-- ------------------------------ +CREATE TABLE infra_file_content +( + id number NOT NULL, + config_id number NOT NULL, + path varchar2(512) NOT NULL, + content blob NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_FILE_CONFIG --- ---------------------------- -DROP TABLE "INFRA_FILE_CONFIG"; -CREATE TABLE "INFRA_FILE_CONFIG" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(63), - "STORAGE" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(255), - "MASTER" NUMBER(4,0), - "CONFIG" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."NAME" IS '配置名'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."STORAGE" IS '存储器'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."REMARK" IS '备注'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."MASTER" IS '是否为主配置'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."CONFIG" IS '存储配置'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_FILE_CONFIG"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_FILE_CONFIG" IS '文件配置表'; +ALTER TABLE infra_file_content + ADD CONSTRAINT pk_infra_file_content PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file_content.id IS '编号'; +COMMENT ON COLUMN infra_file_content.config_id IS '配置编号'; +COMMENT ON COLUMN infra_file_content.path IS '文件路径'; +COMMENT ON COLUMN infra_file_content.content IS '文件内容'; +COMMENT ON COLUMN infra_file_content.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; +COMMENT ON TABLE infra_file_content IS '文件表'; + +CREATE SEQUENCE infra_file_content_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_job +-- ------------------------------ +CREATE TABLE infra_job +( + id number NOT NULL, + name varchar2(32) NOT NULL, + status smallint NOT NULL, + handler_name varchar2(64) NOT NULL, + handler_param varchar2(255) DEFAULT NULL NULL, + cron_expression varchar2(32) NOT NULL, + retry_count number DEFAULT 0 NOT NULL, + retry_interval number DEFAULT 0 NOT NULL, + monitor_timeout number DEFAULT 0 NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_FILE_CONFIG --- ---------------------------- -INSERT INTO "INFRA_FILE_CONFIG" ("ID", "NAME", "STORAGE", "REMARK", "MASTER", "CONFIG", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('4', '数据库', '1', '我是数据库', '0', '{"@class":"cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', TO_DATE('2022-03-15 23:56:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 19:10:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_FILE_CONFIG" ("ID", "NAME", "STORAGE", "REMARK", "MASTER", "CONFIG", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('5', '本地磁盘', '10', '测试下本地存储', '0', '{"@class":"cn.iocoder.yudao.framework.file.core.client.local.LocalFileClientConfig","basePath":"/Users/yunai/file_test","domain":"http://127.0.0.1:48080"}', '1', TO_DATE('2022-03-15 23:57:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 19:10:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "INFRA_FILE_CONFIG" ("ID", "NAME", "STORAGE", "REMARK", "MASTER", "CONFIG", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('11', 'S3 - 七牛云', '20', NULL, '1', '{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}', '1', TO_DATE('2022-03-19 18:00:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 19:10:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; +ALTER TABLE infra_job + ADD CONSTRAINT pk_infra_job PRIMARY KEY (id); + +COMMENT ON COLUMN infra_job.id IS '任务编号'; +COMMENT ON COLUMN infra_job.name IS '任务名称'; +COMMENT ON COLUMN infra_job.status IS '任务状态'; +COMMENT ON COLUMN infra_job.handler_name IS '处理器的名字'; +COMMENT ON COLUMN infra_job.handler_param IS '处理器的参数'; +COMMENT ON COLUMN infra_job.cron_expression IS 'CRON 表达式'; +COMMENT ON COLUMN infra_job.retry_count IS '重试次数'; +COMMENT ON COLUMN infra_job.retry_interval IS '重试间隔'; +COMMENT ON COLUMN infra_job.monitor_timeout IS '监控超时时间'; +COMMENT ON COLUMN infra_job.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job.update_time IS '更新时间'; +COMMENT ON TABLE infra_job IS '定时任务表'; + +-- @formatter:off +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', to_date('2021-10-27 08:34:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-09 20:51:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', to_date('2023-07-22 14:36:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-22 15:39:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', to_date('2023-07-22 15:36:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-22 15:39:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (19, '退款订单的同步 Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', to_date('2023-07-23 21:03:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-23 21:09:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (21, '交易订单的自动过期 Job', 2, 'tradeOrderAutoCancelJob', '', '0 * * * * ?', 3, 0, 0, '1', to_date('2023-09-25 23:43:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-26 19:23:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (22, '交易订单的自动收货 Job', 2, 'tradeOrderAutoReceiveJob', '', '0 * * * * ?', 3, 0, 0, '1', to_date('2023-09-26 19:23:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-26 23:38:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (23, '交易订单的自动评论 Job', 2, 'tradeOrderAutoCommentJob', '', '0 * * * * ?', 3, 0, 0, '1', to_date('2023-09-26 23:38:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-27 11:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (24, '佣金解冻 Job', 2, 'brokerageRecordUnfreezeJob', '', '0 * * * * ?', 3, 0, 0, '1', to_date('2023-09-28 22:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 22:01:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (25, '访问日志清理 Job', 2, 'accessLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', to_date('2023-10-03 10:59:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 11:01:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (26, '错误日志清理 Job', 2, 'errorLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', to_date('2023-10-03 11:00:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 11:01:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (27, '任务日志清理 Job', 2, 'jobLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', to_date('2023-10-03 11:01:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 11:01:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE infra_job_seq + START WITH 28 + INCREMENT BY 1; + + +-- ---------------------------- +-- infra_job_log +-- ------------------------------ +CREATE TABLE infra_job_log +( + id number NOT NULL, + job_id number NOT NULL, + handler_name varchar2(64) NOT NULL, + handler_param varchar2(255) DEFAULT NULL NULL, + execute_index smallint DEFAULT 1 NOT NULL, + begin_time date NOT NULL, + end_time date DEFAULT NULL NULL, + duration number DEFAULT NULL NULL, + status smallint NOT NULL, + result varchar2(4000) DEFAULT '' NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_FILE_CONTENT --- ---------------------------- -DROP TABLE "INFRA_FILE_CONTENT"; -CREATE TABLE "INFRA_FILE_CONTENT" ( - "ID" NUMBER(20,0) NOT NULL, - "CONFIG_ID" NUMBER(20,0) NOT NULL, - "PATH" NVARCHAR2(512), - "CONTENT" BLOB NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."CONFIG_ID" IS '配置编号'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."PATH" IS '文件路径'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."CONTENT" IS '文件内容'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_FILE_CONTENT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_FILE_CONTENT" IS '文件表'; +ALTER TABLE infra_job_log + ADD CONSTRAINT pk_infra_job_log PRIMARY KEY (id); + +COMMENT ON COLUMN infra_job_log.id IS '日志编号'; +COMMENT ON COLUMN infra_job_log.job_id IS '任务编号'; +COMMENT ON COLUMN infra_job_log.handler_name IS '处理器的名字'; +COMMENT ON COLUMN infra_job_log.handler_param IS '处理器的参数'; +COMMENT ON COLUMN infra_job_log.execute_index IS '第几次执行'; +COMMENT ON COLUMN infra_job_log.begin_time IS '开始执行时间'; +COMMENT ON COLUMN infra_job_log.end_time IS '结束执行时间'; +COMMENT ON COLUMN infra_job_log.duration IS '执行时长'; +COMMENT ON COLUMN infra_job_log.status IS '任务状态'; +COMMENT ON COLUMN infra_job_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; +COMMENT ON TABLE infra_job_log IS '定时任务日志表'; + +CREATE SEQUENCE infra_job_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_dept +-- ------------------------------ +CREATE TABLE system_dept +( + id number NOT NULL, + name varchar2(30) DEFAULT '' NULL, + parent_id number DEFAULT 0 NOT NULL, + sort number DEFAULT 0 NOT NULL, + leader_user_id number DEFAULT NULL NULL, + phone varchar2(11) DEFAULT NULL NULL, + email varchar2(50) DEFAULT NULL NULL, + status smallint NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_FILE_CONTENT --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_dept + ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); + +COMMENT ON COLUMN system_dept.id IS '部门id'; +COMMENT ON COLUMN system_dept.parent_id IS '父部门id'; +COMMENT ON COLUMN system_dept.sort IS '显示顺序'; +COMMENT ON COLUMN system_dept.leader_user_id IS '负责人'; +COMMENT ON COLUMN system_dept.phone IS '联系电话'; +COMMENT ON COLUMN system_dept.email IS '邮箱'; +COMMENT ON COLUMN system_dept.status IS '部门状态(0正常 1停用)'; +COMMENT ON COLUMN system_dept.create_time IS '创建时间'; +COMMENT ON COLUMN system_dept.update_time IS '更新时间'; +COMMENT ON COLUMN system_dept.tenant_id IS '租户编号'; +COMMENT ON TABLE system_dept IS '部门表'; + +-- @formatter:off +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, '芋道源码', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-14 23:30:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '深圳总公司', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 09:53:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (102, '长沙分公司', 100, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-12-15 05:01:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, '研发部门', 101, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 20:56:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, '市场部门', 101, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-12-15 05:01:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (105, '测试部门', 101, 3, NULL, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-16 20:25:15', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (106, '财务部门', 101, 4, 103, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', to_date('2022-01-15 21:32:22', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, '运维部门', 101, 5, 1, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 09:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, '市场部门', 102, 1, NULL, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 08:35:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '财务部门', 102, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-12-15 05:01:29', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '新部门', 0, 1, NULL, NULL, NULL, 0, '110', to_date('2022-02-23 20:46:30', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 20:46:30', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '顶级部门', 0, 1, NULL, NULL, NULL, 0, '113', to_date('2022-03-07 21:44:50', 'SYYYY-MM-DD HH24:MI:SS'), '113', to_date('2022-03-07 21:44:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, '产品部门', 101, 100, 1, NULL, NULL, 1, '1', to_date('2023-12-02 09:45:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 09:45:31', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '支持部门', 102, 3, 104, NULL, NULL, 1, '1', to_date('2023-12-02 09:47:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 09:47:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_dept_seq + START WITH 114 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_dict_data +-- ------------------------------ +CREATE TABLE system_dict_data +( + id number NOT NULL, + sort number DEFAULT 0 NOT NULL, + label varchar2(100) DEFAULT '' NULL, + value varchar2(100) DEFAULT '' NULL, + dict_type varchar2(100) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + color_type varchar2(100) DEFAULT '' NULL, + css_class varchar2(100) DEFAULT '' NULL, + remark varchar2(500) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_JOB --- ---------------------------- -DROP TABLE "INFRA_JOB"; -CREATE TABLE "INFRA_JOB" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(32), - "STATUS" NUMBER(4,0) NOT NULL, - "HANDLER_NAME" NVARCHAR2(64), - "HANDLER_PARAM" NVARCHAR2(255), - "CRON_EXPRESSION" NVARCHAR2(32), - "RETRY_COUNT" NUMBER(11,0) NOT NULL, - "RETRY_INTERVAL" NUMBER(11,0) NOT NULL, - "MONITOR_TIMEOUT" NUMBER(11,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_JOB"."ID" IS '任务编号'; -COMMENT ON COLUMN "INFRA_JOB"."NAME" IS '任务名称'; -COMMENT ON COLUMN "INFRA_JOB"."STATUS" IS '任务状态'; -COMMENT ON COLUMN "INFRA_JOB"."HANDLER_NAME" IS '处理器的名字'; -COMMENT ON COLUMN "INFRA_JOB"."HANDLER_PARAM" IS '处理器的参数'; -COMMENT ON COLUMN "INFRA_JOB"."CRON_EXPRESSION" IS 'CRON 表达式'; -COMMENT ON COLUMN "INFRA_JOB"."RETRY_COUNT" IS '重试次数'; -COMMENT ON COLUMN "INFRA_JOB"."RETRY_INTERVAL" IS '重试间隔'; -COMMENT ON COLUMN "INFRA_JOB"."MONITOR_TIMEOUT" IS '监控超时时间'; -COMMENT ON COLUMN "INFRA_JOB"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_JOB"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_JOB"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_JOB"."UPDATE_TIME" IS '更新时间'; -COMMENT ON TABLE "INFRA_JOB" IS '定时任务表'; +ALTER TABLE system_dict_data + ADD CONSTRAINT pk_system_dict_data PRIMARY KEY (id); + +COMMENT ON COLUMN system_dict_data.id IS '字典编码'; +COMMENT ON COLUMN system_dict_data.sort IS '字典排序'; +COMMENT ON COLUMN system_dict_data.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_data.remark IS '备注'; +COMMENT ON COLUMN system_dict_data.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_data.update_time IS '更新时间'; +COMMENT ON TABLE system_dict_data IS '字典数据表'; + +-- @formatter:off +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, '男', '1', 'system_user_sex', 0, 'default', 'A', '性别男', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-29 00:14:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, '女', '2', 'system_user_sex', 0, 'success', '', '性别女', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:30:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 1, '正常', '1', 'infra_job_status', 0, 'success', '', '正常状态', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:33:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 2, '暂停', '2', 'infra_job_status', 0, 'danger', '', '停用状态', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:33:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 1, '系统内置', '1', 'infra_config_type', 0, 'danger', '', '参数类型 - 系统内置', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:06:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (13, 2, '自定义', '2', 'infra_config_type', 0, 'primary', '', '参数类型 - 自定义', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:06:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (14, 1, '通知', '1', 'system_notice_type', 0, 'success', '', '通知', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:05:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (15, 2, '公告', '2', 'system_notice_type', 0, 'info', '', '公告', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:06:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (16, 0, '其它', '0', 'infra_operate_type', 0, 'default', '', '其它操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (17, 1, '查询', '1', 'infra_operate_type', 0, 'info', '', '查询操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (18, 2, '新增', '2', 'infra_operate_type', 0, 'primary', '', '新增操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (19, 3, '修改', '3', 'infra_operate_type', 0, 'warning', '', '修改操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (20, 4, '删除', '4', 'infra_operate_type', 0, 'danger', '', '删除操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (22, 5, '导出', '5', 'infra_operate_type', 0, 'default', '', '导出操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (23, 6, '导入', '6', 'infra_operate_type', 0, 'default', '', '导入操作', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (27, 1, '开启', '0', 'common_status', 0, 'primary', '', '开启状态', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 08:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (28, 2, '关闭', '1', 'common_status', 0, 'info', '', '关闭状态', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 08:00:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (29, 1, '目录', '1', 'system_menu_type', 0, '', '', '目录', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:43:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (30, 2, '菜单', '2', 'system_menu_type', 0, '', '', '菜单', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:43:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (31, 3, '按钮', '3', 'system_menu_type', 0, '', '', '按钮', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:43:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (32, 1, '内置', '1', 'system_role_type', 0, 'danger', '', '内置角色', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:02:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (33, 2, '自定义', '2', 'system_role_type', 0, 'primary', '', '自定义角色', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:02:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (34, 1, '全部数据权限', '1', 'system_data_scope', 0, '', '', '全部数据权限', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:47:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (35, 2, '指定部门数据权限', '2', 'system_data_scope', 0, '', '', '指定部门数据权限', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (36, 3, '本部门数据权限', '3', 'system_data_scope', 0, '', '', '本部门数据权限', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:47:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (37, 4, '本部门及以下数据权限', '4', 'system_data_scope', 0, '', '', '本部门及以下数据权限', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:47:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (38, 5, '仅本人数据权限', '5', 'system_data_scope', 0, '', '', '仅本人数据权限', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:47:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (39, 0, '成功', '0', 'system_login_result', 0, 'success', '', '登陆结果 - 成功', '', to_date('2021-01-18 06:17:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:23:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (40, 10, '账号或密码不正确', '10', 'system_login_result', 0, 'primary', '', '登陆结果 - 账号或密码不正确', '', to_date('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:24:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (41, 20, '用户被禁用', '20', 'system_login_result', 0, 'warning', '', '登陆结果 - 用户被禁用', '', to_date('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:23:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (42, 30, '验证码不存在', '30', 'system_login_result', 0, 'info', '', '登陆结果 - 验证码不存在', '', to_date('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:24:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (43, 31, '验证码不正确', '31', 'system_login_result', 0, 'info', '', '登陆结果 - 验证码不正确', '', to_date('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:24:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (44, 100, '未知异常', '100', 'system_login_result', 0, 'danger', '', '登陆结果 - 未知异常', '', to_date('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (45, 1, '是', 'true', 'infra_boolean_string', 0, 'danger', '', 'Boolean 是否类型 - 是', '', to_date('2021-01-19 03:20:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 23:01:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (46, 1, '否', 'false', 'infra_boolean_string', 0, 'info', '', 'Boolean 是否类型 - 否', '', to_date('2021-01-19 03:20:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 23:09:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (50, 1, '单表(增删改查)', '1', 'infra_codegen_template_type', 0, '', '', NULL, '', to_date('2021-02-05 07:09:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-03-10 16:33:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (51, 2, '树表(增删改查)', '2', 'infra_codegen_template_type', 0, '', '', NULL, '', to_date('2021-02-05 07:14:46', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-03-10 16:33:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (53, 0, '初始化中', '0', 'infra_job_status', 0, 'primary', '', NULL, '', to_date('2021-02-07 07:46:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:33:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (57, 0, '运行中', '0', 'infra_job_log_status', 0, 'primary', '', 'RUNNING', '', to_date('2021-02-08 10:04:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:07:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (58, 1, '成功', '1', 'infra_job_log_status', 0, 'success', '', NULL, '', to_date('2021-02-08 10:06:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:07:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (59, 2, '失败', '2', 'infra_job_log_status', 0, 'warning', '', '失败', '', to_date('2021-02-08 10:07:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 19:07:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (60, 1, '会员', '1', 'user_type', 0, 'primary', '', NULL, '', to_date('2021-02-26 00:16:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:22:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (61, 2, '管理员', '2', 'user_type', 0, 'success', '', NULL, '', to_date('2021-02-26 00:16:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:22:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (62, 0, '未处理', '0', 'infra_api_error_log_process_status', 0, 'primary', '', NULL, '', to_date('2021-02-26 07:07:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 20:14:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (63, 1, '已处理', '1', 'infra_api_error_log_process_status', 0, 'success', '', NULL, '', to_date('2021-02-26 07:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 20:14:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (64, 2, '已忽略', '2', 'infra_api_error_log_process_status', 0, 'danger', '', NULL, '', to_date('2021-02-26 07:07:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 20:14:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (66, 2, '阿里云', 'ALIYUN', 'system_sms_channel_code', 0, 'primary', '', NULL, '1', to_date('2021-04-05 01:05:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:09:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (67, 1, '验证码', '1', 'system_sms_template_type', 0, 'warning', '', NULL, '1', to_date('2021-04-05 21:50:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 12:48:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (68, 2, '通知', '2', 'system_sms_template_type', 0, 'primary', '', NULL, '1', to_date('2021-04-05 21:51:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 12:48:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (69, 0, '营销', '3', 'system_sms_template_type', 0, 'danger', '', NULL, '1', to_date('2021-04-05 21:51:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 12:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (70, 0, '初始化', '0', 'system_sms_send_status', 0, 'primary', '', NULL, '1', to_date('2021-04-11 20:18:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:26:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (71, 1, '发送成功', '10', 'system_sms_send_status', 0, 'success', '', NULL, '1', to_date('2021-04-11 20:18:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:25:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (72, 2, '发送失败', '20', 'system_sms_send_status', 0, 'danger', '', NULL, '1', to_date('2021-04-11 20:18:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:26:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (73, 3, '不发送', '30', 'system_sms_send_status', 0, 'info', '', NULL, '1', to_date('2021-04-11 20:19:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:26:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (74, 0, '等待结果', '0', 'system_sms_receive_status', 0, 'primary', '', NULL, '1', to_date('2021-04-11 20:27:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:28:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (75, 1, '接收成功', '10', 'system_sms_receive_status', 0, 'success', '', NULL, '1', to_date('2021-04-11 20:29:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:28:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (76, 2, '接收失败', '20', 'system_sms_receive_status', 0, 'danger', '', NULL, '1', to_date('2021-04-11 20:29:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:28:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (77, 0, '调试(钉钉)', 'DEBUG_DING_TALK', 'system_sms_channel_code', 0, 'info', '', NULL, '1', to_date('2021-04-13 00:20:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (80, 100, '账号登录', '100', 'system_login_type', 0, 'primary', '', '账号登录', '1', to_date('2021-10-06 00:52:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (81, 101, '社交登录', '101', 'system_login_type', 0, 'info', '', '社交登录', '1', to_date('2021-10-06 00:52:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:11:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (83, 200, '主动登出', '200', 'system_login_type', 0, 'primary', '', '主动登出', '1', to_date('2021-10-06 00:52:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:11:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (85, 202, '强制登出', '202', 'system_login_type', 0, 'danger', '', '强制退出', '1', to_date('2021-10-06 00:53:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:11:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (86, 0, '病假', '1', 'bpm_oa_leave_type', 0, 'primary', '', NULL, '1', to_date('2021-09-21 22:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:00:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (87, 1, '事假', '2', 'bpm_oa_leave_type', 0, 'info', '', NULL, '1', to_date('2021-09-21 22:36:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:00:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (88, 2, '婚假', '3', 'bpm_oa_leave_type', 0, 'warning', '', NULL, '1', to_date('2021-09-21 22:36:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 10:00:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (113, 1, '微信公众号支付', 'wx_pub', 'pay_channel_code', 0, 'success', '', '微信公众号支付', '1', to_date('2021-12-03 10:40:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:08:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (114, 2, '微信小程序支付', 'wx_lite', 'pay_channel_code', 0, 'success', '', '微信小程序支付', '1', to_date('2021-12-03 10:41:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:08:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (115, 3, '微信 App 支付', 'wx_app', 'pay_channel_code', 0, 'success', '', '微信 App 支付', '1', to_date('2021-12-03 10:41:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (116, 10, '支付宝 PC 网站支付', 'alipay_pc', 'pay_channel_code', 0, 'primary', '', '支付宝 PC 网站支付', '1', to_date('2021-12-03 10:42:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (117, 11, '支付宝 Wap 网站支付', 'alipay_wap', 'pay_channel_code', 0, 'primary', '', '支付宝 Wap 网站支付', '1', to_date('2021-12-03 10:42:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (118, 12, '支付宝 App 支付', 'alipay_app', 'pay_channel_code', 0, 'primary', '', '支付宝 App 支付', '1', to_date('2021-12-03 10:42:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (119, 14, '支付宝扫码支付', 'alipay_qr', 'pay_channel_code', 0, 'primary', '', '支付宝扫码支付', '1', to_date('2021-12-03 10:43:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (120, 10, '通知成功', '10', 'pay_notify_status', 0, 'success', '', '通知成功', '1', to_date('2021-12-03 11:02:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:08:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (121, 20, '通知失败', '20', 'pay_notify_status', 0, 'danger', '', '通知失败', '1', to_date('2021-12-03 11:02:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:08:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (122, 0, '等待通知', '0', 'pay_notify_status', 0, 'info', '', '未通知', '1', to_date('2021-12-03 11:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:08:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (123, 10, '支付成功', '10', 'pay_order_status', 0, 'success', '', '支付成功', '1', to_date('2021-12-03 11:18:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:04:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (124, 30, '支付关闭', '30', 'pay_order_status', 0, 'info', '', '支付关闭', '1', to_date('2021-12-03 11:18:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:05:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (125, 0, '等待支付', '0', 'pay_order_status', 0, 'info', '', '未支付', '1', to_date('2021-12-03 11:18:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:04:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (600, 5, '首页', '1', 'promotion_banner_position', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (601, 4, '秒杀活动页', '2', 'promotion_banner_position', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (602, 3, '砍价活动页', '3', 'promotion_banner_position', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (603, 2, '限时折扣页', '4', 'promotion_banner_position', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (604, 1, '满减送页', '5', 'promotion_banner_position', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1118, 0, '等待退款', '0', 'pay_refund_status', 0, 'info', '', '等待退款', '1', to_date('2021-12-10 16:44:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:14:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1119, 20, '退款失败', '20', 'pay_refund_status', 0, 'danger', '', '退款失败', '1', to_date('2021-12-10 16:45:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:15:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1124, 10, '退款成功', '10', 'pay_refund_status', 0, 'success', '', '退款成功', '1', to_date('2021-12-10 16:46:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:15:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1127, 1, '审批中', '1', 'bpm_process_instance_status', 0, 'default', '', '流程实例的状态 - 进行中', '1', to_date('2022-01-07 23:47:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-16 16:11:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1128, 2, '审批通过', '2', 'bpm_process_instance_status', 0, 'success', '', '流程实例的状态 - 已完成', '1', to_date('2022-01-07 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-16 16:11:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1129, 1, '审批中', '1', 'bpm_task_status', 0, 'primary', '', '流程实例的结果 - 处理中', '1', to_date('2022-01-07 23:48:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1130, 2, '审批通过', '2', 'bpm_task_status', 0, 'success', '', '流程实例的结果 - 通过', '1', to_date('2022-01-07 23:48:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1131, 3, '审批不通过', '3', 'bpm_task_status', 0, 'danger', '', '流程实例的结果 - 不通过', '1', to_date('2022-01-07 23:48:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1132, 4, '已取消', '4', 'bpm_task_status', 0, 'info', '', '流程实例的结果 - 撤销', '1', to_date('2022-01-07 23:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1133, 10, '流程表单', '10', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 流程表单', '103', to_date('2022-01-11 23:51:30', 'SYYYY-MM-DD HH24:MI:SS'), '103', to_date('2022-01-11 23:51:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1134, 20, '业务表单', '20', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 业务表单', '103', to_date('2022-01-11 23:51:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', to_date('2022-01-11 23:51:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1135, 10, '角色', '10', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 角色', '103', to_date('2022-01-12 23:21:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1136, 20, '部门的成员', '20', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的成员', '103', to_date('2022-01-12 23:21:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1137, 21, '部门的负责人', '21', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的负责人', '103', to_date('2022-01-12 23:33:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1138, 30, '用户', '30', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 用户', '103', to_date('2022-01-12 23:34:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1139, 40, '用户组', '40', 'bpm_task_candidate_strategy', 0, 'warning', '', '任务分配规则的类型 - 用户组', '103', to_date('2022-01-12 23:34:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1140, 60, '流程表达式', '60', 'bpm_task_candidate_strategy', 0, 'danger', '', '任务分配规则的类型 - 流程表达式', '103', to_date('2022-01-12 23:34:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1141, 22, '岗位', '22', 'bpm_task_candidate_strategy', 0, 'success', '', '任务分配规则的类型 - 岗位', '103', to_date('2022-01-14 18:41:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-06 02:53:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1145, 1, '管理后台', '1', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 管理后台', '1', to_date('2022-02-02 13:15:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-10 16:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1146, 2, '用户 APP', '2', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 用户 APP', '1', to_date('2022-02-02 13:15:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-10 16:33:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1150, 1, '数据库', '1', 'infra_file_storage', 0, 'default', '', NULL, '1', to_date('2022-03-15 00:25:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:25:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1151, 10, '本地磁盘', '10', 'infra_file_storage', 0, 'default', '', NULL, '1', to_date('2022-03-15 00:25:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:25:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1152, 11, 'FTP 服务器', '11', 'infra_file_storage', 0, 'default', '', NULL, '1', to_date('2022-03-15 00:26:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:26:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1153, 12, 'SFTP 服务器', '12', 'infra_file_storage', 0, 'default', '', NULL, '1', to_date('2022-03-15 00:26:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:26:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1154, 20, 'S3 对象存储', '20', 'infra_file_storage', 0, 'default', '', NULL, '1', to_date('2022-03-15 00:26:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:26:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1155, 103, '短信登录', '103', 'system_login_type', 0, 'default', '', NULL, '1', to_date('2022-05-09 23:57:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-09 23:58:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1156, 1, 'password', 'password', 'system_oauth2_grant_type', 0, 'default', '', '密码模式', '1', to_date('2022-05-12 00:22:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:26:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1157, 2, 'authorization_code', 'authorization_code', 'system_oauth2_grant_type', 0, 'primary', '', '授权码模式', '1', to_date('2022-05-12 00:22:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:26:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1158, 3, 'implicit', 'implicit', 'system_oauth2_grant_type', 0, 'success', '', '简化模式', '1', to_date('2022-05-12 00:23:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:26:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1159, 4, 'client_credentials', 'client_credentials', 'system_oauth2_grant_type', 0, 'default', '', '客户端模式', '1', to_date('2022-05-12 00:23:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:26:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1160, 5, 'refresh_token', 'refresh_token', 'system_oauth2_grant_type', 0, 'info', '', '刷新模式', '1', to_date('2022-05-12 00:24:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:26:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1162, 1, '销售中', '1', 'product_spu_status', 0, 'success', '', '商品 SPU 状态 - 销售中', '1', to_date('2022-10-24 21:19:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-10-24 21:20:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1163, 0, '仓库中', '0', 'product_spu_status', 0, 'info', '', '商品 SPU 状态 - 仓库中', '1', to_date('2022-10-24 21:20:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-10-24 21:21:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1164, 0, '回收站', '-1', 'product_spu_status', 0, 'default', '', '商品 SPU 状态 - 回收站', '1', to_date('2022-10-24 21:21:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-10-24 21:21:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1165, 1, '满减', '1', 'promotion_discount_type', 0, 'success', '', '优惠类型 - 满减', '1', to_date('2022-11-01 12:46:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-01 12:50:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1166, 2, '折扣', '2', 'promotion_discount_type', 0, 'primary', '', '优惠类型 - 折扣', '1', to_date('2022-11-01 12:46:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-01 12:50:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1167, 1, '固定日期', '1', 'promotion_coupon_template_validity_type', 0, 'default', '', '优惠劵模板的有限期类型 - 固定日期', '1', to_date('2022-11-02 00:07:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 00:07:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1168, 2, '领取之后', '2', 'promotion_coupon_template_validity_type', 0, 'default', '', '优惠劵模板的有限期类型 - 领取之后', '1', to_date('2022-11-02 00:07:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 00:07:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1169, 1, '通用劵', '1', 'promotion_product_scope', 0, 'default', '', '营销的商品范围 - 全部商品参与', '1', to_date('2022-11-02 00:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 00:27:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1170, 2, '商品劵', '2', 'promotion_product_scope', 0, 'default', '', '营销的商品范围 - 指定商品参与', '1', to_date('2022-11-02 00:28:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 00:27:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1171, 1, '未使用', '1', 'promotion_coupon_status', 0, 'primary', '', '优惠劵的状态 - 已领取', '1', to_date('2022-11-04 00:15:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 12:54:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1172, 2, '已使用', '2', 'promotion_coupon_status', 0, 'success', '', '优惠劵的状态 - 已使用', '1', to_date('2022-11-04 00:15:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 19:16:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1173, 3, '已过期', '3', 'promotion_coupon_status', 0, 'info', '', '优惠劵的状态 - 已过期', '1', to_date('2022-11-04 00:15:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 19:16:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1174, 1, '直接领取', '1', 'promotion_coupon_take_type', 0, 'primary', '', '优惠劵的领取方式 - 直接领取', '1', to_date('2022-11-04 19:13:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 19:13:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1175, 2, '指定发放', '2', 'promotion_coupon_take_type', 0, 'success', '', '优惠劵的领取方式 - 指定发放', '1', to_date('2022-11-04 19:13:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 19:14:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1176, 10, '未开始', '10', 'promotion_activity_status', 0, 'primary', '', '促销活动的状态枚举 - 未开始', '1', to_date('2022-11-04 22:54:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:55:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1177, 20, '进行中', '20', 'promotion_activity_status', 0, 'success', '', '促销活动的状态枚举 - 进行中', '1', to_date('2022-11-04 22:55:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:55:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1178, 30, '已结束', '30', 'promotion_activity_status', 0, 'info', '', '促销活动的状态枚举 - 已结束', '1', to_date('2022-11-04 22:55:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:55:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1179, 40, '已关闭', '40', 'promotion_activity_status', 0, 'warning', '', '促销活动的状态枚举 - 已关闭', '1', to_date('2022-11-04 22:56:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:56:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1180, 10, '满 N 元', '10', 'promotion_condition_type', 0, 'primary', '', '营销的条件类型 - 满 N 元', '1', to_date('2022-11-04 22:59:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:59:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1181, 20, '满 N 件', '20', 'promotion_condition_type', 0, 'success', '', '营销的条件类型 - 满 N 件', '1', to_date('2022-11-04 23:00:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 23:00:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1182, 10, '申请售后', '10', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 申请售后', '1', to_date('2022-11-19 20:53:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 20:54:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1183, 20, '商品待退货', '20', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 商品待退货', '1', to_date('2022-11-19 20:54:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 20:58:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1184, 30, '商家待收货', '30', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 商家待收货', '1', to_date('2022-11-19 20:56:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 20:59:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1185, 40, '等待退款', '40', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 等待退款', '1', to_date('2022-11-19 20:59:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:00:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1186, 50, '退款成功', '50', 'trade_after_sale_status', 0, 'default', '', '交易售后状态 - 退款成功', '1', to_date('2022-11-19 21:00:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:00:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1187, 61, '买家取消', '61', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 买家取消', '1', to_date('2022-11-19 21:01:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:01:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1188, 62, '商家拒绝', '62', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 商家拒绝', '1', to_date('2022-11-19 21:02:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:02:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1189, 63, '商家拒收货', '63', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 商家拒收货', '1', to_date('2022-11-19 21:02:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:03:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1190, 10, '售中退款', '10', 'trade_after_sale_type', 0, 'success', '', '交易售后的类型 - 售中退款', '1', to_date('2022-11-19 21:05:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:38:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1191, 20, '售后退款', '20', 'trade_after_sale_type', 0, 'primary', '', '交易售后的类型 - 售后退款', '1', to_date('2022-11-19 21:05:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:38:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1192, 10, '仅退款', '10', 'trade_after_sale_way', 0, 'primary', '', '交易售后的方式 - 仅退款', '1', to_date('2022-11-19 21:39:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:39:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1193, 20, '退货退款', '20', 'trade_after_sale_way', 0, 'success', '', '交易售后的方式 - 退货退款', '1', to_date('2022-11-19 21:39:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:39:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1194, 10, '微信小程序', '10', 'terminal', 0, 'default', '', '终端 - 微信小程序', '1', to_date('2022-12-10 10:51:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:51:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1195, 20, 'H5 网页', '20', 'terminal', 0, 'default', '', '终端 - H5 网页', '1', to_date('2022-12-10 10:51:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:51:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1196, 11, '微信公众号', '11', 'terminal', 0, 'default', '', '终端 - 微信公众号', '1', to_date('2022-12-10 10:54:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:52:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1197, 31, '苹果 App', '31', 'terminal', 0, 'default', '', '终端 - 苹果 App', '1', to_date('2022-12-10 10:54:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:52:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1198, 32, '安卓 App', '32', 'terminal', 0, 'default', '', '终端 - 安卓 App', '1', to_date('2022-12-10 10:55:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:59:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1199, 0, '普通订单', '0', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 普通订单', '1', to_date('2022-12-10 16:34:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:34:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1200, 1, '秒杀订单', '1', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 秒杀订单', '1', to_date('2022-12-10 16:34:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:34:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1201, 2, '拼团订单', '2', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 拼团订单', '1', to_date('2022-12-10 16:34:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:34:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1202, 3, '砍价订单', '3', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 砍价订单', '1', to_date('2022-12-10 16:34:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:34:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1203, 0, '待支付', '0', 'trade_order_status', 0, 'default', '', '交易订单状态 - 待支付', '1', to_date('2022-12-10 16:49:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:49:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1204, 10, '待发货', '10', 'trade_order_status', 0, 'primary', '', '交易订单状态 - 待发货', '1', to_date('2022-12-10 16:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:51:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1205, 20, '已发货', '20', 'trade_order_status', 0, 'primary', '', '交易订单状态 - 已发货', '1', to_date('2022-12-10 16:50:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:51:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1206, 30, '已完成', '30', 'trade_order_status', 0, 'success', '', '交易订单状态 - 已完成', '1', to_date('2022-12-10 16:50:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:51:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1207, 40, '已取消', '40', 'trade_order_status', 0, 'danger', '', '交易订单状态 - 已取消', '1', to_date('2022-12-10 16:50:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:51:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1208, 0, '未售后', '0', 'trade_order_item_after_sale_status', 0, 'info', '', '交易订单项的售后状态 - 未售后', '1', to_date('2022-12-10 20:58:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 20:59:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1209, 1, '售后中', '1', 'trade_order_item_after_sale_status', 0, 'primary', '', '交易订单项的售后状态 - 售后中', '1', to_date('2022-12-10 20:59:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 20:59:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1210, 2, '已退款', '2', 'trade_order_item_after_sale_status', 0, 'success', '', '交易订单项的售后状态 - 已退款', '1', to_date('2022-12-10 20:59:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 20:59:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1211, 1, '完全匹配', '1', 'mp_auto_reply_request_match', 0, 'primary', '', '公众号自动回复的请求关键字匹配模式 - 完全匹配', '1', to_date('2023-01-16 23:30:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 23:31:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1212, 2, '半匹配', '2', 'mp_auto_reply_request_match', 0, 'success', '', '公众号自动回复的请求关键字匹配模式 - 半匹配', '1', to_date('2023-01-16 23:30:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 23:31:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1213, 1, '文本', 'text', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 文本', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 22:17:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1214, 2, '图片', 'image', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 图片', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:19:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1215, 3, '语音', 'voice', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 语音', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:20:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1216, 4, '视频', 'video', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 视频', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:21:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1217, 5, '小视频', 'shortvideo', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 小视频', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:19:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1218, 6, '图文', 'news', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 图文', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:22:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1219, 7, '音乐', 'music', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 音乐', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:22:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1220, 8, '地理位置', 'location', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 地理位置', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:23:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1221, 9, '链接', 'link', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 链接', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1222, 10, '事件', 'event', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 事件', '1', to_date('2023-01-17 22:17:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 14:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1223, 0, '初始化', '0', 'system_mail_send_status', 0, 'primary', '', '邮件发送状态 - 初始化\n', '1', to_date('2023-01-26 09:53:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 16:36:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1224, 10, '发送成功', '10', 'system_mail_send_status', 0, 'success', '', '邮件发送状态 - 发送成功', '1', to_date('2023-01-26 09:54:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 16:36:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1225, 20, '发送失败', '20', 'system_mail_send_status', 0, 'danger', '', '邮件发送状态 - 发送失败', '1', to_date('2023-01-26 09:54:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 16:36:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1226, 30, '不发送', '30', 'system_mail_send_status', 0, 'info', '', '邮件发送状态 - 不发送', '1', to_date('2023-01-26 09:55:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 16:36:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1227, 1, '通知公告', '1', 'system_notify_template_type', 0, 'primary', '', '站内信模版的类型 - 通知公告', '1', to_date('2023-01-28 10:35:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 10:35:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1228, 2, '系统消息', '2', 'system_notify_template_type', 0, 'success', '', '站内信模版的类型 - 系统消息', '1', to_date('2023-01-28 10:36:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 10:36:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1230, 13, '支付宝条码支付', 'alipay_bar', 'pay_channel_code', 0, 'primary', '', '支付宝条码支付', '1', to_date('2023-02-18 23:32:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1231, 10, 'Vue2 Element UI 标准模版', '10', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus 标准模版', '20', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, 'Vue3 Element Plus Schema 模版', '21', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vue3 vben 模版', '30', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1235, 1, '个', '1', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1236, 1, '件', '2', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1237, 1, '盒', '3', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1238, 1, '袋', '4', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1239, 1, '箱', '5', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1240, 1, '套', '6', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1241, 1, '包', '7', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1242, 1, '双', '8', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1243, 1, '卷', '9', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:46:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:46:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:46:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:46:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1335, 11, '订单积分抵扣', '11', 'member_point_biz_type', 0, '', '', '', '1', to_date('2023-06-10 12:15:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:41:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1336, 1, '签到', '1', 'member_point_biz_type', 0, '', '', '', '1', to_date('2023-06-10 12:15:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 11:59:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1341, 20, '已退款', '20', 'pay_order_status', 0, 'danger', '', '已退款', '1', to_date('2023-07-19 18:05:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:05:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1342, 21, '请求成功,但是结果失败', '21', 'pay_notify_status', 0, 'warning', '', '请求成功,但是结果失败', '1', to_date('2023-07-19 18:10:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:11:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1343, 22, '请求失败', '22', 'pay_notify_status', 0, 'warning', '', NULL, '1', to_date('2023-07-19 18:11:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:11:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1344, 4, '微信扫码支付', 'wx_native', 'pay_channel_code', 0, 'success', '', '微信扫码支付', '1', to_date('2023-07-19 20:07:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1345, 5, '微信条码支付', 'wx_bar', 'pay_channel_code', 0, 'success', '', '微信条码支付\n', '1', to_date('2023-07-19 20:08:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 20:09:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1346, 1, '支付单', '1', 'pay_notify_type', 0, 'primary', '', '支付单', '1', to_date('2023-07-20 12:23:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-20 12:23:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1347, 2, '退款单', '2', 'pay_notify_type', 0, 'danger', '', NULL, '1', to_date('2023-07-20 12:23:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-20 12:23:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1348, 20, '模拟支付', 'mock', 'pay_channel_code', 0, 'default', '', '模拟支付', '1', to_date('2023-07-29 11:10:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-29 03:14:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1349, 12, '订单积分抵扣(整单取消)', '12', 'member_point_biz_type', 0, '', '', '', '1', to_date('2023-08-20 12:00:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:42:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1350, 0, '管理员调整', '0', 'member_experience_biz_type', 0, '', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1351, 1, '邀新奖励', '1', 'member_experience_biz_type', 0, '', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1352, 11, '下单奖励', '11', 'member_experience_biz_type', 0, 'success', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1353, 12, '下单奖励(整单取消)', '12', 'member_experience_biz_type', 0, 'warning', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1354, 4, '签到奖励', '4', 'member_experience_biz_type', 0, '', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1355, 5, '抽奖奖励', '5', 'member_experience_biz_type', 0, '', '', NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1356, 1, '快递发货', '1', 'trade_delivery_type', 0, '', '', '', '1', to_date('2023-08-23 00:04:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-23 00:04:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1357, 2, '用户自提', '2', 'trade_delivery_type', 0, '', '', '', '1', to_date('2023-08-23 00:05:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-23 00:05:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1358, 3, '品类劵', '3', 'promotion_product_scope', 0, 'default', '', '', '1', to_date('2023-09-01 23:43:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 00:27:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1359, 1, '人人分销', '1', 'brokerage_enabled_condition', 0, '', '', '所有用户都可以分销', '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1360, 2, '指定分销', '2', 'brokerage_enabled_condition', 0, '', '', '仅可后台手动设置推广员', '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1361, 1, '首次绑定', '1', 'brokerage_bind_mode', 0, '', '', '只要用户没有推广人,随时都可以绑定推广关系', '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1362, 2, '注册绑定', '2', 'brokerage_bind_mode', 0, '', '', '仅新用户注册时才能绑定推广关系', '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1363, 3, '覆盖绑定', '3', 'brokerage_bind_mode', 0, '', '', '如果用户已经有推广人,推广人会被变更', '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1364, 1, '钱包', '1', 'brokerage_withdraw_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1365, 2, '银行卡', '2', 'brokerage_withdraw_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1366, 3, '微信', '3', 'brokerage_withdraw_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1367, 4, '支付宝', '4', 'brokerage_withdraw_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1368, 1, '订单返佣', '1', 'brokerage_record_biz_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1369, 2, '申请提现', '2', 'brokerage_record_biz_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1370, 3, '申请提现驳回', '3', 'brokerage_record_biz_type', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1371, 0, '待结算', '0', 'brokerage_record_status', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1372, 1, '已结算', '1', 'brokerage_record_status', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1373, 2, '已取消', '2', 'brokerage_record_status', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1374, 0, '审核中', '0', 'brokerage_withdraw_status', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1375, 10, '审核通过', '10', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1376, 11, '提现成功', '11', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1377, 20, '审核不通过', '20', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1378, 21, '提现失败', '21', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1379, 0, '工商银行', '0', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1380, 1, '建设银行', '1', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1381, 2, '农业银行', '2', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1382, 3, '中国银行', '3', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1383, 4, '交通银行', '4', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1384, 5, '招商银行', '5', 'brokerage_bank_name', 0, '', '', NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1385, 21, '钱包', 'wallet', 'pay_channel_code', 0, 'primary', '', '', '1', to_date('2023-10-01 21:46:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 21:48:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1386, 1, '砍价中', '1', 'promotion_bargain_record_status', 0, 'default', '', '', '1', to_date('2023-10-05 10:41:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 10:41:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1387, 2, '砍价成功', '2', 'promotion_bargain_record_status', 0, 'success', '', '', '1', to_date('2023-10-05 10:41:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 10:41:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1388, 3, '砍价失败', '3', 'promotion_bargain_record_status', 0, 'warning', '', '', '1', to_date('2023-10-05 10:41:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 10:41:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1389, 1, '拼团中', '1', 'promotion_combination_record_status', 0, '', '', '', '1', to_date('2023-10-08 07:24:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-08 07:24:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1390, 2, '拼团成功', '2', 'promotion_combination_record_status', 0, 'success', '', '', '1', to_date('2023-10-08 07:24:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-08 07:24:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1391, 3, '拼团失败', '3', 'promotion_combination_record_status', 0, 'warning', '', '', '1', to_date('2023-10-08 07:25:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-08 07:25:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1392, 2, '管理员修改', '2', 'member_point_biz_type', 0, 'default', '', '', '1', to_date('2023-10-11 07:41:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:41:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1393, 13, '订单积分抵扣(单个退款)', '13', 'member_point_biz_type', 0, '', '', '', '1', to_date('2023-10-11 07:42:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:42:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1394, 21, '订单积分奖励', '21', 'member_point_biz_type', 0, 'default', '', '', '1', to_date('2023-10-11 07:42:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:42:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1395, 22, '订单积分奖励(整单取消)', '22', 'member_point_biz_type', 0, 'default', '', '', '1', to_date('2023-10-11 07:42:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:43:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1396, 23, '订单积分奖励(单个退款)', '23', 'member_point_biz_type', 0, 'default', '', '', '1', to_date('2023-10-11 07:43:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:43:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1397, 13, '下单奖励(单个退款)', '13', 'member_experience_biz_type', 0, 'warning', '', '', '1', to_date('2023-10-11 07:45:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-11 07:45:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1398, 5, '网上转账', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:55:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:55:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1399, 6, '支付宝', '6', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:55:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:55:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1400, 7, '微信支付', '7', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:55:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:55:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1401, 8, '其他', '8', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:56:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:56:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1402, 1, 'IT', '1', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:02:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:30:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1403, 2, '金融业', '2', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:02:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:30:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1404, 3, '房地产', '3', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:02:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:30:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1405, 4, '商业服务', '4', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:02:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:30:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1406, 5, '运输/物流', '5', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:03:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:31:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1407, 6, '生产', '6', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:03:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:31:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1408, 7, '政府', '7', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:03:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:31:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1409, 8, '文化传媒', '8', 'crm_customer_industry', 0, 'default', '', '', '1', to_date('2023-10-28 23:03:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:31:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1422, 1, 'A (重点客户)', '1', 'crm_customer_level', 0, 'primary', '', '', '1', to_date('2023-10-28 23:07:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:07:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1423, 2, 'B (普通客户)', '2', 'crm_customer_level', 0, 'info', '', '', '1', to_date('2023-10-28 23:07:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:07:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1424, 3, 'C (非优先客户)', '3', 'crm_customer_level', 0, 'default', '', '', '1', to_date('2023-10-28 23:07:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:07:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1425, 1, '促销', '1', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:08:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:08:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1426, 2, '搜索引擎', '2', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:08:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:08:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1427, 3, '广告', '3', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:08:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:08:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1428, 4, '转介绍', '4', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:08:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:08:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1429, 5, '线上注册', '5', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1430, 6, '线上咨询', '6', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:09:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:09:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1431, 7, '预约上门', '7', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:09:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:09:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1432, 8, '陌拜', '8', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:10:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:10:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1433, 9, '电话咨询', '9', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:10:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:10:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1434, 10, '邮件咨询', '10', 'crm_customer_source', 0, 'default', '', '', '1', to_date('2023-10-28 23:10:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 23:10:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1435, 10, 'Gitee', '10', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:04:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:04:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1436, 20, '钉钉', '20', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:04:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:04:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1437, 30, '企业微信', '30', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:05:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:05:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1438, 31, '微信公众平台', '31', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:05:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:05:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1439, 32, '微信开放平台', '32', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:05:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:05:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1440, 34, '微信小程序', '34', 'system_social_type', 0, '', '', '', '1', to_date('2023-11-04 13:05:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:07:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1441, 1, '上架', '1', 'crm_product_status', 0, 'success', '', '', '1', to_date('2023-10-30 21:49:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-30 21:49:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1442, 0, '下架', '0', 'crm_product_status', 0, 'success', '', '', '1', to_date('2023-10-30 21:49:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-30 21:49:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1443, 15, '子表', '15', 'infra_codegen_template_type', 0, 'default', '', '', '1', to_date('2023-11-13 23:06:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-13 23:06:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1444, 10, '主表(标准模式)', '10', 'infra_codegen_template_type', 0, 'default', '', '', '1', to_date('2023-11-14 12:32:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-14 12:32:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1445, 11, '主表(ERP 模式)', '11', 'infra_codegen_template_type', 0, 'default', '', '', '1', to_date('2023-11-14 12:33:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-14 12:33:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1446, 12, '主表(内嵌模式)', '12', 'infra_codegen_template_type', 0, '', '', '', '1', to_date('2023-11-14 12:33:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-14 12:33:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1447, 1, '负责人', '1', 'crm_permission_level', 0, 'default', '', '', '1', to_date('2023-11-30 09:53:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 09:53:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1448, 2, '只读', '2', 'crm_permission_level', 0, '', '', '', '1', to_date('2023-11-30 09:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 09:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1449, 3, '读写', '3', 'crm_permission_level', 0, '', '', '', '1', to_date('2023-11-30 09:53:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 09:53:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1450, 0, '未提交', '0', 'crm_audit_status', 0, '', '', '', '1', to_date('2023-11-30 18:56:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:56:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1451, 10, '审批中', '10', 'crm_audit_status', 0, '', '', '', '1', to_date('2023-11-30 18:57:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:57:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1452, 20, '审核通过', '20', 'crm_audit_status', 0, '', '', '', '1', to_date('2023-11-30 18:57:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:57:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1453, 30, '审核不通过', '30', 'crm_audit_status', 0, '', '', '', '1', to_date('2023-11-30 18:57:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:57:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1454, 40, '已取消', '40', 'crm_audit_status', 0, '', '', '', '1', to_date('2023-11-30 18:57:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:57:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1456, 1, '支票', '1', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:54:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:54:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1457, 2, '现金', '2', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:54:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:54:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1458, 3, '邮政汇款', '3', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:54:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:54:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1459, 4, '电汇', '4', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:55:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:55:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1460, 5, '网上转账', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', to_date('2023-10-18 21:55:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:55:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1461, 1, '个', '1', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:02:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:02:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1462, 2, '块', '2', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:02:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:02:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1463, 3, '只', '3', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:02:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:02:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1464, 4, '把', '4', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1465, 5, '枚', '5', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1466, 6, '瓶', '6', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1467, 7, '盒', '7', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1468, 8, '台', '8', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1469, 9, '吨', '9', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1470, 10, '千克', '10', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:04:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:04:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1471, 11, '米', '11', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:04:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:04:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1472, 12, '箱', '12', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:04:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:04:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1473, 13, '套', '13', 'crm_product_unit', 0, '', '', '', '1', to_date('2023-12-05 23:04:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:04:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1474, 1, '打电话', '1', 'crm_follow_up_type', 0, '', '', '', '1', to_date('2024-01-15 20:48:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-15 20:48:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1475, 2, '发短信', '2', 'crm_follow_up_type', 0, '', '', '', '1', to_date('2024-01-15 20:48:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-15 20:48:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1476, 3, '上门拜访', '3', 'crm_follow_up_type', 0, '', '', '', '1', to_date('2024-01-15 20:49:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-15 20:49:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1477, 4, '微信沟通', '4', 'crm_follow_up_type', 0, '', '', '', '1', to_date('2024-01-15 20:49:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-15 20:49:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1478, 4, '钱包余额', '4', 'pay_transfer_type', 0, 'info', '', '', '1', to_date('2023-10-28 16:28:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:28:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1479, 3, '银行卡', '3', 'pay_transfer_type', 0, 'default', '', '', '1', to_date('2023-10-28 16:28:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:28:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1480, 2, '微信余额', '2', 'pay_transfer_type', 0, 'info', '', '', '1', to_date('2023-10-28 16:28:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:28:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1481, 1, '支付宝余额', '1', 'pay_transfer_type', 0, 'default', '', '', '1', to_date('2023-10-28 16:27:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:27:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1482, 4, '转账失败', '30', 'pay_transfer_status', 0, 'warning', '', '', '1', to_date('2023-10-28 16:24:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:24:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1483, 3, '转账成功', '20', 'pay_transfer_status', 0, 'success', '', '', '1', to_date('2023-10-28 16:23:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:23:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1484, 2, '转账进行中', '10', 'pay_transfer_status', 0, 'info', '', '', '1', to_date('2023-10-28 16:23:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:23:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1485, 1, '等待转账', '0', 'pay_transfer_status', 0, 'default', '', '', '1', to_date('2023-10-28 16:21:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:23:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1486, 10, '其它入库', '10', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-05 18:07:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 18:07:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1487, 11, '其它入库(作废)', '11', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-05 18:08:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 19:20:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1488, 20, '其它出库', '20', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-05 18:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 18:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1489, 21, '其它出库(作废)', '21', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-05 18:09:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 19:20:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1490, 10, '未审核', '10', 'erp_audit_status', 0, 'default', '', '', '1', to_date('2024-02-06 00:00:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 00:00:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1491, 20, '已审核', '20', 'erp_audit_status', 0, 'success', '', '', '1', to_date('2024-02-06 00:00:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 00:00:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1492, 30, '调拨入库', '30', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-07 20:34:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 12:36:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1493, 31, '调拨入库(作废)', '31', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-07 20:34:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 20:37:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1494, 32, '调拨出库', '32', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-07 20:34:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 12:36:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1495, 33, '调拨出库(作废)', '33', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-07 20:34:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 20:37:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1496, 40, '盘盈入库', '40', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-08 08:53:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-08 08:53:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1497, 41, '盘盈入库(作废)', '41', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-08 08:53:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 19:40:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1498, 42, '盘亏出库', '42', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-08 08:54:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-08 08:54:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1499, 43, '盘亏出库(作废)', '43', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-08 08:54:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 19:40:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1500, 50, '销售出库', '50', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-11 21:47:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-11 21:50:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1501, 51, '销售出库(作废)', '51', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-11 21:47:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-11 21:51:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1502, 60, '销售退货入库', '60', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-12 06:51:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 06:51:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1503, 61, '销售退货入库(作废)', '61', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-12 06:51:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 06:51:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1504, 70, '采购入库', '70', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-16 13:10:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 13:10:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1505, 71, '采购入库(作废)', '71', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-16 13:10:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 19:40:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1506, 80, '采购退货出库', '80', 'erp_stock_record_biz_type', 0, '', '', '', '1', to_date('2024-02-16 13:10:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 13:10:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1507, 81, '采购退货出库(作废)', '81', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', to_date('2024-02-16 13:10:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 19:40:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1509, 3, '审批不通过', '3', 'bpm_process_instance_status', 0, 'danger', '', '', '1', to_date('2024-03-16 16:12:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-16 16:12:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1510, 4, '已取消', '4', 'bpm_process_instance_status', 0, 'warning', '', '', '1', to_date('2024-03-16 16:12:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-16 16:12:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1511, 5, '已退回', '5', 'bpm_task_status', 0, 'warning', '', '', '1', to_date('2024-03-16 19:10:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1512, 6, '委派中', '6', 'bpm_task_status', 0, 'primary', '', '', '1', to_date('2024-03-17 10:06:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1513, 7, '审批通过中', '7', 'bpm_task_status', 0, 'success', '', '', '1', to_date('2024-03-17 10:06:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1514, 0, '待审批', '0', 'bpm_task_status', 0, 'info', '', '', '1', to_date('2024-03-17 10:07:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:41:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1515, 35, '发起人自选', '35', 'bpm_task_candidate_strategy', 0, '', '', '', '1', to_date('2024-03-22 19:45:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-22 19:45:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1516, 1, '执行监听器', 'execution', 'bpm_process_listener_type', 0, 'primary', '', '', '1', to_date('2024-03-23 12:54:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:14:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1517, 1, '任务监听器', 'task', 'bpm_process_listener_type', 0, 'success', '', '', '1', to_date('2024-03-23 12:54:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:14:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1526, 1, 'Java 类', 'class', 'bpm_process_listener_value_type', 0, 'primary', '', '', '1', to_date('2024-03-23 15:08:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:14:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1527, 2, '表达式', 'expression', 'bpm_process_listener_value_type', 0, 'success', '', '', '1', to_date('2024-03-23 15:09:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1528, 3, '代理表达式', 'delegateExpression', 'bpm_process_listener_value_type', 0, 'info', '', '', '1', to_date('2024-03-23 15:11:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:14:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1529, 1, '天', '1', 'date_interval', 0, '', '', '', '1', to_date('2024-03-29 22:50:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:50:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1530, 2, '周', '2', 'date_interval', 0, '', '', '', '1', to_date('2024-03-29 22:50:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:50:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1531, 3, '月', '3', 'date_interval', 0, '', '', '', '1', to_date('2024-03-29 22:50:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:50:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1532, 4, '季度', '4', 'date_interval', 0, '', '', '', '1', to_date('2024-03-29 22:51:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:51:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1533, 5, '年', '5', 'date_interval', 0, '', '', '', '1', to_date('2024-03-29 22:51:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:51:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1534, 1, '赢单', '1', 'crm_business_end_status_type', 0, 'success', '', '', '1', to_date('2024-04-13 23:26:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-13 23:26:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1535, 2, '输单', '2', 'crm_business_end_status_type', 0, 'primary', '', '', '1', to_date('2024-04-13 23:27:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-13 23:27:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1536, 3, '无效', '3', 'crm_business_end_status_type', 0, 'info', '', '', '1', to_date('2024-04-13 23:27:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-13 23:27:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_dict_data_seq + START WITH 1537 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_dict_type +-- ------------------------------ +CREATE TABLE system_dict_type +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + type varchar2(100) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + remark varchar2(500) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + deleted_time date DEFAULT NULL NULL +); --- ---------------------------- --- Records of INFRA_JOB --- ---------------------------- -INSERT INTO "INFRA_JOB" ("ID", "NAME", "STATUS", "HANDLER_NAME", "HANDLER_PARAM", "CRON_EXPRESSION", "RETRY_COUNT", "RETRY_INTERVAL", "MONITOR_TIMEOUT", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('0', '用户 Session 超时 Job', '1', 'userSessionTimeoutJob', NULL, '0 * * * * ? *', '3', '2000', '0', '1', TO_DATE('2022-05-01 20:44:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 20:44:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; +ALTER TABLE system_dict_type + ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); + +COMMENT ON COLUMN system_dict_type.id IS '字典主键'; +COMMENT ON COLUMN system_dict_type.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_type.remark IS '备注'; +COMMENT ON COLUMN system_dict_type.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_type.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_type.deleted_time IS '删除时间'; +COMMENT ON TABLE system_dict_type IS '字典类型表'; + +-- @formatter:off +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, '用户性别', 'system_user_sex', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-16 20:29:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, '参数类型', 'infra_config_type', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:36:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (7, '通知类型', 'system_notice_type', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:35:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (9, '操作类型', 'infra_operate_type', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-14 12:44:01', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (10, '系统状态', 'common_status', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:21:28', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (11, 'Boolean 是否类型', 'infra_boolean_string', 0, 'boolean 转是否', '', to_date('2021-01-19 03:20:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:37:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (104, '登陆结果', 'system_login_result', 0, '登陆结果', '', to_date('2021-01-18 06:17:11', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:36:00', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (106, '代码生成模板类型', 'infra_codegen_template_type', 0, NULL, '', to_date('2021-02-05 07:08:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-16 20:26:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (107, '定时任务状态', 'infra_job_status', 0, NULL, '', to_date('2021-02-07 07:44:16', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:51:11', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (108, '定时任务日志状态', 'infra_job_log_status', 0, NULL, '', to_date('2021-02-08 10:03:51', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:50:43', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (109, '用户类型', 'user_type', 0, NULL, '', to_date('2021-02-26 00:15:51', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-02-26 00:15:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (110, 'API 异常数据的处理状态', 'infra_api_error_log_process_status', 0, NULL, '', to_date('2021-02-26 07:07:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:50:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (111, '短信渠道编码', 'system_sms_channel_code', 0, NULL, '1', to_date('2021-04-05 01:04:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 02:09:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (112, '短信模板的类型', 'system_sms_template_type', 0, NULL, '1', to_date('2021-04-05 21:50:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-01 16:35:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (113, '短信发送状态', 'system_sms_send_status', 0, NULL, '1', to_date('2021-04-11 20:18:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-01 16:35:09', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (114, '短信接收状态', 'system_sms_receive_status', 0, NULL, '1', to_date('2021-04-11 20:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-01 16:35:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (116, '登陆日志的类型', 'system_login_type', 0, '登陆日志的类型', '1', to_date('2021-10-06 00:50:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-01 16:35:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (117, 'OA 请假类型', 'bpm_oa_leave_type', 0, NULL, '1', to_date('2021-09-21 22:34:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-01-22 10:41:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (130, '支付渠道编码类型', 'pay_channel_code', 0, '支付渠道的编码', '1', to_date('2021-12-03 10:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-10 10:11:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (131, '支付回调状态', 'pay_notify_status', 0, '支付回调状态(包括退款回调)', '1', to_date('2021-12-03 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 18:09:43', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (132, '支付订单状态', 'pay_order_status', 0, '支付订单状态', '1', to_date('2021-12-03 11:17:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2021-12-03 11:17:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (134, '退款订单状态', 'pay_refund_status', 0, '退款订单状态', '1', to_date('2021-12-10 16:42:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-19 10:13:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (139, '流程实例的状态', 'bpm_process_instance_status', 0, '流程实例的状态', '1', to_date('2022-01-07 23:46:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-01-07 23:46:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (140, '流程实例的结果', 'bpm_task_status', 0, '流程实例的结果', '1', to_date('2022-01-07 23:48:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-08 22:42:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (141, '流程的表单类型', 'bpm_model_form_type', 0, '流程的表单类型', '103', to_date('2022-01-11 23:50:45', 'SYYYY-MM-DD HH24:MI:SS'), '103', to_date('2022-01-11 23:50:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (142, '任务分配规则的类型', 'bpm_task_candidate_strategy', 0, 'BPM 任务的候选人的策略', '103', to_date('2022-01-12 23:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '103', to_date('2024-03-06 02:53:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (144, '代码生成的场景枚举', 'infra_codegen_scene', 0, '代码生成的场景枚举', '1', to_date('2022-02-02 13:14:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-10 16:33:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (145, '角色类型', 'system_role_type', 0, '角色类型', '1', to_date('2022-02-16 13:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-16 13:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (146, '文件存储器', 'infra_file_storage', 0, '文件存储器', '1', to_date('2022-03-15 00:24:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-15 00:24:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (147, 'OAuth 2.0 授权类型', 'system_oauth2_grant_type', 0, 'OAuth 2.0 授权类型(模式)', '1', to_date('2022-05-12 00:20:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 16:25:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (149, '商品 SPU 状态', 'product_spu_status', 0, '商品 SPU 状态', '1', to_date('2022-10-24 21:19:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-10-24 21:19:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (150, '优惠类型', 'promotion_discount_type', 0, '优惠类型', '1', to_date('2022-11-01 12:46:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-01 12:46:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (151, '优惠劵模板的有限期类型', 'promotion_coupon_template_validity_type', 0, '优惠劵模板的有限期类型', '1', to_date('2022-11-02 00:06:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 00:08:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (152, '营销的商品范围', 'promotion_product_scope', 0, '营销的商品范围', '1', to_date('2022-11-02 00:28:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-02 00:28:01', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (153, '优惠劵的状态', 'promotion_coupon_status', 0, '优惠劵的状态', '1', to_date('2022-11-04 00:14:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 00:14:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (154, '优惠劵的领取方式', 'promotion_coupon_take_type', 0, '优惠劵的领取方式', '1', to_date('2022-11-04 19:12:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 19:12:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (155, '促销活动的状态', 'promotion_activity_status', 0, '促销活动的状态', '1', to_date('2022-11-04 22:54:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:54:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (156, '营销的条件类型', 'promotion_condition_type', 0, '营销的条件类型', '1', to_date('2022-11-04 22:59:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-04 22:59:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (157, '交易售后状态', 'trade_after_sale_status', 0, '交易售后状态', '1', to_date('2022-11-19 20:52:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 20:52:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (158, '交易售后的类型', 'trade_after_sale_type', 0, '交易售后的类型', '1', to_date('2022-11-19 21:04:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:04:09', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (159, '交易售后的方式', 'trade_after_sale_way', 0, '交易售后的方式', '1', to_date('2022-11-19 21:39:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-19 21:39:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (160, '终端', 'terminal', 0, '终端', '1', to_date('2022-12-10 10:50:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 10:53:11', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (161, '交易订单的类型', 'trade_order_type', 0, '交易订单的类型', '1', to_date('2022-12-10 16:33:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:33:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (162, '交易订单的状态', 'trade_order_status', 0, '交易订单的状态', '1', to_date('2022-12-10 16:48:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 16:48:44', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (163, '交易订单项的售后状态', 'trade_order_item_after_sale_status', 0, '交易订单项的售后状态', '1', to_date('2022-12-10 20:58:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 20:58:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (164, '公众号自动回复的请求关键字匹配模式', 'mp_auto_reply_request_match', 0, '公众号自动回复的请求关键字匹配模式', '1', to_date('2023-01-16 23:29:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 23:29:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (165, '公众号的消息类型', 'mp_message_type', 0, '公众号的消息类型', '1', to_date('2023-01-17 22:17:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 22:17:09', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, '邮件发送状态', 'system_mail_send_status', 0, '邮件发送状态', '1', to_date('2023-01-26 09:53:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 09:53:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, '站内信模版的类型', 'system_notify_template_type', 0, '站内信模版的类型', '1', to_date('2023-01-28 10:35:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 10:35:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, '代码生成的前端类型', 'infra_codegen_front_type', 0, '', '1', to_date('2023-04-12 23:57:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-12 23:57:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (169, '商品的单位', 'product_unit', 0, '商品的单位', '1', to_date('2023-05-24 21:23:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-24 21:23:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, '快递计费方式', 'trade_delivery_express_charge_mode', 0, '用于商城交易模块配送管理', '1', to_date('2023-05-21 22:45:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:45:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, '积分业务类型', 'member_point_biz_type', 0, '', '1', to_date('2023-06-10 12:15:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-28 13:48:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, '支付通知类型', 'pay_notify_type', 0, NULL, '1', to_date('2023-07-20 12:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-20 12:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (174, '会员经验业务类型', 'member_experience_biz_type', 0, NULL, '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (175, '交易配送类型', 'trade_delivery_type', 0, '', '1', to_date('2023-08-23 00:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-23 00:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (176, '分佣模式', 'brokerage_enabled_condition', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (177, '分销关系绑定模式', 'brokerage_bind_mode', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (178, '佣金提现类型', 'brokerage_withdraw_type', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (179, '佣金记录业务类型', 'brokerage_record_biz_type', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (180, '佣金记录状态', 'brokerage_record_status', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (181, '佣金提现状态', 'brokerage_withdraw_status', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (182, '佣金提现银行', 'brokerage_bank_name', 0, NULL, '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (183, '砍价记录的状态', 'promotion_bargain_record_status', 0, '', '1', to_date('2023-10-05 10:41:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 10:41:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (184, '拼团记录的状态', 'promotion_combination_record_status', 0, '', '1', to_date('2023-10-08 07:24:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-08 07:24:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (185, '回款-回款方式', 'crm_receivable_return_type', 0, '回款-回款方式', '1', to_date('2023-10-18 21:54:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-18 21:54:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (186, 'CRM 客户行业', 'crm_customer_industry', 0, 'CRM 客户所属行业', '1', to_date('2023-10-28 22:57:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-18 23:30:22', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (187, '客户等级', 'crm_customer_level', 0, 'CRM 客户等级', '1', to_date('2023-10-28 22:59:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 15:11:16', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (188, '客户来源', 'crm_customer_source', 0, 'CRM 客户来源', '1', to_date('2023-10-28 23:00:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 15:11:16', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (600, 'Banner 位置', 'promotion_banner_position', 0, '', '1', to_date('2023-10-08 07:24:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:04:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (601, '社交类型', 'system_social_type', 0, '', '1', to_date('2023-11-04 13:03:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 13:03:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (604, '产品状态', 'crm_product_status', 0, '', '1', to_date('2023-10-30 21:47:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-30 21:48:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (605, 'CRM 数据权限的级别', 'crm_permission_level', 0, '', '1', to_date('2023-11-30 09:51:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 09:51:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (606, 'CRM 审批状态', 'crm_audit_status', 0, '', '1', to_date('2023-11-30 18:56:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-30 18:56:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (607, 'CRM 产品单位', 'crm_product_unit', 0, '', '1', to_date('2023-12-05 23:01:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 23:01:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (608, 'CRM 跟进方式', 'crm_follow_up_type', 0, '', '1', to_date('2024-01-15 20:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-15 20:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (609, '支付转账类型', 'pay_transfer_type', 0, '', '1', to_date('2023-10-28 16:27:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:27:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (610, '转账订单状态', 'pay_transfer_status', 0, '', '1', to_date('2023-10-28 16:18:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-28 16:18:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (611, 'ERP 库存明细的业务类型', 'erp_stock_record_biz_type', 0, 'ERP 库存明细的业务类型', '1', to_date('2024-02-05 18:07:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 18:07:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (612, 'ERP 审批状态', 'erp_audit_status', 0, '', '1', to_date('2024-02-06 00:00:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 00:00:07', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (613, 'BPM 监听器类型', 'bpm_process_listener_type', 0, '', '1', to_date('2024-03-23 12:52:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-09 15:54:28', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', to_date('2024-03-23 13:00:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 13:00:31', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (616, '时间间隔', 'date_interval', 0, '', '1', to_date('2024-03-29 22:50:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-29 22:50:09', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (619, 'CRM 商机结束状态类型', 'crm_business_end_status_type', 0, '', '1', to_date('2024-04-13 23:23:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-13 23:23:00', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_dict_type_seq + START WITH 620 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_login_log +-- ------------------------------ +CREATE TABLE system_login_log +( + id number NOT NULL, + log_type number NOT NULL, + trace_id varchar2(64) DEFAULT '' NULL, + user_id number DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + username varchar2(50) DEFAULT '' NULL, + result smallint NOT NULL, + user_ip varchar2(50) NOT NULL, + user_agent varchar2(512) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_JOB_LOG --- ---------------------------- -DROP TABLE "INFRA_JOB_LOG"; -CREATE TABLE "INFRA_JOB_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "JOB_ID" NUMBER(20,0) NOT NULL, - "HANDLER_NAME" NVARCHAR2(64), - "HANDLER_PARAM" NVARCHAR2(255), - "EXECUTE_INDEX" NUMBER(4,0) NOT NULL, - "BEGIN_TIME" DATE NOT NULL, - "END_TIME" DATE, - "DURATION" NUMBER(11,0), - "STATUS" NUMBER(4,0) NOT NULL, - "RESULT" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_JOB_LOG"."ID" IS '日志编号'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."JOB_ID" IS '任务编号'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."HANDLER_NAME" IS '处理器的名字'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."HANDLER_PARAM" IS '处理器的参数'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."EXECUTE_INDEX" IS '第几次执行'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."BEGIN_TIME" IS '开始执行时间'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."END_TIME" IS '结束执行时间'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."DURATION" IS '执行时长'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."STATUS" IS '任务状态'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."RESULT" IS '结果数据'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_JOB_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON TABLE "INFRA_JOB_LOG" IS '定时任务日志表'; +ALTER TABLE system_login_log + ADD CONSTRAINT pk_system_login_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_login_log.id IS '访问ID'; +COMMENT ON COLUMN system_login_log.log_type IS '日志类型'; +COMMENT ON COLUMN system_login_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_login_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_login_log.result IS '登陆结果'; +COMMENT ON COLUMN system_login_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN system_login_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_login_log IS '系统访问记录'; + +CREATE SEQUENCE system_login_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_mail_account +-- ------------------------------ +CREATE TABLE system_mail_account +( + id number NOT NULL, + mail varchar2(255) NOT NULL, + username varchar2(255) NOT NULL, + password varchar2(255) NOT NULL, + host varchar2(255) NOT NULL, + port number NOT NULL, + ssl_enable number(1, 0) DEFAULT '0' NOT NULL, + starttls_enable number(1, 0) DEFAULT '0' NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_JOB_LOG --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_mail_account + ADD CONSTRAINT pk_system_mail_account PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_account.id IS '主键'; +COMMENT ON COLUMN system_mail_account.mail IS '邮箱'; +COMMENT ON COLUMN system_mail_account.username IS '用户名'; +COMMENT ON COLUMN system_mail_account.password IS '密码'; +COMMENT ON COLUMN system_mail_account.host IS 'SMTP 服务器域名'; +COMMENT ON COLUMN system_mail_account.port IS 'SMTP 服务器端口'; +COMMENT ON COLUMN system_mail_account.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_account.update_time IS '更新时间'; +COMMENT ON TABLE system_mail_account IS '邮箱账号表'; + +-- @formatter:off +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', to_date('2023-01-25 17:39:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 09:13:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', to_date('2023-01-26 01:26:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-12 22:39:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, '0', '0', '1', to_date('2023-01-27 15:06:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-27 07:08:36', 'SYYYY-MM-DD HH24:MI:SS'), '1'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, '7685413x@qq.com', '2', '3', '4', 5, '1', '0', '1', to_date('2023-04-12 23:05:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-12 15:05:11', 'SYYYY-MM-DD HH24:MI:SS'), '1'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_mail_account_seq + START WITH 5 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_mail_log +-- ------------------------------ +CREATE TABLE system_mail_log +( + id number NOT NULL, + user_id number DEFAULT NULL NULL, + user_type smallint DEFAULT NULL NULL, + to_mail varchar2(255) NOT NULL, + account_id number NOT NULL, + from_mail varchar2(255) NOT NULL, + template_id number NOT NULL, + template_code varchar2(63) NOT NULL, + template_nickname varchar2(255) DEFAULT NULL NULL, + template_title varchar2(255) NOT NULL, + template_content varchar2(4000) NOT NULL, + template_params varchar2(255) NOT NULL, + send_status smallint DEFAULT 0 NOT NULL, + send_time date DEFAULT NULL NULL, + send_message_id varchar2(255) DEFAULT NULL NULL, + send_exception varchar2(4000) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for INFRA_TEST_DEMO --- ---------------------------- -DROP TABLE "INFRA_TEST_DEMO"; -CREATE TABLE "INFRA_TEST_DEMO" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(100), - "STATUS" NUMBER(4,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "CATEGORY" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."ID" IS '编号'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."NAME" IS '名字'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."STATUS" IS '状态'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."TYPE" IS '类型'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."CATEGORY" IS '分类'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."REMARK" IS '备注'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "INFRA_TEST_DEMO"."DELETED" IS '是否删除'; -COMMENT ON TABLE "INFRA_TEST_DEMO" IS '字典类型表'; +ALTER TABLE system_mail_log + ADD CONSTRAINT pk_system_mail_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_log.id IS '编号'; +COMMENT ON COLUMN system_mail_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_mail_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_mail_log.to_mail IS '接收邮箱地址'; +COMMENT ON COLUMN system_mail_log.account_id IS '邮箱账号编号'; +COMMENT ON COLUMN system_mail_log.from_mail IS '发送邮箱地址'; +COMMENT ON COLUMN system_mail_log.template_id IS '模板编号'; +COMMENT ON COLUMN system_mail_log.template_code IS '模板编码'; +COMMENT ON COLUMN system_mail_log.template_nickname IS '模版发送人名称'; +COMMENT ON COLUMN system_mail_log.template_title IS '邮件标题'; +COMMENT ON COLUMN system_mail_log.template_content IS '邮件内容'; +COMMENT ON COLUMN system_mail_log.template_params IS '邮件参数'; +COMMENT ON COLUMN system_mail_log.send_status IS '发送状态'; +COMMENT ON COLUMN system_mail_log.send_time IS '发送时间'; +COMMENT ON COLUMN system_mail_log.send_message_id IS '发送返回的消息 ID'; +COMMENT ON COLUMN system_mail_log.send_exception IS '发送异常'; +COMMENT ON COLUMN system_mail_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; +COMMENT ON TABLE system_mail_log IS '邮件日志表'; + +CREATE SEQUENCE system_mail_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_mail_template +-- ------------------------------ +CREATE TABLE system_mail_template +( + id number NOT NULL, + name varchar2(63) NOT NULL, + code varchar2(63) NOT NULL, + account_id number NOT NULL, + nickname varchar2(255) DEFAULT NULL NULL, + title varchar2(255) NOT NULL, + content varchar2(4000) NOT NULL, + params varchar2(255) NOT NULL, + status smallint NOT NULL, + remark varchar2(255) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of INFRA_TEST_DEMO --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_mail_template + ADD CONSTRAINT pk_system_mail_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_template.id IS '编号'; +COMMENT ON COLUMN system_mail_template.name IS '模板名称'; +COMMENT ON COLUMN system_mail_template.code IS '模板编码'; +COMMENT ON COLUMN system_mail_template.account_id IS '发送的邮箱账号编号'; +COMMENT ON COLUMN system_mail_template.nickname IS '发送人名称'; +COMMENT ON COLUMN system_mail_template.title IS '模板标题'; +COMMENT ON COLUMN system_mail_template.content IS '模板内容'; +COMMENT ON COLUMN system_mail_template.params IS '参数数组'; +COMMENT ON COLUMN system_mail_template.status IS '开启状态'; +COMMENT ON COLUMN system_mail_template.remark IS '备注'; +COMMENT ON COLUMN system_mail_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_template.update_time IS '更新时间'; +COMMENT ON TABLE system_mail_template IS '邮件模版表'; + +-- @formatter:off +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '

您的验证码是{code},名字是{name}

', '["code","name"]', 0, '3', '1', to_date('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 19:51:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', to_date('2023-01-26 01:27:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-27 10:32:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', to_date('2023-01-27 15:50:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-27 16:34:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_mail_template_seq + START WITH 16 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_menu +-- ------------------------------ +CREATE TABLE system_menu +( + id number NOT NULL, + name varchar2(50) NOT NULL, + permission varchar2(100) DEFAULT '' NULL, + type smallint NOT NULL, + sort number DEFAULT 0 NOT NULL, + parent_id number DEFAULT 0 NOT NULL, + path varchar2(200) DEFAULT '' NULL, + icon varchar2(100) DEFAULT '#' NULL, + component varchar2(255) DEFAULT NULL NULL, + component_name varchar2(255) DEFAULT NULL NULL, + status smallint DEFAULT 0 NOT NULL, + visible number(1, 0) DEFAULT '1' NOT NULL, + keep_alive number(1, 0) DEFAULT '1' NOT NULL, + always_show number(1, 0) DEFAULT '1' NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for MEMBER_USER --- ---------------------------- -DROP TABLE "MEMBER_USER"; -CREATE TABLE "MEMBER_USER" ( - "ID" NUMBER(20,0) NOT NULL, - "NICKNAME" NVARCHAR2(30), - "AVATAR" NVARCHAR2(255), - "STATUS" NUMBER(4,0) NOT NULL, - "MOBILE" NVARCHAR2(11), - "PASSWORD" NVARCHAR2(100), - "REGISTER_IP" NVARCHAR2(32), - "LOGIN_IP" NVARCHAR2(50), - "LOGIN_DATE" DATE, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "MEMBER_USER"."ID" IS '编号'; -COMMENT ON COLUMN "MEMBER_USER"."NICKNAME" IS '用户昵称'; -COMMENT ON COLUMN "MEMBER_USER"."AVATAR" IS '头像'; -COMMENT ON COLUMN "MEMBER_USER"."STATUS" IS '状态'; -COMMENT ON COLUMN "MEMBER_USER"."MOBILE" IS '手机号'; -COMMENT ON COLUMN "MEMBER_USER"."PASSWORD" IS '密码'; -COMMENT ON COLUMN "MEMBER_USER"."REGISTER_IP" IS '注册 IP'; -COMMENT ON COLUMN "MEMBER_USER"."LOGIN_IP" IS '最后登录IP'; -COMMENT ON COLUMN "MEMBER_USER"."LOGIN_DATE" IS '最后登录时间'; -COMMENT ON COLUMN "MEMBER_USER"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "MEMBER_USER"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "MEMBER_USER"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "MEMBER_USER"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "MEMBER_USER"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "MEMBER_USER" IS '用户'; +ALTER TABLE system_menu + ADD CONSTRAINT pk_system_menu PRIMARY KEY (id); + +COMMENT ON COLUMN system_menu.id IS '菜单ID'; +COMMENT ON COLUMN system_menu.name IS '菜单名称'; +COMMENT ON COLUMN system_menu.type IS '菜单类型'; +COMMENT ON COLUMN system_menu.sort IS '显示顺序'; +COMMENT ON COLUMN system_menu.parent_id IS '父菜单ID'; +COMMENT ON COLUMN system_menu.component IS '组件路径'; +COMMENT ON COLUMN system_menu.component_name IS '组件名'; +COMMENT ON COLUMN system_menu.status IS '菜单状态'; +COMMENT ON COLUMN system_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_menu.update_time IS '更新时间'; +COMMENT ON TABLE system_menu IS '菜单权限表'; + +-- @formatter:off +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, '系统管理', '', 1, 10, 0, '/system', 'ep:tools', NULL, NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:04:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, '基础设施', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-01 08:28:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5, 'OA 示例', '', 1, 40, 1185, 'oa', 'fa:road', NULL, NULL, 0, '1', '1', '1', 'admin', to_date('2021-09-20 16:26:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:38:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (100, '用户管理', 'system:user:list', 2, 1, 1, 'user', 'ep:avatar', 'system/user/index', 'SystemUser', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:02:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (101, '角色管理', '', 2, 2, 1, 'role', 'ep:user', 'system/role/index', 'SystemRole', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:03:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (102, '菜单管理', '', 2, 3, 1, 'menu', 'ep:menu', 'system/menu/index', 'SystemMenu', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:03:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (103, '部门管理', '', 2, 4, 1, 'dept', 'fa:address-card', 'system/dept/index', 'SystemDept', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:06:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (104, '岗位管理', '', 2, 5, 1, 'post', 'fa:address-book-o', 'system/post/index', 'SystemPost', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:06:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (105, '字典管理', '', 2, 6, 1, 'dict', 'ep:collection', 'system/dict/index', 'SystemDictType', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:07:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (106, '配置管理', '', 2, 8, 2, 'config', 'fa:connectdevelop', 'infra/config/index', 'InfraConfig', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:02:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (107, '通知公告', '', 2, 4, 2739, 'notice', 'ep:takeaway-box', 'system/notice/index', 'SystemNotice', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-22 23:56:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (108, '审计日志', '', 1, 9, 1, 'log', 'ep:document-copy', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (109, '令牌管理', '', 2, 2, 1261, 'token', 'fa:key', 'system/oauth2/token/index', 'SystemTokenClient', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:13:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (110, '定时任务', '', 2, 7, 2, 'job', 'fa-solid:tasks', 'infra/job/index', 'InfraJob', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:57:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (111, 'MySQL 监控', '', 2, 1, 2740, 'druid', 'fa-solid:box', 'infra/druid/index', 'InfraDruid', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:05:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (112, 'Java 监控', '', 2, 3, 2740, 'admin-server', 'ep:coffee-cup', 'infra/server/index', 'InfraAdminServer', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:06:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (113, 'Redis 监控', '', 2, 2, 2740, 'redis', 'fa:reddit-square', 'infra/redis/index', 'InfraRedis', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:06:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (114, '表单构建', 'infra:build:list', 2, 2, 2, 'build', 'fa:wpforms', 'infra/build/index', 'InfraBuild', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:51:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (115, '代码生成', 'infra:codegen:query', 2, 1, 2, 'codegen', 'ep:document-copy', 'infra/codegen/index', 'InfraCodegen', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:51:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (116, 'API 接口', 'infra:swagger:list', 2, 3, 2, 'swagger', 'fa:fighter-jet', 'infra/swagger/index', 'InfraSwagger', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:01:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (500, '操作日志', '', 2, 1, 108, 'operate-log', 'ep:position', 'system/operatelog/index', 'SystemOperateLog', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:09:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (501, '登录日志', '', 2, 2, 108, 'login-log', 'ep:promotion', 'system/loginlog/index', 'SystemLoginLog', 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:10:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1001, '用户查询', 'system:user:query', 3, 1, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1002, '用户新增', 'system:user:create', 3, 2, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1003, '用户修改', 'system:user:update', 3, 3, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1004, '用户删除', 'system:user:delete', 3, 4, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1005, '用户导出', 'system:user:export', 3, 5, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1006, '用户导入', 'system:user:import', 3, 6, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1007, '重置密码', 'system:user:update-password', 3, 7, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1008, '角色查询', 'system:role:query', 3, 1, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1009, '角色新增', 'system:role:create', 3, 2, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1010, '角色修改', 'system:role:update', 3, 3, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1011, '角色删除', 'system:role:delete', 3, 4, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1012, '角色导出', 'system:role:export', 3, 5, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1013, '菜单查询', 'system:menu:query', 3, 1, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1014, '菜单新增', 'system:menu:create', 3, 2, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1015, '菜单修改', 'system:menu:update', 3, 3, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1016, '菜单删除', 'system:menu:delete', 3, 4, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1017, '部门查询', 'system:dept:query', 3, 1, 103, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1018, '部门新增', 'system:dept:create', 3, 2, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1019, '部门修改', 'system:dept:update', 3, 3, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1020, '部门删除', 'system:dept:delete', 3, 4, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1021, '岗位查询', 'system:post:query', 3, 1, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1022, '岗位新增', 'system:post:create', 3, 2, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1023, '岗位修改', 'system:post:update', 3, 3, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1024, '岗位删除', 'system:post:delete', 3, 4, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1025, '岗位导出', 'system:post:export', 3, 5, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1026, '字典查询', 'system:dict:query', 3, 1, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1027, '字典新增', 'system:dict:create', 3, 2, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1028, '字典修改', 'system:dict:update', 3, 3, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1029, '字典删除', 'system:dict:delete', 3, 4, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1030, '字典导出', 'system:dict:export', 3, 5, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1031, '配置查询', 'infra:config:query', 3, 1, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1032, '配置新增', 'infra:config:create', 3, 2, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1033, '配置修改', 'infra:config:update', 3, 3, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1034, '配置删除', 'infra:config:delete', 3, 4, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1035, '配置导出', 'infra:config:export', 3, 5, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1036, '公告查询', 'system:notice:query', 3, 1, 107, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1037, '公告新增', 'system:notice:create', 3, 2, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1038, '公告修改', 'system:notice:update', 3, 3, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1039, '公告删除', 'system:notice:delete', 3, 4, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1040, '操作查询', 'system:operate-log:query', 3, 1, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1042, '日志导出', 'system:operate-log:export', 3, 2, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1043, '登录查询', 'system:login-log:query', 3, 1, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1045, '日志导出', 'system:login-log:export', 3, 3, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1046, '令牌列表', 'system:oauth2-token:page', 3, 1, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-09 23:54:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1048, '令牌删除', 'system:oauth2-token:delete', 3, 2, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-09 23:54:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1050, '任务新增', 'infra:job:create', 3, 2, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1051, '任务修改', 'infra:job:update', 3, 3, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1052, '任务删除', 'infra:job:delete', 3, 4, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1053, '状态修改', 'infra:job:update', 3, 5, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1054, '任务导出', 'infra:job:export', 3, 7, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1056, '生成修改', 'infra:codegen:update', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1057, '生成删除', 'infra:codegen:delete', 3, 3, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1058, '导入代码', 'infra:codegen:create', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1059, '预览代码', 'infra:codegen:preview', 3, 4, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1060, '生成代码', 'infra:codegen:download', 3, 5, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1063, '设置角色菜单权限', 'system:permission:assign-role-menu', 3, 6, 101, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-01-06 17:53:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1064, '设置角色数据权限', 'system:permission:assign-role-data-scope', 3, 7, 101, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-01-06 17:56:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1065, '设置用户角色', 'system:permission:assign-user-role', 3, 8, 101, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-01-07 10:23:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1066, '获得 Redis 监控信息', 'infra:redis:get-monitor-info', 3, 1, 113, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-01-26 01:02:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1067, '获得 Redis Key 列表', 'infra:redis:get-key-list', 3, 2, 113, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-01-26 01:02:52', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1070, '代码生成案例', '', 1, 1, 2, 'demo', 'ep:aim', 'infra/testDemo/index', NULL, 0, '1', '1', '1', '', to_date('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:45:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1075, '任务触发', 'infra:job:trigger', 3, 8, 110, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-02-07 13:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1077, '链路追踪', '', 2, 4, 2740, 'skywalking', 'fa:eye', 'infra/skywalking/index', 'InfraSkyWalking', 0, '1', '1', '1', '', to_date('2021-02-08 20:41:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1078, '访问日志', '', 2, 1, 1083, 'api-access-log', 'ep:place', 'infra/apiAccessLog/index', 'InfraApiAccessLog', 0, '1', '1', '1', '', to_date('2021-02-26 01:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:54:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1082, '日志导出', 'infra:api-access-log:export', 3, 2, 1078, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-02-26 01:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1083, 'API 日志', '', 2, 4, 2, 'log', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '', to_date('2021-02-26 02:18:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-22 23:58:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1084, '错误日志', 'infra:api-error-log:query', 2, 2, 1083, 'api-error-log', 'ep:warning-filled', 'infra/apiErrorLog/index', 'InfraApiErrorLog', 0, '1', '1', '1', '', to_date('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:55:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1085, '日志处理', 'infra:api-error-log:update-status', 3, 2, 1084, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1086, '日志导出', 'infra:api-error-log:export', 3, 3, 1084, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1087, '任务查询', 'infra:job:query', 3, 1, 110, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-03-10 01:26:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1088, '日志查询', 'infra:api-access-log:query', 3, 1, 1078, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-03-10 01:28:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1089, '日志查询', 'infra:api-error-log:query', 3, 1, 1084, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-03-10 01:29:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1090, '文件列表', '', 2, 5, 1243, 'file', 'ep:upload-filled', 'infra/file/index', 'InfraFile', 0, '1', '1', '1', '', to_date('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:53:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1091, '文件查询', 'infra:file:query', 3, 1, 1090, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1092, '文件删除', 'infra:file:delete', 3, 4, 1090, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1093, '短信管理', '', 1, 1, 2739, 'sms', 'ep:message', NULL, NULL, 0, '1', '1', '1', '1', to_date('2021-04-05 01:10:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-22 23:56:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1094, '短信渠道', '', 2, 0, 1093, 'sms-channel', 'fa:stack-exchange', 'system/sms/channel/index', 'SystemSmsChannel', 0, '1', '1', '1', '', to_date('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:15:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1095, '短信渠道查询', 'system:sms-channel:query', 3, 1, 1094, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1096, '短信渠道创建', 'system:sms-channel:create', 3, 2, 1094, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1097, '短信渠道更新', 'system:sms-channel:update', 3, 3, 1094, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1098, '短信渠道删除', 'system:sms-channel:delete', 3, 4, 1094, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1100, '短信模板', '', 2, 1, 1093, 'sms-template', 'ep:connection', 'system/sms/template/index', 'SystemSmsTemplate', 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:16:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1101, '短信模板查询', 'system:sms-template:query', 3, 1, 1100, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1102, '短信模板创建', 'system:sms-template:create', 3, 2, 1100, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1103, '短信模板更新', 'system:sms-template:update', 3, 3, 1100, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1104, '短信模板删除', 'system:sms-template:delete', 3, 4, 1100, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1105, '短信模板导出', 'system:sms-template:export', 3, 5, 1100, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1106, '发送测试短信', 'system:sms-template:send-sms', 3, 6, 1100, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-04-11 00:26:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1107, '短信日志', '', 2, 2, 1093, 'sms-log', 'fa:edit', 'system/sms/log/index', 'SystemSmsLog', 0, '1', '1', '1', '', to_date('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:49:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1108, '短信日志查询', 'system:sms-log:query', 3, 1, 1107, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1109, '短信日志导出', 'system:sms-log:export', 3, 5, 1107, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1117, '支付管理', '', 1, 30, 0, '/pay', 'ep:money', NULL, NULL, 0, '1', '1', '1', '1', to_date('2021-12-25 16:43:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:58:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1118, '请假查询', '', 2, 0, 5, 'leave', 'fa:leanpub', 'bpm/oa/leave/index', 'BpmOALeave', 0, '1', '1', '1', '', to_date('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:38:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1119, '请假申请查询', 'bpm:oa-leave:query', 3, 1, 1118, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1120, '请假申请创建', 'bpm:oa-leave:create', 3, 2, 1118, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1126, '应用信息', '', 2, 1, 1117, 'app', 'fa:apple', 'pay/app/index', 'PayApp', 0, '1', '1', '1', '', to_date('2021-11-10 01:13:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:59:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1127, '支付应用信息查询', 'pay:app:query', 3, 1, 1126, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1128, '支付应用信息创建', 'pay:app:create', 3, 2, 1126, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1129, '支付应用信息更新', 'pay:app:update', 3, 3, 1126, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1130, '支付应用信息删除', 'pay:app:delete', 3, 4, 1126, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1132, '秘钥解析', 'pay:channel:parsing', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-11-08 15:15:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1133, '支付商户信息查询', 'pay:merchant:query', 3, 1, 1132, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1134, '支付商户信息创建', 'pay:merchant:create', 3, 2, 1132, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1135, '支付商户信息更新', 'pay:merchant:update', 3, 3, 1132, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1136, '支付商户信息删除', 'pay:merchant:delete', 3, 4, 1132, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1137, '支付商户信息导出', 'pay:merchant:export', 3, 5, 1132, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1138, '租户列表', '', 2, 0, 1224, 'list', 'ep:house', 'system/tenant/index', 'SystemTenant', 0, '1', '1', '1', '', to_date('2021-12-14 12:31:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:01:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1139, '租户查询', 'system:tenant:query', 3, 1, 1138, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1140, '租户创建', 'system:tenant:create', 3, 2, 1138, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1141, '租户更新', 'system:tenant:update', 3, 3, 1138, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1142, '租户删除', 'system:tenant:delete', 3, 4, 1138, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1143, '租户导出', 'system:tenant:export', 3, 5, 1138, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1150, '秘钥解析', '', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2021-11-08 15:15:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1161, '退款订单', '', 2, 3, 1117, 'refund', 'fa:registered', 'pay/refund/index', 'PayRefund', 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:59:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1162, '退款订单查询', 'pay:refund:query', 3, 1, 1161, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1163, '退款订单创建', 'pay:refund:create', 3, 2, 1161, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1164, '退款订单更新', 'pay:refund:update', 3, 3, 1161, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1165, '退款订单删除', 'pay:refund:delete', 3, 4, 1161, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1166, '退款订单导出', 'pay:refund:export', 3, 5, 1161, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1173, '支付订单', '', 2, 2, 1117, 'order', 'fa:cc-paypal', 'pay/order/index', 'PayOrder', 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:59:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1174, '支付订单查询', 'pay:order:query', 3, 1, 1173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1175, '支付订单创建', 'pay:order:create', 3, 2, 1173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1176, '支付订单更新', 'pay:order:update', 3, 3, 1173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1177, '支付订单删除', 'pay:order:delete', 3, 4, 1173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1178, '支付订单导出', 'pay:order:export', 3, 5, 1173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1185, '工作流程', '', 1, 50, 0, '/bpm', 'fa:medium', NULL, NULL, 0, '1', '1', '1', '1', to_date('2021-12-30 20:26:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:43:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1186, '流程管理', '', 1, 10, 1185, 'manager', 'fa:dedent', NULL, NULL, 0, '1', '1', '1', '1', to_date('2021-12-30 20:28:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:36:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1187, '流程表单', '', 2, 2, 1186, 'form', 'fa:hdd-o', 'bpm/form/index', 'BpmForm', 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 12:25:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1188, '表单查询', 'bpm:form:query', 3, 1, 1187, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1189, '表单创建', 'bpm:form:create', 3, 2, 1187, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1190, '表单更新', 'bpm:form:update', 3, 3, 1187, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1191, '表单删除', 'bpm:form:delete', 3, 4, 1187, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1192, '表单导出', 'bpm:form:export', 3, 5, 1187, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1193, '流程模型', '', 2, 1, 1186, 'model', 'fa-solid:project-diagram', 'bpm/model/index', 'BpmModel', 0, '1', '1', '1', '1', to_date('2021-12-31 23:24:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 12:25:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1194, '模型查询', 'bpm:model:query', 3, 1, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:01:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1195, '模型创建', 'bpm:model:create', 3, 2, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:01:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1196, '模型导入', 'bpm:model:import', 3, 3, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:01:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1197, '模型更新', 'bpm:model:update', 3, 4, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:02:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1198, '模型删除', 'bpm:model:delete', 3, 5, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:02:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1199, '模型发布', 'bpm:model:deploy', 3, 6, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-03 19:03:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1200, '审批中心', '', 2, 20, 1185, 'task', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-01-07 23:51:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-21 00:33:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1201, '我的流程', '', 2, 1, 1200, 'my', 'fa-solid:book', 'bpm/processInstance/index', 'BpmProcessInstanceMy', 0, '1', '1', '1', '', to_date('2022-01-07 15:53:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-21 23:52:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1202, '流程实例的查询', 'bpm:process-instance:query', 3, 1, 1201, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-01-07 15:53:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1207, '待办任务', '', 2, 10, 1200, 'todo', 'fa:slack', 'bpm/task/todo/index', 'BpmTodoTask', 0, '1', '1', '1', '1', to_date('2022-01-08 10:33:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:37:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1208, '已办任务', '', 2, 20, 1200, 'done', 'fa:delicious', 'bpm/task/done/index', 'BpmDoneTask', 0, '1', '1', '1', '1', to_date('2022-01-08 10:34:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:37:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1209, '用户分组', '', 2, 4, 1186, 'user-group', 'fa:user-secret', 'bpm/group/index', 'BpmUserGroup', 0, '1', '1', '1', '', to_date('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-21 23:55:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1210, '用户组查询', 'bpm:user-group:query', 3, 1, 1209, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1211, '用户组创建', 'bpm:user-group:create', 3, 2, 1209, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1212, '用户组更新', 'bpm:user-group:update', 3, 3, 1209, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1213, '用户组删除', 'bpm:user-group:delete', 3, 4, 1209, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1215, '流程定义查询', 'bpm:process-definition:query', 3, 10, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:21:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1216, '流程任务分配规则查询', 'bpm:task-assign-rule:query', 3, 20, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:26:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1217, '流程任务分配规则创建', 'bpm:task-assign-rule:create', 3, 21, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:28:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1218, '流程任务分配规则更新', 'bpm:task-assign-rule:update', 3, 22, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:28:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1219, '流程实例的创建', 'bpm:process-instance:create', 3, 2, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:36:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1220, '流程实例的取消', 'bpm:process-instance:cancel', 3, 3, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:36:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1221, '流程任务的查询', 'bpm:task:query', 3, 1, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:38:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1222, '流程任务的更新', 'bpm:task:update', 3, 2, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-01-23 00:39:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1224, '租户管理', '', 2, 0, 1, 'tenant', 'fa-solid:house-user', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-02-20 01:41:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 00:59:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1225, '租户套餐', '', 2, 0, 1224, 'package', 'fa:bars', 'system/tenantPackage/index', 'SystemTenantPackage', 0, '1', '1', '1', '', to_date('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:01:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1226, '租户套餐查询', 'system:tenant-package:query', 3, 1, 1225, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1227, '租户套餐创建', 'system:tenant-package:create', 3, 2, 1225, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1228, '租户套餐更新', 'system:tenant-package:update', 3, 3, 1225, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1229, '租户套餐删除', 'system:tenant-package:delete', 3, 4, 1225, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1237, '文件配置', '', 2, 0, 1243, 'file-config', 'fa-solid:file-signature', 'infra/fileConfig/index', 'InfraFileConfig', 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:52:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1238, '文件配置查询', 'infra:file-config:query', 3, 1, 1237, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1239, '文件配置创建', 'infra:file-config:create', 3, 2, 1237, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1240, '文件配置更新', 'infra:file-config:update', 3, 3, 1237, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1241, '文件配置删除', 'infra:file-config:delete', 3, 4, 1237, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1242, '文件配置导出', 'infra:file-config:export', 3, 5, 1237, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1243, '文件管理', '', 2, 6, 2, 'file', 'ep:files', NULL, '', 0, '1', '1', '1', '1', to_date('2022-03-16 23:47:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:02:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1254, '作者动态', '', 1, 0, 0, 'https://www.iocoder.cn', 'ep:avatar', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-04-23 01:03:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-08 23:40:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1255, '数据源配置', '', 2, 1, 2, 'data-source-config', 'ep:data-analysis', 'infra/dataSourceConfig/index', 'InfraDataSourceConfig', 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:51:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1256, '数据源配置查询', 'infra:data-source-config:query', 3, 1, 1255, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1257, '数据源配置创建', 'infra:data-source-config:create', 3, 2, 1255, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1258, '数据源配置更新', 'infra:data-source-config:update', 3, 3, 1255, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1259, '数据源配置删除', 'infra:data-source-config:delete', 3, 4, 1255, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1260, '数据源配置导出', 'infra:data-source-config:export', 3, 5, 1255, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1261, 'OAuth 2.0', '', 2, 10, 1, 'oauth2', 'fa:dashcube', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-05-09 23:38:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:12:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1263, '应用管理', '', 2, 0, 1261, 'oauth2/application', 'fa:hdd-o', 'system/oauth2/client/index', 'SystemOAuth2Client', 0, '1', '1', '1', '', to_date('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:13:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1264, '客户端查询', 'system:oauth2-client:query', 3, 1, 1263, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 00:31:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1265, '客户端创建', 'system:oauth2-client:create', 3, 2, 1263, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 00:31:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1266, '客户端更新', 'system:oauth2-client:update', 3, 3, 1263, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 00:31:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1267, '客户端删除', 'system:oauth2-client:delete', 3, 4, 1263, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-11 00:31:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1281, '报表管理', '', 2, 40, 0, '/report', 'ep:pie-chart', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-07-10 20:22:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:33:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1282, '报表设计器', '', 2, 1, 1281, 'jimu-report', 'ep:trend-charts', 'report/jmreport/index', 'GoView', 0, '1', '1', '1', '1', to_date('2022-07-10 20:26:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:33:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2000, '商品中心', '', 1, 60, 2362, 'product', 'fa:product-hunt', NULL, NULL, 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-30 11:52:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'ep:cellphone', 'mall/product/category/index', 'ProductCategory', 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-21 10:27:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-29 15:53:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2008, '商品品牌', '', 2, 3, 2000, 'brand', 'ep:chicken', 'mall/product/brand/index', 'ProductBrand', 0, '1', '1', '1', '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-21 10:27:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 13:52:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-21 10:27:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2019, '商品属性', '', 2, 4, 2000, 'property', 'ep:cold-drink', 'mall/product/property/index', 'ProductProperty', 0, '1', '1', '1', '', to_date('2022-08-01 14:55:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:01:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-08-01 14:55:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-12-12 20:26:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-08-01 14:55:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-12-12 20:26:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-08-01 14:55:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-12-12 20:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-08-01 14:55:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-12-12 20:26:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2025, 'Banner', '', 2, 100, 2387, 'banner', 'fa:bandcamp', 'mall/promotion/banner/index', NULL, 0, '1', '1', '1', '', to_date('2022-08-01 14:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-24 20:20:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2026, 'Banner查询', 'promotion:banner:query', 3, 1, 2025, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-08-01 14:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-24 20:20:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2027, 'Banner创建', 'promotion:banner:create', 3, 2, 2025, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-08-01 14:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-24 20:20:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2028, 'Banner更新', 'promotion:banner:update', 3, 3, 2025, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-08-01 14:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-24 20:20:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2029, 'Banner删除', 'promotion:banner:delete', 3, 4, 2025, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-08-01 14:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-24 20:20:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2030, '营销中心', '', 1, 70, 2362, 'promotion', 'ep:present', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-10-31 21:25:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-30 11:54:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2032, '优惠劵列表', '', 2, 1, 2365, 'template', 'ep:discount', 'mall/promotion/coupon/template/index', 'PromotionCouponTemplate', 0, '1', '1', '1', '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 12:40:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2033, '优惠劵模板查询', 'promotion:coupon-template:query', 3, 1, 2032, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2034, '优惠劵模板创建', 'promotion:coupon-template:create', 3, 2, 2032, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2035, '优惠劵模板更新', 'promotion:coupon-template:update', 3, 3, 2032, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2036, '优惠劵模板删除', 'promotion:coupon-template:delete', 3, 4, 2032, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-10-31 22:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2038, '领取记录', '', 2, 2, 2365, 'list', 'ep:collection-tag', 'mall/promotion/coupon/index', 'PromotionCoupon', 0, '1', '1', '1', '', to_date('2022-11-03 23:21:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 12:55:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2039, '优惠劵查询', 'promotion:coupon:query', 3, 1, 2038, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-03 23:21:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-03 23:21:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2040, '优惠劵删除', 'promotion:coupon:delete', 3, 4, 2038, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-03 23:21:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-03 23:21:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2041, '满减送', '', 2, 10, 2390, 'reward-activity', 'ep:goblet-square-full', 'mall/promotion/rewardActivity/index', 'PromotionRewardActivity', 0, '1', '1', '1', '', to_date('2022-11-04 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-21 19:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2042, '满减送活动查询', 'promotion:reward-activity:query', 3, 1, 2041, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-04 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-04 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2043, '满减送活动创建', 'promotion:reward-activity:create', 3, 2, 2041, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-04 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-04 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2044, '满减送活动更新', 'promotion:reward-activity:update', 3, 3, 2041, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-04 23:47:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-04 23:47:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2045, '满减送活动删除', 'promotion:reward-activity:delete', 3, 4, 2041, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-04 23:47:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-04 23:47:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2046, '满减送活动关闭', 'promotion:reward-activity:close', 3, 5, 2041, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2022-11-05 10:42:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-11-05 10:42:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2047, '限时折扣', '', 2, 7, 2390, 'discount-activity', 'ep:timer', 'mall/promotion/discountActivity/index', 'PromotionDiscountActivity', 0, '1', '1', '1', '', to_date('2022-11-05 17:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-21 19:24:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2048, '限时折扣活动查询', 'promotion:discount-activity:query', 3, 1, 2047, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-05 17:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-05 17:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2049, '限时折扣活动创建', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-05 17:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-05 17:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2050, '限时折扣活动更新', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2051, '限时折扣活动删除', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2052, '限时折扣活动关闭', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-05 17:12:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2059, '秒杀商品', '', 2, 2, 2209, 'activity', 'ep:basketball', 'mall/promotion/seckill/activity/index', 'PromotionSeckillActivity', 0, '1', '1', '1', '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 18:57:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2060, '秒杀活动查询', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2061, '秒杀活动创建', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2062, '秒杀活动更新', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2063, '秒杀活动删除', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-11-06 22:24:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2066, '秒杀时段', '', 2, 1, 2209, 'config', 'ep:baseball', 'mall/promotion/seckill/config/index', 'PromotionSeckillConfig', 0, '1', '1', '1', '', to_date('2022-11-15 19:46:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 18:57:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2067, '秒杀时段查询', 'promotion:seckill-config:query', 3, 1, 2066, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-11-15 19:46:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 17:50:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2068, '秒杀时段创建', 'promotion:seckill-config:create', 3, 2, 2066, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-11-15 19:46:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 17:48:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2069, '秒杀时段更新', 'promotion:seckill-config:update', 3, 3, 2066, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-11-15 19:46:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 17:50:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2070, '秒杀时段删除', 'promotion:seckill-config:delete', 3, 4, 2066, '', '', '', '', 0, '1', '1', '1', '', to_date('2022-11-15 19:46:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 17:50:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2072, '订单中心', '', 1, 65, 2362, 'trade', 'ep:eleme', NULL, NULL, 0, '1', '1', '1', '1', to_date('2022-11-19 18:57:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-30 11:54:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2073, '售后退款', '', 2, 2, 2072, 'after-sale', 'ep:refrigerator', 'mall/trade/afterSale/index', 'TradeAfterSale', 0, '1', '1', '1', '', to_date('2022-11-19 20:15:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 21:42:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2074, '售后查询', 'trade:after-sale:query', 3, 1, 2073, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-11-19 20:15:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 21:04:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2075, '秒杀活动关闭', 'promotion:seckill-activity:close', 3, 5, 2059, '', '', '', '', 0, '1', '1', '1', '1', to_date('2022-11-28 20:20:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 18:34:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2076, '订单列表', '', 2, 1, 2072, 'order', 'ep:list', 'mall/trade/order/index', 'TradeOrder', 0, '1', '1', '1', '1', to_date('2022-12-10 21:05:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 21:42:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2083, '地区管理', '', 2, 14, 1, 'area', 'fa:map-marker', 'system/area/index', 'SystemArea', 0, '1', '1', '1', '1', to_date('2022-12-23 17:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:50:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2084, '公众号管理', '', 1, 100, 0, '/mp', 'ep:compass', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-01-01 20:11:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:39:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2085, '账号管理', '', 2, 1, 2084, 'account', 'fa:user', 'mp/account/index', 'MpAccount', 0, '1', '1', '1', '1', to_date('2023-01-01 20:13:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2086, '新增账号', 'mp:account:create', 3, 1, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-01 20:21:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 17:32:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2087, '修改账号', 'mp:account:update', 3, 2, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-07 17:32:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 17:32:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2088, '查询账号', 'mp:account:query', 3, 0, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-07 17:33:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 17:33:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2089, '删除账号', 'mp:account:delete', 3, 3, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-07 17:33:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 17:33:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2090, '生成二维码', 'mp:account:qr-code', 3, 4, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-07 17:33:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 17:33:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2091, '清空 API 配额', 'mp:account:clear-quota', 3, 5, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-07 18:20:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-07 18:20:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2092, '数据统计', 'mp:statistics:query', 2, 2, 2084, 'statistics', 'ep:trend-charts', 'mp/statistics/index', 'MpStatistics', 0, '1', '1', '1', '1', to_date('2023-01-07 20:17:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2093, '标签管理', '', 2, 3, 2084, 'tag', 'ep:collection-tag', 'mp/tag/index', 'MpTag', 0, '1', '1', '1', '1', to_date('2023-01-08 11:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2094, '查询标签', 'mp:tag:query', 3, 0, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 11:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 11:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2095, '新增标签', 'mp:tag:create', 3, 1, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 11:59:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 11:59:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2096, '修改标签', 'mp:tag:update', 3, 2, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 11:59:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 11:59:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2097, '删除标签', 'mp:tag:delete', 3, 3, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 12:00:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 12:00:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2098, '同步标签', 'mp:tag:sync', 3, 4, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 12:00:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 12:00:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2099, '粉丝管理', '', 2, 4, 2084, 'user', 'fa:user-secret', 'mp/user/index', 'MpUser', 0, '1', '1', '1', '1', to_date('2023-01-08 16:51:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2100, '查询粉丝', 'mp:user:query', 3, 0, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 17:16:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 17:17:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2101, '修改粉丝', 'mp:user:update', 3, 1, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 17:17:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 17:17:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2102, '同步粉丝', 'mp:user:sync', 3, 2, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-08 17:17:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-08 17:17:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2103, '消息管理', '', 2, 5, 2084, 'message', 'ep:message', 'mp/message/index', 'MpMessage', 0, '1', '1', '1', '1', to_date('2023-01-08 18:44:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2104, '图文发表记录', '', 2, 10, 2084, 'free-publish', 'ep:edit-pen', 'mp/freePublish/index', 'MpFreePublish', 0, '1', '1', '1', '1', to_date('2023-01-13 00:30:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:43:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2105, '查询发布列表', 'mp:free-publish:query', 3, 1, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-13 07:19:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-13 07:19:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2106, '发布草稿', 'mp:free-publish:submit', 3, 2, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-13 07:19:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-13 07:19:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2107, '删除发布记录', 'mp:free-publish:delete', 3, 3, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-13 07:20:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-13 07:20:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2108, '图文草稿箱', '', 2, 9, 2084, 'draft', 'ep:edit', 'mp/draft/index', 'MpDraft', 0, '1', '1', '1', '1', to_date('2023-01-13 07:40:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:43:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2109, '新建草稿', 'mp:draft:create', 3, 1, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-13 23:15:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-13 23:15:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2110, '修改草稿', 'mp:draft:update', 3, 2, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 10:08:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 10:08:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2111, '查询草稿', 'mp:draft:query', 3, 0, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 10:09:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 10:09:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2112, '删除草稿', 'mp:draft:delete', 3, 3, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 10:09:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 10:09:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2113, '素材管理', '', 2, 8, 2084, 'material', 'ep:basketball', 'mp/material/index', 'MpMaterial', 0, '1', '1', '1', '1', to_date('2023-01-14 14:12:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:43:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2114, '上传临时素材', 'mp:material:upload-temporary', 3, 1, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 15:33:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 15:33:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2115, '上传永久素材', 'mp:material:upload-permanent', 3, 2, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 15:34:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 15:34:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2116, '删除素材', 'mp:material:delete', 3, 3, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 15:35:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 15:35:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2117, '上传图文图片', 'mp:material:upload-news-image', 3, 4, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 15:36:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 15:36:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2118, '查询素材', 'mp:material:query', 3, 5, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-14 15:39:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-14 15:39:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2119, '菜单管理', '', 2, 6, 2084, 'menu', 'ep:menu', 'mp/menu/index', 'MpMenu', 0, '1', '1', '1', '1', to_date('2023-01-14 17:43:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:42:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2120, '自动回复', '', 2, 7, 2084, 'auto-reply', 'fa-solid:republican', 'mp/autoReply/index', 'MpAutoReply', 0, '1', '1', '1', '1', to_date('2023-01-15 22:13:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:43:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2121, '查询回复', 'mp:auto-reply:query', 3, 0, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-16 22:28:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 22:28:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2122, '新增回复', 'mp:auto-reply:create', 3, 1, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-16 22:28:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 22:28:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2123, '修改回复', 'mp:auto-reply:update', 3, 2, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-16 22:29:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 22:29:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2124, '删除回复', 'mp:auto-reply:delete', 3, 3, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-16 22:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-16 22:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2125, '查询菜单', 'mp:menu:query', 3, 0, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-17 23:05:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 23:05:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2126, '保存菜单', 'mp:menu:save', 3, 1, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-17 23:06:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 23:06:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2127, '删除菜单', 'mp:menu:delete', 3, 2, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-17 23:06:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 23:06:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2128, '查询消息', 'mp:message:query', 3, 0, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-17 23:07:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 23:07:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2129, '发送消息', 'mp:message:send', 3, 1, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-17 23:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-17 23:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2130, '邮箱管理', '', 2, 2, 2739, 'mail', 'fa-solid:mail-bulk', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-01-25 17:27:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-22 23:56:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2131, '邮箱账号', '', 2, 0, 2130, 'mail-account', 'fa:universal-access', 'system/mail/account/index', 'SystemMailAccount', 0, '1', '1', '1', '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:48:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2132, '账号查询', 'system:mail-account:query', 3, 1, 2131, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2133, '账号创建', 'system:mail-account:create', 3, 2, 2131, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2134, '账号更新', 'system:mail-account:update', 3, 3, 2131, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2135, '账号删除', 'system:mail-account:delete', 3, 4, 2131, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 09:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2136, '邮件模版', '', 2, 0, 2130, 'mail-template', 'fa:tag', 'system/mail/template/index', 'SystemMailTemplate', 0, '1', '1', '1', '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:48:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2137, '模版查询', 'system:mail-template:query', 3, 1, 2136, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2138, '模版创建', 'system:mail-template:create', 3, 2, 2136, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2139, '模版更新', 'system:mail-template:update', 3, 3, 2136, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2140, '模版删除', 'system:mail-template:delete', 3, 4, 2136, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-25 12:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2141, '邮件记录', '', 2, 0, 2130, 'mail-log', 'fa:edit', 'system/mail/log/index', 'SystemMailLog', 0, '1', '1', '1', '', to_date('2023-01-26 02:16:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:48:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2142, '日志查询', 'system:mail-log:query', 3, 1, 2141, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-26 02:16:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-26 02:16:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2143, '发送测试邮件', 'system:mail-template:send-mail', 3, 5, 2136, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-26 23:29:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 23:29:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2144, '站内信管理', '', 1, 3, 2739, 'notify', 'ep:message-box', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-01-28 10:25:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-22 23:56:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2145, '模板管理', '', 2, 0, 2144, 'notify-template', 'fa:archive', 'system/notify/template/index', 'SystemNotifyTemplate', 0, '1', '1', '1', '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:49:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2146, '站内信模板查询', 'system:notify-template:query', 3, 1, 2145, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2147, '站内信模板创建', 'system:notify-template:create', 3, 2, 2145, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2148, '站内信模板更新', 'system:notify-template:update', 3, 3, 2145, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2149, '站内信模板删除', 'system:notify-template:delete', 3, 4, 2145, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-28 02:26:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2150, '发送测试站内信', 'system:notify-template:send-notify', 3, 5, 2145, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-01-28 10:54:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 10:54:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2151, '消息记录', '', 2, 0, 2144, 'notify-message', 'fa:edit', 'system/notify/message/index', 'SystemNotifyMessage', 0, '1', '1', '1', '', to_date('2023-01-28 04:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:49:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2152, '站内信消息查询', 'system:notify-message:query', 3, 1, 2151, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-01-28 04:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-01-28 04:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2153, '大屏设计器', '', 2, 2, 1281, 'go-view', 'fa:area-chart', 'report/goview/index', 'JimuReport', 0, '1', '1', '1', '1', to_date('2023-02-07 00:03:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 12:34:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2154, '创建项目', 'report:go-view-project:create', 3, 1, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-02-07 19:25:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-07 19:25:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2155, '更新项目', 'report:go-view-project:update', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-02-07 19:25:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:01:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2156, '查询项目', 'report:go-view-project:query', 3, 0, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-02-07 19:25:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-07 19:25:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2157, '使用 SQL 查询数据', 'report:go-view-data:get-by-sql', 3, 3, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-02-07 19:26:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-07 19:26:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2158, '使用 HTTP 查询数据', 'report:go-view-data:get-by-http', 3, 4, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', to_date('2023-02-07 19:26:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-07 19:26:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2159, 'Boot 开发文档', '', 1, 1, 0, 'https://doc.iocoder.cn/', 'ep:document', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-02-10 22:46:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:32:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2160, 'Cloud 开发文档', '', 1, 2, 0, 'https://cloud.iocoder.cn', 'ep:document-copy', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-02-10 22:47:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:32:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2161, '接入示例', '', 1, 99, 1117, 'demo', 'fa-solid:dragon', 'pay/demo/index', NULL, 0, '1', '1', '1', '', to_date('2023-02-11 14:21:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-18 23:50:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2162, '商品导出', 'product:spu:export', 3, 5, 2014, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-07-30 14:22:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2164, '配送管理', '', 1, 3, 2072, 'delivery', 'ep:shopping-cart', '', '', 0, '1', '1', '1', '1', to_date('2023-05-18 09:18:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 10:58:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2165, '快递发货', '', 1, 0, 2164, 'express', 'ep:bicycle', '', '', 0, '1', '1', '1', '1', to_date('2023-05-18 09:22:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-30 21:02:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2166, '门店自提', '', 1, 1, 2164, 'pick-up-store', 'ep:add-location', '', '', 0, '1', '1', '1', '1', to_date('2023-05-18 09:23:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-30 21:03:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2167, '快递公司', '', 2, 0, 2165, 'express', 'ep:compass', 'mall/trade/delivery/express/index', 'Express', 0, '1', '1', '1', '1', to_date('2023-05-18 09:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-30 21:02:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2168, '快递公司查询', 'trade:delivery:express:query', 3, 1, 2167, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2169, '快递公司创建', 'trade:delivery:express:create', 3, 2, 2167, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2170, '快递公司更新', 'trade:delivery:express:update', 3, 3, 2167, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2171, '快递公司删除', 'trade:delivery:express:delete', 3, 4, 2167, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2172, '快递公司导出', 'trade:delivery:express:export', 3, 5, 2167, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-18 09:37:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2173, '运费模版', 'trade:delivery:express-template:query', 2, 1, 2165, 'express-template', 'ep:coordinate', 'mall/trade/delivery/expressTemplate/index', 'ExpressTemplate', 0, '1', '1', '1', '1', to_date('2023-05-20 06:48:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-30 21:03:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2174, '快递运费模板查询', 'trade:delivery:express-template:query', 3, 1, 2173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2175, '快递运费模板创建', 'trade:delivery:express-template:create', 3, 2, 2173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2176, '快递运费模板更新', 'trade:delivery:express-template:update', 3, 3, 2173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2177, '快递运费模板删除', 'trade:delivery:express-template:delete', 3, 4, 2173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2178, '快递运费模板导出', 'trade:delivery:express-template:export', 3, 5, 2173, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-20 06:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2179, '门店管理', '', 2, 1, 2166, 'pick-up-store', 'ep:basketball', 'mall/trade/delivery/pickUpStore/index', 'PickUpStore', 0, '1', '1', '1', '1', to_date('2023-05-25 10:50:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-30 21:03:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2180, '自提门店查询', 'trade:delivery:pick-up-store:query', 3, 1, 2179, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2181, '自提门店创建', 'trade:delivery:pick-up-store:create', 3, 2, 2179, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2182, '自提门店更新', 'trade:delivery:pick-up-store:update', 3, 3, 2179, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2183, '自提门店删除', 'trade:delivery:pick-up-store:delete', 3, 4, 2179, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2184, '自提门店导出', 'trade:delivery:pick-up-store:export', 3, 5, 2179, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-05-25 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2209, '秒杀活动', '', 2, 3, 2030, 'seckill', 'ep:place', '', '', 0, '1', '1', '1', '1', to_date('2023-06-24 17:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-24 18:55:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2262, '会员中心', '', 1, 55, 0, '/member', 'ep:bicycle', NULL, NULL, 0, '1', '1', '1', '1', to_date('2023-06-10 00:42:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 09:23:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2275, '会员配置', '', 2, 0, 2262, 'config', 'fa:archive', 'member/config/index', 'MemberConfig', 0, '1', '1', '1', '', to_date('2023-06-10 02:07:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 23:41:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2276, '会员配置查询', 'member:config:query', 3, 1, 2275, '', '', '', '', 0, '1', '1', '1', '', to_date('2023-06-10 02:07:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:48:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2277, '会员配置保存', 'member:config:save', 3, 2, 2275, '', '', '', '', 0, '1', '1', '1', '', to_date('2023-06-10 02:07:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:49:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2281, '签到配置', '', 2, 2, 2300, 'config', 'ep:calendar', 'member/signin/config/index', 'SignInConfig', 0, '1', '1', '1', '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 19:25:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2282, '积分签到规则查询', 'point:sign-in-config:query', 3, 1, 2281, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2283, '积分签到规则创建', 'point:sign-in-config:create', 3, 2, 2281, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2284, '积分签到规则更新', 'point:sign-in-config:update', 3, 3, 2281, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2285, '积分签到规则删除', 'point:sign-in-config:delete', 3, 4, 2281, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 03:26:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2287, '会员积分', '', 2, 10, 2262, 'record', 'fa:asterisk', 'member/point/record/index', 'PointRecord', 0, '1', '1', '1', '', to_date('2023-06-10 04:18:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 23:42:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2288, '用户积分记录查询', 'point:record:query', 3, 1, 2287, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 04:18:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 04:18:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2293, '签到记录', '', 2, 3, 2300, 'record', 'ep:chicken', 'member/signin/record/index', 'SignInRecord', 0, '1', '1', '1', '', to_date('2023-06-10 04:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 19:26:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2294, '用户签到积分查询', 'point:sign-in-record:query', 3, 1, 2293, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 04:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 04:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2297, '用户签到积分删除', 'point:sign-in-record:delete', 3, 4, 2293, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-06-10 04:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-06-10 04:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2300, '会员签到', '', 1, 11, 2262, 'signin', 'ep:alarm-clock', '', '', 0, '1', '1', '1', '1', to_date('2023-06-27 22:49:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 09:23:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2301, '回调通知', '', 2, 5, 1117, 'notify', 'ep:mute-notification', 'pay/notify/index', 'PayNotify', 0, '1', '1', '1', '', to_date('2023-07-20 04:41:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-18 23:56:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2302, '支付通知查询', 'pay:notify:query', 3, 1, 2301, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-07-20 04:41:32', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-07-20 04:41:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2303, '拼团活动', '', 2, 3, 2030, 'combination', 'fa:group', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:19:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-12 17:20:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2304, '拼团商品', '', 2, 1, 2303, 'acitivity', 'ep:apple', 'mall/promotion/combination/activity/index', 'PromotionCombinationActivity', 0, '1', '1', '1', '1', to_date('2023-08-12 17:22:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-12 17:22:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2305, '拼团活动查询', 'promotion:combination-activity:query', 3, 1, 2304, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:54:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-24 11:57:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2306, '拼团活动创建', 'promotion:combination-activity:create', 3, 2, 2304, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:54:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-12 17:54:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2307, '拼团活动更新', 'promotion:combination-activity:update', 3, 3, 2304, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:55:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-12 17:55:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2308, '拼团活动删除', 'promotion:combination-activity:delete', 3, 4, 2304, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:55:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-12 17:55:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2309, '拼团活动关闭', 'promotion:combination-activity:close', 3, 5, 2304, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-12 17:55:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-06 10:51:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2310, '砍价活动', '', 2, 4, 2030, 'bargain', 'ep:box', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:27:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:27:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2311, '砍价商品', '', 2, 1, 2310, 'activity', 'ep:burger', 'mall/promotion/bargain/activity/index', 'PromotionBargainActivity', 0, '1', '1', '1', '1', to_date('2023-08-13 00:28:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 01:16:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2312, '砍价活动查询', 'promotion:bargain-activity:query', 3, 1, 2311, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:32:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:32:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2313, '砍价活动创建', 'promotion:bargain-activity:create', 3, 2, 2311, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:32:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:32:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2314, '砍价活动更新', 'promotion:bargain-activity:update', 3, 3, 2311, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:32:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:32:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2315, '砍价活动删除', 'promotion:bargain-activity:delete', 3, 4, 2311, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:34:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:34:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2316, '砍价活动关闭', 'promotion:bargain-activity:close', 3, 5, 2311, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-13 00:35:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-13 00:35:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2317, '会员管理', '', 2, 0, 2262, 'user', 'ep:avatar', 'member/user/index', 'MemberUser', 0, '1', '1', '1', '', to_date('2023-08-19 04:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-24 00:50:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2318, '会员用户查询', 'member:user:query', 3, 1, 2317, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-19 04:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-19 04:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2319, '会员用户更新', 'member:user:update', 3, 3, 2317, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-19 04:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-19 04:12:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2320, '会员标签', '', 2, 1, 2262, 'tag', 'ep:collection-tag', 'member/tag/index', 'MemberTag', 0, '1', '1', '1', '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-20 09:23:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2321, '会员标签查询', 'member:tag:query', 3, 1, 2320, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2322, '会员标签创建', 'member:tag:create', 3, 2, 2320, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2323, '会员标签更新', 'member:tag:update', 3, 3, 2320, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2324, '会员标签删除', 'member:tag:delete', 3, 4, 2320, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-20 01:03:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2325, '会员等级', '', 2, 2, 2262, 'level', 'fa:level-up', 'member/level/index', 'MemberLevel', 0, '1', '1', '1', '', to_date('2023-08-22 12:41:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-22 21:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2326, '会员等级查询', 'member:level:query', 3, 1, 2325, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2327, '会员等级创建', 'member:level:create', 3, 2, 2325, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2328, '会员等级更新', 'member:level:update', 3, 3, 2325, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2329, '会员等级删除', 'member:level:delete', 3, 4, 2325, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 12:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2330, '会员分组', '', 2, 3, 2262, 'group', 'fa:group', 'member/group/index', 'MemberGroup', 0, '1', '1', '1', '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 23:42:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2331, '用户分组查询', 'member:group:query', 3, 1, 2330, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2332, '用户分组创建', 'member:group:create', 3, 2, 2330, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2333, '用户分组更新', 'member:group:update', 3, 3, 2330, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2334, '用户分组删除', 'member:group:delete', 3, 4, 2330, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-22 13:50:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2335, '用户等级修改', 'member:user:update-level', 3, 5, 2317, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-08-23 16:49:05', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-08-23 16:50:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2336, '商品评论', '', 2, 5, 2000, 'comment', 'ep:comment', 'mall/product/comment/index', 'ProductComment', 0, '1', '1', '1', '1', to_date('2023-08-26 11:03:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:03:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2337, '评论查询', 'product:comment:query', 3, 1, 2336, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-26 11:04:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:04:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2338, '添加自评', 'product:comment:create', 3, 2, 2336, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-26 11:04:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:08:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2339, '商家回复', 'product:comment:update', 3, 3, 2336, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-26 11:04:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:04:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2340, '显隐评论', 'product:comment:update', 3, 4, 2336, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-08-26 11:04:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-26 11:04:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2341, '优惠劵发送', 'promotion:coupon:send', 3, 2, 2038, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-09-02 00:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-02 00:03:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2342, '交易配置', '', 2, 0, 2072, 'config', 'ep:setting', 'mall/trade/config/index', 'TradeConfig', 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:30:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2343, '交易中心配置查询', 'trade:config:query', 3, 1, 2342, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2344, '交易中心配置保存', 'trade:config:save', 3, 2, 2342, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2345, '分销管理', '', 1, 4, 2072, 'brokerage', 'fa-solid:project-diagram', '', '', 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 10:58:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2346, '分销用户', '', 2, 0, 2345, 'brokerage-user', 'fa-solid:user-tie', 'mall/trade/brokerage/user/index', 'TradeBrokerageUser', 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:33:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2347, '分销用户查询', 'trade:brokerage-user:query', 3, 1, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2348, '分销用户推广人查询', 'trade:brokerage-user:user-query', 3, 2, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2349, '分销用户推广订单查询', 'trade:brokerage-user:order-query', 3, 3, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2350, '分销用户修改推广资格', 'trade:brokerage-user:update-brokerage-enable', 3, 4, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2351, '分销用户修改推广员', 'trade:brokerage-user:update-bind-user', 3, 5, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2352, '分销用户清除推广员', 'trade:brokerage-user:clear-bind-user', 3, 6, 2346, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2353, '佣金记录', '', 2, 1, 2345, 'brokerage-record', 'fa:money', 'mall/trade/brokerage/record/index', 'TradeBrokerageRecord', 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:33:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2354, '佣金记录查询', 'trade:brokerage-record:query', 3, 1, 2353, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2355, '佣金提现', '', 2, 2, 2345, 'brokerage-withdraw', 'fa:credit-card', 'mall/trade/brokerage/withdraw/index', 'TradeBrokerageWithdraw', 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:33:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2356, '佣金提现查询', 'trade:brokerage-withdraw:query', 3, 1, 2355, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2357, '佣金提现审核', 'trade:brokerage-withdraw:audit', 3, 2, 2355, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-28 02:46:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2358, '统计中心', '', 1, 75, 2362, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-30 11:54:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2359, '交易统计', '', 2, 4, 2358, 'trade', 'fa-solid:credit-card', 'mall/statistics/trade/index', 'TradeStatistics', 0, '1', '1', '1', '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:42:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2360, '交易统计查询', 'statistics:trade:query', 3, 1, 2359, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2361, '交易统计导出', 'statistics:trade:export', 3, 2, 2359, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-09-30 03:22:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2362, '商城系统', '', 1, 59, 0, '/mall', 'ep:shop', '', '', 0, '1', '1', '1', '1', to_date('2023-09-30 11:52:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-30 11:52:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2363, '用户积分修改', 'member:user:update-point', 3, 6, 2317, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-01 14:39:43', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-01 14:39:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2364, '用户余额修改', 'member:user:update-balance', 3, 7, 2317, '', '', '', '', 0, '1', '1', '1', '', to_date('2023-10-01 14:39:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-01 22:42:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2365, '优惠劵', '', 1, 2, 2030, 'coupon', 'fa-solid:disease', '', '', 0, '1', '1', '1', '1', to_date('2023-10-03 12:39:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 00:16:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2366, '砍价记录', '', 2, 2, 2310, 'record', 'ep:list', 'mall/promotion/bargain/record/index', 'PromotionBargainRecord', 0, '1', '1', '1', '', to_date('2023-10-05 02:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 10:50:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2367, '砍价记录查询', 'promotion:bargain-record:query', 3, 1, 2366, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-05 02:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-05 02:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2368, '助力记录查询', 'promotion:bargain-help:query', 3, 2, 2366, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-10-05 12:27:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-05 12:27:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2369, '拼团记录', 'promotion:combination-record:query', 2, 2, 2303, 'record', 'ep:avatar', 'mall/promotion/combination/record/index.vue', 'PromotionCombinationRecord', 0, '1', '1', '1', '1', to_date('2023-10-08 07:10:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-08 07:34:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2374, '会员统计', '', 2, 2, 2358, 'member', 'ep:avatar', 'mall/statistics/member/index', 'MemberStatistics', 0, '1', '1', '1', '', to_date('2023-10-11 04:39:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:41:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2375, '会员统计查询', 'statistics:member:query', 3, 1, 2374, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-11 04:39:24', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-11 04:39:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2376, '订单核销', 'trade:order:pick-up', 3, 10, 2076, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-10-14 17:11:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-14 17:11:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2377, '文章分类', '', 2, 0, 2387, 'article/category', 'fa:certificate', 'mall/promotion/article/category/index', 'ArticleCategory', 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-16 09:38:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2378, '分类查询', 'promotion:article-category:query', 3, 1, 2377, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2379, '分类创建', 'promotion:article-category:create', 3, 2, 2377, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2380, '分类更新', 'promotion:article-category:update', 3, 3, 2377, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2381, '分类删除', 'promotion:article-category:delete', 3, 4, 2377, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2382, '文章列表', '', 2, 2, 2387, 'article', 'ep:connection', 'mall/promotion/article/index', 'Article', 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-16 09:41:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2383, '文章管理查询', 'promotion:article:query', 3, 1, 2382, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2384, '文章管理创建', 'promotion:article:create', 3, 2, 2382, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2385, '文章管理更新', 'promotion:article:update', 3, 3, 2382, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2386, '文章管理删除', 'promotion:article:delete', 3, 4, 2382, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 01:26:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2387, '内容管理', '', 1, 1, 2030, 'content', 'ep:collection', '', '', 0, '1', '1', '1', '1', to_date('2023-10-16 09:37:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-16 09:37:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2388, '商城首页', '', 2, 1, 2362, 'home', 'ep:home-filled', 'mall/home/index', 'MallHome', 0, '1', '1', '1', '', to_date('2023-10-16 12:10:33', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-16 12:10:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2389, '核销订单', '', 2, 2, 2166, 'pick-up-order', 'ep:list', 'mall/trade/delivery/pickUpOrder/index', 'PickUpOrder', 0, '1', '1', '1', '', to_date('2023-10-19 16:09:51', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-19 16:09:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2390, '优惠活动', '', 1, 99, 2030, 'youhui', 'ep:aim', '', '', 0, '1', '1', '1', '1', to_date('2023-10-21 19:23:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-21 19:23:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2391, '客户管理', '', 2, 10, 2397, 'customer', 'fa:address-book-o', 'crm/customer/index', 'CrmCustomer', 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:13:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2392, '客户查询', 'crm:customer:query', 3, 1, 2391, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2393, '客户创建', 'crm:customer:create', 3, 2, 2391, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2394, '客户更新', 'crm:customer:update', 3, 3, 2391, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2395, '客户删除', 'crm:customer:delete', 3, 4, 2391, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2396, '客户导出', 'crm:customer:export', 3, 5, 2391, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 09:04:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2397, 'CRM 系统', '', 1, 200, 0, '/crm', 'ep:avatar', '', '', 0, '1', '1', '1', '1', to_date('2023-10-29 17:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 15:37:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2398, '合同管理', '', 2, 50, 2397, 'contract', 'ep:notebook', 'crm/contract/index', 'CrmContract', 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:15:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2399, '合同查询', 'crm:contract:query', 3, 1, 2398, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2400, '合同创建', 'crm:contract:create', 3, 2, 2398, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2401, '合同更新', 'crm:contract:update', 3, 3, 2398, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2402, '合同删除', 'crm:contract:delete', 3, 4, 2398, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2403, '合同导出', 'crm:contract:export', 3, 5, 2398, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 10:50:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2404, '线索管理', '', 2, 8, 2397, 'clue', 'fa:pagelines', 'crm/clue/index', 'CrmClue', 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:15:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2405, '线索查询', 'crm:clue:query', 3, 1, 2404, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2406, '线索创建', 'crm:clue:create', 3, 2, 2404, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2407, '线索更新', 'crm:clue:update', 3, 3, 2404, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2408, '线索删除', 'crm:clue:delete', 3, 4, 2404, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2409, '线索导出', 'crm:clue:export', 3, 5, 2404, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:06:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2410, '商机管理', '', 2, 40, 2397, 'business', 'fa:bus', 'crm/business/index', 'CrmBusiness', 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:14:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2411, '商机查询', 'crm:business:query', 3, 1, 2410, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2412, '商机创建', 'crm:business:create', 3, 2, 2410, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2413, '商机更新', 'crm:business:update', 3, 3, 2410, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2414, '商机删除', 'crm:business:delete', 3, 4, 2410, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2415, '商机导出', 'crm:business:export', 3, 5, 2410, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:12:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2416, '联系人管理', '', 2, 20, 2397, 'contact', 'fa:address-book-o', 'crm/contact/index', 'CrmContact', 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:13:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2417, '联系人查询', 'crm:contact:query', 3, 1, 2416, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2418, '联系人创建', 'crm:contact:create', 3, 2, 2416, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2419, '联系人更新', 'crm:contact:update', 3, 3, 2416, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2420, '联系人删除', 'crm:contact:delete', 3, 4, 2416, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2421, '联系人导出', 'crm:contact:export', 3, 5, 2416, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:14:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2422, '回款管理', '', 2, 60, 2397, 'receivable', 'ep:money', 'crm/receivable/index', 'CrmReceivable', 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:16:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2423, '回款管理查询', 'crm:receivable:query', 3, 1, 2422, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2424, '回款管理创建', 'crm:receivable:create', 3, 2, 2422, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2425, '回款管理更新', 'crm:receivable:update', 3, 3, 2422, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2426, '回款管理删除', 'crm:receivable:delete', 3, 4, 2422, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2427, '回款管理导出', 'crm:receivable:export', 3, 5, 2422, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2428, '回款计划', '', 2, 61, 2397, 'receivable-plan', 'fa:money', 'crm/receivable/plan/index', 'CrmReceivablePlan', 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:16:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2429, '回款计划查询', 'crm:receivable-plan:query', 3, 1, 2428, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2430, '回款计划创建', 'crm:receivable-plan:create', 3, 2, 2428, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2431, '回款计划更新', 'crm:receivable-plan:update', 3, 3, 2428, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2432, '回款计划删除', 'crm:receivable-plan:delete', 3, 4, 2428, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2433, '回款计划导出', 'crm:receivable-plan:export', 3, 5, 2428, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 11:18:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2435, '商城装修', '', 2, 20, 2030, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2436, '装修模板', '', 2, 1, 2435, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2437, '装修模板查询', 'promotion:diy-template:query', 3, 1, 2436, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2438, '装修模板创建', 'promotion:diy-template:create', 3, 2, 2436, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2439, '装修模板更新', 'promotion:diy-template:update', 3, 3, 2436, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2440, '装修模板删除', 'promotion:diy-template:delete', 3, 4, 2436, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2441, '装修模板使用', 'promotion:diy-template:use', 3, 5, 2436, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2442, '装修页面', '', 2, 2, 2435, 'diy-page', 'foundation:page-edit', 'mall/promotion/diy/page/index', 'DiyPage', 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2443, '装修页面查询', 'promotion:diy-page:query', 3, 1, 2442, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2444, '装修页面创建', 'promotion:diy-page:create', 3, 2, 2442, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2445, '装修页面更新', 'promotion:diy-page:update', 3, 3, 2442, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2446, '装修页面删除', 'promotion:diy-page:delete', 3, 4, 2442, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-10-29 14:19:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2447, '三方登录', '', 1, 10, 1, 'social', 'fa:rocket', '', '', 0, '1', '1', '1', '1', to_date('2023-11-04 12:12:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:14:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2448, '三方应用', '', 2, 1, 2447, 'client', 'ep:set-up', 'views/system/social/client/index.vue', 'SocialClient', 0, '1', '1', '1', '1', to_date('2023-11-04 12:17:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 12:17:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2449, '三方应用查询', 'system:social-client:query', 3, 1, 2448, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-11-04 12:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 12:43:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2450, '三方应用创建', 'system:social-client:create', 3, 2, 2448, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-11-04 12:43:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 12:43:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2451, '三方应用更新', 'system:social-client:update', 3, 3, 2448, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-11-04 12:44:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 12:44:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2452, '三方应用删除', 'system:social-client:delete', 3, 4, 2448, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-11-04 12:44:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 12:44:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2453, '三方用户', 'system:social-user:query', 2, 2, 2447, 'user', 'ep:avatar', 'system/social/user/index.vue', 'SocialUser', 0, '1', '1', '1', '1', to_date('2023-11-04 14:01:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-04 14:01:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2472, '主子表(内嵌)', '', 2, 12, 1070, 'demo03-inner', 'fa:power-off', 'infra/demo/demo03/inner/index', 'Demo03StudentInner', 0, '1', '1', '1', '', to_date('2023-11-13 04:39:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2478, '单表(增删改查)', '', 2, 1, 1070, 'demo01-contact', 'ep:bicycle', 'infra/demo/demo01/index', 'Demo01Contact', 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:34:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2479, '示例联系人查询', 'infra:demo01-contact:query', 3, 1, 2478, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2480, '示例联系人创建', 'infra:demo01-contact:create', 3, 2, 2478, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2481, '示例联系人更新', 'infra:demo01-contact:update', 3, 3, 2478, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2482, '示例联系人删除', 'infra:demo01-contact:delete', 3, 4, 2478, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2483, '示例联系人导出', 'infra:demo01-contact:export', 3, 5, 2478, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-15 14:42:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2484, '树表(增删改查)', '', 2, 2, 1070, 'demo02-category', 'fa:tree', 'infra/demo/demo02/index', 'Demo02Category', 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:35:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2485, '示例分类查询', 'infra:demo02-category:query', 3, 1, 2484, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2486, '示例分类创建', 'infra:demo02-category:create', 3, 2, 2484, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2487, '示例分类更新', 'infra:demo02-category:update', 3, 3, 2484, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2488, '示例分类删除', 'infra:demo02-category:delete', 3, 4, 2484, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2489, '示例分类导出', 'infra:demo02-category:export', 3, 5, 2484, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2490, '主子表(标准)', '', 2, 10, 1070, 'demo03-normal', 'fa:battery-3', 'infra/demo/demo03/normal/index', 'Demo03StudentNormal', 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:10:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2491, '学生查询', 'infra:demo03-student:query', 3, 1, 2490, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2492, '学生创建', 'infra:demo03-student:create', 3, 2, 2490, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2493, '学生更新', 'infra:demo03-student:update', 3, 3, 2490, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2494, '学生删除', 'infra:demo03-student:delete', 3, 4, 2490, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2495, '学生导出', 'infra:demo03-student:export', 3, 5, 2490, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-16 12:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2497, '主子表(ERP)', '', 2, 11, 1070, 'demo03-erp', 'ep:calendar', 'infra/demo/demo03/erp/index', 'Demo03StudentERP', 0, '1', '1', '1', '', to_date('2023-11-16 15:50:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:19:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2516, '客户公海配置', '', 2, 0, 2524, 'customer-pool-config', 'ep:data-analysis', 'crm/customer/poolConfig/index', 'CrmCustomerPoolConfig', 0, '1', '1', '1', '', to_date('2023-11-18 13:33:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-03 19:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2517, '客户公海配置保存', 'crm:customer-pool-config:update', 3, 1, 2516, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:31', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2518, '客户限制配置', '', 2, 1, 2524, 'customer-limit-config', 'ep:avatar', 'crm/customer/limitConfig/index', 'CrmCustomerLimitConfig', 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 16:43:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2519, '客户限制配置查询', 'crm:customer-limit-config:query', 3, 1, 2518, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2520, '客户限制配置创建', 'crm:customer-limit-config:create', 3, 2, 2518, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2521, '客户限制配置更新', 'crm:customer-limit-config:update', 3, 3, 2518, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2522, '客户限制配置删除', 'crm:customer-limit-config:delete', 3, 4, 2518, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2523, '客户限制配置导出', 'crm:customer-limit-config:export', 3, 5, 2518, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-11-18 13:33:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2524, '系统配置', '', 1, 999, 2397, 'config', 'ep:connection', '', '', 0, '1', '1', '1', '1', to_date('2023-11-18 21:58:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:14:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2525, 'WebSocket', '', 2, 5, 2, 'websocket', 'ep:connection', 'infra/webSocket/index', 'InfraWebSocket', 0, '1', '1', '1', '1', to_date('2023-11-23 19:41:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:02:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2526, '产品管理', '', 2, 80, 2397, 'product', 'fa:product-hunt', 'crm/product/index', 'CrmProduct', 0, '1', '1', '1', '1', to_date('2023-12-05 22:45:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-20 20:36:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2527, '产品查询', 'crm:product:query', 3, 1, 2526, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-05 22:47:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 22:47:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2528, '产品创建', 'crm:product:create', 3, 2, 2526, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-05 22:47:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 22:47:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2529, '产品更新', 'crm:product:update', 3, 3, 2526, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-05 22:48:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 22:48:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2530, '产品删除', 'crm:product:delete', 3, 4, 2526, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-05 22:48:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 22:48:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2531, '产品导出', 'crm:product:export', 3, 5, 2526, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-05 22:48:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-05 22:48:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2532, '产品分类配置', '', 2, 3, 2524, 'product/category', 'fa-solid:window-restore', 'crm/product/category/index', 'CrmProductCategory', 0, '1', '1', '1', '1', to_date('2023-12-06 12:52:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-06 12:52:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2533, '产品分类查询', 'crm:product-category:query', 3, 1, 2532, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-06 12:53:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-06 12:53:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2534, '产品分类创建', 'crm:product-category:create', 3, 2, 2532, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-06 12:53:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-06 12:53:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2535, '产品分类更新', 'crm:product-category:update', 3, 3, 2532, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-06 12:53:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-06 12:53:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2536, '产品分类删除', 'crm:product-category:delete', 3, 4, 2532, '', '', '', '', 0, '1', '1', '1', '1', to_date('2023-12-06 12:54:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-06 12:54:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2543, '关联商机', 'crm:contact:create-business', 3, 10, 2416, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-01-02 17:28:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:28:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2544, '取关商机', 'crm:contact:delete-business', 3, 11, 2416, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-01-02 17:28:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:28:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2545, '商品统计', '', 2, 3, 2358, 'product', 'fa:product-hunt', 'mall/statistics/product/index', 'ProductStatistics', 0, '1', '1', '1', '', to_date('2023-12-15 18:54:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 20:41:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2546, '客户公海', '', 2, 30, 2397, 'customer/pool', 'fa-solid:swimming-pool', 'crm/customer/pool/index', 'CrmCustomerPool', 0, '1', '1', '1', '1', to_date('2024-01-15 21:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:14:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2547, '订单查询', 'trade:order:query', 3, 1, 2076, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-01-16 08:52:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-16 08:52:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2548, '订单更新', 'trade:order:update', 3, 2, 2076, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-01-16 08:52:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-16 08:52:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2549, '支付&退款案例', '', 2, 1, 2161, 'order', 'fa:paypal', 'pay/demo/order/index', '', 0, '1', '1', '1', '1', to_date('2024-01-18 23:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-18 23:47:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2550, '转账案例', '', 2, 2, 2161, 'transfer', 'fa:transgender-alt', 'pay/demo/transfer/index', '', 0, '1', '1', '1', '1', to_date('2024-01-18 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-18 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2551, '钱包管理', '', 1, 4, 1117, 'wallet', 'ep:wallet', '', '', 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 08:58:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2552, '充值套餐', '', 2, 2, 2551, 'wallet-recharge-package', 'fa:leaf', 'pay/wallet/rechargePackage/index', 'WalletRechargePackage', 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2553, '钱包充值套餐查询', 'pay:wallet-recharge-package:query', 3, 1, 2552, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2554, '钱包充值套餐创建', 'pay:wallet-recharge-package:create', 3, 2, 2552, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2555, '钱包充值套餐更新', 'pay:wallet-recharge-package:update', 3, 3, 2552, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2556, '钱包充值套餐删除', 'pay:wallet-recharge-package:delete', 3, 4, 2552, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2557, '钱包余额', '', 2, 1, 2551, 'wallet-balance', 'fa:leaf', 'pay/wallet/balance/index', 'WalletBalance', 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2558, '钱包余额查询', 'pay:wallet:query', 3, 1, 2557, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2559, '转账订单', '', 2, 3, 1117, 'transfer', 'ep:credit-card', 'pay/transfer/index', 'PayTransfer', 0, '1', '1', '1', '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-29 02:32:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2560, '数据统计', '', 1, 200, 2397, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '1', to_date('2024-01-26 22:50:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 20:10:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2561, '排行榜', 'crm:statistics-rank:query', 2, 1, 2560, 'ranking', 'fa:area-chart', 'crm/statistics/rank/index', 'CrmStatisticsRank', 0, '1', '1', '1', '1', to_date('2024-01-26 22:52:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:39:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2562, '客户导入', 'crm:customer:import', 3, 6, 2391, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-01 13:09:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-01 13:09:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2563, 'ERP 系统', '', 1, 300, 0, '/erp', 'fa-solid:store', '', '', 0, '1', '1', '1', '1', to_date('2024-02-04 15:37:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 15:37:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2564, '产品管理', '', 1, 40, 2563, 'product', 'fa:product-hunt', '', '', 0, '1', '1', '1', '1', to_date('2024-02-04 15:38:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 15:38:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2565, '产品信息', '', 2, 0, 2564, 'product', 'fa-solid:apple-alt', 'erp/product/product/index', 'ErpProduct', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 14:42:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2566, '产品查询', 'erp:product:query', 3, 1, 2565, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:21:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2567, '产品创建', 'erp:product:create', 3, 2, 2565, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:22:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2568, '产品更新', 'erp:product:update', 3, 3, 2565, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:22:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2569, '产品删除', 'erp:product:delete', 3, 4, 2565, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:22:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2570, '产品导出', 'erp:product:export', 3, 5, 2565, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-02-04 07:52:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:22:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2571, '产品分类', '', 2, 1, 2564, 'product-category', 'fa:certificate', 'erp/product/category/index', 'ErpProductCategory', 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 17:24:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2572, '分类查询', 'erp:product-category:query', 3, 1, 2571, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2573, '分类创建', 'erp:product-category:create', 3, 2, 2571, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2574, '分类更新', 'erp:product-category:update', 3, 3, 2571, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2575, '分类删除', 'erp:product-category:delete', 3, 4, 2571, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2576, '分类导出', 'erp:product-category:export', 3, 5, 2571, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 09:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2577, '产品单位', '', 2, 2, 2564, 'unit', 'ep:opportunity', 'erp/product/unit/index', 'ErpProductUnit', 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-04 19:54:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2578, '单位查询', 'erp:product-unit:query', 3, 1, 2577, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2579, '单位创建', 'erp:product-unit:create', 3, 2, 2577, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2580, '单位更新', 'erp:product-unit:update', 3, 3, 2577, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2581, '单位删除', 'erp:product-unit:delete', 3, 4, 2577, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2582, '单位导出', 'erp:product-unit:export', 3, 5, 2577, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 11:54:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2583, '库存管理', '', 1, 30, 2563, 'stock', 'fa:window-restore', '', '', 0, '1', '1', '1', '1', to_date('2024-02-05 00:29:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 00:29:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2584, '仓库信息', '', 2, 0, 2583, 'warehouse', 'ep:house', 'erp/stock/warehouse/index', 'ErpWarehouse', 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 01:12:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2585, '仓库查询', 'erp:warehouse:query', 3, 1, 2584, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2586, '仓库创建', 'erp:warehouse:create', 3, 2, 2584, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2587, '仓库更新', 'erp:warehouse:update', 3, 3, 2584, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2588, '仓库删除', 'erp:warehouse:delete', 3, 4, 2584, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2589, '仓库导出', 'erp:warehouse:export', 3, 5, 2584, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-04 17:12:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2590, '产品库存', '', 2, 1, 2583, 'stock', 'ep:coffee', 'erp/stock/stock/index', 'ErpStock', 0, '1', '1', '1', '', to_date('2024-02-05 06:40:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-05 14:42:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2591, '库存查询', 'erp:stock:query', 3, 1, 2590, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 06:40:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 06:40:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2592, '库存导出', 'erp:stock:export', 3, 5, 2590, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 06:40:50', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 06:40:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2593, '出入库明细', '', 2, 2, 2583, 'record', 'fa-solid:blog', 'erp/stock/record/index', 'ErpStockRecord', 0, '1', '1', '1', '', to_date('2024-02-05 10:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 17:26:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2594, '库存明细查询', 'erp:stock-record:query', 3, 1, 2593, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 10:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 10:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2595, '库存明细导出', 'erp:stock-record:export', 3, 5, 2593, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 10:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 10:27:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2596, '其它入库', '', 2, 3, 2583, 'in', 'ep:zoom-in', 'erp/stock/in/index', 'ErpStockIn', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 19:06:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2597, '其它入库单查询', 'erp:stock-in:query', 3, 1, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2598, '其它入库单创建', 'erp:stock-in:create', 3, 2, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2599, '其它入库单更新', 'erp:stock-in:update', 3, 3, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2600, '其它入库单删除', 'erp:stock-in:delete', 3, 4, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2601, '其它入库单导出', 'erp:stock-in:export', 3, 5, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2602, '采购管理', '', 1, 10, 2563, 'purchase', 'fa:buysellads', '', '', 0, '1', '1', '1', '1', to_date('2024-02-06 16:01:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 16:01:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2603, '供应商信息', '', 2, 4, 2602, 'supplier', 'fa:superpowers', 'erp/purchase/supplier/index', 'ErpSupplier', 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-06 16:22:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2604, '供应商查询', 'erp:supplier:query', 3, 1, 2603, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2605, '供应商创建', 'erp:supplier:create', 3, 2, 2603, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2606, '供应商更新', 'erp:supplier:update', 3, 3, 2603, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2607, '供应商删除', 'erp:supplier:delete', 3, 4, 2603, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2608, '供应商导出', 'erp:supplier:export', 3, 5, 2603, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-06 08:21:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2609, '其它入库单审批', 'erp:stock-in:update-status', 3, 6, 2596, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2610, '其它出库', '', 2, 4, 2583, 'out', 'ep:zoom-out', 'erp/stock/out/index', 'ErpStockOut', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 19:06:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2611, '其它出库单查询', 'erp:stock-out:query', 3, 1, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2612, '其它出库单创建', 'erp:stock-out:create', 3, 2, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2613, '其它出库单更新', 'erp:stock-out:update', 3, 3, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2614, '其它出库单删除', 'erp:stock-out:delete', 3, 4, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2615, '其它出库单导出', 'erp:stock-out:export', 3, 5, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2616, '其它出库单审批', 'erp:stock-out:update-status', 3, 6, 2610, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 06:43:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2617, '销售管理', '', 1, 20, 2563, 'sale', 'fa:sellsy', '', '', 0, '1', '1', '1', '1', to_date('2024-02-07 15:12:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 15:12:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2618, '客户信息', '', 2, 4, 2617, 'customer', 'ep:avatar', 'erp/sale/customer/index', 'ErpCustomer', 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-07 15:22:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2619, '客户查询', 'erp:customer:query', 3, 1, 2618, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2620, '客户创建', 'erp:customer:create', 3, 2, 2618, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2621, '客户更新', 'erp:customer:update', 3, 3, 2618, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2622, '客户删除', 'erp:customer:delete', 3, 4, 2618, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2623, '客户导出', 'erp:customer:export', 3, 5, 2618, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 07:21:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2624, '库存调拨', '', 2, 5, 2583, 'move', 'ep:folder-remove', 'erp/stock/move/index', 'ErpStockMove', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-16 18:53:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2625, '库存调度单查询', 'erp:stock-move:query', 3, 1, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2626, '库存调度单创建', 'erp:stock-move:create', 3, 2, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2627, '库存调度单更新', 'erp:stock-move:update', 3, 3, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2628, '库存调度单删除', 'erp:stock-move:delete', 3, 4, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2629, '库存调度单导出', 'erp:stock-move:export', 3, 5, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2630, '库存调度单审批', 'erp:stock-move:update-status', 3, 6, 2624, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:13:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2631, '库存盘点', '', 2, 6, 2583, 'check', 'ep:circle-check-filled', 'erp/stock/check/index', 'ErpStockCheck', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-08 08:31:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2632, '库存盘点单查询', 'erp:stock-check:query', 3, 1, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2633, '库存盘点单创建', 'erp:stock-check:create', 3, 2, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2634, '库存盘点单更新', 'erp:stock-check:update', 3, 3, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2635, '库存盘点单删除', 'erp:stock-check:delete', 3, 4, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2636, '库存盘点单导出', 'erp:stock-check:export', 3, 5, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2637, '库存盘点单审批', 'erp:stock-check:update-status', 3, 6, 2631, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:13:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2638, '销售订单', '', 2, 1, 2617, 'order', 'fa:first-order', 'erp/sale/order/index', 'ErpSaleOrder', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-10 21:59:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2639, '销售订单查询', 'erp:sale-order:query', 3, 1, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2640, '销售订单创建', 'erp:sale-order:create', 3, 2, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2641, '销售订单更新', 'erp:sale-order:update', 3, 3, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2642, '销售订单删除', 'erp:sale-order:delete', 3, 4, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2643, '销售订单导出', 'erp:sale-order:export', 3, 5, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2644, '销售订单审批', 'erp:sale-order:update-status', 3, 6, 2638, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:13:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2645, '财务管理', '', 1, 50, 2563, 'finance', 'ep:money', '', '', 0, '1', '1', '1', '1', to_date('2024-02-10 08:05:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-10 08:06:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2646, '结算账户', '', 2, 10, 2645, 'account', 'fa:universal-access', 'erp/finance/account/index', 'ErpAccount', 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-14 08:24:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2647, '结算账户查询', 'erp:account:query', 3, 1, 2646, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2648, '结算账户创建', 'erp:account:create', 3, 2, 2646, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2649, '结算账户更新', 'erp:account:update', 3, 3, 2646, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2650, '结算账户删除', 'erp:account:delete', 3, 4, 2646, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2651, '结算账户导出', 'erp:account:export', 3, 5, 2646, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-10 00:15:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2652, '销售出库', '', 2, 2, 2617, 'out', 'ep:sold-out', 'erp/sale/out/index', 'ErpSaleOut', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-10 22:02:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2653, '销售出库查询', 'erp:sale-out:query', 3, 1, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2654, '销售出库创建', 'erp:sale-out:create', 3, 2, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2655, '销售出库更新', 'erp:sale-out:update', 3, 3, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2656, '销售出库删除', 'erp:sale-out:delete', 3, 4, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2657, '销售出库导出', 'erp:sale-out:export', 3, 5, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2658, '销售出库审批', 'erp:sale-out:update-status', 3, 6, 2652, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:13:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2659, '销售退货', '', 2, 3, 2617, 'return', 'fa-solid:bone', 'erp/sale/return/index', 'ErpSaleReturn', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 06:12:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2660, '销售退货查询', 'erp:sale-return:query', 3, 1, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2661, '销售退货创建', 'erp:sale-return:create', 3, 2, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2662, '销售退货更新', 'erp:sale-return:update', 3, 3, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2663, '销售退货删除', 'erp:sale-return:delete', 3, 4, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2664, '销售退货导出', 'erp:sale-return:export', 3, 5, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:12:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2665, '销售退货审批', 'erp:sale-return:update-status', 3, 6, 2659, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-07 11:13:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2666, '采购订单', '', 2, 1, 2602, 'order', 'fa-solid:border-all', 'erp/purchase/order/index', 'ErpPurchaseOrder', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 08:51:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2667, '采购订单查询', 'erp:purchase-order:query', 3, 1, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2668, '采购订单创建', 'erp:purchase-order:create', 3, 2, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2669, '采购订单更新', 'erp:purchase-order:update', 3, 3, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2670, '采购订单删除', 'erp:purchase-order:delete', 3, 4, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2671, '采购订单导出', 'erp:purchase-order:export', 3, 5, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2672, '采购订单审批', 'erp:purchase-order:update-status', 3, 6, 2666, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2673, '采购入库', '', 2, 2, 2602, 'in', 'fa-solid:gopuram', 'erp/purchase/in/index', 'ErpPurchaseIn', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 11:19:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2674, '采购入库查询', 'erp:purchase-in:query', 3, 1, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2675, '采购入库创建', 'erp:purchase-in:create', 3, 2, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2676, '采购入库更新', 'erp:purchase-in:update', 3, 3, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2677, '采购入库删除', 'erp:purchase-in:delete', 3, 4, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2678, '采购入库导出', 'erp:purchase-in:export', 3, 5, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2679, '采购入库审批', 'erp:purchase-in:update-status', 3, 6, 2673, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2680, '采购退货', '', 2, 3, 2602, 'return', 'ep:minus', 'erp/purchase/return/index', 'ErpPurchaseReturn', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-12 20:51:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2681, '采购退货查询', 'erp:purchase-return:query', 3, 1, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2682, '采购退货创建', 'erp:purchase-return:create', 3, 2, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2683, '采购退货更新', 'erp:purchase-return:update', 3, 3, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2684, '采购退货删除', 'erp:purchase-return:delete', 3, 4, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2685, '采购退货导出', 'erp:purchase-return:export', 3, 5, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2686, '采购退货审批', 'erp:purchase-return:update-status', 3, 6, 2680, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2687, '付款单', '', 2, 1, 2645, 'payment', 'ep:caret-right', 'erp/finance/payment/index', 'ErpFinancePayment', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-14 08:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2688, '付款单查询', 'erp:finance-payment:query', 3, 1, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2689, '付款单创建', 'erp:finance-payment:create', 3, 2, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2690, '付款单更新', 'erp:finance-payment:update', 3, 3, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2691, '付款单删除', 'erp:finance-payment:delete', 3, 4, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2692, '付款单导出', 'erp:finance-payment:export', 3, 5, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2693, '付款单审批', 'erp:finance-payment:update-status', 3, 6, 2687, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2694, '收款单', '', 2, 2, 2645, 'receipt', 'ep:expand', 'erp/finance/receipt/index', 'ErpFinanceReceipt', 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-15 19:35:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2695, '收款单查询', 'erp:finance-receipt:query', 3, 1, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2696, '收款单创建', 'erp:finance-receipt:create', 3, 2, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2697, '收款单更新', 'erp:finance-receipt:update', 3, 3, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:44:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2698, '收款单删除', 'erp:finance-receipt:delete', 3, 4, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2699, '收款单导出', 'erp:finance-receipt:export', 3, 5, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2700, '收款单审批', 'erp:finance-receipt:update-status', 3, 6, 2694, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-02-05 16:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-02-12 00:45:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2701, '待办事项', '', 2, 0, 2397, 'backlog', 'fa-solid:tasks', 'crm/backlog/index', 'CrmBacklog', 0, '1', '1', '1', '1', to_date('2024-02-17 17:17:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-17 17:17:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2702, 'ERP 首页', 'erp:statistics:query', 2, 0, 2563, 'home', 'ep:home-filled', 'erp/home/index.vue', 'ErpHome', 0, '1', '1', '1', '1', to_date('2024-02-18 16:49:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-26 21:12:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2703, '商机状态配置', '', 2, 4, 2524, 'business-status', 'fa-solid:charging-station', 'crm/business/status/index', 'CrmBusinessStatus', 0, '1', '1', '1', '1', to_date('2024-02-21 20:15:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-21 20:15:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2704, '商机状态查询', 'crm:business-status:query', 3, 1, 2703, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-21 20:35:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-21 20:36:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2705, '商机状态创建', 'crm:business-status:create', 3, 2, 2703, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-21 20:35:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-21 20:35:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2706, '商机状态更新', 'crm:business-status:update', 3, 3, 2703, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-21 20:36:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-21 20:36:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2707, '商机状态删除', 'crm:business-status:delete', 3, 4, 2703, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-21 20:36:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-21 20:36:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2708, '合同配置', '', 2, 5, 2524, 'contract-config', 'ep:connection', 'crm/contract/config/index', 'CrmContractConfig', 0, '1', '1', '1', '1', to_date('2024-02-24 16:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 16:44:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2709, '客户公海配置查询', 'crm:customer-pool-config:query', 3, 2, 2516, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-24 16:45:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 16:45:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2710, '合同配置更新', 'crm:contract-config:update', 3, 1, 2708, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-24 16:45:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 16:45:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2711, '合同配置查询', 'crm:contract-config:query', 3, 2, 2708, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-02-24 16:46:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 16:46:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2712, '客户分析', 'crm:statistics-customer:query', 2, 0, 2560, 'customer', 'ep:avatar', 'views/crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, '1', '1', '1', '1', to_date('2024-03-09 16:43:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2713, '抄送我的', 'bpm:process-instance-cc:query', 2, 30, 1200, 'copy', 'ep:copy-document', 'bpm/task/copy/index', 'BpmProcessInstanceCopy', 0, '1', '1', '1', '1', to_date('2024-03-17 21:50:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:55:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2714, '流程分类', '', 2, 3, 1186, 'category', 'fa:object-ungroup', 'bpm/category/index', 'BpmCategory', 0, '1', '1', '1', '', to_date('2024-03-08 02:00:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-21 23:51:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2715, '分类查询', 'bpm:category:query', 3, 1, 2714, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-03-08 02:00:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 14:36:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2716, '分类创建', 'bpm:category:create', 3, 2, 2714, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-03-08 02:00:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 14:36:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2717, '分类更新', 'bpm:category:update', 3, 3, 2714, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-03-08 02:00:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 14:36:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2718, '分类删除', 'bpm:category:delete', 3, 4, 2714, '', '', '', '', 0, '1', '1', '1', '', to_date('2024-03-08 02:00:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-19 14:36:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2720, '发起流程', '', 2, 0, 1200, 'create', 'fa-solid:grin-stars', 'bpm/processInstance/create/index', 'BpmProcessInstanceCreate', 0, '1', '0', '1', '1', to_date('2024-03-19 19:46:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:03:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2721, '流程实例', '', 2, 10, 1186, 'process-instance/manager', 'fa:square', 'bpm/processInstance/manager/index', 'BpmProcessInstanceManager', 0, '1', '1', '1', '1', to_date('2024-03-21 23:57:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-21 23:57:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2722, '流程实例的查询(管理员)', 'bpm:process-instance:manager-query', 3, 1, 2721, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-03-22 08:18:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-22 08:19:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2723, '流程实例的取消(管理员)', 'bpm:process-instance:cancel-by-admin', 3, 2, 2721, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-03-22 08:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-22 08:19:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2724, '流程任务', '', 2, 11, 1186, 'process-tasnk', 'ep:collection-tag', 'bpm/task/manager/index', 'BpmManagerTask', 0, '1', '1', '1', '1', to_date('2024-03-22 08:43:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-22 08:43:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2725, '流程任务的查询(管理员)', 'bpm:task:mananger-query', 3, 1, 2724, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-03-22 08:43:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-22 08:43:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2726, '流程监听器', '', 2, 5, 1186, 'process-listener', 'fa:assistive-listening-systems', 'bpm/processListener/index', 'BpmProcessListener', 0, '1', '1', '1', '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 13:13:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2727, '流程监听器查询', 'bpm:process-listener:query', 3, 1, 2726, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2728, '流程监听器创建', 'bpm:process-listener:create', 3, 2, 2726, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2729, '流程监听器更新', 'bpm:process-listener:update', 3, 3, 2726, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2730, '流程监听器删除', 'bpm:process-listener:delete', 3, 4, 2726, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 16:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2731, '流程表达式', '', 2, 6, 1186, 'process-expression', 'fa:wpexplorer', 'bpm/processExpression/index', 'BpmProcessExpression', 0, '1', '1', '1', '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-23 19:43:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2732, '流程表达式查询', 'bpm:process-expression:query', 3, 1, 2731, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2733, '流程表达式创建', 'bpm:process-expression:create', 3, 2, 2731, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2734, '流程表达式更新', 'bpm:process-expression:update', 3, 3, 2731, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2735, '流程表达式删除', 'bpm:process-expression:delete', 3, 4, 2731, '', '', '', NULL, 0, '1', '1', '1', '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2024-03-09 22:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2736, '员工业绩', 'crm:statistics-performance:query', 2, 3, 2560, 'performance', 'ep:dish-dot', 'crm/statistics/performance/index', 'CrmStatisticsPerformance', 0, '1', '1', '1', '1', to_date('2024-04-05 13:49:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:42:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2737, '客户画像', 'crm:statistics-portrait:query', 2, 4, 2560, 'portrait', 'ep:picture', 'crm/statistics/portrait/index', 'CrmStatisticsPortrait', 0, '1', '1', '1', '1', to_date('2024-04-05 13:57:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:42:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2738, '销售漏斗', 'crm:statistics-funnel:query', 2, 5, 2560, 'funnel', 'ep:grape', 'crm/statistics/funnel/index', 'CrmStatisticsFunnel', 0, '1', '1', '1', '1', to_date('2024-04-13 10:53:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:39:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2739, '消息中心', '', 1, 7, 1, 'messages', 'ep:chat-dot-round', '', '', 0, '1', '1', '1', '1', to_date('2024-04-22 23:54:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 09:36:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2740, '监控中心', '', 1, 10, 2, 'monitors', 'ep:monitor', '', '', 0, '1', '1', '1', '1', to_date('2024-04-23 00:04:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-23 00:04:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2741, '领取公海客户', 'crm:customer:receive', 3, 1, 2546, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:47:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:47:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2742, '分配公海客户', 'crm:customer:distribute', 3, 2, 2546, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2743, '商品统计查询', 'statistics:product:query', 3, 1, 2545, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:50:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:50:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2744, '商品统计导出', 'statistics:product:export', 3, 2, 2545, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:50:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:50:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2745, '支付渠道查询', 'pay:channel:query', 3, 10, 1126, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:53:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:53:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2746, '支付渠道创建', 'pay:channel:create', 3, 11, 1126, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2747, '支付渠道更新', 'pay:channel:update', 3, 12, 1126, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:53:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:53:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2748, '支付渠道删除', 'pay:channel:delete', 3, 13, 1126, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:54:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:54:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2749, '商品收藏查询', 'product:favorite:query', 3, 10, 2014, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:55:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:55:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2750, '商品浏览查询', 'product:browse-history:query', 3, 20, 2014, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:57:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:57:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2751, '售后同意', 'trade:after-sale:agree', 3, 2, 2073, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:58:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:58:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2752, '售后不同意', 'trade:after-sale:disagree', 3, 3, 2073, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 19:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 19:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2753, '售后确认退货', 'trade:after-sale:receive', 3, 4, 2073, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 20:00:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:00:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2754, '售后确认退款', 'trade:after-sale:refund', 3, 5, 2073, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2755, '删除项目', 'report:go-view-project:delete', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 20:01:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:01:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2756, '会员等级记录查询', 'member:level-record:query', 3, 10, 2325, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 20:02:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:02:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2757, '会员经验记录查询', 'member:experience-record:query', 3, 11, 2325, '', '', '', '', 0, '1', '1', '1', '1', to_date('2024-04-24 20:02:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 20:02:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_menu_seq + START WITH 2758 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_notice +-- ------------------------------ +CREATE TABLE system_notice +( + id number NOT NULL, + title varchar2(50) NOT NULL, + content clob NOT NULL, + type smallint NOT NULL, + status smallint DEFAULT 0 NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of MEMBER_USER --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_notice + ADD CONSTRAINT pk_system_notice PRIMARY KEY (id); + +COMMENT ON COLUMN system_notice.id IS '公告ID'; +COMMENT ON COLUMN system_notice.title IS '公告标题'; +COMMENT ON COLUMN system_notice.content IS '公告内容'; +COMMENT ON COLUMN system_notice.type IS '公告类型(1通知 2公告)'; +COMMENT ON COLUMN system_notice.status IS '公告状态(0正常 1关闭)'; +COMMENT ON COLUMN system_notice.create_time IS '创建时间'; +COMMENT ON COLUMN system_notice.update_time IS '更新时间'; +COMMENT ON COLUMN system_notice.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notice IS '通知公告表'; + +-- @formatter:off +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133

', 1, 0, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-04 21:00:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '

11112222

', 2, 1, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 20:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '我是测试标题', '

哈哈哈哈123

', 1, 0, '110', to_date('2022-02-22 01:01:25', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-22 01:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_notice_seq + START WITH 5 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_notify_message +-- ------------------------------ +CREATE TABLE system_notify_message +( + id number NOT NULL, + user_id number NOT NULL, + user_type smallint NOT NULL, + template_id number NOT NULL, + template_code varchar2(64) NOT NULL, + template_nickname varchar2(63) NOT NULL, + template_content varchar2(1024) NOT NULL, + template_type number NOT NULL, + template_params varchar2(255) NOT NULL, + read_status number(1, 0) NOT NULL, + read_time date DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_APP --- ---------------------------- -DROP TABLE "PAY_APP"; -CREATE TABLE "PAY_APP" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(64), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(255), - "PAY_NOTIFY_URL" NCLOB, - "REFUND_NOTIFY_URL" NCLOB, - "MERCHANT_ID" NUMBER(20,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_APP"."ID" IS '应用编号'; -COMMENT ON COLUMN "PAY_APP"."NAME" IS '应用名'; -COMMENT ON COLUMN "PAY_APP"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "PAY_APP"."REMARK" IS '备注'; -COMMENT ON COLUMN "PAY_APP"."PAY_NOTIFY_URL" IS '支付结果的回调地址'; -COMMENT ON COLUMN "PAY_APP"."REFUND_NOTIFY_URL" IS '退款结果的回调地址'; -COMMENT ON COLUMN "PAY_APP"."MERCHANT_ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_APP"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_APP"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_APP"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_APP"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_APP"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_APP" IS '支付应用信息'; +ALTER TABLE system_notify_message + ADD CONSTRAINT pk_system_notify_message PRIMARY KEY (id); + +COMMENT ON COLUMN system_notify_message.id IS '用户ID'; +COMMENT ON COLUMN system_notify_message.user_id IS '用户id'; +COMMENT ON COLUMN system_notify_message.user_type IS '用户类型'; +COMMENT ON COLUMN system_notify_message.template_id IS '模版编号'; +COMMENT ON COLUMN system_notify_message.template_code IS '模板编码'; +COMMENT ON COLUMN system_notify_message.template_nickname IS '模版发送人名称'; +COMMENT ON COLUMN system_notify_message.template_content IS '模版内容'; +COMMENT ON COLUMN system_notify_message.template_type IS '模版类型'; +COMMENT ON COLUMN system_notify_message.template_params IS '模版参数'; +COMMENT ON COLUMN system_notify_message.read_status IS '是否已读'; +COMMENT ON COLUMN system_notify_message.read_time IS '阅读时间'; +COMMENT ON COLUMN system_notify_message.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_message.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_message.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notify_message IS '站内信消息表'; + +-- @formatter:off +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 11:44:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 11:45:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 103, 2, 2, 'register', '系统消息', '你好,欢迎 哈哈 加入大家庭!', 2, '{"name":"哈哈"}', '0', NULL, '1', to_date('2023-01-28 21:02:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 21:02:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{"name":"芋艿","what":"写代码"}', '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 22:21:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{"name":"芋艿","what":"写代码"}', '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 22:22:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 1, 2, 1, 'test', '123', '我是 2,我开始 3 了', 1, '{"name":"2","what":"3"}', '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 23:45:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 1, 2, 2, 'register', '系统消息', '你好,欢迎 123 加入大家庭!', 2, '{"name":"123"}', '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 23:50:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-29 10:52:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-28 08:35:46提现¥0.09元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-28 08:35:46","price":"0.09"}', '0', NULL, '1', to_date('2023-09-28 16:36:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-09-28 16:36:22', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-30 20:59:40提现¥1.00元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-30 20:59:40","price":"1.00"}', '0', NULL, '1', to_date('2023-10-03 12:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-10-03 12:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_notify_message_seq + START WITH 11 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_notify_template +-- ------------------------------ +CREATE TABLE system_notify_template +( + id number NOT NULL, + name varchar2(63) NOT NULL, + code varchar2(64) NOT NULL, + nickname varchar2(255) NOT NULL, + content varchar2(1024) NOT NULL, + type smallint NOT NULL, + params varchar2(255) DEFAULT NULL NULL, + status smallint NOT NULL, + remark varchar2(255) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_APP --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_notify_template + ADD CONSTRAINT pk_system_notify_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_notify_template.id IS '主键'; +COMMENT ON COLUMN system_notify_template.name IS '模板名称'; +COMMENT ON COLUMN system_notify_template.code IS '模版编码'; +COMMENT ON COLUMN system_notify_template.nickname IS '发送人名称'; +COMMENT ON COLUMN system_notify_template.content IS '模版内容'; +COMMENT ON COLUMN system_notify_template.type IS '类型'; +COMMENT ON COLUMN system_notify_template.params IS '参数数组'; +COMMENT ON COLUMN system_notify_template.status IS '状态'; +COMMENT ON COLUMN system_notify_template.remark IS '备注'; +COMMENT ON COLUMN system_notify_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; +COMMENT ON TABLE system_notify_template IS '站内信模板表'; + +CREATE SEQUENCE system_notify_template_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_oauth2_access_token +-- ------------------------------ +CREATE TABLE system_oauth2_access_token +( + id number NOT NULL, + user_id number NOT NULL, + user_type smallint NOT NULL, + user_info varchar2(512) NOT NULL, + access_token varchar2(255) NOT NULL, + refresh_token varchar2(32) NOT NULL, + client_id varchar2(255) NOT NULL, + scopes varchar2(255) DEFAULT NULL NULL, + expires_time date NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_CHANNEL --- ---------------------------- -DROP TABLE "PAY_CHANNEL"; -CREATE TABLE "PAY_CHANNEL" ( - "ID" NUMBER(20,0) NOT NULL, - "CODE" NVARCHAR2(32), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(255), - "FEE_RATE" NUMBER NOT NULL, - "MERCHANT_ID" NUMBER(20,0) NOT NULL, - "APP_ID" NUMBER(20,0) NOT NULL, - "CONFIG" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_CHANNEL"."ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_CHANNEL"."CODE" IS '渠道编码'; -COMMENT ON COLUMN "PAY_CHANNEL"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "PAY_CHANNEL"."REMARK" IS '备注'; -COMMENT ON COLUMN "PAY_CHANNEL"."FEE_RATE" IS '渠道费率,单位:百分比'; -COMMENT ON COLUMN "PAY_CHANNEL"."MERCHANT_ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_CHANNEL"."APP_ID" IS '应用编号'; -COMMENT ON COLUMN "PAY_CHANNEL"."CONFIG" IS '支付渠道配置'; -COMMENT ON COLUMN "PAY_CHANNEL"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_CHANNEL"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_CHANNEL"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_CHANNEL"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_CHANNEL"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_CHANNEL" IS '支付渠道 -'; +ALTER TABLE system_oauth2_access_token + ADD CONSTRAINT pk_system_oauth2_access_token PRIMARY KEY (id); + +CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token); +CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token); + +COMMENT ON COLUMN system_oauth2_access_token.id IS '编号'; +COMMENT ON COLUMN system_oauth2_access_token.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_access_token.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_access_token.user_info IS '用户信息'; +COMMENT ON COLUMN system_oauth2_access_token.access_token IS '访问令牌'; +COMMENT ON COLUMN system_oauth2_access_token.refresh_token IS '刷新令牌'; +COMMENT ON COLUMN system_oauth2_access_token.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_access_token.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_access_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_access_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_access_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; + +CREATE SEQUENCE system_oauth2_access_token_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_oauth2_approve +-- ------------------------------ +CREATE TABLE system_oauth2_approve +( + id number NOT NULL, + user_id number NOT NULL, + user_type smallint NOT NULL, + client_id varchar2(255) NOT NULL, + scope varchar2(255) DEFAULT '' NULL, + approved number(1, 0) DEFAULT '0' NOT NULL, + expires_time date NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_CHANNEL --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_oauth2_approve + ADD CONSTRAINT pk_system_oauth2_approve PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_approve.id IS '编号'; +COMMENT ON COLUMN system_oauth2_approve.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_approve.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_approve.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_approve.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_approve.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_approve.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; + +CREATE SEQUENCE system_oauth2_approve_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_oauth2_client +-- ------------------------------ +CREATE TABLE system_oauth2_client +( + id number NOT NULL, + client_id varchar2(255) NOT NULL, + secret varchar2(255) NOT NULL, + name varchar2(255) NOT NULL, + logo varchar2(255) NOT NULL, + description varchar2(255) DEFAULT NULL NULL, + status smallint NOT NULL, + access_token_validity_seconds number NOT NULL, + refresh_token_validity_seconds number NOT NULL, + redirect_uris varchar2(255) NOT NULL, + authorized_grant_types varchar2(255) NOT NULL, + scopes varchar2(255) DEFAULT NULL NULL, + auto_approve_scopes varchar2(255) DEFAULT NULL NULL, + authorities varchar2(255) DEFAULT NULL NULL, + resource_ids varchar2(255) DEFAULT NULL NULL, + additional_information varchar2(4000) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_MERCHANT --- ---------------------------- -DROP TABLE "PAY_MERCHANT"; -CREATE TABLE "PAY_MERCHANT" ( - "ID" NUMBER(20,0) NOT NULL, - "NO" NVARCHAR2(32), - "NAME" NVARCHAR2(64), - "SHORT_NAME" NVARCHAR2(64), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_MERCHANT"."ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_MERCHANT"."NO" IS '商户号'; -COMMENT ON COLUMN "PAY_MERCHANT"."NAME" IS '商户全称'; -COMMENT ON COLUMN "PAY_MERCHANT"."SHORT_NAME" IS '商户简称'; -COMMENT ON COLUMN "PAY_MERCHANT"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "PAY_MERCHANT"."REMARK" IS '备注'; -COMMENT ON COLUMN "PAY_MERCHANT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_MERCHANT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_MERCHANT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_MERCHANT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_MERCHANT"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_MERCHANT" IS '支付商户信息'; +ALTER TABLE system_oauth2_client + ADD CONSTRAINT pk_system_oauth2_client PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_client.id IS '编号'; +COMMENT ON COLUMN system_oauth2_client.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_client.secret IS '客户端密钥'; +COMMENT ON COLUMN system_oauth2_client.name IS '应用名'; +COMMENT ON COLUMN system_oauth2_client.logo IS '应用图标'; +COMMENT ON COLUMN system_oauth2_client.description IS '应用描述'; +COMMENT ON COLUMN system_oauth2_client.status IS '状态'; +COMMENT ON COLUMN system_oauth2_client.access_token_validity_seconds IS '访问令牌的有效期'; +COMMENT ON COLUMN system_oauth2_client.refresh_token_validity_seconds IS '刷新令牌的有效期'; +COMMENT ON COLUMN system_oauth2_client.redirect_uris IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_client.authorized_grant_types IS '授权类型'; +COMMENT ON COLUMN system_oauth2_client.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_client.auto_approve_scopes IS '自动通过的授权范围'; +COMMENT ON COLUMN system_oauth2_client.authorities IS '权限'; +COMMENT ON COLUMN system_oauth2_client.resource_ids IS '资源'; +COMMENT ON COLUMN system_oauth2_client.additional_information IS '附加信息'; +COMMENT ON COLUMN system_oauth2_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_client.update_time IS '更新时间'; +COMMENT ON TABLE system_oauth2_client IS 'OAuth2 客户端表'; + +-- @formatter:off +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 1800, 2592000, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', to_date('2022-05-11 21:47:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-22 16:31:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', '啦啦啦啦', 0, 1800, 43200, '["https://www.iocoder.cn"]', '["password","authorization_code","implicit"]', '["user_info","projects"]', '["user_info"]', '[]', '[]', '{}', '1', to_date('2022-05-12 00:28:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:01:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (41, 'yudao-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["authorization_code","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', to_date('2022-09-29 13:28:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-29 13:28:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["password","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', to_date('2022-10-04 17:40:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-10-04 20:31:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_oauth2_client_seq + START WITH 43 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_oauth2_code +-- ------------------------------ +CREATE TABLE system_oauth2_code +( + id number NOT NULL, + user_id number NOT NULL, + user_type smallint NOT NULL, + code varchar2(32) NOT NULL, + client_id varchar2(255) NOT NULL, + scopes varchar2(255) DEFAULT '' NULL, + expires_time date NOT NULL, + redirect_uri varchar2(255) DEFAULT NULL NULL, + state varchar2(255) DEFAULT '' NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_MERCHANT --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_oauth2_code + ADD CONSTRAINT pk_system_oauth2_code PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_code.id IS '编号'; +COMMENT ON COLUMN system_oauth2_code.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_code.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_code.code IS '授权码'; +COMMENT ON COLUMN system_oauth2_code.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_code.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_code.redirect_uri IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; + +CREATE SEQUENCE system_oauth2_code_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_oauth2_refresh_token +-- ------------------------------ +CREATE TABLE system_oauth2_refresh_token +( + id number NOT NULL, + user_id number NOT NULL, + refresh_token varchar2(32) NOT NULL, + user_type smallint NOT NULL, + client_id varchar2(255) NOT NULL, + scopes varchar2(255) DEFAULT NULL NULL, + expires_time date NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_NOTIFY_LOG --- ---------------------------- -DROP TABLE "PAY_NOTIFY_LOG"; -CREATE TABLE "PAY_NOTIFY_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "TASK_ID" NUMBER(20,0) NOT NULL, - "NOTIFY_TIMES" NUMBER(4,0) NOT NULL, - "RESPONSE" NCLOB, - "STATUS" NUMBER(4,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."ID" IS '日志编号'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."TASK_ID" IS '通知任务编号'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."NOTIFY_TIMES" IS '第几次被通知'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."RESPONSE" IS '请求参数'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."STATUS" IS '通知状态'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_NOTIFY_LOG"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_NOTIFY_LOG" IS '支付通知 App 的日志'; +ALTER TABLE system_oauth2_refresh_token + ADD CONSTRAINT pk_system_oauth2_refresh_token PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_refresh_token.id IS '编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.refresh_token IS '刷新令牌'; +COMMENT ON COLUMN system_oauth2_refresh_token.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_refresh_token.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_refresh_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; + +CREATE SEQUENCE system_oauth2_refresh_token_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_operate_log +-- ------------------------------ +CREATE TABLE system_operate_log +( + id number NOT NULL, + trace_id varchar2(64) DEFAULT '' NULL, + user_id number NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + type varchar2(50) NOT NULL, + sub_type varchar2(50) NOT NULL, + biz_id number NOT NULL, + action varchar2(2000) DEFAULT '' NULL, + extra varchar2(2000) DEFAULT '' NULL, + request_method varchar2(16) DEFAULT '' NULL, + request_url varchar2(255) DEFAULT '' NULL, + user_ip varchar2(50) DEFAULT NULL NULL, + user_agent varchar2(200) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_NOTIFY_LOG --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_operate_log + ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_operate_log.id IS '日志主键'; +COMMENT ON COLUMN system_operate_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_operate_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_operate_log.type IS '操作模块类型'; +COMMENT ON COLUMN system_operate_log.sub_type IS '操作名'; +COMMENT ON COLUMN system_operate_log.biz_id IS '操作数据模块编号'; +COMMENT ON COLUMN system_operate_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN system_operate_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_operate_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_operate_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; + +CREATE SEQUENCE system_operate_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_post +-- ------------------------------ +CREATE TABLE system_post +( + id number NOT NULL, + code varchar2(64) NOT NULL, + name varchar2(50) NOT NULL, + sort number NOT NULL, + status smallint NOT NULL, + remark varchar2(500) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_NOTIFY_TASK --- ---------------------------- -DROP TABLE "PAY_NOTIFY_TASK"; -CREATE TABLE "PAY_NOTIFY_TASK" ( - "ID" NUMBER(20,0) NOT NULL, - "MERCHANT_ID" NUMBER(20,0) NOT NULL, - "APP_ID" NUMBER(20,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "DATA_ID" NUMBER(20,0) NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "MERCHANT_ORDER_ID" NVARCHAR2(64), - "NEXT_NOTIFY_TIME" DATE NOT NULL, - "LAST_EXECUTE_TIME" DATE NOT NULL, - "NOTIFY_TIMES" NUMBER(4,0) NOT NULL, - "MAX_NOTIFY_TIMES" NUMBER(4,0) NOT NULL, - "NOTIFY_URL" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."ID" IS '任务编号'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."MERCHANT_ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."APP_ID" IS '应用编号'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."TYPE" IS '通知类型'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."DATA_ID" IS '数据编号'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."STATUS" IS '通知状态'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."MERCHANT_ORDER_ID" IS '商户订单编号'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."NEXT_NOTIFY_TIME" IS '下一次通知时间'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."LAST_EXECUTE_TIME" IS '最后一次执行时间'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."NOTIFY_TIMES" IS '当前通知次数'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."MAX_NOTIFY_TIMES" IS '最大可通知次数'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."NOTIFY_URL" IS '异步通知地址'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_NOTIFY_TASK"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_NOTIFY_TASK" IS '商户支付、退款等的通知 -'; +ALTER TABLE system_post + ADD CONSTRAINT pk_system_post PRIMARY KEY (id); + +COMMENT ON COLUMN system_post.id IS '岗位ID'; +COMMENT ON COLUMN system_post.code IS '岗位编码'; +COMMENT ON COLUMN system_post.name IS '岗位名称'; +COMMENT ON COLUMN system_post.sort IS '显示顺序'; +COMMENT ON COLUMN system_post.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_post.remark IS '备注'; +COMMENT ON COLUMN system_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_post IS '岗位信息表'; + +-- @formatter:off +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', to_date('2021-01-06 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-11 15:19:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 09:18:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'user', '普通员工', 4, 0, '111', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 10:04:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 'HR', '人力资源', 5, 0, '', '1', to_date('2024-03-24 20:45:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 20:45:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_post_seq + START WITH 6 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_role +-- ------------------------------ +CREATE TABLE system_role +( + id number NOT NULL, + name varchar2(30) NOT NULL, + code varchar2(100) NOT NULL, + sort number NOT NULL, + data_scope smallint DEFAULT 1 NOT NULL, + data_scope_dept_ids varchar2(500) DEFAULT '' NULL, + status smallint NOT NULL, + type smallint NOT NULL, + remark varchar2(500) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_NOTIFY_TASK --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_role + ADD CONSTRAINT pk_system_role PRIMARY KEY (id); + +COMMENT ON COLUMN system_role.id IS '角色ID'; +COMMENT ON COLUMN system_role.name IS '角色名称'; +COMMENT ON COLUMN system_role.code IS '角色权限字符串'; +COMMENT ON COLUMN system_role.sort IS '显示顺序'; +COMMENT ON COLUMN system_role.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; +COMMENT ON COLUMN system_role.status IS '角色状态(0正常 1停用)'; +COMMENT ON COLUMN system_role.type IS '角色类型'; +COMMENT ON COLUMN system_role.remark IS '备注'; +COMMENT ON COLUMN system_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role IS '角色信息表'; + +-- @formatter:off +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-22 05:08:21', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-22 05:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', to_date('2024-02-24 10:51:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 02:51:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', to_date('2021-01-06 13:49:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 22:22:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '测试角色', 'test', 0, 1, '[]', 0, 2, '嘿嘿', '110', to_date('2022-02-23 00:14:34', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 13:14:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (136, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (137, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (138, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (139, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (140, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (141, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (143, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (144, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_role_seq + START WITH 145 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_role_menu +-- ------------------------------ +CREATE TABLE system_role_menu +( + id number NOT NULL, + role_id number NOT NULL, + menu_id number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_ORDER --- ---------------------------- -DROP TABLE "PAY_ORDER"; -CREATE TABLE "PAY_ORDER" ( - "ID" NUMBER(20,0) NOT NULL, - "MERCHANT_ID" NUMBER(20,0) NOT NULL, - "APP_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_ID" NUMBER(20,0), - "CHANNEL_CODE" NVARCHAR2(32), - "MERCHANT_ORDER_ID" NVARCHAR2(64), - "SUBJECT" NVARCHAR2(32), - "BODY" NVARCHAR2(128), - "NOTIFY_URL" NCLOB, - "NOTIFY_STATUS" NUMBER(4,0) NOT NULL, - "AMOUNT" NUMBER(20,0) NOT NULL, - "CHANNEL_FEE_RATE" NUMBER, - "CHANNEL_FEE_AMOUNT" NUMBER(20,0), - "STATUS" NUMBER(4,0) NOT NULL, - "USER_IP" NVARCHAR2(50), - "EXPIRE_TIME" DATE NOT NULL, - "SUCCESS_TIME" DATE, - "NOTIFY_TIME" DATE, - "SUCCESS_EXTENSION_ID" NUMBER(20,0), - "REFUND_STATUS" NUMBER(4,0) NOT NULL, - "REFUND_TIMES" NUMBER(4,0) NOT NULL, - "REFUND_AMOUNT" NUMBER(20,0) NOT NULL, - "CHANNEL_USER_ID" NVARCHAR2(255), - "CHANNEL_ORDER_NO" NVARCHAR2(64), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_ORDER"."ID" IS '支付订单编号'; -COMMENT ON COLUMN "PAY_ORDER"."MERCHANT_ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_ORDER"."APP_ID" IS '应用编号'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_ID" IS '渠道编号'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_CODE" IS '渠道编码'; -COMMENT ON COLUMN "PAY_ORDER"."MERCHANT_ORDER_ID" IS '商户订单编号'; -COMMENT ON COLUMN "PAY_ORDER"."SUBJECT" IS '商品标题'; -COMMENT ON COLUMN "PAY_ORDER"."BODY" IS '商品描述'; -COMMENT ON COLUMN "PAY_ORDER"."NOTIFY_URL" IS '异步通知地址'; -COMMENT ON COLUMN "PAY_ORDER"."NOTIFY_STATUS" IS '通知商户支付结果的回调状态'; -COMMENT ON COLUMN "PAY_ORDER"."AMOUNT" IS '支付金额,单位:分'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_FEE_RATE" IS '渠道手续费,单位:百分比'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_FEE_AMOUNT" IS '渠道手续金额,单位:分'; -COMMENT ON COLUMN "PAY_ORDER"."STATUS" IS '支付状态'; -COMMENT ON COLUMN "PAY_ORDER"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "PAY_ORDER"."EXPIRE_TIME" IS '订单失效时间'; -COMMENT ON COLUMN "PAY_ORDER"."SUCCESS_TIME" IS '订单支付成功时间'; -COMMENT ON COLUMN "PAY_ORDER"."NOTIFY_TIME" IS '订单支付通知时间'; -COMMENT ON COLUMN "PAY_ORDER"."SUCCESS_EXTENSION_ID" IS '支付成功的订单拓展单编号'; -COMMENT ON COLUMN "PAY_ORDER"."REFUND_STATUS" IS '退款状态'; -COMMENT ON COLUMN "PAY_ORDER"."REFUND_TIMES" IS '退款次数'; -COMMENT ON COLUMN "PAY_ORDER"."REFUND_AMOUNT" IS '退款总金额,单位:分'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_USER_ID" IS '渠道用户编号'; -COMMENT ON COLUMN "PAY_ORDER"."CHANNEL_ORDER_NO" IS '渠道订单号'; -COMMENT ON COLUMN "PAY_ORDER"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_ORDER"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_ORDER"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_ORDER"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_ORDER"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_ORDER" IS '支付订单 -'; +ALTER TABLE system_role_menu + ADD CONSTRAINT pk_system_role_menu PRIMARY KEY (id); + +COMMENT ON COLUMN system_role_menu.id IS '自增编号'; +COMMENT ON COLUMN system_role_menu.role_id IS '角色ID'; +COMMENT ON COLUMN system_role_menu.menu_id IS '菜单ID'; +COMMENT ON COLUMN system_role_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_role_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_role_menu.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role_menu IS '角色和菜单关联表'; + +-- @formatter:off +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (454, 2, 1093, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (455, 2, 1094, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (460, 2, 1100, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (467, 2, 1107, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (476, 2, 1117, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (477, 2, 100, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (478, 2, 101, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (479, 2, 102, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (480, 2, 1126, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (481, 2, 103, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (483, 2, 104, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (485, 2, 105, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (488, 2, 107, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (490, 2, 108, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (492, 2, 109, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (498, 2, 1138, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (523, 2, 1224, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (524, 2, 1225, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (541, 2, 500, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (543, 2, 501, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (675, 2, 2, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (689, 2, 1077, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (690, 2, 1078, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (692, 2, 1083, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (693, 2, 1084, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (699, 2, 1090, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (703, 2, 106, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (704, 2, 110, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (705, 2, 111, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', to_date('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1489, 1, 1, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1490, 1, 2, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1494, 1, 1077, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1495, 1, 1078, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1496, 1, 1083, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1497, 1, 1084, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1498, 1, 1090, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1499, 1, 1093, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1500, 1, 1094, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1501, 1, 1100, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1502, 1, 1107, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1505, 1, 1117, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1506, 1, 100, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1507, 1, 101, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1508, 1, 102, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1509, 1, 1126, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1510, 1, 103, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1511, 1, 104, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1512, 1, 105, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1513, 1, 106, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1514, 1, 107, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1515, 1, 108, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1516, 1, 109, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1517, 1, 110, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1518, 1, 111, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1519, 1, 112, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1520, 1, 113, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1522, 1, 1138, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1525, 1, 1224, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1526, 1, 1225, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1527, 1, 500, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1528, 1, 501, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1606, 101, 1218, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1607, 101, 1219, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1608, 101, 1220, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1609, 101, 1221, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1610, 101, 5, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1611, 101, 1222, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1612, 101, 1118, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1613, 101, 1119, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1614, 101, 1120, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1615, 101, 1185, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1616, 101, 1186, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1617, 101, 1187, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1618, 101, 1188, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1619, 101, 1189, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1620, 101, 1190, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1621, 101, 1191, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1622, 101, 1192, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1623, 101, 1193, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1624, 101, 1194, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1625, 101, 1195, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1626, 101, 1196, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1627, 101, 1197, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1628, 101, 1198, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1629, 101, 1199, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1630, 101, 1200, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1631, 101, 1201, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1632, 101, 1202, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1633, 101, 1207, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1634, 101, 1208, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1635, 101, 1209, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1636, 101, 1210, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1637, 101, 1211, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1638, 101, 1212, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1639, 101, 1213, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1640, 101, 1215, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1641, 101, 2, '1', to_date('2022-04-01 22:21:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1642, 101, 1031, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1643, 101, 1032, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1644, 101, 1033, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1645, 101, 1034, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1646, 101, 1035, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1647, 101, 1050, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1648, 101, 1051, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1649, 101, 1052, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1650, 101, 1053, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1651, 101, 1054, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1652, 101, 1056, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1653, 101, 1057, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1654, 101, 1058, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1655, 101, 1059, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1656, 101, 1060, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1657, 101, 1066, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1658, 101, 1067, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1659, 101, 1070, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1664, 101, 1075, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1666, 101, 1077, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1667, 101, 1078, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1668, 101, 1082, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1669, 101, 1083, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1670, 101, 1084, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1671, 101, 1085, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1672, 101, 1086, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1673, 101, 1087, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1674, 101, 1088, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1675, 101, 1089, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1679, 101, 1237, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1680, 101, 1238, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1681, 101, 1239, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1682, 101, 1240, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1683, 101, 1241, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1684, 101, 1242, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1685, 101, 1243, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1687, 101, 106, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1688, 101, 110, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1689, 101, 111, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1690, 101, 112, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1691, 101, 113, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1712, 113, 1024, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1713, 113, 1025, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1714, 113, 1, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1715, 113, 102, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1716, 113, 103, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1717, 113, 104, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1718, 113, 1013, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1719, 113, 1014, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1720, 113, 1015, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1721, 113, 1016, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1722, 113, 1017, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1723, 113, 1018, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1724, 113, 1019, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1725, 113, 1020, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1726, 113, 1021, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1727, 113, 1022, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1728, 113, 1023, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1732, 109, 1064, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1733, 109, 1001, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1734, 109, 1065, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1735, 109, 1002, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1736, 109, 1003, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1737, 109, 1004, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1738, 109, 1005, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1739, 109, 1006, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1740, 109, 1007, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1741, 109, 1008, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1742, 109, 1009, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1743, 109, 1010, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1744, 109, 1011, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1745, 109, 1012, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1746, 111, 100, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1747, 111, 101, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1748, 111, 1063, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1749, 111, 1064, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1750, 111, 1001, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1751, 111, 1065, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1752, 111, 1002, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1753, 111, 1003, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1754, 111, 1004, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1755, 111, 1005, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1756, 111, 1006, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1757, 111, 1007, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1758, 111, 1008, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1759, 111, 1009, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1760, 111, 1010, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1761, 111, 1011, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1762, 111, 1012, '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1763, 109, 100, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1764, 109, 101, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1765, 109, 1063, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1766, 109, 1064, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1767, 109, 1001, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1768, 109, 1065, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1769, 109, 1002, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1770, 109, 1003, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1771, 109, 1004, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1772, 109, 1005, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1773, 109, 1006, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1774, 109, 1007, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1775, 109, 1008, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1776, 109, 1009, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1777, 109, 1010, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1778, 109, 1011, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1779, 109, 1012, '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1780, 111, 100, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1781, 111, 101, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1782, 111, 1063, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1783, 111, 1064, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1784, 111, 1001, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1785, 111, 1065, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1786, 111, 1002, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1787, 111, 1003, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1788, 111, 1004, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1789, 111, 1005, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1790, 111, 1006, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1791, 111, 1007, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1792, 111, 1008, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1793, 111, 1009, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1794, 111, 1010, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1795, 111, 1011, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1796, 111, 1012, '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1797, 109, 100, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1798, 109, 101, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1799, 109, 1063, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1800, 109, 1064, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1801, 109, 1001, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1802, 109, 1065, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1803, 109, 1002, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1804, 109, 1003, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1805, 109, 1004, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1806, 109, 1005, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1807, 109, 1006, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1808, 109, 1007, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1809, 109, 1008, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1810, 109, 1009, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1811, 109, 1010, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1812, 109, 1011, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1813, 109, 1012, '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1814, 111, 100, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1815, 111, 101, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1816, 111, 1063, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1817, 111, 1064, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1818, 111, 1001, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1819, 111, 1065, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1820, 111, 1002, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1821, 111, 1003, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1822, 111, 1004, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1823, 111, 1005, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1824, 111, 1006, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1825, 111, 1007, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1826, 111, 1008, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1827, 111, 1009, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1828, 111, 1010, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1829, 111, 1011, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1830, 111, 1012, '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1831, 109, 103, '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1832, 109, 1017, '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1833, 109, 1018, '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1834, 109, 1019, '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1835, 109, 1020, '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1836, 111, 103, '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1837, 111, 1017, '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1838, 111, 1018, '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1839, 111, 1019, '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1840, 111, 1020, '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:43:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1841, 109, 1036, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1842, 109, 1037, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1843, 109, 1038, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1844, 109, 1039, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1845, 109, 107, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1846, 111, 1036, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1847, 111, 1037, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1851, 114, 1, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1852, 114, 1036, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1853, 114, 1037, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1854, 114, 1038, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1855, 114, 1039, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1856, 114, 100, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1857, 114, 101, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1858, 114, 1063, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1859, 114, 103, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1860, 114, 1064, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1861, 114, 1001, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1862, 114, 1065, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1863, 114, 1002, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1864, 114, 1003, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1865, 114, 107, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1866, 114, 1004, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1867, 114, 1005, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1868, 114, 1006, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1869, 114, 1007, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1870, 114, 1008, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1871, 114, 1009, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1872, 114, 1010, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1873, 114, 1011, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1874, 114, 1012, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1875, 114, 1017, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1876, 114, 1018, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1877, 114, 1019, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1878, 114, 1020, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1879, 115, 1, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1880, 115, 1036, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1881, 115, 1037, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1882, 115, 1038, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1883, 115, 1039, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1884, 115, 100, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1885, 115, 101, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1886, 115, 1063, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1887, 115, 103, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1888, 115, 1064, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1889, 115, 1001, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1890, 115, 1065, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1891, 115, 1002, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1892, 115, 1003, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1893, 115, 107, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1894, 115, 1004, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1895, 115, 1005, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1896, 115, 1006, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1897, 115, 1007, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1898, 115, 1008, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1899, 115, 1009, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1900, 115, 1010, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1901, 115, 1011, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1902, 115, 1012, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1903, 115, 1017, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1904, 115, 1018, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1905, 115, 1019, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1906, 115, 1020, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1907, 116, 1, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1908, 116, 1036, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1909, 116, 1037, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1910, 116, 1038, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1911, 116, 1039, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1912, 116, 100, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1913, 116, 101, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1914, 116, 1063, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1915, 116, 103, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1916, 116, 1064, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1917, 116, 1001, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1918, 116, 1065, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1919, 116, 1002, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1920, 116, 1003, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1921, 116, 107, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1922, 116, 1004, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1923, 116, 1005, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1924, 116, 1006, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1925, 116, 1007, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1926, 116, 1008, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1927, 116, 1009, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1928, 116, 1010, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1929, 116, 1011, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1930, 116, 1012, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1931, 116, 1017, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1932, 116, 1018, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1933, 116, 1019, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1934, 116, 1020, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1963, 118, 1, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1964, 118, 1036, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1965, 118, 1037, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1966, 118, 1038, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1967, 118, 1039, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1968, 118, 100, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1969, 118, 101, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1970, 118, 1063, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1971, 118, 103, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1972, 118, 1064, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1973, 118, 1001, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1974, 118, 1065, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1975, 118, 1002, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1976, 118, 1003, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1977, 118, 107, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1978, 118, 1004, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1979, 118, 1005, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1980, 118, 1006, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1981, 118, 1007, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1982, 118, 1008, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1983, 118, 1009, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1984, 118, 1010, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1985, 118, 1011, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1986, 118, 1012, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1987, 118, 1017, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1988, 118, 1018, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1989, 118, 1019, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1990, 118, 1020, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1994, 2, 1027, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1995, 2, 1028, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1996, 2, 1029, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1997, 2, 1030, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1998, 2, 1031, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1999, 2, 1032, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2000, 2, 1033, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2001, 2, 1034, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2002, 2, 1035, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2003, 2, 1036, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2004, 2, 1037, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2005, 2, 1038, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2006, 2, 1039, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2007, 2, 1040, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2008, 2, 1042, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2009, 2, 1043, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2010, 2, 1045, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2011, 2, 1046, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2012, 2, 1048, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2013, 2, 1050, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2014, 2, 1051, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2015, 2, 1052, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2016, 2, 1053, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2017, 2, 1054, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2018, 2, 1056, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2019, 2, 1057, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2020, 2, 1058, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2021, 2, 2083, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2022, 2, 1059, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2023, 2, 1060, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2024, 2, 1063, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2025, 2, 1064, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2026, 2, 1065, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2027, 2, 1066, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2028, 2, 1067, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2029, 2, 1070, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2034, 2, 1075, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2036, 2, 1082, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2037, 2, 1085, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2038, 2, 1086, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2039, 2, 1087, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2040, 2, 1088, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2041, 2, 1089, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2042, 2, 1091, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2043, 2, 1092, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2044, 2, 1095, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2045, 2, 1096, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2046, 2, 1097, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2047, 2, 1098, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2048, 2, 1101, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2049, 2, 1102, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2050, 2, 1103, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2051, 2, 1104, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2052, 2, 1105, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2053, 2, 1106, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2054, 2, 1108, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2055, 2, 1109, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2061, 2, 1127, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2062, 2, 1128, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2063, 2, 1129, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2064, 2, 1130, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2066, 2, 1132, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2067, 2, 1133, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2068, 2, 1134, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2069, 2, 1135, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2070, 2, 1136, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2071, 2, 1137, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2072, 2, 114, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2073, 2, 1139, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2074, 2, 115, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2075, 2, 1140, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2076, 2, 116, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2077, 2, 1141, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2078, 2, 1142, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2079, 2, 1143, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2080, 2, 1150, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2081, 2, 1161, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2082, 2, 1162, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2083, 2, 1163, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2084, 2, 1164, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2085, 2, 1165, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2086, 2, 1166, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2087, 2, 1173, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2088, 2, 1174, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2089, 2, 1175, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2090, 2, 1176, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2091, 2, 1177, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2092, 2, 1178, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2099, 2, 1226, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2100, 2, 1227, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2101, 2, 1228, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2102, 2, 1229, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2103, 2, 1237, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2104, 2, 1238, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2105, 2, 1239, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2106, 2, 1240, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2107, 2, 1241, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2108, 2, 1242, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2109, 2, 1243, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2116, 2, 1254, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2117, 2, 1255, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2118, 2, 1256, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2119, 2, 1257, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2120, 2, 1258, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2121, 2, 1259, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2122, 2, 1260, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2123, 2, 1261, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2124, 2, 1263, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2125, 2, 1264, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2126, 2, 1265, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2127, 2, 1266, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2128, 2, 1267, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2129, 2, 1001, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2130, 2, 1002, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2131, 2, 1003, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2132, 2, 1004, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2133, 2, 1005, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2134, 2, 1006, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2135, 2, 1007, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2136, 2, 1008, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2137, 2, 1009, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2138, 2, 1010, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2139, 2, 1011, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2140, 2, 1012, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2141, 2, 1013, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2142, 2, 1014, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2143, 2, 1015, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2144, 2, 1016, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2145, 2, 1017, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2146, 2, 1018, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2147, 2, 1019, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2148, 2, 1020, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2149, 2, 1021, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2150, 2, 1022, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2151, 2, 1023, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2152, 2, 1281, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2153, 2, 1282, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2154, 2, 2000, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2155, 2, 2002, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2156, 2, 2003, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2157, 2, 2004, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2158, 2, 2005, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2159, 2, 2006, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2160, 2, 2008, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2161, 2, 2009, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2162, 2, 2010, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2163, 2, 2011, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2164, 2, 2012, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2170, 2, 2019, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2171, 2, 2020, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2172, 2, 2021, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2173, 2, 2022, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2174, 2, 2023, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2175, 2, 2025, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2177, 2, 2027, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2178, 2, 2028, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2179, 2, 2029, '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2180, 2, 2014, '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2181, 2, 2015, '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2182, 2, 2016, '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2183, 2, 2017, '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2184, 2, 2018, '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:43:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2188, 101, 1024, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2189, 101, 1, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2190, 101, 1025, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2191, 101, 1026, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2192, 101, 1027, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2193, 101, 1028, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2194, 101, 1029, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2195, 101, 1030, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2196, 101, 1036, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2197, 101, 1037, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2198, 101, 1038, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2199, 101, 1039, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2200, 101, 1040, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2201, 101, 1042, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2202, 101, 1043, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2203, 101, 1045, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2204, 101, 1046, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2205, 101, 1048, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2206, 101, 2083, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2207, 101, 1063, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2208, 101, 1064, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2209, 101, 1065, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2210, 101, 1093, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2211, 101, 1094, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2212, 101, 1095, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2213, 101, 1096, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2214, 101, 1097, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2215, 101, 1098, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2216, 101, 1100, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2217, 101, 1101, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2218, 101, 1102, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2219, 101, 1103, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2220, 101, 1104, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2221, 101, 1105, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2222, 101, 1106, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2223, 101, 2130, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2224, 101, 1107, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2225, 101, 2131, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2226, 101, 1108, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2227, 101, 2132, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2228, 101, 1109, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2229, 101, 2133, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2230, 101, 2134, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2232, 101, 2135, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2234, 101, 2136, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2236, 101, 2137, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2238, 101, 2138, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2240, 101, 2139, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2242, 101, 2140, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2243, 101, 2141, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2244, 101, 2142, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2245, 101, 2143, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2246, 101, 2144, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2247, 101, 2145, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2248, 101, 2146, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2249, 101, 2147, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2250, 101, 100, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2251, 101, 2148, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2252, 101, 101, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2253, 101, 2149, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2254, 101, 102, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2255, 101, 2150, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2256, 101, 103, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2257, 101, 2151, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2258, 101, 104, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2259, 101, 2152, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2260, 101, 105, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2261, 101, 107, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2262, 101, 108, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2263, 101, 109, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2264, 101, 1138, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2265, 101, 1139, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2266, 101, 1140, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2267, 101, 1141, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2268, 101, 1142, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2269, 101, 1143, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2270, 101, 1224, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2271, 101, 1225, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2272, 101, 1226, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2273, 101, 1227, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2274, 101, 1228, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2275, 101, 1229, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2282, 101, 1261, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2283, 101, 1263, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2284, 101, 1264, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2285, 101, 1265, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2286, 101, 1266, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2287, 101, 1267, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2288, 101, 1001, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2289, 101, 1002, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2290, 101, 1003, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2291, 101, 1004, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2292, 101, 1005, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2293, 101, 1006, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2294, 101, 1007, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2295, 101, 1008, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2296, 101, 1009, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2297, 101, 1010, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2298, 101, 1011, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2299, 101, 1012, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2300, 101, 500, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2301, 101, 1013, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2302, 101, 501, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2303, 101, 1014, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2304, 101, 1015, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2305, 101, 1016, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2306, 101, 1017, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2307, 101, 1018, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2308, 101, 1019, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2309, 101, 1020, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2789, 136, 1, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2790, 136, 1036, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2791, 136, 1037, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2792, 136, 1038, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2793, 136, 1039, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2794, 136, 100, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2795, 136, 101, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2796, 136, 1063, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2797, 136, 103, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2798, 136, 1064, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2799, 136, 1001, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2800, 136, 1065, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2801, 136, 1002, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2802, 136, 1003, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2803, 136, 107, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2804, 136, 1004, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2805, 136, 1005, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2806, 136, 1006, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2807, 136, 1007, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2808, 136, 1008, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2809, 136, 1009, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2810, 136, 1010, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2811, 136, 1011, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2812, 136, 1012, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2813, 136, 1017, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2814, 136, 1018, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2815, 136, 1019, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2816, 136, 1020, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2817, 137, 1, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2818, 137, 1036, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2819, 137, 1037, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2820, 137, 1038, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2821, 137, 1039, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2822, 137, 100, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2823, 137, 101, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2824, 137, 1063, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2825, 137, 103, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2826, 137, 1064, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2827, 137, 1001, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2828, 137, 1065, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2829, 137, 1002, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2830, 137, 1003, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2831, 137, 107, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2832, 137, 1004, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2833, 137, 1005, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2834, 137, 1006, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2835, 137, 1007, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2836, 137, 1008, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2837, 137, 1009, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2838, 137, 1010, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2839, 137, 1011, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2840, 137, 1012, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2841, 137, 1017, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2842, 137, 1018, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2843, 137, 1019, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2844, 137, 1020, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2845, 138, 1, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2846, 138, 1036, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2847, 138, 1037, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2848, 138, 1038, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2849, 138, 1039, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2850, 138, 100, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2851, 138, 101, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2852, 138, 1063, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2853, 138, 103, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2854, 138, 1064, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2855, 138, 1001, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2856, 138, 1065, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2857, 138, 1002, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2858, 138, 1003, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2859, 138, 107, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2860, 138, 1004, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2861, 138, 1005, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2862, 138, 1006, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2863, 138, 1007, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2864, 138, 1008, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2865, 138, 1009, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2866, 138, 1010, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2867, 138, 1011, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2868, 138, 1012, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2869, 138, 1017, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2870, 138, 1018, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2871, 138, 1019, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2872, 138, 1020, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2873, 139, 1, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2874, 139, 1036, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2875, 139, 1037, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2876, 139, 1038, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2877, 139, 1039, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2878, 139, 100, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2879, 139, 101, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2880, 139, 1063, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2881, 139, 103, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2882, 139, 1064, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2883, 139, 1001, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2884, 139, 1065, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2885, 139, 1002, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2886, 139, 1003, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2887, 139, 107, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2888, 139, 1004, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2889, 139, 1005, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2890, 139, 1006, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2891, 139, 1007, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2892, 139, 1008, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2893, 139, 1009, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2894, 139, 1010, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2895, 139, 1011, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2896, 139, 1012, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2897, 139, 1017, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2898, 139, 1018, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2899, 139, 1019, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2900, 139, 1020, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2901, 101, 1117, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2902, 101, 1126, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2903, 101, 1127, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2904, 101, 1128, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2905, 101, 1129, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2906, 101, 1130, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2907, 101, 1132, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2908, 101, 1133, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2909, 101, 1134, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2910, 101, 1135, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2911, 101, 1136, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2912, 101, 1137, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2913, 101, 2161, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2914, 101, 1150, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2915, 101, 1161, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2916, 101, 1162, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2917, 101, 1163, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2918, 101, 1164, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2919, 101, 1165, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2920, 101, 1166, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2921, 101, 1173, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2922, 101, 1174, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2923, 101, 1175, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2924, 101, 1176, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2925, 101, 1177, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2926, 101, 1178, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2927, 101, 2301, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2928, 101, 2302, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2932, 109, 1227, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2933, 109, 1228, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2934, 109, 1229, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2935, 109, 1138, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2936, 109, 1139, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2937, 109, 1140, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2938, 109, 1141, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2939, 109, 1142, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2940, 109, 1143, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2941, 111, 1224, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2942, 111, 1225, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2943, 111, 1226, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2944, 111, 1227, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2945, 111, 1228, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2946, 111, 1229, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2947, 111, 1138, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2948, 111, 1139, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2949, 111, 1140, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2953, 140, 1, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2954, 140, 1224, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2955, 140, 1225, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2956, 140, 1226, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2957, 140, 1227, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2958, 140, 1228, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2959, 140, 1036, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2960, 140, 1229, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2961, 140, 1037, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2962, 140, 1038, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2963, 140, 1039, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2964, 140, 100, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2965, 140, 101, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2966, 140, 1063, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2967, 140, 103, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2968, 140, 1064, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2969, 140, 1001, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2970, 140, 1065, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2971, 140, 1002, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2972, 140, 1003, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2973, 140, 107, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2974, 140, 1004, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2975, 140, 1005, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2976, 140, 1006, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2977, 140, 1007, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2978, 140, 1008, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2979, 140, 1009, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2980, 140, 1138, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2981, 140, 1010, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2982, 140, 1139, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2983, 140, 1011, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2984, 140, 1140, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2985, 140, 1012, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2986, 140, 1141, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2987, 140, 1142, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2988, 140, 1143, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2989, 140, 1017, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2990, 140, 1018, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2991, 140, 1019, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2992, 140, 1020, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2996, 109, 1033, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2997, 109, 1034, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2998, 109, 1035, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2999, 109, 1050, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3000, 109, 1051, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3001, 109, 1052, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3002, 109, 1053, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3003, 109, 1054, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3004, 109, 1056, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3005, 109, 1057, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3006, 109, 1058, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3007, 109, 1059, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3008, 109, 1060, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3009, 109, 1066, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3010, 109, 1067, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3011, 109, 1070, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3012, 109, 1075, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3013, 109, 1076, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3014, 109, 1077, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3015, 109, 1078, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3016, 109, 1082, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3017, 109, 1083, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3018, 109, 1084, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3019, 109, 1085, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3020, 109, 1086, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3021, 109, 1087, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3022, 109, 1088, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3023, 109, 1089, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3024, 109, 1090, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3025, 109, 1091, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3026, 109, 1092, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3027, 109, 106, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3028, 109, 110, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3029, 109, 111, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3030, 109, 112, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3031, 109, 113, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3032, 109, 114, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3033, 109, 115, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3034, 109, 116, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3035, 109, 2472, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3036, 109, 2478, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3037, 109, 2479, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3038, 109, 2480, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3039, 109, 2481, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3040, 109, 2482, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3041, 109, 2483, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3042, 109, 2484, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3043, 109, 2485, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3044, 109, 2486, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3045, 109, 2487, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3046, 109, 2488, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3047, 109, 2489, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3048, 109, 2490, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3049, 109, 2491, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3050, 109, 2492, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3051, 109, 2493, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3052, 109, 2494, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3053, 109, 2495, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3054, 109, 2497, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3055, 109, 1237, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3056, 109, 1238, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3057, 109, 1239, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3058, 109, 1240, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3059, 109, 1241, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3060, 109, 1242, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3061, 109, 1243, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3062, 109, 2525, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3063, 109, 1255, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3064, 109, 1256, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3065, 109, 1257, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3066, 109, 1258, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3067, 109, 1259, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3068, 109, 1260, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3069, 111, 2, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3070, 111, 1031, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3071, 111, 1032, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3072, 111, 1033, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3073, 111, 1034, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3074, 111, 1035, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3075, 111, 1050, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3076, 111, 1051, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3077, 111, 1052, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3078, 111, 1053, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3079, 111, 1054, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3080, 111, 1056, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3081, 111, 1057, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3082, 111, 1058, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3083, 111, 1059, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3084, 111, 1060, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3085, 111, 1066, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3086, 111, 1067, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3087, 111, 1070, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3088, 111, 1075, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3089, 111, 1076, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3090, 111, 1077, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3091, 111, 1078, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3092, 111, 1082, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3093, 111, 1083, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3094, 111, 1084, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3095, 111, 1085, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3096, 111, 1086, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3097, 111, 1087, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3098, 111, 1088, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3099, 111, 1089, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3100, 111, 1090, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3101, 111, 1091, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3102, 111, 1092, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3103, 111, 106, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3104, 111, 110, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3105, 111, 111, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3106, 111, 112, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3107, 111, 113, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3108, 111, 114, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3109, 111, 115, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3110, 111, 116, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3111, 111, 2472, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3112, 111, 2478, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3113, 111, 2479, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3114, 111, 2480, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3115, 111, 2481, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3116, 111, 2482, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3117, 111, 2483, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3118, 111, 2484, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3119, 111, 2485, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3120, 111, 2486, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3121, 111, 2487, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3122, 111, 2488, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3123, 111, 2489, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3124, 111, 2490, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3125, 111, 2491, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3126, 111, 2492, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3127, 111, 2493, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3128, 111, 2494, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3129, 111, 2495, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3130, 111, 2497, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3131, 111, 1237, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3132, 111, 1238, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3133, 111, 1239, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3134, 111, 1240, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3135, 111, 1241, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3136, 111, 1242, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3137, 111, 1243, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3138, 111, 2525, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3139, 111, 1255, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3140, 111, 1256, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3141, 111, 1257, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3145, 140, 2, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3146, 140, 1031, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3147, 140, 1032, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3148, 140, 1033, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3149, 140, 1034, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3150, 140, 1035, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3151, 140, 1050, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3152, 140, 1051, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3153, 140, 1052, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3154, 140, 1053, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3155, 140, 1054, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3156, 140, 1056, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3157, 140, 1057, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3158, 140, 1058, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3159, 140, 1059, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3160, 140, 1060, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3161, 140, 1066, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3162, 140, 1067, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3163, 140, 1070, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3164, 140, 1075, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3165, 140, 1076, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3166, 140, 1077, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3167, 140, 1078, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3168, 140, 1082, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3169, 140, 1083, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3170, 140, 1084, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3171, 140, 1085, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3172, 140, 1086, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3173, 140, 1087, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3174, 140, 1088, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3175, 140, 1089, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3176, 140, 1090, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3177, 140, 1091, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3178, 140, 1092, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3179, 140, 106, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3180, 140, 110, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3181, 140, 111, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3182, 140, 112, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3183, 140, 113, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3184, 140, 114, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3185, 140, 115, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3186, 140, 116, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3187, 140, 2472, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3188, 140, 2478, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3189, 140, 2479, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3190, 140, 2480, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3191, 140, 2481, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3192, 140, 2482, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3193, 140, 2483, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3194, 140, 2484, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3195, 140, 2485, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3196, 140, 2486, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3197, 140, 2487, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3198, 140, 2488, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3199, 140, 2489, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3200, 140, 2490, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3201, 140, 2491, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3202, 140, 2492, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3203, 140, 2493, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3204, 140, 2494, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3205, 140, 2495, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3206, 140, 2497, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3207, 140, 1237, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3208, 140, 1238, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3209, 140, 1239, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3210, 140, 1240, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3211, 140, 1241, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3212, 140, 1242, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3213, 140, 1243, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3214, 140, 2525, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3215, 140, 1255, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3216, 140, 1256, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3217, 140, 1257, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3218, 140, 1258, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3219, 140, 1259, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3220, 140, 1260, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3224, 109, 1015, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3225, 109, 1016, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3226, 111, 102, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3227, 111, 1013, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3231, 140, 102, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3232, 140, 1013, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3233, 140, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3234, 140, 1015, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3235, 140, 1016, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3236, 141, 1, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3237, 141, 2, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3238, 141, 1031, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3239, 141, 1032, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3240, 141, 1033, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3241, 141, 1034, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3242, 141, 1035, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3243, 141, 1036, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3244, 141, 1037, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3245, 141, 1038, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3246, 141, 1039, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3247, 141, 1050, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3248, 141, 1051, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3249, 141, 1052, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3250, 141, 1053, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3251, 141, 1054, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3252, 141, 1056, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3253, 141, 1057, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3254, 141, 1058, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3255, 141, 1059, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3256, 141, 1060, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3257, 141, 1063, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3258, 141, 1064, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3259, 141, 1065, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3260, 141, 1066, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3261, 141, 1067, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3262, 141, 1070, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3263, 141, 1075, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3264, 141, 1076, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3265, 141, 1077, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3266, 141, 1078, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3267, 141, 1082, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3268, 141, 1083, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3269, 141, 1084, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3270, 141, 1085, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3271, 141, 1086, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3272, 141, 1087, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3273, 141, 1088, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3274, 141, 1089, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3275, 141, 1090, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3276, 141, 1091, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3277, 141, 1092, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3278, 141, 100, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3279, 141, 101, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3280, 141, 102, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3281, 141, 103, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3282, 141, 106, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3283, 141, 107, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3284, 141, 110, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3285, 141, 111, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3286, 141, 112, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3287, 141, 113, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3288, 141, 1138, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3289, 141, 114, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3290, 141, 1139, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3291, 141, 115, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3292, 141, 1140, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3293, 141, 116, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3294, 141, 1141, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3295, 141, 1142, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3296, 141, 1143, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3297, 141, 2472, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3298, 141, 2478, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3299, 141, 2479, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3300, 141, 2480, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3301, 141, 2481, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3302, 141, 2482, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3303, 141, 2483, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3304, 141, 2484, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3305, 141, 2485, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3306, 141, 2486, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3307, 141, 2487, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3308, 141, 2488, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3309, 141, 2489, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3310, 141, 2490, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3311, 141, 2491, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3312, 141, 2492, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3313, 141, 2493, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3314, 141, 2494, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3315, 141, 2495, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3316, 141, 2497, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3317, 141, 1224, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3318, 141, 1225, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3319, 141, 1226, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3320, 141, 1227, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3321, 141, 1228, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3322, 141, 1229, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3323, 141, 1237, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3324, 141, 1238, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3325, 141, 1239, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3326, 141, 1240, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3327, 141, 1241, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3328, 141, 1242, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3329, 141, 1243, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3330, 141, 2525, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3331, 141, 1255, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3332, 141, 1256, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3333, 141, 1001, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3334, 141, 1257, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3335, 141, 1002, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3336, 141, 1258, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3337, 141, 1003, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3338, 141, 1259, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3339, 141, 1004, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3340, 141, 1260, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3341, 141, 1005, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3342, 141, 1006, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3343, 141, 1007, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3344, 141, 1008, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3345, 141, 1009, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3346, 141, 1010, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3347, 141, 1011, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3348, 141, 1012, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3349, 141, 1013, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3350, 141, 1014, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3351, 141, 1015, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3352, 141, 1016, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3353, 141, 1017, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3354, 141, 1018, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3355, 141, 1019, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3356, 141, 1020, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3357, 1, 1024, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3358, 1, 2048, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3359, 1, 1025, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3360, 1, 2049, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3361, 1, 1026, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3362, 1, 2050, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3363, 1, 1027, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3364, 1, 2051, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3365, 1, 1028, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3366, 1, 2052, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3367, 1, 1029, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3368, 1, 5, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3369, 1, 1030, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3370, 1, 1031, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3371, 1, 1032, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3372, 1, 1033, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3373, 1, 1034, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3374, 1, 1035, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3375, 1, 2059, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3376, 1, 1036, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3377, 1, 2060, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3378, 1, 1037, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3379, 1, 2061, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3380, 1, 1038, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3381, 1, 2062, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3382, 1, 1039, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3383, 1, 2063, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3384, 1, 1040, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3385, 1, 1042, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3386, 1, 2066, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3387, 1, 1043, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3388, 1, 2067, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3389, 1, 2068, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3390, 1, 1045, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3391, 1, 2069, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3392, 1, 1046, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3393, 1, 2070, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3394, 1, 1048, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3395, 1, 2072, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3396, 1, 2073, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3397, 1, 1050, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3398, 1, 2074, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3399, 1, 1051, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3400, 1, 2075, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3401, 1, 1052, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3402, 1, 2076, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3403, 1, 1053, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3404, 1, 1054, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3405, 1, 1056, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3406, 1, 1057, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3407, 1, 1058, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3408, 1, 2083, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3409, 1, 1059, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3410, 1, 1060, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3411, 1, 2084, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3412, 1, 2085, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3413, 1, 2086, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3414, 1, 1063, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3415, 1, 2087, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3416, 1, 1064, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3417, 1, 2088, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3418, 1, 1065, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3419, 1, 2089, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3420, 1, 1066, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3421, 1, 2090, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3422, 1, 1067, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3423, 1, 2091, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3424, 1, 2092, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3425, 1, 2093, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3426, 1, 1070, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3427, 1, 2094, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3428, 1, 2095, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3429, 1, 2096, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3430, 1, 2097, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3431, 1, 2098, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3432, 1, 1075, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3433, 1, 2099, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3435, 1, 2100, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3436, 1, 2101, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3437, 1, 2102, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3438, 1, 2103, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3439, 1, 2104, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3440, 1, 2105, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3441, 1, 1082, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3442, 1, 2106, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3443, 1, 2107, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3444, 1, 2108, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3445, 1, 1085, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3446, 1, 2109, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3447, 1, 1086, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3448, 1, 2110, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3449, 1, 1087, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3450, 1, 2111, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3451, 1, 1088, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3452, 1, 2112, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3453, 1, 1089, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3454, 1, 2113, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3455, 1, 2114, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3456, 1, 1091, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3457, 1, 2115, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3458, 1, 1092, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3459, 1, 2116, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3460, 1, 2117, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3461, 1, 2118, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3462, 1, 1095, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3463, 1, 2119, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3464, 1, 1096, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3465, 1, 2120, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3466, 1, 1097, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3467, 1, 2121, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3468, 1, 1098, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3469, 1, 2122, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3470, 1, 2123, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3471, 1, 2124, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3472, 1, 1101, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3473, 1, 2125, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3474, 1, 1102, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3475, 1, 2126, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3476, 1, 1103, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3477, 1, 2127, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3478, 1, 1104, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3479, 1, 2128, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3480, 1, 1105, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3481, 1, 2129, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3482, 1, 1106, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3483, 1, 2130, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3484, 1, 2131, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3485, 1, 1108, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3486, 1, 2132, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3487, 1, 1109, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3488, 1, 2133, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3489, 1, 2134, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3490, 1, 2135, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3492, 1, 2136, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3494, 1, 2137, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3496, 1, 2138, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3498, 1, 2139, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3500, 1, 2140, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3501, 1, 2141, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3502, 1, 2142, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3503, 1, 1118, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3504, 1, 2143, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3505, 1, 1119, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3506, 1, 2144, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3507, 1, 1120, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3508, 1, 2145, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3509, 1, 2146, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3510, 1, 2147, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3511, 1, 2148, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3512, 1, 2149, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3513, 1, 2150, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3514, 1, 2151, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3515, 1, 1127, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3516, 1, 2152, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3517, 1, 1128, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3518, 1, 1129, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3519, 1, 2153, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3520, 1, 1130, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3521, 1, 2154, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3522, 1, 2155, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3523, 1, 1132, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3524, 1, 2156, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3525, 1, 1133, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3526, 1, 2157, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3527, 1, 1134, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3528, 1, 2158, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3529, 1, 2159, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3530, 1, 1135, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3531, 1, 2160, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3532, 1, 1136, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3533, 1, 1137, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3534, 1, 2161, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3535, 1, 114, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3536, 1, 2162, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3537, 1, 1139, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3538, 1, 115, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3539, 1, 1140, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3540, 1, 116, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3541, 1, 2164, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3542, 1, 1141, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3543, 1, 2165, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3544, 1, 1142, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3545, 1, 2166, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3546, 1, 1143, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3547, 1, 2167, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3548, 1, 2168, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3549, 1, 2169, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3550, 1, 2170, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3551, 1, 2171, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3552, 1, 2172, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3553, 1, 2173, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3554, 1, 1150, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3555, 1, 2174, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3556, 1, 2175, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3557, 1, 2176, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3558, 1, 2177, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3559, 1, 2178, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3560, 1, 2179, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3561, 1, 2180, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3562, 1, 2181, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3563, 1, 2182, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3564, 1, 2183, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3565, 1, 2184, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3566, 1, 1161, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3567, 1, 1162, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3568, 1, 1163, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3569, 1, 1164, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3570, 1, 1165, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3571, 1, 1166, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3572, 1, 1173, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3573, 1, 1174, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3574, 1, 1175, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3575, 1, 1176, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3576, 1, 1177, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3577, 1, 1178, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3578, 1, 1185, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3579, 1, 2209, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3580, 1, 1186, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3581, 1, 1187, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3582, 1, 1188, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3583, 1, 1189, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3584, 1, 1190, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3585, 1, 1191, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3586, 1, 1192, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3587, 1, 1193, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3588, 1, 1194, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3589, 1, 1195, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3590, 1, 1196, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3591, 1, 1197, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3592, 1, 1198, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3593, 1, 1199, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3594, 1, 1200, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3595, 1, 1201, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3596, 1, 1202, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3597, 1, 1207, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3598, 1, 1208, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3599, 1, 1209, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3600, 1, 1210, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3601, 1, 1211, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3602, 1, 1212, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3603, 1, 1213, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3604, 1, 1215, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3605, 1, 1216, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3606, 1, 1217, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3607, 1, 1218, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3608, 1, 1219, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3609, 1, 1220, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3610, 1, 1221, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3611, 1, 1222, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3612, 1, 1226, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3613, 1, 1227, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3614, 1, 1228, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3615, 1, 1229, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3616, 1, 1237, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3617, 1, 1238, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3618, 1, 2262, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3619, 1, 1239, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3620, 1, 1240, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3621, 1, 1241, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3622, 1, 1242, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3623, 1, 1243, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3629, 1, 2275, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3631, 1, 2276, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3632, 1, 2277, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3633, 1, 1254, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3634, 1, 1255, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3635, 1, 1256, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3636, 1, 1257, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3637, 1, 2281, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3638, 1, 1258, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3639, 1, 2282, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3640, 1, 1259, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3641, 1, 2283, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3642, 1, 1260, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3643, 1, 2284, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3644, 1, 1261, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3645, 1, 2285, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3646, 1, 1263, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3647, 1, 2287, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3648, 1, 1264, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3649, 1, 2288, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3650, 1, 1265, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3651, 1, 1266, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3652, 1, 1267, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3653, 1, 2293, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3654, 1, 2294, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3655, 1, 2297, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3656, 1, 2300, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3657, 1, 2301, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3658, 1, 2302, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3659, 1, 2303, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3660, 1, 2304, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3661, 1, 1281, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3662, 1, 2305, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3663, 1, 1282, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3664, 1, 2306, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3665, 1, 2307, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3666, 1, 2308, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3667, 1, 2309, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3668, 1, 2310, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3669, 1, 2311, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3670, 1, 2312, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3671, 1, 2313, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3672, 1, 2314, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3673, 1, 2315, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3674, 1, 2316, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3675, 1, 2317, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3676, 1, 2318, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3677, 1, 2319, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3678, 1, 2320, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3679, 1, 2321, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3680, 1, 2322, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3681, 1, 2323, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3682, 1, 2324, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3683, 1, 2325, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3684, 1, 2326, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3685, 1, 2327, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3686, 1, 2328, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3687, 1, 2329, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3688, 1, 2330, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3689, 1, 2331, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3690, 1, 2332, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3691, 1, 2333, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3692, 1, 2334, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3693, 1, 2335, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3694, 1, 2336, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3695, 1, 2337, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3696, 1, 2338, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3697, 1, 2339, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3698, 1, 2340, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3699, 1, 2341, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3700, 1, 2342, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3701, 1, 2343, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3702, 1, 2344, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3703, 1, 2345, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3704, 1, 2346, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3705, 1, 2347, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3706, 1, 2348, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3707, 1, 2349, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3708, 1, 2350, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3709, 1, 2351, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3710, 1, 2352, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3711, 1, 2353, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3712, 1, 2354, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3713, 1, 2355, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3714, 1, 2356, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3715, 1, 2357, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3716, 1, 2358, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3717, 1, 2359, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3718, 1, 2360, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3719, 1, 2361, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3720, 1, 2362, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3721, 1, 2363, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3722, 1, 2364, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3723, 1, 2365, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3724, 1, 2366, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3725, 1, 2367, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3726, 1, 2368, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3727, 1, 2369, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3728, 1, 2374, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3729, 1, 2375, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3730, 1, 2376, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3731, 1, 2377, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3732, 1, 2378, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3733, 1, 2379, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3734, 1, 2380, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3735, 1, 2381, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3736, 1, 2382, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3737, 1, 2383, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3738, 1, 2384, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3739, 1, 2385, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3740, 1, 2386, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3741, 1, 2387, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3742, 1, 2388, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3743, 1, 2389, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3744, 1, 2390, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3745, 1, 2391, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3746, 1, 2392, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3747, 1, 2393, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3748, 1, 2394, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3749, 1, 2395, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3750, 1, 2396, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3751, 1, 2397, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3752, 1, 2398, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3753, 1, 2399, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3754, 1, 2400, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3755, 1, 2401, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3756, 1, 2402, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3757, 1, 2403, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3758, 1, 2404, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3759, 1, 2405, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3760, 1, 2406, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3761, 1, 2407, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3762, 1, 2408, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3763, 1, 2409, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3764, 1, 2410, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3765, 1, 2411, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3766, 1, 2412, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3767, 1, 2413, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3768, 1, 2414, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3769, 1, 2415, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3770, 1, 2416, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3771, 1, 2417, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3772, 1, 2418, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3773, 1, 2419, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3774, 1, 2420, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3775, 1, 2421, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3776, 1, 2422, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3777, 1, 2423, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3778, 1, 2424, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3779, 1, 2425, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3780, 1, 2426, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3781, 1, 2427, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3782, 1, 2428, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3783, 1, 2429, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3784, 1, 2430, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3785, 1, 2431, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3786, 1, 2432, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3787, 1, 2433, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3788, 1, 2435, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3789, 1, 2436, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3790, 1, 2437, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3791, 1, 2438, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3792, 1, 2439, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3793, 1, 2440, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3794, 1, 2441, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3795, 1, 2442, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3796, 1, 2443, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3797, 1, 2444, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3798, 1, 2445, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3799, 1, 2446, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3800, 1, 2447, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3801, 1, 2448, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3802, 1, 2449, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3803, 1, 2450, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3804, 1, 2451, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3805, 1, 2452, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3806, 1, 2453, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3807, 1, 2472, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3808, 1, 2478, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3809, 1, 2479, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3810, 1, 2480, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3811, 1, 2481, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3812, 1, 2482, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3813, 1, 2483, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3814, 1, 2484, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3815, 1, 2485, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3816, 1, 2486, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3817, 1, 2487, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3818, 1, 2488, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3819, 1, 2489, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3820, 1, 2490, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3821, 1, 2491, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3822, 1, 2492, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3823, 1, 2493, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3824, 1, 2494, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3825, 1, 2495, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3826, 1, 2497, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3827, 1, 2516, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3828, 1, 2517, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3829, 1, 2518, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3830, 1, 2519, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3831, 1, 2520, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3832, 1, 2521, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3833, 1, 2522, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3834, 1, 2523, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3835, 1, 2524, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3836, 1, 2525, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3837, 1, 2526, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3838, 1, 2527, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3839, 1, 2528, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3840, 1, 2529, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3841, 1, 2530, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3842, 1, 2531, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3843, 1, 2532, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3844, 1, 2533, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3845, 1, 2534, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3846, 1, 2535, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3847, 1, 2536, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3854, 1, 2543, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3855, 1, 2544, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3856, 1, 2000, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3857, 1, 2002, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3858, 1, 2003, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3859, 1, 2004, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3860, 1, 2005, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3861, 1, 2006, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3862, 1, 2008, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3863, 1, 2009, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3864, 1, 2010, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3865, 1, 2011, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3866, 1, 2012, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3867, 1, 2014, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3868, 1, 2015, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3869, 1, 2016, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3870, 1, 2017, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3871, 1, 2018, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3872, 1, 2019, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3873, 1, 2020, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3874, 1, 2021, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3875, 1, 2022, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3876, 1, 2023, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3877, 1, 1001, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3878, 1, 2025, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3879, 1, 1002, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3880, 1, 2026, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3881, 1, 1003, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3882, 1, 2027, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3883, 1, 1004, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3884, 1, 2028, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3885, 1, 1005, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3886, 1, 2029, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3887, 1, 1006, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3888, 1, 2030, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3889, 1, 1007, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3890, 1, 1008, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3891, 1, 2032, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3892, 1, 1009, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3893, 1, 2033, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3894, 1, 1010, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3895, 1, 2034, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3896, 1, 1011, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3897, 1, 2035, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3898, 1, 1012, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3899, 1, 2036, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3900, 1, 1013, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3901, 1, 1014, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3902, 1, 2038, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3903, 1, 1015, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3904, 1, 2039, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3905, 1, 1016, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3906, 1, 2040, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3907, 1, 1017, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3908, 1, 2041, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3909, 1, 1018, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3910, 1, 2042, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3911, 1, 1019, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3912, 1, 2043, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3913, 1, 1020, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3914, 1, 2044, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3915, 1, 1021, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3916, 1, 2045, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3917, 1, 1022, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3918, 1, 2046, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3919, 1, 1023, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3920, 1, 2047, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3921, 143, 1, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3922, 143, 2, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3923, 143, 1031, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3924, 143, 1032, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3925, 143, 1033, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3926, 143, 1034, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3927, 143, 1035, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3928, 143, 1036, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3929, 143, 1037, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3930, 143, 1038, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3931, 143, 1039, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3932, 143, 1050, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3933, 143, 1051, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3934, 143, 1052, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3935, 143, 1053, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3936, 143, 1054, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3937, 143, 1056, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3938, 143, 1057, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3939, 143, 1058, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3940, 143, 1059, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3941, 143, 1060, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3942, 143, 1063, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3943, 143, 1064, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3944, 143, 1065, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3945, 143, 1066, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3946, 143, 1067, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3947, 143, 1070, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3948, 143, 1075, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3949, 143, 1076, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3950, 143, 1077, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3951, 143, 1078, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3952, 143, 1082, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3953, 143, 1083, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3954, 143, 1084, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3955, 143, 1085, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3956, 143, 1086, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3957, 143, 1087, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3958, 143, 1088, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3959, 143, 1089, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3960, 143, 1090, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3961, 143, 1091, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3962, 143, 1092, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3963, 143, 100, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3964, 143, 101, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3965, 143, 102, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3966, 143, 103, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3967, 143, 106, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3968, 143, 107, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3969, 143, 110, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3970, 143, 111, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3971, 143, 112, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3972, 143, 113, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3973, 143, 1138, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3974, 143, 114, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3975, 143, 1139, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3976, 143, 115, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3977, 143, 1140, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3978, 143, 116, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3979, 143, 1141, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3980, 143, 1142, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3981, 143, 1143, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3982, 143, 2472, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3983, 143, 2478, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3984, 143, 2479, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3985, 143, 2480, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3986, 143, 2481, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3987, 143, 2482, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3988, 143, 2483, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3989, 143, 2484, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3990, 143, 2485, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3991, 143, 2486, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3992, 143, 2487, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3993, 143, 2488, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3994, 143, 2489, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3995, 143, 2490, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3996, 143, 2491, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3997, 143, 2492, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3998, 143, 2493, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3999, 143, 2494, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4000, 143, 2495, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4001, 143, 2497, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4002, 143, 1224, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4003, 143, 1225, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4004, 143, 1226, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4005, 143, 1227, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4006, 143, 1228, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4007, 143, 1229, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4008, 143, 1237, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4009, 143, 1238, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4010, 143, 1239, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4011, 143, 1240, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4012, 143, 1241, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4013, 143, 1242, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4014, 143, 1243, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4015, 143, 2525, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4016, 143, 1255, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4017, 143, 1256, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4018, 143, 1001, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4019, 143, 1257, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4020, 143, 1002, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4021, 143, 1258, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4022, 143, 1003, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4023, 143, 1259, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4024, 143, 1004, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4025, 143, 1260, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4026, 143, 1005, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4027, 143, 1006, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4028, 143, 1007, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4029, 143, 1008, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4030, 143, 1009, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4031, 143, 1010, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4032, 143, 1011, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4033, 143, 1012, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4034, 143, 1013, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4035, 143, 1014, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4036, 143, 1015, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4037, 143, 1016, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4038, 143, 1017, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4039, 143, 1018, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4040, 143, 1019, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4041, 143, 1020, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4042, 144, 1, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4043, 144, 2, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4044, 144, 1031, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4045, 144, 1032, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4046, 144, 1033, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4047, 144, 1034, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4048, 144, 1035, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4049, 144, 1036, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4050, 144, 1037, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4051, 144, 1038, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4052, 144, 1039, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4053, 144, 1050, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4054, 144, 1051, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4055, 144, 1052, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4056, 144, 1053, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4057, 144, 1054, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4058, 144, 1056, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4059, 144, 1057, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4060, 144, 1058, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4061, 144, 1059, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4062, 144, 1060, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4063, 144, 1063, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4064, 144, 1064, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4065, 144, 1065, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4066, 144, 1066, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4067, 144, 1067, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4068, 144, 1070, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4069, 144, 1075, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4070, 144, 1076, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4071, 144, 1077, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4072, 144, 1078, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4073, 144, 1082, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4074, 144, 1083, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4075, 144, 1084, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4076, 144, 1085, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4077, 144, 1086, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4078, 144, 1087, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4079, 144, 1088, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4080, 144, 1089, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4081, 144, 1090, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4082, 144, 1091, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4083, 144, 1092, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4084, 144, 100, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4085, 144, 101, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4086, 144, 102, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4087, 144, 103, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4088, 144, 106, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4089, 144, 107, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4090, 144, 110, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4091, 144, 111, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4092, 144, 112, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4093, 144, 113, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4094, 144, 1138, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4095, 144, 114, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4096, 144, 1139, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4097, 144, 115, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4098, 144, 1140, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4099, 144, 116, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4100, 144, 1141, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4101, 144, 1142, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4102, 144, 1143, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4103, 144, 2472, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4104, 144, 2478, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4105, 144, 2479, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4106, 144, 2480, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4107, 144, 2481, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4108, 144, 2482, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4109, 144, 2483, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4110, 144, 2484, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4111, 144, 2485, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4112, 144, 2486, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4113, 144, 2487, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4114, 144, 2488, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4115, 144, 2489, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4116, 144, 2490, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4117, 144, 2491, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4118, 144, 2492, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4119, 144, 2493, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4120, 144, 2494, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4121, 144, 2495, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4122, 144, 2497, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4123, 144, 1224, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4124, 144, 1225, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4125, 144, 1226, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4126, 144, 1227, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4127, 144, 1228, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4128, 144, 1229, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4129, 144, 1237, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4130, 144, 1238, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4131, 144, 1239, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4132, 144, 1240, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4133, 144, 1241, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4134, 144, 1242, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4135, 144, 1243, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4136, 144, 2525, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4137, 144, 1255, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4138, 144, 1256, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4139, 144, 1001, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4140, 144, 1257, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4141, 144, 1002, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4142, 144, 1258, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4143, 144, 1003, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4144, 144, 1259, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4145, 144, 1004, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4146, 144, 1260, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4147, 144, 1005, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4148, 144, 1006, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4149, 144, 1007, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4150, 144, 1008, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4151, 144, 1009, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4152, 144, 1010, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4153, 144, 1011, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4154, 144, 1012, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4155, 144, 1013, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4156, 144, 1014, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4157, 144, 1015, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4158, 144, 1016, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4159, 144, 1017, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4160, 144, 1018, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4161, 144, 1019, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4162, 144, 1020, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4166, 109, 1120, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4167, 109, 2713, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4168, 109, 2714, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4169, 109, 2715, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4170, 109, 2716, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4171, 109, 2717, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4172, 109, 2718, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4173, 109, 2720, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4174, 109, 1185, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4175, 109, 2721, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4176, 109, 1186, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4177, 109, 2722, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4178, 109, 1187, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4179, 109, 2723, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4180, 109, 1188, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4181, 109, 2724, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4182, 109, 1189, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4183, 109, 2725, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4184, 109, 1190, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4185, 109, 2726, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4186, 109, 1191, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4187, 109, 2727, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4188, 109, 1192, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4189, 109, 2728, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4190, 109, 1193, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4191, 109, 2729, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4192, 109, 1194, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4193, 109, 2730, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4194, 109, 1195, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4195, 109, 2731, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4196, 109, 1196, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4197, 109, 2732, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4198, 109, 1197, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4199, 109, 2733, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4200, 109, 1198, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4201, 109, 2734, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4202, 109, 1199, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4203, 109, 2735, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4204, 109, 1200, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4205, 109, 1201, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4206, 109, 1202, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4207, 109, 1207, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4208, 109, 1208, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4209, 109, 1209, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4210, 109, 1210, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4211, 109, 1211, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4212, 109, 1212, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4213, 109, 1213, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4214, 109, 1215, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4215, 109, 1216, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4216, 109, 1217, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4217, 109, 1218, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4218, 109, 1219, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4219, 109, 1220, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4220, 109, 1221, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4221, 109, 1222, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4222, 111, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4223, 111, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4224, 111, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4225, 111, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4226, 111, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4227, 111, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4228, 111, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4229, 111, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4230, 111, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4231, 111, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4232, 111, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4233, 111, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4234, 111, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4235, 111, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4236, 111, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4237, 111, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4238, 111, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4239, 111, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4240, 111, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4241, 111, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4242, 111, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4243, 111, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4244, 111, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4245, 111, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4246, 111, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4247, 111, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4248, 111, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4249, 111, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4250, 111, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4251, 111, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4252, 111, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4253, 111, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4254, 111, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4255, 111, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4256, 111, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4257, 111, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4258, 111, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4259, 111, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4260, 111, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4261, 111, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4262, 111, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4263, 111, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4264, 111, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4265, 111, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4266, 111, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4267, 111, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4268, 111, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4269, 111, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4270, 111, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4271, 111, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4272, 111, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4273, 111, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4274, 111, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4275, 111, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4276, 111, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4277, 111, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4281, 140, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4282, 140, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4283, 140, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4284, 140, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4285, 140, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4286, 140, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4287, 140, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4288, 140, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4289, 140, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4290, 140, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4291, 140, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4292, 140, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4293, 140, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4294, 140, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4295, 140, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4296, 140, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4297, 140, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4298, 140, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4299, 140, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4300, 140, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4301, 140, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4302, 140, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4303, 140, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4304, 140, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4305, 140, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4306, 140, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4307, 140, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4308, 140, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4309, 140, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4310, 140, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4311, 140, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4312, 140, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4313, 140, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4314, 140, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4315, 140, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4316, 140, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4317, 140, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4318, 140, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4319, 140, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4320, 140, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4321, 140, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4322, 140, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4323, 140, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4324, 140, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4325, 140, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4326, 140, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4327, 140, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4328, 140, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4329, 140, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4330, 140, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4331, 140, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4332, 140, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4333, 140, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4334, 140, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4335, 140, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4336, 140, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4337, 140, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4338, 140, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4339, 140, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4340, 141, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4341, 141, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4342, 141, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4343, 141, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4344, 141, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4345, 141, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4346, 141, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4347, 141, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4348, 141, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4349, 141, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4350, 141, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4351, 141, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4352, 141, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4353, 141, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4354, 141, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4355, 141, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4356, 141, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4357, 141, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4358, 141, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4359, 141, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4360, 141, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4361, 141, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4362, 141, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4363, 141, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4364, 141, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4365, 141, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4366, 141, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4367, 141, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4368, 141, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4369, 141, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4370, 141, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4371, 141, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4372, 141, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4373, 141, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4374, 141, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4375, 141, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4376, 141, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4377, 141, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4378, 141, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4379, 141, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4380, 141, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4381, 141, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4382, 141, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4383, 141, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4384, 141, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4385, 141, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4386, 141, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4387, 141, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4388, 141, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4389, 141, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4390, 141, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4391, 141, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4392, 141, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4393, 141, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4394, 141, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4395, 141, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4396, 141, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4397, 141, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4398, 141, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4399, 143, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4400, 143, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4401, 143, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4402, 143, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4403, 143, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4404, 143, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4405, 143, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4406, 143, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4407, 143, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4408, 143, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4409, 143, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4410, 143, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4411, 143, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4412, 143, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4413, 143, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4414, 143, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4415, 143, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4416, 143, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4417, 143, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4418, 143, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4419, 143, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4420, 143, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4421, 143, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4422, 143, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4423, 143, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4424, 143, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4425, 143, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4426, 143, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4427, 143, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4428, 143, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4429, 143, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4430, 143, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4431, 143, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4432, 143, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4433, 143, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4434, 143, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4435, 143, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4436, 143, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4437, 143, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4438, 143, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4439, 143, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4440, 143, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4441, 143, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4442, 143, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4443, 143, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4444, 143, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4445, 143, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4446, 143, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4447, 143, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4448, 143, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4449, 143, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4450, 143, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4451, 143, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4452, 143, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4453, 143, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4454, 143, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4455, 143, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4456, 143, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4457, 143, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4458, 144, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4459, 144, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4460, 144, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4461, 144, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4462, 144, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4463, 144, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4464, 144, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4465, 144, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4466, 144, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4467, 144, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4468, 144, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4469, 144, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4470, 144, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4471, 144, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4472, 144, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4473, 144, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4474, 144, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4475, 144, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4476, 144, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4477, 144, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4478, 144, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4479, 144, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4480, 144, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4481, 144, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4482, 144, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4483, 144, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4484, 144, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4485, 144, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4486, 144, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4487, 144, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4488, 144, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4489, 144, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4490, 144, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4491, 144, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4492, 144, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4493, 144, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4494, 144, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4495, 144, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4496, 144, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4497, 144, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4498, 144, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4499, 144, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4500, 144, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4501, 144, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4502, 144, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4503, 144, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4504, 144, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4505, 144, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4506, 144, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4507, 144, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4508, 144, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4509, 144, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4510, 144, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4511, 144, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4512, 144, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4513, 144, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4514, 144, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4515, 144, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4516, 144, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_role_menu_seq + START WITH 4517 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_sms_channel +-- ------------------------------ +CREATE TABLE system_sms_channel +( + id number NOT NULL, + signature varchar2(12) NOT NULL, + code varchar2(63) NOT NULL, + status smallint NOT NULL, + remark varchar2(255) DEFAULT NULL NULL, + api_key varchar2(128) NOT NULL, + api_secret varchar2(128) DEFAULT NULL NULL, + callback_url varchar2(255) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_ORDER --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_sms_channel + ADD CONSTRAINT pk_system_sms_channel PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_channel.id IS '编号'; +COMMENT ON COLUMN system_sms_channel.signature IS '短信签名'; +COMMENT ON COLUMN system_sms_channel.code IS '渠道编码'; +COMMENT ON COLUMN system_sms_channel.status IS '开启状态'; +COMMENT ON COLUMN system_sms_channel.remark IS '备注'; +COMMENT ON COLUMN system_sms_channel.api_key IS '短信 API 的账号'; +COMMENT ON COLUMN system_sms_channel.api_secret IS '短信 API 的秘钥'; +COMMENT ON COLUMN system_sms_channel.callback_url IS '短信发送回调 URL'; +COMMENT ON COLUMN system_sms_channel.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_channel.update_time IS '更新时间'; +COMMENT ON TABLE system_sms_channel IS '短信渠道'; + +-- @formatter:off +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, 'Ballcat', 'ALIYUN', 0, '你要改哦,只有我可以用!!!!', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, '', to_date('2021-03-31 11:53:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:10:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, '测试渠道', 'DEBUG_DING_TALK', 0, '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', to_date('2021-04-13 00:23:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-27 20:29:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (6, '测试演示', 'DEBUG_DING_TALK', 0, '仅测试', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', to_date('2022-04-10 23:07:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:10:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_sms_channel_seq + START WITH 7 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_sms_code +-- ------------------------------ +CREATE TABLE system_sms_code +( + id number NOT NULL, + mobile varchar2(11) NOT NULL, + code varchar2(6) NOT NULL, + create_ip varchar2(15) NOT NULL, + scene smallint NOT NULL, + today_index smallint NOT NULL, + used smallint NOT NULL, + used_time date DEFAULT NULL NULL, + used_ip varchar2(255) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_ORDER_EXTENSION --- ---------------------------- -DROP TABLE "PAY_ORDER_EXTENSION"; -CREATE TABLE "PAY_ORDER_EXTENSION" ( - "ID" NUMBER(20,0) NOT NULL, - "NO" NVARCHAR2(64), - "ORDER_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_CODE" NVARCHAR2(32), - "USER_IP" NVARCHAR2(50), - "STATUS" NUMBER(4,0) NOT NULL, - "CHANNEL_EXTRAS" NVARCHAR2(256), - "CHANNEL_NOTIFY_DATA" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."ID" IS '支付订单编号'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."NO" IS '支付订单号'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."ORDER_ID" IS '支付订单编号'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CHANNEL_ID" IS '渠道编号'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CHANNEL_CODE" IS '渠道编码'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."STATUS" IS '支付状态'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CHANNEL_EXTRAS" IS '支付渠道的额外参数'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CHANNEL_NOTIFY_DATA" IS '支付渠道异步通知的内容'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_ORDER_EXTENSION"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_ORDER_EXTENSION" IS '支付订单 -'; +ALTER TABLE system_sms_code + ADD CONSTRAINT pk_system_sms_code PRIMARY KEY (id); + +CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile); + +COMMENT ON COLUMN system_sms_code.id IS '编号'; +COMMENT ON COLUMN system_sms_code.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_code.code IS '验证码'; +COMMENT ON COLUMN system_sms_code.create_ip IS '创建 IP'; +COMMENT ON COLUMN system_sms_code.scene IS '发送场景'; +COMMENT ON COLUMN system_sms_code.today_index IS '今日发送的第几条'; +COMMENT ON COLUMN system_sms_code.used IS '是否使用'; +COMMENT ON COLUMN system_sms_code.used_time IS '使用时间'; +COMMENT ON COLUMN system_sms_code.used_ip IS '使用 IP'; +COMMENT ON COLUMN system_sms_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; +COMMENT ON COLUMN system_sms_code.mobile IS '手机号'; +COMMENT ON TABLE system_sms_code IS '手机验证码'; + +CREATE SEQUENCE system_sms_code_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_sms_log +-- ------------------------------ +CREATE TABLE system_sms_log +( + id number NOT NULL, + channel_id number NOT NULL, + channel_code varchar2(63) NOT NULL, + template_id number NOT NULL, + template_code varchar2(63) NOT NULL, + template_type smallint NOT NULL, + template_content varchar2(255) NOT NULL, + template_params varchar2(255) NOT NULL, + api_template_id varchar2(63) NOT NULL, + mobile varchar2(11) NOT NULL, + user_id number DEFAULT NULL NULL, + user_type smallint DEFAULT NULL NULL, + send_status smallint DEFAULT 0 NOT NULL, + send_time date DEFAULT NULL NULL, + api_send_code varchar2(63) DEFAULT NULL NULL, + api_send_msg varchar2(255) DEFAULT NULL NULL, + api_request_id varchar2(255) DEFAULT NULL NULL, + api_serial_no varchar2(255) DEFAULT NULL NULL, + receive_status smallint DEFAULT 0 NOT NULL, + receive_time date DEFAULT NULL NULL, + api_receive_code varchar2(63) DEFAULT NULL NULL, + api_receive_msg varchar2(255) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_ORDER_EXTENSION --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_sms_log + ADD CONSTRAINT pk_system_sms_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_log.id IS '编号'; +COMMENT ON COLUMN system_sms_log.channel_id IS '短信渠道编号'; +COMMENT ON COLUMN system_sms_log.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_log.template_id IS '模板编号'; +COMMENT ON COLUMN system_sms_log.template_code IS '模板编码'; +COMMENT ON COLUMN system_sms_log.template_type IS '短信类型'; +COMMENT ON COLUMN system_sms_log.template_content IS '短信内容'; +COMMENT ON COLUMN system_sms_log.template_params IS '短信参数'; +COMMENT ON COLUMN system_sms_log.api_template_id IS '短信 API 的模板编号'; +COMMENT ON COLUMN system_sms_log.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_sms_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_sms_log.send_status IS '发送状态'; +COMMENT ON COLUMN system_sms_log.send_time IS '发送时间'; +COMMENT ON COLUMN system_sms_log.api_send_code IS '短信 API 发送结果的编码'; +COMMENT ON COLUMN system_sms_log.api_send_msg IS '短信 API 发送失败的提示'; +COMMENT ON COLUMN system_sms_log.api_request_id IS '短信 API 发送返回的唯一请求 ID'; +COMMENT ON COLUMN system_sms_log.api_serial_no IS '短信 API 发送返回的序号'; +COMMENT ON COLUMN system_sms_log.receive_status IS '接收状态'; +COMMENT ON COLUMN system_sms_log.receive_time IS '接收时间'; +COMMENT ON COLUMN system_sms_log.api_receive_code IS 'API 接收结果的编码'; +COMMENT ON COLUMN system_sms_log.api_receive_msg IS 'API 接收结果的说明'; +COMMENT ON COLUMN system_sms_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; +COMMENT ON TABLE system_sms_log IS '短信日志'; + +CREATE SEQUENCE system_sms_log_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_sms_template +-- ------------------------------ +CREATE TABLE system_sms_template +( + id number NOT NULL, + type smallint NOT NULL, + status smallint NOT NULL, + code varchar2(63) NOT NULL, + name varchar2(63) NOT NULL, + content varchar2(255) NOT NULL, + params varchar2(255) NOT NULL, + remark varchar2(255) DEFAULT NULL NULL, + api_template_id varchar2(63) NOT NULL, + channel_id number NOT NULL, + channel_code varchar2(63) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for PAY_REFUND --- ---------------------------- -DROP TABLE "PAY_REFUND"; -CREATE TABLE "PAY_REFUND" ( - "ID" NUMBER(20,0) NOT NULL, - "MERCHANT_ID" NUMBER(20,0) NOT NULL, - "APP_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_CODE" NVARCHAR2(32), - "ORDER_ID" NUMBER(20,0) NOT NULL, - "TRADE_NO" NVARCHAR2(64), - "MERCHANT_ORDER_ID" NVARCHAR2(64), - "MERCHANT_REFUND_NO" NVARCHAR2(64), - "NOTIFY_URL" NCLOB, - "NOTIFY_STATUS" NUMBER(4,0) NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "PAY_AMOUNT" NUMBER(20,0) NOT NULL, - "REFUND_AMOUNT" NUMBER(20,0) NOT NULL, - "REASON" NVARCHAR2(256), - "USER_IP" NVARCHAR2(50), - "CHANNEL_ORDER_NO" NVARCHAR2(64), - "CHANNEL_REFUND_NO" NVARCHAR2(64), - "CHANNEL_ERROR_CODE" NVARCHAR2(128), - "CHANNEL_ERROR_MSG" NVARCHAR2(256), - "CHANNEL_EXTRAS" NCLOB, - "EXPIRE_TIME" DATE, - "SUCCESS_TIME" DATE, - "NOTIFY_TIME" DATE, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "PAY_REFUND"."ID" IS '支付退款编号'; -COMMENT ON COLUMN "PAY_REFUND"."MERCHANT_ID" IS '商户编号'; -COMMENT ON COLUMN "PAY_REFUND"."APP_ID" IS '应用编号'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_ID" IS '渠道编号'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_CODE" IS '渠道编码'; -COMMENT ON COLUMN "PAY_REFUND"."ORDER_ID" IS '支付订单编号 pay_order 表id'; -COMMENT ON COLUMN "PAY_REFUND"."TRADE_NO" IS '交易订单号 pay_extension 表no 字段'; -COMMENT ON COLUMN "PAY_REFUND"."MERCHANT_ORDER_ID" IS '商户订单编号(商户系统生成)'; -COMMENT ON COLUMN "PAY_REFUND"."MERCHANT_REFUND_NO" IS '商户退款订单号(商户系统生成)'; -COMMENT ON COLUMN "PAY_REFUND"."NOTIFY_URL" IS '异步通知商户地址'; -COMMENT ON COLUMN "PAY_REFUND"."NOTIFY_STATUS" IS '通知商户退款结果的回调状态'; -COMMENT ON COLUMN "PAY_REFUND"."STATUS" IS '退款状态'; -COMMENT ON COLUMN "PAY_REFUND"."TYPE" IS '退款类型(部分退款,全部退款)'; -COMMENT ON COLUMN "PAY_REFUND"."PAY_AMOUNT" IS '支付金额,单位分'; -COMMENT ON COLUMN "PAY_REFUND"."REFUND_AMOUNT" IS '退款金额,单位分'; -COMMENT ON COLUMN "PAY_REFUND"."REASON" IS '退款原因'; -COMMENT ON COLUMN "PAY_REFUND"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_ORDER_NO" IS '渠道订单号,pay_order 中的channel_order_no 对应'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_REFUND_NO" IS '渠道退款单号,渠道返回'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_ERROR_CODE" IS '渠道调用报错时,错误码'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_ERROR_MSG" IS '渠道调用报错时,错误信息'; -COMMENT ON COLUMN "PAY_REFUND"."CHANNEL_EXTRAS" IS '支付渠道的额外参数'; -COMMENT ON COLUMN "PAY_REFUND"."EXPIRE_TIME" IS '退款失效时间'; -COMMENT ON COLUMN "PAY_REFUND"."SUCCESS_TIME" IS '退款成功时间'; -COMMENT ON COLUMN "PAY_REFUND"."NOTIFY_TIME" IS '退款通知时间'; -COMMENT ON COLUMN "PAY_REFUND"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "PAY_REFUND"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "PAY_REFUND"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "PAY_REFUND"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "PAY_REFUND"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "PAY_REFUND" IS '退款订单'; +ALTER TABLE system_sms_template + ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_template.id IS '编号'; +COMMENT ON COLUMN system_sms_template.type IS '短信签名'; +COMMENT ON COLUMN system_sms_template.status IS '开启状态'; +COMMENT ON COLUMN system_sms_template.code IS '模板编码'; +COMMENT ON COLUMN system_sms_template.name IS '模板名称'; +COMMENT ON COLUMN system_sms_template.content IS '模板内容'; +COMMENT ON COLUMN system_sms_template.params IS '参数数组'; +COMMENT ON COLUMN system_sms_template.remark IS '备注'; +COMMENT ON COLUMN system_sms_template.api_template_id IS '短信 API 的模板编号'; +COMMENT ON COLUMN system_sms_template.channel_id IS '短信渠道编号'; +COMMENT ON COLUMN system_sms_template.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_template.update_time IS '更新时间'; +COMMENT ON TABLE system_sms_template IS '短信模板'; + +-- @formatter:off +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, 'test_01', '测试验证码短信', '正在进行登录操作{operation},您的验证码是{code}', '["operation","code"]', '测试备注', '4383920', 6, 'DEBUG_DING_TALK', '', to_date('2021-03-31 10:49:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:32:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, 'test_02', '公告通知', '您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', '["code"]', NULL, 'SMS_207945135', 2, 'ALIYUN', '', to_date('2021-03-31 11:56:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2021-04-10 01:22:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (6, 3, 0, 'test-01', '测试模板', '哈哈哈 {name}', '["name"]', 'f哈哈哈', '4383920', 6, 'DEBUG_DING_TALK', '1', to_date('2021-04-10 01:07:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 21:26:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (7, 3, 0, 'test-04', '测试下', '老鸡{name},牛逼{code}', '["name","code"]', '哈哈哈哈', 'suibian', 4, 'DEBUG_DING_TALK', '1', to_date('2021-04-13 00:29:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:35:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (8, 1, 0, 'user-sms-login', '前台用户短信登录', '您的验证码是{code}', '["code"]', NULL, '4372216', 6, 'DEBUG_DING_TALK', '1', to_date('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-10 21:25:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (9, 2, 0, 'bpm_task_assigned', '【工作流】任务被分配', '您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}', '["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', to_date('2022-01-21 22:31:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-01-22 00:03:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (10, 2, 0, 'bpm_process_instance_reject', '【工作流】流程被不通过', '您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}', '["processInstanceName","reason","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', to_date('2022-01-22 00:03:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-01 12:33:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (11, 2, 0, 'bpm_process_instance_approve', '【工作流】流程被通过', '您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}', '["processInstanceName","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', to_date('2022-01-22 00:04:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-27 20:32:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (12, 2, 0, 'demo', '演示模板', '我就是测试一下下', '[]', NULL, 'biubiubiu', 6, 'DEBUG_DING_TALK', '1', to_date('2022-04-10 23:22:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-24 23:45:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (14, 1, 0, 'user-update-mobile', '会员用户 - 修改手机', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', to_date('2023-08-19 18:58:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-19 11:34:04', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (15, 1, 0, 'user-update-password', '会员用户 - 修改密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', to_date('2023-08-19 18:58:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-08-19 11:34:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (16, 1, 0, 'user-reset-password', '会员用户 - 重置密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', to_date('2023-08-19 18:58:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:35:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_sms_template_seq + START WITH 17 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_social_client +-- ------------------------------ +CREATE TABLE system_social_client +( + id number NOT NULL, + name varchar2(255) NOT NULL, + social_type smallint NOT NULL, + user_type smallint NOT NULL, + client_id varchar2(255) NOT NULL, + client_secret varchar2(255) NOT NULL, + agent_id varchar2(255) DEFAULT NULL NULL, + status smallint NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of PAY_REFUND --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_social_client + ADD CONSTRAINT pk_system_social_client PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_client.id IS '编号'; +COMMENT ON COLUMN system_social_client.name IS '应用名'; +COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_client.user_type IS '用户类型'; +COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; +COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; +COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; +COMMENT ON COLUMN system_social_client.status IS '状态'; +COMMENT ON COLUMN system_social_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_client.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_client IS '社交客户端表'; + +-- @formatter:off +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '钉钉', 20, 2, 'dingvrnreaje3yqvzhxg', 'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, '', to_date('2023-10-18 11:21:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-20 21:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '钉钉(王土豆)', 20, 2, 'dingtsu9hpepjkbmthhw', 'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, '', to_date('2023-10-18 11:21:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-20 21:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', 121); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '微信公众号', 31, 1, 'wx5b23ba7a5589ecbb', '2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, '', to_date('2023-10-18 16:07:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-20 21:28:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (43, '微信小程序', 34, 1, 'wx63c280fe3248a3e7', '6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, '', to_date('2023-10-19 13:37:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-20 21:28:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_social_client_seq + START WITH 44 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_social_user +-- ------------------------------ +CREATE TABLE system_social_user +( + id number NOT NULL, + type smallint NOT NULL, + openid varchar2(32) NOT NULL, + token varchar2(256) DEFAULT NULL NULL, + raw_token_info varchar2(1024) NOT NULL, + nickname varchar2(32) NOT NULL, + avatar varchar2(255) DEFAULT NULL NULL, + raw_user_info varchar2(1024) NOT NULL, + code varchar2(256) NOT NULL, + state varchar2(256) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for QRTZ_BLOB_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_BLOB_TRIGGERS"; -CREATE TABLE "QRTZ_BLOB_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "BLOB_DATA" BLOB -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; +ALTER TABLE system_social_user + ADD CONSTRAINT pk_system_social_user PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_user.id IS '主键(自增策略)'; +COMMENT ON COLUMN system_social_user.type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_user.openid IS '社交 openid'; +COMMENT ON COLUMN system_social_user.token IS '社交 token'; +COMMENT ON COLUMN system_social_user.raw_token_info IS '原始 Token 数据,一般是 JSON 格式'; +COMMENT ON COLUMN system_social_user.nickname IS '用户昵称'; +COMMENT ON COLUMN system_social_user.avatar IS '用户头像'; +COMMENT ON COLUMN system_social_user.raw_user_info IS '原始用户数据,一般是 JSON 格式'; +COMMENT ON COLUMN system_social_user.code IS '最后一次的认证 code'; +COMMENT ON COLUMN system_social_user.state IS '最后一次的认证 state'; +COMMENT ON COLUMN system_social_user.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user IS '社交用户表'; + +CREATE SEQUENCE system_social_user_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_social_user_bind +-- ------------------------------ +CREATE TABLE system_social_user_bind +( + id number NOT NULL, + user_id number NOT NULL, + user_type smallint NOT NULL, + social_type smallint NOT NULL, + social_user_id number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of QRTZ_BLOB_TRIGGERS --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_social_user_bind + ADD CONSTRAINT pk_system_social_user_bind PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_user_bind.id IS '主键(自增策略)'; +COMMENT ON COLUMN system_social_user_bind.user_id IS '用户编号'; +COMMENT ON COLUMN system_social_user_bind.user_type IS '用户类型'; +COMMENT ON COLUMN system_social_user_bind.social_type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_user_bind.social_user_id IS '社交用户的编号'; +COMMENT ON COLUMN system_social_user_bind.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user_bind.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; + +CREATE SEQUENCE system_social_user_bind_seq + START WITH 1 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_tenant +-- ------------------------------ +CREATE TABLE system_tenant +( + id number NOT NULL, + name varchar2(30) NOT NULL, + contact_user_id number DEFAULT NULL NULL, + contact_name varchar2(30) NOT NULL, + contact_mobile varchar2(500) DEFAULT NULL NULL, + status smallint DEFAULT 0 NOT NULL, + website varchar2(256) DEFAULT '' NULL, + package_id number NOT NULL, + expire_time date NOT NULL, + account_count number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for QRTZ_CALENDARS --- ---------------------------- -DROP TABLE "QRTZ_CALENDARS"; -CREATE TABLE "QRTZ_CALENDARS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "CALENDAR_NAME" VARCHAR2(200 BYTE) NOT NULL, - "CALENDAR" BLOB NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; +ALTER TABLE system_tenant + ADD CONSTRAINT pk_system_tenant PRIMARY KEY (id); + +COMMENT ON COLUMN system_tenant.id IS '租户编号'; +COMMENT ON COLUMN system_tenant.name IS '租户名'; +COMMENT ON COLUMN system_tenant.contact_user_id IS '联系人的用户编号'; +COMMENT ON COLUMN system_tenant.contact_name IS '联系人'; +COMMENT ON COLUMN system_tenant.contact_mobile IS '联系手机'; +COMMENT ON COLUMN system_tenant.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant.package_id IS '租户套餐编号'; +COMMENT ON COLUMN system_tenant.expire_time IS '过期时间'; +COMMENT ON COLUMN system_tenant.account_count IS '账号数量'; +COMMENT ON COLUMN system_tenant.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant.update_time IS '更新时间'; +COMMENT ON TABLE system_tenant IS '租户表'; + +-- @formatter:off +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn', 0, to_date('2099-02-19 17:14:16', 'SYYYY-MM-DD HH24:MI:SS'), 9999, '1', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, to_date('2024-03-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 20, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, to_date('2022-04-30 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 50, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (151, '大租户', 126, '土豆大', NULL, 0, 'https://tudou.iocoder.cn', 111, to_date('2023-12-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 10, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-08 23:39:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (152, '新租户', 127, '土豆', NULL, 0, 'http://xx.iocoder.cn', 111, to_date('2025-12-31 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 50, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (153, '小明的租户', 128, 'xiaoming', '15601691301', 0, 'xiaoming.iocoder.cn', 111, to_date('2025-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 100, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-28 22:53:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, to_date('2024-04-30 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 123, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-10 09:40:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_tenant_seq + START WITH 155 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_tenant_package +-- ------------------------------ +CREATE TABLE system_tenant_package +( + id number NOT NULL, + name varchar2(30) NOT NULL, + status smallint DEFAULT 0 NOT NULL, + remark varchar2(256) DEFAULT '' NULL, + menu_ids varchar2(4000) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of QRTZ_CALENDARS --- ---------------------------- -COMMIT; -COMMIT; +ALTER TABLE system_tenant_package + ADD CONSTRAINT pk_system_tenant_package PRIMARY KEY (id); + +COMMENT ON COLUMN system_tenant_package.id IS '套餐编号'; +COMMENT ON COLUMN system_tenant_package.name IS '套餐名'; +COMMENT ON COLUMN system_tenant_package.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant_package.menu_ids IS '关联的菜单编号'; +COMMENT ON COLUMN system_tenant_package.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant_package.update_time IS '更新时间'; +COMMENT ON TABLE system_tenant_package IS '租户套餐表'; + +-- @formatter:off +INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', to_date('2022-02-22 00:54:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_tenant_package_seq + START WITH 112 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_user_post +-- ------------------------------ +CREATE TABLE system_user_post +( + id number NOT NULL, + user_id number DEFAULT 0 NOT NULL, + post_id number DEFAULT 0 NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for QRTZ_CRON_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_CRON_TRIGGERS"; -CREATE TABLE "QRTZ_CRON_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "CRON_EXPRESSION" VARCHAR2(120 BYTE) NOT NULL, - "TIME_ZONE_ID" VARCHAR2(80 BYTE) -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; +ALTER TABLE system_user_post + ADD CONSTRAINT pk_system_user_post PRIMARY KEY (id); + +COMMENT ON COLUMN system_user_post.id IS 'id'; +COMMENT ON COLUMN system_user_post.user_id IS '用户ID'; +COMMENT ON COLUMN system_user_post.post_id IS '岗位ID'; +COMMENT ON COLUMN system_user_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_post IS '用户岗位表'; + +-- @formatter:off +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 104, 1, '1', to_date('2022-05-16 19:36:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-16 19:36:28', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, 117, 2, '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 118, 1, '1', to_date('2022-07-09 17:44:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:44:44', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (119, 114, 5, '1', to_date('2024-03-24 20:45:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 20:45:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (123, 115, 1, '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (124, 115, 2, '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_user_post_seq + START WITH 125 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_user_role +-- ------------------------------ +CREATE TABLE system_user_role +( + id number NOT NULL, + user_id number NOT NULL, + role_id number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Records of QRTZ_CRON_TRIGGERS --- ---------------------------- -INSERT INTO "QRTZ_CRON_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "CRON_EXPRESSION", "TIME_ZONE_ID") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', '0 * * * * ? *', 'Asia/Shanghai'); -COMMIT; -COMMIT; +ALTER TABLE system_user_role + ADD CONSTRAINT pk_system_user_role PRIMARY KEY (id); + +COMMENT ON COLUMN system_user_role.id IS '自增编号'; +COMMENT ON COLUMN system_user_role.user_id IS '用户ID'; +COMMENT ON COLUMN system_user_role.role_id IS '角色ID'; +COMMENT ON COLUMN system_user_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_role IS '用户和角色关联表'; + +-- @formatter:off +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:11', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 107, 106, '1', to_date('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 118); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 108, 107, '1', to_date('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', 119); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 109, 108, '1', to_date('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', 120); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, '110', to_date('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, '1', to_date('2022-05-12 20:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-12 20:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (19, 116, 113, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, '1', to_date('2022-05-28 15:43:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-28 15:43:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', to_date('2022-07-21 22:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-21 22:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (23, 119, 114, '1', to_date('2022-12-30 11:32:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (24, 120, 115, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (25, 121, 116, '1', to_date('2022-12-30 11:33:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (26, 122, 118, '1', to_date('2022-12-30 11:47:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (28, 123, 136, '1', to_date('2023-03-05 21:23:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (29, 124, 137, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (30, 125, 138, '1', to_date('2023-03-05 21:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (31, 126, 139, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (32, 126, 140, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (33, 127, 141, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (34, 128, 143, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', to_date('2024-03-15 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-15 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', to_date('2024-03-17 09:12:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-17 09:12:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', to_date('2024-03-24 22:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 22:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (39, 129, 144, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_user_role_seq + START WITH 40 + INCREMENT BY 1; + + +-- ---------------------------- +-- system_users +-- ------------------------------ +CREATE TABLE system_users +( + id number NOT NULL, + username varchar2(30) NOT NULL, + password varchar2(100) DEFAULT '' NULL, + nickname varchar2(30) NOT NULL, + remark varchar2(500) DEFAULT NULL NULL, + dept_id number DEFAULT NULL NULL, + post_ids varchar2(255) DEFAULT NULL NULL, + email varchar2(50) DEFAULT '' NULL, + mobile varchar2(11) DEFAULT '' NULL, + sex smallint DEFAULT 0 NULL, + avatar varchar2(512) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + login_ip varchar2(50) DEFAULT '' NULL, + login_date date DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); --- ---------------------------- --- Table structure for QRTZ_FIRED_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_FIRED_TRIGGERS"; -CREATE TABLE "QRTZ_FIRED_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "ENTRY_ID" VARCHAR2(95 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "INSTANCE_NAME" VARCHAR2(200 BYTE) NOT NULL, - "FIRED_TIME" NUMBER(13,0) NOT NULL, - "SCHED_TIME" NUMBER(13,0) NOT NULL, - "PRIORITY" NUMBER(13,0) NOT NULL, - "STATE" VARCHAR2(16 BYTE) NOT NULL, - "JOB_NAME" VARCHAR2(200 BYTE), - "JOB_GROUP" VARCHAR2(200 BYTE), - "IS_NONCONCURRENT" VARCHAR2(1 BYTE), - "REQUESTS_RECOVERY" VARCHAR2(1 BYTE) -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; +ALTER TABLE system_users + ADD CONSTRAINT pk_system_users PRIMARY KEY (id); + +COMMENT ON COLUMN system_users.id IS '用户ID'; +COMMENT ON COLUMN system_users.username IS '用户账号'; +COMMENT ON COLUMN system_users.nickname IS '用户昵称'; +COMMENT ON COLUMN system_users.remark IS '备注'; +COMMENT ON COLUMN system_users.dept_id IS '部门ID'; +COMMENT ON COLUMN system_users.post_ids IS '岗位编号数组'; +COMMENT ON COLUMN system_users.sex IS '用户性别'; +COMMENT ON COLUMN system_users.status IS '帐号状态(0正常 1停用)'; +COMMENT ON COLUMN system_users.login_date IS '最后登录时间'; +COMMENT ON COLUMN system_users.create_time IS '创建时间'; +COMMENT ON COLUMN system_users.update_time IS '更新时间'; +COMMENT ON COLUMN system_users.tenant_id IS '租户编号'; +COMMENT ON TABLE system_users IS '用户信息表'; + +-- @formatter:off +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', to_date('2024-04-23 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-04-23 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', to_date('2022-07-09 23:03:33', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-07 09:07:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2022-07-09 23:03:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-18 21:09:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-13 23:50:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-18 21:09:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-26 07:11:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-21 02:13:53', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-26 07:11:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', to_date('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-27 08:26:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 118); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', to_date('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-27 08:26:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 119); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', to_date('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-27 08:26:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 120); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, 'admin110', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '小王', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', to_date('2022-09-25 22:47:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2022-09-25 22:47:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, 'test', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '测试用户', NULL, NULL, '[]', '', '', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2023-12-30 11:42:17', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 13:14:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2023-12-30 11:42:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 'newobject', '$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', '新对象', NULL, 100, '[]', '', '15601691235', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-16 23:11:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 19:08:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-16 23:11:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', to_date('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-24 22:21:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:50:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-24 22:21:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', to_date('2022-04-30 02:55:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '15601691302', '$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6', '小豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-17 09:10:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:44:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (126, 'tudou123', '$2a$04$lecJZ/CqgknEp7mDV2d4ou0beyj1GbM3.nVEZe//8WgQpR.JBgnAu', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (127, 'admin2024', '$2a$04$cHdZ7N6AUKysa2XTUG/J/egYtAzdwtpnNpcMVHDrupt1dyn4teOku', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2023-12-30 11:43:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2023-12-30 11:43:28', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (128, 'xiaoming', '$2a$04$BRinw4an9PBGvx6K7GLNre6rWU0.1HMYHkQCN6Oir74zNFKkNKRzm', 'xiaoming', NULL, NULL, NULL, '', '15601691301', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-02-29 23:48:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-02-29 23:48:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (129, 'hh123456', '$2a$04$8mHJM7n03bcNjtaw.IlfV.l38ikWWFJQ7NR1rHywavN7v2UyoDjwq', 'hh', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-30 17:53:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-30 17:53:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE system_users_seq + START WITH 130 + INCREMENT BY 1; --- ---------------------------- --- Records of QRTZ_FIRED_TRIGGERS --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_JOB_DETAILS --- ---------------------------- -DROP TABLE "QRTZ_JOB_DETAILS"; -CREATE TABLE "QRTZ_JOB_DETAILS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "JOB_NAME" VARCHAR2(200 BYTE) NOT NULL, - "JOB_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "DESCRIPTION" VARCHAR2(250 BYTE), - "JOB_CLASS_NAME" VARCHAR2(250 BYTE) NOT NULL, - "IS_DURABLE" VARCHAR2(1 BYTE) NOT NULL, - "IS_NONCONCURRENT" VARCHAR2(1 BYTE) NOT NULL, - "IS_UPDATE_DATA" VARCHAR2(1 BYTE) NOT NULL, - "REQUESTS_RECOVERY" VARCHAR2(1 BYTE) NOT NULL, - "JOB_DATA" BLOB -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_JOB_DETAILS --- ---------------------------- -INSERT INTO "QRTZ_JOB_DETAILS" ("SCHED_NAME", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "JOB_CLASS_NAME", "IS_DURABLE", "IS_NONCONCURRENT", "IS_UPDATE_DATA", "REQUESTS_RECOVERY", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000007400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800')); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_LOCKS --- ---------------------------- -DROP TABLE "QRTZ_LOCKS"; -CREATE TABLE "QRTZ_LOCKS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "LOCK_NAME" VARCHAR2(40 BYTE) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_LOCKS --- ---------------------------- -INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'STATE_ACCESS'); -INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'TRIGGER_ACCESS'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -DROP TABLE "QRTZ_PAUSED_TRIGGER_GRPS"; -CREATE TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SCHEDULER_STATE --- ---------------------------- -DROP TABLE "QRTZ_SCHEDULER_STATE"; -CREATE TABLE "QRTZ_SCHEDULER_STATE" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "INSTANCE_NAME" VARCHAR2(200 BYTE) NOT NULL, - "LAST_CHECKIN_TIME" NUMBER(13,0) NOT NULL, - "CHECKIN_INTERVAL" NUMBER(13,0) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_SCHEDULER_STATE --- ---------------------------- -INSERT INTO "QRTZ_SCHEDULER_STATE" ("SCHED_NAME", "INSTANCE_NAME", "LAST_CHECKIN_TIME", "CHECKIN_INTERVAL") VALUES ('schedulerName', 'Yunai.local1651409076356', '1651409097967', '15000'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_SIMPLE_TRIGGERS"; -CREATE TABLE "QRTZ_SIMPLE_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "REPEAT_COUNT" NUMBER(7,0) NOT NULL, - "REPEAT_INTERVAL" NUMBER(12,0) NOT NULL, - "TIMES_TRIGGERED" NUMBER(10,0) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_SIMPROP_TRIGGERS"; -CREATE TABLE "QRTZ_SIMPROP_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "STR_PROP_1" VARCHAR2(512 BYTE), - "STR_PROP_2" VARCHAR2(512 BYTE), - "STR_PROP_3" VARCHAR2(512 BYTE), - "INT_PROP_1" NUMBER(10,0), - "INT_PROP_2" NUMBER(10,0), - "LONG_PROP_1" NUMBER(13,0), - "LONG_PROP_2" NUMBER(13,0), - "DEC_PROP_1" NUMBER(13,4), - "DEC_PROP_2" NUMBER(13,4), - "BOOL_PROP_1" VARCHAR2(1 BYTE), - "BOOL_PROP_2" VARCHAR2(1 BYTE) -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_TRIGGERS --- ---------------------------- -DROP TABLE "QRTZ_TRIGGERS"; -CREATE TABLE "QRTZ_TRIGGERS" ( - "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, - "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, - "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "JOB_NAME" VARCHAR2(200 BYTE) NOT NULL, - "JOB_GROUP" VARCHAR2(200 BYTE) NOT NULL, - "DESCRIPTION" VARCHAR2(250 BYTE), - "NEXT_FIRE_TIME" NUMBER(13,0), - "PREV_FIRE_TIME" NUMBER(13,0), - "PRIORITY" NUMBER(13,0), - "TRIGGER_STATE" VARCHAR2(16 BYTE) NOT NULL, - "TRIGGER_TYPE" VARCHAR2(8 BYTE) NOT NULL, - "START_TIME" NUMBER(13,0) NOT NULL, - "END_TIME" NUMBER(13,0), - "CALENDAR_NAME" VARCHAR2(200 BYTE), - "MISFIRE_INSTR" NUMBER(2,0), - "JOB_DATA" BLOB -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; - --- ---------------------------- --- Records of QRTZ_TRIGGERS --- ---------------------------- -INSERT INTO "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "NEXT_FIRE_TIME", "PREV_FIRE_TIME", "PRIORITY", "TRIGGER_STATE", "TRIGGER_TYPE", "START_TIME", "END_TIME", "CALENDAR_NAME", "MISFIRE_INSTR", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', 'userSessionTimeoutJob', 'DEFAULT', NULL, '1651409160000', '1651409100000', '5', 'WAITING', 'CRON', '1651409043000', '0', NULL, '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000007D074000F4A4F425F52455452595F434F554E547371007E0009000000037800')); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_DEPT --- ---------------------------- -DROP TABLE "SYSTEM_DEPT"; -CREATE TABLE "SYSTEM_DEPT" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(30), - "PARENT_ID" NUMBER(20,0) NOT NULL, - "SORT" NUMBER(11,0) NOT NULL, - "LEADER_USER_ID" NUMBER(20,0), - "PHONE" NVARCHAR2(11), - "EMAIL" NVARCHAR2(50), - "STATUS" NUMBER(4,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_DEPT"."ID" IS '部门id'; -COMMENT ON COLUMN "SYSTEM_DEPT"."NAME" IS '部门名称'; -COMMENT ON COLUMN "SYSTEM_DEPT"."PARENT_ID" IS '父部门id'; -COMMENT ON COLUMN "SYSTEM_DEPT"."SORT" IS '显示顺序'; -COMMENT ON COLUMN "SYSTEM_DEPT"."LEADER_USER_ID" IS '负责人'; -COMMENT ON COLUMN "SYSTEM_DEPT"."PHONE" IS '联系电话'; -COMMENT ON COLUMN "SYSTEM_DEPT"."EMAIL" IS '邮箱'; -COMMENT ON COLUMN "SYSTEM_DEPT"."STATUS" IS '部门状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_DEPT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_DEPT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_DEPT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_DEPT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_DEPT"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_DEPT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_DEPT" IS '部门表'; - --- ---------------------------- --- Records of SYSTEM_DEPT --- ---------------------------- -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('100', '芋道源码', '0', '0', '1', '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-14 01:04:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('101', '深圳总公司', '100', '1', '104', '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 19:47:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('102', '长沙分公司', '100', '2', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-15 05:01:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('103', '研发部门', '101', '1', '104', '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-14 01:04:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('104', '市场部门', '101', '2', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-15 05:01:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('105', '测试部门', '101', '3', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-15 05:01:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('106', '财务部门', '101', '4', '103', '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-15 21:32:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('107', '运维部门', '101', '5', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-15 05:01:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('108', '市场部门', '102', '1', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 08:35:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('109', '财务部门', '102', '2', NULL, '15888888888', 'ry@qq.com', '0', 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-15 05:01:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('110', '新部门', '0', '1', NULL, NULL, NULL, '0', '110', TO_DATE('2022-02-23 20:46:30', 'SYYYY-MM-DD HH24:MI:SS'), '110', TO_DATE('2022-02-23 20:46:30', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_DEPT" ("ID", "NAME", "PARENT_ID", "SORT", "LEADER_USER_ID", "PHONE", "EMAIL", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('111', '顶级部门', '0', '1', NULL, NULL, NULL, '0', '113', TO_DATE('2022-03-07 21:44:50', 'SYYYY-MM-DD HH24:MI:SS'), '113', TO_DATE('2022-03-07 21:44:50', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_DICT_DATA --- ---------------------------- -DROP TABLE "SYSTEM_DICT_DATA"; -CREATE TABLE "SYSTEM_DICT_DATA" ( - "ID" NUMBER(20,0) NOT NULL, - "SORT" NUMBER(11,0) NOT NULL, - "LABEL" NVARCHAR2(100), - "VALUE" NVARCHAR2(100), - "DICT_TYPE" NVARCHAR2(100), - "STATUS" NUMBER(4,0) NOT NULL, - "COLOR_TYPE" NVARCHAR2(100), - "CSS_CLASS" NVARCHAR2(100), - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."ID" IS '字典编码'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."SORT" IS '字典排序'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."LABEL" IS '字典标签'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."VALUE" IS '字典键值'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."DICT_TYPE" IS '字典类型'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."STATUS" IS '状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."COLOR_TYPE" IS '颜色类型'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."CSS_CLASS" IS 'css 样式'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_DICT_DATA"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_DICT_DATA" IS '字典数据表'; - --- ---------------------------- --- Records of SYSTEM_DICT_DATA --- ---------------------------- -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1143', '20', '流程发起人的一级领导', '20', 'bpm_task_assign_script', '0', NULL, NULL, '任务分配自定义脚本 - 流程发起人的一级领导', '103', TO_DATE('2022-01-15 21:24:31', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-15 21:24:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1144', '21', '流程发起人的二级领导', '21', 'bpm_task_assign_script', '0', NULL, NULL, '任务分配自定义脚本 - 流程发起人的二级领导', '103', TO_DATE('2022-01-15 21:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-15 21:24:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1145', '1', '管理后台', '1', 'infra_codegen_scene', '0', NULL, NULL, '代码生成的场景枚举 - 管理后台', '1', TO_DATE('2022-02-02 13:15:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-10 16:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1146', '2', '用户 APP', '2', 'infra_codegen_scene', '0', NULL, NULL, '代码生成的场景枚举 - 用户 APP', '1', TO_DATE('2022-02-02 13:15:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-10 16:33:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1147', '0', '未退款', '0', 'pay_refund_order_type', '0', 'info', NULL, '退款类型 - 未退款', '1', TO_DATE('2022-02-16 14:09:01', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:09:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1148', '10', '部分退款', '10', 'pay_refund_order_type', '0', 'success', NULL, '退款类型 - 部分退款', '1', TO_DATE('2022-02-16 14:09:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:11:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1149', '20', '全部退款', '20', 'pay_refund_order_type', '0', 'warning', NULL, '退款类型 - 全部退款', '1', TO_DATE('2022-02-16 14:11:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:11:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1150', '1', '数据库', '1', 'infra_file_storage', '0', 'default', NULL, NULL, '1', TO_DATE('2022-03-15 00:25:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:25:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1151', '10', '本地磁盘', '10', 'infra_file_storage', '0', 'default', NULL, NULL, '1', TO_DATE('2022-03-15 00:25:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:25:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1152', '11', 'FTP 服务器', '11', 'infra_file_storage', '0', 'default', NULL, NULL, '1', TO_DATE('2022-03-15 00:26:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:26:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1153', '12', 'SFTP 服务器', '12', 'infra_file_storage', '0', 'default', NULL, NULL, '1', TO_DATE('2022-03-15 00:26:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:26:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1154', '20', 'S3 对象存储', '20', 'infra_file_storage', '0', 'default', NULL, NULL, '1', TO_DATE('2022-03-15 00:26:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:26:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1155', '103', '短信登录', '103', 'system_login_type', '0', 'default', NULL, NULL, '1', TO_DATE('2022-05-09 23:57:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-09 23:58:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1156', '1', 'password', 'password', 'system_oauth2_grant_type', '0', 'default', NULL, '密码模式', '1', TO_DATE('2022-05-12 00:22:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 16:26:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1157', '2', 'authorization_code', 'authorization_code', 'system_oauth2_grant_type', '0', 'primary', NULL, '授权码模式', '1', TO_DATE('2022-05-12 00:22:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 16:26:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1158', '3', 'implicit', 'implicit', 'system_oauth2_grant_type', '0', 'success', NULL, '简化模式', '1', TO_DATE('2022-05-12 00:23:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 16:26:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1159', '4', 'client_credentials', 'client_credentials', 'system_oauth2_grant_type', '0', 'default', NULL, '客户端模式', '1', TO_DATE('2022-05-12 00:23:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 16:26:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1160', '5', 'refresh_token', 'refresh_token', 'system_oauth2_grant_type', '0', 'info', NULL, '刷新模式', '1', TO_DATE('2022-05-12 00:24:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 16:26:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('79', '2', '手动编辑', '2', 'system_error_code_type', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-04-21 00:07:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:57:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('80', '100', '账号登录', '100', 'system_login_type', '0', 'primary', NULL, '账号登录', '1', TO_DATE('2021-10-06 00:52:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('81', '101', '社交登录', '101', 'system_login_type', '0', 'info', NULL, '社交登录', '1', TO_DATE('2021-10-06 00:52:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:11:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('83', '200', '主动登出', '200', 'system_login_type', '0', 'primary', NULL, '主动登出', '1', TO_DATE('2021-10-06 00:52:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:11:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('85', '202', '强制登出', '202', 'system_login_type', '0', 'danger', NULL, '强制退出', '1', TO_DATE('2021-10-06 00:53:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:11:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('86', '0', '病假', '1', 'bpm_oa_leave_type', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-09-21 22:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:00:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('87', '1', '事假', '2', 'bpm_oa_leave_type', '0', 'info', NULL, NULL, '1', TO_DATE('2021-09-21 22:36:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:00:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('88', '2', '婚假', '3', 'bpm_oa_leave_type', '0', 'warning', NULL, NULL, '1', TO_DATE('2021-09-21 22:36:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:00:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('98', '1', 'v2', 'v2', 'pay_channel_wechat_version', '0', NULL, NULL, 'v2版本', '1', TO_DATE('2021-11-08 17:00:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-08 17:00:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('99', '2', 'v3', 'v3', 'pay_channel_wechat_version', '0', NULL, NULL, 'v3版本', '1', TO_DATE('2021-11-08 17:01:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-08 17:01:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('108', '1', 'RSA2', 'RSA2', 'pay_channel_alipay_sign_type', '0', NULL, NULL, 'RSA2', '1', TO_DATE('2021-11-18 15:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 15:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('109', '1', '公钥模式', '1', 'pay_channel_alipay_mode', '0', NULL, NULL, '公钥模式:privateKey + alipayPublicKey', '1', TO_DATE('2021-11-18 15:45:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 15:45:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('110', '2', '证书模式', '2', 'pay_channel_alipay_mode', '0', NULL, NULL, '证书模式:appCertContent + alipayPublicCertContent + rootCertContent', '1', TO_DATE('2021-11-18 15:45:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 15:45:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('111', '1', '线上', 'https://openapi.alipay.com/gateway.do', 'pay_channel_alipay_server_type', '0', NULL, NULL, '网关地址 - 线上', '1', TO_DATE('2021-11-18 16:59:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-21 17:37:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('112', '2', '沙箱', 'https://openapi.alipaydev.com/gateway.do', 'pay_channel_alipay_server_type', '0', NULL, NULL, '网关地址 - 沙箱', '1', TO_DATE('2021-11-18 16:59:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-21 17:37:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('113', '1', '微信 JSAPI 支付', 'wx_pub', 'pay_channel_code_type', '0', NULL, NULL, '微信 JSAPI(公众号) 支付', '1', TO_DATE('2021-12-03 10:40:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-04 16:41:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('114', '2', '微信小程序支付', 'wx_lite', 'pay_channel_code_type', '0', NULL, NULL, '微信小程序支付', '1', TO_DATE('2021-12-03 10:41:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:41:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('115', '3', '微信 App 支付', 'wx_app', 'pay_channel_code_type', '0', NULL, NULL, '微信 App 支付', '1', TO_DATE('2021-12-03 10:41:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:41:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('116', '4', '支付宝 PC 网站支付', 'alipay_pc', 'pay_channel_code_type', '0', NULL, NULL, '支付宝 PC 网站支付', '1', TO_DATE('2021-12-03 10:42:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:42:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('117', '5', '支付宝 Wap 网站支付', 'alipay_wap', 'pay_channel_code_type', '0', NULL, NULL, '支付宝 Wap 网站支付', '1', TO_DATE('2021-12-03 10:42:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:42:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('118', '6', '支付宝App 支付', 'alipay_app', 'pay_channel_code_type', '0', NULL, NULL, '支付宝App 支付', '1', TO_DATE('2021-12-03 10:42:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:42:55', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('119', '7', '支付宝扫码支付', 'alipay_qr', 'pay_channel_code_type', '0', NULL, NULL, '支付宝扫码支付', '1', TO_DATE('2021-12-03 10:43:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:43:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('120', '1', '通知成功', '10', 'pay_order_notify_status', '0', 'success', NULL, '通知成功', '1', TO_DATE('2021-12-03 11:02:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:59:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('121', '2', '通知失败', '20', 'pay_order_notify_status', '0', 'danger', NULL, '通知失败', '1', TO_DATE('2021-12-03 11:02:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:59:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('122', '3', '未通知', '0', 'pay_order_notify_status', '0', 'info', NULL, '未通知', '1', TO_DATE('2021-12-03 11:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:59:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('123', '1', '支付成功', '10', 'pay_order_status', '0', 'success', NULL, '支付成功', '1', TO_DATE('2021-12-03 11:18:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 15:24:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('124', '2', '支付关闭', '20', 'pay_order_status', '0', 'danger', NULL, '支付关闭', '1', TO_DATE('2021-12-03 11:18:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 15:24:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('125', '3', '未支付', '0', 'pay_order_status', '0', 'info', NULL, '未支付', '1', TO_DATE('2021-12-03 11:18:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 15:24:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('126', '1', '未退款', '0', 'pay_order_refund_status', '0', NULL, NULL, '未退款', '1', TO_DATE('2021-12-03 11:30:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 11:34:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('127', '2', '部分退款', '10', 'pay_order_refund_status', '0', NULL, NULL, '部分退款', '1', TO_DATE('2021-12-03 11:30:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 11:34:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('128', '3', '全部退款', '20', 'pay_order_refund_status', '0', NULL, NULL, '全部退款', '1', TO_DATE('2021-12-03 11:30:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 11:34:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1117', '1', '退款订单生成', '0', 'pay_refund_order_status', '0', 'primary', NULL, '退款订单生成', '1', TO_DATE('2021-12-10 16:44:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:05:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1118', '2', '退款成功', '1', 'pay_refund_order_status', '0', 'success', NULL, '退款成功', '1', TO_DATE('2021-12-10 16:44:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:05:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1119', '3', '退款失败', '2', 'pay_refund_order_status', '0', 'danger', NULL, '退款失败', '1', TO_DATE('2021-12-10 16:45:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:05:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1124', '8', '退款关闭', '99', 'pay_refund_order_status', '0', 'info', NULL, '退款关闭', '1', TO_DATE('2021-12-10 16:46:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 14:05:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1125', '0', '默认', '1', 'bpm_model_category', '0', 'primary', NULL, '流程分类 - 默认', '1', TO_DATE('2022-01-02 08:41:11', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:01:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1126', '0', 'OA', '2', 'bpm_model_category', '0', 'success', NULL, '流程分类 - OA', '1', TO_DATE('2022-01-02 08:41:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:01:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1127', '0', '进行中', '1', 'bpm_process_instance_status', '0', 'primary', NULL, '流程实例的状态 - 进行中', '1', TO_DATE('2022-01-07 23:47:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:07:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1128', '2', '已完成', '2', 'bpm_process_instance_status', '0', 'success', NULL, '流程实例的状态 - 已完成', '1', TO_DATE('2022-01-07 23:47:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:07:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1129', '1', '处理中', '1', 'bpm_process_instance_result', '0', 'primary', NULL, '流程实例的结果 - 处理中', '1', TO_DATE('2022-01-07 23:48:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:53:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1130', '2', '通过', '2', 'bpm_process_instance_result', '0', 'success', NULL, '流程实例的结果 - 通过', '1', TO_DATE('2022-01-07 23:48:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:53:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1131', '3', '不通过', '3', 'bpm_process_instance_result', '0', 'danger', NULL, '流程实例的结果 - 不通过', '1', TO_DATE('2022-01-07 23:48:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:53:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1132', '4', '已取消', '4', 'bpm_process_instance_result', '0', 'info', NULL, '流程实例的结果 - 撤销', '1', TO_DATE('2022-01-07 23:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:53:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1133', '10', '流程表单', '10', 'bpm_model_form_type', '0', NULL, NULL, '流程的表单类型 - 流程表单', '103', TO_DATE('2022-01-11 23:51:30', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-11 23:51:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1134', '20', '业务表单', '20', 'bpm_model_form_type', '0', NULL, NULL, '流程的表单类型 - 业务表单', '103', TO_DATE('2022-01-11 23:51:47', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-11 23:51:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1135', '10', '角色', '10', 'bpm_task_assign_rule_type', '0', 'info', NULL, '任务分配规则的类型 - 角色', '103', TO_DATE('2022-01-12 23:21:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:06:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1136', '20', '部门的成员', '20', 'bpm_task_assign_rule_type', '0', 'primary', NULL, '任务分配规则的类型 - 部门的成员', '103', TO_DATE('2022-01-12 23:21:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:05:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1137', '21', '部门的负责人', '21', 'bpm_task_assign_rule_type', '0', 'primary', NULL, '任务分配规则的类型 - 部门的负责人', '103', TO_DATE('2022-01-12 23:33:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:05:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1138', '30', '用户', '30', 'bpm_task_assign_rule_type', '0', 'info', NULL, '任务分配规则的类型 - 用户', '103', TO_DATE('2022-01-12 23:34:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:05:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1139', '40', '用户组', '40', 'bpm_task_assign_rule_type', '0', 'warning', NULL, '任务分配规则的类型 - 用户组', '103', TO_DATE('2022-01-12 23:34:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:05:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1140', '50', '自定义脚本', '50', 'bpm_task_assign_rule_type', '0', 'danger', NULL, '任务分配规则的类型 - 自定义脚本', '103', TO_DATE('2022-01-12 23:34:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:06:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1141', '22', '岗位', '22', 'bpm_task_assign_rule_type', '0', 'success', NULL, '任务分配规则的类型 - 岗位', '103', TO_DATE('2022-01-14 18:41:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:05:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1142', '10', '流程发起人', '10', 'bpm_task_assign_script', '0', NULL, NULL, '任务分配自定义脚本 - 流程发起人', '103', TO_DATE('2022-01-15 00:10:57', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-15 21:24:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', '1', '男', '1', 'system_user_sex', '0', 'default', 'A', '性别男', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-29 00:14:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', '2', '女', '2', 'system_user_sex', '1', 'success', NULL, '性别女', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 01:30:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('8', '1', '正常', '1', 'infra_job_status', '0', 'success', NULL, '正常状态', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:33:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('9', '2', '暂停', '2', 'infra_job_status', '0', 'danger', NULL, '停用状态', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:33:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('12', '1', '系统内置', '1', 'infra_config_type', '0', 'danger', NULL, '参数类型 - 系统内置', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:06:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('13', '2', '自定义', '2', 'infra_config_type', '0', 'primary', NULL, '参数类型 - 自定义', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:06:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('14', '1', '通知', '1', 'system_notice_type', '0', 'success', NULL, '通知', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:05:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('15', '2', '公告', '2', 'system_notice_type', '0', 'info', NULL, '公告', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:06:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('16', '0', '其它', '0', 'system_operate_type', '0', 'default', NULL, '其它操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:32:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('17', '1', '查询', '1', 'system_operate_type', '0', 'info', NULL, '查询操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('18', '2', '新增', '2', 'system_operate_type', '0', 'primary', NULL, '新增操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('19', '3', '修改', '3', 'system_operate_type', '0', 'warning', NULL, '修改操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('20', '4', '删除', '4', 'system_operate_type', '0', 'danger', NULL, '删除操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('22', '5', '导出', '5', 'system_operate_type', '0', 'default', NULL, '导出操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('23', '6', '导入', '6', 'system_operate_type', '0', 'default', NULL, '导入操作', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 09:33:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('27', '1', '开启', '0', 'common_status', '0', 'primary', NULL, '开启状态', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 08:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('28', '2', '关闭', '1', 'common_status', '0', 'info', NULL, '关闭状态', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 08:00:44', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('29', '1', '目录', '1', 'system_menu_type', '0', NULL, NULL, '目录', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:43:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('30', '2', '菜单', '2', 'system_menu_type', '0', NULL, NULL, '菜单', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:43:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('31', '3', '按钮', '3', 'system_menu_type', '0', NULL, NULL, '按钮', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:43:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('32', '1', '内置', '1', 'system_role_type', '0', 'danger', NULL, '内置角色', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:02:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('33', '2', '自定义', '2', 'system_role_type', '0', 'primary', NULL, '自定义角色', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:02:12', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('34', '1', '全部数据权限', '1', 'system_data_scope', '0', NULL, NULL, '全部数据权限', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:47:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('35', '2', '指定部门数据权限', '2', 'system_data_scope', '0', NULL, NULL, '指定部门数据权限', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('36', '3', '本部门数据权限', '3', 'system_data_scope', '0', NULL, NULL, '本部门数据权限', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:47:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('37', '4', '本部门及以下数据权限', '4', 'system_data_scope', '0', NULL, NULL, '本部门及以下数据权限', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:47:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('38', '5', '仅本人数据权限', '5', 'system_data_scope', '0', NULL, NULL, '仅本人数据权限', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:47:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('39', '0', '成功', '0', 'system_login_result', '0', 'success', NULL, '登陆结果 - 成功', NULL, TO_DATE('2021-01-18 06:17:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:23:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('40', '10', '账号或密码不正确', '10', 'system_login_result', '0', 'primary', NULL, '登陆结果 - 账号或密码不正确', NULL, TO_DATE('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:24:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('41', '20', '用户被禁用', '20', 'system_login_result', '0', 'warning', NULL, '登陆结果 - 用户被禁用', NULL, TO_DATE('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:23:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('42', '30', '验证码不存在', '30', 'system_login_result', '0', 'info', NULL, '登陆结果 - 验证码不存在', NULL, TO_DATE('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:24:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('43', '31', '验证码不正确', '31', 'system_login_result', '0', 'info', NULL, '登陆结果 - 验证码不正确', NULL, TO_DATE('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:24:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('44', '100', '未知异常', '100', 'system_login_result', '0', 'danger', NULL, '登陆结果 - 未知异常', NULL, TO_DATE('2021-01-18 06:17:54', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('45', '1', '是', 'true', 'infra_boolean_string', '0', 'danger', NULL, 'Boolean 是否类型 - 是', NULL, TO_DATE('2021-01-19 03:20:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 23:01:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('46', '1', '否', 'false', 'infra_boolean_string', '0', 'info', NULL, 'Boolean 是否类型 - 否', NULL, TO_DATE('2021-01-19 03:20:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 23:09:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('47', '1', '永不超时', '1', 'infra_redis_timeout_type', '0', 'primary', NULL, 'Redis 未设置超时的情况', NULL, TO_DATE('2021-01-26 00:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:03:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('48', '1', '动态超时', '2', 'infra_redis_timeout_type', '0', 'info', NULL, '程序里动态传入超时时间,无法固定', NULL, TO_DATE('2021-01-26 00:55:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:03:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('49', '3', '固定超时', '3', 'infra_redis_timeout_type', '0', 'success', NULL, 'Redis 设置了过期时间', NULL, TO_DATE('2021-01-26 00:55:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:03:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('50', '1', '单表(增删改查)', '1', 'infra_codegen_template_type', '0', NULL, NULL, NULL, NULL, TO_DATE('2021-02-05 07:09:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-03-10 16:33:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('51', '2', '树表(增删改查)', '2', 'infra_codegen_template_type', '0', NULL, NULL, NULL, NULL, TO_DATE('2021-02-05 07:14:46', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-03-10 16:33:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('53', '0', '初始化中', '0', 'infra_job_status', '0', 'primary', NULL, NULL, NULL, TO_DATE('2021-02-07 07:46:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:33:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('57', '0', '运行中', '0', 'infra_job_log_status', '0', 'primary', NULL, 'RUNNING', NULL, TO_DATE('2021-02-08 10:04:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:07:48', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('58', '1', '成功', '1', 'infra_job_log_status', '0', 'success', NULL, NULL, NULL, TO_DATE('2021-02-08 10:06:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:07:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('59', '2', '失败', '2', 'infra_job_log_status', '0', 'warning', NULL, '失败', NULL, TO_DATE('2021-02-08 10:07:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 19:07:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('60', '1', '会员', '1', 'user_type', '0', 'primary', NULL, NULL, NULL, TO_DATE('2021-02-26 00:16:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:22:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('61', '2', '管理员', '2', 'user_type', '0', 'success', NULL, NULL, NULL, TO_DATE('2021-02-26 00:16:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:22:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('62', '0', '未处理', '0', 'infra_api_error_log_process_status', '0', 'primary', NULL, NULL, NULL, TO_DATE('2021-02-26 07:07:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:14:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('63', '1', '已处理', '1', 'infra_api_error_log_process_status', '0', 'success', NULL, NULL, NULL, TO_DATE('2021-02-26 07:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:14:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('64', '2', '已忽略', '2', 'infra_api_error_log_process_status', '0', 'danger', NULL, NULL, NULL, TO_DATE('2021-02-26 07:07:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 20:14:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('66', '2', '阿里云', 'ALIYUN', 'system_sms_channel_code', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-04-05 01:05:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:09:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('67', '1', '验证码', '1', 'system_sms_template_type', '0', 'warning', NULL, NULL, '1', TO_DATE('2021-04-05 21:50:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 12:48:30', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('68', '2', '通知', '2', 'system_sms_template_type', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-04-05 21:51:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 12:48:27', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('69', '0', '营销', '3', 'system_sms_template_type', '0', 'danger', NULL, NULL, '1', TO_DATE('2021-04-05 21:51:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 12:48:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('70', '0', '初始化', '0', 'system_sms_send_status', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-04-11 20:18:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:26:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('71', '1', '发送成功', '10', 'system_sms_send_status', '0', 'success', NULL, NULL, '1', TO_DATE('2021-04-11 20:18:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:25:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('72', '2', '发送失败', '20', 'system_sms_send_status', '0', 'danger', NULL, NULL, '1', TO_DATE('2021-04-11 20:18:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:26:03', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('73', '3', '不发送', '30', 'system_sms_send_status', '0', 'info', NULL, NULL, '1', TO_DATE('2021-04-11 20:19:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:26:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('74', '0', '等待结果', '0', 'system_sms_receive_status', '0', 'primary', NULL, NULL, '1', TO_DATE('2021-04-11 20:27:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:28:24', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('75', '1', '接收成功', '10', 'system_sms_receive_status', '0', 'success', NULL, NULL, '1', TO_DATE('2021-04-11 20:29:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:28:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('76', '2', '接收失败', '20', 'system_sms_receive_status', '0', 'danger', NULL, NULL, '1', TO_DATE('2021-04-11 20:29:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:28:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('77', '0', '调试(钉钉)', 'DEBUG_DING_TALK', 'system_sms_channel_code', '0', 'info', NULL, NULL, '1', TO_DATE('2021-04-13 00:20:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 10:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_DATA" ("ID", "SORT", "LABEL", "VALUE", "DICT_TYPE", "STATUS", "COLOR_TYPE", "CSS_CLASS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('78', '1', '自动生成', '1', 'system_error_code_type', '0', 'warning', NULL, NULL, '1', TO_DATE('2021-04-21 00:06:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:57:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_DICT_TYPE --- ---------------------------- -DROP TABLE "SYSTEM_DICT_TYPE"; -CREATE TABLE "SYSTEM_DICT_TYPE"( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(100), - "TYPE" NVARCHAR2(100), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED_TIME" DATE, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."ID" IS '字典主键'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."NAME" IS '字典名称'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."TYPE" IS '字典类型'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."STATUS" IS '状态(0正常 1停用)'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."REMARK" IS '备注'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."CREATOR" IS '创建者'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."CREATE_TIME" IS '创建时间'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."UPDATER" IS '更新者'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."UPDATE_TIME" IS '更新时间'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."DELETED_TIME" IS '删除时间'; -COMMENT -ON COLUMN "SYSTEM_DICT_TYPE"."DELETED" IS '是否删除'; -COMMENT -ON TABLE "SYSTEM_DICT_TYPE" IS '字典类型表'; - --- ---------------------------- --- Records of SYSTEM_DICT_TYPE --- ---------------------------- -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", - "UPDATE_TIME", "DELETED") -VALUES ('1', '用户性别', 'system_user_sex', '0', NULL, 'admin', - TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', - TO_DATE('2022-05-01 12:55:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", - "UPDATE_TIME", "DELETED") -VALUES ('6', '参数类型', 'infra_config_type', '0', NULL, 'admin', - TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, - TO_DATE('2022-02-01 16:36:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", - "UPDATE_TIME", "DELETED") -VALUES ('7', '通知类型', 'system_notice_type', '0', NULL, 'admin', - TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, - TO_DATE('2022-02-01 16:35:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", - "UPDATE_TIME", "DELETED") -VALUES ('9', '操作类型', 'system_operate_type', '0', NULL, 'admin', - TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', - TO_DATE('2022-02-16 09:32:21', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('10', '系统状态', 'common_status', '0', NULL, 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:21:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('11', 'Boolean 是否类型', 'infra_boolean_string', '0', 'boolean 转是否', NULL, TO_DATE('2021-01-19 03:20:08', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:37:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('104', '登陆结果', 'system_login_result', '0', '登陆结果', NULL, TO_DATE('2021-01-18 06:17:11', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:36:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('105', 'Redis 超时类型', 'infra_redis_timeout_type', '0', 'RedisKeyDefine.TimeoutTypeEnum', NULL, TO_DATE('2021-01-26 00:52:50', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:50:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('106', '代码生成模板类型', 'infra_codegen_template_type', '0', NULL, NULL, TO_DATE('2021-02-05 07:08:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-03-10 16:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('107', '定时任务状态', 'infra_job_status', '0', NULL, NULL, TO_DATE('2021-02-07 07:44:16', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:51:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('108', '定时任务日志状态', 'infra_job_log_status', '0', NULL, NULL, TO_DATE('2021-02-08 10:03:51', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:50:43', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('109', '用户类型', 'user_type', '0', NULL, NULL, TO_DATE('2021-02-26 00:15:51', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-02-26 00:15:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('110', 'API 异常数据的处理状态', 'infra_api_error_log_process_status', '0', NULL, NULL, TO_DATE('2021-02-26 07:07:01', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-01 16:50:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('111', '短信渠道编码', 'system_sms_channel_code', '0', NULL, '1', TO_DATE('2021-04-05 01:04:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 02:09:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('112', '短信模板的类型', 'system_sms_template_type', '0', NULL, '1', TO_DATE('2021-04-05 21:50:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-01 16:35:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('113', '短信发送状态', 'system_sms_send_status', '0', NULL, '1', TO_DATE('2021-04-11 20:18:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-01 16:35:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('114', '短信接收状态', 'system_sms_receive_status', '0', NULL, '1', TO_DATE('2021-04-11 20:27:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-01 16:35:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('115', '错误码的类型', 'system_error_code_type', '0', NULL, '1', TO_DATE('2021-04-21 00:06:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-01 16:36:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('116', '登陆日志的类型', 'system_login_type', '0', '登陆日志的类型', '1', TO_DATE('2021-10-06 00:50:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-01 16:35:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('117', 'OA 请假类型', 'bpm_oa_leave_type', '0', NULL, '1', TO_DATE('2021-09-21 22:34:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-22 10:41:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('122', '支付渠道微信版本', 'pay_channel_wechat_version', '0', '支付渠道微信版本', '1', TO_DATE('2021-11-08 17:00:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-08 17:00:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('127', '支付渠道支付宝算法类型', 'pay_channel_alipay_sign_type', '0', '支付渠道支付宝算法类型', '1', TO_DATE('2021-11-18 15:39:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 15:39:09', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('128', '支付渠道支付宝公钥类型', 'pay_channel_alipay_mode', '0', '支付渠道支付宝公钥类型', '1', TO_DATE('2021-11-18 15:44:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 15:44:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('129', '支付宝网关地址', 'pay_channel_alipay_server_type', '0', '支付宝网关地址', '1', TO_DATE('2021-11-18 16:58:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-11-18 17:01:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('130', '支付渠道编码类型', 'pay_channel_code_type', '0', '支付渠道的编码', '1', TO_DATE('2021-12-03 10:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:35:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('131', '支付订单回调状态', 'pay_order_notify_status', '0', '支付订单回调状态', '1', TO_DATE('2021-12-03 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 10:53:29', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('132', '支付订单状态', 'pay_order_status', '0', '支付订单状态', '1', TO_DATE('2021-12-03 11:17:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 11:17:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('133', '支付订单退款状态', 'pay_order_refund_status', '0', '支付订单退款状态', '1', TO_DATE('2021-12-03 11:27:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-03 11:27:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('134', '退款订单状态', 'pay_refund_order_status', '0', '退款订单状态', '1', TO_DATE('2021-12-10 16:42:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-10 16:42:50', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('135', '退款订单类别', 'pay_refund_order_type', '0', '退款订单类别', '1', TO_DATE('2021-12-10 17:14:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-10 17:14:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('138', '流程分类', 'bpm_model_category', '0', '流程分类', '1', TO_DATE('2022-01-02 08:40:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-02 08:40:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('139', '流程实例的状态', 'bpm_process_instance_status', '0', '流程实例的状态', '1', TO_DATE('2022-01-07 23:46:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-07 23:46:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('140', '流程实例的结果', 'bpm_process_instance_result', '0', '流程实例的结果', '1', TO_DATE('2022-01-07 23:48:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-07 23:48:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('141', '流程的表单类型', 'bpm_model_form_type', '0', '流程的表单类型', '103', TO_DATE('2022-01-11 23:50:45', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-11 23:50:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('142', '任务分配规则的类型', 'bpm_task_assign_rule_type', '0', '任务分配规则的类型', '103', TO_DATE('2022-01-12 23:21:04', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-12 15:46:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('143', '任务分配自定义脚本', 'bpm_task_assign_script', '0', '任务分配自定义脚本', '103', TO_DATE('2022-01-15 00:10:35', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-01-15 00:10:35', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('144', '代码生成的场景枚举', 'infra_codegen_scene', '0', '代码生成的场景枚举', '1', TO_DATE('2022-02-02 13:14:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-10 16:33:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('145', '角色类型', 'system_role_type', '0', '角色类型', '1', TO_DATE('2022-02-16 13:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-16 13:01:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_DICT_TYPE" ("ID", "NAME", "TYPE", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('146', '文件存储器', 'infra_file_storage', '0', '文件存储器', '1', TO_DATE('2022-03-15 00:24:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-15 00:24:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_ERROR_CODE --- ---------------------------- -DROP TABLE "SYSTEM_ERROR_CODE"; -CREATE TABLE "SYSTEM_ERROR_CODE" ( - "ID" NUMBER(20,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "APPLICATION_NAME" NVARCHAR2(50), - "CODE" NUMBER(11,0) NOT NULL, - "MESSAGE" NVARCHAR2(512), - "MEMO" NVARCHAR2(512), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."ID" IS '错误码编号'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."TYPE" IS '错误码类型'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."APPLICATION_NAME" IS '应用名'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."CODE" IS '错误码编码'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."MESSAGE" IS '错误码错误提示'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."MEMO" IS '备注'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_ERROR_CODE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_ERROR_CODE" IS '错误码表'; - --- ---------------------------- --- Records of SYSTEM_ERROR_CODE --- ---------------------------- -INSERT INTO "SYSTEM_ERROR_CODE" ("ID", "TYPE", "APPLICATION_NAME", "CODE", "MESSAGE", "MEMO", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('0', '1', 'yudao-server', '1001007000', '数据源配置不存在', NULL, NULL, TO_DATE('2022-05-01 01:08:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-01 01:08:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_ERROR_CODE" ("ID", "TYPE", "APPLICATION_NAME", "CODE", "MESSAGE", "MEMO", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('0', '1', 'yudao-server', '1009000002', '获取高亮流程图异常', NULL, NULL, TO_DATE('2022-05-13 01:26:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-13 01:26:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_LOGIN_LOG --- ---------------------------- -DROP TABLE "SYSTEM_LOGIN_LOG"; -CREATE TABLE "SYSTEM_LOGIN_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "LOG_TYPE" NUMBER(20,0) NOT NULL, - "TRACE_ID" NVARCHAR2(64), - "USER_ID" NUMBER(20,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "USERNAME" NVARCHAR2(50), - "RESULT" NUMBER(4,0) NOT NULL, - "USER_IP" NVARCHAR2(50), - "USER_AGENT" NVARCHAR2(512), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."ID" IS '访问ID'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."LOG_TYPE" IS '日志类型'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."TRACE_ID" IS '链路追踪编号'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."USERNAME" IS '用户账号'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."RESULT" IS '登陆结果'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."USER_AGENT" IS '浏览器 UA'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_LOGIN_LOG"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_LOGIN_LOG" IS '系统访问记录'; - --- ---------------------------- --- Records of SYSTEM_LOGIN_LOG --- ---------------------------- -INSERT INTO "SYSTEM_LOGIN_LOG" ("ID", "LOG_TYPE", "TRACE_ID", "USER_ID", "USER_TYPE", "USERNAME", "RESULT", "USER_IP", "USER_AGENT", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', '100', NULL, '1', '2', 'admin', '0', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36', NULL, TO_DATE('2022-05-13 01:27:36', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-13 01:27:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_MENU --- ---------------------------- -DROP TABLE "SYSTEM_MENU"; -CREATE TABLE "SYSTEM_MENU" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(50) NOT NULL, - "PERMISSION" NVARCHAR2(100), - "TYPE" NUMBER(6,0) NOT NULL, - "SORT" NUMBER(11,0) NOT NULL, - "PARENT_ID" NUMBER(20,0) NOT NULL, - "PATH" NVARCHAR2(200), - "ICON" NVARCHAR2(100), - "COMPONENT" NVARCHAR2(255), - "STATUS" NUMBER(6,0) NOT NULL, - "VISIBLE" NVARCHAR2(4) NOT NULL, - "KEEP_ALIVE" NVARCHAR2(4) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(6,0) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_MENU"."ID" IS '菜单ID'; -COMMENT ON COLUMN "SYSTEM_MENU"."NAME" IS '菜单名称'; -COMMENT ON COLUMN "SYSTEM_MENU"."PERMISSION" IS '权限标识'; -COMMENT ON COLUMN "SYSTEM_MENU"."TYPE" IS '菜单类型'; -COMMENT ON COLUMN "SYSTEM_MENU"."SORT" IS '显示顺序'; -COMMENT ON COLUMN "SYSTEM_MENU"."PARENT_ID" IS '父菜单ID'; -COMMENT ON COLUMN "SYSTEM_MENU"."PATH" IS '路由地址'; -COMMENT ON COLUMN "SYSTEM_MENU"."ICON" IS '菜单图标'; -COMMENT ON COLUMN "SYSTEM_MENU"."COMPONENT" IS '组件路径'; -COMMENT ON COLUMN "SYSTEM_MENU"."STATUS" IS '菜单状态'; -COMMENT ON COLUMN "SYSTEM_MENU"."VISIBLE" IS '是否可见'; -COMMENT ON COLUMN "SYSTEM_MENU"."KEEP_ALIVE" IS '是否缓存'; -COMMENT ON COLUMN "SYSTEM_MENU"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_MENU"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_MENU"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_MENU"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_MENU"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_MENU" IS '菜单权限表'; - --- ---------------------------- --- Records of SYSTEM_MENU --- ---------------------------- -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', '系统管理', NULL, '1', '10', '0', '/system', 'system', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', '基础设施', NULL, '1', '20', '0', '/infra', 'monitor', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('5', 'OA 示例', NULL, '1', '40', '1185', 'oa', 'people', NULL, '0', '1', '1', 'admin', TO_DATE('2021-09-20 16:26:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('100', '用户管理', 'system:user:list', '2', '1', '1', 'user', 'user', 'system/user/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('101', '角色管理', NULL, '2', '2', '1', 'role', 'peoples', 'system/role/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('102', '菜单管理', NULL, '2', '3', '1', 'menu', 'tree-table', 'system/menu/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('103', '部门管理', NULL, '2', '4', '1', 'dept', 'tree', 'system/dept/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('104', '岗位管理', NULL, '2', '5', '1', 'post', 'post', 'system/post/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('105', '字典管理', NULL, '2', '6', '1', 'dict', 'dict', 'system/dict/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('106', '配置管理', NULL, '2', '6', '2', 'config', 'edit', 'infra/config/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('107', '通知公告', NULL, '2', '8', '1', 'notice', 'message', 'system/notice/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('108', '审计日志', NULL, '1', '9', '1', 'log', 'log', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('109', '令牌管理', NULL, '2', '2', '1261', 'token', 'online', 'system/oauth2/token/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 23:31:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('110', '定时任务', NULL, '2', '12', '2', 'job', 'job', 'infra/job/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('111', 'MySQL 监控', NULL, '2', '9', '2', 'druid', 'druid', 'infra/druid/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('112', 'Java 监控', NULL, '2', '11', '2', 'admin-server', 'server', 'infra/server/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('113', 'Redis 监控', NULL, '2', '10', '2', 'redis', 'redis', 'infra/redis/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('114', '表单构建', 'infra:build:list', '2', '2', '2', 'build', 'build', 'infra/build/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('115', '代码生成', 'infra:codegen:query', '2', '1', '2', 'codegen', 'code', 'infra/codegen/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('116', '系统接口', 'infra:swagger:list', '2', '3', '2', 'swagger', 'swagger', 'infra/swagger/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('500', '操作日志', NULL, '2', '1', '108', 'operate-log', 'form', 'system/operatelog/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('501', '登录日志', NULL, '2', '2', '108', 'login-log', 'logininfor', 'system/loginlog/index', '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1001', '用户查询', 'system:user:query', '3', '1', '100', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1002', '用户新增', 'system:user:create', '3', '2', '100', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1003', '用户修改', 'system:user:update', '3', '3', '100', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1004', '用户删除', 'system:user:delete', '3', '4', '100', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1005', '用户导出', 'system:user:export', '3', '5', '100', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1006', '用户导入', 'system:user:import', '3', '6', '100', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1007', '重置密码', 'system:user:update-password', '3', '7', '100', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1008', '角色查询', 'system:role:query', '3', '1', '101', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1009', '角色新增', 'system:role:create', '3', '2', '101', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1010', '角色修改', 'system:role:update', '3', '3', '101', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1011', '角色删除', 'system:role:delete', '3', '4', '101', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1012', '角色导出', 'system:role:export', '3', '5', '101', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1013', '菜单查询', 'system:menu:query', '3', '1', '102', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1014', '菜单新增', 'system:menu:create', '3', '2', '102', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1015', '菜单修改', 'system:menu:update', '3', '3', '102', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1016', '菜单删除', 'system:menu:delete', '3', '4', '102', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1017', '部门查询', 'system:dept:query', '3', '1', '103', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1018', '部门新增', 'system:dept:create', '3', '2', '103', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1019', '部门修改', 'system:dept:update', '3', '3', '103', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1020', '部门删除', 'system:dept:delete', '3', '4', '103', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1021', '岗位查询', 'system:post:query', '3', '1', '104', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1022', '岗位新增', 'system:post:create', '3', '2', '104', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1023', '岗位修改', 'system:post:update', '3', '3', '104', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1024', '岗位删除', 'system:post:delete', '3', '4', '104', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1025', '岗位导出', 'system:post:export', '3', '5', '104', NULL, '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1026', '字典查询', 'system:dict:query', '3', '1', '105', '#', '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1027', '字典新增', 'system:dict:create', '3', '2', '105', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1028', '字典修改', 'system:dict:update', '3', '3', '105', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1029', '字典删除', 'system:dict:delete', '3', '4', '105', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1030', '字典导出', 'system:dict:export', '3', '5', '105', '#', '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1031', '配置查询', 'infra:config:query', '3', '1', '106', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1032', '配置新增', 'infra:config:create', '3', '2', '106', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1033', '配置修改', 'infra:config:update', '3', '3', '106', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1034', '配置删除', 'infra:config:delete', '3', '4', '106', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1035', '配置导出', 'infra:config:export', '3', '5', '106', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1036', '公告查询', 'system:notice:query', '3', '1', '107', '#', '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1037', '公告新增', 'system:notice:create', '3', '2', '107', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1038', '公告修改', 'system:notice:update', '3', '3', '107', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1039', '公告删除', 'system:notice:delete', '3', '4', '107', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1040', '操作查询', 'system:operate-log:query', '3', '1', '500', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1042', '日志导出', 'system:operate-log:export', '3', '2', '500', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1043', '登录查询', 'system:login-log:query', '3', '1', '501', '#', '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1045', '日志导出', 'system:login-log:export', '3', '3', '501', '#', '#', NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1046', '令牌列表', 'system:oauth2-token:page', '3', '1', '109', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-09 23:54:42', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1048', '令牌删除', 'system:oauth2-token:delete', '3', '2', '109', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-09 23:54:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1050', '任务新增', 'infra:job:create', '3', '2', '110', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1051', '任务修改', 'infra:job:update', '3', '3', '110', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1052', '任务删除', 'infra:job:delete', '3', '4', '110', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1053', '状态修改', 'infra:job:update', '3', '5', '110', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1054', '任务导出', 'infra:job:export', '3', '7', '110', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1056', '生成修改', 'infra:codegen:update', '3', '2', '115', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1057', '生成删除', 'infra:codegen:delete', '3', '3', '115', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1058', '导入代码', 'infra:codegen:create', '3', '2', '115', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1059', '预览代码', 'infra:codegen:preview', '3', '4', '115', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1060', '生成代码', 'infra:codegen:download', '3', '5', '115', NULL, NULL, NULL, '0', '1', '1', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1063', '设置角色菜单权限', 'system:permission:assign-role-menu', '3', '6', '101', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-01-06 17:53:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1064', '设置角色数据权限', 'system:permission:assign-role-data-scope', '3', '7', '101', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-01-06 17:56:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1065', '设置用户角色', 'system:permission:assign-user-role', '3', '8', '101', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-01-07 10:23:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1066', '获得 Redis 监控信息', 'infra:redis:get-monitor-info', '3', '1', '113', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-01-26 01:02:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1067', '获得 Redis Key 列表', 'infra:redis:get-key-list', '3', '2', '113', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-01-26 01:02:52', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1070', '代码生成示例', 'infra:test-demo:query', '2', '1', '2', 'test-demo', 'validCode', 'infra/testDemo/index', '0', '1', '1', NULL, TO_DATE('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1071', '测试示例表创建', 'infra:test-demo:create', '3', '1', '1070', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1072', '测试示例表更新', 'infra:test-demo:update', '3', '2', '1070', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1073', '测试示例表删除', 'infra:test-demo:delete', '3', '3', '1070', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1074', '测试示例表导出', 'infra:test-demo:export', '3', '4', '1070', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-06 12:42:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1075', '任务触发', 'infra:job:trigger', '3', '8', '110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-07 13:03:10', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1076', '数据库文档', NULL, '2', '4', '2', 'db-doc', 'table', 'infra/dbDoc/index', '0', '1', '1', NULL, TO_DATE('2021-02-08 01:41:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1077', '监控平台', NULL, '2', '13', '2', 'skywalking', 'eye-open', 'infra/skywalking/index', '0', '1', '1', NULL, TO_DATE('2021-02-08 20:41:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1078', '访问日志', NULL, '2', '1', '1083', 'api-access-log', 'log', 'infra/apiAccessLog/index', '0', '1', '1', NULL, TO_DATE('2021-02-26 01:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1082', '日志导出', 'infra:api-access-log:export', '3', '2', '1078', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-26 01:32:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1083', 'API 日志', NULL, '2', '8', '2', 'log', 'log', NULL, '0', '1', '1', NULL, TO_DATE('2021-02-26 02:18:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1084', '错误日志', 'infra:api-error-log:query', '2', '2', '1083', 'api-error-log', 'log', 'infra/apiErrorLog/index', '0', '1', '1', NULL, TO_DATE('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1085', '日志处理', 'infra:api-error-log:update-status', '3', '2', '1084', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1086', '日志导出', 'infra:api-error-log:export', '3', '3', '1084', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-02-26 07:53:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1087', '任务查询', 'infra:job:query', '3', '1', '110', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-03-10 01:26:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1088', '日志查询', 'infra:api-access-log:query', '3', '1', '1078', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-03-10 01:28:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1089', '日志查询', 'infra:api-error-log:query', '3', '1', '1084', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-03-10 01:29:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1090', '文件列表', NULL, '2', '5', '1243', 'file', 'upload', 'infra/file/index', '0', '1', '1', NULL, TO_DATE('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1091', '文件查询', 'infra:file:query', '3', '1', '1090', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1092', '文件删除', 'infra:file:delete', '3', '4', '1090', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-03-12 20:16:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1093', '短信管理', NULL, '1', '11', '1', 'sms', 'validCode', NULL, '0', '1', '1', '1', TO_DATE('2021-04-05 01:10:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1094', '短信渠道', NULL, '2', '0', '1093', 'sms-channel', 'phone', 'system/sms/smsChannel', '0', '1', '1', NULL, TO_DATE('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1095', '短信渠道查询', 'system:sms-channel:query', '3', '1', '1094', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1096', '短信渠道创建', 'system:sms-channel:create', '3', '2', '1094', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1097', '短信渠道更新', 'system:sms-channel:update', '3', '3', '1094', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1098', '短信渠道删除', 'system:sms-channel:delete', '3', '4', '1094', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 11:07:15', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1100', '短信模板', NULL, '2', '1', '1093', 'sms-template', 'phone', 'system/sms/smsTemplate', '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1101', '短信模板查询', 'system:sms-template:query', '3', '1', '1100', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1102', '短信模板创建', 'system:sms-template:create', '3', '2', '1100', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1103', '短信模板更新', 'system:sms-template:update', '3', '3', '1100', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1104', '短信模板删除', 'system:sms-template:delete', '3', '4', '1100', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1105', '短信模板导出', 'system:sms-template:export', '3', '5', '1100', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-01 17:35:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1106', '发送测试短信', 'system:sms-template:send-sms', '3', '6', '1100', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-04-11 00:26:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1107', '短信日志', NULL, '2', '2', '1093', 'sms-log', 'phone', 'system/sms/smsLog', '0', '1', '1', NULL, TO_DATE('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1108', '短信日志查询', 'system:sms-log:query', '3', '1', '1107', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1109', '短信日志导出', 'system:sms-log:export', '3', '5', '1107', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-11 08:37:05', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1110', '错误码管理', NULL, '2', '12', '1', 'error-code', 'code', 'system/errorCode/index', '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1111', '错误码查询', 'system:error-code:query', '3', '1', '1110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1112', '错误码创建', 'system:error-code:create', '3', '2', '1110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1113', '错误码更新', 'system:error-code:update', '3', '3', '1110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1114', '错误码删除', 'system:error-code:delete', '3', '4', '1110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1115', '错误码导出', 'system:error-code:export', '3', '5', '1110', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-04-13 21:46:42', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1117', '支付管理', NULL, '1', '11', '0', '/pay', 'money', NULL, '0', '1', '1', '1', TO_DATE('2021-12-25 16:43:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1118', '请假查询', NULL, '2', '0', '5', 'leave', 'user', 'bpm/oa/leave/index', '0', '1', '1', NULL, TO_DATE('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1119', '请假申请查询', 'bpm:oa-leave:query', '3', '1', '1118', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1120', '请假申请创建', 'bpm:oa-leave:create', '3', '2', '1118', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-09-20 08:51:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1126', '应用信息', NULL, '2', '1', '1117', 'app', 'table', 'pay/app/index', '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1127', '支付应用信息查询', 'pay:app:query', '3', '1', '1126', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1128', '支付应用信息创建', 'pay:app:create', '3', '2', '1126', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1129', '支付应用信息更新', 'pay:app:update', '3', '3', '1126', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1130', '支付应用信息删除', 'pay:app:delete', '3', '4', '1126', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1131', '支付应用信息导出', 'pay:app:export', '3', '5', '1126', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:31', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1132', '秘钥解析', 'pay:channel:parsing', '3', '6', '1129', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-11-08 15:15:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1133', '支付商户信息查询', 'pay:merchant:query', '3', '1', '1132', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1134', '支付商户信息创建', 'pay:merchant:create', '3', '2', '1132', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1135', '支付商户信息更新', 'pay:merchant:update', '3', '3', '1132', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1136', '支付商户信息删除', 'pay:merchant:delete', '3', '4', '1132', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1137', '支付商户信息导出', 'pay:merchant:export', '3', '5', '1132', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-11-10 01:13:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1138', '租户列表', NULL, '2', '0', '1224', 'list', 'peoples', 'system/tenant/index', '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1139', '租户查询', 'system:tenant:query', '3', '1', '1138', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1140', '租户创建', 'system:tenant:create', '3', '2', '1138', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1141', '租户更新', 'system:tenant:update', '3', '3', '1138', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1142', '租户删除', 'system:tenant:delete', '3', '4', '1138', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1143', '租户导出', 'system:tenant:export', '3', '5', '1138', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-14 12:31:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1150', '秘钥解析', NULL, '3', '6', '1129', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2021-11-08 15:15:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1161', '退款订单', NULL, '2', '3', '1117', 'refund', 'order', 'pay/refund/index', '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1162', '退款订单查询', 'pay:refund:query', '3', '1', '1161', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1163', '退款订单创建', 'pay:refund:create', '3', '2', '1161', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1164', '退款订单更新', 'pay:refund:update', '3', '3', '1161', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1165', '退款订单删除', 'pay:refund:delete', '3', '4', '1161', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1166', '退款订单导出', 'pay:refund:export', '3', '5', '1161', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:29:07', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1173', '支付订单', NULL, '2', '2', '1117', 'order', 'pay', 'pay/order/index', '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1174', '支付订单查询', 'pay:order:query', '3', '1', '1173', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1175', '支付订单创建', 'pay:order:create', '3', '2', '1173', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1176', '支付订单更新', 'pay:order:update', '3', '3', '1173', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1177', '支付订单删除', 'pay:order:delete', '3', '4', '1173', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1178', '支付订单导出', 'pay:order:export', '3', '5', '1173', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 08:49:43', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1179', '商户信息', NULL, '2', '0', '1117', 'merchant', 'merchant', 'pay/merchant/index', '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1180', '支付商户信息查询', 'pay:merchant:query', '3', '1', '1179', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1181', '支付商户信息创建', 'pay:merchant:create', '3', '2', '1179', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1182', '支付商户信息更新', 'pay:merchant:update', '3', '3', '1179', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1183', '支付商户信息删除', NULL, '3', '4', '1179', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1184', '支付商户信息导出', 'pay:merchant:export', '3', '5', '1179', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-25 09:01:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1185', '工作流程', NULL, '1', '50', '0', '/bpm', 'tool', NULL, '0', '1', '1', '1', TO_DATE('2021-12-30 20:26:36', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1186', '流程管理', NULL, '1', '10', '1185', 'manager', 'nested', NULL, '0', '1', '1', '1', TO_DATE('2021-12-30 20:28:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1187', '流程表单', NULL, '2', '0', '1186', 'form', 'form', 'bpm/form/index', '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1188', '表单查询', 'bpm:form:query', '3', '1', '1187', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1189', '表单创建', 'bpm:form:create', '3', '2', '1187', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1190', '表单更新', 'bpm:form:update', '3', '3', '1187', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1191', '表单删除', 'bpm:form:delete', '3', '4', '1187', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1192', '表单导出', 'bpm:form:export', '3', '5', '1187', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2021-12-30 12:38:22', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1193', '流程模型', NULL, '2', '5', '1186', 'model', 'guide', 'bpm/model/index', '0', '1', '1', '1', TO_DATE('2021-12-31 23:24:58', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1194', '模型查询', 'bpm:model:query', '3', '1', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:01:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1195', '模型创建', 'bpm:model:create', '3', '2', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:01:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1196', '模型导入', 'bpm:model:import', '3', '3', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:01:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1197', '模型更新', 'bpm:model:update', '3', '4', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:02:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1198', '模型删除', 'bpm:model:delete', '3', '5', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:02:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1199', '模型发布', 'bpm:model:deploy', '3', '6', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-03 19:03:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1200', '任务管理', NULL, '1', '20', '1185', 'task', 'cascader', NULL, '0', '1', '1', '1', TO_DATE('2022-01-07 23:51:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1201', '我的流程', NULL, '2', '0', '1200', 'my', 'people', 'bpm/processInstance/index', '0', '1', '1', NULL, TO_DATE('2022-01-07 15:53:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1202', '流程实例的查询', 'bpm:process-instance:query', '3', '1', '1201', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-01-07 15:53:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1207', '待办任务', NULL, '2', '10', '1200', 'todo', 'eye-open', 'bpm/task/todo', '0', '1', '1', '1', TO_DATE('2022-01-08 10:33:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1208', '已办任务', NULL, '2', '20', '1200', 'done', 'eye', 'bpm/task/done', '0', '1', '1', '1', TO_DATE('2022-01-08 10:34:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1209', '用户分组', NULL, '2', '2', '1186', 'user-group', 'people', 'bpm/group/index', '0', '1', '1', NULL, TO_DATE('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), '103', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1210', '用户组查询', 'bpm:user-group:query', '3', '1', '1209', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1211', '用户组创建', 'bpm:user-group:create', '3', '2', '1209', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1212', '用户组更新', 'bpm:user-group:update', '3', '3', '1209', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1213', '用户组删除', 'bpm:user-group:delete', '3', '4', '1209', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-01-14 02:14:20', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1215', '流程定义查询', 'bpm:process-definition:query', '3', '10', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:21:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1216', '流程任务分配规则查询', 'bpm:task-assign-rule:query', '3', '20', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:26:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1217', '流程任务分配规则创建', 'bpm:task-assign-rule:create', '3', '21', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:28:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1218', '流程任务分配规则更新', 'bpm:task-assign-rule:update', '3', '22', '1193', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:28:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1219', '流程实例的创建', 'bpm:process-instance:create', '3', '2', '1201', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:36:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1220', '流程实例的取消', 'bpm:process-instance:cancel', '3', '3', '1201', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:36:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1221', '流程任务的查询', 'bpm:task:query', '3', '1', '1207', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:38:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1222', '流程任务的更新', 'bpm:task:update', '3', '2', '1207', NULL, NULL, NULL, '0', '1', '1', '1', TO_DATE('2022-01-23 00:39:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1224', '租户管理', NULL, '2', '0', '1', 'tenant', 'peoples', NULL, '0', '1', '1', '1', TO_DATE('2022-02-20 01:41:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1225', '租户套餐', NULL, '2', '0', '1224', 'package', 'eye', 'system/tenantPackage/index', '0', '1', '1', NULL, TO_DATE('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-21 01:21:25', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1226', '租户套餐查询', 'system:tenant-package:query', '3', '1', '1225', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1227', '租户套餐创建', 'system:tenant-package:create', '3', '2', '1225', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1228', '租户套餐更新', 'system:tenant-package:update', '3', '3', '1225', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1229', '租户套餐删除', 'system:tenant-package:delete', '3', '4', '1225', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-02-19 17:44:06', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1237', '文件配置', NULL, '2', '0', '1243', 'file-config', 'config', 'infra/fileConfig/index', '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1238', '文件配置查询', 'infra:file-config:query', '3', '1', '1237', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1239', '文件配置创建', 'infra:file-config:create', '3', '2', '1237', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1240', '文件配置更新', 'infra:file-config:update', '3', '3', '1237', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1241', '文件配置删除', 'infra:file-config:delete', '3', '4', '1237', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1242', '文件配置导出', 'infra:file-config:export', '3', '5', '1237', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-03-15 14:35:28', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1243', '文件管理', NULL, '2', '5', '2', 'file', 'download', NULL, '0', '1', '1', '1', TO_DATE('2022-03-16 23:47:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1247', '敏感词管理', NULL, '2', '13', '1', 'sensitive-word', 'education', 'system/sensitiveWord/index', '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1248', '敏感词查询', 'system:sensitive-word:query', '3', '1', '1247', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1249', '敏感词创建', 'system:sensitive-word:create', '3', '2', '1247', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1250', '敏感词更新', 'system:sensitive-word:update', '3', '3', '1247', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1251', '敏感词删除', 'system:sensitive-word:delete', '3', '4', '1247', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1252', '敏感词导出', 'system:sensitive-word:export', '3', '5', '1247', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-07 16:55:03', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-20 17:03:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1254', '作者动态', NULL, '1', '0', '0', 'https://www.iocoder.cn', 'people', NULL, '0', '1', '1', '1', TO_DATE('2022-04-23 01:03:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1255', '数据源配置', NULL, '2', '1', '2', 'data-source-config', 'rate', 'infra/dataSourceConfig/index', '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-27 22:42:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1256', '数据源配置查询', 'infra:data-source-config:query', '3', '1', '1255', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1257', '数据源配置创建', 'infra:data-source-config:create', '3', '2', '1255', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1258', '数据源配置更新', 'infra:data-source-config:update', '3', '3', '1255', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1259', '数据源配置删除', 'infra:data-source-config:delete', '3', '4', '1255', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1260', '数据源配置导出', 'infra:data-source-config:export', '3', '5', '1255', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-04-27 14:37:32', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1261', 'OAuth 2.0', NULL, '1', '10', '1', 'oauth2', 'people', NULL, '0', '1', '1', '1', TO_DATE('2022-05-09 23:38:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 18:11:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1263', '应用管理', NULL, '2', '0', '1261', 'oauth2/application', 'tool', 'system/oauth2/client/index', '0', '1', '1', NULL, TO_DATE('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 23:31:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1264', '客户端查询', 'system:oauth2-client:query', '3', '1', '1263', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 00:31:06', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1265', '客户端创建', 'system:oauth2-client:create', '3', '2', '1263', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 00:31:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1266', '客户端更新', 'system:oauth2-client:update', '3', '3', '1263', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 00:31:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_MENU" ("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", "COMPONENT", "STATUS", "VISIBLE", "KEEP_ALIVE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1267', '客户端删除', 'system:oauth2-client:delete', '3', '4', '1263', NULL, NULL, NULL, '0', '1', '1', NULL, TO_DATE('2022-05-10 16:26:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-11 00:31:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_NOTICE --- ---------------------------- -DROP TABLE "SYSTEM_NOTICE"; -CREATE TABLE "SYSTEM_NOTICE" ( - "ID" NUMBER(20,0) NOT NULL, - "TITLE" NVARCHAR2(50), - "CONTENT" NCLOB NOT NULL, - "NOTICE_TYPE" NUMBER(4,0) NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_NOTICE"."ID" IS '公告ID'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."TITLE" IS '公告标题'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."CONTENT" IS '公告内容'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."NOTICE_TYPE" IS '公告类型(1通知 2公告)'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."STATUS" IS '公告状态(0正常 1关闭)'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_NOTICE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_NOTICE" IS '通知公告表'; - --- ---------------------------- --- Records of SYSTEM_NOTICE --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OAUTH2_ACCESS_TOKEN --- ---------------------------- -DROP TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN"; -CREATE TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "ACCESS_TOKEN" NVARCHAR2(255) NOT NULL, - "REFRESH_TOKEN" NVARCHAR2(32) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "CLIENT_ID" NVARCHAR2(255) NOT NULL, - "EXPIRES_TIME" DATE NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "SCOPES" NVARCHAR2(255) DEFAULT '' -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."ACCESS_TOKEN" IS '访问令牌'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."REFRESH_TOKEN" IS '刷新令牌'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."CLIENT_ID" IS '客户端编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."EXPIRES_TIME" IS '过期时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_ACCESS_TOKEN"."SCOPES" IS '授权范围'; -COMMENT ON TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" IS '刷新令牌'; - --- ---------------------------- --- Records of SYSTEM_OAUTH2_ACCESS_TOKEN --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OAUTH2_APPROVE --- ---------------------------- -DROP TABLE "SYSTEM_OAUTH2_APPROVE"; -CREATE TABLE "SYSTEM_OAUTH2_APPROVE" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "CLIENT_ID" NVARCHAR2(255) NOT NULL, - "SCOPE" NVARCHAR2(255) NOT NULL, - "APPROVED" VARCHAR2(1 BYTE) NOT NULL, - "EXPIRES_TIME" DATE NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."CLIENT_ID" IS '客户端编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."SCOPE" IS '授权范围'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."APPROVED" IS '是否接受'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."EXPIRES_TIME" IS '过期时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_APPROVE"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "SYSTEM_OAUTH2_APPROVE" IS 'OAuth2 批准表'; - --- ---------------------------- --- Records of SYSTEM_OAUTH2_APPROVE --- ---------------------------- -INSERT INTO "SYSTEM_OAUTH2_APPROVE" ("ID", "USER_ID", "USER_TYPE", "CLIENT_ID", "SCOPE", "APPROVED", "EXPIRES_TIME", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('42', '1', '2', 'default', 'user.write', '1', TO_DATE('2022-06-25 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:35:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -INSERT INTO "SYSTEM_OAUTH2_APPROVE" ("ID", "USER_ID", "USER_TYPE", "CLIENT_ID", "SCOPE", "APPROVED", "EXPIRES_TIME", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('43', '1', '2', 'default', 'user.read', '1', TO_DATE('2022-06-25 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:35:06', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OAUTH2_CLIENT --- ---------------------------- -DROP TABLE "SYSTEM_OAUTH2_CLIENT"; -CREATE TABLE "SYSTEM_OAUTH2_CLIENT" ( - "ID" NUMBER(20,0) NOT NULL, - "CLIENT_ID" NVARCHAR2(255) NOT NULL, - "SECRET" NVARCHAR2(255) NOT NULL, - "NAME" NVARCHAR2(255) NOT NULL, - "LOGO" NVARCHAR2(255) NOT NULL, - "DESCRIPTION" NVARCHAR2(255), - "STATUS" NUMBER(4,0) NOT NULL, - "ACCESS_TOKEN_VALIDITY_SECONDS" NUMBER(11,0) NOT NULL, - "REFRESH_TOKEN_VALIDITY_SECONDS" NUMBER(11,0) NOT NULL, - "REDIRECT_URIS" NVARCHAR2(255) NOT NULL, - "AUTO_APPROVE_SCOPES" VARCHAR2(255 BYTE) DEFAULT '', - "AUTHORIZED_GRANT_TYPES" NVARCHAR2(255) NOT NULL, - "SCOPES" NVARCHAR2(255) DEFAULT '', - "AUTHORITIES" NVARCHAR2(255), - "RESOURCE_IDS" NVARCHAR2(255), - "ADDITIONAL_INFORMATION" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."CLIENT_ID" IS '客户端编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."SECRET" IS '客户端密钥'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."NAME" IS '应用名'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."LOGO" IS '应用图标'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."DESCRIPTION" IS '应用描述'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."STATUS" IS '状态'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."ACCESS_TOKEN_VALIDITY_SECONDS" IS '访问令牌的有效期'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."REFRESH_TOKEN_VALIDITY_SECONDS" IS '刷新令牌的有效期'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."REDIRECT_URIS" IS '可重定向的 URI 地址'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."AUTO_APPROVE_SCOPES" IS '自动通过的授权范围'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."AUTHORIZED_GRANT_TYPES" IS '授权类型'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."SCOPES" IS '授权范围'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."AUTHORITIES" IS '权限'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."RESOURCE_IDS" IS '资源'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."ADDITIONAL_INFORMATION" IS '附加信息'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CLIENT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_OAUTH2_CLIENT" IS 'OAuth2 客户端表'; - --- ---------------------------- --- Records of SYSTEM_OAUTH2_CLIENT --- ---------------------------- -INSERT INTO "SYSTEM_OAUTH2_CLIENT" ("ID", "CLIENT_ID", "SECRET", "NAME", "LOGO", "DESCRIPTION", "STATUS", "ACCESS_TOKEN_VALIDITY_SECONDS", "REFRESH_TOKEN_VALIDITY_SECONDS", "REDIRECT_URIS", "AUTO_APPROVE_SCOPES", "AUTHORIZED_GRANT_TYPES", "SCOPES", "AUTHORITIES", "RESOURCE_IDS", "ADDITIONAL_INFORMATION", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', '0', '180', '8640', '["https://www.iocoder.cn","https://doc.iocoder.cn"]', NULL, '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '["system:user:query"]', '[]', '{}', '1', TO_DATE('2022-05-11 21:47:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 01:00:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_OAUTH2_CLIENT" ("ID", "CLIENT_ID", "SECRET", "NAME", "LOGO", "DESCRIPTION", "STATUS", "ACCESS_TOKEN_VALIDITY_SECONDS", "REFRESH_TOKEN_VALIDITY_SECONDS", "REDIRECT_URIS", "AUTO_APPROVE_SCOPES", "AUTHORIZED_GRANT_TYPES", "SCOPES", "AUTHORITIES", "RESOURCE_IDS", "ADDITIONAL_INFORMATION", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('40', 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', NULL, '0', '1800', '43200', '["https://www.iocoder.cn"]', '[]', '["password","authorization_code","implicit"]', '[]', '[]', '[]', '{}', '1', TO_DATE('2022-05-12 00:28:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:30:33', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OAUTH2_CODE --- ---------------------------- -DROP TABLE "SYSTEM_OAUTH2_CODE"; -CREATE TABLE "SYSTEM_OAUTH2_CODE" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "CODE" NVARCHAR2(32) NOT NULL, - "CLIENT_ID" NVARCHAR2(255) NOT NULL, - "SCOPES" NVARCHAR2(255), - "EXPIRES_TIME" DATE NOT NULL, - "REDIRECT_URI" NVARCHAR2(255), - "STATE" NVARCHAR2(255) DEFAULT '', - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."CODE" IS '授权码'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."CLIENT_ID" IS '客户端编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."SCOPES" IS '授权范围'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."EXPIRES_TIME" IS '过期时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."REDIRECT_URI" IS '可重定向的 URI 地址'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."STATE" IS '状态'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_CODE"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "SYSTEM_OAUTH2_CODE" IS 'OAuth2 授权码表'; - --- ---------------------------- --- Records of SYSTEM_OAUTH2_CODE --- ---------------------------- -INSERT INTO "SYSTEM_OAUTH2_CODE" ("ID", "USER_ID", "USER_TYPE", "CODE", "CLIENT_ID", "SCOPES", "EXPIRES_TIME", "REDIRECT_URI", "STATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('3', '1', '2', 'b882271c7082496e889e8e1a798f1ca2', 'default', '["user.write"]', TO_DATE('2022-05-26 00:41:41', 'SYYYY-MM-DD HH24:MI:SS'), 'https://www.iocoder.cn', NULL, '1', TO_DATE('2022-05-26 00:36:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:36:41', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -INSERT INTO "SYSTEM_OAUTH2_CODE" ("ID", "USER_ID", "USER_TYPE", "CODE", "CLIENT_ID", "SCOPES", "EXPIRES_TIME", "REDIRECT_URI", "STATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('4', '1', '2', '69f7969f221c41e8a5a7887daad9d14e', 'default', '["user.write","user.read"]', TO_DATE('2022-05-26 00:41:50', 'SYYYY-MM-DD HH24:MI:SS'), 'https://www.iocoder.cn', NULL, '1', TO_DATE('2022-05-26 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:36:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -INSERT INTO "SYSTEM_OAUTH2_CODE" ("ID", "USER_ID", "USER_TYPE", "CODE", "CLIENT_ID", "SCOPES", "EXPIRES_TIME", "REDIRECT_URI", "STATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('5', '1', '2', 'b624454a2fd1447f95849629cf3079a1', 'default', '["user.read","user.write"]', TO_DATE('2022-05-26 00:41:52', 'SYYYY-MM-DD HH24:MI:SS'), 'https://www.iocoder.cn', NULL, '1', TO_DATE('2022-05-26 00:36:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-26 00:36:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OAUTH2_REFRESH_TOKEN --- ---------------------------- -DROP TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN"; -CREATE TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "REFRESH_TOKEN" NVARCHAR2(32) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "CLIENT_ID" NVARCHAR2(255) NOT NULL, - "EXPIRES_TIME" DATE NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER DEFAULT 0 NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "SCOPES" NVARCHAR2(255) DEFAULT '' -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."REFRESH_TOKEN" IS '刷新令牌'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."CLIENT_ID" IS '客户端编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."EXPIRES_TIME" IS '过期时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_OAUTH2_REFRESH_TOKEN"."SCOPES" IS '授权范围'; -COMMENT ON TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" IS '刷新令牌'; - --- ---------------------------- --- Records of SYSTEM_OAUTH2_REFRESH_TOKEN --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_OPERATE_LOG --- ---------------------------- -DROP TABLE "SYSTEM_OPERATE_LOG"; -CREATE TABLE "SYSTEM_OPERATE_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "TRACE_ID" NVARCHAR2(64), - "USER_ID" NUMBER(20,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "MODULE" NVARCHAR2(50), - "NAME" NVARCHAR2(50), - "TYPE" NUMBER(20,0) NOT NULL, - "CONTENT" NCLOB, - "EXTS" NVARCHAR2(512), - "REQUEST_METHOD" NVARCHAR2(16), - "REQUEST_URL" NVARCHAR2(255), - "USER_IP" NVARCHAR2(50), - "USER_AGENT" NVARCHAR2(200), - "JAVA_METHOD" NVARCHAR2(512), - "JAVA_METHOD_ARGS" NCLOB, - "START_TIME" DATE NOT NULL, - "DURATION" NUMBER(11,0) NOT NULL, - "RESULT_CODE" NUMBER(11,0) NOT NULL, - "RESULT_MSG" NVARCHAR2(512), - "RESULT_DATA" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."ID" IS '日志主键'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."TRACE_ID" IS '链路追踪编号'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."MODULE" IS '模块标题'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."NAME" IS '操作名'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."TYPE" IS '操作分类'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."CONTENT" IS '操作内容'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."EXTS" IS '拓展字段'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."REQUEST_METHOD" IS '请求方法名'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."REQUEST_URL" IS '请求地址'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."USER_IP" IS '用户 IP'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."USER_AGENT" IS '浏览器 UA'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."JAVA_METHOD" IS 'Java 方法名'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."JAVA_METHOD_ARGS" IS 'Java 方法的参数'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."START_TIME" IS '操作时间'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."DURATION" IS '执行时长'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."RESULT_CODE" IS '结果码'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."RESULT_MSG" IS '结果提示'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."RESULT_DATA" IS '结果数据'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_OPERATE_LOG"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_OPERATE_LOG" IS '操作日志记录'; - --- ---------------------------- --- Records of SYSTEM_OPERATE_LOG --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_POST --- ---------------------------- -DROP TABLE "SYSTEM_POST"; -CREATE TABLE "SYSTEM_POST" ( - "ID" NUMBER(20,0) NOT NULL, - "CODE" NVARCHAR2(64), - "NAME" NVARCHAR2(50), - "SORT" NUMBER(11,0) NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_POST"."ID" IS '岗位ID'; -COMMENT ON COLUMN "SYSTEM_POST"."CODE" IS '岗位编码'; -COMMENT ON COLUMN "SYSTEM_POST"."NAME" IS '岗位名称'; -COMMENT ON COLUMN "SYSTEM_POST"."SORT" IS '显示顺序'; -COMMENT ON COLUMN "SYSTEM_POST"."STATUS" IS '状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_POST"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_POST"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_POST"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_POST"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_POST"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_POST"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_POST"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_POST" IS '岗位信息表'; - --- ---------------------------- --- Records of SYSTEM_POST --- ---------------------------- -INSERT INTO "SYSTEM_POST" ("ID", "CODE", "NAME", "SORT", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1', 'ceo', '董事长', '1', '0', NULL, 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-04 17:50:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_POST" ("ID", "CODE", "NAME", "SORT", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('2', 'se', '项目经理', '2', '0', NULL, 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-12-12 10:47:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_POST" ("ID", "CODE", "NAME", "SORT", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('3', 'hr', '人力资源', '3', '0', NULL, 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-12 10:47:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_POST" ("ID", "CODE", "NAME", "SORT", "STATUS", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('4', 'user', '普通员工', '4', '0', NULL, 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-12-12 10:47:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_ROLE --- ---------------------------- -DROP TABLE "SYSTEM_ROLE"; -CREATE TABLE "SYSTEM_ROLE" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(30), - "CODE" NVARCHAR2(100), - "SORT" NUMBER(11,0) NOT NULL, - "DATA_SCOPE" NUMBER(4,0) NOT NULL, - "DATA_SCOPE_DEPT_IDS" NVARCHAR2(500), - "STATUS" NUMBER(4,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(500), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_ROLE"."ID" IS '角色ID'; -COMMENT ON COLUMN "SYSTEM_ROLE"."NAME" IS '角色名称'; -COMMENT ON COLUMN "SYSTEM_ROLE"."CODE" IS '角色权限字符串'; -COMMENT ON COLUMN "SYSTEM_ROLE"."SORT" IS '显示顺序'; -COMMENT ON COLUMN "SYSTEM_ROLE"."DATA_SCOPE" IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; -COMMENT ON COLUMN "SYSTEM_ROLE"."DATA_SCOPE_DEPT_IDS" IS '数据范围(指定部门数组)'; -COMMENT ON COLUMN "SYSTEM_ROLE"."STATUS" IS '角色状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_ROLE"."TYPE" IS '角色类型'; -COMMENT ON COLUMN "SYSTEM_ROLE"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_ROLE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_ROLE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_ROLE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_ROLE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_ROLE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_ROLE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_ROLE" IS '角色信息表'; - --- ---------------------------- --- Records of SYSTEM_ROLE --- ---------------------------- -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1', '超级管理员', 'super_admin', '1', '1', NULL, '0', '1', '超级管理员', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-22 05:08:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('2', '普通角色', 'common', '2', '2', NULL, '0', '1', '普通角色', 'admin', TO_DATE('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-22 05:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('101', '测试账号', 'test', '0', '1', '[]', '0', '2', '132', NULL, TO_DATE('2021-01-06 13:49:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 22:00:41', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('109', '租户管理员', 'tenant_admin', '0', '1', NULL, '0', '1', '系统自动生成', '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('110', '测试角色', 'test', '0', '1', '[]', '0', '2', '嘿嘿', '110', TO_DATE('2022-02-23 00:14:34', 'SYYYY-MM-DD HH24:MI:SS'), '110', TO_DATE('2022-02-23 13:14:58', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE" ("ID", "NAME", "CODE", "SORT", "DATA_SCOPE", "DATA_SCOPE_DEPT_IDS", "STATUS", "TYPE", "REMARK", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('111', '租户管理员', 'tenant_admin', '0', '1', NULL, '0', '1', '系统自动生成', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_ROLE_MENU --- ---------------------------- -DROP TABLE "SYSTEM_ROLE_MENU"; -CREATE TABLE "SYSTEM_ROLE_MENU" ( - "ID" NUMBER(20,0) NOT NULL, - "ROLE_ID" NUMBER(20,0) NOT NULL, - "MENU_ID" NUMBER(20,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."ID" IS '自增编号'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."ROLE_ID" IS '角色ID'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."MENU_ID" IS '菜单ID'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_ROLE_MENU"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_ROLE_MENU" IS '角色和菜单关联表'; - --- ---------------------------- --- Records of SYSTEM_ROLE_MENU --- ---------------------------- -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('434', '2', '1', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('454', '2', '1093', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('455', '2', '1094', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('460', '2', '1100', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('467', '2', '1107', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('470', '2', '1110', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('476', '2', '1117', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('477', '2', '100', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('478', '2', '101', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('479', '2', '102', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('480', '2', '1126', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('481', '2', '103', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('483', '2', '104', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('485', '2', '105', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('488', '2', '107', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('490', '2', '108', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('492', '2', '109', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('498', '2', '1138', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('523', '2', '1224', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('524', '2', '1225', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('541', '2', '500', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('543', '2', '501', '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('675', '2', '2', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('689', '2', '1077', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('690', '2', '1078', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('692', '2', '1083', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('693', '2', '1084', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('699', '2', '1090', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('702', '2', '1116', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('703', '2', '106', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('704', '2', '110', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('705', '2', '111', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('706', '2', '112', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('707', '2', '113', '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('263', '109', '1', '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1486', '109', '103', '1', TO_DATE('2022-02-23 19:32:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 19:32:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1487', '109', '104', '1', TO_DATE('2022-02-23 19:32:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 19:32:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1489', '1', '1', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1490', '1', '2', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1494', '1', '1077', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1495', '1', '1078', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1496', '1', '1083', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1497', '1', '1084', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1498', '1', '1090', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1499', '1', '1093', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1500', '1', '1094', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1501', '1', '1100', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1502', '1', '1107', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1503', '1', '1110', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1504', '1', '1116', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1505', '1', '1117', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1506', '1', '100', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1507', '1', '101', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1508', '1', '102', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1509', '1', '1126', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1510', '1', '103', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1511', '1', '104', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1512', '1', '105', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1513', '1', '106', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1514', '1', '107', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1515', '1', '108', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1516', '1', '109', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1517', '1', '110', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1518', '1', '111', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1519', '1', '112', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1520', '1', '113', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1522', '1', '1138', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1525', '1', '1224', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1526', '1', '1225', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1527', '1', '500', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1528', '1', '501', '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1529', '109', '1024', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1530', '109', '1025', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1536', '109', '1017', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1537', '109', '1018', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1538', '109', '1019', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1539', '109', '1020', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1540', '109', '1021', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1541', '109', '1022', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1542', '109', '1023', '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 20:30:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1576', '111', '1024', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1577', '111', '1025', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1578', '111', '1', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1584', '111', '103', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1585', '111', '104', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1587', '111', '1017', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1588', '111', '1018', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1589', '111', '1019', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1590', '111', '1020', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1591', '111', '1021', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1592', '111', '1022', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1593', '111', '1023', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1594', '109', '102', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1595', '109', '1013', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1596', '109', '1014', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1597', '109', '1015', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1598', '109', '1016', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1599', '111', '102', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1600', '111', '1013', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1601', '111', '1014', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1602', '111', '1015', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1603', '111', '1016', '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1604', '101', '1216', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1605', '101', '1217', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1606', '101', '1218', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1607', '101', '1219', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1608', '101', '1220', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1609', '101', '1221', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1610', '101', '5', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1611', '101', '1222', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1612', '101', '1118', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1613', '101', '1119', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1614', '101', '1120', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1615', '101', '1185', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1616', '101', '1186', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1617', '101', '1187', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1618', '101', '1188', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1619', '101', '1189', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1620', '101', '1190', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1621', '101', '1191', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1622', '101', '1192', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1623', '101', '1193', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1624', '101', '1194', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1625', '101', '1195', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1626', '101', '1196', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1627', '101', '1197', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1628', '101', '1198', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1629', '101', '1199', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1630', '101', '1200', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1631', '101', '1201', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1632', '101', '1202', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1633', '101', '1207', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1634', '101', '1208', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1635', '101', '1209', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1636', '101', '1210', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1637', '101', '1211', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1638', '101', '1212', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1639', '101', '1213', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1640', '101', '1215', '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_ROLE_MENU" ("ID", "ROLE_ID", "MENU_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1296', '110', '1', '110', TO_DATE('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '110', TO_DATE('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SENSITIVE_WORD --- ---------------------------- -DROP TABLE "SYSTEM_SENSITIVE_WORD"; -CREATE TABLE "SYSTEM_SENSITIVE_WORD" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(255) NOT NULL, - "DESCRIPTION" NVARCHAR2(512), - "TAGS" NVARCHAR2(255), - "STATUS" NUMBER(4,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."NAME" IS '敏感词'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."DESCRIPTION" IS '描述'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."TAGS" IS '标签数组'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."STATUS" IS '状态'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SENSITIVE_WORD"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SENSITIVE_WORD" IS '敏感词'; - --- ---------------------------- --- Records of SYSTEM_SENSITIVE_WORD --- ---------------------------- -INSERT INTO "SYSTEM_SENSITIVE_WORD" ("ID", "NAME", "DESCRIPTION", "TAGS", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', '测试', '啊哈哈', '论坛,吃瓜', '0', '1', TO_DATE('2022-04-08 19:51:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-08 12:10:45', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SENSITIVE_WORD" ("ID", "NAME", "DESCRIPTION", "TAGS", "STATUS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', '测试', '哈哈', '论坛,吃瓜,蔬菜', '0', '1', TO_DATE('2022-04-08 20:10:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-04-08 13:13:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SMS_CHANNEL --- ---------------------------- -DROP TABLE "SYSTEM_SMS_CHANNEL"; -CREATE TABLE "SYSTEM_SMS_CHANNEL" ( - "ID" NUMBER(20,0) NOT NULL, - "SIGNATURE" NVARCHAR2(12), - "CODE" NVARCHAR2(63), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(255), - "API_KEY" NVARCHAR2(128), - "API_SECRET" NVARCHAR2(128), - "CALLBACK_URL" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."SIGNATURE" IS '短信签名'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."CODE" IS '渠道编码'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."API_KEY" IS '短信 API 的账号'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."API_SECRET" IS '短信 API 的秘钥'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."CALLBACK_URL" IS '短信发送回调 URL'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SMS_CHANNEL"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SMS_CHANNEL" IS '短信渠道'; - --- ---------------------------- --- Records of SYSTEM_SMS_CHANNEL --- ---------------------------- -INSERT INTO "SYSTEM_SMS_CHANNEL" ("ID", "SIGNATURE", "CODE", "STATUS", "REMARK", "API_KEY", "API_SECRET", "CALLBACK_URL", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', 'Ballcat', 'ALIYUN', '0', '啦啦啦', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, NULL, TO_DATE('2021-03-31 11:53:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-14 00:08:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_CHANNEL" ("ID", "SIGNATURE", "CODE", "STATUS", "REMARK", "API_KEY", "API_SECRET", "CALLBACK_URL", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('4', '测试渠道', 'DEBUG_DING_TALK', '0', '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', TO_DATE('2021-04-13 00:23:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-14 00:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SMS_CODE --- ---------------------------- -DROP TABLE "SYSTEM_SMS_CODE"; -CREATE TABLE "SYSTEM_SMS_CODE" ( - "ID" NUMBER(20,0) NOT NULL, - "MOBILE" NVARCHAR2(11), - "CODE" NVARCHAR2(6), - "CREATE_IP" NVARCHAR2(15), - "SCENE" NUMBER(4,0) NOT NULL, - "TODAY_INDEX" NUMBER(4,0) NOT NULL, - "USED" NUMBER(4,0) NOT NULL, - "USED_TIME" DATE, - "USED_IP" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."MOBILE" IS '手机号'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."CODE" IS '验证码'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."CREATE_IP" IS '创建 IP'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."SCENE" IS '发送场景'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."TODAY_INDEX" IS '今日发送的第几条'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."USED" IS '是否使用'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."USED_TIME" IS '使用时间'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."USED_IP" IS '使用 IP'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_SMS_CODE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SMS_CODE" IS '手机验证码'; - --- ---------------------------- --- Records of SYSTEM_SMS_CODE --- ---------------------------- -INSERT INTO "SYSTEM_SMS_CODE" ("ID", "MOBILE", "CODE", "CREATE_IP", "SCENE", "TODAY_INDEX", "USED", "USED_TIME", "USED_IP", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', '15601691399', '9999', '127.0.0.1', '1', '1', '0', NULL, NULL, NULL, TO_DATE('2022-05-01 17:52:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-01 17:52:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SMS_LOG --- ---------------------------- -DROP TABLE "SYSTEM_SMS_LOG"; -CREATE TABLE "SYSTEM_SMS_LOG" ( - "ID" NUMBER(20,0) NOT NULL, - "CHANNEL_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_CODE" NVARCHAR2(63), - "TEMPLATE_ID" NUMBER(20,0) NOT NULL, - "TEMPLATE_CODE" NVARCHAR2(63), - "TEMPLATE_TYPE" NUMBER(4,0) NOT NULL, - "TEMPLATE_CONTENT" NVARCHAR2(255), - "TEMPLATE_PARAMS" NVARCHAR2(255), - "API_TEMPLATE_ID" NVARCHAR2(63), - "MOBILE" NVARCHAR2(11), - "USER_ID" NUMBER(20,0), - "USER_TYPE" NUMBER(4,0), - "SEND_STATUS" NUMBER(4,0) NOT NULL, - "SEND_TIME" DATE, - "SEND_CODE" NUMBER(11,0), - "SEND_MSG" NVARCHAR2(255), - "API_SEND_CODE" NVARCHAR2(63), - "API_SEND_MSG" NVARCHAR2(255), - "API_REQUEST_ID" NVARCHAR2(255), - "API_SERIAL_NO" NVARCHAR2(255), - "RECEIVE_STATUS" NUMBER(4,0) NOT NULL, - "RECEIVE_TIME" DATE, - "API_RECEIVE_CODE" NVARCHAR2(63), - "API_RECEIVE_MSG" NVARCHAR2(255), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."CHANNEL_ID" IS '短信渠道编号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."CHANNEL_CODE" IS '短信渠道编码'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."TEMPLATE_ID" IS '模板编号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."TEMPLATE_CODE" IS '模板编码'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."TEMPLATE_TYPE" IS '短信类型'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."TEMPLATE_CONTENT" IS '短信内容'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."TEMPLATE_PARAMS" IS '短信参数'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_TEMPLATE_ID" IS '短信 API 的模板编号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."MOBILE" IS '手机号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."USER_ID" IS '用户编号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."SEND_STATUS" IS '发送状态'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."SEND_TIME" IS '发送时间'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."SEND_CODE" IS '发送结果的编码'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."SEND_MSG" IS '发送结果的提示'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_SEND_CODE" IS '短信 API 发送结果的编码'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_SEND_MSG" IS '短信 API 发送失败的提示'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_REQUEST_ID" IS '短信 API 发送返回的唯一请求 ID'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_SERIAL_NO" IS '短信 API 发送返回的序号'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."RECEIVE_STATUS" IS '接收状态'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."RECEIVE_TIME" IS '接收时间'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_RECEIVE_CODE" IS 'API 接收结果的编码'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."API_RECEIVE_MSG" IS 'API 接收结果的说明'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SMS_LOG"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SMS_LOG" IS '短信日志'; - --- ---------------------------- --- Records of SYSTEM_SMS_LOG --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SMS_TEMPLATE --- ---------------------------- -DROP TABLE "SYSTEM_SMS_TEMPLATE"; -CREATE TABLE "SYSTEM_SMS_TEMPLATE" ( - "ID" NUMBER(20,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "STATUS" NUMBER(4,0) NOT NULL, - "CODE" NVARCHAR2(63), - "NAME" NVARCHAR2(63), - "CONTENT" NVARCHAR2(255), - "PARAMS" NVARCHAR2(255), - "REMARK" NVARCHAR2(255), - "API_TEMPLATE_ID" NVARCHAR2(63), - "CHANNEL_ID" NUMBER(20,0) NOT NULL, - "CHANNEL_CODE" NVARCHAR2(63), - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."ID" IS '编号'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."TYPE" IS '短信签名'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."STATUS" IS '开启状态'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CODE" IS '模板编码'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."NAME" IS '模板名称'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CONTENT" IS '模板内容'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."PARAMS" IS '参数数组'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."API_TEMPLATE_ID" IS '短信 API 的模板编号'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CHANNEL_ID" IS '短信渠道编号'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CHANNEL_CODE" IS '短信渠道编码'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SMS_TEMPLATE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SMS_TEMPLATE" IS '短信模板'; - --- ---------------------------- --- Records of SYSTEM_SMS_TEMPLATE --- ---------------------------- -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('2', '1', '0', 'test_01', '测试验证码短信', '正在进行登录操作{operation},您的验证码是{code}', '["operation","code"]', NULL, '4383920', '1', 'YUN_PIAN', NULL, TO_DATE('2021-03-31 10:49:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-10 01:22:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('3', '1', '0', 'test_02', '公告通知', '您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', '["code"]', NULL, 'SMS_207945135', '2', 'ALIYUN', NULL, TO_DATE('2021-03-31 11:56:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-10 01:22:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('6', '3', '0', 'test-01', '测试模板', '哈哈哈 {name}', '["name"]', 'f哈哈哈', '4383920', '1', 'YUN_PIAN', '1', TO_DATE('2021-04-10 01:07:21', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-10 01:22:05', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('7', '3', '0', 'test-04', '测试下', '老鸡{name},牛逼{code}', '["name","code"]', NULL, 'suibian', '4', 'DEBUG_DING_TALK', '1', TO_DATE('2021-04-13 00:29:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-04-14 00:30:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('8', '1', '0', 'user-sms-login', '前台用户短信登录', '您的验证码是{code}', '["code"]', NULL, '4372216', '1', 'YUN_PIAN', '1', TO_DATE('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('9', '2', '0', 'bpm_task_assigned', '【工作流】任务被分配', '您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}', '["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, 'suibian', '4', 'DEBUG_DING_TALK', '1', TO_DATE('2022-01-21 22:31:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-22 00:03:36', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('10', '2', '0', 'bpm_process_instance_reject', '【工作流】流程被不通过', '您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}', '["processInstanceName","reason","detailUrl"]', NULL, 'suibian', '4', 'DEBUG_DING_TALK', '1', TO_DATE('2022-01-22 00:03:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-22 00:24:31', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('11', '2', '0', 'bpm_process_instance_approve', '【工作流】流程被通过', '您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}', '["processInstanceName","detailUrl"]', NULL, 'suibian', '4', 'DEBUG_DING_TALK', '1', TO_DATE('2022-01-22 00:04:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-22 00:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_SMS_TEMPLATE" ("ID", "TYPE", "STATUS", "CODE", "NAME", "CONTENT", "PARAMS", "REMARK", "API_TEMPLATE_ID", "CHANNEL_ID", "CHANNEL_CODE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('13', '1', '0', 'admin-sms-login', '后台用户短信登录', '您的验证码是{code}', '["code"]', NULL, '4372216', '1', 'YUN_PIAN', '1', TO_DATE('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_SOCIAL_USER --- ---------------------------- -DROP TABLE "SYSTEM_SOCIAL_USER"; -CREATE TABLE "SYSTEM_SOCIAL_USER" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "USER_TYPE" NUMBER(4,0) NOT NULL, - "TYPE" NUMBER(4,0) NOT NULL, - "OPENID" NVARCHAR2(32), - "TOKEN" NVARCHAR2(256), - "UNION_ID" NVARCHAR2(32), - "RAW_TOKEN_INFO" NCLOB, - "NICKNAME" NVARCHAR2(32), - "AVATAR" NVARCHAR2(255), - "RAW_USER_INFO" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."ID" IS '主键(自增策略)'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."USER_ID" IS '关联的用户编号'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."USER_TYPE" IS '用户类型'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."TYPE" IS '社交平台的类型'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."OPENID" IS '社交 openid'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."TOKEN" IS '社交 token'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."UNION_ID" IS '社交的全局编号'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."RAW_TOKEN_INFO" IS '原始 Token 数据,一般是 JSON 格式'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."NICKNAME" IS '用户昵称'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."AVATAR" IS '用户头像'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."RAW_USER_INFO" IS '原始用户数据,一般是 JSON 格式'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_SOCIAL_USER"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_SOCIAL_USER" IS '社交用户'; - --- ---------------------------- --- Records of SYSTEM_SOCIAL_USER --- ---------------------------- -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_TENANT --- ---------------------------- -DROP TABLE "SYSTEM_TENANT"; -CREATE TABLE "SYSTEM_TENANT" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(30), - "CONTACT_USER_ID" NUMBER(20,0), - "CONTACT_NAME" NVARCHAR2(30), - "CONTACT_MOBILE" NVARCHAR2(500), - "STATUS" NUMBER(4,0) NOT NULL, - "WEBSITE" NVARCHAR2(256), - "PACKAGE_ID" NUMBER(20,0) NOT NULL, - "EXPIRE_TIME" DATE NOT NULL, - "ACCOUNT_COUNT" NUMBER(11,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_TENANT"."ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_TENANT"."NAME" IS '租户名'; -COMMENT ON COLUMN "SYSTEM_TENANT"."CONTACT_USER_ID" IS '联系人的用户编号'; -COMMENT ON COLUMN "SYSTEM_TENANT"."CONTACT_NAME" IS '联系人'; -COMMENT ON COLUMN "SYSTEM_TENANT"."CONTACT_MOBILE" IS '联系手机'; -COMMENT ON COLUMN "SYSTEM_TENANT"."STATUS" IS '租户状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_TENANT"."WEBSITE" IS '绑定域名'; -COMMENT ON COLUMN "SYSTEM_TENANT"."PACKAGE_ID" IS '租户套餐编号'; -COMMENT ON COLUMN "SYSTEM_TENANT"."EXPIRE_TIME" IS '过期时间'; -COMMENT ON COLUMN "SYSTEM_TENANT"."ACCOUNT_COUNT" IS '账号数量'; -COMMENT ON COLUMN "SYSTEM_TENANT"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_TENANT"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_TENANT"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_TENANT"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_TENANT"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_TENANT" IS '租户表'; - --- ---------------------------- --- Records of SYSTEM_TENANT --- ---------------------------- -INSERT INTO "SYSTEM_TENANT" ("ID", "NAME", "CONTACT_USER_ID", "CONTACT_NAME", "CONTACT_MOBILE", "STATUS", "WEBSITE", "PACKAGE_ID", "EXPIRE_TIME", "ACCOUNT_COUNT", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', '芋道源码', NULL, '芋艿', '17321315478', '0', 'https://www.iocoder.cn', '0', TO_DATE('2099-02-19 17:14:16', 'SYYYY-MM-DD HH24:MI:SS'), '9999', '1', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 12:15:11', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_TENANT" ("ID", "NAME", "CONTACT_USER_ID", "CONTACT_NAME", "CONTACT_MOBILE", "STATUS", "WEBSITE", "PACKAGE_ID", "EXPIRE_TIME", "ACCOUNT_COUNT", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('121', '小租户', '110', '小王2', '15601691300', '0', 'http://www.iocoder.cn', '111', TO_DATE('2024-03-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '20', '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:37:20', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO "SYSTEM_TENANT" ("ID", "NAME", "CONTACT_USER_ID", "CONTACT_NAME", "CONTACT_MOBILE", "STATUS", "WEBSITE", "PACKAGE_ID", "EXPIRE_TIME", "ACCOUNT_COUNT", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('122', '测试租户', '113', '芋道', '15601691300', '0', 'https://www.iocoder.cn', '111', TO_DATE('2022-04-30 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '50', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_TENANT_PACKAGE --- ---------------------------- -DROP TABLE "SYSTEM_TENANT_PACKAGE"; -CREATE TABLE "SYSTEM_TENANT_PACKAGE" ( - "ID" NUMBER(20,0) NOT NULL, - "NAME" NVARCHAR2(30), - "STATUS" NUMBER(4,0) NOT NULL, - "REMARK" NVARCHAR2(256), - "MENU_IDS" NCLOB, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(4,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."ID" IS '套餐编号'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."NAME" IS '套餐名'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."STATUS" IS '租户状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."MENU_IDS" IS '关联的菜单编号'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_TENANT_PACKAGE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_TENANT_PACKAGE" IS '租户套餐表'; - --- ---------------------------- --- Records of SYSTEM_TENANT_PACKAGE --- ---------------------------- -INSERT INTO "SYSTEM_TENANT_PACKAGE" ("ID", "NAME", "STATUS", "REMARK", "MENU_IDS", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('111', '普通套餐', '0', '小功能', '[1024,1025,1,102,103,104,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023]', '1', TO_DATE('2022-02-22 00:54:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 18:39:13', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_USERS --- ---------------------------- -DROP TABLE "SYSTEM_USERS"; -CREATE TABLE "SYSTEM_USERS" ( - "ID" NUMBER(20,0) NOT NULL, - "USERNAME" NVARCHAR2(30), - "PASSWORD" NVARCHAR2(100), - "NICKNAME" NVARCHAR2(30), - "REMARK" NVARCHAR2(500), - "DEPT_ID" NUMBER(20,0), - "POST_IDS" NVARCHAR2(255), - "EMAIL" NVARCHAR2(50), - "MOBILE" NVARCHAR2(11), - "SEX" NUMBER(4,0), - "AVATAR" NVARCHAR2(100), - "STATUS" NUMBER(4,0) NOT NULL, - "LOGIN_IP" NVARCHAR2(50), - "LOGIN_DATE" DATE, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_USERS"."ID" IS '用户ID'; -COMMENT ON COLUMN "SYSTEM_USERS"."USERNAME" IS '用户账号'; -COMMENT ON COLUMN "SYSTEM_USERS"."PASSWORD" IS '密码'; -COMMENT ON COLUMN "SYSTEM_USERS"."NICKNAME" IS '用户昵称'; -COMMENT ON COLUMN "SYSTEM_USERS"."REMARK" IS '备注'; -COMMENT ON COLUMN "SYSTEM_USERS"."DEPT_ID" IS '部门ID'; -COMMENT ON COLUMN "SYSTEM_USERS"."POST_IDS" IS '岗位编号数组'; -COMMENT ON COLUMN "SYSTEM_USERS"."EMAIL" IS '用户邮箱'; -COMMENT ON COLUMN "SYSTEM_USERS"."MOBILE" IS '手机号码'; -COMMENT ON COLUMN "SYSTEM_USERS"."SEX" IS '用户性别'; -COMMENT ON COLUMN "SYSTEM_USERS"."AVATAR" IS '头像地址'; -COMMENT ON COLUMN "SYSTEM_USERS"."STATUS" IS '帐号状态(0正常 1停用)'; -COMMENT ON COLUMN "SYSTEM_USERS"."LOGIN_IP" IS '最后登录IP'; -COMMENT ON COLUMN "SYSTEM_USERS"."LOGIN_DATE" IS '最后登录时间'; -COMMENT ON COLUMN "SYSTEM_USERS"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_USERS"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_USERS"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_USERS"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_USERS"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_USERS"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_USERS" IS '用户信息表'; - --- ---------------------------- --- Records of SYSTEM_USERS --- ---------------------------- -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('115', 'anzhen', '$2a$10$Qr2lBUuwvDMb98p/o7iSPuHb7GRi4zPHSq4g01ETuY.l4O5txXfvi', 'anzhen', NULL, '100', '[]', NULL, NULL, NULL, NULL, '0', NULL, NULL, '1', TO_DATE('2022-03-24 18:50:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-24 18:50:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1', 'admin', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道源码', '管理员', '103', '[1,2]', 'aoteman@126.com', '15612345678', '1', 'http://test.yudao.iocoder.cn/a294ecb2-73dd-4353-bf40-296b8931d0bf', '0', '127.0.0.1', TO_DATE('2022-05-13 09:40:57', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-05-13 09:40:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('100', 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', '104', '[1]', 'yudao@iocoder.cn', '15601691300', '1', NULL, '1', NULL, NULL, NULL, TO_DATE('2021-01-07 09:07:17', 'SYYYY-MM-DD HH24:MI:SS'), '104', TO_DATE('2021-12-16 09:26:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('103', 'yuanma', '$2a$10$wWoPT7sqriM2O1YXRL.je.GiL538OR6ZTN8aQZr9JAGdnpCH2tpYe', '源码', NULL, '106', NULL, 'yuanma@iocoder.cn', '15601701300', '0', NULL, '0', '127.0.0.1', TO_DATE('2022-01-18 00:33:40', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-01-13 23:50:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-01-18 00:33:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('104', 'test', '$2a$10$e5RpuDCC0GYSt0Hvd2.CjujIXwgGct4SnXi6dVGxdgFsnqgEryk5a', '测试号', NULL, '107', '[]', '111@qq.com', '15601691200', '1', NULL, '0', '127.0.0.1', TO_DATE('2022-03-19 21:46:19', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-01-21 02:13:53', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-03-19 21:46:19', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('107', 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, NULL, '15601691300', '0', NULL, '0', NULL, NULL, '1', TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-27 08:26:51', 'SYYYY-MM-DD HH24:MI:SS'), '118', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('108', 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, NULL, '15601691300', '0', NULL, '0', NULL, NULL, '1', TO_DATE('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-27 08:26:53', 'SYYYY-MM-DD HH24:MI:SS'), '119', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('109', 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, NULL, '15601691300', '0', NULL, '0', NULL, NULL, '1', TO_DATE('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-27 08:26:56', 'SYYYY-MM-DD HH24:MI:SS'), '120', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('110', 'admin110', '$2a$10$qYxoXs0ogPHgYllyEneYde9xcCW5hZgukrxeXZ9lmLhKse8TK6IwW', '小王', NULL, NULL, NULL, NULL, '15601691300', '0', NULL, '0', '127.0.0.1', TO_DATE('2022-02-23 19:36:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-27 08:26:59', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('111', 'test', '$2a$10$mExveopHUx9Q4QiLtAzhDeH3n4/QlNLzEsM4AqgxKrU.ciUZDXZCy', '测试用户', NULL, NULL, '[]', NULL, NULL, '0', NULL, '0', NULL, NULL, '110', TO_DATE('2022-02-23 13:14:33', 'SYYYY-MM-DD HH24:MI:SS'), '110', TO_DATE('2022-02-23 13:14:33', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('112', 'newobject', '$2a$10$jh5MsR.ud/gKe3mVeUp5t.nEXGDSmHyv5OYjWQwHO8wlGmMSI9Twy', '新对象', NULL, NULL, '[]', NULL, NULL, '0', NULL, '0', NULL, NULL, '1', TO_DATE('2022-02-23 19:08:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-23 19:08:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('113', 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, NULL, '15601691300', '0', NULL, '0', '127.0.0.1', TO_DATE('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('114', 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[3]', NULL, NULL, '0', NULL, '0', '127.0.0.1', TO_DATE('2022-03-19 22:15:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:50:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 01:08:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USERS" ("ID", "USERNAME", "PASSWORD", "NICKNAME", "REMARK", "DEPT_ID", "POST_IDS", "EMAIL", "MOBILE", "SEX", "AVATAR", "STATUS", "LOGIN_IP", "LOGIN_DATE", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('0', 'admin2', '$2a$10$KYL8IPJPIzuZWfOgPqOuU.VeZqWistCv5pxtoaq2SwPBDgBR4uh6G', '123', NULL, NULL, '[]', NULL, NULL, NULL, NULL, '0', NULL, NULL, '1', TO_DATE('2022-05-01 01:05:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-01 01:05:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_USER_POST --- ---------------------------- -DROP TABLE "SYSTEM_USER_POST"; -CREATE TABLE "SYSTEM_USER_POST" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "POST_ID" NUMBER(20,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE NOT NULL, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL, - "TENANT_ID" NUMBER(20,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_USER_POST"."ID" IS 'id'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."USER_ID" IS '用户ID'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."POST_ID" IS '岗位ID'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "SYSTEM_USER_POST"."TENANT_ID" IS '租户编号'; -COMMENT ON TABLE "SYSTEM_USER_POST" IS '用户岗位表'; - --- ---------------------------- --- Records of SYSTEM_USER_POST --- ---------------------------- -INSERT INTO "SYSTEM_USER_POST" ("ID", "USER_ID", "POST_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('112', '1', '1', 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -INSERT INTO "SYSTEM_USER_POST" ("ID", "USER_ID", "POST_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('113', '100', '1', 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -INSERT INTO "SYSTEM_USER_POST" ("ID", "USER_ID", "POST_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED", "TENANT_ID") VALUES ('114', '114', '3', 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1'); -COMMIT; -COMMIT; - --- ---------------------------- --- Table structure for SYSTEM_USER_ROLE --- ---------------------------- -DROP TABLE "SYSTEM_USER_ROLE"; -CREATE TABLE "SYSTEM_USER_ROLE" ( - "ID" NUMBER(20,0) NOT NULL, - "USER_ID" NUMBER(20,0) NOT NULL, - "ROLE_ID" NUMBER(20,0) NOT NULL, - "CREATOR" NVARCHAR2(64), - "CREATE_TIME" DATE, - "UPDATER" NVARCHAR2(64), - "UPDATE_TIME" DATE, - "TENANT_ID" NUMBER(20,0) NOT NULL, - "DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL -) -LOGGING -NOCOMPRESS -PCTFREE 10 -INITRANS 1 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -) -PARALLEL 1 -NOCACHE -DISABLE ROW MOVEMENT -; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."ID" IS '自增编号'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."USER_ID" IS '用户ID'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."ROLE_ID" IS '角色ID'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."CREATOR" IS '创建者'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."UPDATER" IS '更新者'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."TENANT_ID" IS '租户编号'; -COMMENT ON COLUMN "SYSTEM_USER_ROLE"."DELETED" IS '是否删除'; -COMMENT ON TABLE "SYSTEM_USER_ROLE" IS '用户和角色关联表'; - --- ---------------------------- --- Records of SYSTEM_USER_ROLE --- ---------------------------- -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('1', '1', '1', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('2', '2', '2', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('4', '100', '101', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('5', '100', '1', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('6', '100', '2', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('7', '104', '101', NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('10', '103', '1', '1', TO_DATE('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('11', '107', '106', '1', TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '118', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('12', '108', '107', '1', TO_DATE('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '119', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('13', '109', '108', '1', TO_DATE('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '120', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('14', '110', '109', '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('15', '111', '110', '110', TO_DATE('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '110', TO_DATE('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '121', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('16', '113', '111', '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '122', '0'); -INSERT INTO "SYSTEM_USER_ROLE" ("ID", "USER_ID", "ROLE_ID", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "TENANT_ID", "DELETED") VALUES ('17', '114', '101', '1', TO_DATE('2022-03-19 21:51:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-03-19 21:51:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); -COMMIT; -COMMIT; - --- ---------------------------- --- Sequence structure for BPM_FORM_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_FORM_SEQ"; -CREATE SEQUENCE "BPM_FORM_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_OA_LEAVE_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_OA_LEAVE_SEQ"; -CREATE SEQUENCE "BPM_OA_LEAVE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_PROCESS_DEFINITION_EXT_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_PROCESS_DEFINITION_EXT_SEQ"; -CREATE SEQUENCE "BPM_PROCESS_DEFINITION_EXT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_PROCESS_INSTANCE_EXT_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_PROCESS_INSTANCE_EXT_SEQ"; -CREATE SEQUENCE "BPM_PROCESS_INSTANCE_EXT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_TASK_ASSIGN_RULE_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_TASK_ASSIGN_RULE_SEQ"; -CREATE SEQUENCE "BPM_TASK_ASSIGN_RULE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_TASK_EXT_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_TASK_EXT_SEQ"; -CREATE SEQUENCE "BPM_TASK_EXT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for BPM_USER_GROUP_SEQ --- ---------------------------- -DROP SEQUENCE "BPM_USER_GROUP_SEQ"; -CREATE SEQUENCE "BPM_USER_GROUP_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_API_ACCESS_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_API_ACCESS_LOG_SEQ"; -CREATE SEQUENCE "INFRA_API_ACCESS_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_API_ERROR_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_API_ERROR_LOG_SEQ"; -CREATE SEQUENCE "INFRA_API_ERROR_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_CODEGEN_COLUMN_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_CODEGEN_COLUMN_SEQ"; -CREATE SEQUENCE "INFRA_CODEGEN_COLUMN_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_CODEGEN_TABLE_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_CODEGEN_TABLE_SEQ"; -CREATE SEQUENCE "INFRA_CODEGEN_TABLE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_CONFIG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_CONFIG_SEQ"; -CREATE SEQUENCE "INFRA_CONFIG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_DATA_SOURCE_CONFIG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_DATA_SOURCE_CONFIG_SEQ"; -CREATE SEQUENCE "INFRA_DATA_SOURCE_CONFIG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_FILE_CONFIG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_FILE_CONFIG_SEQ"; -CREATE SEQUENCE "INFRA_FILE_CONFIG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_FILE_CONTENT_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_FILE_CONTENT_SEQ"; -CREATE SEQUENCE "INFRA_FILE_CONTENT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_FILE_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_FILE_SEQ"; -CREATE SEQUENCE "INFRA_FILE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_JOB_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_JOB_LOG_SEQ"; -CREATE SEQUENCE "INFRA_JOB_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_JOB_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_JOB_SEQ"; -CREATE SEQUENCE "INFRA_JOB_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for INFRA_TEST_DEMO_SEQ --- ---------------------------- -DROP SEQUENCE "INFRA_TEST_DEMO_SEQ"; -CREATE SEQUENCE "INFRA_TEST_DEMO_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for MEMBER_USER_SEQ --- ---------------------------- -DROP SEQUENCE "MEMBER_USER_SEQ"; -CREATE SEQUENCE "MEMBER_USER_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_APP_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_APP_SEQ"; -CREATE SEQUENCE "PAY_APP_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_CHANNEL_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_CHANNEL_SEQ"; -CREATE SEQUENCE "PAY_CHANNEL_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_MERCHANT_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_MERCHANT_SEQ"; -CREATE SEQUENCE "PAY_MERCHANT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_NOTIFY_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_NOTIFY_LOG_SEQ"; -CREATE SEQUENCE "PAY_NOTIFY_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_NOTIFY_TASK_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_NOTIFY_TASK_SEQ"; -CREATE SEQUENCE "PAY_NOTIFY_TASK_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_ORDER_EXTENSION_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_ORDER_EXTENSION_SEQ"; -CREATE SEQUENCE "PAY_ORDER_EXTENSION_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_ORDER_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_ORDER_SEQ"; -CREATE SEQUENCE "PAY_ORDER_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for PAY_REFUND_SEQ --- ---------------------------- -DROP SEQUENCE "PAY_REFUND_SEQ"; -CREATE SEQUENCE "PAY_REFUND_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_DEPT_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_DEPT_SEQ"; -CREATE SEQUENCE "SYSTEM_DEPT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_DICT_DATA_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_DICT_DATA_SEQ"; -CREATE SEQUENCE "SYSTEM_DICT_DATA_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_DICT_TYPE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_DICT_TYPE_SEQ"; -CREATE SEQUENCE "SYSTEM_DICT_TYPE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_ERROR_CODE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_ERROR_CODE_SEQ"; -CREATE SEQUENCE "SYSTEM_ERROR_CODE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_LOGIN_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_LOGIN_LOG_SEQ"; -CREATE SEQUENCE "SYSTEM_LOGIN_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_MENU_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_MENU_SEQ"; -CREATE SEQUENCE "SYSTEM_MENU_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_NOTICE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_NOTICE_SEQ"; -CREATE SEQUENCE "SYSTEM_NOTICE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_OAUTH2_ACCESS_TOKEN_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_OAUTH2_ACCESS_TOKEN_SEQ"; -CREATE SEQUENCE "SYSTEM_OAUTH2_ACCESS_TOKEN_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_OAUTH2_APPROVE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_OAUTH2_APPROVE_SEQ"; -CREATE SEQUENCE "SYSTEM_OAUTH2_APPROVE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_OAUTH2_CLIENT_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_OAUTH2_CLIENT_SEQ"; -CREATE SEQUENCE "SYSTEM_OAUTH2_CLIENT_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_OAUTH2_CODE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_OAUTH2_CODE_SEQ"; -CREATE SEQUENCE "SYSTEM_OAUTH2_CODE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_OPERATE_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_OPERATE_LOG_SEQ"; -CREATE SEQUENCE "SYSTEM_OPERATE_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_POST_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_POST_SEQ"; -CREATE SEQUENCE "SYSTEM_POST_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_ROLE_MENU_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_ROLE_MENU_SEQ"; -CREATE SEQUENCE "SYSTEM_ROLE_MENU_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_ROLE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_ROLE_SEQ"; -CREATE SEQUENCE "SYSTEM_ROLE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SENSITIVE_WORD_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SENSITIVE_WORD_SEQ"; -CREATE SEQUENCE "SYSTEM_SENSITIVE_WORD_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SMS_CHANNEL_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SMS_CHANNEL_SEQ"; -CREATE SEQUENCE "SYSTEM_SMS_CHANNEL_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SMS_CODE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SMS_CODE_SEQ"; -CREATE SEQUENCE "SYSTEM_SMS_CODE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SMS_LOG_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SMS_LOG_SEQ"; -CREATE SEQUENCE "SYSTEM_SMS_LOG_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SMS_TEMPLATE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SMS_TEMPLATE_SEQ"; -CREATE SEQUENCE "SYSTEM_SMS_TEMPLATE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SOCIAL_USER_BIND_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SOCIAL_USER_BIND_SEQ"; -CREATE SEQUENCE "SYSTEM_SOCIAL_USER_BIND_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_SOCIAL_USER_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_SOCIAL_USER_SEQ"; -CREATE SEQUENCE "SYSTEM_SOCIAL_USER_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_TENANT_PACKAGE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_TENANT_PACKAGE_SEQ"; -CREATE SEQUENCE "SYSTEM_TENANT_PACKAGE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_TENANT_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_TENANT_SEQ"; -CREATE SEQUENCE "SYSTEM_TENANT_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_USER_POST_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_USER_POST_SEQ"; -CREATE SEQUENCE "SYSTEM_USER_POST_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_USER_ROLE_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_USER_ROLE_SEQ"; -CREATE SEQUENCE "SYSTEM_USER_ROLE_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_USER_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_USER_SEQ"; -CREATE SEQUENCE "SYSTEM_USER_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Sequence structure for SYSTEM_USER_SESSION_SEQ --- ---------------------------- -DROP SEQUENCE "SYSTEM_USER_SESSION_SEQ"; -CREATE SEQUENCE "SYSTEM_USER_SESSION_SEQ" MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20; - --- ---------------------------- --- Checks structure for table BPM_FORM --- ---------------------------- -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C007768" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C007769" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C007770" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C007771" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C007772" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008199" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008446" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008447" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008448" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008449" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008450" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_FORM" ADD CONSTRAINT "SYS_C008451" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_OA_LEAVE --- ---------------------------- -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007773" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007774" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007775" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007776" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007777" CHECK ("END_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007778" CHECK ("DAY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007779" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007780" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007781" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C007782" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008200" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008452" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008453" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008454" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008455" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008456" CHECK ("END_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008457" CHECK ("DAY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008458" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008459" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008460" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008461" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_OA_LEAVE" ADD CONSTRAINT "SYS_C008462" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_PROCESS_DEFINITION_EXT --- ---------------------------- -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C007783" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C007784" CHECK ("FORM_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C007785" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C007786" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C007787" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008201" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008463" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008464" CHECK ("FORM_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008465" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008466" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008467" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT "SYS_C008468" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_PROCESS_INSTANCE_EXT --- ---------------------------- -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007788" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007789" CHECK ("START_USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007790" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007791" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007792" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007793" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C007794" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008202" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008469" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008470" CHECK ("START_USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008471" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008472" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008473" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008474" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008475" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT "SYS_C008476" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_TASK_ASSIGN_RULE --- ---------------------------- -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C007795" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C007796" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C007797" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C007798" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C007799" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008203" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008477" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008478" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008479" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008480" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008481" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT "SYS_C008482" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_TASK_EXT --- ---------------------------- -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C007800" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C007801" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C007802" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C007803" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C007804" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008204" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008483" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008484" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008485" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008486" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008487" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_TASK_EXT" ADD CONSTRAINT "SYS_C008488" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table BPM_USER_GROUP --- ---------------------------- -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007807" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007808" CHECK ("MEMBER_USER_IDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007809" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007810" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007811" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C007812" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008205" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008489" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008490" CHECK ("MEMBER_USER_IDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008491" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008492" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008493" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008494" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "BPM_USER_GROUP" ADD CONSTRAINT "SYS_C008495" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_API_ACCESS_LOG --- ---------------------------- -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007829" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007830" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007831" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007832" CHECK ("BEGIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007833" CHECK ("END_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007834" CHECK ("DURATION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007835" CHECK ("RESULT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007836" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007837" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C007838" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008496" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008497" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008498" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008499" CHECK ("BEGIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008500" CHECK ("END_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008501" CHECK ("DURATION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008502" CHECK ("RESULT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008503" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008504" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ACCESS_LOG" ADD CONSTRAINT "SYS_C008505" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_API_ERROR_LOG --- ---------------------------- -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007851" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007852" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007853" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007854" CHECK ("EXCEPTION_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007855" CHECK ("EXCEPTION_MESSAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007856" CHECK ("EXCEPTION_ROOT_CAUSE_MESSAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007857" CHECK ("EXCEPTION_STACK_TRACE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007858" CHECK ("EXCEPTION_LINE_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007859" CHECK ("PROCESS_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007860" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007861" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C007862" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008506" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008507" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008508" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008509" CHECK ("EXCEPTION_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008510" CHECK ("EXCEPTION_MESSAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008511" CHECK ("EXCEPTION_ROOT_CAUSE_MESSAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008512" CHECK ("EXCEPTION_STACK_TRACE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008513" CHECK ("EXCEPTION_LINE_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008514" CHECK ("PROCESS_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008515" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008516" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_API_ERROR_LOG" ADD CONSTRAINT "SYS_C008517" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_CODEGEN_COLUMN --- ---------------------------- -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007839" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007840" CHECK ("TABLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007841" CHECK ("ORDINAL_POSITION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007842" CHECK ("LIST_OPERATION_CONDITION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007843" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C007844" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008518" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008519" CHECK ("TABLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008520" CHECK ("ORDINAL_POSITION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008521" CHECK ("LIST_OPERATION_CONDITION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008522" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_COLUMN" ADD CONSTRAINT "SYS_C008523" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_CODEGEN_TABLE --- ---------------------------- -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007845" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007846" CHECK ("DATA_SOURCE_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007847" CHECK ("SCENE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007848" CHECK ("TEMPLATE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007849" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C007850" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008524" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008525" CHECK ("DATA_SOURCE_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008526" CHECK ("SCENE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008527" CHECK ("TEMPLATE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008528" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CODEGEN_TABLE" ADD CONSTRAINT "SYS_C008529" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_CONFIG --- ---------------------------- -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C007863" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C007864" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C007865" CHECK ("VISIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C007866" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C007867" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C008530" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C008531" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C008532" CHECK ("VISIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C008533" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_CONFIG" ADD CONSTRAINT "SYS_C008534" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_DATA_SOURCE_CONFIG --- ---------------------------- -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008187" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008188" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008189" CHECK ("URL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008190" CHECK ("USERNAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008191" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008192" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008193" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008194" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008535" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008536" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008537" CHECK ("URL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008538" CHECK ("USERNAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008539" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008540" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008541" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT "SYS_C008542" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_FILE --- ---------------------------- -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C007868" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C007869" CHECK ("SIZE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C007870" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C007871" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C008543" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C008544" CHECK ("SIZE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C008545" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE" ADD CONSTRAINT "SYS_C008546" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_FILE_CONFIG --- ---------------------------- -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C007872" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C007873" CHECK ("STORAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C007874" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C007875" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C008547" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C008548" CHECK ("STORAGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C008549" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONFIG" ADD CONSTRAINT "SYS_C008550" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_FILE_CONTENT --- ---------------------------- -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C007876" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C007877" CHECK ("CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C007878" CHECK ("CONTENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C007879" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C007880" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C008551" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C008552" CHECK ("CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C008553" CHECK ("CONTENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C008554" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_FILE_CONTENT" ADD CONSTRAINT "SYS_C008555" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_JOB --- ---------------------------- -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007881" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007882" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007883" CHECK ("RETRY_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007884" CHECK ("RETRY_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007885" CHECK ("MONITOR_TIMEOUT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007886" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C007887" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008556" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008557" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008558" CHECK ("RETRY_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008559" CHECK ("RETRY_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008560" CHECK ("MONITOR_TIMEOUT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008561" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB" ADD CONSTRAINT "SYS_C008562" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_JOB_LOG --- ---------------------------- -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007894" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007895" CHECK ("JOB_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007896" CHECK ("EXECUTE_INDEX" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007897" CHECK ("BEGIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007898" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007899" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C007900" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008563" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008564" CHECK ("JOB_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008565" CHECK ("EXECUTE_INDEX" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008566" CHECK ("BEGIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008567" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008568" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_JOB_LOG" ADD CONSTRAINT "SYS_C008569" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table INFRA_TEST_DEMO --- ---------------------------- -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007888" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007889" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007890" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007891" CHECK ("CATEGORY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007892" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C007893" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008570" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008571" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008572" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008573" CHECK ("CATEGORY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008574" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "INFRA_TEST_DEMO" ADD CONSTRAINT "SYS_C008575" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table MEMBER_USER --- ---------------------------- -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C007901" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C007902" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C007903" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C007904" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C007905" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C008576" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C008577" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C008578" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C008579" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "MEMBER_USER" ADD CONSTRAINT "SYS_C008580" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_APP --- ---------------------------- -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007906" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007907" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007908" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007909" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007910" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C007911" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008581" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008582" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008583" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008584" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008585" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_APP" ADD CONSTRAINT "SYS_C008586" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_CHANNEL --- ---------------------------- -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007912" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007913" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007914" CHECK ("FEE_RATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007915" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007916" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007917" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007918" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C007919" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008587" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008588" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008589" CHECK ("FEE_RATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008590" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008591" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008592" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008593" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_CHANNEL" ADD CONSTRAINT "SYS_C008594" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_MERCHANT --- ---------------------------- -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C007920" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C007921" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C007922" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C007923" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C007924" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C008595" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C008596" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C008597" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C008598" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_MERCHANT" ADD CONSTRAINT "SYS_C008599" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_NOTIFY_LOG --- ---------------------------- -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007925" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007926" CHECK ("TASK_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007927" CHECK ("NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007928" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007929" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007930" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C007931" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008600" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008601" CHECK ("TASK_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008602" CHECK ("NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008603" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008604" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008605" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_LOG" ADD CONSTRAINT "SYS_C008606" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_NOTIFY_TASK --- ---------------------------- -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007932" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007933" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007934" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007935" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007936" CHECK ("DATA_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007937" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007938" CHECK ("NEXT_NOTIFY_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007939" CHECK ("LAST_EXECUTE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007940" CHECK ("NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007941" CHECK ("MAX_NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007942" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007943" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C007944" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008607" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008608" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008609" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008610" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008611" CHECK ("DATA_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008612" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008613" CHECK ("NEXT_NOTIFY_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008614" CHECK ("LAST_EXECUTE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008615" CHECK ("NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008616" CHECK ("MAX_NOTIFY_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008617" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008618" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_NOTIFY_TASK" ADD CONSTRAINT "SYS_C008619" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_ORDER --- ---------------------------- -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007945" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007946" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007947" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007948" CHECK ("NOTIFY_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007949" CHECK ("AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007950" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007951" CHECK ("EXPIRE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007952" CHECK ("REFUND_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007953" CHECK ("REFUND_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007954" CHECK ("REFUND_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007955" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007956" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C007957" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008620" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008621" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008622" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008623" CHECK ("NOTIFY_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008624" CHECK ("AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008625" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008626" CHECK ("EXPIRE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008627" CHECK ("REFUND_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008628" CHECK ("REFUND_TIMES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008629" CHECK ("REFUND_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008630" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008631" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER" ADD CONSTRAINT "SYS_C008632" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_ORDER_EXTENSION --- ---------------------------- -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007958" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007959" CHECK ("ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007960" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007961" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007962" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007963" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C007964" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008633" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008634" CHECK ("ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008635" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008636" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008637" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008638" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_ORDER_EXTENSION" ADD CONSTRAINT "SYS_C008639" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table PAY_REFUND --- ---------------------------- -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007965" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007966" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007967" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007968" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007969" CHECK ("ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007970" CHECK ("NOTIFY_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007971" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007972" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007973" CHECK ("PAY_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007974" CHECK ("REFUND_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007975" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007976" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C007977" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008640" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008641" CHECK ("MERCHANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008642" CHECK ("APP_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008643" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008644" CHECK ("ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008645" CHECK ("NOTIFY_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008646" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008647" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008648" CHECK ("PAY_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008649" CHECK ("REFUND_AMOUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008650" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008651" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "PAY_REFUND" ADD CONSTRAINT "SYS_C008652" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_BLOB_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "QRTZ_BLOB_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_BLOB_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008266" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008267" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008268" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008653" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008654" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008655" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_CALENDARS --- ---------------------------- -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "QRTZ_CALENDARS_PK" PRIMARY KEY ("SCHED_NAME", "CALENDAR_NAME"); - --- ---------------------------- --- Checks structure for table QRTZ_CALENDARS --- ---------------------------- -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008271" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008272" CHECK ("CALENDAR_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008273" CHECK ("CALENDAR" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008656" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008657" CHECK ("CALENDAR_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008658" CHECK ("CALENDAR" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_CRON_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "QRTZ_CRON_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_CRON_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008255" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008256" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008257" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008258" CHECK ("CRON_EXPRESSION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008659" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008660" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008661" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008662" CHECK ("CRON_EXPRESSION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_FIRED_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "QRTZ_FIRED_TRIGGER_PK" PRIMARY KEY ("SCHED_NAME", "ENTRY_ID"); - --- ---------------------------- --- Checks structure for table QRTZ_FIRED_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008278" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008279" CHECK ("ENTRY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008280" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008281" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008282" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008283" CHECK ("FIRED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008284" CHECK ("SCHED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008285" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008286" CHECK ("STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008663" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008664" CHECK ("ENTRY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008665" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008666" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008667" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008668" CHECK ("FIRED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008669" CHECK ("SCHED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008670" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008671" CHECK ("STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Indexes structure for table QRTZ_FIRED_TRIGGERS --- ---------------------------- -CREATE INDEX "IDX_QRTZ_FT_INST_JOB_REQ_RCVRY" - ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "INSTANCE_NAME" ASC, "REQUESTS_RECOVERY" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_FT_JG" - ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) - LOGGING - ONLINE - NOSORT - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_FT_J_G" - ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "JOB_NAME" ASC, "JOB_GROUP" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_FT_TG" - ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_GROUP" ASC) LOCAL - LOGGING - NOSORT - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); - --- ---------------------------- --- Primary Key structure for table QRTZ_JOB_DETAILS --- ---------------------------- -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "QRTZ_JOB_DETAILS_PK" PRIMARY KEY ("SCHED_NAME", "JOB_NAME", "JOB_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_JOB_DETAILS --- ---------------------------- -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008228" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008229" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008230" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008231" CHECK ("JOB_CLASS_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008232" CHECK ("IS_DURABLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008233" CHECK ("IS_NONCONCURRENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008234" CHECK ("IS_UPDATE_DATA" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008235" CHECK ("REQUESTS_RECOVERY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Indexes structure for table QRTZ_JOB_DETAILS --- ---------------------------- -CREATE INDEX "IDX_QRTZ_J_GRP" - ON "QRTZ_JOB_DETAILS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_J_REQ_RECOVERY" - ON "QRTZ_JOB_DETAILS" ("SCHED_NAME" ASC, "REQUESTS_RECOVERY" ASC) LOCAL - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); - --- ---------------------------- --- Primary Key structure for table QRTZ_LOCKS --- ---------------------------- -ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "QRTZ_LOCKS_PK" PRIMARY KEY ("SCHED_NAME", "LOCK_NAME"); - --- ---------------------------- --- Checks structure for table QRTZ_LOCKS --- ---------------------------- -ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008293" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008294" CHECK ("LOCK_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008672" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008673" CHECK ("LOCK_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "QRTZ_PAUSED_TRIG_GRPS_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008275" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008276" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008674" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008675" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_SCHEDULER_STATE --- ---------------------------- -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "QRTZ_SCHEDULER_STATE_PK" PRIMARY KEY ("SCHED_NAME", "INSTANCE_NAME"); - --- ---------------------------- --- Checks structure for table QRTZ_SCHEDULER_STATE --- ---------------------------- -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008288" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008289" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008290" CHECK ("LAST_CHECKIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008291" CHECK ("CHECKIN_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008676" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008677" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008678" CHECK ("LAST_CHECKIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008679" CHECK ("CHECKIN_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPLE_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008247" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008248" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008249" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008250" CHECK ("REPEAT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008251" CHECK ("REPEAT_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008252" CHECK ("TIMES_TRIGGERED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008680" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008681" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008682" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008683" CHECK ("REPEAT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008684" CHECK ("REPEAT_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008685" CHECK ("TIMES_TRIGGERED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPROP_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008261" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008262" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008263" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008686" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008687" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008688" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table QRTZ_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "QRTZ_TRIGGERS_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); - --- ---------------------------- --- Checks structure for table QRTZ_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008237" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008238" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008239" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008240" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008241" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008242" CHECK ("TRIGGER_STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008243" CHECK ("TRIGGER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008244" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008689" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008690" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008691" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008692" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008693" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008694" CHECK ("TRIGGER_STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008695" CHECK ("TRIGGER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008696" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Indexes structure for table QRTZ_TRIGGERS --- ---------------------------- -CREATE INDEX "IDX_QRTZ_T_C" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "CALENDAR_NAME" ASC) LOCAL - LOGGING - ONLINE - NOSORT - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_J" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "JOB_NAME" ASC, "JOB_GROUP" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_JG" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) LOCAL - LOGGING - ONLINE - NOSORT - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_NEXT_FIRE_TIME" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "NEXT_FIRE_TIME" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_NFT_ST" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_STATE" ASC, "NEXT_FIRE_TIME" ASC) LOCAL - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_NFT_ST_MISFIRE" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "MISFIRE_INSTR" ASC, "NEXT_FIRE_TIME" ASC, "TRIGGER_STATE" ASC) LOCAL - LOGGING - ONLINE - NOSORT - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); -CREATE INDEX "IDX_QRTZ_T_STATE" - ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_STATE" ASC) - LOGGING - VISIBLE -PCTFREE 10 -INITRANS 2 -STORAGE ( - INITIAL 65536 - NEXT 1048576 - MINEXTENTS 1 - MAXEXTENTS 2147483645 - FREELISTS 1 - FREELIST GROUPS 1 - BUFFER_POOL DEFAULT -); - --- ---------------------------- --- Checks structure for table SYSTEM_DEPT --- ---------------------------- -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008030" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008031" CHECK ("PARENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008032" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008033" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008034" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008035" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008036" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008206" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008697" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008698" CHECK ("PARENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008699" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008700" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008701" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008702" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008703" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DEPT" ADD CONSTRAINT "SYS_C008704" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_DICT_DATA --- ---------------------------- -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008037" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008038" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008039" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008040" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008041" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008207" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008705" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008706" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008707" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008708" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008709" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_DATA" ADD CONSTRAINT "SYS_C008710" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_DICT_TYPE --- ---------------------------- -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008042" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008043" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008044" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008045" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008208" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008711" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008712" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008713" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008714" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_DICT_TYPE" ADD CONSTRAINT "SYS_C008715" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_ERROR_CODE --- ---------------------------- -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008046" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008047" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008048" CHECK ("CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008049" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008050" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008209" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008716" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008717" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008718" CHECK ("CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008719" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008720" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ERROR_CODE" ADD CONSTRAINT "SYS_C008721" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_LOGIN_LOG --- ---------------------------- -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008056" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008057" CHECK ("LOG_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008058" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008059" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008060" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008061" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008062" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008063" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008210" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008722" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008723" CHECK ("LOG_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008724" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008725" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008726" CHECK ("RESULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008727" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008728" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008729" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_LOGIN_LOG" ADD CONSTRAINT "SYS_C008730" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_MENU --- ---------------------------- -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009625" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009626" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009628" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009629" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009630" CHECK ("PARENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009631" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009632" CHECK ("VISIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009633" CHECK ("KEEP_ALIVE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009634" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009635" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_MENU" ADD CONSTRAINT "SYS_C009636" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_NOTICE --- ---------------------------- -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009566" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009567" CHECK ("CONTENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009568" CHECK ("NOTICE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009569" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009570" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009571" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009572" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_NOTICE" ADD CONSTRAINT "SYS_C009573" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table SYSTEM_OAUTH2_ACCESS_TOKEN --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008444" PRIMARY KEY ("ID"); - --- ---------------------------- --- Checks structure for table SYSTEM_OAUTH2_ACCESS_TOKEN --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008418" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008419" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008420" CHECK ("ACCESS_TOKEN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008421" CHECK ("REFRESH_TOKEN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008422" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008423" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008424" CHECK ("EXPIRES_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008425" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008426" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008427" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT "SYS_C008428" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_OAUTH2_APPROVE --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009679" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009691" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009692" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009693" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009694" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009695" CHECK ("APPROVED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009696" CHECK ("EXPIRES_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009697" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009698" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009699" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT "SYS_C009700" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table SYSTEM_OAUTH2_CLIENT --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008445" PRIMARY KEY ("ID"); - --- ---------------------------- --- Checks structure for table SYSTEM_OAUTH2_CLIENT --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008429" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008430" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008431" CHECK ("SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008432" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008433" CHECK ("LOGO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008434" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008435" CHECK ("ACCESS_TOKEN_VALIDITY_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008436" CHECK ("REFRESH_TOKEN_VALIDITY_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008437" CHECK ("REDIRECT_URIS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008439" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008440" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008441" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT "SYS_C008442" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_OAUTH2_CODE --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009680" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009681" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009682" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009683" CHECK ("CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009684" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009685" CHECK ("EXPIRES_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009687" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009688" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009689" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_CODE" ADD CONSTRAINT "SYS_C009690" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Primary Key structure for table SYSTEM_OAUTH2_REFRESH_TOKEN --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008443" PRIMARY KEY ("ID"); - --- ---------------------------- --- Checks structure for table SYSTEM_OAUTH2_REFRESH_TOKEN --- ---------------------------- -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008408" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008409" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008410" CHECK ("REFRESH_TOKEN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008411" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008412" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008413" CHECK ("EXPIRES_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008414" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008415" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008416" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT "SYS_C008417" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_OPERATE_LOG --- ---------------------------- -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009574" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009575" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009576" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009577" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009578" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009579" CHECK ("DURATION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009580" CHECK ("RESULT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009581" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009582" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009583" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_OPERATE_LOG" ADD CONSTRAINT "SYS_C009584" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_POST --- ---------------------------- -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009585" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009586" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009587" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009588" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009589" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009590" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_POST" ADD CONSTRAINT "SYS_C009591" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_ROLE --- ---------------------------- -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009592" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009593" CHECK ("SORT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009594" CHECK ("DATA_SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009595" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009596" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009597" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009598" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009599" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE" ADD CONSTRAINT "SYS_C009600" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_ROLE_MENU --- ---------------------------- -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008108" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008109" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008110" CHECK ("MENU_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008111" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008112" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008113" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008218" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008776" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008777" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008778" CHECK ("MENU_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008779" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008780" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008781" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_ROLE_MENU" ADD CONSTRAINT "SYS_C008782" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_SENSITIVE_WORD --- ---------------------------- -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008102" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008103" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008104" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008105" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008106" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008107" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008783" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008784" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008785" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008786" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008787" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT "SYS_C008788" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_SMS_CHANNEL --- ---------------------------- -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008114" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008115" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008116" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008117" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008219" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008789" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008790" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008791" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008792" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CHANNEL" ADD CONSTRAINT "SYS_C008793" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_SMS_CODE --- ---------------------------- -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008118" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008119" CHECK ("SCENE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008120" CHECK ("TODAY_INDEX" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008121" CHECK ("USED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008122" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008123" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008124" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008220" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008794" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008795" CHECK ("SCENE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008796" CHECK ("TODAY_INDEX" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008797" CHECK ("USED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008798" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008799" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008800" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_CODE" ADD CONSTRAINT "SYS_C008801" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_SMS_LOG --- ---------------------------- -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008125" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008126" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008127" CHECK ("TEMPLATE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008128" CHECK ("TEMPLATE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008129" CHECK ("SEND_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008130" CHECK ("RECEIVE_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008131" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008132" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008221" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008802" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008803" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008804" CHECK ("TEMPLATE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008805" CHECK ("TEMPLATE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008806" CHECK ("SEND_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008807" CHECK ("RECEIVE_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008808" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008809" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_LOG" ADD CONSTRAINT "SYS_C008810" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; --- ---------------------------- --- Checks structure for table SYSTEM_SMS_TEMPLATE --- ---------------------------- -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008133" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008134" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008135" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008136" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008137" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008138" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008222" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008811" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008812" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008813" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008814" CHECK ("CHANNEL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008815" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008816" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT "SYS_C008817" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_SOCIAL_USER --- ---------------------------- -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008139" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008140" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008141" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008142" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008143" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008144" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008145" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008223" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008818" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008819" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008820" CHECK ("USER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008821" CHECK ("TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008822" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008823" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008824" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_SOCIAL_USER" ADD CONSTRAINT "SYS_C008825" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_TENANT --- ---------------------------- -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008146" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008147" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008148" CHECK ("PACKAGE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008149" CHECK ("EXPIRE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008150" CHECK ("ACCOUNT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008151" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008152" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008224" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008826" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008827" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008828" CHECK ("PACKAGE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008829" CHECK ("EXPIRE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008830" CHECK ("ACCOUNT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008831" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008832" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT" ADD CONSTRAINT "SYS_C008833" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_TENANT_PACKAGE --- ---------------------------- -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008153" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008154" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008155" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008156" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008197" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008834" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008835" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008836" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008837" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT "SYS_C008838" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_USERS --- ---------------------------- -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008157" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008158" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008159" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008160" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008161" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008227" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008839" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008840" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008841" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008842" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008843" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USERS" ADD CONSTRAINT "SYS_C008844" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_USER_POST --- ---------------------------- -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008302" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008303" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008304" CHECK ("POST_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008305" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008306" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008307" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008308" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008845" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008846" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008847" CHECK ("POST_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008848" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008849" CHECK ("UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008850" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_POST" ADD CONSTRAINT "SYS_C008851" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Checks structure for table SYSTEM_USER_ROLE --- ---------------------------- -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008162" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008163" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008164" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008165" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008226" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008852" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008853" CHECK ("USER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008854" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008855" CHECK ("TENANT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; -ALTER TABLE "SYSTEM_USER_ROLE" ADD CONSTRAINT "SYS_C008856" CHECK ("DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Foreign Keys structure for table QRTZ_BLOB_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "QRTZ_BLOB_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Foreign Keys structure for table QRTZ_CRON_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "QRTZ_CRON_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Foreign Keys structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPLE_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; - --- ---------------------------- --- Foreign Keys structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPROP_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 45597f3778..20e84b8143 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -46,10 +46,10 @@ spring: primary: master datasource: master: -# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 - url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # PostgreSQL 连接的示例 -# url: jdbc:oracle:thin:@127.0.0.1:1521:XEPDB1 # Oracle 连接的示例 +# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # PostgreSQL 连接的示例 +# url: jdbc:oracle:thin:@//127.0.0.1:1521/XEPDB1 # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root @@ -62,9 +62,10 @@ spring: lazy: true # 开启懒加载,保证启动速度 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 -# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 -# url: jdbc:oracle:thin:@127.0.0.1:1521:XEPDB1 # Oracle 连接的示例 +# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # PostgreSQL 连接的示例 +# url: jdbc:oracle:thin:@//127.0.0.1:1521/XEPDB1 # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 +# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root password: 123456 # username: sa # SQLServer 连接的示例 -- Gitee From 39c9a6883f8bc6df5a55d7ffbd39f33ce0351328 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 00:21:52 +0800 Subject: [PATCH 0425/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91R?= =?UTF-8?q?EADME=EF=BC=8C=E5=B0=86=E7=89=88=E6=9C=AC=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=8F=90=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index cf023ea79f..a924b41202 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,18 @@ * 启动文档: * 视频教程: +## 🐰 版本说明 + +| 版本 | 仓库 | JDK 8 + Spring Boot 2.7.18 | JDK 17(21) + Spring Boot 3.2.0 | +|-------|----------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------| +| 【完整版】 | [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 | +| 【精简版】 | [yudao-boot-mini](https://gitee.com/yudaocode/yudao-boot-mini) | [`master`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master-jdk17/) 分支 | + +* 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能 +* 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能 + +可参考 [《迁移文档》](https://doc.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】 + ## 🐯 平台简介 **芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。 @@ -31,7 +43,7 @@ ![架构图](/.image/common/ruoyi-vue-pro-architecture.png) -* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7.18,`master-jdk21` 分支为 JDK21 + Spring Boot 3.2.0 +* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7.18,`master-jdk17` 分支为 JDK 17(21) + Spring Boot 3.2.0 * 管理后台的电脑端:Vue3 提供 `element-plus`、`vben(ant-design-vue)` 两个版本,Vue2 提供 `element-ui` 版本 * 管理后台的移动端:采用 `uni-app` 方案,一份代码多终端适配,同时支持 APP、小程序、H5! * 后端采用 Spring Boot 多模块架构、MySQL + MyBatis Plus、Redis + Redisson @@ -72,28 +84,6 @@ | [yudao-ui-admin-uniapp](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-uniapp/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-uniapp.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-uniapp) | 基于 Vue2 + element-ui 实现的管理后台 | | [yudao-ui-go-view](https://gitee.com/yudaocode/yudao-ui-go-view) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-go-view/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-go-view) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-go-view.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-go-view) | 基于 Vue3 + naive-ui 实现的大屏报表 | -## 🐰 分支说明 - -### ⬅️ 完整版 - -【完整版】包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM 等功能 - -* JDK 8 + Spring Boot 2.7.18 版本: 的 `master` 分支 -* JDK 21 + Spring Boot 3.2.0 版本: 的 `master-jdk21` 分支 - -两个分支的功能是一致的,可以放心使用! - -### ➡️️ 精简版 - -【精简版】只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM 等功能 - -* JDK 8 + Spring Boot 2.7.18 版本: 的 `master` 分支 -* JDK 21 + Spring Boot 3.2.0 版本: 的 `master-jdk21` 分支 - -如果你想把【完整版】的功能,迁移到【精简版】,可以参考 [《迁移功能到精简版》](https://doc.iocoder.cn/migrate-module/) 文档。 - -如果你想把【完整版】的功能,迁移到【精简版】,可以参考 [《迁移功能到精简版》](https://doc.iocoder.cn/migrate-module/) 文档。 - ## 😎 开源协议 **为什么推荐使用本项目?** @@ -120,16 +110,9 @@ ![功能分层](/.image/common/ruoyi-vue-pro-biz.png) -* 系统功能 -* 基础设施 -* 工作流程 -* 支付系统 -* 会员中心 -* 数据报表 -* 商城系统 -* 微信公众号 -* ERP 系统 -* CRM 系统 +* 通用模块(必选):系统功能、基础设施 +* 通用模块(可选):工作流程、支付系统、数据报表、会员中心 +* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号 > 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。 > -- Gitee From 14c1b58fb84c96b4b47c55e73654d19b7ffb58f4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 00:24:05 +0800 Subject: [PATCH 0426/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91R?= =?UTF-8?q?EADME=EF=BC=8C=E5=B0=86=E7=89=88=E6=9C=AC=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=8F=90=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a924b41202..25787ad256 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ ## 🐰 版本说明 -| 版本 | 仓库 | JDK 8 + Spring Boot 2.7.18 | JDK 17(21) + Spring Boot 3.2.0 | -|-------|----------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------| -| 【完整版】 | [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 | -| 【精简版】 | [yudao-boot-mini](https://gitee.com/yudaocode/yudao-boot-mini) | [`master`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master-jdk17/) 分支 | +| 版本 | JDK 8 + Spring Boot 2.7.18 | JDK 17(21) + Spring Boot 3.2.0 | +|---------------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------| +| 【完整版】[ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 | +| 【精简版】[yudao-boot-mini](https://gitee.com/yudaocode/yudao-boot-mini) | [`master`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master-jdk17/) 分支 | * 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能 * 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能 -- Gitee From b380b5b8a34536058fac7d09e478067b577de71e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 00:26:28 +0800 Subject: [PATCH 0427/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91R?= =?UTF-8?q?EADME=EF=BC=8C=E5=B0=86=E7=89=88=E6=9C=AC=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=8F=90=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25787ad256..e96cd50676 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ## 🐰 版本说明 -| 版本 | JDK 8 + Spring Boot 2.7.18 | JDK 17(21) + Spring Boot 3.2.0 | +| 版本 | JDK 8 + Spring Boot 2.7 | JDK 17/21 + Spring Boot 3.2 | |---------------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------| | 【完整版】[ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 | | 【精简版】[yudao-boot-mini](https://gitee.com/yudaocode/yudao-boot-mini) | [`master`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master-jdk17/) 分支 | @@ -43,7 +43,7 @@ ![架构图](/.image/common/ruoyi-vue-pro-architecture.png) -* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7.18,`master-jdk17` 分支为 JDK 17(21) + Spring Boot 3.2.0 +* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7,`master-jdk17` 分支为 JDK 17/21 + Spring Boot 3.2 * 管理后台的电脑端:Vue3 提供 `element-plus`、`vben(ant-design-vue)` 两个版本,Vue2 提供 `element-ui` 版本 * 管理后台的移动端:采用 `uni-app` 方案,一份代码多终端适配,同时支持 APP、小程序、H5! * 后端采用 Spring Boot 多模块架构、MySQL + MyBatis Plus、Redis + Redisson -- Gitee From 1c9b5ddae9503c1b62394f0d956e50833b7ad8cf Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 01:21:34 +0800 Subject: [PATCH 0428/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E9=99=8D=E4=BD=8E=20JDK=2021=20=E6=9C=80=E4=BD=8E=E5=88=B0=201?= =?UTF-8?q?7=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../common/util/date/LocalDateTimeUtils.java | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index d7a0ad627a..f337c4a483 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.0.1-snapshot - 21 + 17 ${java.version} ${java.version} 3.2.2 diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java index acc93ad8c9..c3b3b53fbb 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java @@ -227,27 +227,27 @@ public class LocalDateTimeUtils { // 2. 循环,生成时间范围 List timeRanges = new ArrayList<>(); switch (intervalEnum) { - case DateIntervalEnum.DAY: + case DAY: while (startTime.isBefore(endTime)) { timeRanges.add(new LocalDateTime[]{startTime, startTime.plusDays(1).minusNanos(1)}); startTime = startTime.plusDays(1); } break; - case DateIntervalEnum.WEEK: + case WEEK: while (startTime.isBefore(endTime)) { LocalDateTime endOfWeek = startTime.with(DayOfWeek.SUNDAY).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfWeek}); startTime = endOfWeek.plusNanos(1); } break; - case DateIntervalEnum.MONTH: + case MONTH: while (startTime.isBefore(endTime)) { LocalDateTime endOfMonth = startTime.with(TemporalAdjusters.lastDayOfMonth()).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfMonth}); startTime = endOfMonth.plusNanos(1); } break; - case DateIntervalEnum.QUARTER: + case QUARTER: while (startTime.isBefore(endTime)) { int quarterOfYear = getQuarterOfYear(startTime); LocalDateTime quarterEnd = quarterOfYear == 4 @@ -257,7 +257,7 @@ public class LocalDateTimeUtils { startTime = quarterEnd.plusNanos(1); } break; - case DateIntervalEnum.YEAR: + case YEAR: while (startTime.isBefore(endTime)) { LocalDateTime endOfYear = startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, endOfYear}); @@ -290,16 +290,16 @@ public class LocalDateTimeUtils { // 2. 循环,生成时间范围 switch (intervalEnum) { - case DateIntervalEnum.DAY: + case DAY: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN); - case DateIntervalEnum.WEEK: + case WEEK: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN) + StrUtil.format("(第 {} 周)", LocalDateTimeUtil.weekOfYear(startTime)); - case DateIntervalEnum.MONTH: + case MONTH: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_MONTH_PATTERN); - case DateIntervalEnum.QUARTER: + case QUARTER: return StrUtil.format("{}-Q{}", startTime.getYear(), getQuarterOfYear(startTime)); - case DateIntervalEnum.YEAR: + case YEAR: return LocalDateTimeUtil.format(startTime, DatePattern.NORM_YEAR_PATTERN); default: throw new IllegalArgumentException("Invalid interval: " + interval); -- Gitee From c6eed9a6360995c56abccd25f594351e53cd54d0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 08:17:23 +0800 Subject: [PATCH 0429/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91O?= =?UTF-8?q?racle=20=E8=87=AA=E5=B8=A6=E7=B3=BB=E7=BB=9F=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/service/db/DatabaseTableServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java index cc995dd74d..c1c9d3edee 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java @@ -49,12 +49,15 @@ public class DatabaseTableServiceImpl implements DatabaseTableService { // 使用 MyBatis Plus Generator 解析表结构 DataSourceConfig dataSourceConfig = new DataSourceConfig.Builder(config.getUrl(), config.getUsername(), config.getPassword()).build(); - StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder(); + StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder().enableSkipView(); // 忽略视图,业务上一般用不到 if (StrUtil.isNotEmpty(name)) { strategyConfig.addInclude(name); } else { - // 移除工作流和定时任务前缀的表名 // TODO 未来做成可配置 + // 移除工作流和定时任务前缀的表名 strategyConfig.addExclude("ACT_[\\S\\s]+|QRTZ_[\\S\\s]+|FLW_[\\S\\s]+"); + // 移除 ORACLE 相关的系统表 + strategyConfig.addExclude("IMPDP_[\\S\\s]+|ALL_[\\S\\s]+|HS_[\\S\\\\s]+"); + strategyConfig.addExclude("[\\S\\s]+\\$[\\S\\s]+|[\\S\\s]+\\$"); // 表里不能有 $,一般有都是系统的表 } GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 LocalDateTime 类型,不使用 LocalDate -- Gitee From bbfff1bae329b23a8ea88d4a192e9422fde7949a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 19:09:12 +0800 Subject: [PATCH 0430/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=B3=BB=E7=BB=9F=EF=BC=9A=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E6=97=B6=EF=BC=8C=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BB=84=E4=BB=B6=E8=BF=94=E5=9B=9E=E7=9A=84=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=8C=89=E7=85=A7=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E9=A1=BA=E5=BA=8F=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/product/service/spu/ProductSpuServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java index 9986c7e613..c98d7f3acd 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java @@ -192,7 +192,9 @@ public class ProductSpuServiceImpl implements ProductSpuService { if (CollUtil.isEmpty(ids)) { return Collections.emptyList(); } - return productSpuMapper.selectBatchIds(ids); + Map spuMap = convertMap(productSpuMapper.selectBatchIds(ids), ProductSpuDO::getId); + // 需要按照 ids 顺序返回。例如说:店铺装修选择了 [3, 1, 2] 三个商品,返回结果还是 [3, 1, 2] 这样的顺序 + return convertList(ids, spuMap::get); } @Override -- Gitee From dae4e64a646988bb58d52d42a737f8bdc175ad95 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 23:36:44 +0800 Subject: [PATCH 0431/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=B3=BB=E7=BB=9F=EF=BC=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8F=91=E6=94=BE=E4=BC=98=E6=83=A0=E5=8A=B5?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=8F=AA=E8=83=BD=E5=8F=91=E9=80=81=E6=9C=AA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=87=E6=9C=89=E6=95=88=E6=9C=9F=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/dal/mysql/coupon/CouponTemplateMapper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java index dc703d881e..50e3c03153 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java @@ -7,12 +7,12 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template.CouponTemplatePageReqVO; import cn.iocoder.yudao.module.promotion.dal.dataobject.coupon.CouponTemplateDO; +import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTemplateValidityTypeEnum; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import org.apache.ibatis.annotations.Mapper; import java.time.LocalDateTime; -import java.util.Collection; import java.util.List; import java.util.function.Consumer; @@ -68,9 +68,9 @@ public interface CouponTemplateMapper extends BaseMapperX { canTakeConsumer = w -> w.eq(CouponTemplateDO::getStatus, CommonStatusEnum.ENABLE.getStatus()) // 1. 状态为可用的 .in(CouponTemplateDO::getTakeType, canTakeTypes) // 2. 领取方式一致 - .and(ww -> ww.isNull(CouponTemplateDO::getValidEndTime) // 3. 未过期 - .or().gt(CouponTemplateDO::getValidEndTime, LocalDateTime.now())) - .apply(" take_count < total_count "); // 4. 剩余数量大于 0 + .and(ww -> ww.gt(CouponTemplateDO::getValidEndTime, LocalDateTime.now()) // 3.1 未过期 + .or().eq(CouponTemplateDO::getValidityType, CouponTemplateValidityTypeEnum.TERM.getType())) // 3.2 领取之后 + .apply(" (take_count < total_count OR total_count = -1 )"); // 4. 剩余数量大于 0,或者无限领取 } return canTakeConsumer; } -- Gitee From 7e47d2efbb8ab90f64ccf8b76f077682bcba0b4d Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 1 May 2024 23:49:09 +0800 Subject: [PATCH 0432/1557] =?UTF-8?q?feat:=20=E5=B0=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=B7=A5=E5=85=B7=E8=BF=81=E7=A7=BB=E8=87=B3sql/tools?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/{docker => tools}/docker-compose.yaml | 1 + sql/{docker => tools}/oracle/1_create_user.sql | 0 sql/{docker => tools}/oracle/2_create_schema.sh | 0 sql/{docker => tools}/sqlserver/create_schema.sh | 0 4 files changed, 1 insertion(+) rename sql/{docker => tools}/docker-compose.yaml (98%) rename sql/{docker => tools}/oracle/1_create_user.sql (100%) rename sql/{docker => tools}/oracle/2_create_schema.sh (100%) rename sql/{docker => tools}/sqlserver/create_schema.sh (100%) diff --git a/sql/docker/docker-compose.yaml b/sql/tools/docker-compose.yaml similarity index 98% rename from sql/docker/docker-compose.yaml rename to sql/tools/docker-compose.yaml index 64e578ff0c..4cc064dcf1 100644 --- a/sql/docker/docker-compose.yaml +++ b/sql/tools/docker-compose.yaml @@ -43,6 +43,7 @@ services: oracle: image: gvenzl/oracle-xe:18-slim-faststart + restart: unless-stopped environment: ## 登录信息 SID: XE user: system password: oracle ORACLE_PASSWORD: oracle diff --git a/sql/docker/oracle/1_create_user.sql b/sql/tools/oracle/1_create_user.sql similarity index 100% rename from sql/docker/oracle/1_create_user.sql rename to sql/tools/oracle/1_create_user.sql diff --git a/sql/docker/oracle/2_create_schema.sh b/sql/tools/oracle/2_create_schema.sh similarity index 100% rename from sql/docker/oracle/2_create_schema.sh rename to sql/tools/oracle/2_create_schema.sh diff --git a/sql/docker/sqlserver/create_schema.sh b/sql/tools/sqlserver/create_schema.sh similarity index 100% rename from sql/docker/sqlserver/create_schema.sh rename to sql/tools/sqlserver/create_schema.sh -- Gitee From 977a250f1aaa66d42fc72b0bf58c5a504cdb5949 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 2 May 2024 00:34:25 +0800 Subject: [PATCH 0433/1557] =?UTF-8?q?fix:=20Postgres/Oracle=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=AD=97=E6=AE=B5=E6=B3=A8=E9=87=8A=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/oracle/ruoyi-vue-pro.sql | 2676 ++++++------------------- sql/postgresql/ruoyi-vue-pro.sql | 3129 +++++++++--------------------- 2 files changed, 1543 insertions(+), 4262 deletions(-) diff --git a/sql/oracle/ruoyi-vue-pro.sql b/sql/oracle/ruoyi-vue-pro.sql index ca79b5ed04..9fbf8d5ad7 100644 --- a/sql/oracle/ruoyi-vue-pro.sql +++ b/sql/oracle/ruoyi-vue-pro.sql @@ -1,6 +1,17 @@ +/* + Yudao Database Transfer Tool + + Source Server Type : MySQL + + Target Server Type : Oracle + + Date: 2024-05-02 00:10:33 +*/ + + +-- ---------------------------- +-- Table structure for infra_api_access_log -- ---------------------------- --- infra_api_access_log --- ------------------------------ CREATE TABLE infra_api_access_log ( id number NOT NULL, @@ -36,9 +47,12 @@ ALTER TABLE infra_api_access_log CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); COMMENT ON COLUMN infra_api_access_log.id IS '日志主键'; +COMMENT ON COLUMN infra_api_access_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN infra_api_access_log.user_id IS '用户编号'; COMMENT ON COLUMN infra_api_access_log.user_type IS '用户类型'; COMMENT ON COLUMN infra_api_access_log.application_name IS '应用名'; +COMMENT ON COLUMN infra_api_access_log.request_method IS '请求方法名'; +COMMENT ON COLUMN infra_api_access_log.request_url IS '请求地址'; COMMENT ON COLUMN infra_api_access_log.request_params IS '请求参数'; COMMENT ON COLUMN infra_api_access_log.response_body IS '响应结果'; COMMENT ON COLUMN infra_api_access_log.user_ip IS '用户 IP'; @@ -50,19 +64,21 @@ COMMENT ON COLUMN infra_api_access_log.begin_time IS '开始请求时间'; COMMENT ON COLUMN infra_api_access_log.end_time IS '结束请求时间'; COMMENT ON COLUMN infra_api_access_log.duration IS '执行时长'; COMMENT ON COLUMN infra_api_access_log.result_code IS '结果码'; +COMMENT ON COLUMN infra_api_access_log.result_msg IS '结果提示'; +COMMENT ON COLUMN infra_api_access_log.creator IS '创建者'; COMMENT ON COLUMN infra_api_access_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_access_log.updater IS '更新者'; COMMENT ON COLUMN infra_api_access_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; CREATE SEQUENCE infra_api_access_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_api_error_log --- ------------------------------ +-- Table structure for infra_api_error_log +-- ---------------------------- CREATE TABLE infra_api_error_log ( id number NOT NULL, @@ -113,6 +129,9 @@ COMMENT ON COLUMN infra_api_error_log.request_params IS '请求参数'; COMMENT ON COLUMN infra_api_error_log.user_ip IS '用户 IP'; COMMENT ON COLUMN infra_api_error_log.user_agent IS '浏览器 UA'; COMMENT ON COLUMN infra_api_error_log.exception_time IS '异常发生时间'; +COMMENT ON COLUMN infra_api_error_log.exception_name IS '异常名 + * + * {@link Throwable#getClass()} 的类全名'; COMMENT ON COLUMN infra_api_error_log.exception_message IS '异常导致的消息 * * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; @@ -137,19 +156,20 @@ COMMENT ON COLUMN infra_api_error_log.exception_line_number IS '异常发生的 COMMENT ON COLUMN infra_api_error_log.process_status IS '处理状态'; COMMENT ON COLUMN infra_api_error_log.process_time IS '处理时间'; COMMENT ON COLUMN infra_api_error_log.process_user_id IS '处理用户编号'; +COMMENT ON COLUMN infra_api_error_log.creator IS '创建者'; COMMENT ON COLUMN infra_api_error_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_error_log.updater IS '更新者'; COMMENT ON COLUMN infra_api_error_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; CREATE SEQUENCE infra_api_error_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_codegen_column --- ------------------------------ +-- Table structure for infra_codegen_column +-- ---------------------------- CREATE TABLE infra_codegen_column ( id number NOT NULL, @@ -190,24 +210,27 @@ COMMENT ON COLUMN infra_codegen_column.primary_key IS '是否主键'; COMMENT ON COLUMN infra_codegen_column.ordinal_position IS '排序'; COMMENT ON COLUMN infra_codegen_column.java_type IS 'Java 属性类型'; COMMENT ON COLUMN infra_codegen_column.java_field IS 'Java 属性名'; +COMMENT ON COLUMN infra_codegen_column.dict_type IS '字典类型'; COMMENT ON COLUMN infra_codegen_column.example IS '数据示例'; COMMENT ON COLUMN infra_codegen_column.create_operation IS '是否为 Create 创建操作的字段'; COMMENT ON COLUMN infra_codegen_column.update_operation IS '是否为 Update 更新操作的字段'; COMMENT ON COLUMN infra_codegen_column.list_operation IS '是否为 List 查询操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation_condition IS 'List 查询操作的条件类型'; COMMENT ON COLUMN infra_codegen_column.list_operation_result IS '是否为 List 查询操作的返回字段'; COMMENT ON COLUMN infra_codegen_column.html_type IS '显示类型'; +COMMENT ON COLUMN infra_codegen_column.creator IS '创建者'; COMMENT ON COLUMN infra_codegen_column.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_column.updater IS '更新者'; COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除'; COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; CREATE SEQUENCE infra_codegen_column_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_codegen_table --- ------------------------------ +-- Table structure for infra_codegen_table +-- ---------------------------- CREATE TABLE infra_codegen_table ( id number NOT NULL, @@ -242,9 +265,12 @@ ALTER TABLE infra_codegen_table COMMENT ON COLUMN infra_codegen_table.id IS '编号'; COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS '数据源配置的编号'; COMMENT ON COLUMN infra_codegen_table.scene IS '生成场景'; +COMMENT ON COLUMN infra_codegen_table.table_name IS '表名称'; +COMMENT ON COLUMN infra_codegen_table.table_comment IS '表描述'; COMMENT ON COLUMN infra_codegen_table.remark IS '备注'; COMMENT ON COLUMN infra_codegen_table.module_name IS '模块名'; COMMENT ON COLUMN infra_codegen_table.business_name IS '业务名'; +COMMENT ON COLUMN infra_codegen_table.class_name IS '类名称'; COMMENT ON COLUMN infra_codegen_table.class_comment IS '类描述'; COMMENT ON COLUMN infra_codegen_table.author IS '作者'; COMMENT ON COLUMN infra_codegen_table.template_type IS '模板类型'; @@ -255,18 +281,19 @@ COMMENT ON COLUMN infra_codegen_table.sub_join_column_id IS '子表关联主表 COMMENT ON COLUMN infra_codegen_table.sub_join_many IS '主表与子表是否一对多'; COMMENT ON COLUMN infra_codegen_table.tree_parent_column_id IS '树表的父字段编号'; COMMENT ON COLUMN infra_codegen_table.tree_name_column_id IS '树表的名字字段编号'; +COMMENT ON COLUMN infra_codegen_table.creator IS '创建者'; COMMENT ON COLUMN infra_codegen_table.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_table.updater IS '更新者'; COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除'; COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; CREATE SEQUENCE infra_codegen_table_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_config --- ------------------------------ +-- Table structure for infra_config +-- ---------------------------- CREATE TABLE infra_config ( id number NOT NULL, @@ -290,12 +317,21 @@ ALTER TABLE infra_config COMMENT ON COLUMN infra_config.id IS '参数主键'; COMMENT ON COLUMN infra_config.category IS '参数分组'; COMMENT ON COLUMN infra_config.type IS '参数类型'; +COMMENT ON COLUMN infra_config.name IS '参数名称'; +COMMENT ON COLUMN infra_config.config_key IS '参数键名'; +COMMENT ON COLUMN infra_config.value IS '参数键值'; COMMENT ON COLUMN infra_config.visible IS '是否可见'; COMMENT ON COLUMN infra_config.remark IS '备注'; +COMMENT ON COLUMN infra_config.creator IS '创建者'; COMMENT ON COLUMN infra_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_config.updater IS '更新者'; COMMENT ON COLUMN infra_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_config.deleted IS '是否删除'; COMMENT ON TABLE infra_config IS '参数配置表'; +-- ---------------------------- +-- Records of infra_config +-- ---------------------------- -- @formatter:off INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', '0', '初始化密码 123456', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-03 17:22:28', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', '1', '', '1', to_date('2023-04-07 13:41:16', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-07 14:33:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -308,13 +344,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE infra_config_seq - START WITH 13 - INCREMENT BY 1; - + START WITH 13; -- ---------------------------- --- infra_data_source_config --- ------------------------------ +-- Table structure for infra_data_source_config +-- ---------------------------- CREATE TABLE infra_data_source_config ( id number NOT NULL, @@ -333,232 +367,23 @@ ALTER TABLE infra_data_source_config ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); COMMENT ON COLUMN infra_data_source_config.id IS '主键编号'; +COMMENT ON COLUMN infra_data_source_config.name IS '参数名称'; COMMENT ON COLUMN infra_data_source_config.url IS '数据源连接'; COMMENT ON COLUMN infra_data_source_config.username IS '用户名'; +COMMENT ON COLUMN infra_data_source_config.password IS '密码'; +COMMENT ON COLUMN infra_data_source_config.creator IS '创建者'; COMMENT ON COLUMN infra_data_source_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_data_source_config.updater IS '更新者'; COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除'; COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; CREATE SEQUENCE infra_data_source_config_seq - START WITH 1 - INCREMENT BY 1; - - --- ---------------------------- --- infra_demo01_contact --- ------------------------------ -CREATE TABLE infra_demo01_contact -( - id number NOT NULL, - name varchar2(100) DEFAULT '' NULL, - sex smallint NOT NULL, - birthday date NOT NULL, - description varchar2(255) NOT NULL, - avatar varchar2(512) DEFAULT NULL NULL, - creator varchar2(64) DEFAULT '' NULL, - create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - updater varchar2(64) DEFAULT '' NULL, - update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted number(1, 0) DEFAULT 0 NOT NULL, - tenant_id number DEFAULT 0 NOT NULL -); - -ALTER TABLE infra_demo01_contact - ADD CONSTRAINT pk_infra_demo01_contact PRIMARY KEY (id); - -COMMENT ON COLUMN infra_demo01_contact.id IS '编号'; -COMMENT ON COLUMN infra_demo01_contact.sex IS '性别'; -COMMENT ON COLUMN infra_demo01_contact.birthday IS '出生年'; -COMMENT ON COLUMN infra_demo01_contact.description IS '简介'; -COMMENT ON COLUMN infra_demo01_contact.avatar IS '头像'; -COMMENT ON COLUMN infra_demo01_contact.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo01_contact.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo01_contact.tenant_id IS '租户编号'; -COMMENT ON TABLE infra_demo01_contact IS '示例联系人表'; - --- @formatter:off -INSERT INTO infra_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:47:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -COMMIT; --- @formatter:on - -CREATE SEQUENCE infra_demo01_contact_seq - START WITH 2 - INCREMENT BY 1; - - --- ---------------------------- --- infra_demo02_category --- ------------------------------ -CREATE TABLE infra_demo02_category -( - id number NOT NULL, - name varchar2(100) DEFAULT '' NULL, - parent_id number NOT NULL, - creator varchar2(64) DEFAULT '' NULL, - create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - updater varchar2(64) DEFAULT '' NULL, - update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted number(1, 0) DEFAULT 0 NOT NULL, - tenant_id number DEFAULT 0 NOT NULL -); - -ALTER TABLE infra_demo02_category - ADD CONSTRAINT pk_infra_demo02_category PRIMARY KEY (id); - -COMMENT ON COLUMN infra_demo02_category.id IS '编号'; -COMMENT ON COLUMN infra_demo02_category.parent_id IS '父级编号'; -COMMENT ON COLUMN infra_demo02_category.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo02_category.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo02_category.tenant_id IS '租户编号'; -COMMENT ON TABLE infra_demo02_category IS '示例分类表'; - --- @formatter:off -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', to_date('2023-11-16 20:24:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:15', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -COMMIT; --- @formatter:on - -CREATE SEQUENCE infra_demo02_category_seq - START WITH 7 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_demo03_course --- ------------------------------ -CREATE TABLE infra_demo03_course -( - id number NOT NULL, - student_id number NOT NULL, - name varchar2(100) DEFAULT '' NULL, - score smallint NOT NULL, - creator varchar2(64) DEFAULT '' NULL, - create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - updater varchar2(64) DEFAULT '' NULL, - update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted number(1, 0) DEFAULT 0 NOT NULL, - tenant_id number DEFAULT 0 NOT NULL -); - -ALTER TABLE infra_demo03_course - ADD CONSTRAINT pk_infra_demo03_course PRIMARY KEY (id); - -COMMENT ON COLUMN infra_demo03_course.id IS '编号'; -COMMENT ON COLUMN infra_demo03_course.student_id IS '学生编号'; -COMMENT ON COLUMN infra_demo03_course.score IS '分数'; -COMMENT ON COLUMN infra_demo03_course.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_course.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_course.tenant_id IS '租户编号'; -COMMENT ON TABLE infra_demo03_course IS '学生课程表'; - --- @formatter:off -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', to_date('2023-11-17 00:20:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 16:20:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -COMMIT; --- @formatter:on - -CREATE SEQUENCE infra_demo03_course_seq - START WITH 14 - INCREMENT BY 1; - - +-- Table structure for infra_file -- ---------------------------- --- infra_demo03_grade --- ------------------------------ -CREATE TABLE infra_demo03_grade -( - id number NOT NULL, - student_id number NOT NULL, - name varchar2(100) DEFAULT '' NULL, - teacher varchar2(255) NOT NULL, - creator varchar2(64) DEFAULT '' NULL, - create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - updater varchar2(64) DEFAULT '' NULL, - update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted number(1, 0) DEFAULT 0 NOT NULL, - tenant_id number DEFAULT 0 NOT NULL -); - -ALTER TABLE infra_demo03_grade - ADD CONSTRAINT pk_infra_demo03_grade PRIMARY KEY (id); - -COMMENT ON COLUMN infra_demo03_grade.id IS '编号'; -COMMENT ON COLUMN infra_demo03_grade.student_id IS '学生编号'; -COMMENT ON COLUMN infra_demo03_grade.teacher IS '班主任'; -COMMENT ON COLUMN infra_demo03_grade.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_grade.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_grade.tenant_id IS '租户编号'; -COMMENT ON TABLE infra_demo03_grade IS '学生班级表'; - --- @formatter:off -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -COMMIT; --- @formatter:on - -CREATE SEQUENCE infra_demo03_grade_seq - START WITH 10 - INCREMENT BY 1; - - --- ---------------------------- --- infra_demo03_student --- ------------------------------ -CREATE TABLE infra_demo03_student -( - id number NOT NULL, - name varchar2(100) DEFAULT '' NULL, - sex smallint NOT NULL, - birthday date NOT NULL, - description varchar2(255) NOT NULL, - creator varchar2(64) DEFAULT '' NULL, - create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - updater varchar2(64) DEFAULT '' NULL, - update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted number(1, 0) DEFAULT 0 NOT NULL, - tenant_id number DEFAULT 0 NOT NULL -); - -ALTER TABLE infra_demo03_student - ADD CONSTRAINT pk_infra_demo03_student PRIMARY KEY (id); - -COMMENT ON COLUMN infra_demo03_student.id IS '编号'; -COMMENT ON COLUMN infra_demo03_student.sex IS '性别'; -COMMENT ON COLUMN infra_demo03_student.birthday IS '出生日期'; -COMMENT ON COLUMN infra_demo03_student.description IS '简介'; -COMMENT ON COLUMN infra_demo03_student.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_student.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_student.tenant_id IS '租户编号'; -COMMENT ON TABLE infra_demo03_student IS '学生表'; - --- @formatter:off -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, to_date('2023-11-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

厉害

', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, to_date('2023-11-13 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

你在教我做事?

', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:07', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

哈哈哈

', '1', to_date('2023-11-17 00:04:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -COMMIT; --- @formatter:on - -CREATE SEQUENCE infra_demo03_student_seq - START WITH 10 - INCREMENT BY 1; - - --- ---------------------------- --- infra_file --- ------------------------------ CREATE TABLE infra_file ( id number NOT NULL, @@ -585,18 +410,19 @@ COMMENT ON COLUMN infra_file.path IS '文件路径'; COMMENT ON COLUMN infra_file.url IS '文件 URL'; COMMENT ON COLUMN infra_file.type IS '文件类型'; COMMENT ON COLUMN infra_file.size IS '文件大小'; +COMMENT ON COLUMN infra_file.creator IS '创建者'; COMMENT ON COLUMN infra_file.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file.updater IS '更新者'; COMMENT ON COLUMN infra_file.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file.deleted IS '是否删除'; COMMENT ON TABLE infra_file IS '文件表'; CREATE SEQUENCE infra_file_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_file_config --- ------------------------------ +-- Table structure for infra_file_config +-- ---------------------------- CREATE TABLE infra_file_config ( id number NOT NULL, @@ -621,10 +447,16 @@ COMMENT ON COLUMN infra_file_config.storage IS '存储器'; COMMENT ON COLUMN infra_file_config.remark IS '备注'; COMMENT ON COLUMN infra_file_config.master IS '是否为主配置'; COMMENT ON COLUMN infra_file_config.config IS '存储配置'; +COMMENT ON COLUMN infra_file_config.creator IS '创建者'; COMMENT ON COLUMN infra_file_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_config.updater IS '更新者'; COMMENT ON COLUMN infra_file_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_config.deleted IS '是否删除'; COMMENT ON TABLE infra_file_config IS '文件配置表'; +-- ---------------------------- +-- Records of infra_file_config +-- ---------------------------- -- @formatter:off INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库', 1, '我是数据库', '0', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', to_date('2022-03-15 23:56:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-28 22:54:07', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器', 20, '', '1', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', '1', to_date('2024-01-13 22:11:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-03 19:38:34', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -632,13 +464,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE infra_file_config_seq - START WITH 23 - INCREMENT BY 1; - + START WITH 23; -- ---------------------------- --- infra_file_content --- ------------------------------ +-- Table structure for infra_file_content +-- ---------------------------- CREATE TABLE infra_file_content ( id number NOT NULL, @@ -659,18 +489,19 @@ COMMENT ON COLUMN infra_file_content.id IS '编号'; COMMENT ON COLUMN infra_file_content.config_id IS '配置编号'; COMMENT ON COLUMN infra_file_content.path IS '文件路径'; COMMENT ON COLUMN infra_file_content.content IS '文件内容'; +COMMENT ON COLUMN infra_file_content.creator IS '创建者'; COMMENT ON COLUMN infra_file_content.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_content.updater IS '更新者'; COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_content.deleted IS '是否删除'; COMMENT ON TABLE infra_file_content IS '文件表'; CREATE SEQUENCE infra_file_content_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- infra_job --- ------------------------------ +-- Table structure for infra_job +-- ---------------------------- CREATE TABLE infra_job ( id number NOT NULL, @@ -701,10 +532,16 @@ COMMENT ON COLUMN infra_job.cron_expression IS 'CRON 表达式'; COMMENT ON COLUMN infra_job.retry_count IS '重试次数'; COMMENT ON COLUMN infra_job.retry_interval IS '重试间隔'; COMMENT ON COLUMN infra_job.monitor_timeout IS '监控超时时间'; +COMMENT ON COLUMN infra_job.creator IS '创建者'; COMMENT ON COLUMN infra_job.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job.updater IS '更新者'; COMMENT ON COLUMN infra_job.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job.deleted IS '是否删除'; COMMENT ON TABLE infra_job IS '定时任务表'; +-- ---------------------------- +-- Records of infra_job +-- ---------------------------- -- @formatter:off INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', to_date('2021-10-27 08:34:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-09 20:51:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', to_date('2023-07-22 14:36:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-22 15:39:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -721,13 +558,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE infra_job_seq - START WITH 28 - INCREMENT BY 1; - + START WITH 28; -- ---------------------------- --- infra_job_log --- ------------------------------ +-- Table structure for infra_job_log +-- ---------------------------- CREATE TABLE infra_job_log ( id number NOT NULL, @@ -759,18 +594,20 @@ COMMENT ON COLUMN infra_job_log.begin_time IS '开始执行时间'; COMMENT ON COLUMN infra_job_log.end_time IS '结束执行时间'; COMMENT ON COLUMN infra_job_log.duration IS '执行时长'; COMMENT ON COLUMN infra_job_log.status IS '任务状态'; +COMMENT ON COLUMN infra_job_log.result IS '结果数据'; +COMMENT ON COLUMN infra_job_log.creator IS '创建者'; COMMENT ON COLUMN infra_job_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job_log.updater IS '更新者'; COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job_log.deleted IS '是否删除'; COMMENT ON TABLE infra_job_log IS '定时任务日志表'; CREATE SEQUENCE infra_job_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_dept --- ------------------------------ +-- Table structure for system_dept +-- ---------------------------- CREATE TABLE system_dept ( id number NOT NULL, @@ -793,17 +630,24 @@ ALTER TABLE system_dept ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); COMMENT ON COLUMN system_dept.id IS '部门id'; +COMMENT ON COLUMN system_dept.name IS '部门名称'; COMMENT ON COLUMN system_dept.parent_id IS '父部门id'; COMMENT ON COLUMN system_dept.sort IS '显示顺序'; COMMENT ON COLUMN system_dept.leader_user_id IS '负责人'; COMMENT ON COLUMN system_dept.phone IS '联系电话'; COMMENT ON COLUMN system_dept.email IS '邮箱'; COMMENT ON COLUMN system_dept.status IS '部门状态(0正常 1停用)'; +COMMENT ON COLUMN system_dept.creator IS '创建者'; COMMENT ON COLUMN system_dept.create_time IS '创建时间'; +COMMENT ON COLUMN system_dept.updater IS '更新者'; COMMENT ON COLUMN system_dept.update_time IS '更新时间'; +COMMENT ON COLUMN system_dept.deleted IS '是否删除'; COMMENT ON COLUMN system_dept.tenant_id IS '租户编号'; COMMENT ON TABLE system_dept IS '部门表'; +-- ---------------------------- +-- Records of system_dept +-- ---------------------------- -- @formatter:off INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, '芋道源码', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-14 23:30:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '深圳总公司', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 09:53:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -823,13 +667,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_dept_seq - START WITH 114 - INCREMENT BY 1; - + START WITH 114; -- ---------------------------- --- system_dict_data --- ------------------------------ +-- Table structure for system_dict_data +-- ---------------------------- CREATE TABLE system_dict_data ( id number NOT NULL, @@ -853,12 +695,23 @@ ALTER TABLE system_dict_data COMMENT ON COLUMN system_dict_data.id IS '字典编码'; COMMENT ON COLUMN system_dict_data.sort IS '字典排序'; +COMMENT ON COLUMN system_dict_data.label IS '字典标签'; +COMMENT ON COLUMN system_dict_data.value IS '字典键值'; +COMMENT ON COLUMN system_dict_data.dict_type IS '字典类型'; COMMENT ON COLUMN system_dict_data.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_data.color_type IS '颜色类型'; +COMMENT ON COLUMN system_dict_data.css_class IS 'css 样式'; COMMENT ON COLUMN system_dict_data.remark IS '备注'; +COMMENT ON COLUMN system_dict_data.creator IS '创建者'; COMMENT ON COLUMN system_dict_data.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_data.updater IS '更新者'; COMMENT ON COLUMN system_dict_data.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_data.deleted IS '是否删除'; COMMENT ON TABLE system_dict_data IS '字典数据表'; +-- ---------------------------- +-- Records of system_dict_data +-- ---------------------------- -- @formatter:off INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, '男', '1', 'system_user_sex', 0, 'default', 'A', '性别男', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-29 00:14:39', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, '女', '2', 'system_user_sex', 0, 'success', '', '性别女', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:30:37', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -1046,15 +899,6 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus 标准模版', '20', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, 'Vue3 Element Plus Schema 模版', '21', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vue3 vben 模版', '30', 'infra_codegen_front_type', 0, '', '', '', '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-13 00:04:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1235, 1, '个', '1', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1236, 1, '件', '2', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1237, 1, '盒', '3', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1238, 1, '袋', '4', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1239, 1, '箱', '5', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1240, 1, '套', '6', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1241, 1, '包', '7', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1242, 1, '双', '8', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1243, 1, '卷', '9', 'product_unit', 0, '', '', '', '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-23 14:38:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:46:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:46:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:46:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:46:58', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', to_date('2023-05-21 22:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:47:18', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -1238,13 +1082,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_dict_data_seq - START WITH 1537 - INCREMENT BY 1; - + START WITH 1537; -- ---------------------------- --- system_dict_type --- ------------------------------ +-- Table structure for system_dict_type +-- ---------------------------- CREATE TABLE system_dict_type ( id number NOT NULL, @@ -1264,13 +1106,21 @@ ALTER TABLE system_dict_type ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); COMMENT ON COLUMN system_dict_type.id IS '字典主键'; +COMMENT ON COLUMN system_dict_type.name IS '字典名称'; +COMMENT ON COLUMN system_dict_type.type IS '字典类型'; COMMENT ON COLUMN system_dict_type.status IS '状态(0正常 1停用)'; COMMENT ON COLUMN system_dict_type.remark IS '备注'; +COMMENT ON COLUMN system_dict_type.creator IS '创建者'; COMMENT ON COLUMN system_dict_type.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_type.updater IS '更新者'; COMMENT ON COLUMN system_dict_type.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_type.deleted IS '是否删除'; COMMENT ON COLUMN system_dict_type.deleted_time IS '删除时间'; COMMENT ON TABLE system_dict_type IS '字典类型表'; +-- ---------------------------- +-- Records of system_dict_type +-- ---------------------------- -- @formatter:off INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, '用户性别', 'system_user_sex', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-16 20:29:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, '参数类型', 'infra_config_type', 0, NULL, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-01 16:36:54', 'SYYYY-MM-DD HH24:MI:SS'), '0', NULL); @@ -1322,7 +1172,6 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, '邮件发送状态', 'system_mail_send_status', 0, '邮件发送状态', '1', to_date('2023-01-26 09:53:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-26 09:53:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, '站内信模版的类型', 'system_notify_template_type', 0, '站内信模版的类型', '1', to_date('2023-01-28 10:35:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 10:35:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, '代码生成的前端类型', 'infra_codegen_front_type', 0, '', '1', to_date('2023-04-12 23:57:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-12 23:57:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (169, '商品的单位', 'product_unit', 0, '商品的单位', '1', to_date('2023-05-24 21:23:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-24 21:23:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, '快递计费方式', 'trade_delivery_express_charge_mode', 0, '用于商城交易模块配送管理', '1', to_date('2023-05-21 22:45:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-05-21 22:45:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, '积分业务类型', 'member_point_biz_type', 0, '', '1', to_date('2023-06-10 12:15:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-06-28 13:48:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, '支付通知类型', 'pay_notify_type', 0, NULL, '1', to_date('2023-07-20 12:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-20 12:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', to_date('1970-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')); @@ -1360,13 +1209,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_dict_type_seq - START WITH 620 - INCREMENT BY 1; - + START WITH 620; -- ---------------------------- --- system_login_log --- ------------------------------ +-- Table structure for system_login_log +-- ---------------------------- CREATE TABLE system_login_log ( id number NOT NULL, @@ -1391,24 +1238,27 @@ ALTER TABLE system_login_log COMMENT ON COLUMN system_login_log.id IS '访问ID'; COMMENT ON COLUMN system_login_log.log_type IS '日志类型'; +COMMENT ON COLUMN system_login_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN system_login_log.user_id IS '用户编号'; COMMENT ON COLUMN system_login_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_login_log.username IS '用户账号'; COMMENT ON COLUMN system_login_log.result IS '登陆结果'; COMMENT ON COLUMN system_login_log.user_ip IS '用户 IP'; COMMENT ON COLUMN system_login_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_login_log.creator IS '创建者'; COMMENT ON COLUMN system_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_login_log.updater IS '更新者'; COMMENT ON COLUMN system_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_login_log.deleted IS '是否删除'; COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; COMMENT ON TABLE system_login_log IS '系统访问记录'; CREATE SEQUENCE system_login_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_mail_account --- ------------------------------ +-- Table structure for system_mail_account +-- ---------------------------- CREATE TABLE system_mail_account ( id number NOT NULL, @@ -1435,10 +1285,18 @@ COMMENT ON COLUMN system_mail_account.username IS '用户名'; COMMENT ON COLUMN system_mail_account.password IS '密码'; COMMENT ON COLUMN system_mail_account.host IS 'SMTP 服务器域名'; COMMENT ON COLUMN system_mail_account.port IS 'SMTP 服务器端口'; +COMMENT ON COLUMN system_mail_account.ssl_enable IS '是否开启 SSL'; +COMMENT ON COLUMN system_mail_account.starttls_enable IS '是否开启 STARTTLS'; +COMMENT ON COLUMN system_mail_account.creator IS '创建者'; COMMENT ON COLUMN system_mail_account.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_account.updater IS '更新者'; COMMENT ON COLUMN system_mail_account.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_account.deleted IS '是否删除'; COMMENT ON TABLE system_mail_account IS '邮箱账号表'; +-- ---------------------------- +-- Records of system_mail_account +-- ---------------------------- -- @formatter:off INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', to_date('2023-01-25 17:39:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-24 09:13:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', to_date('2023-01-26 01:26:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-04-12 22:39:38', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -1448,13 +1306,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_mail_account_seq - START WITH 5 - INCREMENT BY 1; - + START WITH 5; -- ---------------------------- --- system_mail_log --- ------------------------------ +-- Table structure for system_mail_log +-- ---------------------------- CREATE TABLE system_mail_log ( id number NOT NULL, @@ -1499,18 +1355,19 @@ COMMENT ON COLUMN system_mail_log.send_status IS '发送状态'; COMMENT ON COLUMN system_mail_log.send_time IS '发送时间'; COMMENT ON COLUMN system_mail_log.send_message_id IS '发送返回的消息 ID'; COMMENT ON COLUMN system_mail_log.send_exception IS '发送异常'; +COMMENT ON COLUMN system_mail_log.creator IS '创建者'; COMMENT ON COLUMN system_mail_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_log.updater IS '更新者'; COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_log.deleted IS '是否删除'; COMMENT ON TABLE system_mail_log IS '邮件日志表'; CREATE SEQUENCE system_mail_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_mail_template --- ------------------------------ +-- Table structure for system_mail_template +-- ---------------------------- CREATE TABLE system_mail_template ( id number NOT NULL, @@ -1543,10 +1400,16 @@ COMMENT ON COLUMN system_mail_template.content IS '模板内容'; COMMENT ON COLUMN system_mail_template.params IS '参数数组'; COMMENT ON COLUMN system_mail_template.status IS '开启状态'; COMMENT ON COLUMN system_mail_template.remark IS '备注'; +COMMENT ON COLUMN system_mail_template.creator IS '创建者'; COMMENT ON COLUMN system_mail_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_template.updater IS '更新者'; COMMENT ON COLUMN system_mail_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_template.deleted IS '是否删除'; COMMENT ON TABLE system_mail_template IS '邮件模版表'; +-- ---------------------------- +-- Records of system_mail_template +-- ---------------------------- -- @formatter:off INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '

您的验证码是{code},名字是{name}

', '["code","name"]', 0, '3', '1', to_date('2021-10-11 08:10:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 19:51:14', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', to_date('2023-01-26 01:27:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-27 10:32:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -1555,13 +1418,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_mail_template_seq - START WITH 16 - INCREMENT BY 1; - + START WITH 16; -- ---------------------------- --- system_menu --- ------------------------------ +-- Table structure for system_menu +-- ---------------------------- CREATE TABLE system_menu ( id number NOT NULL, @@ -1590,16 +1451,28 @@ ALTER TABLE system_menu COMMENT ON COLUMN system_menu.id IS '菜单ID'; COMMENT ON COLUMN system_menu.name IS '菜单名称'; +COMMENT ON COLUMN system_menu.permission IS '权限标识'; COMMENT ON COLUMN system_menu.type IS '菜单类型'; COMMENT ON COLUMN system_menu.sort IS '显示顺序'; COMMENT ON COLUMN system_menu.parent_id IS '父菜单ID'; +COMMENT ON COLUMN system_menu.path IS '路由地址'; +COMMENT ON COLUMN system_menu.icon IS '菜单图标'; COMMENT ON COLUMN system_menu.component IS '组件路径'; COMMENT ON COLUMN system_menu.component_name IS '组件名'; COMMENT ON COLUMN system_menu.status IS '菜单状态'; +COMMENT ON COLUMN system_menu.visible IS '是否可见'; +COMMENT ON COLUMN system_menu.keep_alive IS '是否缓存'; +COMMENT ON COLUMN system_menu.always_show IS '是否总是显示'; +COMMENT ON COLUMN system_menu.creator IS '创建者'; COMMENT ON COLUMN system_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_menu.updater IS '更新者'; COMMENT ON COLUMN system_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_menu.deleted IS '是否删除'; COMMENT ON TABLE system_menu IS '菜单权限表'; +-- ---------------------------- +-- Records of system_menu +-- ---------------------------- -- @formatter:off INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, '系统管理', '', 1, 10, 0, '/system', 'ep:tools', NULL, NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-29 01:04:23', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, '基础设施', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, '1', '1', '1', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-01 08:28:40', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -2395,13 +2268,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_menu_seq - START WITH 2758 - INCREMENT BY 1; - + START WITH 2758; -- ---------------------------- --- system_notice --- ------------------------------ +-- Table structure for system_notice +-- ---------------------------- CREATE TABLE system_notice ( id number NOT NULL, @@ -2425,11 +2296,17 @@ COMMENT ON COLUMN system_notice.title IS '公告标题'; COMMENT ON COLUMN system_notice.content IS '公告内容'; COMMENT ON COLUMN system_notice.type IS '公告类型(1通知 2公告)'; COMMENT ON COLUMN system_notice.status IS '公告状态(0正常 1关闭)'; +COMMENT ON COLUMN system_notice.creator IS '创建者'; COMMENT ON COLUMN system_notice.create_time IS '创建时间'; +COMMENT ON COLUMN system_notice.updater IS '更新者'; COMMENT ON COLUMN system_notice.update_time IS '更新时间'; +COMMENT ON COLUMN system_notice.deleted IS '是否删除'; COMMENT ON COLUMN system_notice.tenant_id IS '租户编号'; COMMENT ON TABLE system_notice IS '通知公告表'; +-- ---------------------------- +-- Records of system_notice +-- ---------------------------- -- @formatter:off INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133

', 1, 0, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-04 21:00:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '

11112222

', 2, 1, 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 20:07:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -2438,13 +2315,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_notice_seq - START WITH 5 - INCREMENT BY 1; - + START WITH 5; -- ---------------------------- --- system_notify_message --- ------------------------------ +-- Table structure for system_notify_message +-- ---------------------------- CREATE TABLE system_notify_message ( id number NOT NULL, @@ -2480,11 +2355,17 @@ COMMENT ON COLUMN system_notify_message.template_type IS '模版类型'; COMMENT ON COLUMN system_notify_message.template_params IS '模版参数'; COMMENT ON COLUMN system_notify_message.read_status IS '是否已读'; COMMENT ON COLUMN system_notify_message.read_time IS '阅读时间'; +COMMENT ON COLUMN system_notify_message.creator IS '创建者'; COMMENT ON COLUMN system_notify_message.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_message.updater IS '更新者'; COMMENT ON COLUMN system_notify_message.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_message.deleted IS '是否删除'; COMMENT ON COLUMN system_notify_message.tenant_id IS '租户编号'; COMMENT ON TABLE system_notify_message IS '站内信消息表'; +-- ---------------------------- +-- Records of system_notify_message +-- ---------------------------- -- @formatter:off INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 11:44:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-28 11:45:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-10 00:47:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -2499,13 +2380,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_notify_message_seq - START WITH 11 - INCREMENT BY 1; - + START WITH 11; -- ---------------------------- --- system_notify_template --- ------------------------------ +-- Table structure for system_notify_template +-- ---------------------------- CREATE TABLE system_notify_template ( id number NOT NULL, @@ -2536,18 +2415,19 @@ COMMENT ON COLUMN system_notify_template.type IS '类型'; COMMENT ON COLUMN system_notify_template.params IS '参数数组'; COMMENT ON COLUMN system_notify_template.status IS '状态'; COMMENT ON COLUMN system_notify_template.remark IS '备注'; +COMMENT ON COLUMN system_notify_template.creator IS '创建者'; COMMENT ON COLUMN system_notify_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_template.updater IS '更新者'; COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_template.deleted IS '是否删除'; COMMENT ON TABLE system_notify_template IS '站内信模板表'; CREATE SEQUENCE system_notify_template_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_oauth2_access_token --- ------------------------------ +-- Table structure for system_oauth2_access_token +-- ---------------------------- CREATE TABLE system_oauth2_access_token ( id number NOT NULL, @@ -2582,19 +2462,20 @@ COMMENT ON COLUMN system_oauth2_access_token.refresh_token IS '刷新令牌'; COMMENT ON COLUMN system_oauth2_access_token.client_id IS '客户端编号'; COMMENT ON COLUMN system_oauth2_access_token.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_access_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_access_token.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_access_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_access_token.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_access_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; CREATE SEQUENCE system_oauth2_access_token_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_oauth2_approve --- ------------------------------ +-- Table structure for system_oauth2_approve +-- ---------------------------- CREATE TABLE system_oauth2_approve ( id number NOT NULL, @@ -2619,20 +2500,23 @@ COMMENT ON COLUMN system_oauth2_approve.id IS '编号'; COMMENT ON COLUMN system_oauth2_approve.user_id IS '用户编号'; COMMENT ON COLUMN system_oauth2_approve.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_approve.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_approve.scope IS '授权范围'; +COMMENT ON COLUMN system_oauth2_approve.approved IS '是否接受'; COMMENT ON COLUMN system_oauth2_approve.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_approve.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_approve.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_approve.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_approve.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; CREATE SEQUENCE system_oauth2_approve_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_oauth2_client --- ------------------------------ +-- Table structure for system_oauth2_client +-- ---------------------------- CREATE TABLE system_oauth2_client ( id number NOT NULL, @@ -2677,10 +2561,16 @@ COMMENT ON COLUMN system_oauth2_client.auto_approve_scopes IS '自动通过的 COMMENT ON COLUMN system_oauth2_client.authorities IS '权限'; COMMENT ON COLUMN system_oauth2_client.resource_ids IS '资源'; COMMENT ON COLUMN system_oauth2_client.additional_information IS '附加信息'; +COMMENT ON COLUMN system_oauth2_client.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_client.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_client.deleted IS '是否删除'; COMMENT ON TABLE system_oauth2_client IS 'OAuth2 客户端表'; +-- ---------------------------- +-- Records of system_oauth2_client +-- ---------------------------- -- @formatter:off INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 1800, 2592000, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', to_date('2022-05-11 21:47:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-22 16:31:52', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', '啦啦啦啦', 0, 1800, 43200, '["https://www.iocoder.cn"]', '["password","authorization_code","implicit"]', '["user_info","projects"]', '["user_info"]', '[]', '[]', '{}', '1', to_date('2022-05-12 00:28:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:01:01', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -2690,13 +2580,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_oauth2_client_seq - START WITH 43 - INCREMENT BY 1; - + START WITH 43; -- ---------------------------- --- system_oauth2_code --- ------------------------------ +-- Table structure for system_oauth2_code +-- ---------------------------- CREATE TABLE system_oauth2_code ( id number NOT NULL, @@ -2724,21 +2612,24 @@ COMMENT ON COLUMN system_oauth2_code.user_id IS '用户编号'; COMMENT ON COLUMN system_oauth2_code.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_code.code IS '授权码'; COMMENT ON COLUMN system_oauth2_code.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_code.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_code.expires_time IS '过期时间'; COMMENT ON COLUMN system_oauth2_code.redirect_uri IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_code.state IS '状态'; +COMMENT ON COLUMN system_oauth2_code.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_code.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; CREATE SEQUENCE system_oauth2_code_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_oauth2_refresh_token --- ------------------------------ +-- Table structure for system_oauth2_refresh_token +-- ---------------------------- CREATE TABLE system_oauth2_refresh_token ( id number NOT NULL, @@ -2766,19 +2657,20 @@ COMMENT ON COLUMN system_oauth2_refresh_token.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_refresh_token.client_id IS '客户端编号'; COMMENT ON COLUMN system_oauth2_refresh_token.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_refresh_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_refresh_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_refresh_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; CREATE SEQUENCE system_oauth2_refresh_token_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_operate_log --- ------------------------------ +-- Table structure for system_operate_log +-- ---------------------------- CREATE TABLE system_operate_log ( id number NOT NULL, @@ -2806,26 +2698,32 @@ ALTER TABLE system_operate_log ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); COMMENT ON COLUMN system_operate_log.id IS '日志主键'; +COMMENT ON COLUMN system_operate_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN system_operate_log.user_id IS '用户编号'; COMMENT ON COLUMN system_operate_log.user_type IS '用户类型'; COMMENT ON COLUMN system_operate_log.type IS '操作模块类型'; COMMENT ON COLUMN system_operate_log.sub_type IS '操作名'; COMMENT ON COLUMN system_operate_log.biz_id IS '操作数据模块编号'; +COMMENT ON COLUMN system_operate_log.action IS '操作内容'; +COMMENT ON COLUMN system_operate_log.extra IS '拓展字段'; +COMMENT ON COLUMN system_operate_log.request_method IS '请求方法名'; +COMMENT ON COLUMN system_operate_log.request_url IS '请求地址'; COMMENT ON COLUMN system_operate_log.user_ip IS '用户 IP'; COMMENT ON COLUMN system_operate_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_operate_log.creator IS '创建者'; COMMENT ON COLUMN system_operate_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_operate_log.updater IS '更新者'; COMMENT ON COLUMN system_operate_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_operate_log.deleted IS '是否删除'; COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; CREATE SEQUENCE system_operate_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_post --- ------------------------------ +-- Table structure for system_post +-- ---------------------------- CREATE TABLE system_post ( id number NOT NULL, @@ -2851,11 +2749,17 @@ COMMENT ON COLUMN system_post.name IS '岗位名称'; COMMENT ON COLUMN system_post.sort IS '显示顺序'; COMMENT ON COLUMN system_post.status IS '状态(0正常 1停用)'; COMMENT ON COLUMN system_post.remark IS '备注'; +COMMENT ON COLUMN system_post.creator IS '创建者'; COMMENT ON COLUMN system_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_post.updater IS '更新者'; COMMENT ON COLUMN system_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_post.deleted IS '是否删除'; COMMENT ON COLUMN system_post.tenant_id IS '租户编号'; COMMENT ON TABLE system_post IS '岗位信息表'; +-- ---------------------------- +-- Records of system_post +-- ---------------------------- -- @formatter:off INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', to_date('2021-01-06 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-11 15:19:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 09:18:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -2865,13 +2769,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_post_seq - START WITH 6 - INCREMENT BY 1; - + START WITH 6; -- ---------------------------- --- system_role --- ------------------------------ +-- Table structure for system_role +-- ---------------------------- CREATE TABLE system_role ( id number NOT NULL, @@ -2899,46 +2801,37 @@ COMMENT ON COLUMN system_role.name IS '角色名称'; COMMENT ON COLUMN system_role.code IS '角色权限字符串'; COMMENT ON COLUMN system_role.sort IS '显示顺序'; COMMENT ON COLUMN system_role.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; +COMMENT ON COLUMN system_role.data_scope_dept_ids IS '数据范围(指定部门数组)'; COMMENT ON COLUMN system_role.status IS '角色状态(0正常 1停用)'; COMMENT ON COLUMN system_role.type IS '角色类型'; COMMENT ON COLUMN system_role.remark IS '备注'; +COMMENT ON COLUMN system_role.creator IS '创建者'; COMMENT ON COLUMN system_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_role.updater IS '更新者'; COMMENT ON COLUMN system_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_role.deleted IS '是否删除'; COMMENT ON COLUMN system_role.tenant_id IS '租户编号'; COMMENT ON TABLE system_role IS '角色信息表'; +-- ---------------------------- +-- Records of system_role +-- ---------------------------- -- @formatter:off INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-22 05:08:21', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', to_date('2021-01-05 17:03:48', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-02-22 05:08:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', to_date('2024-02-24 10:51:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-24 02:51:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', to_date('2021-01-06 13:49:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 22:22:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '测试角色', 'test', 0, 1, '[]', 0, 2, '嘿嘿', '110', to_date('2022-02-23 00:14:34', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 13:14:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (136, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (137, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (138, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (139, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (140, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (141, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (143, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (144, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); COMMIT; -- @formatter:on CREATE SEQUENCE system_role_seq - START WITH 145 - INCREMENT BY 1; - + START WITH 112; -- ---------------------------- --- system_role_menu --- ------------------------------ +-- Table structure for system_role_menu +-- ---------------------------- CREATE TABLE system_role_menu ( id number NOT NULL, @@ -2958,11 +2851,17 @@ ALTER TABLE system_role_menu COMMENT ON COLUMN system_role_menu.id IS '自增编号'; COMMENT ON COLUMN system_role_menu.role_id IS '角色ID'; COMMENT ON COLUMN system_role_menu.menu_id IS '菜单ID'; +COMMENT ON COLUMN system_role_menu.creator IS '创建者'; COMMENT ON COLUMN system_role_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_role_menu.updater IS '更新者'; COMMENT ON COLUMN system_role_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_role_menu.deleted IS '是否删除'; COMMENT ON COLUMN system_role_menu.tenant_id IS '租户编号'; COMMENT ON TABLE system_role_menu IS '角色和菜单关联表'; +-- ---------------------------- +-- Records of system_role_menu +-- ---------------------------- -- @formatter:off INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:09:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -2998,38 +2897,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 13:16:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', to_date('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 00:23:55', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1489, 1, 1, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1490, 1, 2, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1494, 1, 1077, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1495, 1, 1078, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1496, 1, 1083, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1497, 1, 1084, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1498, 1, 1090, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1499, 1, 1093, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1500, 1, 1094, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1501, 1, 1100, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1502, 1, 1107, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1505, 1, 1117, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1506, 1, 100, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1507, 1, 101, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1508, 1, 102, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1509, 1, 1126, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1510, 1, 103, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1511, 1, 104, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1512, 1, 105, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1513, 1, 106, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1514, 1, 107, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1515, 1, 108, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1516, 1, 109, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1517, 1, 110, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1518, 1, 111, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1519, 1, 112, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1520, 1, 113, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1522, 1, 1138, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1525, 1, 1224, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1526, 1, 1225, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1527, 1, 500, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1528, 1, 501, '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-23 20:03:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:45:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -3113,23 +2980,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-04-01 22:21:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1712, 113, 1024, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1713, 113, 1025, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1714, 113, 1, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1715, 113, 102, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1716, 113, 103, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1717, 113, 104, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1718, 113, 1013, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1719, 113, 1014, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1720, 113, 1015, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1721, 113, 1016, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1722, 113, 1017, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1723, 113, 1018, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1724, 113, 1019, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1725, 113, 1020, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1726, 113, 1021, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1727, 113, 1022, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1728, 113, 1023, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:08:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); @@ -3252,118 +3102,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-09-21 22:48:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1851, 114, 1, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1852, 114, 1036, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1853, 114, 1037, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1854, 114, 1038, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1855, 114, 1039, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1856, 114, 100, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1857, 114, 101, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1858, 114, 1063, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1859, 114, 103, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1860, 114, 1064, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1861, 114, 1001, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1862, 114, 1065, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1863, 114, 1002, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1864, 114, 1003, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1865, 114, 107, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1866, 114, 1004, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1867, 114, 1005, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1868, 114, 1006, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1869, 114, 1007, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1870, 114, 1008, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1871, 114, 1009, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1872, 114, 1010, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1873, 114, 1011, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1874, 114, 1012, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1875, 114, 1017, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1876, 114, 1018, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1877, 114, 1019, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1878, 114, 1020, '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1879, 115, 1, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1880, 115, 1036, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1881, 115, 1037, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1882, 115, 1038, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1883, 115, 1039, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1884, 115, 100, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1885, 115, 101, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1886, 115, 1063, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1887, 115, 103, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1888, 115, 1064, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1889, 115, 1001, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1890, 115, 1065, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1891, 115, 1002, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1892, 115, 1003, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1893, 115, 107, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1894, 115, 1004, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1895, 115, 1005, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1896, 115, 1006, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1897, 115, 1007, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1898, 115, 1008, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1899, 115, 1009, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1900, 115, 1010, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1901, 115, 1011, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1902, 115, 1012, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1903, 115, 1017, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1904, 115, 1018, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1905, 115, 1019, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1906, 115, 1020, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1907, 116, 1, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1908, 116, 1036, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1909, 116, 1037, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1910, 116, 1038, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1911, 116, 1039, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1912, 116, 100, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1913, 116, 101, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1914, 116, 1063, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1915, 116, 103, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1916, 116, 1064, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1917, 116, 1001, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1918, 116, 1065, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1919, 116, 1002, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1920, 116, 1003, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1921, 116, 107, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1922, 116, 1004, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1923, 116, 1005, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1924, 116, 1006, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1925, 116, 1007, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1926, 116, 1008, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1927, 116, 1009, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1928, 116, 1010, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1929, 116, 1011, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1930, 116, 1012, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1931, 116, 1017, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1932, 116, 1018, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1933, 116, 1019, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1934, 116, 1020, '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:48', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1963, 118, 1, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1964, 118, 1036, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1965, 118, 1037, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1966, 118, 1038, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1967, 118, 1039, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1968, 118, 100, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1969, 118, 101, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1970, 118, 1063, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1971, 118, 103, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1972, 118, 1064, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1973, 118, 1001, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1974, 118, 1065, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1975, 118, 1002, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1976, 118, 1003, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1977, 118, 107, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1978, 118, 1004, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1979, 118, 1005, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1980, 118, 1006, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1981, 118, 1007, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1982, 118, 1008, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1983, 118, 1009, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1984, 118, 1010, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1985, 118, 1011, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1986, 118, 1012, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1987, 118, 1017, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1988, 118, 1018, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1989, 118, 1019, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1990, 118, 1020, '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-01-25 08:42:52', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -3642,146 +3380,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-02-09 23:49:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2789, 136, 1, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2790, 136, 1036, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2791, 136, 1037, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2792, 136, 1038, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2793, 136, 1039, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2794, 136, 100, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2795, 136, 101, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2796, 136, 1063, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2797, 136, 103, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2798, 136, 1064, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2799, 136, 1001, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2800, 136, 1065, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2801, 136, 1002, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2802, 136, 1003, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2803, 136, 107, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2804, 136, 1004, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2805, 136, 1005, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2806, 136, 1006, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2807, 136, 1007, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2808, 136, 1008, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2809, 136, 1009, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2810, 136, 1010, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2811, 136, 1011, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2812, 136, 1012, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2813, 136, 1017, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2814, 136, 1018, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2815, 136, 1019, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2816, 136, 1020, '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2817, 137, 1, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2818, 137, 1036, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2819, 137, 1037, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2820, 137, 1038, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2821, 137, 1039, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2822, 137, 100, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2823, 137, 101, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2824, 137, 1063, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2825, 137, 103, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2826, 137, 1064, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2827, 137, 1001, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2828, 137, 1065, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2829, 137, 1002, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2830, 137, 1003, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2831, 137, 107, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2832, 137, 1004, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2833, 137, 1005, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2834, 137, 1006, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2835, 137, 1007, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2836, 137, 1008, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2837, 137, 1009, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2838, 137, 1010, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2839, 137, 1011, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2840, 137, 1012, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2841, 137, 1017, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2842, 137, 1018, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2843, 137, 1019, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2844, 137, 1020, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2845, 138, 1, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2846, 138, 1036, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2847, 138, 1037, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2848, 138, 1038, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2849, 138, 1039, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2850, 138, 100, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2851, 138, 101, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2852, 138, 1063, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2853, 138, 103, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2854, 138, 1064, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2855, 138, 1001, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2856, 138, 1065, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2857, 138, 1002, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2858, 138, 1003, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2859, 138, 107, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2860, 138, 1004, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2861, 138, 1005, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2862, 138, 1006, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2863, 138, 1007, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2864, 138, 1008, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2865, 138, 1009, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2866, 138, 1010, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2867, 138, 1011, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2868, 138, 1012, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2869, 138, 1017, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2870, 138, 1018, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2871, 138, 1019, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2872, 138, 1020, '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2873, 139, 1, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2874, 139, 1036, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2875, 139, 1037, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2876, 139, 1038, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2877, 139, 1039, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2878, 139, 100, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2879, 139, 101, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2880, 139, 1063, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2881, 139, 103, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2882, 139, 1064, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2883, 139, 1001, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2884, 139, 1065, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2885, 139, 1002, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2886, 139, 1003, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2887, 139, 107, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2888, 139, 1004, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2889, 139, 1005, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2890, 139, 1006, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2891, 139, 1007, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2892, 139, 1008, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2893, 139, 1009, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2894, 139, 1010, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2895, 139, 1011, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2896, 139, 1012, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2897, 139, 1017, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2898, 139, 1018, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2899, 139, 1019, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2900, 139, 1020, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2901, 101, 1117, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2902, 101, 1126, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2903, 101, 1127, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2904, 101, 1128, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2905, 101, 1129, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2906, 101, 1130, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2907, 101, 1132, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2908, 101, 1133, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2909, 101, 1134, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2910, 101, 1135, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2911, 101, 1136, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2912, 101, 1137, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2913, 101, 2161, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2914, 101, 1150, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2915, 101, 1161, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2916, 101, 1162, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2917, 101, 1163, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2918, 101, 1164, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2919, 101, 1165, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2920, 101, 1166, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2921, 101, 1173, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2922, 101, 1174, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2923, 101, 1175, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2924, 101, 1176, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2925, 101, 1177, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2926, 101, 1178, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2927, 101, 2301, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2928, 101, 2302, '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 21:33:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); @@ -3806,46 +3404,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:19:40', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2953, 140, 1, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2954, 140, 1224, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2955, 140, 1225, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2956, 140, 1226, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2957, 140, 1227, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2958, 140, 1228, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2959, 140, 1036, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2960, 140, 1229, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2961, 140, 1037, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2962, 140, 1038, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2963, 140, 1039, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2964, 140, 100, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2965, 140, 101, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2966, 140, 1063, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2967, 140, 103, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2968, 140, 1064, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2969, 140, 1001, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2970, 140, 1065, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2971, 140, 1002, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2972, 140, 1003, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2973, 140, 107, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2974, 140, 1004, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2975, 140, 1005, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2976, 140, 1006, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2977, 140, 1007, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2978, 140, 1008, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2979, 140, 1009, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2980, 140, 1138, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2981, 140, 1010, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2982, 140, 1139, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2983, 140, 1011, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2984, 140, 1140, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2985, 140, 1012, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2986, 140, 1141, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2987, 140, 1142, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2988, 140, 1143, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2989, 140, 1017, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2990, 140, 1018, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2991, 140, 1019, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2992, 140, 1020, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); @@ -3998,82 +3556,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3145, 140, 2, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3146, 140, 1031, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3147, 140, 1032, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3148, 140, 1033, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3149, 140, 1034, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3150, 140, 1035, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3151, 140, 1050, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3152, 140, 1051, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3153, 140, 1052, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3154, 140, 1053, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3155, 140, 1054, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3156, 140, 1056, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3157, 140, 1057, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3158, 140, 1058, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3159, 140, 1059, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3160, 140, 1060, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3161, 140, 1066, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3162, 140, 1067, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3163, 140, 1070, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3164, 140, 1075, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3165, 140, 1076, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3166, 140, 1077, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3167, 140, 1078, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3168, 140, 1082, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3169, 140, 1083, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3170, 140, 1084, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3171, 140, 1085, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3172, 140, 1086, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3173, 140, 1087, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3174, 140, 1088, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3175, 140, 1089, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3176, 140, 1090, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3177, 140, 1091, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3178, 140, 1092, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3179, 140, 106, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3180, 140, 110, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3181, 140, 111, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3182, 140, 112, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3183, 140, 113, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3184, 140, 114, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3185, 140, 115, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3186, 140, 116, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3187, 140, 2472, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3188, 140, 2478, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3189, 140, 2479, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3190, 140, 2480, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3191, 140, 2481, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3192, 140, 2482, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3193, 140, 2483, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3194, 140, 2484, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3195, 140, 2485, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3196, 140, 2486, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3197, 140, 2487, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3198, 140, 2488, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3199, 140, 2489, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3200, 140, 2490, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3201, 140, 2491, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3202, 140, 2492, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3203, 140, 2493, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3204, 140, 2494, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3205, 140, 2495, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3206, 140, 2497, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3207, 140, 1237, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3208, 140, 1238, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3209, 140, 1239, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3210, 140, 1240, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3211, 140, 1241, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3212, 140, 1242, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3213, 140, 1243, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3214, 140, 2525, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3215, 140, 1255, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3216, 140, 1256, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3217, 140, 1257, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3218, 140, 1258, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3219, 140, 1259, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3220, 140, 1260, '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:41:02', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); @@ -4084,920 +3566,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3231, 140, 102, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3232, 140, 1013, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3233, 140, 1014, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3234, 140, 1015, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3235, 140, 1016, '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:42:36', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3236, 141, 1, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3237, 141, 2, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3238, 141, 1031, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3239, 141, 1032, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3240, 141, 1033, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3241, 141, 1034, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3242, 141, 1035, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3243, 141, 1036, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3244, 141, 1037, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3245, 141, 1038, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3246, 141, 1039, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3247, 141, 1050, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3248, 141, 1051, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3249, 141, 1052, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3250, 141, 1053, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3251, 141, 1054, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3252, 141, 1056, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3253, 141, 1057, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3254, 141, 1058, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3255, 141, 1059, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3256, 141, 1060, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3257, 141, 1063, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3258, 141, 1064, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3259, 141, 1065, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3260, 141, 1066, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3261, 141, 1067, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3262, 141, 1070, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3263, 141, 1075, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3264, 141, 1076, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3265, 141, 1077, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3266, 141, 1078, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3267, 141, 1082, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3268, 141, 1083, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3269, 141, 1084, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3270, 141, 1085, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3271, 141, 1086, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3272, 141, 1087, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3273, 141, 1088, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3274, 141, 1089, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3275, 141, 1090, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3276, 141, 1091, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3277, 141, 1092, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3278, 141, 100, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3279, 141, 101, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3280, 141, 102, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3281, 141, 103, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3282, 141, 106, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3283, 141, 107, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3284, 141, 110, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3285, 141, 111, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3286, 141, 112, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3287, 141, 113, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3288, 141, 1138, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3289, 141, 114, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3290, 141, 1139, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3291, 141, 115, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3292, 141, 1140, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3293, 141, 116, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3294, 141, 1141, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3295, 141, 1142, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3296, 141, 1143, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3297, 141, 2472, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3298, 141, 2478, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3299, 141, 2479, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3300, 141, 2480, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3301, 141, 2481, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3302, 141, 2482, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3303, 141, 2483, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3304, 141, 2484, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3305, 141, 2485, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3306, 141, 2486, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3307, 141, 2487, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3308, 141, 2488, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3309, 141, 2489, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3310, 141, 2490, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3311, 141, 2491, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3312, 141, 2492, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3313, 141, 2493, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3314, 141, 2494, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3315, 141, 2495, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3316, 141, 2497, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3317, 141, 1224, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3318, 141, 1225, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3319, 141, 1226, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3320, 141, 1227, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3321, 141, 1228, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3322, 141, 1229, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3323, 141, 1237, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3324, 141, 1238, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3325, 141, 1239, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3326, 141, 1240, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3327, 141, 1241, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3328, 141, 1242, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3329, 141, 1243, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3330, 141, 2525, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3331, 141, 1255, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3332, 141, 1256, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3333, 141, 1001, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3334, 141, 1257, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3335, 141, 1002, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3336, 141, 1258, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3337, 141, 1003, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3338, 141, 1259, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3339, 141, 1004, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3340, 141, 1260, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3341, 141, 1005, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3342, 141, 1006, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3343, 141, 1007, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3344, 141, 1008, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3345, 141, 1009, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3346, 141, 1010, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3347, 141, 1011, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3348, 141, 1012, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3349, 141, 1013, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3350, 141, 1014, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3351, 141, 1015, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3352, 141, 1016, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3353, 141, 1017, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3354, 141, 1018, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3355, 141, 1019, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3356, 141, 1020, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3357, 1, 1024, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3358, 1, 2048, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3359, 1, 1025, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3360, 1, 2049, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3361, 1, 1026, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3362, 1, 2050, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3363, 1, 1027, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3364, 1, 2051, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3365, 1, 1028, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3366, 1, 2052, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3367, 1, 1029, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3368, 1, 5, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3369, 1, 1030, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3370, 1, 1031, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3371, 1, 1032, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3372, 1, 1033, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3373, 1, 1034, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3374, 1, 1035, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3375, 1, 2059, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3376, 1, 1036, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3377, 1, 2060, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3378, 1, 1037, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3379, 1, 2061, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3380, 1, 1038, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3381, 1, 2062, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3382, 1, 1039, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3383, 1, 2063, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3384, 1, 1040, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3385, 1, 1042, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3386, 1, 2066, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3387, 1, 1043, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3388, 1, 2067, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3389, 1, 2068, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3390, 1, 1045, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3391, 1, 2069, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3392, 1, 1046, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3393, 1, 2070, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3394, 1, 1048, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3395, 1, 2072, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3396, 1, 2073, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3397, 1, 1050, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3398, 1, 2074, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3399, 1, 1051, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3400, 1, 2075, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3401, 1, 1052, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3402, 1, 2076, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3403, 1, 1053, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3404, 1, 1054, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3405, 1, 1056, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3406, 1, 1057, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3407, 1, 1058, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3408, 1, 2083, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3409, 1, 1059, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3410, 1, 1060, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3411, 1, 2084, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3412, 1, 2085, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3413, 1, 2086, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3414, 1, 1063, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3415, 1, 2087, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3416, 1, 1064, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3417, 1, 2088, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3418, 1, 1065, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3419, 1, 2089, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3420, 1, 1066, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3421, 1, 2090, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3422, 1, 1067, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3423, 1, 2091, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3424, 1, 2092, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3425, 1, 2093, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3426, 1, 1070, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3427, 1, 2094, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3428, 1, 2095, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3429, 1, 2096, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3430, 1, 2097, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3431, 1, 2098, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3432, 1, 1075, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3433, 1, 2099, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3435, 1, 2100, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3436, 1, 2101, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3437, 1, 2102, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3438, 1, 2103, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3439, 1, 2104, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3440, 1, 2105, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3441, 1, 1082, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3442, 1, 2106, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3443, 1, 2107, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3444, 1, 2108, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3445, 1, 1085, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3446, 1, 2109, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3447, 1, 1086, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3448, 1, 2110, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3449, 1, 1087, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3450, 1, 2111, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3451, 1, 1088, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3452, 1, 2112, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3453, 1, 1089, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3454, 1, 2113, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3455, 1, 2114, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3456, 1, 1091, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3457, 1, 2115, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3458, 1, 1092, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3459, 1, 2116, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3460, 1, 2117, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3461, 1, 2118, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3462, 1, 1095, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3463, 1, 2119, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3464, 1, 1096, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3465, 1, 2120, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3466, 1, 1097, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3467, 1, 2121, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3468, 1, 1098, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3469, 1, 2122, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3470, 1, 2123, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3471, 1, 2124, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3472, 1, 1101, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3473, 1, 2125, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3474, 1, 1102, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3475, 1, 2126, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3476, 1, 1103, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3477, 1, 2127, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3478, 1, 1104, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3479, 1, 2128, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3480, 1, 1105, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3481, 1, 2129, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3482, 1, 1106, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3483, 1, 2130, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3484, 1, 2131, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3485, 1, 1108, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3486, 1, 2132, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3487, 1, 1109, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3488, 1, 2133, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3489, 1, 2134, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3490, 1, 2135, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3492, 1, 2136, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3494, 1, 2137, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3496, 1, 2138, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3498, 1, 2139, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3500, 1, 2140, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3501, 1, 2141, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3502, 1, 2142, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3503, 1, 1118, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3504, 1, 2143, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3505, 1, 1119, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3506, 1, 2144, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3507, 1, 1120, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3508, 1, 2145, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3509, 1, 2146, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3510, 1, 2147, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3511, 1, 2148, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3512, 1, 2149, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3513, 1, 2150, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3514, 1, 2151, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3515, 1, 1127, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3516, 1, 2152, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3517, 1, 1128, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3518, 1, 1129, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3519, 1, 2153, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3520, 1, 1130, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3521, 1, 2154, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3522, 1, 2155, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3523, 1, 1132, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3524, 1, 2156, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3525, 1, 1133, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3526, 1, 2157, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3527, 1, 1134, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3528, 1, 2158, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3529, 1, 2159, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3530, 1, 1135, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3531, 1, 2160, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3532, 1, 1136, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3533, 1, 1137, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3534, 1, 2161, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3535, 1, 114, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3536, 1, 2162, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3537, 1, 1139, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3538, 1, 115, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3539, 1, 1140, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3540, 1, 116, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3541, 1, 2164, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3542, 1, 1141, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3543, 1, 2165, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3544, 1, 1142, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3545, 1, 2166, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3546, 1, 1143, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3547, 1, 2167, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3548, 1, 2168, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3549, 1, 2169, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3550, 1, 2170, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3551, 1, 2171, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3552, 1, 2172, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3553, 1, 2173, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3554, 1, 1150, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3555, 1, 2174, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3556, 1, 2175, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3557, 1, 2176, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3558, 1, 2177, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3559, 1, 2178, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3560, 1, 2179, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3561, 1, 2180, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3562, 1, 2181, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3563, 1, 2182, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3564, 1, 2183, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3565, 1, 2184, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3566, 1, 1161, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3567, 1, 1162, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3568, 1, 1163, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3569, 1, 1164, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3570, 1, 1165, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3571, 1, 1166, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3572, 1, 1173, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3573, 1, 1174, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3574, 1, 1175, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3575, 1, 1176, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3576, 1, 1177, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3577, 1, 1178, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3578, 1, 1185, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3579, 1, 2209, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3580, 1, 1186, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3581, 1, 1187, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3582, 1, 1188, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3583, 1, 1189, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3584, 1, 1190, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3585, 1, 1191, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3586, 1, 1192, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3587, 1, 1193, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3588, 1, 1194, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3589, 1, 1195, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3590, 1, 1196, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3591, 1, 1197, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3592, 1, 1198, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3593, 1, 1199, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3594, 1, 1200, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3595, 1, 1201, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3596, 1, 1202, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3597, 1, 1207, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3598, 1, 1208, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3599, 1, 1209, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3600, 1, 1210, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3601, 1, 1211, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3602, 1, 1212, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3603, 1, 1213, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3604, 1, 1215, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3605, 1, 1216, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3606, 1, 1217, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3607, 1, 1218, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3608, 1, 1219, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3609, 1, 1220, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3610, 1, 1221, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3611, 1, 1222, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3612, 1, 1226, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3613, 1, 1227, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3614, 1, 1228, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3615, 1, 1229, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3616, 1, 1237, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3617, 1, 1238, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3618, 1, 2262, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3619, 1, 1239, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3620, 1, 1240, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3621, 1, 1241, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3622, 1, 1242, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3623, 1, 1243, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3629, 1, 2275, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3631, 1, 2276, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3632, 1, 2277, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3633, 1, 1254, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3634, 1, 1255, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3635, 1, 1256, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3636, 1, 1257, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3637, 1, 2281, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3638, 1, 1258, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3639, 1, 2282, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3640, 1, 1259, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3641, 1, 2283, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3642, 1, 1260, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3643, 1, 2284, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3644, 1, 1261, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3645, 1, 2285, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3646, 1, 1263, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3647, 1, 2287, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3648, 1, 1264, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3649, 1, 2288, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3650, 1, 1265, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3651, 1, 1266, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3652, 1, 1267, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3653, 1, 2293, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3654, 1, 2294, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3655, 1, 2297, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3656, 1, 2300, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3657, 1, 2301, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3658, 1, 2302, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3659, 1, 2303, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3660, 1, 2304, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3661, 1, 1281, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3662, 1, 2305, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3663, 1, 1282, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3664, 1, 2306, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3665, 1, 2307, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3666, 1, 2308, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3667, 1, 2309, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3668, 1, 2310, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3669, 1, 2311, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3670, 1, 2312, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3671, 1, 2313, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3672, 1, 2314, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3673, 1, 2315, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3674, 1, 2316, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3675, 1, 2317, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3676, 1, 2318, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3677, 1, 2319, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3678, 1, 2320, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3679, 1, 2321, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3680, 1, 2322, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3681, 1, 2323, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3682, 1, 2324, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3683, 1, 2325, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3684, 1, 2326, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3685, 1, 2327, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3686, 1, 2328, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3687, 1, 2329, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3688, 1, 2330, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3689, 1, 2331, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3690, 1, 2332, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3691, 1, 2333, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3692, 1, 2334, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3693, 1, 2335, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3694, 1, 2336, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3695, 1, 2337, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3696, 1, 2338, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3697, 1, 2339, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3698, 1, 2340, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3699, 1, 2341, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3700, 1, 2342, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3701, 1, 2343, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3702, 1, 2344, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3703, 1, 2345, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3704, 1, 2346, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3705, 1, 2347, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3706, 1, 2348, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3707, 1, 2349, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3708, 1, 2350, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3709, 1, 2351, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3710, 1, 2352, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3711, 1, 2353, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3712, 1, 2354, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3713, 1, 2355, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3714, 1, 2356, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3715, 1, 2357, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3716, 1, 2358, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3717, 1, 2359, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3718, 1, 2360, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3719, 1, 2361, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3720, 1, 2362, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3721, 1, 2363, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3722, 1, 2364, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3723, 1, 2365, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3724, 1, 2366, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3725, 1, 2367, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3726, 1, 2368, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3727, 1, 2369, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3728, 1, 2374, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3729, 1, 2375, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3730, 1, 2376, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3731, 1, 2377, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3732, 1, 2378, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3733, 1, 2379, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3734, 1, 2380, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3735, 1, 2381, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3736, 1, 2382, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3737, 1, 2383, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3738, 1, 2384, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3739, 1, 2385, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3740, 1, 2386, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3741, 1, 2387, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3742, 1, 2388, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3743, 1, 2389, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3744, 1, 2390, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3745, 1, 2391, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3746, 1, 2392, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3747, 1, 2393, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3748, 1, 2394, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3749, 1, 2395, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3750, 1, 2396, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3751, 1, 2397, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3752, 1, 2398, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3753, 1, 2399, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3754, 1, 2400, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3755, 1, 2401, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3756, 1, 2402, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3757, 1, 2403, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3758, 1, 2404, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3759, 1, 2405, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3760, 1, 2406, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3761, 1, 2407, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3762, 1, 2408, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3763, 1, 2409, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3764, 1, 2410, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3765, 1, 2411, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3766, 1, 2412, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3767, 1, 2413, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3768, 1, 2414, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3769, 1, 2415, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3770, 1, 2416, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3771, 1, 2417, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3772, 1, 2418, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3773, 1, 2419, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3774, 1, 2420, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3775, 1, 2421, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3776, 1, 2422, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3777, 1, 2423, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3778, 1, 2424, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3779, 1, 2425, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3780, 1, 2426, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3781, 1, 2427, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3782, 1, 2428, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3783, 1, 2429, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3784, 1, 2430, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3785, 1, 2431, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3786, 1, 2432, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3787, 1, 2433, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3788, 1, 2435, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3789, 1, 2436, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3790, 1, 2437, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3791, 1, 2438, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3792, 1, 2439, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3793, 1, 2440, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3794, 1, 2441, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3795, 1, 2442, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3796, 1, 2443, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3797, 1, 2444, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3798, 1, 2445, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3799, 1, 2446, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3800, 1, 2447, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3801, 1, 2448, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3802, 1, 2449, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3803, 1, 2450, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3804, 1, 2451, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3805, 1, 2452, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3806, 1, 2453, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3807, 1, 2472, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3808, 1, 2478, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3809, 1, 2479, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3810, 1, 2480, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3811, 1, 2481, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3812, 1, 2482, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3813, 1, 2483, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3814, 1, 2484, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3815, 1, 2485, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3816, 1, 2486, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3817, 1, 2487, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3818, 1, 2488, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3819, 1, 2489, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3820, 1, 2490, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3821, 1, 2491, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3822, 1, 2492, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3823, 1, 2493, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3824, 1, 2494, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3825, 1, 2495, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3826, 1, 2497, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3827, 1, 2516, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3828, 1, 2517, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3829, 1, 2518, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3830, 1, 2519, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3831, 1, 2520, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3832, 1, 2521, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3833, 1, 2522, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3834, 1, 2523, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3835, 1, 2524, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3836, 1, 2525, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3837, 1, 2526, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3838, 1, 2527, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3839, 1, 2528, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3840, 1, 2529, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3841, 1, 2530, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3842, 1, 2531, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3843, 1, 2532, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3844, 1, 2533, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3845, 1, 2534, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3846, 1, 2535, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3847, 1, 2536, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3854, 1, 2543, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3855, 1, 2544, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3856, 1, 2000, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3857, 1, 2002, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3858, 1, 2003, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3859, 1, 2004, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3860, 1, 2005, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3861, 1, 2006, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3862, 1, 2008, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3863, 1, 2009, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3864, 1, 2010, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3865, 1, 2011, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3866, 1, 2012, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3867, 1, 2014, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3868, 1, 2015, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3869, 1, 2016, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3870, 1, 2017, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3871, 1, 2018, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3872, 1, 2019, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3873, 1, 2020, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3874, 1, 2021, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3875, 1, 2022, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3876, 1, 2023, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3877, 1, 1001, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3878, 1, 2025, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3879, 1, 1002, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3880, 1, 2026, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3881, 1, 1003, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3882, 1, 2027, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3883, 1, 1004, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3884, 1, 2028, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3885, 1, 1005, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3886, 1, 2029, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3887, 1, 1006, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3888, 1, 2030, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3889, 1, 1007, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3890, 1, 1008, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3891, 1, 2032, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3892, 1, 1009, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3893, 1, 2033, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3894, 1, 1010, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3895, 1, 2034, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3896, 1, 1011, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3897, 1, 2035, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3898, 1, 1012, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3899, 1, 2036, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3900, 1, 1013, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3901, 1, 1014, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3902, 1, 2038, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3903, 1, 1015, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3904, 1, 2039, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3905, 1, 1016, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3906, 1, 2040, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3907, 1, 1017, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3908, 1, 2041, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3909, 1, 1018, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3910, 1, 2042, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3911, 1, 1019, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3912, 1, 2043, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3913, 1, 1020, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3914, 1, 2044, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3915, 1, 1021, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3916, 1, 2045, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3917, 1, 1022, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3918, 1, 2046, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3919, 1, 1023, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3920, 1, 2047, '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-01-02 17:35:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3921, 143, 1, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3922, 143, 2, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3923, 143, 1031, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3924, 143, 1032, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3925, 143, 1033, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3926, 143, 1034, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3927, 143, 1035, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3928, 143, 1036, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3929, 143, 1037, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3930, 143, 1038, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3931, 143, 1039, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3932, 143, 1050, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3933, 143, 1051, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3934, 143, 1052, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3935, 143, 1053, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3936, 143, 1054, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3937, 143, 1056, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3938, 143, 1057, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3939, 143, 1058, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3940, 143, 1059, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3941, 143, 1060, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3942, 143, 1063, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3943, 143, 1064, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3944, 143, 1065, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3945, 143, 1066, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3946, 143, 1067, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3947, 143, 1070, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3948, 143, 1075, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3949, 143, 1076, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3950, 143, 1077, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3951, 143, 1078, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3952, 143, 1082, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3953, 143, 1083, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3954, 143, 1084, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3955, 143, 1085, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3956, 143, 1086, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3957, 143, 1087, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3958, 143, 1088, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3959, 143, 1089, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3960, 143, 1090, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3961, 143, 1091, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3962, 143, 1092, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3963, 143, 100, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3964, 143, 101, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3965, 143, 102, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3966, 143, 103, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3967, 143, 106, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3968, 143, 107, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3969, 143, 110, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3970, 143, 111, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3971, 143, 112, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3972, 143, 113, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3973, 143, 1138, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3974, 143, 114, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3975, 143, 1139, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3976, 143, 115, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3977, 143, 1140, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3978, 143, 116, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3979, 143, 1141, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3980, 143, 1142, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3981, 143, 1143, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3982, 143, 2472, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3983, 143, 2478, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3984, 143, 2479, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3985, 143, 2480, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3986, 143, 2481, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3987, 143, 2482, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3988, 143, 2483, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3989, 143, 2484, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3990, 143, 2485, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3991, 143, 2486, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3992, 143, 2487, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3993, 143, 2488, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3994, 143, 2489, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3995, 143, 2490, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3996, 143, 2491, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3997, 143, 2492, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3998, 143, 2493, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3999, 143, 2494, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4000, 143, 2495, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4001, 143, 2497, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4002, 143, 1224, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4003, 143, 1225, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4004, 143, 1226, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4005, 143, 1227, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4006, 143, 1228, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4007, 143, 1229, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4008, 143, 1237, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4009, 143, 1238, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4010, 143, 1239, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4011, 143, 1240, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4012, 143, 1241, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4013, 143, 1242, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4014, 143, 1243, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4015, 143, 2525, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4016, 143, 1255, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4017, 143, 1256, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4018, 143, 1001, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4019, 143, 1257, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4020, 143, 1002, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4021, 143, 1258, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4022, 143, 1003, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4023, 143, 1259, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4024, 143, 1004, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4025, 143, 1260, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4026, 143, 1005, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4027, 143, 1006, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4028, 143, 1007, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4029, 143, 1008, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4030, 143, 1009, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4031, 143, 1010, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4032, 143, 1011, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4033, 143, 1012, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4034, 143, 1013, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4035, 143, 1014, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4036, 143, 1015, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4037, 143, 1016, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4038, 143, 1017, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4039, 143, 1018, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4040, 143, 1019, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4041, 143, 1020, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4042, 144, 1, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4043, 144, 2, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4044, 144, 1031, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4045, 144, 1032, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4046, 144, 1033, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4047, 144, 1034, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4048, 144, 1035, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4049, 144, 1036, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4050, 144, 1037, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4051, 144, 1038, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4052, 144, 1039, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4053, 144, 1050, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4054, 144, 1051, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4055, 144, 1052, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4056, 144, 1053, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4057, 144, 1054, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4058, 144, 1056, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4059, 144, 1057, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4060, 144, 1058, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4061, 144, 1059, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4062, 144, 1060, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4063, 144, 1063, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4064, 144, 1064, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4065, 144, 1065, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4066, 144, 1066, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4067, 144, 1067, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4068, 144, 1070, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4069, 144, 1075, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4070, 144, 1076, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4071, 144, 1077, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4072, 144, 1078, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4073, 144, 1082, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4074, 144, 1083, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4075, 144, 1084, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4076, 144, 1085, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4077, 144, 1086, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4078, 144, 1087, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4079, 144, 1088, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4080, 144, 1089, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4081, 144, 1090, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4082, 144, 1091, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4083, 144, 1092, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4084, 144, 100, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4085, 144, 101, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4086, 144, 102, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4087, 144, 103, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4088, 144, 106, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4089, 144, 107, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4090, 144, 110, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4091, 144, 111, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4092, 144, 112, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4093, 144, 113, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4094, 144, 1138, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4095, 144, 114, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4096, 144, 1139, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4097, 144, 115, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4098, 144, 1140, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4099, 144, 116, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4100, 144, 1141, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4101, 144, 1142, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4102, 144, 1143, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4103, 144, 2472, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4104, 144, 2478, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4105, 144, 2479, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4106, 144, 2480, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4107, 144, 2481, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4108, 144, 2482, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4109, 144, 2483, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4110, 144, 2484, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4111, 144, 2485, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4112, 144, 2486, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4113, 144, 2487, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4114, 144, 2488, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4115, 144, 2489, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4116, 144, 2490, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4117, 144, 2491, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4118, 144, 2492, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4119, 144, 2493, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4120, 144, 2494, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4121, 144, 2495, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4122, 144, 2497, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4123, 144, 1224, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4124, 144, 1225, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4125, 144, 1226, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4126, 144, 1227, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4127, 144, 1228, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4128, 144, 1229, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4129, 144, 1237, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4130, 144, 1238, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4131, 144, 1239, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4132, 144, 1240, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4133, 144, 1241, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4134, 144, 1242, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4135, 144, 1243, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4136, 144, 2525, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4137, 144, 1255, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4138, 144, 1256, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4139, 144, 1001, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4140, 144, 1257, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4141, 144, 1002, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4142, 144, 1258, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4143, 144, 1003, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4144, 144, 1259, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4145, 144, 1004, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4146, 144, 1260, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4147, 144, 1005, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4148, 144, 1006, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4149, 144, 1007, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4150, 144, 1008, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4151, 144, 1009, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4152, 144, 1010, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4153, 144, 1011, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4154, 144, 1012, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4155, 144, 1013, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4156, 144, 1014, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4157, 144, 1015, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4158, 144, 1016, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4159, 144, 1017, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4160, 144, 1018, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4161, 144, 1019, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4162, 144, 1020, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); @@ -5116,253 +3684,17 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4281, 140, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4282, 140, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4283, 140, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4284, 140, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4285, 140, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4286, 140, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4287, 140, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4288, 140, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4289, 140, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4290, 140, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4291, 140, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4292, 140, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4293, 140, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4294, 140, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4295, 140, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4296, 140, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4297, 140, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4298, 140, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4299, 140, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4300, 140, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4301, 140, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4302, 140, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4303, 140, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4304, 140, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4305, 140, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4306, 140, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4307, 140, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4308, 140, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4309, 140, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4310, 140, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4311, 140, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4312, 140, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4313, 140, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4314, 140, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4315, 140, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4316, 140, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4317, 140, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4318, 140, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4319, 140, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4320, 140, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4321, 140, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4322, 140, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4323, 140, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4324, 140, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4325, 140, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4326, 140, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4327, 140, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4328, 140, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4329, 140, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4330, 140, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4331, 140, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4332, 140, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4333, 140, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4334, 140, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4335, 140, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4336, 140, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4337, 140, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4338, 140, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4339, 140, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4340, 141, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4341, 141, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4342, 141, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4343, 141, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4344, 141, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4345, 141, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4346, 141, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4347, 141, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4348, 141, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4349, 141, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4350, 141, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4351, 141, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4352, 141, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4353, 141, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4354, 141, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4355, 141, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4356, 141, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4357, 141, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4358, 141, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4359, 141, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4360, 141, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4361, 141, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4362, 141, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4363, 141, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4364, 141, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4365, 141, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4366, 141, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4367, 141, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4368, 141, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4369, 141, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4370, 141, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4371, 141, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4372, 141, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4373, 141, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4374, 141, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4375, 141, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4376, 141, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4377, 141, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4378, 141, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4379, 141, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4380, 141, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4381, 141, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4382, 141, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4383, 141, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4384, 141, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4385, 141, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4386, 141, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4387, 141, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4388, 141, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4389, 141, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4390, 141, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4391, 141, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4392, 141, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4393, 141, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4394, 141, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4395, 141, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4396, 141, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4397, 141, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4398, 141, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4399, 143, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4400, 143, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4401, 143, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4402, 143, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4403, 143, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4404, 143, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4405, 143, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4406, 143, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4407, 143, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4408, 143, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4409, 143, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4410, 143, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4411, 143, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4412, 143, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4413, 143, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4414, 143, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4415, 143, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4416, 143, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4417, 143, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4418, 143, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4419, 143, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4420, 143, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4421, 143, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4422, 143, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4423, 143, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4424, 143, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4425, 143, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4426, 143, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4427, 143, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4428, 143, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4429, 143, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4430, 143, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4431, 143, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4432, 143, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4433, 143, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4434, 143, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4435, 143, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4436, 143, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4437, 143, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4438, 143, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4439, 143, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4440, 143, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4441, 143, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4442, 143, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4443, 143, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4444, 143, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4445, 143, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4446, 143, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4447, 143, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4448, 143, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4449, 143, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4450, 143, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4451, 143, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4452, 143, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4453, 143, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4454, 143, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4455, 143, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4456, 143, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4457, 143, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4458, 144, 5, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4459, 144, 1118, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4460, 144, 1119, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4461, 144, 1120, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4462, 144, 2713, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4463, 144, 2714, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4464, 144, 2715, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4465, 144, 2716, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4466, 144, 2717, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4467, 144, 2718, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4468, 144, 2720, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4469, 144, 1185, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4470, 144, 2721, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4471, 144, 1186, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4472, 144, 2722, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4473, 144, 1187, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4474, 144, 2723, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4475, 144, 1188, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4476, 144, 2724, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4477, 144, 1189, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4478, 144, 2725, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4479, 144, 1190, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4480, 144, 2726, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4481, 144, 1191, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4482, 144, 2727, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4483, 144, 1192, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4484, 144, 2728, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4485, 144, 1193, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4486, 144, 2729, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4487, 144, 1194, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4488, 144, 2730, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4489, 144, 1195, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4490, 144, 2731, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4491, 144, 1196, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4492, 144, 2732, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4493, 144, 1197, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4494, 144, 2733, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4495, 144, 1198, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4496, 144, 2734, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4497, 144, 1199, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4498, 144, 2735, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4499, 144, 1200, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4500, 144, 1201, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4501, 144, 1202, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4502, 144, 1207, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4503, 144, 1208, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4504, 144, 1209, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4505, 144, 1210, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4506, 144, 1211, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4507, 144, 1212, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4508, 144, 1213, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4509, 144, 1215, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4510, 144, 1216, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4511, 144, 1217, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4512, 144, 1218, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4513, 144, 1219, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4514, 144, 1220, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4515, 144, 1221, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4516, 144, 1222, '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:18', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, '1', to_date('2024-04-30 09:38:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-30 09:38:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, '1', to_date('2024-04-30 09:38:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-30 09:38:37', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); COMMIT; -- @formatter:on CREATE SEQUENCE system_role_menu_seq - START WITH 4517 - INCREMENT BY 1; - + START WITH 5779; -- ---------------------------- --- system_sms_channel --- ------------------------------ +-- Table structure for system_sms_channel +-- ---------------------------- CREATE TABLE system_sms_channel ( id number NOT NULL, @@ -5391,10 +3723,16 @@ COMMENT ON COLUMN system_sms_channel.remark IS '备注'; COMMENT ON COLUMN system_sms_channel.api_key IS '短信 API 的账号'; COMMENT ON COLUMN system_sms_channel.api_secret IS '短信 API 的秘钥'; COMMENT ON COLUMN system_sms_channel.callback_url IS '短信发送回调 URL'; +COMMENT ON COLUMN system_sms_channel.creator IS '创建者'; COMMENT ON COLUMN system_sms_channel.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_channel.updater IS '更新者'; COMMENT ON COLUMN system_sms_channel.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_channel.deleted IS '是否删除'; COMMENT ON TABLE system_sms_channel IS '短信渠道'; +-- ---------------------------- +-- Records of system_sms_channel +-- ---------------------------- -- @formatter:off INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, 'Ballcat', 'ALIYUN', 0, '你要改哦,只有我可以用!!!!', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, '', to_date('2021-03-31 11:53:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:10:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, '测试渠道', 'DEBUG_DING_TALK', 0, '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', to_date('2021-04-13 00:23:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-27 20:29:49', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -5403,13 +3741,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_sms_channel_seq - START WITH 7 - INCREMENT BY 1; - + START WITH 7; -- ---------------------------- --- system_sms_code --- ------------------------------ +-- Table structure for system_sms_code +-- ---------------------------- CREATE TABLE system_sms_code ( id number NOT NULL, @@ -5443,20 +3779,21 @@ COMMENT ON COLUMN system_sms_code.today_index IS '今日发送的第几条'; COMMENT ON COLUMN system_sms_code.used IS '是否使用'; COMMENT ON COLUMN system_sms_code.used_time IS '使用时间'; COMMENT ON COLUMN system_sms_code.used_ip IS '使用 IP'; +COMMENT ON COLUMN system_sms_code.creator IS '创建者'; COMMENT ON COLUMN system_sms_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_code.updater IS '更新者'; COMMENT ON COLUMN system_sms_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; -COMMENT ON COLUMN system_sms_code.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_code.idx_mobile IS '手机号'; COMMENT ON TABLE system_sms_code IS '手机验证码'; CREATE SEQUENCE system_sms_code_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_sms_log --- ------------------------------ +-- Table structure for system_sms_log +-- ---------------------------- CREATE TABLE system_sms_log ( id number NOT NULL, @@ -5513,18 +3850,19 @@ COMMENT ON COLUMN system_sms_log.receive_status IS '接收状态'; COMMENT ON COLUMN system_sms_log.receive_time IS '接收时间'; COMMENT ON COLUMN system_sms_log.api_receive_code IS 'API 接收结果的编码'; COMMENT ON COLUMN system_sms_log.api_receive_msg IS 'API 接收结果的说明'; +COMMENT ON COLUMN system_sms_log.creator IS '创建者'; COMMENT ON COLUMN system_sms_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_log.updater IS '更新者'; COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_log.deleted IS '是否删除'; COMMENT ON TABLE system_sms_log IS '短信日志'; CREATE SEQUENCE system_sms_log_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_sms_template --- ------------------------------ +-- Table structure for system_sms_template +-- ---------------------------- CREATE TABLE system_sms_template ( id number NOT NULL, @@ -5549,7 +3887,7 @@ ALTER TABLE system_sms_template ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); COMMENT ON COLUMN system_sms_template.id IS '编号'; -COMMENT ON COLUMN system_sms_template.type IS '短信签名'; +COMMENT ON COLUMN system_sms_template.type IS '模板类型'; COMMENT ON COLUMN system_sms_template.status IS '开启状态'; COMMENT ON COLUMN system_sms_template.code IS '模板编码'; COMMENT ON COLUMN system_sms_template.name IS '模板名称'; @@ -5559,10 +3897,16 @@ COMMENT ON COLUMN system_sms_template.remark IS '备注'; COMMENT ON COLUMN system_sms_template.api_template_id IS '短信 API 的模板编号'; COMMENT ON COLUMN system_sms_template.channel_id IS '短信渠道编号'; COMMENT ON COLUMN system_sms_template.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_template.creator IS '创建者'; COMMENT ON COLUMN system_sms_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_template.updater IS '更新者'; COMMENT ON COLUMN system_sms_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_template.deleted IS '是否删除'; COMMENT ON TABLE system_sms_template IS '短信模板'; +-- ---------------------------- +-- Records of system_sms_template +-- ---------------------------- -- @formatter:off INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, 'test_01', '测试验证码短信', '正在进行登录操作{operation},您的验证码是{code}', '["operation","code"]', '测试备注', '4383920', 6, 'DEBUG_DING_TALK', '', to_date('2021-03-31 10:49:38', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 22:32:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, 'test_02', '公告通知', '您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', '["code"]', NULL, 'SMS_207945135', 2, 'ALIYUN', '', to_date('2021-03-31 11:56:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2021-04-10 01:22:02', 'SYYYY-MM-DD HH24:MI:SS'), '0'); @@ -5580,13 +3924,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_sms_template_seq - START WITH 17 - INCREMENT BY 1; - + START WITH 17; -- ---------------------------- --- system_social_client --- ------------------------------ +-- Table structure for system_social_client +-- ---------------------------- CREATE TABLE system_social_client ( id number NOT NULL, @@ -5616,11 +3958,17 @@ COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; COMMENT ON COLUMN system_social_client.status IS '状态'; +COMMENT ON COLUMN system_social_client.creator IS '创建者'; COMMENT ON COLUMN system_social_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_client.updater IS '更新者'; COMMENT ON COLUMN system_social_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_client.deleted IS '是否删除'; COMMENT ON COLUMN system_social_client.tenant_id IS '租户编号'; COMMENT ON TABLE system_social_client IS '社交客户端表'; +-- ---------------------------- +-- Records of system_social_client +-- ---------------------------- -- @formatter:off INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '钉钉', 20, 2, 'dingvrnreaje3yqvzhxg', 'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, '', to_date('2023-10-18 11:21:18', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-20 21:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '钉钉(王土豆)', 20, 2, 'dingtsu9hpepjkbmthhw', 'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, '', to_date('2023-10-18 11:21:18', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2023-12-20 21:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', 121); @@ -5630,13 +3978,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_social_client_seq - START WITH 44 - INCREMENT BY 1; - + START WITH 44; -- ---------------------------- --- system_social_user --- ------------------------------ +-- Table structure for system_social_user +-- ---------------------------- CREATE TABLE system_social_user ( id number NOT NULL, @@ -5670,19 +4016,20 @@ COMMENT ON COLUMN system_social_user.avatar IS '用户头像'; COMMENT ON COLUMN system_social_user.raw_user_info IS '原始用户数据,一般是 JSON 格式'; COMMENT ON COLUMN system_social_user.code IS '最后一次的认证 code'; COMMENT ON COLUMN system_social_user.state IS '最后一次的认证 state'; +COMMENT ON COLUMN system_social_user.creator IS '创建者'; COMMENT ON COLUMN system_social_user.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user.updater IS '更新者'; COMMENT ON COLUMN system_social_user.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; COMMENT ON TABLE system_social_user IS '社交用户表'; CREATE SEQUENCE system_social_user_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_social_user_bind --- ------------------------------ +-- Table structure for system_social_user_bind +-- ---------------------------- CREATE TABLE system_social_user_bind ( id number NOT NULL, @@ -5706,19 +4053,20 @@ COMMENT ON COLUMN system_social_user_bind.user_id IS '用户编号'; COMMENT ON COLUMN system_social_user_bind.user_type IS '用户类型'; COMMENT ON COLUMN system_social_user_bind.social_type IS '社交平台的类型'; COMMENT ON COLUMN system_social_user_bind.social_user_id IS '社交用户的编号'; +COMMENT ON COLUMN system_social_user_bind.creator IS '创建者'; COMMENT ON COLUMN system_social_user_bind.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user_bind.updater IS '更新者'; COMMENT ON COLUMN system_social_user_bind.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; CREATE SEQUENCE system_social_user_bind_seq - START WITH 1 - INCREMENT BY 1; - + START WITH 1; -- ---------------------------- --- system_tenant --- ------------------------------ +-- Table structure for system_tenant +-- ---------------------------- CREATE TABLE system_tenant ( id number NOT NULL, @@ -5747,32 +4095,33 @@ COMMENT ON COLUMN system_tenant.contact_user_id IS '联系人的用户编号'; COMMENT ON COLUMN system_tenant.contact_name IS '联系人'; COMMENT ON COLUMN system_tenant.contact_mobile IS '联系手机'; COMMENT ON COLUMN system_tenant.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant.website IS '绑定域名'; COMMENT ON COLUMN system_tenant.package_id IS '租户套餐编号'; COMMENT ON COLUMN system_tenant.expire_time IS '过期时间'; COMMENT ON COLUMN system_tenant.account_count IS '账号数量'; +COMMENT ON COLUMN system_tenant.creator IS '创建者'; COMMENT ON COLUMN system_tenant.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant.updater IS '更新者'; COMMENT ON COLUMN system_tenant.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant.deleted IS '是否删除'; COMMENT ON TABLE system_tenant IS '租户表'; +-- ---------------------------- +-- Records of system_tenant +-- ---------------------------- -- @formatter:off INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn', 0, to_date('2099-02-19 17:14:16', 'SYYYY-MM-DD HH24:MI:SS'), 9999, '1', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:41', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, to_date('2024-03-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 20, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:47', 'SYYYY-MM-DD HH24:MI:SS'), '0'); INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, to_date('2022-04-30 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 50, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-06 11:41:53', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (151, '大租户', 126, '土豆大', NULL, 0, 'https://tudou.iocoder.cn', 111, to_date('2023-12-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 10, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-08 23:39:56', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (152, '新租户', 127, '土豆', NULL, 0, 'http://xx.iocoder.cn', 111, to_date('2025-12-31 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 50, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (153, '小明的租户', 128, 'xiaoming', '15601691301', 0, 'xiaoming.iocoder.cn', 111, to_date('2025-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 100, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-28 22:53:54', 'SYYYY-MM-DD HH24:MI:SS'), '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, to_date('2024-04-30 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 123, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-10 09:40:57', 'SYYYY-MM-DD HH24:MI:SS'), '0'); COMMIT; -- @formatter:on CREATE SEQUENCE system_tenant_seq - START WITH 155 - INCREMENT BY 1; - + START WITH 123; -- ---------------------------- --- system_tenant_package --- ------------------------------ +-- Table structure for system_tenant_package +-- ---------------------------- CREATE TABLE system_tenant_package ( id number NOT NULL, @@ -5793,24 +4142,29 @@ ALTER TABLE system_tenant_package COMMENT ON COLUMN system_tenant_package.id IS '套餐编号'; COMMENT ON COLUMN system_tenant_package.name IS '套餐名'; COMMENT ON COLUMN system_tenant_package.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant_package.remark IS '备注'; COMMENT ON COLUMN system_tenant_package.menu_ids IS '关联的菜单编号'; +COMMENT ON COLUMN system_tenant_package.creator IS '创建者'; COMMENT ON COLUMN system_tenant_package.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant_package.updater IS '更新者'; COMMENT ON COLUMN system_tenant_package.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant_package.deleted IS '是否删除'; COMMENT ON TABLE system_tenant_package IS '租户套餐表'; +-- ---------------------------- +-- Records of system_tenant_package +-- ---------------------------- -- @formatter:off INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', to_date('2022-02-22 00:54:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:53:17', 'SYYYY-MM-DD HH24:MI:SS'), '0'); COMMIT; -- @formatter:on CREATE SEQUENCE system_tenant_package_seq - START WITH 112 - INCREMENT BY 1; - + START WITH 112; -- ---------------------------- --- system_user_post --- ------------------------------ +-- Table structure for system_user_post +-- ---------------------------- CREATE TABLE system_user_post ( id number NOT NULL, @@ -5830,11 +4184,17 @@ ALTER TABLE system_user_post COMMENT ON COLUMN system_user_post.id IS 'id'; COMMENT ON COLUMN system_user_post.user_id IS '用户ID'; COMMENT ON COLUMN system_user_post.post_id IS '岗位ID'; +COMMENT ON COLUMN system_user_post.creator IS '创建者'; COMMENT ON COLUMN system_user_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_post.updater IS '更新者'; COMMENT ON COLUMN system_user_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_post.deleted IS '是否删除'; COMMENT ON COLUMN system_user_post.tenant_id IS '租户编号'; COMMENT ON TABLE system_user_post IS '用户岗位表'; +-- ---------------------------- +-- Records of system_user_post +-- ---------------------------- -- @formatter:off INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2022-05-02 07:25:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -5848,13 +4208,11 @@ COMMIT; -- @formatter:on CREATE SEQUENCE system_user_post_seq - START WITH 125 - INCREMENT BY 1; - + START WITH 125; -- ---------------------------- --- system_user_role --- ------------------------------ +-- Table structure for system_user_role +-- ---------------------------- CREATE TABLE system_user_role ( id number NOT NULL, @@ -5874,11 +4232,17 @@ ALTER TABLE system_user_role COMMENT ON COLUMN system_user_role.id IS '自增编号'; COMMENT ON COLUMN system_user_role.user_id IS '用户ID'; COMMENT ON COLUMN system_user_role.role_id IS '角色ID'; +COMMENT ON COLUMN system_user_role.creator IS '创建者'; COMMENT ON COLUMN system_user_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_role.updater IS '更新者'; COMMENT ON COLUMN system_user_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_role.deleted IS '是否删除'; COMMENT ON COLUMN system_user_role.tenant_id IS '租户编号'; COMMENT ON TABLE system_user_role IS '用户和角色关联表'; +-- ---------------------------- +-- Records of system_user_role +-- ---------------------------- -- @formatter:off INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:13', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -5886,42 +4250,24 @@ INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, update INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:12', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2022-05-12 12:35:11', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-01-11 13:19:45', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 107, 106, '1', to_date('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 22:59:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 118); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 108, 107, '1', to_date('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 23:00:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', 119); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 109, 108, '1', to_date('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-20 23:11:50', 'SYYYY-MM-DD HH24:MI:SS'), '0', 120); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-02-22 00:56:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, '110', to_date('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '110', to_date('2022-02-23 13:14:38', 'SYYYY-MM-DD HH24:MI:SS'), '0', 121); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, '1', to_date('2022-05-12 20:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-12 20:39:29', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (19, 116, 113, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, '1', to_date('2022-05-28 15:43:57', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-28 15:43:57', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', to_date('2022-07-21 22:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-21 22:08:30', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (23, 119, 114, '1', to_date('2022-12-30 11:32:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:32:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 125); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (24, 120, 115, '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:42', 'SYYYY-MM-DD HH24:MI:SS'), '0', 126); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (25, 121, 116, '1', to_date('2022-12-30 11:33:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:33:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 127); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (26, 122, 118, '1', to_date('2022-12-30 11:47:53', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-12-30 11:47:53', 'SYYYY-MM-DD HH24:MI:SS'), '0', 129); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (28, 123, 136, '1', to_date('2023-03-05 21:23:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:23:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 147); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (29, 124, 137, '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:42:27', 'SYYYY-MM-DD HH24:MI:SS'), '0', 148); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (30, 125, 138, '1', to_date('2023-03-05 21:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-03-05 21:59:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 149); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (31, 126, 139, '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-07-25 23:06:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 150); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (32, 126, 140, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (33, 127, 141, '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (34, 128, 143, '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', to_date('2024-03-15 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-15 20:00:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', to_date('2024-03-17 09:12:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-17 09:12:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', to_date('2024-03-24 22:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-24 22:23:03', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (39, 129, 144, '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); COMMIT; -- @formatter:on CREATE SEQUENCE system_user_role_seq - START WITH 40 - INCREMENT BY 1; - + START WITH 39; -- ---------------------------- --- system_users --- ------------------------------ +-- Table structure for system_users +-- ---------------------------- CREATE TABLE system_users ( id number NOT NULL, @@ -5951,20 +4297,31 @@ ALTER TABLE system_users COMMENT ON COLUMN system_users.id IS '用户ID'; COMMENT ON COLUMN system_users.username IS '用户账号'; +COMMENT ON COLUMN system_users.password IS '密码'; COMMENT ON COLUMN system_users.nickname IS '用户昵称'; COMMENT ON COLUMN system_users.remark IS '备注'; COMMENT ON COLUMN system_users.dept_id IS '部门ID'; COMMENT ON COLUMN system_users.post_ids IS '岗位编号数组'; +COMMENT ON COLUMN system_users.email IS '用户邮箱'; +COMMENT ON COLUMN system_users.mobile IS '手机号码'; COMMENT ON COLUMN system_users.sex IS '用户性别'; +COMMENT ON COLUMN system_users.avatar IS '头像地址'; COMMENT ON COLUMN system_users.status IS '帐号状态(0正常 1停用)'; +COMMENT ON COLUMN system_users.login_ip IS '最后登录IP'; COMMENT ON COLUMN system_users.login_date IS '最后登录时间'; +COMMENT ON COLUMN system_users.creator IS '创建者'; COMMENT ON COLUMN system_users.create_time IS '创建时间'; +COMMENT ON COLUMN system_users.updater IS '更新者'; COMMENT ON COLUMN system_users.update_time IS '更新时间'; +COMMENT ON COLUMN system_users.deleted IS '是否删除'; COMMENT ON COLUMN system_users.tenant_id IS '租户编号'; COMMENT ON TABLE system_users IS '用户信息表'; +-- ---------------------------- +-- Records of system_users +-- ---------------------------- -- @formatter:off -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', to_date('2024-04-23 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-04-23 23:51:16', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', to_date('2024-04-29 21:50:32', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', to_date('2021-01-05 17:03:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-04-29 21:50:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', to_date('2022-07-09 23:03:33', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-07 09:07:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2022-07-09 23:03:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-18 21:09:04', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-13 23:50:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-18 21:09:04', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-26 07:11:35', 'SYYYY-MM-DD HH24:MI:SS'), '', to_date('2021-01-21 02:13:53', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-26 07:11:35', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); @@ -5977,18 +4334,249 @@ INSERT INTO system_users (id, username, password, nickname, remark, dept_id, pos INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', to_date('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-07 21:37:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2022-03-19 18:38:51', 'SYYYY-MM-DD HH24:MI:SS'), '0', 122); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-24 22:21:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-03-19 21:50:58', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-24 22:21:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', to_date('2022-04-30 02:55:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '15601691302', '$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6', '小豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-05-17 10:07:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 124); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:40:26', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-17 09:10:27', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2022-07-09 17:44:43', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-04 09:48:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (126, 'tudou123', '$2a$04$lecJZ/CqgknEp7mDV2d4ou0beyj1GbM3.nVEZe//8WgQpR.JBgnAu', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-02 23:35:05', 'SYYYY-MM-DD HH24:MI:SS'), '0', 151); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (127, 'admin2024', '$2a$04$cHdZ7N6AUKysa2XTUG/J/egYtAzdwtpnNpcMVHDrupt1dyn4teOku', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2023-12-30 11:43:28', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-12-30 11:43:17', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2023-12-30 11:43:28', 'SYYYY-MM-DD HH24:MI:SS'), '0', 152); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (128, 'xiaoming', '$2a$04$BRinw4an9PBGvx6K7GLNre6rWU0.1HMYHkQCN6Oir74zNFKkNKRzm', 'xiaoming', NULL, NULL, NULL, '', '15601691301', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-02-29 23:48:33', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-02-27 21:58:25', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-02-29 23:48:33', 'SYYYY-MM-DD HH24:MI:SS'), '0', 153); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (129, 'hh123456', '$2a$04$8mHJM7n03bcNjtaw.IlfV.l38ikWWFJQ7NR1rHywavN7v2UyoDjwq', 'hh', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', to_date('2024-03-30 17:53:24', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-03-30 17:52:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, to_date('2024-03-30 17:53:24', 'SYYYY-MM-DD HH24:MI:SS'), '0', 154); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, 'hh', '$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', '呵呵', NULL, 100, '[]', '777@qq.com', '15601882312', 1, '', 0, '', NULL, '1', to_date('2024-04-27 08:45:56', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2024-04-27 08:45:56', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); COMMIT; -- @formatter:on CREATE SEQUENCE system_users_seq - START WITH 130 - INCREMENT BY 1; + START WITH 132; + +-- ---------------------------- +-- Table structure for yudao_demo01_contact +-- ---------------------------- +CREATE TABLE yudao_demo01_contact +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday date NOT NULL, + description varchar2(255) NOT NULL, + avatar varchar2(512) DEFAULT NULL NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); + +ALTER TABLE yudao_demo01_contact + ADD CONSTRAINT pk_yudao_demo01_contact PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo01_contact.id IS '编号'; +COMMENT ON COLUMN yudao_demo01_contact.name IS '名字'; +COMMENT ON COLUMN yudao_demo01_contact.sex IS '性别'; +COMMENT ON COLUMN yudao_demo01_contact.birthday IS '出生年'; +COMMENT ON COLUMN yudao_demo01_contact.description IS '简介'; +COMMENT ON COLUMN yudao_demo01_contact.avatar IS '头像'; +COMMENT ON COLUMN yudao_demo01_contact.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo01_contact.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo01_contact.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo01_contact.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo01_contact.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo01_contact.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo01_contact IS '示例联系人表'; + +-- ---------------------------- +-- Records of yudao_demo01_contact +-- ---------------------------- +-- @formatter:off +INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-15 23:47:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE yudao_demo01_contact_seq + START WITH 2; + +-- ---------------------------- +-- Table structure for yudao_demo02_category +-- ---------------------------- +CREATE TABLE yudao_demo02_category +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + parent_id number NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); + +ALTER TABLE yudao_demo02_category + ADD CONSTRAINT pk_yudao_demo02_category PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo02_category.id IS '编号'; +COMMENT ON COLUMN yudao_demo02_category.name IS '名字'; +COMMENT ON COLUMN yudao_demo02_category.parent_id IS '父级编号'; +COMMENT ON COLUMN yudao_demo02_category.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo02_category.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo02_category.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo02_category.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo02_category.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo02_category.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo02_category IS '示例分类表'; + +-- ---------------------------- +-- Records of yudao_demo02_category +-- ---------------------------- +-- @formatter:off +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', to_date('2023-11-15 23:34:30', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', to_date('2023-11-16 20:24:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:15', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:32', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:39', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 20:24:46', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-24 19:29:34', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE yudao_demo02_category_seq + START WITH 7; + +-- ---------------------------- +-- Table structure for yudao_demo03_course +-- ---------------------------- +CREATE TABLE yudao_demo03_course +( + id number NOT NULL, + student_id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + score smallint NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); + +ALTER TABLE yudao_demo03_course + ADD CONSTRAINT pk_yudao_demo03_course PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_course.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_course.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_course.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_course.score IS '分数'; +COMMENT ON COLUMN yudao_demo03_course.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_course.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_course.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_course.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_course.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_course.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_course IS '学生课程表'; + +-- ---------------------------- +-- Records of yudao_demo03_course +-- ---------------------------- +-- @formatter:off +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:44:40', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 15:47:09', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', to_date('2023-11-17 00:20:42', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 16:20:45', 'SYYYY-MM-DD HH24:MI:SS'), '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:13:20', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE yudao_demo03_course_seq + START WITH 14; + +-- ---------------------------- +-- Table structure for yudao_demo03_grade +-- ---------------------------- +CREATE TABLE yudao_demo03_grade +( + id number NOT NULL, + student_id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + teacher varchar2(255) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); + +ALTER TABLE yudao_demo03_grade + ADD CONSTRAINT pk_yudao_demo03_grade PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_grade.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_grade.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_grade.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_grade.teacher IS '班主任'; +COMMENT ON COLUMN yudao_demo03_grade.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_grade.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_grade.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_grade.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_grade.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_grade.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_grade IS '学生班级表'; + +-- ---------------------------- +-- Records of yudao_demo03_grade +-- ---------------------------- +-- @formatter:off +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-16 23:47:10', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 13:10:23', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on + +CREATE SEQUENCE yudao_demo03_grade_seq + START WITH 10; + +-- ---------------------------- +-- Table structure for yudao_demo03_student +-- ---------------------------- +CREATE TABLE yudao_demo03_student +( + id number NOT NULL, + name varchar2(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday date NOT NULL, + description varchar2(255) NOT NULL, + creator varchar2(64) DEFAULT '' NULL, + create_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar2(64) DEFAULT '' NULL, + update_time date DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted number(1, 0) DEFAULT 0 NOT NULL, + tenant_id number DEFAULT 0 NOT NULL +); + +ALTER TABLE yudao_demo03_student + ADD CONSTRAINT pk_yudao_demo03_student PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_student.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_student.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_student.sex IS '性别'; +COMMENT ON COLUMN yudao_demo03_student.birthday IS '出生日期'; +COMMENT ON COLUMN yudao_demo03_student.description IS '简介'; +COMMENT ON COLUMN yudao_demo03_student.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_student.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_student.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_student.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_student.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_student.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_student IS '学生表'; + +-- ---------------------------- +-- Records of yudao_demo03_student +-- ---------------------------- +-- @formatter:off +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, to_date('2023-11-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

厉害

', '1', to_date('2023-11-16 23:21:49', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:06', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, to_date('2023-11-13 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

你在教我做事?

', '1', to_date('2023-11-16 23:22:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:07', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, to_date('2023-11-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '

哈哈哈

', '1', to_date('2023-11-17 00:04:47', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2023-11-17 16:49:08', 'SYYYY-MM-DD HH24:MI:SS'), '0', 1); +COMMIT; +-- @formatter:on +CREATE SEQUENCE yudao_demo03_student_seq + START WITH 10; diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index f286b577fe..e468024552 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -1,6 +1,17 @@ +/* + Yudao Database Transfer Tool + + Source Server Type : MySQL + + Target Server Type : PostgreSQL + + Date: 2024-05-01 23:25:45 +*/ + + +-- ---------------------------- +-- Table structure for infra_api_access_log -- ---------------------------- --- infra_api_access_log --- ------------------------------ DROP TABLE IF EXISTS infra_api_access_log; CREATE TABLE infra_api_access_log ( @@ -28,16 +39,21 @@ CREATE TABLE infra_api_access_log updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_api_access_log + ADD CONSTRAINT pk_infra_api_access_log PRIMARY KEY (id); + CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); COMMENT ON COLUMN infra_api_access_log.id IS '日志主键'; +COMMENT ON COLUMN infra_api_access_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN infra_api_access_log.user_id IS '用户编号'; COMMENT ON COLUMN infra_api_access_log.user_type IS '用户类型'; COMMENT ON COLUMN infra_api_access_log.application_name IS '应用名'; +COMMENT ON COLUMN infra_api_access_log.request_method IS '请求方法名'; +COMMENT ON COLUMN infra_api_access_log.request_url IS '请求地址'; COMMENT ON COLUMN infra_api_access_log.request_params IS '请求参数'; COMMENT ON COLUMN infra_api_access_log.response_body IS '响应结果'; COMMENT ON COLUMN infra_api_access_log.user_ip IS '用户 IP'; @@ -49,21 +65,22 @@ COMMENT ON COLUMN infra_api_access_log.begin_time IS '开始请求时间'; COMMENT ON COLUMN infra_api_access_log.end_time IS '结束请求时间'; COMMENT ON COLUMN infra_api_access_log.duration IS '执行时长'; COMMENT ON COLUMN infra_api_access_log.result_code IS '结果码'; +COMMENT ON COLUMN infra_api_access_log.result_msg IS '结果提示'; +COMMENT ON COLUMN infra_api_access_log.creator IS '创建者'; COMMENT ON COLUMN infra_api_access_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_access_log.updater IS '更新者'; COMMENT ON COLUMN infra_api_access_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; DROP SEQUENCE IF EXISTS infra_api_access_log_seq; CREATE SEQUENCE infra_api_access_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_api_error_log --- ------------------------------ +-- Table structure for infra_api_error_log +-- ---------------------------- DROP TABLE IF EXISTS infra_api_error_log; CREATE TABLE infra_api_error_log ( @@ -94,10 +111,12 @@ CREATE TABLE infra_api_error_log updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_api_error_log + ADD CONSTRAINT pk_infra_api_error_log PRIMARY KEY (id); + COMMENT ON COLUMN infra_api_error_log.id IS '编号'; COMMENT ON COLUMN infra_api_error_log.trace_id IS '链路追踪编号 * @@ -113,6 +132,9 @@ COMMENT ON COLUMN infra_api_error_log.request_params IS '请求参数'; COMMENT ON COLUMN infra_api_error_log.user_ip IS '用户 IP'; COMMENT ON COLUMN infra_api_error_log.user_agent IS '浏览器 UA'; COMMENT ON COLUMN infra_api_error_log.exception_time IS '异常发生时间'; +COMMENT ON COLUMN infra_api_error_log.exception_name IS '异常名 + * + * {@link Throwable#getClass()} 的类全名'; COMMENT ON COLUMN infra_api_error_log.exception_message IS '异常导致的消息 * * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; @@ -137,21 +159,21 @@ COMMENT ON COLUMN infra_api_error_log.exception_line_number IS '异常发生的 COMMENT ON COLUMN infra_api_error_log.process_status IS '处理状态'; COMMENT ON COLUMN infra_api_error_log.process_time IS '处理时间'; COMMENT ON COLUMN infra_api_error_log.process_user_id IS '处理用户编号'; +COMMENT ON COLUMN infra_api_error_log.creator IS '创建者'; COMMENT ON COLUMN infra_api_error_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_error_log.updater IS '更新者'; COMMENT ON COLUMN infra_api_error_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; DROP SEQUENCE IF EXISTS infra_api_error_log_seq; CREATE SEQUENCE infra_api_error_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_codegen_column --- ------------------------------ +-- Table structure for infra_codegen_column +-- ---------------------------- DROP TABLE IF EXISTS infra_codegen_column; CREATE TABLE infra_codegen_column ( @@ -177,10 +199,12 @@ CREATE TABLE infra_codegen_column create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_codegen_column + ADD CONSTRAINT pk_infra_codegen_column PRIMARY KEY (id); + COMMENT ON COLUMN infra_codegen_column.id IS '编号'; COMMENT ON COLUMN infra_codegen_column.table_id IS '表编号'; COMMENT ON COLUMN infra_codegen_column.column_name IS '字段名'; @@ -191,26 +215,28 @@ COMMENT ON COLUMN infra_codegen_column.primary_key IS '是否主键'; COMMENT ON COLUMN infra_codegen_column.ordinal_position IS '排序'; COMMENT ON COLUMN infra_codegen_column.java_type IS 'Java 属性类型'; COMMENT ON COLUMN infra_codegen_column.java_field IS 'Java 属性名'; +COMMENT ON COLUMN infra_codegen_column.dict_type IS '字典类型'; COMMENT ON COLUMN infra_codegen_column.example IS '数据示例'; COMMENT ON COLUMN infra_codegen_column.create_operation IS '是否为 Create 创建操作的字段'; COMMENT ON COLUMN infra_codegen_column.update_operation IS '是否为 Update 更新操作的字段'; COMMENT ON COLUMN infra_codegen_column.list_operation IS '是否为 List 查询操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation_condition IS 'List 查询操作的条件类型'; COMMENT ON COLUMN infra_codegen_column.list_operation_result IS '是否为 List 查询操作的返回字段'; COMMENT ON COLUMN infra_codegen_column.html_type IS '显示类型'; +COMMENT ON COLUMN infra_codegen_column.creator IS '创建者'; COMMENT ON COLUMN infra_codegen_column.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_column.updater IS '更新者'; COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除'; +COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; DROP SEQUENCE IF EXISTS infra_codegen_column_seq; CREATE SEQUENCE infra_codegen_column_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_codegen_table --- ------------------------------ +-- Table structure for infra_codegen_table +-- ---------------------------- DROP TABLE IF EXISTS infra_codegen_table; CREATE TABLE infra_codegen_table ( @@ -237,16 +263,21 @@ CREATE TABLE infra_codegen_table create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_codegen_table + ADD CONSTRAINT pk_infra_codegen_table PRIMARY KEY (id); + COMMENT ON COLUMN infra_codegen_table.id IS '编号'; COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS '数据源配置的编号'; COMMENT ON COLUMN infra_codegen_table.scene IS '生成场景'; +COMMENT ON COLUMN infra_codegen_table.table_name IS '表名称'; +COMMENT ON COLUMN infra_codegen_table.table_comment IS '表描述'; COMMENT ON COLUMN infra_codegen_table.remark IS '备注'; COMMENT ON COLUMN infra_codegen_table.module_name IS '模块名'; COMMENT ON COLUMN infra_codegen_table.business_name IS '业务名'; +COMMENT ON COLUMN infra_codegen_table.class_name IS '类名称'; COMMENT ON COLUMN infra_codegen_table.class_comment IS '类描述'; COMMENT ON COLUMN infra_codegen_table.author IS '作者'; COMMENT ON COLUMN infra_codegen_table.template_type IS '模板类型'; @@ -257,20 +288,20 @@ COMMENT ON COLUMN infra_codegen_table.sub_join_column_id IS '子表关联主表 COMMENT ON COLUMN infra_codegen_table.sub_join_many IS '主表与子表是否一对多'; COMMENT ON COLUMN infra_codegen_table.tree_parent_column_id IS '树表的父字段编号'; COMMENT ON COLUMN infra_codegen_table.tree_name_column_id IS '树表的名字字段编号'; +COMMENT ON COLUMN infra_codegen_table.creator IS '创建者'; COMMENT ON COLUMN infra_codegen_table.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_table.updater IS '更新者'; COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除'; +COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; DROP SEQUENCE IF EXISTS infra_codegen_table_seq; CREATE SEQUENCE infra_codegen_table_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_config --- ------------------------------ +-- Table structure for infra_config +-- ---------------------------- DROP TABLE IF EXISTS infra_config; CREATE TABLE infra_config ( @@ -286,19 +317,32 @@ CREATE TABLE infra_config create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_config + ADD CONSTRAINT pk_infra_config PRIMARY KEY (id); + COMMENT ON COLUMN infra_config.id IS '参数主键'; COMMENT ON COLUMN infra_config.category IS '参数分组'; COMMENT ON COLUMN infra_config.type IS '参数类型'; +COMMENT ON COLUMN infra_config.name IS '参数名称'; +COMMENT ON COLUMN infra_config.config_key IS '参数键名'; +COMMENT ON COLUMN infra_config.value IS '参数键值'; COMMENT ON COLUMN infra_config.visible IS '是否可见'; COMMENT ON COLUMN infra_config.remark IS '备注'; +COMMENT ON COLUMN infra_config.creator IS '创建者'; COMMENT ON COLUMN infra_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_config.updater IS '更新者'; COMMENT ON COLUMN infra_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_config IS '参数配置表'; +-- ---------------------------- +-- Records of infra_config +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', '0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-04-03 17:22:28', '0'); INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:33:38', '0'); INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 'url', 2, 'SkyWalking 监控的地址', 'url.skywalking', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:57:03', '0'); @@ -306,19 +350,16 @@ INSERT INTO infra_config (id, category, type, name, config_key, value, visible, INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (10, 'url', 2, 'Swagger 接口文档的地址', 'url.swagger', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:59:00', '0'); INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (11, 'ui', 2, '腾讯地图 key', 'tencent.lbs.key', 'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E', '1', '腾讯地图 key', '1', '2023-06-03 19:16:27', '1', '2023-06-03 19:16:27', '0'); INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 'test2', 2, 'test3', 'test4', 'test5', '1', 'test6', '1', '2023-12-03 09:55:16', '1', '2023-12-03 09:55:27', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS infra_config_seq; CREATE SEQUENCE infra_config_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 13 - CACHE 1; - + START 13; -- ---------------------------- --- infra_data_source_config --- ------------------------------ +-- Table structure for infra_data_source_config +-- ---------------------------- DROP TABLE IF EXISTS infra_data_source_config; CREATE TABLE infra_data_source_config ( @@ -331,239 +372,31 @@ CREATE TABLE infra_data_source_config create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_data_source_config + ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); + COMMENT ON COLUMN infra_data_source_config.id IS '主键编号'; +COMMENT ON COLUMN infra_data_source_config.name IS '参数名称'; COMMENT ON COLUMN infra_data_source_config.url IS '数据源连接'; COMMENT ON COLUMN infra_data_source_config.username IS '用户名'; +COMMENT ON COLUMN infra_data_source_config.password IS '密码'; +COMMENT ON COLUMN infra_data_source_config.creator IS '创建者'; COMMENT ON COLUMN infra_data_source_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_data_source_config.updater IS '更新者'; COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; DROP SEQUENCE IF EXISTS infra_data_source_config_seq; CREATE SEQUENCE infra_data_source_config_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - - --- ---------------------------- --- infra_demo01_contact --- ------------------------------ -DROP TABLE IF EXISTS infra_demo01_contact; -CREATE TABLE infra_demo01_contact -( - id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - sex int2 NOT NULL, - birthday timestamp NOT NULL, - description varchar(255) NOT NULL, - avatar varchar(512) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) -); - -COMMENT ON COLUMN infra_demo01_contact.id IS '编号'; -COMMENT ON COLUMN infra_demo01_contact.sex IS '性别'; -COMMENT ON COLUMN infra_demo01_contact.birthday IS '出生年'; -COMMENT ON COLUMN infra_demo01_contact.description IS '简介'; -COMMENT ON COLUMN infra_demo01_contact.avatar IS '头像'; -COMMENT ON COLUMN infra_demo01_contact.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo01_contact.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo01_contact.tenant_id IS '租户编号'; - --- @formatter:off -INSERT INTO infra_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, '2023-11-07 00:00:00', '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', '0', 1); --- @formatter:on - -DROP SEQUENCE IF EXISTS infra_demo01_contact_seq; -CREATE SEQUENCE infra_demo01_contact_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 2 - CACHE 1; - - --- ---------------------------- --- infra_demo02_category --- ------------------------------ -DROP TABLE IF EXISTS infra_demo02_category; -CREATE TABLE infra_demo02_category -( - id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - parent_id int8 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) -); - -COMMENT ON COLUMN infra_demo02_category.id IS '编号'; -COMMENT ON COLUMN infra_demo02_category.parent_id IS '父级编号'; -COMMENT ON COLUMN infra_demo02_category.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo02_category.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo02_category.tenant_id IS '租户编号'; - --- @formatter:off -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', '0', 1); -INSERT INTO infra_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', '0', 1); --- @formatter:on - -DROP SEQUENCE IF EXISTS infra_demo02_category_seq; -CREATE SEQUENCE infra_demo02_category_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 7 - CACHE 1; - + START 1; -- ---------------------------- --- infra_demo03_course --- ------------------------------ -DROP TABLE IF EXISTS infra_demo03_course; -CREATE TABLE infra_demo03_course -( - id int8 NOT NULL, - student_id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - score int2 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) -); - -COMMENT ON COLUMN infra_demo03_course.id IS '编号'; -COMMENT ON COLUMN infra_demo03_course.student_id IS '学生编号'; -COMMENT ON COLUMN infra_demo03_course.score IS '分数'; -COMMENT ON COLUMN infra_demo03_course.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_course.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_course.tenant_id IS '租户编号'; - --- @formatter:off -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', '1', 1); -INSERT INTO infra_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2023-11-17 13:13:20', '0', 1); --- @formatter:on - -DROP SEQUENCE IF EXISTS infra_demo03_course_seq; -CREATE SEQUENCE infra_demo03_course_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 14 - CACHE 1; - - +-- Table structure for infra_file -- ---------------------------- --- infra_demo03_grade --- ------------------------------ -DROP TABLE IF EXISTS infra_demo03_grade; -CREATE TABLE infra_demo03_grade -( - id int8 NOT NULL, - student_id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - teacher varchar(255) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) -); - -COMMENT ON COLUMN infra_demo03_grade.id IS '编号'; -COMMENT ON COLUMN infra_demo03_grade.student_id IS '学生编号'; -COMMENT ON COLUMN infra_demo03_grade.teacher IS '班主任'; -COMMENT ON COLUMN infra_demo03_grade.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_grade.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_grade.tenant_id IS '租户编号'; - --- @formatter:off -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); -INSERT INTO infra_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', '2023-11-17 13:10:23', '1', '2023-11-17 13:10:23', '0', 1); --- @formatter:on - -DROP SEQUENCE IF EXISTS infra_demo03_grade_seq; -CREATE SEQUENCE infra_demo03_grade_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 10 - CACHE 1; - - --- ---------------------------- --- infra_demo03_student --- ------------------------------ -DROP TABLE IF EXISTS infra_demo03_student; -CREATE TABLE infra_demo03_student -( - id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - sex int2 NOT NULL, - birthday timestamp NOT NULL, - description varchar(255) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) -); - -COMMENT ON COLUMN infra_demo03_student.id IS '编号'; -COMMENT ON COLUMN infra_demo03_student.sex IS '性别'; -COMMENT ON COLUMN infra_demo03_student.birthday IS '出生日期'; -COMMENT ON COLUMN infra_demo03_student.description IS '简介'; -COMMENT ON COLUMN infra_demo03_student.create_time IS '创建时间'; -COMMENT ON COLUMN infra_demo03_student.update_time IS '更新时间'; -COMMENT ON COLUMN infra_demo03_student.tenant_id IS '租户编号'; - --- @formatter:off -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, '2023-11-16 00:00:00', '

厉害

', '1', '2023-11-16 23:21:49', '1', '2023-11-17 16:49:06', '0', 1); -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, '2023-11-13 00:00:00', '

你在教我做事?

', '1', '2023-11-16 23:22:46', '1', '2023-11-17 16:49:07', '0', 1); -INSERT INTO infra_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, '2023-11-07 00:00:00', '

哈哈哈

', '1', '2023-11-17 00:04:47', '1', '2023-11-17 16:49:08', '0', 1); --- @formatter:on - -DROP SEQUENCE IF EXISTS infra_demo03_student_seq; -CREATE SEQUENCE infra_demo03_student_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 10 - CACHE 1; - - --- ---------------------------- --- infra_file --- ------------------------------ DROP TABLE IF EXISTS infra_file; CREATE TABLE infra_file ( @@ -578,10 +411,12 @@ CREATE TABLE infra_file create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_file + ADD CONSTRAINT pk_infra_file PRIMARY KEY (id); + COMMENT ON COLUMN infra_file.id IS '文件编号'; COMMENT ON COLUMN infra_file.config_id IS '配置编号'; COMMENT ON COLUMN infra_file.name IS '文件名'; @@ -589,20 +424,20 @@ COMMENT ON COLUMN infra_file.path IS '文件路径'; COMMENT ON COLUMN infra_file.url IS '文件 URL'; COMMENT ON COLUMN infra_file.type IS '文件类型'; COMMENT ON COLUMN infra_file.size IS '文件大小'; +COMMENT ON COLUMN infra_file.creator IS '创建者'; COMMENT ON COLUMN infra_file.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file.updater IS '更新者'; COMMENT ON COLUMN infra_file.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file.deleted IS '是否删除'; +COMMENT ON TABLE infra_file IS '文件表'; DROP SEQUENCE IF EXISTS infra_file_seq; CREATE SEQUENCE infra_file_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_file_config --- ------------------------------ +-- Table structure for infra_file_config +-- ---------------------------- DROP TABLE IF EXISTS infra_file_config; CREATE TABLE infra_file_config ( @@ -616,35 +451,42 @@ CREATE TABLE infra_file_config create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_file_config + ADD CONSTRAINT pk_infra_file_config PRIMARY KEY (id); + COMMENT ON COLUMN infra_file_config.id IS '编号'; COMMENT ON COLUMN infra_file_config.name IS '配置名'; COMMENT ON COLUMN infra_file_config.storage IS '存储器'; COMMENT ON COLUMN infra_file_config.remark IS '备注'; COMMENT ON COLUMN infra_file_config.master IS '是否为主配置'; COMMENT ON COLUMN infra_file_config.config IS '存储配置'; +COMMENT ON COLUMN infra_file_config.creator IS '创建者'; COMMENT ON COLUMN infra_file_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_config.updater IS '更新者'; COMMENT ON COLUMN infra_file_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_file_config IS '文件配置表'; +-- ---------------------------- +-- Records of infra_file_config +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库', 1, '我是数据库', '0', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', '2022-03-15 23:56:24', '1', '2024-02-28 22:54:07', '0'); INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器', 20, '', '1', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', '1', '2024-01-13 22:11:12', '1', '2024-04-03 19:38:34', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS infra_file_config_seq; CREATE SEQUENCE infra_file_config_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 23 - CACHE 1; - + START 23; -- ---------------------------- --- infra_file_content --- ------------------------------ +-- Table structure for infra_file_content +-- ---------------------------- DROP TABLE IF EXISTS infra_file_content; CREATE TABLE infra_file_content ( @@ -656,28 +498,30 @@ CREATE TABLE infra_file_content create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_file_content + ADD CONSTRAINT pk_infra_file_content PRIMARY KEY (id); + COMMENT ON COLUMN infra_file_content.id IS '编号'; COMMENT ON COLUMN infra_file_content.config_id IS '配置编号'; COMMENT ON COLUMN infra_file_content.path IS '文件路径'; COMMENT ON COLUMN infra_file_content.content IS '文件内容'; +COMMENT ON COLUMN infra_file_content.creator IS '创建者'; COMMENT ON COLUMN infra_file_content.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_content.updater IS '更新者'; COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_content.deleted IS '是否删除'; +COMMENT ON TABLE infra_file_content IS '文件表'; DROP SEQUENCE IF EXISTS infra_file_content_seq; CREATE SEQUENCE infra_file_content_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- infra_job --- ------------------------------ +-- Table structure for infra_job +-- ---------------------------- DROP TABLE IF EXISTS infra_job; CREATE TABLE infra_job ( @@ -694,10 +538,12 @@ CREATE TABLE infra_job create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_job + ADD CONSTRAINT pk_infra_job PRIMARY KEY (id); + COMMENT ON COLUMN infra_job.id IS '任务编号'; COMMENT ON COLUMN infra_job.name IS '任务名称'; COMMENT ON COLUMN infra_job.status IS '任务状态'; @@ -707,10 +553,18 @@ COMMENT ON COLUMN infra_job.cron_expression IS 'CRON 表达式'; COMMENT ON COLUMN infra_job.retry_count IS '重试次数'; COMMENT ON COLUMN infra_job.retry_interval IS '重试间隔'; COMMENT ON COLUMN infra_job.monitor_timeout IS '监控超时时间'; +COMMENT ON COLUMN infra_job.creator IS '创建者'; COMMENT ON COLUMN infra_job.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job.updater IS '更新者'; COMMENT ON COLUMN infra_job.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job.deleted IS '是否删除'; +COMMENT ON TABLE infra_job IS '定时任务表'; +-- ---------------------------- +-- Records of infra_job +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', '2021-10-27 08:34:42', '1', '2023-07-09 20:51:41', '0'); INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', '0'); INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', '0'); @@ -722,19 +576,16 @@ INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expre INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (25, '访问日志清理 Job', 2, 'accessLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 10:59:41', '1', '2023-10-03 11:01:10', '0'); INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (26, '错误日志清理 Job', 2, 'errorLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:00:43', '1', '2023-10-03 11:01:12', '0'); INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (27, '任务日志清理 Job', 2, 'jobLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:01:33', '1', '2023-10-03 11:01:42', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS infra_job_seq; CREATE SEQUENCE infra_job_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 28 - CACHE 1; - + START 28; -- ---------------------------- --- infra_job_log --- ------------------------------ +-- Table structure for infra_job_log +-- ---------------------------- DROP TABLE IF EXISTS infra_job_log; CREATE TABLE infra_job_log ( @@ -752,10 +603,12 @@ CREATE TABLE infra_job_log create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE infra_job_log + ADD CONSTRAINT pk_infra_job_log PRIMARY KEY (id); + COMMENT ON COLUMN infra_job_log.id IS '日志编号'; COMMENT ON COLUMN infra_job_log.job_id IS '任务编号'; COMMENT ON COLUMN infra_job_log.handler_name IS '处理器的名字'; @@ -765,20 +618,21 @@ COMMENT ON COLUMN infra_job_log.begin_time IS '开始执行时间'; COMMENT ON COLUMN infra_job_log.end_time IS '结束执行时间'; COMMENT ON COLUMN infra_job_log.duration IS '执行时长'; COMMENT ON COLUMN infra_job_log.status IS '任务状态'; +COMMENT ON COLUMN infra_job_log.result IS '结果数据'; +COMMENT ON COLUMN infra_job_log.creator IS '创建者'; COMMENT ON COLUMN infra_job_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job_log.updater IS '更新者'; COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job_log.deleted IS '是否删除'; +COMMENT ON TABLE infra_job_log IS '定时任务日志表'; DROP SEQUENCE IF EXISTS infra_job_log_seq; CREATE SEQUENCE infra_job_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_dept --- ------------------------------ +-- Table structure for system_dept +-- ---------------------------- DROP TABLE IF EXISTS system_dept; CREATE TABLE system_dept ( @@ -795,22 +649,33 @@ CREATE TABLE system_dept updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_dept + ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); + COMMENT ON COLUMN system_dept.id IS '部门id'; +COMMENT ON COLUMN system_dept.name IS '部门名称'; COMMENT ON COLUMN system_dept.parent_id IS '父部门id'; COMMENT ON COLUMN system_dept.sort IS '显示顺序'; COMMENT ON COLUMN system_dept.leader_user_id IS '负责人'; COMMENT ON COLUMN system_dept.phone IS '联系电话'; COMMENT ON COLUMN system_dept.email IS '邮箱'; COMMENT ON COLUMN system_dept.status IS '部门状态(0正常 1停用)'; +COMMENT ON COLUMN system_dept.creator IS '创建者'; COMMENT ON COLUMN system_dept.create_time IS '创建时间'; +COMMENT ON COLUMN system_dept.updater IS '更新者'; COMMENT ON COLUMN system_dept.update_time IS '更新时间'; +COMMENT ON COLUMN system_dept.deleted IS '是否删除'; COMMENT ON COLUMN system_dept.tenant_id IS '租户编号'; +COMMENT ON TABLE system_dept IS '部门表'; +-- ---------------------------- +-- Records of system_dept +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, '芋道源码', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-11-14 23:30:36', '0', 1); INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '深圳总公司', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:53:35', '0', 1); INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (102, '长沙分公司', 100, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:40', '0', 1); @@ -825,19 +690,16 @@ INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '顶级部门', 0, 1, NULL, NULL, NULL, 0, '113', '2022-03-07 21:44:50', '113', '2022-03-07 21:44:50', '0', 122); INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, '产品部门', 101, 100, 1, NULL, NULL, 1, '1', '2023-12-02 09:45:13', '1', '2023-12-02 09:45:31', '0', 1); INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '支持部门', 102, 3, 104, NULL, NULL, 1, '1', '2023-12-02 09:47:38', '1', '2023-12-02 09:47:38', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_dept_seq; CREATE SEQUENCE system_dept_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 114 - CACHE 1; - + START 114; -- ---------------------------- --- system_dict_data --- ------------------------------ +-- Table structure for system_dict_data +-- ---------------------------- DROP TABLE IF EXISTS system_dict_data; CREATE TABLE system_dict_data ( @@ -854,18 +716,33 @@ CREATE TABLE system_dict_data create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_dict_data + ADD CONSTRAINT pk_system_dict_data PRIMARY KEY (id); + COMMENT ON COLUMN system_dict_data.id IS '字典编码'; COMMENT ON COLUMN system_dict_data.sort IS '字典排序'; +COMMENT ON COLUMN system_dict_data.label IS '字典标签'; +COMMENT ON COLUMN system_dict_data.value IS '字典键值'; +COMMENT ON COLUMN system_dict_data.dict_type IS '字典类型'; COMMENT ON COLUMN system_dict_data.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_data.color_type IS '颜色类型'; +COMMENT ON COLUMN system_dict_data.css_class IS 'css 样式'; COMMENT ON COLUMN system_dict_data.remark IS '备注'; +COMMENT ON COLUMN system_dict_data.creator IS '创建者'; COMMENT ON COLUMN system_dict_data.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_data.updater IS '更新者'; COMMENT ON COLUMN system_dict_data.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_data.deleted IS '是否删除'; +COMMENT ON TABLE system_dict_data IS '字典数据表'; +-- ---------------------------- +-- Records of system_dict_data +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, '男', '1', 'system_user_sex', 0, 'default', 'A', '性别男', 'admin', '2021-01-05 17:03:48', '1', '2022-03-29 00:14:39', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, '女', '2', 'system_user_sex', 0, 'success', '', '性别女', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 23:30:37', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 1, '正常', '1', 'infra_job_status', 0, 'success', '', '正常状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:33:38', '0'); @@ -1052,15 +929,6 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus 标准模版', '20', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:08', '1', '2023-04-13 00:04:08', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, 'Vue3 Element Plus Schema 模版', '21', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vue3 vben 模版', '30', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1235, 1, '个', '1', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1236, 1, '件', '2', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1237, 1, '盒', '3', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1238, 1, '袋', '4', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1239, 1, '箱', '5', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1240, 1, '套', '6', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1241, 1, '包', '7', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1242, 1, '双', '8', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1243, 1, '卷', '9', 'product_unit', 0, '', '', '', '1', '2023-05-23 14:38:38', '1', '2023-05-23 14:38:38', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', '0'); @@ -1240,19 +1108,16 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1534, 1, '赢单', '1', 'crm_business_end_status_type', 0, 'success', '', '', '1', '2024-04-13 23:26:57', '1', '2024-04-13 23:26:57', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1535, 2, '输单', '2', 'crm_business_end_status_type', 0, 'primary', '', '', '1', '2024-04-13 23:27:31', '1', '2024-04-13 23:27:31', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1536, 3, '无效', '3', 'crm_business_end_status_type', 0, 'info', '', '', '1', '2024-04-13 23:27:59', '1', '2024-04-13 23:27:59', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_dict_data_seq; CREATE SEQUENCE system_dict_data_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1537 - CACHE 1; - + START 1537; -- ---------------------------- --- system_dict_type --- ------------------------------ +-- Table structure for system_dict_type +-- ---------------------------- DROP TABLE IF EXISTS system_dict_type; CREATE TABLE system_dict_type ( @@ -1266,18 +1131,30 @@ CREATE TABLE system_dict_type updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - deleted_time timestamp NULL DEFAULT NULL, - PRIMARY KEY (id) + deleted_time timestamp NULL DEFAULT NULL ); +ALTER TABLE system_dict_type + ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); + COMMENT ON COLUMN system_dict_type.id IS '字典主键'; +COMMENT ON COLUMN system_dict_type.name IS '字典名称'; +COMMENT ON COLUMN system_dict_type.type IS '字典类型'; COMMENT ON COLUMN system_dict_type.status IS '状态(0正常 1停用)'; COMMENT ON COLUMN system_dict_type.remark IS '备注'; +COMMENT ON COLUMN system_dict_type.creator IS '创建者'; COMMENT ON COLUMN system_dict_type.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_type.updater IS '更新者'; COMMENT ON COLUMN system_dict_type.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_type.deleted IS '是否删除'; COMMENT ON COLUMN system_dict_type.deleted_time IS '删除时间'; +COMMENT ON TABLE system_dict_type IS '字典类型表'; +-- ---------------------------- +-- Records of system_dict_type +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, '用户性别', 'system_user_sex', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2022-05-16 20:29:32', '0', NULL); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, '参数类型', 'infra_config_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:36:54', '0', NULL); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (7, '通知类型', 'system_notice_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:35:26', '0', NULL); @@ -1328,7 +1205,6 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, '邮件发送状态', 'system_mail_send_status', 0, '邮件发送状态', '1', '2023-01-26 09:53:13', '1', '2023-01-26 09:53:13', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, '站内信模版的类型', 'system_notify_template_type', 0, '站内信模版的类型', '1', '2023-01-28 10:35:10', '1', '2023-01-28 10:35:10', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, '代码生成的前端类型', 'infra_codegen_front_type', 0, '', '1', '2023-04-12 23:57:52', '1', '2023-04-12 23:57:52', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (169, '商品的单位', 'product_unit', 0, '商品的单位', '1', '2023-05-24 21:23:59', '1', '2023-05-24 21:23:59', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, '快递计费方式', 'trade_delivery_express_charge_mode', 0, '用于商城交易模块配送管理', '1', '2023-05-21 22:45:03', '1', '2023-05-21 22:45:03', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, '积分业务类型', 'member_point_biz_type', 0, '', '1', '2023-06-10 12:15:00', '1', '2023-06-28 13:48:20', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, '支付通知类型', 'pay_notify_type', 0, NULL, '1', '2023-07-20 12:23:03', '1', '2023-07-20 12:23:03', '0', '1970-01-01 00:00:00'); @@ -1362,19 +1238,16 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (616, '时间间隔', 'date_interval', 0, '', '1', '2024-03-29 22:50:09', '1', '2024-03-29 22:50:09', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (619, 'CRM 商机结束状态类型', 'crm_business_end_status_type', 0, '', '1', '2024-04-13 23:23:00', '1', '2024-04-13 23:23:00', '0', '1970-01-01 00:00:00'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_dict_type_seq; CREATE SEQUENCE system_dict_type_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 620 - CACHE 1; - + START 620; -- ---------------------------- --- system_login_log --- ------------------------------ +-- Table structure for system_login_log +-- ---------------------------- DROP TABLE IF EXISTS system_login_log; CREATE TABLE system_login_log ( @@ -1392,32 +1265,36 @@ CREATE TABLE system_login_log updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_login_log + ADD CONSTRAINT pk_system_login_log PRIMARY KEY (id); + COMMENT ON COLUMN system_login_log.id IS '访问ID'; COMMENT ON COLUMN system_login_log.log_type IS '日志类型'; +COMMENT ON COLUMN system_login_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN system_login_log.user_id IS '用户编号'; COMMENT ON COLUMN system_login_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_login_log.username IS '用户账号'; COMMENT ON COLUMN system_login_log.result IS '登陆结果'; COMMENT ON COLUMN system_login_log.user_ip IS '用户 IP'; COMMENT ON COLUMN system_login_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_login_log.creator IS '创建者'; COMMENT ON COLUMN system_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_login_log.updater IS '更新者'; COMMENT ON COLUMN system_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_login_log.deleted IS '是否删除'; COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_login_log IS '系统访问记录'; DROP SEQUENCE IF EXISTS system_login_log_seq; CREATE SEQUENCE system_login_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_mail_account --- ------------------------------ +-- Table structure for system_mail_account +-- ---------------------------- DROP TABLE IF EXISTS system_mail_account; CREATE TABLE system_mail_account ( @@ -1433,37 +1310,46 @@ CREATE TABLE system_mail_account create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_mail_account + ADD CONSTRAINT pk_system_mail_account PRIMARY KEY (id); + COMMENT ON COLUMN system_mail_account.id IS '主键'; COMMENT ON COLUMN system_mail_account.mail IS '邮箱'; COMMENT ON COLUMN system_mail_account.username IS '用户名'; COMMENT ON COLUMN system_mail_account.password IS '密码'; COMMENT ON COLUMN system_mail_account.host IS 'SMTP 服务器域名'; COMMENT ON COLUMN system_mail_account.port IS 'SMTP 服务器端口'; +COMMENT ON COLUMN system_mail_account.ssl_enable IS '是否开启 SSL'; +COMMENT ON COLUMN system_mail_account.starttls_enable IS '是否开启 STARTTLS'; +COMMENT ON COLUMN system_mail_account.creator IS '创建者'; COMMENT ON COLUMN system_mail_account.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_account.updater IS '更新者'; COMMENT ON COLUMN system_mail_account.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_account.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_account IS '邮箱账号表'; +-- ---------------------------- +-- Records of system_mail_account +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', '2023-01-25 17:39:52', '1', '2024-04-24 09:13:56', '0'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', '2023-01-26 01:26:03', '1', '2023-04-12 22:39:38', '0'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, '0', '0', '1', '2023-01-27 15:06:38', '1', '2023-01-27 07:08:36', '1'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, '7685413x@qq.com', '2', '3', '4', 5, '1', '0', '1', '2023-04-12 23:05:06', '1', '2023-04-12 15:05:11', '1'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_mail_account_seq; CREATE SEQUENCE system_mail_account_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 5 - CACHE 1; - + START 5; -- ---------------------------- --- system_mail_log --- ------------------------------ +-- Table structure for system_mail_log +-- ---------------------------- DROP TABLE IF EXISTS system_mail_log; CREATE TABLE system_mail_log ( @@ -1487,10 +1373,12 @@ CREATE TABLE system_mail_log create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_mail_log + ADD CONSTRAINT pk_system_mail_log PRIMARY KEY (id); + COMMENT ON COLUMN system_mail_log.id IS '编号'; COMMENT ON COLUMN system_mail_log.user_id IS '用户编号'; COMMENT ON COLUMN system_mail_log.user_type IS '用户类型'; @@ -1507,20 +1395,20 @@ COMMENT ON COLUMN system_mail_log.send_status IS '发送状态'; COMMENT ON COLUMN system_mail_log.send_time IS '发送时间'; COMMENT ON COLUMN system_mail_log.send_message_id IS '发送返回的消息 ID'; COMMENT ON COLUMN system_mail_log.send_exception IS '发送异常'; +COMMENT ON COLUMN system_mail_log.creator IS '创建者'; COMMENT ON COLUMN system_mail_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_log.updater IS '更新者'; COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_log.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_log IS '邮件日志表'; DROP SEQUENCE IF EXISTS system_mail_log_seq; CREATE SEQUENCE system_mail_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_mail_template --- ------------------------------ +-- Table structure for system_mail_template +-- ---------------------------- DROP TABLE IF EXISTS system_mail_template; CREATE TABLE system_mail_template ( @@ -1538,10 +1426,12 @@ CREATE TABLE system_mail_template create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_mail_template + ADD CONSTRAINT pk_system_mail_template PRIMARY KEY (id); + COMMENT ON COLUMN system_mail_template.id IS '编号'; COMMENT ON COLUMN system_mail_template.name IS '模板名称'; COMMENT ON COLUMN system_mail_template.code IS '模板编码'; @@ -1552,26 +1442,31 @@ COMMENT ON COLUMN system_mail_template.content IS '模板内容'; COMMENT ON COLUMN system_mail_template.params IS '参数数组'; COMMENT ON COLUMN system_mail_template.status IS '开启状态'; COMMENT ON COLUMN system_mail_template.remark IS '备注'; +COMMENT ON COLUMN system_mail_template.creator IS '创建者'; COMMENT ON COLUMN system_mail_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_template.updater IS '更新者'; COMMENT ON COLUMN system_mail_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_template.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_template IS '邮件模版表'; +-- ---------------------------- +-- Records of system_mail_template +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '

您的验证码是{code},名字是{name}

', '["code","name"]', 0, '3', '1', '2021-10-11 08:10:00', '1', '2023-12-02 19:51:14', '0'); INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2023-01-27 10:32:16', '0'); INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2023-01-27 16:34:49', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_mail_template_seq; CREATE SEQUENCE system_mail_template_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 16 - CACHE 1; - + START 16; -- ---------------------------- --- system_menu --- ------------------------------ +-- Table structure for system_menu +-- ---------------------------- DROP TABLE IF EXISTS system_menu; CREATE TABLE system_menu ( @@ -1593,22 +1488,38 @@ CREATE TABLE system_menu create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_menu + ADD CONSTRAINT pk_system_menu PRIMARY KEY (id); + COMMENT ON COLUMN system_menu.id IS '菜单ID'; COMMENT ON COLUMN system_menu.name IS '菜单名称'; +COMMENT ON COLUMN system_menu.permission IS '权限标识'; COMMENT ON COLUMN system_menu.type IS '菜单类型'; COMMENT ON COLUMN system_menu.sort IS '显示顺序'; COMMENT ON COLUMN system_menu.parent_id IS '父菜单ID'; +COMMENT ON COLUMN system_menu.path IS '路由地址'; +COMMENT ON COLUMN system_menu.icon IS '菜单图标'; COMMENT ON COLUMN system_menu.component IS '组件路径'; COMMENT ON COLUMN system_menu.component_name IS '组件名'; COMMENT ON COLUMN system_menu.status IS '菜单状态'; +COMMENT ON COLUMN system_menu.visible IS '是否可见'; +COMMENT ON COLUMN system_menu.keep_alive IS '是否缓存'; +COMMENT ON COLUMN system_menu.always_show IS '是否总是显示'; +COMMENT ON COLUMN system_menu.creator IS '创建者'; COMMENT ON COLUMN system_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_menu.updater IS '更新者'; COMMENT ON COLUMN system_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_menu.deleted IS '是否删除'; +COMMENT ON TABLE system_menu IS '菜单权限表'; +-- ---------------------------- +-- Records of system_menu +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, '系统管理', '', 1, 10, 0, '/system', 'ep:tools', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:04:23', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, '基础设施', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-03-01 08:28:40', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5, 'OA 示例', '', 1, 40, 1185, 'oa', 'fa:road', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-09-20 16:26:19', '1', '2024-02-29 12:38:13', '0'); @@ -2399,19 +2310,16 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2755, '删除项目', 'report:go-view-project:delete', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:01:37', '1', '2024-04-24 20:01:37', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2756, '会员等级记录查询', 'member:level-record:query', 3, 10, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:32', '1', '2024-04-24 20:02:32', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2757, '会员经验记录查询', 'member:experience-record:query', 3, 11, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:51', '1', '2024-04-24 20:02:51', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_menu_seq; CREATE SEQUENCE system_menu_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 2758 - CACHE 1; - + START 2758; -- ---------------------------- --- system_notice --- ------------------------------ +-- Table structure for system_notice +-- ---------------------------- DROP TABLE IF EXISTS system_notice; CREATE TABLE system_notice ( @@ -2425,36 +2333,43 @@ CREATE TABLE system_notice updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_notice + ADD CONSTRAINT pk_system_notice PRIMARY KEY (id); + COMMENT ON COLUMN system_notice.id IS '公告ID'; COMMENT ON COLUMN system_notice.title IS '公告标题'; COMMENT ON COLUMN system_notice.content IS '公告内容'; COMMENT ON COLUMN system_notice.type IS '公告类型(1通知 2公告)'; COMMENT ON COLUMN system_notice.status IS '公告状态(0正常 1关闭)'; +COMMENT ON COLUMN system_notice.creator IS '创建者'; COMMENT ON COLUMN system_notice.create_time IS '创建时间'; +COMMENT ON COLUMN system_notice.updater IS '更新者'; COMMENT ON COLUMN system_notice.update_time IS '更新时间'; +COMMENT ON COLUMN system_notice.deleted IS '是否删除'; COMMENT ON COLUMN system_notice.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notice IS '通知公告表'; +-- ---------------------------- +-- Records of system_notice +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133

', 1, 0, 'admin', '2021-01-05 17:03:48', '1', '2022-05-04 21:00:20', '0', 1); INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '

11112222

', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 20:07:26', '0', 1); INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '我是测试标题', '

哈哈哈哈123

', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', '0', 121); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_notice_seq; CREATE SEQUENCE system_notice_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 5 - CACHE 1; - + START 5; -- ---------------------------- --- system_notify_message --- ------------------------------ +-- Table structure for system_notify_message +-- ---------------------------- DROP TABLE IF EXISTS system_notify_message; CREATE TABLE system_notify_message ( @@ -2474,10 +2389,12 @@ CREATE TABLE system_notify_message updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_notify_message + ADD CONSTRAINT pk_system_notify_message PRIMARY KEY (id); + COMMENT ON COLUMN system_notify_message.id IS '用户ID'; COMMENT ON COLUMN system_notify_message.user_id IS '用户id'; COMMENT ON COLUMN system_notify_message.user_type IS '用户类型'; @@ -2489,11 +2406,19 @@ COMMENT ON COLUMN system_notify_message.template_type IS '模版类型'; COMMENT ON COLUMN system_notify_message.template_params IS '模版参数'; COMMENT ON COLUMN system_notify_message.read_status IS '是否已读'; COMMENT ON COLUMN system_notify_message.read_time IS '阅读时间'; +COMMENT ON COLUMN system_notify_message.creator IS '创建者'; COMMENT ON COLUMN system_notify_message.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_message.updater IS '更新者'; COMMENT ON COLUMN system_notify_message.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_message.deleted IS '是否删除'; COMMENT ON COLUMN system_notify_message.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notify_message IS '站内信消息表'; +-- ---------------------------- +-- Records of system_notify_message +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:44:08', '1', '2023-02-10 00:47:04', '0', 1); INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:45:04', '1', '2023-02-10 00:47:04', '0', 1); INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 103, 2, 2, 'register', '系统消息', '你好,欢迎 哈哈 加入大家庭!', 2, '{"name":"哈哈"}', '0', NULL, '1', '2023-01-28 21:02:20', '1', '2023-01-28 21:02:20', '0', 1); @@ -2503,19 +2428,16 @@ INSERT INTO system_notify_message (id, user_id, user_type, template_id, template INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 1, 2, 2, 'register', '系统消息', '你好,欢迎 123 加入大家庭!', 2, '{"name":"123"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 23:50:21', '1', '2023-01-29 10:52:06', '0', 1); INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-28 08:35:46提现¥0.09元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-28 08:35:46","price":"0.09"}', '0', NULL, '1', '2023-09-28 16:36:22', '1', '2023-09-28 16:36:22', '0', 1); INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-30 20:59:40提现¥1.00元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-30 20:59:40","price":"1.00"}', '0', NULL, '1', '2023-10-03 12:11:34', '1', '2023-10-03 12:11:34', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_notify_message_seq; CREATE SEQUENCE system_notify_message_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 11 - CACHE 1; - + START 11; -- ---------------------------- --- system_notify_template --- ------------------------------ +-- Table structure for system_notify_template +-- ---------------------------- DROP TABLE IF EXISTS system_notify_template; CREATE TABLE system_notify_template ( @@ -2532,10 +2454,12 @@ CREATE TABLE system_notify_template create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_notify_template + ADD CONSTRAINT pk_system_notify_template PRIMARY KEY (id); + COMMENT ON COLUMN system_notify_template.id IS '主键'; COMMENT ON COLUMN system_notify_template.name IS '模板名称'; COMMENT ON COLUMN system_notify_template.code IS '模版编码'; @@ -2545,20 +2469,20 @@ COMMENT ON COLUMN system_notify_template.type IS '类型'; COMMENT ON COLUMN system_notify_template.params IS '参数数组'; COMMENT ON COLUMN system_notify_template.status IS '状态'; COMMENT ON COLUMN system_notify_template.remark IS '备注'; +COMMENT ON COLUMN system_notify_template.creator IS '创建者'; COMMENT ON COLUMN system_notify_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_template.updater IS '更新者'; COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_template.deleted IS '是否删除'; +COMMENT ON TABLE system_notify_template IS '站内信模板表'; DROP SEQUENCE IF EXISTS system_notify_template_seq; CREATE SEQUENCE system_notify_template_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_oauth2_access_token --- ------------------------------ +-- Table structure for system_oauth2_access_token +-- ---------------------------- DROP TABLE IF EXISTS system_oauth2_access_token; CREATE TABLE system_oauth2_access_token ( @@ -2576,10 +2500,12 @@ CREATE TABLE system_oauth2_access_token updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_oauth2_access_token + ADD CONSTRAINT pk_system_oauth2_access_token PRIMARY KEY (id); + CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token); CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token); @@ -2592,21 +2518,21 @@ COMMENT ON COLUMN system_oauth2_access_token.refresh_token IS '刷新令牌'; COMMENT ON COLUMN system_oauth2_access_token.client_id IS '客户端编号'; COMMENT ON COLUMN system_oauth2_access_token.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_access_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_access_token.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_access_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_access_token.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_access_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq; CREATE SEQUENCE system_oauth2_access_token_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_oauth2_approve --- ------------------------------ +-- Table structure for system_oauth2_approve +-- ---------------------------- DROP TABLE IF EXISTS system_oauth2_approve; CREATE TABLE system_oauth2_approve ( @@ -2622,30 +2548,34 @@ CREATE TABLE system_oauth2_approve updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_oauth2_approve + ADD CONSTRAINT pk_system_oauth2_approve PRIMARY KEY (id); + COMMENT ON COLUMN system_oauth2_approve.id IS '编号'; COMMENT ON COLUMN system_oauth2_approve.user_id IS '用户编号'; COMMENT ON COLUMN system_oauth2_approve.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_approve.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_approve.scope IS '授权范围'; +COMMENT ON COLUMN system_oauth2_approve.approved IS '是否接受'; COMMENT ON COLUMN system_oauth2_approve.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_approve.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_approve.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_approve.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_approve.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; DROP SEQUENCE IF EXISTS system_oauth2_approve_seq; CREATE SEQUENCE system_oauth2_approve_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_oauth2_client --- ------------------------------ +-- Table structure for system_oauth2_client +-- ---------------------------- DROP TABLE IF EXISTS system_oauth2_client; CREATE TABLE system_oauth2_client ( @@ -2669,10 +2599,12 @@ CREATE TABLE system_oauth2_client create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_oauth2_client + ADD CONSTRAINT pk_system_oauth2_client PRIMARY KEY (id); + COMMENT ON COLUMN system_oauth2_client.id IS '编号'; COMMENT ON COLUMN system_oauth2_client.client_id IS '客户端编号'; COMMENT ON COLUMN system_oauth2_client.secret IS '客户端密钥'; @@ -2689,27 +2621,32 @@ COMMENT ON COLUMN system_oauth2_client.auto_approve_scopes IS '自动通过的 COMMENT ON COLUMN system_oauth2_client.authorities IS '权限'; COMMENT ON COLUMN system_oauth2_client.resource_ids IS '资源'; COMMENT ON COLUMN system_oauth2_client.additional_information IS '附加信息'; +COMMENT ON COLUMN system_oauth2_client.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_client.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_client.deleted IS '是否删除'; +COMMENT ON TABLE system_oauth2_client IS 'OAuth2 客户端表'; +-- ---------------------------- +-- Records of system_oauth2_client +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 1800, 2592000, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2024-02-22 16:31:52', '0'); INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', '啦啦啦啦', 0, 1800, 43200, '["https://www.iocoder.cn"]', '["password","authorization_code","implicit"]', '["user_info","projects"]', '["user_info"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2023-12-02 21:01:01', '0'); INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (41, 'yudao-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["authorization_code","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2022-09-29 13:28:31', '0'); INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["password","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2022-10-04 20:31:21', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_oauth2_client_seq; CREATE SEQUENCE system_oauth2_client_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 43 - CACHE 1; - + START 43; -- ---------------------------- --- system_oauth2_code --- ------------------------------ +-- Table structure for system_oauth2_code +-- ---------------------------- DROP TABLE IF EXISTS system_oauth2_code; CREATE TABLE system_oauth2_code ( @@ -2727,32 +2664,36 @@ CREATE TABLE system_oauth2_code updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_oauth2_code + ADD CONSTRAINT pk_system_oauth2_code PRIMARY KEY (id); + COMMENT ON COLUMN system_oauth2_code.id IS '编号'; COMMENT ON COLUMN system_oauth2_code.user_id IS '用户编号'; COMMENT ON COLUMN system_oauth2_code.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_code.code IS '授权码'; COMMENT ON COLUMN system_oauth2_code.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_code.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_code.expires_time IS '过期时间'; COMMENT ON COLUMN system_oauth2_code.redirect_uri IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_code.state IS '状态'; +COMMENT ON COLUMN system_oauth2_code.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_code.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; DROP SEQUENCE IF EXISTS system_oauth2_code_seq; CREATE SEQUENCE system_oauth2_code_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_oauth2_refresh_token --- ------------------------------ +-- Table structure for system_oauth2_refresh_token +-- ---------------------------- DROP TABLE IF EXISTS system_oauth2_refresh_token; CREATE TABLE system_oauth2_refresh_token ( @@ -2768,10 +2709,12 @@ CREATE TABLE system_oauth2_refresh_token updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_oauth2_refresh_token + ADD CONSTRAINT pk_system_oauth2_refresh_token PRIMARY KEY (id); + COMMENT ON COLUMN system_oauth2_refresh_token.id IS '编号'; COMMENT ON COLUMN system_oauth2_refresh_token.user_id IS '用户编号'; COMMENT ON COLUMN system_oauth2_refresh_token.refresh_token IS '刷新令牌'; @@ -2779,21 +2722,21 @@ COMMENT ON COLUMN system_oauth2_refresh_token.user_type IS '用户类型'; COMMENT ON COLUMN system_oauth2_refresh_token.client_id IS '客户端编号'; COMMENT ON COLUMN system_oauth2_refresh_token.scopes IS '授权范围'; COMMENT ON COLUMN system_oauth2_refresh_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.creator IS '创建者'; COMMENT ON COLUMN system_oauth2_refresh_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.updater IS '更新者'; COMMENT ON COLUMN system_oauth2_refresh_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq; CREATE SEQUENCE system_oauth2_refresh_token_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_operate_log --- ------------------------------ +-- Table structure for system_operate_log +-- ---------------------------- DROP TABLE IF EXISTS system_operate_log; CREATE TABLE system_operate_log ( @@ -2815,33 +2758,40 @@ CREATE TABLE system_operate_log updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_operate_log + ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); + COMMENT ON COLUMN system_operate_log.id IS '日志主键'; +COMMENT ON COLUMN system_operate_log.trace_id IS '链路追踪编号'; COMMENT ON COLUMN system_operate_log.user_id IS '用户编号'; COMMENT ON COLUMN system_operate_log.user_type IS '用户类型'; COMMENT ON COLUMN system_operate_log.type IS '操作模块类型'; COMMENT ON COLUMN system_operate_log.sub_type IS '操作名'; COMMENT ON COLUMN system_operate_log.biz_id IS '操作数据模块编号'; +COMMENT ON COLUMN system_operate_log.action IS '操作内容'; +COMMENT ON COLUMN system_operate_log.extra IS '拓展字段'; +COMMENT ON COLUMN system_operate_log.request_method IS '请求方法名'; +COMMENT ON COLUMN system_operate_log.request_url IS '请求地址'; COMMENT ON COLUMN system_operate_log.user_ip IS '用户 IP'; COMMENT ON COLUMN system_operate_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_operate_log.creator IS '创建者'; COMMENT ON COLUMN system_operate_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_operate_log.updater IS '更新者'; COMMENT ON COLUMN system_operate_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_operate_log.deleted IS '是否删除'; COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; DROP SEQUENCE IF EXISTS system_operate_log_seq; CREATE SEQUENCE system_operate_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_post --- ------------------------------ +-- Table structure for system_post +-- ---------------------------- DROP TABLE IF EXISTS system_post; CREATE TABLE system_post ( @@ -2856,38 +2806,45 @@ CREATE TABLE system_post updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_post + ADD CONSTRAINT pk_system_post PRIMARY KEY (id); + COMMENT ON COLUMN system_post.id IS '岗位ID'; COMMENT ON COLUMN system_post.code IS '岗位编码'; COMMENT ON COLUMN system_post.name IS '岗位名称'; COMMENT ON COLUMN system_post.sort IS '显示顺序'; COMMENT ON COLUMN system_post.status IS '状态(0正常 1停用)'; COMMENT ON COLUMN system_post.remark IS '备注'; +COMMENT ON COLUMN system_post.creator IS '创建者'; COMMENT ON COLUMN system_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_post.updater IS '更新者'; COMMENT ON COLUMN system_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_post.deleted IS '是否删除'; COMMENT ON COLUMN system_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_post IS '岗位信息表'; +-- ---------------------------- +-- Records of system_post +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', '2021-01-06 17:03:48', '1', '2023-02-11 15:19:04', '0', 1); INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 09:18:20', '0', 1); INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'user', '普通员工', 4, 0, '111', 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 10:04:37', '0', 1); INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 'HR', '人力资源', 5, 0, '', '1', '2024-03-24 20:45:40', '1', '2024-03-24 20:45:40', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_post_seq; CREATE SEQUENCE system_post_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 6 - CACHE 1; - + START 6; -- ---------------------------- --- system_role --- ------------------------------ +-- Table structure for system_role +-- ---------------------------- DROP TABLE IF EXISTS system_role; CREATE TABLE system_role ( @@ -2905,56 +2862,50 @@ CREATE TABLE system_role updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_role + ADD CONSTRAINT pk_system_role PRIMARY KEY (id); + COMMENT ON COLUMN system_role.id IS '角色ID'; COMMENT ON COLUMN system_role.name IS '角色名称'; COMMENT ON COLUMN system_role.code IS '角色权限字符串'; COMMENT ON COLUMN system_role.sort IS '显示顺序'; COMMENT ON COLUMN system_role.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; +COMMENT ON COLUMN system_role.data_scope_dept_ids IS '数据范围(指定部门数组)'; COMMENT ON COLUMN system_role.status IS '角色状态(0正常 1停用)'; COMMENT ON COLUMN system_role.type IS '角色类型'; COMMENT ON COLUMN system_role.remark IS '备注'; +COMMENT ON COLUMN system_role.creator IS '创建者'; COMMENT ON COLUMN system_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_role.updater IS '更新者'; COMMENT ON COLUMN system_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_role.deleted IS '是否删除'; COMMENT ON COLUMN system_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role IS '角色信息表'; +-- ---------------------------- +-- Records of system_role +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:21', '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:20', '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', '2024-02-24 10:51:13', '1', '2024-02-24 02:51:32', '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', '2021-01-06 13:49:35', '1', '2024-03-24 22:22:45', '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '测试角色', 'test', 0, 1, '[]', 0, 2, '嘿嘿', '110', '2022-02-23 00:14:34', '110', '2022-02-23 13:14:58', '0', 121); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (136, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (137, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (138, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (139, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (140, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (141, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (143, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (144, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_role_seq; CREATE SEQUENCE system_role_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 145 - CACHE 1; - + START 112; -- ---------------------------- --- system_role_menu --- ------------------------------ +-- Table structure for system_role_menu +-- ---------------------------- DROP TABLE IF EXISTS system_role_menu; CREATE TABLE system_role_menu ( @@ -2966,18 +2917,28 @@ CREATE TABLE system_role_menu updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_role_menu + ADD CONSTRAINT pk_system_role_menu PRIMARY KEY (id); + COMMENT ON COLUMN system_role_menu.id IS '自增编号'; COMMENT ON COLUMN system_role_menu.role_id IS '角色ID'; COMMENT ON COLUMN system_role_menu.menu_id IS '菜单ID'; +COMMENT ON COLUMN system_role_menu.creator IS '创建者'; COMMENT ON COLUMN system_role_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_role_menu.updater IS '更新者'; COMMENT ON COLUMN system_role_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_role_menu.deleted IS '是否删除'; COMMENT ON COLUMN system_role_menu.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role_menu IS '角色和菜单关联表'; +-- ---------------------------- +-- Records of system_role_menu +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (454, 2, 1093, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); @@ -3012,38 +2973,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', '2022-02-23 00:23:55', '110', '2022-02-23 00:23:55', '0', 121); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1489, 1, 1, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1490, 1, 2, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1494, 1, 1077, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1495, 1, 1078, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1496, 1, 1083, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1497, 1, 1084, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1498, 1, 1090, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1499, 1, 1093, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1500, 1, 1094, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1501, 1, 1100, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1502, 1, 1107, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1505, 1, 1117, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1506, 1, 100, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1507, 1, 101, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1508, 1, 102, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1509, 1, 1126, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1510, 1, 103, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1511, 1, 104, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1512, 1, 105, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1513, 1, 106, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1514, 1, 107, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1515, 1, 108, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1516, 1, 109, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1517, 1, 110, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1518, 1, 111, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1519, 1, 112, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1520, 1, 113, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1522, 1, 1138, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1525, 1, 1224, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1526, 1, 1225, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1527, 1, 500, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1528, 1, 501, '1', '2022-02-23 20:03:57', '1', '2022-02-23 20:03:57', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); @@ -3127,23 +3056,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1712, 113, 1024, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1713, 113, 1025, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1714, 113, 1, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1715, 113, 102, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1716, 113, 103, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1717, 113, 104, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1718, 113, 1013, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1719, 113, 1014, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1720, 113, 1015, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1721, 113, 1016, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1722, 113, 1017, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1723, 113, 1018, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1724, 113, 1019, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1725, 113, 1020, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1726, 113, 1021, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1727, 113, 1022, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1728, 113, 1023, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); @@ -3266,118 +3178,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1851, 114, 1, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1852, 114, 1036, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1853, 114, 1037, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1854, 114, 1038, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1855, 114, 1039, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1856, 114, 100, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1857, 114, 101, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1858, 114, 1063, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1859, 114, 103, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1860, 114, 1064, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1861, 114, 1001, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1862, 114, 1065, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1863, 114, 1002, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1864, 114, 1003, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1865, 114, 107, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1866, 114, 1004, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1867, 114, 1005, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1868, 114, 1006, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1869, 114, 1007, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1870, 114, 1008, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1871, 114, 1009, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1872, 114, 1010, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1873, 114, 1011, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1874, 114, 1012, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1875, 114, 1017, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1876, 114, 1018, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1877, 114, 1019, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1878, 114, 1020, '1', '2022-12-30 11:32:03', '1', '2022-12-30 11:32:03', '0', 125); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1879, 115, 1, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1880, 115, 1036, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1881, 115, 1037, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1882, 115, 1038, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1883, 115, 1039, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1884, 115, 100, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1885, 115, 101, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1886, 115, 1063, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1887, 115, 103, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1888, 115, 1064, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1889, 115, 1001, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1890, 115, 1065, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1891, 115, 1002, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1892, 115, 1003, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1893, 115, 107, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1894, 115, 1004, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1895, 115, 1005, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1896, 115, 1006, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1897, 115, 1007, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1898, 115, 1008, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1899, 115, 1009, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1900, 115, 1010, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1901, 115, 1011, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1902, 115, 1012, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1903, 115, 1017, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1904, 115, 1018, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1905, 115, 1019, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1906, 115, 1020, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1907, 116, 1, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1908, 116, 1036, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1909, 116, 1037, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1910, 116, 1038, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1911, 116, 1039, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1912, 116, 100, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1913, 116, 101, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1914, 116, 1063, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1915, 116, 103, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1916, 116, 1064, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1917, 116, 1001, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1918, 116, 1065, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1919, 116, 1002, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1920, 116, 1003, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1921, 116, 107, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1922, 116, 1004, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1923, 116, 1005, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1924, 116, 1006, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1925, 116, 1007, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1926, 116, 1008, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1927, 116, 1009, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1928, 116, 1010, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1929, 116, 1011, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1930, 116, 1012, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1931, 116, 1017, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1932, 116, 1018, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1933, 116, 1019, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1934, 116, 1020, '1', '2022-12-30 11:33:48', '1', '2022-12-30 11:33:48', '0', 127); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1963, 118, 1, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1964, 118, 1036, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1965, 118, 1037, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1966, 118, 1038, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1967, 118, 1039, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1968, 118, 100, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1969, 118, 101, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1970, 118, 1063, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1971, 118, 103, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1972, 118, 1064, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1973, 118, 1001, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1974, 118, 1065, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1975, 118, 1002, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1976, 118, 1003, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1977, 118, 107, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1978, 118, 1004, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1979, 118, 1005, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1980, 118, 1006, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1981, 118, 1007, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1982, 118, 1008, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1983, 118, 1009, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1984, 118, 1010, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1985, 118, 1011, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1986, 118, 1012, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1987, 118, 1017, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1988, 118, 1018, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1989, 118, 1019, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1990, 118, 1020, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', '0', 129); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); @@ -3656,146 +3456,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2789, 136, 1, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2790, 136, 1036, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2791, 136, 1037, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2792, 136, 1038, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2793, 136, 1039, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2794, 136, 100, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2795, 136, 101, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2796, 136, 1063, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2797, 136, 103, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2798, 136, 1064, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2799, 136, 1001, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2800, 136, 1065, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2801, 136, 1002, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2802, 136, 1003, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2803, 136, 107, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2804, 136, 1004, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2805, 136, 1005, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2806, 136, 1006, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2807, 136, 1007, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2808, 136, 1008, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2809, 136, 1009, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2810, 136, 1010, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2811, 136, 1011, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2812, 136, 1012, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2813, 136, 1017, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2814, 136, 1018, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2815, 136, 1019, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2816, 136, 1020, '1', '2023-03-05 21:23:32', '1', '2023-03-05 21:23:32', '0', 147); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2817, 137, 1, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2818, 137, 1036, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2819, 137, 1037, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2820, 137, 1038, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2821, 137, 1039, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2822, 137, 100, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2823, 137, 101, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2824, 137, 1063, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2825, 137, 103, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2826, 137, 1064, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2827, 137, 1001, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2828, 137, 1065, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2829, 137, 1002, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2830, 137, 1003, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2831, 137, 107, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2832, 137, 1004, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2833, 137, 1005, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2834, 137, 1006, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2835, 137, 1007, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2836, 137, 1008, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2837, 137, 1009, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2838, 137, 1010, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2839, 137, 1011, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2840, 137, 1012, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2841, 137, 1017, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2842, 137, 1018, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2843, 137, 1019, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2844, 137, 1020, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2845, 138, 1, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2846, 138, 1036, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2847, 138, 1037, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2848, 138, 1038, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2849, 138, 1039, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2850, 138, 100, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2851, 138, 101, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2852, 138, 1063, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2853, 138, 103, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2854, 138, 1064, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2855, 138, 1001, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2856, 138, 1065, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2857, 138, 1002, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2858, 138, 1003, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2859, 138, 107, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2860, 138, 1004, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2861, 138, 1005, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2862, 138, 1006, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2863, 138, 1007, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2864, 138, 1008, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2865, 138, 1009, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2866, 138, 1010, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2867, 138, 1011, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2868, 138, 1012, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2869, 138, 1017, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2870, 138, 1018, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2871, 138, 1019, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2872, 138, 1020, '1', '2023-03-05 21:59:02', '1', '2023-03-05 21:59:02', '0', 149); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2873, 139, 1, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2874, 139, 1036, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2875, 139, 1037, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2876, 139, 1038, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2877, 139, 1039, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2878, 139, 100, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2879, 139, 101, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2880, 139, 1063, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2881, 139, 103, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2882, 139, 1064, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2883, 139, 1001, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2884, 139, 1065, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2885, 139, 1002, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2886, 139, 1003, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2887, 139, 107, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2888, 139, 1004, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2889, 139, 1005, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2890, 139, 1006, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2891, 139, 1007, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2892, 139, 1008, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2893, 139, 1009, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2894, 139, 1010, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2895, 139, 1011, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2896, 139, 1012, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2897, 139, 1017, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2898, 139, 1018, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2899, 139, 1019, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2900, 139, 1020, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2901, 101, 1117, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2902, 101, 1126, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2903, 101, 1127, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2904, 101, 1128, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2905, 101, 1129, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2906, 101, 1130, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2907, 101, 1132, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2908, 101, 1133, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2909, 101, 1134, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2910, 101, 1135, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2911, 101, 1136, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2912, 101, 1137, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2913, 101, 2161, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2914, 101, 1150, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2915, 101, 1161, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2916, 101, 1162, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2917, 101, 1163, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2918, 101, 1164, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2919, 101, 1165, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2920, 101, 1166, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2921, 101, 1173, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2922, 101, 1174, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2923, 101, 1175, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2924, 101, 1176, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2925, 101, 1177, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2926, 101, 1178, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2927, 101, 2301, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2928, 101, 2302, '1', '2023-12-02 21:33:13', '1', '2023-12-02 21:33:13', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); @@ -3820,46 +3480,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2953, 140, 1, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2954, 140, 1224, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2955, 140, 1225, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2956, 140, 1226, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2957, 140, 1227, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2958, 140, 1228, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2959, 140, 1036, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2960, 140, 1229, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2961, 140, 1037, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2962, 140, 1038, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2963, 140, 1039, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2964, 140, 100, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2965, 140, 101, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2966, 140, 1063, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2967, 140, 103, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2968, 140, 1064, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2969, 140, 1001, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2970, 140, 1065, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2971, 140, 1002, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2972, 140, 1003, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2973, 140, 107, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2974, 140, 1004, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2975, 140, 1005, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2976, 140, 1006, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2977, 140, 1007, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2978, 140, 1008, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2979, 140, 1009, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2980, 140, 1138, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2981, 140, 1010, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2982, 140, 1139, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2983, 140, 1011, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2984, 140, 1140, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2985, 140, 1012, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2986, 140, 1141, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2987, 140, 1142, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2988, 140, 1143, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2989, 140, 1017, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2990, 140, 1018, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2991, 140, 1019, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2992, 140, 1020, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); @@ -4012,82 +3632,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3145, 140, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3146, 140, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3147, 140, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3148, 140, 1033, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3149, 140, 1034, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3150, 140, 1035, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3151, 140, 1050, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3152, 140, 1051, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3153, 140, 1052, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3154, 140, 1053, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3155, 140, 1054, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3156, 140, 1056, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3157, 140, 1057, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3158, 140, 1058, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3159, 140, 1059, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3160, 140, 1060, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3161, 140, 1066, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3162, 140, 1067, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3163, 140, 1070, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3164, 140, 1075, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3165, 140, 1076, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3166, 140, 1077, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3167, 140, 1078, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3168, 140, 1082, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3169, 140, 1083, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3170, 140, 1084, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3171, 140, 1085, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3172, 140, 1086, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3173, 140, 1087, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3174, 140, 1088, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3175, 140, 1089, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3176, 140, 1090, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3177, 140, 1091, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3178, 140, 1092, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3179, 140, 106, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3180, 140, 110, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3181, 140, 111, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3182, 140, 112, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3183, 140, 113, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3184, 140, 114, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3185, 140, 115, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3186, 140, 116, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3187, 140, 2472, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3188, 140, 2478, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3189, 140, 2479, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3190, 140, 2480, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3191, 140, 2481, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3192, 140, 2482, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3193, 140, 2483, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3194, 140, 2484, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3195, 140, 2485, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3196, 140, 2486, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3197, 140, 2487, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3198, 140, 2488, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3199, 140, 2489, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3200, 140, 2490, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3201, 140, 2491, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3202, 140, 2492, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3203, 140, 2493, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3204, 140, 2494, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3205, 140, 2495, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3206, 140, 2497, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3207, 140, 1237, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3208, 140, 1238, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3209, 140, 1239, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3210, 140, 1240, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3211, 140, 1241, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3212, 140, 1242, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3213, 140, 1243, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3214, 140, 2525, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3215, 140, 1255, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3216, 140, 1256, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3217, 140, 1257, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3218, 140, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3219, 140, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3220, 140, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 151); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); @@ -4098,920 +3642,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3231, 140, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3232, 140, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3233, 140, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3234, 140, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3235, 140, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3236, 141, 1, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3237, 141, 2, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3238, 141, 1031, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3239, 141, 1032, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3240, 141, 1033, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3241, 141, 1034, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3242, 141, 1035, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3243, 141, 1036, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3244, 141, 1037, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3245, 141, 1038, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3246, 141, 1039, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3247, 141, 1050, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3248, 141, 1051, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3249, 141, 1052, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3250, 141, 1053, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3251, 141, 1054, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3252, 141, 1056, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3253, 141, 1057, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3254, 141, 1058, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3255, 141, 1059, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3256, 141, 1060, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3257, 141, 1063, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3258, 141, 1064, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3259, 141, 1065, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3260, 141, 1066, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3261, 141, 1067, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3262, 141, 1070, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3263, 141, 1075, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3264, 141, 1076, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3265, 141, 1077, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3266, 141, 1078, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3267, 141, 1082, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3268, 141, 1083, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3269, 141, 1084, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3270, 141, 1085, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3271, 141, 1086, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3272, 141, 1087, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3273, 141, 1088, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3274, 141, 1089, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3275, 141, 1090, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3276, 141, 1091, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3277, 141, 1092, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3278, 141, 100, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3279, 141, 101, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3280, 141, 102, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3281, 141, 103, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3282, 141, 106, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3283, 141, 107, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3284, 141, 110, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3285, 141, 111, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3286, 141, 112, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3287, 141, 113, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3288, 141, 1138, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3289, 141, 114, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3290, 141, 1139, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3291, 141, 115, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3292, 141, 1140, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3293, 141, 116, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3294, 141, 1141, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3295, 141, 1142, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3296, 141, 1143, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3297, 141, 2472, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3298, 141, 2478, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3299, 141, 2479, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3300, 141, 2480, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3301, 141, 2481, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3302, 141, 2482, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3303, 141, 2483, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3304, 141, 2484, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3305, 141, 2485, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3306, 141, 2486, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3307, 141, 2487, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3308, 141, 2488, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3309, 141, 2489, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3310, 141, 2490, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3311, 141, 2491, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3312, 141, 2492, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3313, 141, 2493, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3314, 141, 2494, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3315, 141, 2495, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3316, 141, 2497, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3317, 141, 1224, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3318, 141, 1225, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3319, 141, 1226, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3320, 141, 1227, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3321, 141, 1228, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3322, 141, 1229, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3323, 141, 1237, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3324, 141, 1238, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3325, 141, 1239, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3326, 141, 1240, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3327, 141, 1241, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3328, 141, 1242, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3329, 141, 1243, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3330, 141, 2525, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3331, 141, 1255, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3332, 141, 1256, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3333, 141, 1001, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3334, 141, 1257, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3335, 141, 1002, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3336, 141, 1258, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3337, 141, 1003, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3338, 141, 1259, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3339, 141, 1004, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3340, 141, 1260, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3341, 141, 1005, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3342, 141, 1006, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3343, 141, 1007, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3344, 141, 1008, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3345, 141, 1009, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3346, 141, 1010, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3347, 141, 1011, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3348, 141, 1012, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3349, 141, 1013, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3350, 141, 1014, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3351, 141, 1015, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3352, 141, 1016, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3353, 141, 1017, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3354, 141, 1018, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3355, 141, 1019, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3356, 141, 1020, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3357, 1, 1024, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3358, 1, 2048, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3359, 1, 1025, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3360, 1, 2049, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3361, 1, 1026, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3362, 1, 2050, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3363, 1, 1027, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3364, 1, 2051, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3365, 1, 1028, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3366, 1, 2052, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3367, 1, 1029, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3368, 1, 5, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3369, 1, 1030, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3370, 1, 1031, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3371, 1, 1032, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3372, 1, 1033, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3373, 1, 1034, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3374, 1, 1035, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3375, 1, 2059, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3376, 1, 1036, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3377, 1, 2060, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3378, 1, 1037, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3379, 1, 2061, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3380, 1, 1038, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3381, 1, 2062, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3382, 1, 1039, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3383, 1, 2063, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3384, 1, 1040, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3385, 1, 1042, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3386, 1, 2066, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3387, 1, 1043, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3388, 1, 2067, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3389, 1, 2068, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3390, 1, 1045, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3391, 1, 2069, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3392, 1, 1046, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3393, 1, 2070, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3394, 1, 1048, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3395, 1, 2072, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3396, 1, 2073, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3397, 1, 1050, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3398, 1, 2074, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3399, 1, 1051, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3400, 1, 2075, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3401, 1, 1052, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3402, 1, 2076, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3403, 1, 1053, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3404, 1, 1054, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3405, 1, 1056, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3406, 1, 1057, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3407, 1, 1058, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3408, 1, 2083, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3409, 1, 1059, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3410, 1, 1060, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3411, 1, 2084, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3412, 1, 2085, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3413, 1, 2086, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3414, 1, 1063, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3415, 1, 2087, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3416, 1, 1064, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3417, 1, 2088, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3418, 1, 1065, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3419, 1, 2089, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3420, 1, 1066, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3421, 1, 2090, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3422, 1, 1067, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3423, 1, 2091, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3424, 1, 2092, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3425, 1, 2093, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3426, 1, 1070, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3427, 1, 2094, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3428, 1, 2095, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3429, 1, 2096, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3430, 1, 2097, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3431, 1, 2098, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3432, 1, 1075, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3433, 1, 2099, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3435, 1, 2100, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3436, 1, 2101, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3437, 1, 2102, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3438, 1, 2103, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3439, 1, 2104, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3440, 1, 2105, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3441, 1, 1082, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3442, 1, 2106, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3443, 1, 2107, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3444, 1, 2108, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3445, 1, 1085, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3446, 1, 2109, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3447, 1, 1086, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3448, 1, 2110, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3449, 1, 1087, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3450, 1, 2111, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3451, 1, 1088, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3452, 1, 2112, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3453, 1, 1089, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3454, 1, 2113, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3455, 1, 2114, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3456, 1, 1091, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3457, 1, 2115, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3458, 1, 1092, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3459, 1, 2116, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3460, 1, 2117, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3461, 1, 2118, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3462, 1, 1095, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3463, 1, 2119, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3464, 1, 1096, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3465, 1, 2120, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3466, 1, 1097, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3467, 1, 2121, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3468, 1, 1098, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3469, 1, 2122, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3470, 1, 2123, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3471, 1, 2124, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3472, 1, 1101, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3473, 1, 2125, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3474, 1, 1102, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3475, 1, 2126, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3476, 1, 1103, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3477, 1, 2127, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3478, 1, 1104, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3479, 1, 2128, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3480, 1, 1105, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3481, 1, 2129, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3482, 1, 1106, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3483, 1, 2130, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3484, 1, 2131, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3485, 1, 1108, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3486, 1, 2132, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3487, 1, 1109, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3488, 1, 2133, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3489, 1, 2134, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3490, 1, 2135, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3492, 1, 2136, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3494, 1, 2137, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3496, 1, 2138, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3498, 1, 2139, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3500, 1, 2140, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3501, 1, 2141, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3502, 1, 2142, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3503, 1, 1118, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3504, 1, 2143, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3505, 1, 1119, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3506, 1, 2144, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3507, 1, 1120, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3508, 1, 2145, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3509, 1, 2146, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3510, 1, 2147, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3511, 1, 2148, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3512, 1, 2149, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3513, 1, 2150, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3514, 1, 2151, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3515, 1, 1127, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3516, 1, 2152, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3517, 1, 1128, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3518, 1, 1129, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3519, 1, 2153, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3520, 1, 1130, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3521, 1, 2154, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3522, 1, 2155, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3523, 1, 1132, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3524, 1, 2156, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3525, 1, 1133, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3526, 1, 2157, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3527, 1, 1134, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3528, 1, 2158, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3529, 1, 2159, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3530, 1, 1135, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3531, 1, 2160, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3532, 1, 1136, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3533, 1, 1137, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3534, 1, 2161, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3535, 1, 114, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3536, 1, 2162, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3537, 1, 1139, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3538, 1, 115, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3539, 1, 1140, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3540, 1, 116, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3541, 1, 2164, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3542, 1, 1141, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3543, 1, 2165, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3544, 1, 1142, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3545, 1, 2166, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3546, 1, 1143, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3547, 1, 2167, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3548, 1, 2168, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3549, 1, 2169, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3550, 1, 2170, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3551, 1, 2171, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3552, 1, 2172, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3553, 1, 2173, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3554, 1, 1150, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3555, 1, 2174, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3556, 1, 2175, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3557, 1, 2176, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3558, 1, 2177, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3559, 1, 2178, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3560, 1, 2179, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3561, 1, 2180, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3562, 1, 2181, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3563, 1, 2182, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3564, 1, 2183, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3565, 1, 2184, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3566, 1, 1161, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3567, 1, 1162, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3568, 1, 1163, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3569, 1, 1164, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3570, 1, 1165, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3571, 1, 1166, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3572, 1, 1173, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3573, 1, 1174, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3574, 1, 1175, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3575, 1, 1176, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3576, 1, 1177, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3577, 1, 1178, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3578, 1, 1185, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3579, 1, 2209, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3580, 1, 1186, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3581, 1, 1187, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3582, 1, 1188, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3583, 1, 1189, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3584, 1, 1190, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3585, 1, 1191, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3586, 1, 1192, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3587, 1, 1193, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3588, 1, 1194, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3589, 1, 1195, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3590, 1, 1196, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3591, 1, 1197, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3592, 1, 1198, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3593, 1, 1199, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3594, 1, 1200, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3595, 1, 1201, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3596, 1, 1202, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3597, 1, 1207, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3598, 1, 1208, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3599, 1, 1209, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3600, 1, 1210, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3601, 1, 1211, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3602, 1, 1212, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3603, 1, 1213, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3604, 1, 1215, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3605, 1, 1216, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3606, 1, 1217, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3607, 1, 1218, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3608, 1, 1219, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3609, 1, 1220, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3610, 1, 1221, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3611, 1, 1222, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3612, 1, 1226, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3613, 1, 1227, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3614, 1, 1228, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3615, 1, 1229, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3616, 1, 1237, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3617, 1, 1238, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3618, 1, 2262, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3619, 1, 1239, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3620, 1, 1240, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3621, 1, 1241, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3622, 1, 1242, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3623, 1, 1243, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3629, 1, 2275, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3631, 1, 2276, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3632, 1, 2277, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3633, 1, 1254, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3634, 1, 1255, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3635, 1, 1256, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3636, 1, 1257, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3637, 1, 2281, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3638, 1, 1258, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3639, 1, 2282, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3640, 1, 1259, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3641, 1, 2283, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3642, 1, 1260, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3643, 1, 2284, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3644, 1, 1261, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3645, 1, 2285, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3646, 1, 1263, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3647, 1, 2287, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3648, 1, 1264, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3649, 1, 2288, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3650, 1, 1265, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3651, 1, 1266, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3652, 1, 1267, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3653, 1, 2293, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3654, 1, 2294, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3655, 1, 2297, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3656, 1, 2300, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3657, 1, 2301, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3658, 1, 2302, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3659, 1, 2303, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3660, 1, 2304, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3661, 1, 1281, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3662, 1, 2305, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3663, 1, 1282, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3664, 1, 2306, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3665, 1, 2307, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3666, 1, 2308, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3667, 1, 2309, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3668, 1, 2310, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3669, 1, 2311, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3670, 1, 2312, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3671, 1, 2313, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3672, 1, 2314, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3673, 1, 2315, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3674, 1, 2316, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3675, 1, 2317, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3676, 1, 2318, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3677, 1, 2319, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3678, 1, 2320, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3679, 1, 2321, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3680, 1, 2322, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3681, 1, 2323, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3682, 1, 2324, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3683, 1, 2325, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3684, 1, 2326, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3685, 1, 2327, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3686, 1, 2328, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3687, 1, 2329, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3688, 1, 2330, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3689, 1, 2331, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3690, 1, 2332, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3691, 1, 2333, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3692, 1, 2334, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3693, 1, 2335, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3694, 1, 2336, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3695, 1, 2337, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3696, 1, 2338, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3697, 1, 2339, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3698, 1, 2340, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3699, 1, 2341, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3700, 1, 2342, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3701, 1, 2343, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3702, 1, 2344, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3703, 1, 2345, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3704, 1, 2346, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3705, 1, 2347, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3706, 1, 2348, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3707, 1, 2349, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3708, 1, 2350, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3709, 1, 2351, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3710, 1, 2352, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3711, 1, 2353, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3712, 1, 2354, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3713, 1, 2355, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3714, 1, 2356, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3715, 1, 2357, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3716, 1, 2358, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3717, 1, 2359, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3718, 1, 2360, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3719, 1, 2361, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3720, 1, 2362, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3721, 1, 2363, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3722, 1, 2364, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3723, 1, 2365, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3724, 1, 2366, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3725, 1, 2367, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3726, 1, 2368, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3727, 1, 2369, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3728, 1, 2374, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3729, 1, 2375, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3730, 1, 2376, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3731, 1, 2377, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3732, 1, 2378, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3733, 1, 2379, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3734, 1, 2380, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3735, 1, 2381, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3736, 1, 2382, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3737, 1, 2383, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3738, 1, 2384, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3739, 1, 2385, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3740, 1, 2386, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3741, 1, 2387, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3742, 1, 2388, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3743, 1, 2389, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3744, 1, 2390, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3745, 1, 2391, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3746, 1, 2392, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3747, 1, 2393, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3748, 1, 2394, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3749, 1, 2395, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3750, 1, 2396, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3751, 1, 2397, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3752, 1, 2398, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3753, 1, 2399, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3754, 1, 2400, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3755, 1, 2401, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3756, 1, 2402, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3757, 1, 2403, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3758, 1, 2404, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3759, 1, 2405, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3760, 1, 2406, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3761, 1, 2407, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3762, 1, 2408, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3763, 1, 2409, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3764, 1, 2410, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3765, 1, 2411, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3766, 1, 2412, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3767, 1, 2413, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3768, 1, 2414, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3769, 1, 2415, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3770, 1, 2416, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3771, 1, 2417, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3772, 1, 2418, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3773, 1, 2419, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3774, 1, 2420, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3775, 1, 2421, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3776, 1, 2422, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3777, 1, 2423, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3778, 1, 2424, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3779, 1, 2425, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3780, 1, 2426, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3781, 1, 2427, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3782, 1, 2428, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3783, 1, 2429, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3784, 1, 2430, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3785, 1, 2431, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3786, 1, 2432, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3787, 1, 2433, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3788, 1, 2435, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3789, 1, 2436, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3790, 1, 2437, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3791, 1, 2438, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3792, 1, 2439, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3793, 1, 2440, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3794, 1, 2441, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3795, 1, 2442, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3796, 1, 2443, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3797, 1, 2444, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3798, 1, 2445, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3799, 1, 2446, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3800, 1, 2447, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3801, 1, 2448, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3802, 1, 2449, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3803, 1, 2450, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3804, 1, 2451, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3805, 1, 2452, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3806, 1, 2453, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3807, 1, 2472, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3808, 1, 2478, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3809, 1, 2479, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3810, 1, 2480, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3811, 1, 2481, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3812, 1, 2482, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3813, 1, 2483, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3814, 1, 2484, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3815, 1, 2485, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3816, 1, 2486, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3817, 1, 2487, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3818, 1, 2488, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3819, 1, 2489, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3820, 1, 2490, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3821, 1, 2491, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3822, 1, 2492, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3823, 1, 2493, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3824, 1, 2494, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3825, 1, 2495, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3826, 1, 2497, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3827, 1, 2516, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3828, 1, 2517, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3829, 1, 2518, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3830, 1, 2519, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3831, 1, 2520, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3832, 1, 2521, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3833, 1, 2522, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3834, 1, 2523, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3835, 1, 2524, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3836, 1, 2525, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3837, 1, 2526, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3838, 1, 2527, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3839, 1, 2528, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3840, 1, 2529, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3841, 1, 2530, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3842, 1, 2531, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3843, 1, 2532, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3844, 1, 2533, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3845, 1, 2534, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3846, 1, 2535, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3847, 1, 2536, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3854, 1, 2543, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3855, 1, 2544, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3856, 1, 2000, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3857, 1, 2002, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3858, 1, 2003, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3859, 1, 2004, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3860, 1, 2005, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3861, 1, 2006, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3862, 1, 2008, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3863, 1, 2009, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3864, 1, 2010, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3865, 1, 2011, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3866, 1, 2012, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3867, 1, 2014, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3868, 1, 2015, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3869, 1, 2016, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3870, 1, 2017, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3871, 1, 2018, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3872, 1, 2019, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3873, 1, 2020, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3874, 1, 2021, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3875, 1, 2022, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3876, 1, 2023, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3877, 1, 1001, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3878, 1, 2025, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3879, 1, 1002, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3880, 1, 2026, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3881, 1, 1003, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3882, 1, 2027, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3883, 1, 1004, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3884, 1, 2028, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3885, 1, 1005, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3886, 1, 2029, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3887, 1, 1006, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3888, 1, 2030, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3889, 1, 1007, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3890, 1, 1008, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3891, 1, 2032, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3892, 1, 1009, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3893, 1, 2033, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3894, 1, 1010, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3895, 1, 2034, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3896, 1, 1011, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3897, 1, 2035, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3898, 1, 1012, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3899, 1, 2036, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3900, 1, 1013, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3901, 1, 1014, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3902, 1, 2038, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3903, 1, 1015, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3904, 1, 2039, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3905, 1, 1016, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3906, 1, 2040, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3907, 1, 1017, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3908, 1, 2041, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3909, 1, 1018, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3910, 1, 2042, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3911, 1, 1019, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3912, 1, 2043, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3913, 1, 1020, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3914, 1, 2044, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3915, 1, 1021, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3916, 1, 2045, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3917, 1, 1022, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3918, 1, 2046, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3919, 1, 1023, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3920, 1, 2047, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3921, 143, 1, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3922, 143, 2, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3923, 143, 1031, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3924, 143, 1032, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3925, 143, 1033, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3926, 143, 1034, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3927, 143, 1035, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3928, 143, 1036, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3929, 143, 1037, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3930, 143, 1038, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3931, 143, 1039, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3932, 143, 1050, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3933, 143, 1051, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3934, 143, 1052, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3935, 143, 1053, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3936, 143, 1054, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3937, 143, 1056, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3938, 143, 1057, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3939, 143, 1058, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3940, 143, 1059, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3941, 143, 1060, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3942, 143, 1063, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3943, 143, 1064, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3944, 143, 1065, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3945, 143, 1066, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3946, 143, 1067, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3947, 143, 1070, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3948, 143, 1075, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3949, 143, 1076, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3950, 143, 1077, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3951, 143, 1078, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3952, 143, 1082, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3953, 143, 1083, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3954, 143, 1084, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3955, 143, 1085, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3956, 143, 1086, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3957, 143, 1087, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3958, 143, 1088, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3959, 143, 1089, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3960, 143, 1090, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3961, 143, 1091, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3962, 143, 1092, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3963, 143, 100, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3964, 143, 101, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3965, 143, 102, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3966, 143, 103, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3967, 143, 106, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3968, 143, 107, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3969, 143, 110, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3970, 143, 111, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3971, 143, 112, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3972, 143, 113, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3973, 143, 1138, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3974, 143, 114, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3975, 143, 1139, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3976, 143, 115, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3977, 143, 1140, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3978, 143, 116, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3979, 143, 1141, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3980, 143, 1142, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3981, 143, 1143, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3982, 143, 2472, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3983, 143, 2478, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3984, 143, 2479, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3985, 143, 2480, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3986, 143, 2481, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3987, 143, 2482, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3988, 143, 2483, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3989, 143, 2484, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3990, 143, 2485, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3991, 143, 2486, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3992, 143, 2487, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3993, 143, 2488, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3994, 143, 2489, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3995, 143, 2490, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3996, 143, 2491, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3997, 143, 2492, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3998, 143, 2493, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3999, 143, 2494, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4000, 143, 2495, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4001, 143, 2497, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4002, 143, 1224, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4003, 143, 1225, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4004, 143, 1226, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4005, 143, 1227, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4006, 143, 1228, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4007, 143, 1229, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4008, 143, 1237, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4009, 143, 1238, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4010, 143, 1239, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4011, 143, 1240, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4012, 143, 1241, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4013, 143, 1242, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4014, 143, 1243, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4015, 143, 2525, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4016, 143, 1255, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4017, 143, 1256, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4018, 143, 1001, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4019, 143, 1257, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4020, 143, 1002, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4021, 143, 1258, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4022, 143, 1003, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4023, 143, 1259, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4024, 143, 1004, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4025, 143, 1260, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4026, 143, 1005, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4027, 143, 1006, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4028, 143, 1007, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4029, 143, 1008, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4030, 143, 1009, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4031, 143, 1010, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4032, 143, 1011, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4033, 143, 1012, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4034, 143, 1013, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4035, 143, 1014, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4036, 143, 1015, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4037, 143, 1016, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4038, 143, 1017, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4039, 143, 1018, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4040, 143, 1019, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4041, 143, 1020, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4042, 144, 1, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4043, 144, 2, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4044, 144, 1031, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4045, 144, 1032, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4046, 144, 1033, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4047, 144, 1034, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4048, 144, 1035, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4049, 144, 1036, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4050, 144, 1037, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4051, 144, 1038, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4052, 144, 1039, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4053, 144, 1050, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4054, 144, 1051, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4055, 144, 1052, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4056, 144, 1053, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4057, 144, 1054, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4058, 144, 1056, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4059, 144, 1057, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4060, 144, 1058, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4061, 144, 1059, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4062, 144, 1060, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4063, 144, 1063, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4064, 144, 1064, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4065, 144, 1065, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4066, 144, 1066, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4067, 144, 1067, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4068, 144, 1070, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4069, 144, 1075, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4070, 144, 1076, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4071, 144, 1077, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4072, 144, 1078, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4073, 144, 1082, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4074, 144, 1083, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4075, 144, 1084, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4076, 144, 1085, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4077, 144, 1086, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4078, 144, 1087, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4079, 144, 1088, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4080, 144, 1089, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4081, 144, 1090, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4082, 144, 1091, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4083, 144, 1092, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4084, 144, 100, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4085, 144, 101, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4086, 144, 102, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4087, 144, 103, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4088, 144, 106, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4089, 144, 107, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4090, 144, 110, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4091, 144, 111, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4092, 144, 112, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4093, 144, 113, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4094, 144, 1138, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4095, 144, 114, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4096, 144, 1139, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4097, 144, 115, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4098, 144, 1140, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4099, 144, 116, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4100, 144, 1141, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4101, 144, 1142, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4102, 144, 1143, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4103, 144, 2472, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4104, 144, 2478, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4105, 144, 2479, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4106, 144, 2480, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4107, 144, 2481, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4108, 144, 2482, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4109, 144, 2483, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4110, 144, 2484, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4111, 144, 2485, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4112, 144, 2486, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4113, 144, 2487, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4114, 144, 2488, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4115, 144, 2489, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4116, 144, 2490, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4117, 144, 2491, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4118, 144, 2492, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4119, 144, 2493, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4120, 144, 2494, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4121, 144, 2495, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4122, 144, 2497, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4123, 144, 1224, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4124, 144, 1225, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4125, 144, 1226, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4126, 144, 1227, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4127, 144, 1228, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4128, 144, 1229, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4129, 144, 1237, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4130, 144, 1238, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4131, 144, 1239, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4132, 144, 1240, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4133, 144, 1241, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4134, 144, 1242, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4135, 144, 1243, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4136, 144, 2525, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4137, 144, 1255, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4138, 144, 1256, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4139, 144, 1001, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4140, 144, 1257, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4141, 144, 1002, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4142, 144, 1258, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4143, 144, 1003, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4144, 144, 1259, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4145, 144, 1004, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4146, 144, 1260, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4147, 144, 1005, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4148, 144, 1006, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4149, 144, 1007, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4150, 144, 1008, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4151, 144, 1009, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4152, 144, 1010, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4153, 144, 1011, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4154, 144, 1012, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4155, 144, 1013, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4156, 144, 1014, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4157, 144, 1015, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4158, 144, 1016, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4159, 144, 1017, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4160, 144, 1018, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4161, 144, 1019, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4162, 144, 1020, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); @@ -5130,255 +3760,18 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4281, 140, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4282, 140, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4283, 140, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4284, 140, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4285, 140, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4286, 140, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4287, 140, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4288, 140, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4289, 140, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4290, 140, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4291, 140, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4292, 140, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4293, 140, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4294, 140, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4295, 140, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4296, 140, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4297, 140, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4298, 140, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4299, 140, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4300, 140, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4301, 140, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4302, 140, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4303, 140, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4304, 140, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4305, 140, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4306, 140, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4307, 140, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4308, 140, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4309, 140, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4310, 140, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4311, 140, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4312, 140, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4313, 140, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4314, 140, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4315, 140, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4316, 140, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4317, 140, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4318, 140, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4319, 140, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4320, 140, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4321, 140, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4322, 140, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4323, 140, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4324, 140, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4325, 140, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4326, 140, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4327, 140, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4328, 140, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4329, 140, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4330, 140, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4331, 140, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4332, 140, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4333, 140, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4334, 140, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4335, 140, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4336, 140, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4337, 140, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4338, 140, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4339, 140, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 151); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4340, 141, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4341, 141, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4342, 141, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4343, 141, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4344, 141, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4345, 141, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4346, 141, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4347, 141, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4348, 141, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4349, 141, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4350, 141, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4351, 141, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4352, 141, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4353, 141, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4354, 141, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4355, 141, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4356, 141, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4357, 141, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4358, 141, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4359, 141, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4360, 141, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4361, 141, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4362, 141, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4363, 141, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4364, 141, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4365, 141, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4366, 141, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4367, 141, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4368, 141, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4369, 141, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4370, 141, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4371, 141, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4372, 141, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4373, 141, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4374, 141, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4375, 141, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4376, 141, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4377, 141, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4378, 141, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4379, 141, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4380, 141, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4381, 141, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4382, 141, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4383, 141, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4384, 141, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4385, 141, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4386, 141, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4387, 141, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4388, 141, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4389, 141, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4390, 141, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4391, 141, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4392, 141, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4393, 141, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4394, 141, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4395, 141, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4396, 141, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4397, 141, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4398, 141, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 152); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4399, 143, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4400, 143, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4401, 143, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4402, 143, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4403, 143, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4404, 143, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4405, 143, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4406, 143, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4407, 143, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4408, 143, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4409, 143, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4410, 143, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4411, 143, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4412, 143, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4413, 143, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4414, 143, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4415, 143, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4416, 143, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4417, 143, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4418, 143, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4419, 143, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4420, 143, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4421, 143, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4422, 143, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4423, 143, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4424, 143, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4425, 143, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4426, 143, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4427, 143, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4428, 143, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4429, 143, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4430, 143, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4431, 143, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4432, 143, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4433, 143, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4434, 143, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4435, 143, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4436, 143, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4437, 143, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4438, 143, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4439, 143, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4440, 143, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4441, 143, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4442, 143, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4443, 143, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4444, 143, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4445, 143, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4446, 143, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4447, 143, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4448, 143, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4449, 143, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4450, 143, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4451, 143, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4452, 143, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4453, 143, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4454, 143, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4455, 143, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4456, 143, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4457, 143, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 153); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4458, 144, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4459, 144, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4460, 144, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4461, 144, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4462, 144, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4463, 144, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4464, 144, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4465, 144, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4466, 144, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4467, 144, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4468, 144, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4469, 144, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4470, 144, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4471, 144, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4472, 144, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4473, 144, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4474, 144, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4475, 144, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4476, 144, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4477, 144, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4478, 144, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4479, 144, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4480, 144, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4481, 144, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4482, 144, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4483, 144, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4484, 144, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4485, 144, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4486, 144, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4487, 144, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4488, 144, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4489, 144, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4490, 144, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4491, 144, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4492, 144, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4493, 144, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4494, 144, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4495, 144, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4496, 144, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4497, 144, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4498, 144, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4499, 144, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4500, 144, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4501, 144, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4502, 144, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4503, 144, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4504, 144, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4505, 144, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4506, 144, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4507, 144, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4508, 144, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4509, 144, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4510, 144, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4511, 144, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4512, 144, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4513, 144, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4514, 144, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4515, 144, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4516, 144, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 154); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_role_menu_seq; CREATE SEQUENCE system_role_menu_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 4517 - CACHE 1; - + START 5779; -- ---------------------------- --- system_sms_channel --- ------------------------------ +-- Table structure for system_sms_channel +-- ---------------------------- DROP TABLE IF EXISTS system_sms_channel; CREATE TABLE system_sms_channel ( @@ -5394,38 +3787,45 @@ CREATE TABLE system_sms_channel create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_sms_channel + ADD CONSTRAINT pk_system_sms_channel PRIMARY KEY (id); + COMMENT ON COLUMN system_sms_channel.id IS '编号'; COMMENT ON COLUMN system_sms_channel.signature IS '短信签名'; COMMENT ON COLUMN system_sms_channel.code IS '渠道编码'; -COMMENT ON COLUMN system_sms_channel.status IS '开启状态. 0: 启用, 1: 禁用'; +COMMENT ON COLUMN system_sms_channel.status IS '开启状态'; COMMENT ON COLUMN system_sms_channel.remark IS '备注'; COMMENT ON COLUMN system_sms_channel.api_key IS '短信 API 的账号'; COMMENT ON COLUMN system_sms_channel.api_secret IS '短信 API 的秘钥'; COMMENT ON COLUMN system_sms_channel.callback_url IS '短信发送回调 URL'; +COMMENT ON COLUMN system_sms_channel.creator IS '创建者'; COMMENT ON COLUMN system_sms_channel.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_channel.updater IS '更新者'; COMMENT ON COLUMN system_sms_channel.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_channel.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_channel IS '短信渠道'; +-- ---------------------------- +-- Records of system_sms_channel +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, 'Ballcat', 'ALIYUN', 0, '你要改哦,只有我可以用!!!!', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, '', '2021-03-31 11:53:10', '1', '2023-12-02 22:10:17', '0'); INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, '测试渠道', 'DEBUG_DING_TALK', 0, '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2021-04-13 00:23:14', '1', '2022-03-27 20:29:49', '0'); INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (6, '测试演示', 'DEBUG_DING_TALK', 0, '仅测试', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2022-04-10 23:07:59', '1', '2023-12-02 22:10:08', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_sms_channel_seq; CREATE SEQUENCE system_sms_channel_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 7 - CACHE 1; - + START 7; -- ---------------------------- --- system_sms_code --- ------------------------------ +-- Table structure for system_sms_code +-- ---------------------------- DROP TABLE IF EXISTS system_sms_code; CREATE TABLE system_sms_code ( @@ -5443,10 +3843,12 @@ CREATE TABLE system_sms_code updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_sms_code + ADD CONSTRAINT pk_system_sms_code PRIMARY KEY (id); + CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile); COMMENT ON COLUMN system_sms_code.id IS '编号'; @@ -5458,22 +3860,22 @@ COMMENT ON COLUMN system_sms_code.today_index IS '今日发送的第几条'; COMMENT ON COLUMN system_sms_code.used IS '是否使用'; COMMENT ON COLUMN system_sms_code.used_time IS '使用时间'; COMMENT ON COLUMN system_sms_code.used_ip IS '使用 IP'; +COMMENT ON COLUMN system_sms_code.creator IS '创建者'; COMMENT ON COLUMN system_sms_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_code.updater IS '更新者'; COMMENT ON COLUMN system_sms_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; -COMMENT ON COLUMN system_sms_code.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_code.idx_mobile IS '手机号'; +COMMENT ON TABLE system_sms_code IS '手机验证码'; DROP SEQUENCE IF EXISTS system_sms_code_seq; CREATE SEQUENCE system_sms_code_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_sms_log --- ------------------------------ +-- Table structure for system_sms_log +-- ---------------------------- DROP TABLE IF EXISTS system_sms_log; CREATE TABLE system_sms_log ( @@ -5503,10 +3905,12 @@ CREATE TABLE system_sms_log create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_sms_log + ADD CONSTRAINT pk_system_sms_log PRIMARY KEY (id); + COMMENT ON COLUMN system_sms_log.id IS '编号'; COMMENT ON COLUMN system_sms_log.channel_id IS '短信渠道编号'; COMMENT ON COLUMN system_sms_log.channel_code IS '短信渠道编码'; @@ -5529,20 +3933,20 @@ COMMENT ON COLUMN system_sms_log.receive_status IS '接收状态'; COMMENT ON COLUMN system_sms_log.receive_time IS '接收时间'; COMMENT ON COLUMN system_sms_log.api_receive_code IS 'API 接收结果的编码'; COMMENT ON COLUMN system_sms_log.api_receive_msg IS 'API 接收结果的说明'; +COMMENT ON COLUMN system_sms_log.creator IS '创建者'; COMMENT ON COLUMN system_sms_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_log.updater IS '更新者'; COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_log.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_log IS '短信日志'; DROP SEQUENCE IF EXISTS system_sms_log_seq; CREATE SEQUENCE system_sms_log_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_sms_template --- ------------------------------ +-- Table structure for system_sms_template +-- ---------------------------- DROP TABLE IF EXISTS system_sms_template; CREATE TABLE system_sms_template ( @@ -5561,13 +3965,15 @@ CREATE TABLE system_sms_template create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_sms_template + ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); + COMMENT ON COLUMN system_sms_template.id IS '编号'; -COMMENT ON COLUMN system_sms_template.type IS '模板类型. 1: 验证码, 2: 通知, 3: 营销'; -COMMENT ON COLUMN system_sms_template.status IS '开启状态. 0: 启用, 1: 禁用'; +COMMENT ON COLUMN system_sms_template.type IS '模板类型'; +COMMENT ON COLUMN system_sms_template.status IS '开启状态'; COMMENT ON COLUMN system_sms_template.code IS '模板编码'; COMMENT ON COLUMN system_sms_template.name IS '模板名称'; COMMENT ON COLUMN system_sms_template.content IS '模板内容'; @@ -5576,10 +3982,18 @@ COMMENT ON COLUMN system_sms_template.remark IS '备注'; COMMENT ON COLUMN system_sms_template.api_template_id IS '短信 API 的模板编号'; COMMENT ON COLUMN system_sms_template.channel_id IS '短信渠道编号'; COMMENT ON COLUMN system_sms_template.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_template.creator IS '创建者'; COMMENT ON COLUMN system_sms_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_template.updater IS '更新者'; COMMENT ON COLUMN system_sms_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_template.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_template IS '短信模板'; +-- ---------------------------- +-- Records of system_sms_template +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, 'test_01', '测试验证码短信', '正在进行登录操作{operation},您的验证码是{code}', '["operation","code"]', '测试备注', '4383920', 6, 'DEBUG_DING_TALK', '', '2021-03-31 10:49:38', '1', '2023-12-02 22:32:47', '0'); INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, 'test_02', '公告通知', '您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', '["code"]', NULL, 'SMS_207945135', 2, 'ALIYUN', '', '2021-03-31 11:56:30', '1', '2021-04-10 01:22:02', '0'); INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (6, 3, 0, 'test-01', '测试模板', '哈哈哈 {name}', '["name"]', 'f哈哈哈', '4383920', 6, 'DEBUG_DING_TALK', '1', '2021-04-10 01:07:21', '1', '2022-12-10 21:26:09', '0'); @@ -5592,19 +4006,16 @@ INSERT INTO system_sms_template (id, type, status, code, name, content, params, INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (14, 1, 0, 'user-update-mobile', '会员用户 - 修改手机', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:04', '0'); INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (15, 1, 0, 'user-update-password', '会员用户 - 修改密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:18', '0'); INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (16, 1, 0, 'user-reset-password', '会员用户 - 重置密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-12-02 22:35:27', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_sms_template_seq; CREATE SEQUENCE system_sms_template_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 17 - CACHE 1; - + START 17; -- ---------------------------- --- system_social_client --- ------------------------------ +-- Table structure for system_social_client +-- ---------------------------- DROP TABLE IF EXISTS system_social_client; CREATE TABLE system_social_client ( @@ -5621,10 +4032,12 @@ CREATE TABLE system_social_client updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_social_client + ADD CONSTRAINT pk_system_social_client PRIMARY KEY (id); + COMMENT ON COLUMN system_social_client.id IS '编号'; COMMENT ON COLUMN system_social_client.name IS '应用名'; COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型'; @@ -5633,28 +4046,33 @@ COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; COMMENT ON COLUMN system_social_client.status IS '状态'; +COMMENT ON COLUMN system_social_client.creator IS '创建者'; COMMENT ON COLUMN system_social_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_client.updater IS '更新者'; COMMENT ON COLUMN system_social_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_client.deleted IS '是否删除'; COMMENT ON COLUMN system_social_client.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_client IS '社交客户端表'; +-- ---------------------------- +-- Records of system_social_client +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '钉钉', 20, 2, 'dingvrnreaje3yqvzhxg', 'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, '', '2023-10-18 11:21:18', '1', '2023-12-20 21:28:26', '1', 1); INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '钉钉(王土豆)', 20, 2, 'dingtsu9hpepjkbmthhw', 'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, '', '2023-10-18 11:21:18', '', '2023-12-20 21:28:26', '1', 121); INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '微信公众号', 31, 1, 'wx5b23ba7a5589ecbb', '2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, '', '2023-10-18 16:07:46', '1', '2023-12-20 21:28:23', '1', 1); INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (43, '微信小程序', 34, 1, 'wx63c280fe3248a3e7', '6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, '', '2023-10-19 13:37:41', '1', '2023-12-20 21:28:25', '1', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_social_client_seq; CREATE SEQUENCE system_social_client_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 44 - CACHE 1; - + START 44; -- ---------------------------- --- system_social_user --- ------------------------------ +-- Table structure for system_social_user +-- ---------------------------- DROP TABLE IF EXISTS system_social_user; CREATE TABLE system_social_user ( @@ -5673,10 +4091,12 @@ CREATE TABLE system_social_user updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_social_user + ADD CONSTRAINT pk_system_social_user PRIMARY KEY (id); + COMMENT ON COLUMN system_social_user.id IS '主键(自增策略)'; COMMENT ON COLUMN system_social_user.type IS '社交平台的类型'; COMMENT ON COLUMN system_social_user.openid IS '社交 openid'; @@ -5687,21 +4107,21 @@ COMMENT ON COLUMN system_social_user.avatar IS '用户头像'; COMMENT ON COLUMN system_social_user.raw_user_info IS '原始用户数据,一般是 JSON 格式'; COMMENT ON COLUMN system_social_user.code IS '最后一次的认证 code'; COMMENT ON COLUMN system_social_user.state IS '最后一次的认证 state'; +COMMENT ON COLUMN system_social_user.creator IS '创建者'; COMMENT ON COLUMN system_social_user.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user.updater IS '更新者'; COMMENT ON COLUMN system_social_user.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user IS '社交用户表'; DROP SEQUENCE IF EXISTS system_social_user_seq; CREATE SEQUENCE system_social_user_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_social_user_bind --- ------------------------------ +-- Table structure for system_social_user_bind +-- ---------------------------- DROP TABLE IF EXISTS system_social_user_bind; CREATE TABLE system_social_user_bind ( @@ -5715,30 +4135,32 @@ CREATE TABLE system_social_user_bind updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_social_user_bind + ADD CONSTRAINT pk_system_social_user_bind PRIMARY KEY (id); + COMMENT ON COLUMN system_social_user_bind.id IS '主键(自增策略)'; COMMENT ON COLUMN system_social_user_bind.user_id IS '用户编号'; COMMENT ON COLUMN system_social_user_bind.user_type IS '用户类型'; COMMENT ON COLUMN system_social_user_bind.social_type IS '社交平台的类型'; COMMENT ON COLUMN system_social_user_bind.social_user_id IS '社交用户的编号'; +COMMENT ON COLUMN system_social_user_bind.creator IS '创建者'; COMMENT ON COLUMN system_social_user_bind.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user_bind.updater IS '更新者'; COMMENT ON COLUMN system_social_user_bind.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; DROP SEQUENCE IF EXISTS system_social_user_bind_seq; CREATE SEQUENCE system_social_user_bind_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - + START 1; -- ---------------------------- --- system_tenant --- ------------------------------ +-- Table structure for system_tenant +-- ---------------------------- DROP TABLE IF EXISTS system_tenant; CREATE TABLE system_tenant ( @@ -5756,43 +4178,47 @@ CREATE TABLE system_tenant create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_tenant + ADD CONSTRAINT pk_system_tenant PRIMARY KEY (id); + COMMENT ON COLUMN system_tenant.id IS '租户编号'; COMMENT ON COLUMN system_tenant.name IS '租户名'; COMMENT ON COLUMN system_tenant.contact_user_id IS '联系人的用户编号'; COMMENT ON COLUMN system_tenant.contact_name IS '联系人'; COMMENT ON COLUMN system_tenant.contact_mobile IS '联系手机'; COMMENT ON COLUMN system_tenant.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant.website IS '绑定域名'; COMMENT ON COLUMN system_tenant.package_id IS '租户套餐编号'; COMMENT ON COLUMN system_tenant.expire_time IS '过期时间'; COMMENT ON COLUMN system_tenant.account_count IS '账号数量'; +COMMENT ON COLUMN system_tenant.creator IS '创建者'; COMMENT ON COLUMN system_tenant.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant.updater IS '更新者'; COMMENT ON COLUMN system_tenant.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant.deleted IS '是否删除'; +COMMENT ON TABLE system_tenant IS '租户表'; +-- ---------------------------- +-- Records of system_tenant +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2023-11-06 11:41:41', '0'); INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-11-06 11:41:47', '0'); INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-11-06 11:41:53', '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (151, '大租户', 126, '土豆大', NULL, 0, 'https://tudou.iocoder.cn', 111, '2023-12-08 00:00:00', 10, '1', '2023-12-02 23:35:05', '1', '2023-12-08 23:39:56', '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (152, '新租户', 127, '土豆', NULL, 0, 'http://xx.iocoder.cn', 111, '2025-12-31 00:00:00', 50, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (153, '小明的租户', 128, 'xiaoming', '15601691301', 0, 'xiaoming.iocoder.cn', 111, '2025-12-01 00:00:00', 100, '1', '2024-02-27 21:58:25', '1', '2024-02-28 22:53:54', '0'); -INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, '2024-04-30 00:00:00', 123, '1', '2024-03-30 17:52:59', '1', '2024-04-10 09:40:57', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_tenant_seq; CREATE SEQUENCE system_tenant_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 155 - CACHE 1; - + START 123; -- ---------------------------- --- system_tenant_package --- ------------------------------ +-- Table structure for system_tenant_package +-- ---------------------------- DROP TABLE IF EXISTS system_tenant_package; CREATE TABLE system_tenant_package ( @@ -5805,32 +4231,40 @@ CREATE TABLE system_tenant_package create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + deleted int2 NOT NULL DEFAULT 0 ); +ALTER TABLE system_tenant_package + ADD CONSTRAINT pk_system_tenant_package PRIMARY KEY (id); + COMMENT ON COLUMN system_tenant_package.id IS '套餐编号'; COMMENT ON COLUMN system_tenant_package.name IS '套餐名'; COMMENT ON COLUMN system_tenant_package.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant_package.remark IS '备注'; COMMENT ON COLUMN system_tenant_package.menu_ids IS '关联的菜单编号'; +COMMENT ON COLUMN system_tenant_package.creator IS '创建者'; COMMENT ON COLUMN system_tenant_package.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant_package.updater IS '更新者'; COMMENT ON COLUMN system_tenant_package.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant_package.deleted IS '是否删除'; +COMMENT ON TABLE system_tenant_package IS '租户套餐表'; +-- ---------------------------- +-- Records of system_tenant_package +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2024-03-30 17:53:17', '0'); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_tenant_package_seq; CREATE SEQUENCE system_tenant_package_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 112 - CACHE 1; - + START 112; -- ---------------------------- --- system_user_post --- ------------------------------ +-- Table structure for system_user_post +-- ---------------------------- DROP TABLE IF EXISTS system_user_post; CREATE TABLE system_user_post ( @@ -5842,18 +4276,28 @@ CREATE TABLE system_user_post updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_user_post + ADD CONSTRAINT pk_system_user_post PRIMARY KEY (id); + COMMENT ON COLUMN system_user_post.id IS 'id'; COMMENT ON COLUMN system_user_post.user_id IS '用户ID'; COMMENT ON COLUMN system_user_post.post_id IS '岗位ID'; +COMMENT ON COLUMN system_user_post.creator IS '创建者'; COMMENT ON COLUMN system_user_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_post.updater IS '更新者'; COMMENT ON COLUMN system_user_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_post.deleted IS '是否删除'; COMMENT ON COLUMN system_user_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_post IS '用户岗位表'; +-- ---------------------------- +-- Records of system_user_post +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 104, 1, '1', '2022-05-16 19:36:28', '1', '2022-05-16 19:36:28', '0', 1); @@ -5862,19 +4306,16 @@ INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, update INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (119, 114, 5, '1', '2024-03-24 20:45:51', '1', '2024-03-24 20:45:51', '0', 1); INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (123, 115, 1, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (124, 115, 2, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_user_post_seq; CREATE SEQUENCE system_user_post_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 125 - CACHE 1; - + START 125; -- ---------------------------- --- system_user_role --- ------------------------------ +-- Table structure for system_user_role +-- ---------------------------- DROP TABLE IF EXISTS system_user_role; CREATE TABLE system_user_role ( @@ -5886,62 +4327,53 @@ CREATE TABLE system_user_role updater varchar(64) NULL DEFAULT '', update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_user_role + ADD CONSTRAINT pk_system_user_role PRIMARY KEY (id); + COMMENT ON COLUMN system_user_role.id IS '自增编号'; COMMENT ON COLUMN system_user_role.user_id IS '用户ID'; COMMENT ON COLUMN system_user_role.role_id IS '角色ID'; +COMMENT ON COLUMN system_user_role.creator IS '创建者'; COMMENT ON COLUMN system_user_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_role.updater IS '更新者'; COMMENT ON COLUMN system_user_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_role.deleted IS '是否删除'; COMMENT ON COLUMN system_user_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_role IS '用户和角色关联表'; +-- ---------------------------- +-- Records of system_user_role +-- ---------------------------- -- @formatter:off +BEGIN; INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:17', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:12', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:11', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', '2022-01-11 13:19:45', '1', '2022-01-11 13:19:45', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 107, 106, '1', '2022-02-20 22:59:33', '1', '2022-02-20 22:59:33', '0', 118); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 108, 107, '1', '2022-02-20 23:00:50', '1', '2022-02-20 23:00:50', '0', 119); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 109, 108, '1', '2022-02-20 23:11:50', '1', '2022-02-20 23:11:50', '0', 120); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, '110', '2022-02-23 13:14:38', '110', '2022-02-23 13:14:38', '0', 121); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, '1', '2022-05-12 20:39:29', '1', '2022-05-12 20:39:29', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (19, 116, 113, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, '1', '2022-05-28 15:43:57', '1', '2022-05-28 15:43:57', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', '2022-07-21 22:08:30', '1', '2022-07-21 22:08:30', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (23, 119, 114, '1', '2022-12-30 11:32:04', '1', '2022-12-30 11:32:04', '0', 125); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (24, 120, 115, '1', '2022-12-30 11:33:42', '1', '2022-12-30 11:33:42', '0', 126); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (25, 121, 116, '1', '2022-12-30 11:33:49', '1', '2022-12-30 11:33:49', '0', 127); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (26, 122, 118, '1', '2022-12-30 11:47:53', '1', '2022-12-30 11:47:53', '0', 129); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (28, 123, 136, '1', '2023-03-05 21:23:35', '1', '2023-03-05 21:23:35', '0', 147); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (29, 124, 137, '1', '2023-03-05 21:42:27', '1', '2023-03-05 21:42:27', '0', 148); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (30, 125, 138, '1', '2023-03-05 21:59:03', '1', '2023-03-05 21:59:03', '0', 149); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (31, 126, 139, '1', '2023-07-25 23:06:04', '1', '2023-07-25 23:06:04', '0', 150); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (32, 126, 140, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (33, 127, 141, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', '0', 152); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (34, 128, 143, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', '0', 153); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', '2024-03-24 22:23:03', '1', '2024-03-24 22:23:03', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (39, 129, 144, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', '0', 154); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_user_role_seq; CREATE SEQUENCE system_user_role_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 40 - CACHE 1; - + START 39; -- ---------------------------- --- system_users --- ------------------------------ +-- Table structure for system_users +-- ---------------------------- DROP TABLE IF EXISTS system_users; CREATE TABLE system_users ( @@ -5964,25 +4396,40 @@ CREATE TABLE system_users updater varchar(64) NULL DEFAULT '', update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0, - PRIMARY KEY (id) + tenant_id int8 NOT NULL DEFAULT 0 ); +ALTER TABLE system_users + ADD CONSTRAINT pk_system_users PRIMARY KEY (id); + COMMENT ON COLUMN system_users.id IS '用户ID'; COMMENT ON COLUMN system_users.username IS '用户账号'; +COMMENT ON COLUMN system_users.password IS '密码'; COMMENT ON COLUMN system_users.nickname IS '用户昵称'; COMMENT ON COLUMN system_users.remark IS '备注'; COMMENT ON COLUMN system_users.dept_id IS '部门ID'; COMMENT ON COLUMN system_users.post_ids IS '岗位编号数组'; +COMMENT ON COLUMN system_users.email IS '用户邮箱'; +COMMENT ON COLUMN system_users.mobile IS '手机号码'; COMMENT ON COLUMN system_users.sex IS '用户性别'; +COMMENT ON COLUMN system_users.avatar IS '头像地址'; COMMENT ON COLUMN system_users.status IS '帐号状态(0正常 1停用)'; +COMMENT ON COLUMN system_users.login_ip IS '最后登录IP'; COMMENT ON COLUMN system_users.login_date IS '最后登录时间'; +COMMENT ON COLUMN system_users.creator IS '创建者'; COMMENT ON COLUMN system_users.create_time IS '创建时间'; +COMMENT ON COLUMN system_users.updater IS '更新者'; COMMENT ON COLUMN system_users.update_time IS '更新时间'; +COMMENT ON COLUMN system_users.deleted IS '是否删除'; COMMENT ON COLUMN system_users.tenant_id IS '租户编号'; +COMMENT ON TABLE system_users IS '用户信息表'; +-- ---------------------------- +-- Records of system_users +-- ---------------------------- -- @formatter:off -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-23 23:51:16', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-23 23:51:16', '0', 1); +BEGIN; +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-29 21:50:32', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-29 21:50:32', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', '0', 1); @@ -5995,18 +4442,264 @@ INSERT INTO system_users (id, username, password, nickname, remark, dept_id, pos INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', NULL, '2022-03-19 18:38:51', '0', 122); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-24 22:21:05', '1', '2022-03-19 21:50:58', NULL, '2024-03-24 22:21:05', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-04-04 09:37:14', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, '15601691302', '$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6', '小豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', '0', 124); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', '1', '2024-04-04 09:48:05', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (126, 'tudou123', '$2a$04$lecJZ/CqgknEp7mDV2d4ou0beyj1GbM3.nVEZe//8WgQpR.JBgnAu', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', '0', 151); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (127, 'admin2024', '$2a$04$cHdZ7N6AUKysa2XTUG/J/egYtAzdwtpnNpcMVHDrupt1dyn4teOku', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:43:28', '1', '2023-12-30 11:43:17', NULL, '2023-12-30 11:43:28', '0', 152); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (128, 'xiaoming', '$2a$04$BRinw4an9PBGvx6K7GLNre6rWU0.1HMYHkQCN6Oir74zNFKkNKRzm', 'xiaoming', NULL, NULL, NULL, '', '15601691301', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-02-29 23:48:33', '1', '2024-02-27 21:58:25', NULL, '2024-02-29 23:48:33', '0', 153); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (129, 'hh123456', '$2a$04$8mHJM7n03bcNjtaw.IlfV.l38ikWWFJQ7NR1rHywavN7v2UyoDjwq', 'hh', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-30 17:53:24', '1', '2024-03-30 17:52:59', NULL, '2024-03-30 17:53:24', '0', 154); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, 'hh', '$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', '呵呵', NULL, 100, '[]', '777@qq.com', '15601882312', 1, '', 0, '', NULL, '1', '2024-04-27 08:45:56', '1', '2024-04-27 08:45:56', '0', 1); +COMMIT; -- @formatter:on DROP SEQUENCE IF EXISTS system_users_seq; CREATE SEQUENCE system_users_seq - INCREMENT 1 - MAXVALUE 9223372036854775807 - START 130 - CACHE 1; + START 132; + +-- ---------------------------- +-- Table structure for yudao_demo01_contact +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo01_contact; +CREATE TABLE yudao_demo01_contact +( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + avatar varchar(512) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo01_contact + ADD CONSTRAINT pk_yudao_demo01_contact PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo01_contact.id IS '编号'; +COMMENT ON COLUMN yudao_demo01_contact.name IS '名字'; +COMMENT ON COLUMN yudao_demo01_contact.sex IS '性别'; +COMMENT ON COLUMN yudao_demo01_contact.birthday IS '出生年'; +COMMENT ON COLUMN yudao_demo01_contact.description IS '简介'; +COMMENT ON COLUMN yudao_demo01_contact.avatar IS '头像'; +COMMENT ON COLUMN yudao_demo01_contact.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo01_contact.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo01_contact.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo01_contact.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo01_contact.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo01_contact.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo01_contact IS '示例联系人表'; + +-- ---------------------------- +-- Records of yudao_demo01_contact +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, '2023-11-07 00:00:00', '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq; +CREATE SEQUENCE yudao_demo01_contact_seq + START 2; + +-- ---------------------------- +-- Table structure for yudao_demo02_category +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo02_category; +CREATE TABLE yudao_demo02_category +( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + parent_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo02_category + ADD CONSTRAINT pk_yudao_demo02_category PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo02_category.id IS '编号'; +COMMENT ON COLUMN yudao_demo02_category.name IS '名字'; +COMMENT ON COLUMN yudao_demo02_category.parent_id IS '父级编号'; +COMMENT ON COLUMN yudao_demo02_category.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo02_category.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo02_category.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo02_category.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo02_category.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo02_category.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo02_category IS '示例分类表'; + +-- ---------------------------- +-- Records of yudao_demo02_category +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo02_category_seq; +CREATE SEQUENCE yudao_demo02_category_seq + START 7; + +-- ---------------------------- +-- Table structure for yudao_demo03_course +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_course; +CREATE TABLE yudao_demo03_course +( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + score int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_course + ADD CONSTRAINT pk_yudao_demo03_course PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_course.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_course.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_course.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_course.score IS '分数'; +COMMENT ON COLUMN yudao_demo03_course.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_course.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_course.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_course.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_course.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_course.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_course IS '学生课程表'; + +-- ---------------------------- +-- Records of yudao_demo03_course +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2023-11-17 13:13:20', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_course_seq; +CREATE SEQUENCE yudao_demo03_course_seq + START 14; + +-- ---------------------------- +-- Table structure for yudao_demo03_grade +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_grade; +CREATE TABLE yudao_demo03_grade +( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + teacher varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_grade + ADD CONSTRAINT pk_yudao_demo03_grade PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_grade.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_grade.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_grade.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_grade.teacher IS '班主任'; +COMMENT ON COLUMN yudao_demo03_grade.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_grade.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_grade.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_grade.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_grade.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_grade.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_grade IS '学生班级表'; + +-- ---------------------------- +-- Records of yudao_demo03_grade +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', '2023-11-17 13:10:23', '1', '2023-11-17 13:10:23', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq; +CREATE SEQUENCE yudao_demo03_grade_seq + START 10; + +-- ---------------------------- +-- Table structure for yudao_demo03_student +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_student; +CREATE TABLE yudao_demo03_student +( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_student + ADD CONSTRAINT pk_yudao_demo03_student PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_student.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_student.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_student.sex IS '性别'; +COMMENT ON COLUMN yudao_demo03_student.birthday IS '出生日期'; +COMMENT ON COLUMN yudao_demo03_student.description IS '简介'; +COMMENT ON COLUMN yudao_demo03_student.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_student.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_student.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_student.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_student.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_student.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_student IS '学生表'; + +-- ---------------------------- +-- Records of yudao_demo03_student +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, '2023-11-16 00:00:00', '

厉害

', '1', '2023-11-16 23:21:49', '1', '2023-11-17 16:49:06', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, '2023-11-13 00:00:00', '

你在教我做事?

', '1', '2023-11-16 23:22:46', '1', '2023-11-17 16:49:07', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, '2023-11-07 00:00:00', '

哈哈哈

', '1', '2023-11-17 00:04:47', '1', '2023-11-17 16:49:08', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; +CREATE SEQUENCE yudao_demo03_student_seq + START 10; -- Gitee From f9a50116bc0848f398e393926deee9b9ba63cb42 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 2 May 2024 09:13:31 +0800 Subject: [PATCH 0434/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=B3=BB=E7=BB=9F=EF=BC=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=BF=AE=E6=94=B9=E5=BE=85=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/enums/order/TradeOrderOperateTypeEnum.java | 2 +- .../trade/service/order/TradeOrderUpdateServiceImpl.java | 7 +++---- .../price/calculator/TradePriceCalculatorHelper.java | 6 +----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java index 8973ff9731..695cb41ce9 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java @@ -14,7 +14,7 @@ import lombok.RequiredArgsConstructor; public enum TradeOrderOperateTypeEnum { MEMBER_CREATE(1, "用户下单"), - ADMIN_UPDATE_PRICE(2, "订单价格 {oldPayPrice} 修改,实际支付金额为 {newPayPrice} 元"), + ADMIN_UPDATE_PRICE(2, "订单价格 {oldPayPrice} 修改,调整价格 {adjustPrice},实际支付金额为 {newPayPrice} 元"), MEMBER_PAY(10, "用户付款成功"), ADMIN_UPDATE_ADDRESS(11, "收货地址修改"), ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"), diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java index 4065ed05ea..c5ab35d62f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java @@ -631,7 +631,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { // 2. 更新订单 tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId()) - .setAdjustPrice(reqVO.getAdjustPrice()).setPayPrice(newPayPrice)); + .setAdjustPrice(reqVO.getAdjustPrice() + order.getAdjustPrice()).setPayPrice(newPayPrice)); // 3. 更新 TradeOrderItem,需要做 adjustPrice 的分摊 List orderOrderItems = tradeOrderItemMapper.selectListByOrderId(order.getId()); @@ -639,9 +639,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { List updateItems = new ArrayList<>(); for (int i = 0; i < orderOrderItems.size(); i++) { TradeOrderItemDO item = orderOrderItems.get(i); - // TODO puhui999: 已有分摊记录的情况下价格是否会不对,也就是说之前订单项 1 分摊了 10 块这次是 -100 - // 那么 setPayPrice 是否改为 (item.getPayPrice()-item.getAdjustPrice()) + dividePrices.get(i) 先减掉原来的价格再加上调价。经过验证可行,修改后订单价格增减都能正确分摊 - updateItems.add(new TradeOrderItemDO().setId(item.getId()).setAdjustPrice(dividePrices.get(i)) + updateItems.add(new TradeOrderItemDO().setId(item.getId()).setAdjustPrice(item.getAdjustPrice() + dividePrices.get(i)) .setPayPrice((item.getPayPrice() - item.getAdjustPrice()) + dividePrices.get(i))); } tradeOrderItemMapper.updateBatch(updateItems); @@ -652,6 +650,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { // 5. 记录订单日志 TradeOrderLogUtils.setOrderInfo(order.getId(), order.getStatus(), order.getStatus(), MapUtil.builder().put("oldPayPrice", MoneyUtils.fenToYuanStr(order.getPayPrice())) + .put("adjustPrice", MoneyUtils.fenToYuanStr(reqVO.getAdjustPrice())) .put("newPayPrice", MoneyUtils.fenToYuanStr(newPayPrice)).build()); } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java index 850226fbb9..2862012af3 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePriceCalculatorHelper.java @@ -245,7 +245,7 @@ public class TradePriceCalculatorHelper { * @return 分摊金额数组,和传入的 orderItems 一一对应 */ public static List dividePrice2(List items, Integer price) { - Integer total = getSumValue(items, TradeOrderItemDO::getPrice, Integer::sum); + Integer total = getSumValue(items, TradeOrderItemDO::getPayPrice, Integer::sum); assert total != null; // 遍历每一个,进行分摊 List prices = new ArrayList<>(items.size()); @@ -254,15 +254,11 @@ public class TradePriceCalculatorHelper { TradeOrderItemDO orderItem = items.get(i); int partPrice; if (i < items.size() - 1) { // 减一的原因,是因为拆分时,如果按照比例,可能会出现.所以最后一个,使用反减 - // partPrice = (int) (price * (1.0D * orderItem.getPayPrice() / total)); - // pr fix: 改为了使用订单原价来计算比例 partPrice = (int) (price * (1.0D * orderItem.getPrice() / total)); remainPrice -= partPrice; } else { partPrice = remainPrice; } - // TODO puhui999: 如果是减价的情况这里过不了 - // Assert.isTrue(partPrice >= 0, "分摊金额必须大于等于 0"); prices.add(partPrice); } return prices; -- Gitee From 3f7e99c938cef665829fd192227d0f3b13e710ac Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 2 May 2024 09:25:03 +0800 Subject: [PATCH 0435/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=B3=BB=E7=BB=9F=EF=BC=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=9A=84=E5=95=86=E5=9F=8E=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dal/mysql/trade/TradeOrderStatisticsMapper.java | 6 +++--- .../service/trade/TradeOrderStatisticsServiceImpl.java | 4 ++-- .../resources/mapper/trade/TradeOrderStatisticsMapper.xml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java index 1d7ffb6441..35e52e031d 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java @@ -58,8 +58,8 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX - -- Gitee From b7554e935c8af173f2c40a9610c39ce8c6f19681 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 2 May 2024 14:57:53 +0800 Subject: [PATCH 0436/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=B3=BB=E7=BB=9F=EF=BC=9A=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E4=B8=AD=E7=9A=84=E9=99=90=E6=97=B6=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=B4=BB=E5=8A=A8=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=B3=BB=E7=BB=9F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../discount/DiscountActivityServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImpl.java index f103cf5532..25872d8e8b 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.map.MapUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.promotion.controller.admin.discount.vo.DiscountActivityBaseVO; import cn.iocoder.yudao.module.promotion.controller.admin.discount.vo.DiscountActivityCreateReqVO; import cn.iocoder.yudao.module.promotion.controller.admin.discount.vo.DiscountActivityPageReqVO; @@ -18,6 +19,7 @@ import cn.iocoder.yudao.module.promotion.enums.common.PromotionActivityStatusEnu import cn.iocoder.yudao.module.promotion.util.PromotionUtils; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.time.LocalDateTime; @@ -48,31 +50,30 @@ public class DiscountActivityServiceImpl implements DiscountActivityService { @Override public List getMatchDiscountProductList(Collection skuIds) { - // TODO @zhangshuai:这里是不是可以直接 return discountProductMapper.getMatchDiscountProductList(skuIds); 一般来说,如果 idea 报“黄色”的警告,尽量都处理下哈;原则是,一切警告,皆为异常(错误),这样可以写出更好的代码。 - List matchDiscountProductList = discountProductMapper.getMatchDiscountProductList(skuIds); - return matchDiscountProductList; + return discountProductMapper.getMatchDiscountProductList(skuIds); } @Override + @Transactional(rollbackFor = Exception.class) public Long createDiscountActivity(DiscountActivityCreateReqVO createReqVO) { // 校验商品是否冲突 validateDiscountActivityProductConflicts(null, createReqVO.getProducts()); // 插入活动 DiscountActivityDO discountActivity = DiscountActivityConvert.INSTANCE.convert(createReqVO) - // TODO @zhangshuai:这里的调用去掉哈,强制就是开启的; - .setStatus(PromotionUtils.calculateActivityStatus(createReqVO.getEndTime())); + .setStatus(CommonStatusEnum.ENABLE.getStatus()); discountActivityMapper.insert(discountActivity); // 插入商品 - // TODO @zhangshuai:activityStatus 最好代码里,也做下设置噢。 - List discountProducts = convertList(createReqVO.getProducts(), - product -> DiscountActivityConvert.INSTANCE.convert(product).setActivityId(discountActivity.getId())); + List discountProducts = BeanUtils.toBean(createReqVO.getProducts(), DiscountProductDO.class, + product -> product.setActivityId(discountActivity.getId()).setActivityStatus(discountActivity.getStatus()) + .setActivityStartTime(createReqVO.getStartTime()).setActivityEndTime(createReqVO.getEndTime())); discountProductMapper.insertBatch(discountProducts); // 返回 return discountActivity.getId(); } @Override + @Transactional(rollbackFor = Exception.class) public void updateDiscountActivity(DiscountActivityUpdateReqVO updateReqVO) { // 校验存在 DiscountActivityDO discountActivity = validateDiscountActivityExists(updateReqVO.getId()); -- Gitee From fd8889e76a7b51c09bb48183b1a613595ca55123 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 2 May 2024 15:30:33 +0800 Subject: [PATCH 0437/1557] =?UTF-8?q?wip:=20SQLServer=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=9B=B4=E6=96=B0,=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=B3=A8=E9=87=8A=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/sqlserver/ruoyi-vue-pro.sql | 17195 +++++++--------- sql/tools/docker-compose.yaml | 2 +- sql/tools/sqlserver/create_schema.sh | 4 +- .../src/main/resources/application-local.yaml | 20 +- 4 files changed, 8033 insertions(+), 9188 deletions(-) diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index 830a96ab33..7e8b29df15 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -1,12391 +1,11236 @@ /* - Navicat Premium Data Transfer + Yudao Database Transfer Tool - Source Server : 127.0.0.1 SQLServer - Source Server Type : SQL Server - Source Server Version : 15004198 - Source Host : 127.0.0.1:1433 - Source Catalog : ruoyi-vue-pro - Source Schema : dbo + Source Server Type : MySQL - Target Server Type : SQL Server - Target Server Version : 15004198 - File Encoding : 65001 + Target Server Type : Microsoft SQL Server - Date: 15/06/2022 08:15:45 + Date: 2024-05-02 15:29:31 */ -- ---------------------------- --- Table structure for QRTZ_BLOB_TRIGGERS +-- Table structure for infra_api_access_log -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS] -GO - -CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [BLOB_DATA] varbinary(max) NULL +DROP TABLE IF EXISTS infra_api_access_log; +CREATE TABLE infra_api_access_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id nvarchar(64) DEFAULT '' NOT NULL, + user_id bigint DEFAULT 0 NOT NULL, + user_type tinyint DEFAULT 0 NOT NULL, + application_name nvarchar(50) NOT NULL, + request_method nvarchar(16) DEFAULT '' NOT NULL, + request_url nvarchar(255) DEFAULT '' NOT NULL, + request_params nvarchar(max) NULL, + response_body nvarchar(max) NULL, + user_ip nvarchar(50) NOT NULL, + user_agent nvarchar(512) NOT NULL, + operate_module nvarchar(50) DEFAULT NULL NULL, + operate_name nvarchar(50) DEFAULT NULL NULL, + operate_type tinyint DEFAULT 0 NULL, + begin_time datetime2 NOT NULL, + end_time datetime2 NOT NULL, + duration int NOT NULL, + result_code int DEFAULT 0 NOT NULL, + result_msg nvarchar(512) DEFAULT '' NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time) GO - --- ---------------------------- --- Records of QRTZ_BLOB_TRIGGERS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'日志主键', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'id' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'链路追踪编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'trace_id' GO - --- ---------------------------- --- Table structure for QRTZ_CALENDARS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_CALENDARS] +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'user_id' GO -CREATE TABLE [dbo].[QRTZ_CALENDARS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [CALENDAR] varbinary(max) NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'user_type' GO -ALTER TABLE [dbo].[QRTZ_CALENDARS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'应用名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'application_name' GO - --- ---------------------------- --- Records of QRTZ_CALENDARS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'请求方法名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'request_method' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'请求地址', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'request_url' GO - --- ---------------------------- --- Table structure for QRTZ_CRON_TRIGGERS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS] +EXEC sp_addextendedproperty + 'MS_Description', N'请求参数', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'request_params' GO -CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [CRON_EXPRESSION] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TIME_ZONE_ID] varchar(80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'响应结果', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'response_body' GO -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'用户 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'user_ip' GO - --- ---------------------------- --- Records of QRTZ_CRON_TRIGGERS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'浏览器 UA', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'user_agent' GO -INSERT INTO [dbo].[QRTZ_CRON_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [CRON_EXPRESSION], [TIME_ZONE_ID]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'0 * * * * ? *', N'Asia/Shanghai') +EXEC sp_addextendedproperty + 'MS_Description', N'操作模块', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'operate_module' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'操作名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'operate_name' GO - --- ---------------------------- --- Table structure for QRTZ_FIRED_TRIGGERS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS] +EXEC sp_addextendedproperty + 'MS_Description', N'操作分类', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'operate_type' GO -CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [ENTRY_ID] varchar(95) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [FIRED_TIME] bigint NOT NULL, - [SCHED_TIME] bigint NOT NULL, - [PRIORITY] int NOT NULL, - [STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'开始请求时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'begin_time' GO -ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'结束请求时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'end_time' GO - --- ---------------------------- --- Records of QRTZ_FIRED_TRIGGERS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'执行时长', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'duration' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'结果码', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'result_code' GO - --- ---------------------------- --- Table structure for QRTZ_JOB_DETAILS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_JOB_DETAILS] +EXEC sp_addextendedproperty + 'MS_Description', N'结果提示', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'result_msg' GO -CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [JOB_CLASS_NAME] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [IS_DURABLE] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [IS_UPDATE_DATA] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_DATA] varbinary(max) NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'creator' GO -ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Records of QRTZ_JOB_DETAILS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [JOB_CLASS_NAME], [IS_DURABLE], [IS_NONCONCURRENT], [IS_UPDATE_DATA], [REQUESTS_RECOVERY], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', N'0', N'1', N'1', N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000107400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800) +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'deleted' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'API 访问日志表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_access_log' +GO -- ---------------------------- --- Table structure for QRTZ_LOCKS +-- Table structure for infra_api_error_log -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_LOCKS] -GO - -CREATE TABLE [dbo].[QRTZ_LOCKS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [LOCK_NAME] varchar(40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL +DROP TABLE IF EXISTS infra_api_error_log; +CREATE TABLE infra_api_error_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id nvarchar(64) NOT NULL, + user_id int DEFAULT 0 NOT NULL, + user_type tinyint DEFAULT 0 NOT NULL, + application_name nvarchar(50) NOT NULL, + request_method nvarchar(16) NOT NULL, + request_url nvarchar(255) NOT NULL, + request_params nvarchar(4000) NOT NULL, + user_ip nvarchar(50) NOT NULL, + user_agent nvarchar(512) NOT NULL, + exception_time datetime2 NOT NULL, + exception_name nvarchar(128) DEFAULT '' NOT NULL, + exception_message nvarchar(max) NOT NULL, + exception_root_cause_message nvarchar(max) NOT NULL, + exception_stack_trace nvarchar(max) NOT NULL, + exception_class_name nvarchar(512) NOT NULL, + exception_file_name nvarchar(512) NOT NULL, + exception_method_name nvarchar(512) NOT NULL, + exception_line_number int NOT NULL, + process_status tinyint NOT NULL, + process_time datetime2 DEFAULT NULL NULL, + process_user_id int DEFAULT 0 NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[QRTZ_LOCKS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'id' GO - --- ---------------------------- --- Records of QRTZ_LOCKS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'链路追踪编号 + * + * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'trace_id' GO -INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'STATE_ACCESS') +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'user_id' GO -INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'TRIGGER_ACCESS') +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'user_type' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'应用名 + * + * 目前读取 spring.application.name', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'application_name' GO - --- ---------------------------- --- Table structure for QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] +EXEC sp_addextendedproperty + 'MS_Description', N'请求方法名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'request_method' GO -CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'请求地址', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'request_url' GO -ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'请求参数', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'request_params' GO - --- ---------------------------- --- Records of QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'用户 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'user_ip' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'浏览器 UA', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'user_agent' GO - --- ---------------------------- --- Table structure for QRTZ_SCHEDULER_STATE --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE] +EXEC sp_addextendedproperty + 'MS_Description', N'异常发生时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_time' GO -CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [LAST_CHECKIN_TIME] bigint NOT NULL, - [CHECKIN_INTERVAL] bigint NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'异常名 + * + * {@link Throwable#getClass()} 的类全名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_name' GO -ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'异常导致的消息 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_message' GO - --- ---------------------------- --- Records of QRTZ_SCHEDULER_STATE --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'异常导致的根消息 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_root_cause_message' GO -INSERT INTO [dbo].[QRTZ_SCHEDULER_STATE] ([SCHED_NAME], [INSTANCE_NAME], [LAST_CHECKIN_TIME], [CHECKIN_INTERVAL]) VALUES (N'schedulerName', N'Yunai1651483828928', N'1651484588813', N'15000') +EXEC sp_addextendedproperty + 'MS_Description', N'异常的栈轨迹 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_stack_trace' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'异常发生的类全名 + * + * {@link StackTraceElement#getClassName()}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_class_name' GO - --- ---------------------------- --- Table structure for QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] +EXEC sp_addextendedproperty + 'MS_Description', N'异常发生的类文件 + * + * {@link StackTraceElement#getFileName()}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_file_name' GO -CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [REPEAT_COUNT] bigint NOT NULL, - [REPEAT_INTERVAL] bigint NOT NULL, - [TIMES_TRIGGERED] bigint NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'异常发生的方法名 + * + * {@link StackTraceElement#getMethodName()}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_method_name' GO -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'异常发生的方法所在行 + * + * {@link StackTraceElement#getLineNumber()}', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'exception_line_number' GO - --- ---------------------------- --- Records of QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'处理状态', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'process_status' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'处理时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'process_time' GO - --- ---------------------------- --- Table structure for QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] +EXEC sp_addextendedproperty + 'MS_Description', N'处理用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'process_user_id' GO -CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [STR_PROP_1] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [STR_PROP_2] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [STR_PROP_3] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [INT_PROP_1] int NULL, - [INT_PROP_2] int NULL, - [LONG_PROP_1] bigint NULL, - [LONG_PROP_2] bigint NULL, - [DEC_PROP_1] numeric(13,4) NULL, - [DEC_PROP_2] numeric(13,4) NULL, - [BOOL_PROP_1] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [BOOL_PROP_2] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'creator' GO -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'create_time' GO - --- ---------------------------- --- Records of QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'updater' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'update_time' GO - --- ---------------------------- --- Table structure for QRTZ_TRIGGERS --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND type IN ('U')) - DROP TABLE [dbo].[QRTZ_TRIGGERS] +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'deleted' GO -CREATE TABLE [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [NEXT_FIRE_TIME] bigint NULL, - [PREV_FIRE_TIME] bigint NULL, - [PRIORITY] int NULL, - [TRIGGER_STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [TRIGGER_TYPE] varchar(8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [START_TIME] bigint NOT NULL, - [END_TIME] bigint NULL, - [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [MISFIRE_INSTR] smallint NULL, - [JOB_DATA] varbinary(max) NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log', + 'COLUMN', N'tenant_id' GO -ALTER TABLE [dbo].[QRTZ_TRIGGERS] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'系统异常日志', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_api_error_log' GO - -- ---------------------------- --- Records of QRTZ_TRIGGERS +-- Table structure for infra_codegen_column -- ---------------------------- -BEGIN TRANSACTION +DROP TABLE IF EXISTS infra_codegen_column; +CREATE TABLE infra_codegen_column +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + table_id bigint NOT NULL, + column_name nvarchar(200) NOT NULL, + data_type nvarchar(100) NOT NULL, + column_comment nvarchar(500) NOT NULL, + nullable varchar(1) NOT NULL, + primary_key varchar(1) NOT NULL, + ordinal_position int NOT NULL, + java_type nvarchar(32) NOT NULL, + java_field nvarchar(64) NOT NULL, + dict_type nvarchar(200) DEFAULT '' NULL, + example nvarchar(64) DEFAULT NULL NULL, + create_operation varchar(1) NOT NULL, + update_operation varchar(1) NOT NULL, + list_operation varchar(1) NOT NULL, + list_operation_condition nvarchar(32) DEFAULT '=' NOT NULL, + list_operation_result varchar(1) NOT NULL, + html_type nvarchar(32) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [NEXT_FIRE_TIME], [PREV_FIRE_TIME], [PRIORITY], [TRIGGER_STATE], [TRIGGER_TYPE], [START_TIME], [END_TIME], [CALENDAR_NAME], [MISFIRE_INSTR], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'1651484640000', N'1651484580000', N'5', N'WAITING', N'CRON', N'1651483728000', N'0', NULL, N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000374000F4A4F425F52455452595F434F554E547371007E0009000007D07800) +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'id' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'表编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'table_id' GO - --- ---------------------------- --- Table structure for bpm_form --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_form]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_form] +EXEC sp_addextendedproperty + 'MS_Description', N'字段名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'column_name' GO -CREATE TABLE [dbo].[bpm_form] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [conf] nvarchar(1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [fields] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'字段类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'data_type' GO -ALTER TABLE [dbo].[bpm_form] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'字段描述', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'column_comment' GO EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'id' + 'MS_Description', N'是否允许为空', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'nullable' GO EXEC sp_addextendedproperty -'MS_Description', N'表单名', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'name' + 'MS_Description', N'是否主键', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'primary_key' GO EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'status' + 'MS_Description', N'排序', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'ordinal_position' GO EXEC sp_addextendedproperty -'MS_Description', N'表单的配置', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'conf' + 'MS_Description', N'Java 属性类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'java_type' GO EXEC sp_addextendedproperty -'MS_Description', N'表单项的数组', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'fields' + 'MS_Description', N'Java 属性名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'java_field' GO EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'remark' + 'MS_Description', N'字典类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'dict_type' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'creator' + 'MS_Description', N'数据示例', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'example' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'create_time' + 'MS_Description', N'是否为 Create 创建操作的字段', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'create_operation' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'updater' + 'MS_Description', N'是否为 Update 更新操作的字段', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'update_operation' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'update_time' + 'MS_Description', N'是否为 List 查询操作的字段', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'list_operation' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'deleted' + 'MS_Description', N'List 查询操作的条件类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'list_operation_condition' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form', -'COLUMN', N'tenant_id' + 'MS_Description', N'是否为 List 查询操作的返回字段', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'list_operation_result' GO EXEC sp_addextendedproperty -'MS_Description', N'工作流的表单定义', -'SCHEMA', N'dbo', -'TABLE', N'bpm_form' + 'MS_Description', N'显示类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'html_type' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Records of bpm_form --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'create_time' GO -SET IDENTITY_INSERT [dbo].[bpm_form] ON +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'updater' GO -SET IDENTITY_INSERT [dbo].[bpm_form] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'update_time' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column', + 'COLUMN', N'deleted' GO +EXEC sp_addextendedproperty + 'MS_Description', N'代码生成表字段定义', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_column' +GO -- ---------------------------- --- Table structure for bpm_oa_leave +-- Table structure for infra_codegen_table -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_oa_leave]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_oa_leave] -GO - -CREATE TABLE [dbo].[bpm_oa_leave] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [type] tinyint NOT NULL, - [reason] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [start_time] datetime2(7) NOT NULL, - [end_time] datetime2(7) NOT NULL, - [day] tinyint NOT NULL, - [result] tinyint NOT NULL, - [process_instance_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS infra_codegen_table; +CREATE TABLE infra_codegen_table +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + data_source_config_id bigint NOT NULL, + scene tinyint DEFAULT 1 NOT NULL, + table_name nvarchar(200) DEFAULT '' NOT NULL, + table_comment nvarchar(500) DEFAULT '' NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + module_name nvarchar(30) NOT NULL, + business_name nvarchar(30) NOT NULL, + class_name nvarchar(100) DEFAULT '' NOT NULL, + class_comment nvarchar(50) NOT NULL, + author nvarchar(50) NOT NULL, + template_type tinyint DEFAULT 1 NOT NULL, + front_type tinyint NOT NULL, + parent_menu_id bigint DEFAULT NULL NULL, + master_table_id bigint DEFAULT NULL NULL, + sub_join_column_id bigint DEFAULT NULL NULL, + sub_join_many varchar(1) DEFAULT NULL NULL, + tree_parent_column_id bigint DEFAULT NULL NULL, + tree_name_column_id bigint DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[bpm_oa_leave] SET (LOCK_ESCALATION = TABLE) -GO - EXEC sp_addextendedproperty -'MS_Description', N'请假表单主键', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'id' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'申请人的用户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'user_id' + 'MS_Description', N'数据源配置的编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'data_source_config_id' GO EXEC sp_addextendedproperty -'MS_Description', N'请假类型', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'type' + 'MS_Description', N'生成场景', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'scene' GO EXEC sp_addextendedproperty -'MS_Description', N'请假原因', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'reason' + 'MS_Description', N'表名称', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'table_name' GO EXEC sp_addextendedproperty -'MS_Description', N'开始时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'start_time' + 'MS_Description', N'表描述', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'table_comment' GO EXEC sp_addextendedproperty -'MS_Description', N'结束时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'end_time' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'请假天数', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'day' + 'MS_Description', N'模块名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'module_name' GO EXEC sp_addextendedproperty -'MS_Description', N'请假结果', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'result' + 'MS_Description', N'业务名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'business_name' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'process_instance_id' + 'MS_Description', N'类名称', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'class_name' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'creator' + 'MS_Description', N'类描述', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'class_comment' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'create_time' + 'MS_Description', N'作者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'author' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'updater' + 'MS_Description', N'模板类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'template_type' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'update_time' + 'MS_Description', N'前端类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'front_type' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'tenant_id' + 'MS_Description', N'父菜单编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'parent_menu_id' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave', -'COLUMN', N'deleted' + 'MS_Description', N'主表的编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'master_table_id' GO EXEC sp_addextendedproperty -'MS_Description', N'OA 请假申请表', -'SCHEMA', N'dbo', -'TABLE', N'bpm_oa_leave' + 'MS_Description', N'子表关联主表的字段编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'sub_join_column_id' GO - --- ---------------------------- --- Records of bpm_oa_leave --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'主表与子表是否一对多', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'sub_join_many' GO -SET IDENTITY_INSERT [dbo].[bpm_oa_leave] ON +EXEC sp_addextendedproperty + 'MS_Description', N'树表的父字段编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'tree_parent_column_id' GO -SET IDENTITY_INSERT [dbo].[bpm_oa_leave] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'树表的名字字段编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'tree_name_column_id' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'creator' GO - --- ---------------------------- --- Table structure for bpm_process_definition_ext --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_process_definition_ext]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_process_definition_ext] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'create_time' GO -CREATE TABLE [dbo].[bpm_process_definition_ext] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [process_definition_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [model_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [description] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [form_type] tinyint NOT NULL, - [form_id] bigint NULL, - [form_conf] nvarchar(1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [form_fields] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [form_custom_create_path] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [form_custom_view_path] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'updater' GO -ALTER TABLE [dbo].[bpm_process_definition_ext] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'id' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'流程定义的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'process_definition_id' + 'MS_Description', N'代码生成表定义', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_codegen_table' GO -EXEC sp_addextendedproperty -'MS_Description', N'流程模型的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'model_id' +-- ---------------------------- +-- Table structure for infra_config +-- ---------------------------- +DROP TABLE IF EXISTS infra_config; +CREATE TABLE infra_config +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + category nvarchar(50) NOT NULL, + type tinyint NOT NULL, + name nvarchar(100) DEFAULT '' NOT NULL, + config_key nvarchar(100) DEFAULT '' NOT NULL, + value nvarchar(500) DEFAULT '' NOT NULL, + visible varchar(1) NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'描述', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'description' + 'MS_Description', N'参数主键', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'表单类型', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_type' + 'MS_Description', N'参数分组', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'category' GO EXEC sp_addextendedproperty -'MS_Description', N'表单编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_id' + 'MS_Description', N'参数类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'type' GO EXEC sp_addextendedproperty -'MS_Description', N'表单的配置', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_conf' + 'MS_Description', N'参数名称', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'表单项的数组', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_fields' + 'MS_Description', N'参数键名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'config_key' GO EXEC sp_addextendedproperty -'MS_Description', N'自定义表单的提交路径', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_custom_create_path' + 'MS_Description', N'参数键值', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'value' GO EXEC sp_addextendedproperty -'MS_Description', N'自定义表单的查看路径', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'form_custom_view_path' + 'MS_Description', N'是否可见', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'visible' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'creator' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'tenant_id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'Bpm 流程定义的拓展表 -', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_definition_ext' + 'MS_Description', N'参数配置表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_config' GO - -- ---------------------------- --- Records of bpm_process_definition_ext +-- Records of infra_config -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[bpm_process_definition_ext] ON +SET IDENTITY_INSERT infra_config ON GO - -SET IDENTITY_INSERT [dbo].[bpm_process_definition_ext] OFF +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, N'biz', 1, N'用户管理-账号初始密码', N'sys.user.init-password', N'123456', N'0', N'初始化密码 123456', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-03 17:22:28', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, N'url', 2, N'MySQL 监控的地址', N'url.druid', N'', N'1', N'', N'1', N'2023-04-07 13:41:16', N'1', N'2023-04-07 14:33:38', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (8, N'url', 2, N'SkyWalking 监控的地址', N'url.skywalking', N'', N'1', N'', N'1', N'2023-04-07 13:41:16', N'1', N'2023-04-07 14:57:03', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (9, N'url', 2, N'Spring Boot Admin 监控的地址', N'url.spring-boot-admin', N'', N'1', N'', N'1', N'2023-04-07 13:41:16', N'1', N'2023-04-07 14:52:07', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (10, N'url', 2, N'Swagger 接口文档的地址', N'url.swagger', N'', N'1', N'', N'1', N'2023-04-07 13:41:16', N'1', N'2023-04-07 14:59:00', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (11, N'ui', 2, N'腾讯地图 key', N'tencent.lbs.key', N'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E', N'1', N'腾讯地图 key', N'1', N'2023-06-03 19:16:27', N'1', N'2023-06-03 19:16:27', N'0') +GO +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (12, N'test2', 2, N'test3', N'test4', N'test5', N'1', N'test6', N'1', N'2023-12-03 09:55:16', N'1', N'2023-12-03 09:55:27', N'0') +GO +SET IDENTITY_INSERT infra_config OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for bpm_process_instance_ext +-- Table structure for infra_data_source_config -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_process_instance_ext]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_process_instance_ext] -GO - -CREATE TABLE [dbo].[bpm_process_instance_ext] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [start_user_id] bigint NOT NULL, - [name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [process_instance_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [process_definition_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [category] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [result] tinyint NOT NULL, - [end_time] datetime2(7) NULL, - [form_variables] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS infra_data_source_config; +CREATE TABLE infra_data_source_config +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(100) DEFAULT '' NOT NULL, + url nvarchar(1024) NOT NULL, + username nvarchar(255) NOT NULL, + password nvarchar(255) DEFAULT '' NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[bpm_process_instance_ext] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'主键编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'id' + 'MS_Description', N'参数名称', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'发起流程的用户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'start_user_id' + 'MS_Description', N'数据源连接', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'url' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的名字', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'name' + 'MS_Description', N'用户名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'username' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'process_instance_id' + 'MS_Description', N'密码', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'password' GO EXEC sp_addextendedproperty -'MS_Description', N'流程定义的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'process_definition_id' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'流程分类', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'category' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的状态', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'status' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的结果', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'result' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'结束时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'end_time' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'表单值', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'form_variables' + 'MS_Description', N'数据源配置表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_data_source_config' GO -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'creator' +-- ---------------------------- +-- Table structure for infra_file +-- ---------------------------- +DROP TABLE IF EXISTS infra_file; +CREATE TABLE infra_file +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + config_id bigint DEFAULT NULL NULL, + name nvarchar(256) DEFAULT NULL NULL, + path nvarchar(512) NOT NULL, + url nvarchar(1024) NOT NULL, + type nvarchar(128) DEFAULT NULL NULL, + size int NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'create_time' + 'MS_Description', N'文件编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'updater' + 'MS_Description', N'配置编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'config_id' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'update_time' + 'MS_Description', N'文件名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'tenant_id' + 'MS_Description', N'文件路径', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'path' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext', -'COLUMN', N'deleted' + 'MS_Description', N'文件 URL', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'url' GO EXEC sp_addextendedproperty -'MS_Description', N'工作流的流程实例的拓展', -'SCHEMA', N'dbo', -'TABLE', N'bpm_process_instance_ext' + 'MS_Description', N'文件类型', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'type' GO - --- ---------------------------- --- Records of bpm_process_instance_ext --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'文件大小', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'size' GO -SET IDENTITY_INSERT [dbo].[bpm_process_instance_ext] ON +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'creator' GO -SET IDENTITY_INSERT [dbo].[bpm_process_instance_ext] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'create_time' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'updater' GO - --- ---------------------------- --- Table structure for bpm_task_assign_rule --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_task_assign_rule]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_task_assign_rule] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'update_time' GO -CREATE TABLE [dbo].[bpm_task_assign_rule] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [model_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [process_definition_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [task_definition_key] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] tinyint NOT NULL, - [options] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file', + 'COLUMN', N'deleted' GO -ALTER TABLE [dbo].[bpm_task_assign_rule] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'文件表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file' GO -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'id' +-- ---------------------------- +-- Table structure for infra_file_config +-- ---------------------------- +DROP TABLE IF EXISTS infra_file_config; +CREATE TABLE infra_file_config +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(63) NOT NULL, + storage tinyint NOT NULL, + remark nvarchar(255) DEFAULT NULL NULL, + master varchar(1) NOT NULL, + config nvarchar(4000) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'流程模型的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'model_id' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'流程定义的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'process_definition_id' + 'MS_Description', N'配置名', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'流程任务定义的 key', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'task_definition_key' + 'MS_Description', N'存储器', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'storage' GO EXEC sp_addextendedproperty -'MS_Description', N'规则类型', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'type' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'规则值,JSON 数组', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'options' + 'MS_Description', N'是否为主配置', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'master' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'creator' + 'MS_Description', N'存储配置', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'config' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'tenant_id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'Bpm 任务规则表', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_assign_rule' + 'MS_Description', N'文件配置表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_config' GO - -- ---------------------------- --- Records of bpm_task_assign_rule +-- Records of infra_file_config -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[bpm_task_assign_rule] ON +SET IDENTITY_INSERT infra_file_config ON GO - -SET IDENTITY_INSERT [dbo].[bpm_task_assign_rule] OFF +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, N'数据库', 1, N'我是数据库', N'0', N'{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', N'1', N'2022-03-15 23:56:24', N'1', N'2024-02-28 22:54:07', N'0') +GO +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, N'七牛存储器', 20, N'', N'1', N'{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', N'1', N'2024-01-13 22:11:12', N'1', N'2024-04-03 19:38:34', N'0') +GO +SET IDENTITY_INSERT infra_file_config OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for bpm_task_ext +-- Table structure for infra_file_content -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_task_ext]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_task_ext] -GO - -CREATE TABLE [dbo].[bpm_task_ext] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [assignee_user_id] bigint NULL, - [name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [task_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [result] tinyint NOT NULL, - [reason] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [end_time] datetime2(7) NULL, - [process_instance_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [process_definition_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS infra_file_content; +CREATE TABLE infra_file_content +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + config_id bigint NOT NULL, + path nvarchar(512) NOT NULL, + content varbinary(max) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[bpm_task_ext] SET (LOCK_ESCALATION = TABLE) -GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'id' -GO - EXEC sp_addextendedproperty -'MS_Description', N'任务的审批人', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'assignee_user_id' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'任务的名字', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'name' + 'MS_Description', N'配置编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'config_id' GO EXEC sp_addextendedproperty -'MS_Description', N'任务的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'task_id' + 'MS_Description', N'文件路径', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'path' GO EXEC sp_addextendedproperty -'MS_Description', N'任务的结果', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'result' + 'MS_Description', N'文件内容', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'content' GO EXEC sp_addextendedproperty -'MS_Description', N'审批建议', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'reason' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'任务的结束时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'end_time' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'流程实例的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'process_instance_id' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'流程定义的编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'process_definition_id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'creator' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'create_time' + 'MS_Description', N'文件表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_file_content' GO -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'updater' -GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'update_time' +-- ---------------------------- +-- Table structure for infra_job +-- ---------------------------- +DROP TABLE IF EXISTS infra_job; +CREATE TABLE infra_job +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(32) NOT NULL, + status tinyint NOT NULL, + handler_name nvarchar(64) NOT NULL, + handler_param nvarchar(255) DEFAULT NULL NULL, + cron_expression nvarchar(32) NOT NULL, + retry_count int DEFAULT 0 NOT NULL, + retry_interval int DEFAULT 0 NOT NULL, + monitor_timeout int DEFAULT 0 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'tenant_id' + 'MS_Description', N'任务编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext', -'COLUMN', N'deleted' + 'MS_Description', N'任务名称', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'工作流的流程任务的拓展表', -'SCHEMA', N'dbo', -'TABLE', N'bpm_task_ext' -GO - - --- ---------------------------- --- Records of bpm_task_ext --- ---------------------------- -BEGIN TRANSACTION -GO - -SET IDENTITY_INSERT [dbo].[bpm_task_ext] ON -GO - -SET IDENTITY_INSERT [dbo].[bpm_task_ext] OFF -GO - -COMMIT -GO - - --- ---------------------------- --- Table structure for bpm_user_group --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bpm_user_group]') AND type IN ('U')) - DROP TABLE [dbo].[bpm_user_group] -GO - -CREATE TABLE [dbo].[bpm_user_group] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [description] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [member_user_ids] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) -GO - -ALTER TABLE [dbo].[bpm_user_group] SET (LOCK_ESCALATION = TABLE) + 'MS_Description', N'任务状态', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'id' + 'MS_Description', N'处理器的名字', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'handler_name' GO EXEC sp_addextendedproperty -'MS_Description', N'组名', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'name' + 'MS_Description', N'处理器的参数', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'handler_param' GO EXEC sp_addextendedproperty -'MS_Description', N'描述', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'description' + 'MS_Description', N'CRON 表达式', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'cron_expression' GO EXEC sp_addextendedproperty -'MS_Description', N'成员编号数组', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'member_user_ids' + 'MS_Description', N'重试次数', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'retry_count' GO EXEC sp_addextendedproperty -'MS_Description', N'状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'status' + 'MS_Description', N'重试间隔', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'retry_interval' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'creator' + 'MS_Description', N'监控超时时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'monitor_timeout' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'tenant_id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'用户组', -'SCHEMA', N'dbo', -'TABLE', N'bpm_user_group' + 'MS_Description', N'定时任务表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job' GO - -- ---------------------------- --- Records of bpm_user_group +-- Records of infra_job -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[bpm_user_group] ON -GO - -SET IDENTITY_INSERT [dbo].[bpm_user_group] OFF -GO - -COMMIT +SET IDENTITY_INSERT infra_job ON GO - - --- ---------------------------- --- Table structure for dual --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[dual]') AND type IN ('U')) - DROP TABLE [dbo].[dual] +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, N'支付通知 Job', 2, N'payNotifyJob', NULL, N'* * * * * ?', 0, 0, 0, N'1', N'2021-10-27 08:34:42', N'1', N'2023-07-09 20:51:41', N'0') GO - -CREATE TABLE [dbo].[dual] ( - [id] int NULL -) +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, N'支付订单同步 Job', 2, N'payOrderSyncJob', NULL, N'0 0/1 * * * ?', 0, 0, 0, N'1', N'2023-07-22 14:36:26', N'1', N'2023-07-22 15:39:08', N'0') GO - -ALTER TABLE [dbo].[dual] SET (LOCK_ESCALATION = TABLE) +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (18, N'支付订单过期 Job', 2, N'payOrderExpireJob', NULL, N'0 0/1 * * * ?', 0, 0, 0, N'1', N'2023-07-22 15:36:23', N'1', N'2023-07-22 15:39:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据库连接的表', -'SCHEMA', N'dbo', -'TABLE', N'dual' +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (19, N'退款订单的同步 Job', 2, N'payRefundSyncJob', NULL, N'0 0/1 * * * ?', 0, 0, 0, N'1', N'2023-07-23 21:03:44', N'1', N'2023-07-23 21:09:00', N'0') GO - - --- ---------------------------- --- Records of dual --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (21, N'交易订单的自动过期 Job', 2, N'tradeOrderAutoCancelJob', N'', N'0 * * * * ?', 3, 0, 0, N'1', N'2023-09-25 23:43:26', N'1', N'2023-09-26 19:23:30', N'0') GO - -COMMIT +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (22, N'交易订单的自动收货 Job', 2, N'tradeOrderAutoReceiveJob', N'', N'0 * * * * ?', 3, 0, 0, N'1', N'2023-09-26 19:23:53', N'1', N'2023-09-26 23:38:08', N'0') GO - - --- ---------------------------- --- Table structure for infra_api_access_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_api_access_log]') AND type IN ('U')) - DROP TABLE [dbo].[infra_api_access_log] -GO - -CREATE TABLE [dbo].[infra_api_access_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [trace_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_id] bigint DEFAULT 0 NOT NULL, - [user_type] tinyint DEFAULT 0 NOT NULL, - [application_name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_method] nvarchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_url] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_params] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_agent] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [begin_time] datetime2(7) NOT NULL, - [end_time] datetime2(7) NOT NULL, - [duration] int NOT NULL, - [result_code] int NOT NULL, - [result_msg] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint NOT NULL -) +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (23, N'交易订单的自动评论 Job', 2, N'tradeOrderAutoCommentJob', N'', N'0 * * * * ?', 3, 0, 0, N'1', N'2023-09-26 23:38:29', N'1', N'2023-09-27 11:03:10', N'0') GO - -ALTER TABLE [dbo].[infra_api_access_log] SET (LOCK_ESCALATION = TABLE) +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (24, N'佣金解冻 Job', 2, N'brokerageRecordUnfreezeJob', N'', N'0 * * * * ?', 3, 0, 0, N'1', N'2023-09-28 22:01:46', N'1', N'2023-09-28 22:01:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'id' +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (25, N'访问日志清理 Job', 2, N'accessLogCleanJob', N'', N'0 0 0 * * ?', 3, 0, 0, N'1', N'2023-10-03 10:59:41', N'1', N'2023-10-03 11:01:10', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'链路追踪编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'trace_id' +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (26, N'错误日志清理 Job', 2, N'errorLogCleanJob', N'', N'0 0 0 * * ?', 3, 0, 0, N'1', N'2023-10-03 11:00:43', N'1', N'2023-10-03 11:01:12', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'user_id' +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (27, N'任务日志清理 Job', 2, N'jobLogCleanJob', N'', N'0 0 0 * * ?', 3, 0, 0, N'1', N'2023-10-03 11:01:33', N'1', N'2023-10-03 11:01:42', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'user_type' +SET IDENTITY_INSERT infra_job OFF GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用名', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'application_name' +COMMIT GO +-- @formatter:on -EXEC sp_addextendedproperty -'MS_Description', N'请求方法名', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'request_method' +-- ---------------------------- +-- Table structure for infra_job_log +-- ---------------------------- +DROP TABLE IF EXISTS infra_job_log; +CREATE TABLE infra_job_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + job_id bigint NOT NULL, + handler_name nvarchar(64) NOT NULL, + handler_param nvarchar(255) DEFAULT NULL NULL, + execute_index tinyint DEFAULT 1 NOT NULL, + begin_time datetime2 NOT NULL, + end_time datetime2 DEFAULT NULL NULL, + duration int DEFAULT NULL NULL, + status tinyint NOT NULL, + result nvarchar(4000) DEFAULT '' NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'请求地址', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'request_url' + 'MS_Description', N'日志编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'请求参数', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'request_params' + 'MS_Description', N'任务编号', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'job_id' GO EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'user_ip' + 'MS_Description', N'处理器的名字', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'handler_name' GO EXEC sp_addextendedproperty -'MS_Description', N'浏览器 UA', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'user_agent' + 'MS_Description', N'处理器的参数', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'handler_param' GO EXEC sp_addextendedproperty -'MS_Description', N'开始请求时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'begin_time' + 'MS_Description', N'第几次执行', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'execute_index' GO EXEC sp_addextendedproperty -'MS_Description', N'结束请求时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'end_time' + 'MS_Description', N'开始执行时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'begin_time' GO EXEC sp_addextendedproperty -'MS_Description', N'执行时长', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'duration' + 'MS_Description', N'结束执行时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'end_time' GO EXEC sp_addextendedproperty -'MS_Description', N'结果码', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'result_code' + 'MS_Description', N'执行时长', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'duration' GO EXEC sp_addextendedproperty -'MS_Description', N'结果提示', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'result_msg' + 'MS_Description', N'任务状态', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'creator' + 'MS_Description', N'结果数据', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'result' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'deleted' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log', -'COLUMN', N'tenant_id' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'API 访问日志表', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_access_log' + 'MS_Description', N'定时任务日志表', + 'SCHEMA', N'dbo', + 'TABLE', N'infra_job_log' GO - --- ---------------------------- --- Records of infra_api_access_log --- ---------------------------- -BEGIN TRANSACTION -GO - -SET IDENTITY_INSERT [dbo].[infra_api_access_log] ON -GO - -SET IDENTITY_INSERT [dbo].[infra_api_access_log] OFF -GO - -COMMIT -GO - - -- ---------------------------- --- Table structure for infra_api_error_log +-- Table structure for system_dept -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_api_error_log]') AND type IN ('U')) - DROP TABLE [dbo].[infra_api_error_log] -GO - -CREATE TABLE [dbo].[infra_api_error_log] ( - [id] int IDENTITY(1,1) NOT NULL, - [trace_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_id] int DEFAULT 0 NOT NULL, - [user_type] tinyint DEFAULT 0 NOT NULL, - [application_name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_method] nvarchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_url] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [request_params] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_agent] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_time] datetime2(7) NOT NULL, - [exception_name] nvarchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_message] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_root_cause_message] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_stack_trace] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_class_name] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_file_name] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_method_name] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [exception_line_number] int NOT NULL, - [process_status] tinyint NOT NULL, - [process_time] datetime2(7) NULL, - [process_user_id] int NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS system_dept; +CREATE TABLE system_dept +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(30) DEFAULT '' NOT NULL, + parent_id bigint DEFAULT 0 NOT NULL, + sort int DEFAULT 0 NOT NULL, + leader_user_id bigint DEFAULT NULL NULL, + phone nvarchar(11) DEFAULT NULL NULL, + email nvarchar(50) DEFAULT NULL NULL, + status tinyint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[infra_api_error_log] SET (LOCK_ESCALATION = TABLE) -GO - EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'id' + 'MS_Description', N'部门id', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'链路追踪编号 - * - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'trace_id' + 'MS_Description', N'部门名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'user_id' + 'MS_Description', N'父部门id', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'parent_id' GO EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'user_type' + 'MS_Description', N'显示顺序', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'sort' GO EXEC sp_addextendedproperty -'MS_Description', N'应用名 - * - * 目前读取 spring.application.name', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'application_name' + 'MS_Description', N'负责人', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'leader_user_id' GO EXEC sp_addextendedproperty -'MS_Description', N'请求方法名', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'request_method' + 'MS_Description', N'联系电话', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'phone' GO EXEC sp_addextendedproperty -'MS_Description', N'请求地址', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'request_url' + 'MS_Description', N'邮箱', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'email' GO EXEC sp_addextendedproperty -'MS_Description', N'请求参数', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'request_params' + 'MS_Description', N'部门状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'user_ip' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'浏览器 UA', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'user_agent' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'异常发生时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'异常名 - * - * {@link Throwable#getClass()} 的类全名', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_name' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'异常导致的消息 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_message' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'异常导致的根消息 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_root_cause_message' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept', + 'COLUMN', N'tenant_id' GO EXEC sp_addextendedproperty -'MS_Description', N'异常的栈轨迹 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_stack_trace' + 'MS_Description', N'部门表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dept' GO -EXEC sp_addextendedproperty -'MS_Description', N'异常发生的类全名 - * - * {@link StackTraceElement#getClassName()}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_class_name' +-- ---------------------------- +-- Records of system_dept +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -EXEC sp_addextendedproperty -'MS_Description', N'异常发生的类文件 - * - * {@link StackTraceElement#getFileName()}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_file_name' +SET IDENTITY_INSERT system_dept ON GO - -EXEC sp_addextendedproperty -'MS_Description', N'异常发生的方法名 - * - * {@link StackTraceElement#getMethodName()}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_method_name' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, N'芋道源码', 0, 0, 1, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2023-11-14 23:30:36', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'异常发生的方法所在行 - * - * {@link StackTraceElement#getLineNumber()}', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'exception_line_number' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, N'深圳总公司', 100, 1, 104, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2023-12-02 09:53:35', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理状态', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'process_status' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (102, N'长沙分公司', 100, 2, NULL, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'', N'2021-12-15 05:01:40', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'process_time' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, N'研发部门', 101, 1, 104, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2024-03-24 20:56:04', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理用户编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'process_user_id' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, N'市场部门', 101, 2, NULL, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'', N'2021-12-15 05:01:38', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'creator' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (105, N'测试部门', 101, 3, NULL, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2022-05-16 20:25:15', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'create_time' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (106, N'财务部门', 101, 4, 103, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'103', N'2022-01-15 21:32:22', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'updater' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, N'运维部门', 101, 5, 1, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2023-12-02 09:28:22', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'update_time' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, N'市场部门', 102, 1, NULL, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'1', N'2022-02-16 08:35:45', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'tenant_id' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, N'财务部门', 102, 2, NULL, N'15888888888', N'ry@qq.com', 0, N'admin', N'2021-01-05 17:03:47', N'', N'2021-12-15 05:01:29', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log', -'COLUMN', N'deleted' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, N'新部门', 0, 1, NULL, NULL, NULL, 0, N'110', N'2022-02-23 20:46:30', N'110', N'2022-02-23 20:46:30', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'系统异常日志', -'SCHEMA', N'dbo', -'TABLE', N'infra_api_error_log' +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, N'顶级部门', 0, 1, NULL, NULL, NULL, 0, N'113', N'2022-03-07 21:44:50', N'113', N'2022-03-07 21:44:50', N'0', 122) GO - - --- ---------------------------- --- Records of infra_api_error_log --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, N'产品部门', 101, 100, 1, NULL, NULL, 1, N'1', N'2023-12-02 09:45:13', N'1', N'2023-12-02 09:45:31', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[infra_api_error_log] ON +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, N'支持部门', 102, 3, 104, NULL, NULL, 1, N'1', N'2023-12-02 09:47:38', N'1', N'2023-12-02 09:47:38', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[infra_api_error_log] OFF +SET IDENTITY_INSERT system_dept OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for infra_codegen_column +-- Table structure for system_dict_data -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_codegen_column]') AND type IN ('U')) - DROP TABLE [dbo].[infra_codegen_column] -GO - -CREATE TABLE [dbo].[infra_codegen_column] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [table_id] bigint NOT NULL, - [column_name] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [data_type] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [column_comment] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [nullable] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [primary_key] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [ordinal_position] int NOT NULL, - [java_type] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [java_field] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [dict_type] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [example] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_operation] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [update_operation] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [list_operation] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [list_operation_condition] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [list_operation_result] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [html_type] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS system_dict_data; +CREATE TABLE system_dict_data +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + sort int DEFAULT 0 NOT NULL, + label nvarchar(100) DEFAULT '' NOT NULL, + value nvarchar(100) DEFAULT '' NOT NULL, + dict_type nvarchar(100) DEFAULT '' NOT NULL, + status tinyint DEFAULT 0 NOT NULL, + color_type nvarchar(100) DEFAULT '' NULL, + css_class nvarchar(100) DEFAULT '' NULL, + remark nvarchar(500) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[infra_codegen_column] SET (LOCK_ESCALATION = TABLE) -GO - EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'id' + 'MS_Description', N'字典编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'表编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'table_id' + 'MS_Description', N'字典排序', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'sort' GO EXEC sp_addextendedproperty -'MS_Description', N'字段名', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'column_name' + 'MS_Description', N'字典标签', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'label' GO EXEC sp_addextendedproperty -'MS_Description', N'字段类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'data_type' + 'MS_Description', N'字典键值', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'value' GO EXEC sp_addextendedproperty -'MS_Description', N'字段描述', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'column_comment' + 'MS_Description', N'字典类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'dict_type' GO EXEC sp_addextendedproperty -'MS_Description', N'是否允许为空', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'nullable' + 'MS_Description', N'状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'是否主键', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'primary_key' + 'MS_Description', N'颜色类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'color_type' GO EXEC sp_addextendedproperty -'MS_Description', N'排序', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'ordinal_position' + 'MS_Description', N'css 样式', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'css_class' GO EXEC sp_addextendedproperty -'MS_Description', N'Java 属性类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'java_type' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'Java 属性名', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'java_field' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'字典类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'dict_type' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'数据示例', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'example' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'是否为 Create 创建操作的字段', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'create_operation' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否为 Update 更新操作的字段', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'update_operation' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'是否为 List 查询操作的字段', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'list_operation' + 'MS_Description', N'字典数据表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_data' GO -EXEC sp_addextendedproperty -'MS_Description', N'List 查询操作的条件类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'list_operation_condition' +-- ---------------------------- +-- Records of system_dict_data +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否为 List 查询操作的返回字段', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'list_operation_result' +SET IDENTITY_INSERT system_dict_data ON GO - -EXEC sp_addextendedproperty -'MS_Description', N'显示类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'html_type' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, N'男', N'1', N'system_user_sex', 0, N'default', N'A', N'性别男', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-03-29 00:14:39', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, N'女', N'2', N'system_user_sex', 0, N'success', N'', N'性别女', N'admin', N'2021-01-05 17:03:48', N'1', N'2023-11-15 23:30:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 1, N'正常', N'1', N'infra_job_status', 0, N'success', N'', N'正常状态', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 19:33:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 2, N'暂停', N'2', N'infra_job_status', 0, N'danger', N'', N'停用状态', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 19:33:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 1, N'系统内置', N'1', N'infra_config_type', 0, N'danger', N'', N'参数类型 - 系统内置', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 19:06:02', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (13, 2, N'自定义', N'2', N'infra_config_type', 0, N'primary', N'', N'参数类型 - 自定义', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 19:06:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'代码生成表字段定义', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (14, 1, N'通知', N'1', N'system_notice_type', 0, N'success', N'', N'通知', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 13:05:57', N'0') GO - - --- ---------------------------- --- Records of infra_codegen_column --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (15, 2, N'公告', N'2', N'system_notice_type', 0, N'info', N'', N'公告', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 13:06:01', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_codegen_column] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (16, 0, N'其它', N'0', N'infra_operate_type', 0, N'default', N'', N'其它操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:19', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_codegen_column] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (17, 1, N'查询', N'1', N'infra_operate_type', 0, N'info', N'', N'查询操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:20', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (18, 2, N'新增', N'2', N'infra_operate_type', 0, N'primary', N'', N'新增操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:21', N'0') GO - - --- ---------------------------- --- Table structure for infra_codegen_table --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_codegen_table]') AND type IN ('U')) - DROP TABLE [dbo].[infra_codegen_table] -GO - -CREATE TABLE [dbo].[infra_codegen_table] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [data_source_config_id] bigint NOT NULL, - [scene] tinyint NOT NULL, - [table_name] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [table_comment] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [module_name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [business_name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [class_name] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [class_comment] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [author] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [template_type] tinyint NOT NULL, - [parent_menu_id] bigint NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (19, 3, N'修改', N'3', N'infra_operate_type', 0, N'warning', N'', N'修改操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:22', N'0') GO - -ALTER TABLE [dbo].[infra_codegen_table] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (20, 4, N'删除', N'4', N'infra_operate_type', 0, N'danger', N'', N'删除操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (22, 5, N'导出', N'5', N'infra_operate_type', 0, N'default', N'', N'导出操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:24', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据源配置的编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'data_source_config_id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (23, 6, N'导入', N'6', N'infra_operate_type', 0, N'default', N'', N'导入操作', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'生成场景', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'scene' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (27, 1, N'开启', N'0', N'common_status', 0, N'primary', N'', N'开启状态', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 08:00:39', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'表名称', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'table_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (28, 2, N'关闭', N'1', N'common_status', 0, N'info', N'', N'关闭状态', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 08:00:44', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'表描述', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'table_comment' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (29, 1, N'目录', N'1', N'system_menu_type', 0, N'', N'', N'目录', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:43:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'remark' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (30, 2, N'菜单', N'2', N'system_menu_type', 0, N'', N'', N'菜单', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:43:41', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'模块名', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'module_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (31, 3, N'按钮', N'3', N'system_menu_type', 0, N'', N'', N'按钮', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:43:39', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'业务名', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'business_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (32, 1, N'内置', N'1', N'system_role_type', 0, N'danger', N'', N'内置角色', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 13:02:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'类名称', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'class_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (33, 2, N'自定义', N'2', N'system_role_type', 0, N'primary', N'', N'自定义角色', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-02-16 13:02:12', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'类描述', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'class_comment' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (34, 1, N'全部数据权限', N'1', N'system_data_scope', 0, N'', N'', N'全部数据权限', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:47:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'作者', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'author' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (35, 2, N'指定部门数据权限', N'2', N'system_data_scope', 0, N'', N'', N'指定部门数据权限', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:47:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'template_type' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (36, 3, N'本部门数据权限', N'3', N'system_data_scope', 0, N'', N'', N'本部门数据权限', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:47:16', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'父菜单编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'parent_menu_id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (37, 4, N'本部门及以下数据权限', N'4', N'system_data_scope', 0, N'', N'', N'本部门及以下数据权限', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:47:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (38, 5, N'仅本人数据权限', N'5', N'system_data_scope', 0, N'', N'', N'仅本人数据权限', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:47:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (39, 0, N'成功', N'0', N'system_login_result', 0, N'success', N'', N'登陆结果 - 成功', N'', N'2021-01-18 06:17:36', N'1', N'2022-02-16 13:23:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (40, 10, N'账号或密码不正确', N'10', N'system_login_result', 0, N'primary', N'', N'登陆结果 - 账号或密码不正确', N'', N'2021-01-18 06:17:54', N'1', N'2022-02-16 13:24:27', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (41, 20, N'用户被禁用', N'20', N'system_login_result', 0, N'warning', N'', N'登陆结果 - 用户被禁用', N'', N'2021-01-18 06:17:54', N'1', N'2022-02-16 13:23:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (42, 30, N'验证码不存在', N'30', N'system_login_result', 0, N'info', N'', N'登陆结果 - 验证码不存在', N'', N'2021-01-18 06:17:54', N'1', N'2022-02-16 13:24:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'代码生成表定义', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_table' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (43, 31, N'验证码不正确', N'31', N'system_login_result', 0, N'info', N'', N'登陆结果 - 验证码不正确', N'', N'2021-01-18 06:17:54', N'1', N'2022-02-16 13:24:11', N'0') GO - - --- ---------------------------- --- Records of infra_codegen_table --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (44, 100, N'未知异常', N'100', N'system_login_result', 0, N'danger', N'', N'登陆结果 - 未知异常', N'', N'2021-01-18 06:17:54', N'1', N'2022-02-16 13:24:23', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_codegen_table] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (45, 1, N'是', N'true', N'infra_boolean_string', 0, N'danger', N'', N'Boolean 是否类型 - 是', N'', N'2021-01-19 03:20:55', N'1', N'2022-03-15 23:01:45', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_codegen_table] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (46, 1, N'否', N'false', N'infra_boolean_string', 0, N'info', N'', N'Boolean 是否类型 - 否', N'', N'2021-01-19 03:20:55', N'1', N'2022-03-15 23:09:45', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (50, 1, N'单表(增删改查)', N'1', N'infra_codegen_template_type', 0, N'', N'', NULL, N'', N'2021-02-05 07:09:06', N'', N'2022-03-10 16:33:15', N'0') GO - - --- ---------------------------- --- Table structure for infra_config --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_config]') AND type IN ('U')) - DROP TABLE [dbo].[infra_config] -GO - -CREATE TABLE [dbo].[infra_config] ( - [id] int NOT NULL, - [category] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] tinyint NOT NULL, - [name] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [config_key] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [value] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [visible] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (51, 2, N'树表(增删改查)', N'2', N'infra_codegen_template_type', 0, N'', N'', NULL, N'', N'2021-02-05 07:14:46', N'', N'2022-03-10 16:33:19', N'0') GO - -ALTER TABLE [dbo].[infra_config] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (53, 0, N'初始化中', N'0', N'infra_job_status', 0, N'primary', N'', NULL, N'', N'2021-02-07 07:46:49', N'1', N'2022-02-16 19:33:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数主键', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (57, 0, N'运行中', N'0', N'infra_job_log_status', 0, N'primary', N'', N'RUNNING', N'', N'2021-02-08 10:04:24', N'1', N'2022-02-16 19:07:48', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数分组', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'category' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (58, 1, N'成功', N'1', N'infra_job_log_status', 0, N'success', N'', NULL, N'', N'2021-02-08 10:06:57', N'1', N'2022-02-16 19:07:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'type' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (59, 2, N'失败', N'2', N'infra_job_log_status', 0, N'warning', N'', N'失败', N'', N'2021-02-08 10:07:38', N'1', N'2022-02-16 19:07:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数名称', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (60, 1, N'会员', N'1', N'user_type', 0, N'primary', N'', NULL, N'', N'2021-02-26 00:16:27', N'1', N'2022-02-16 10:22:19', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数键名', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'config_key' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (61, 2, N'管理员', N'2', N'user_type', 0, N'success', N'', NULL, N'', N'2021-02-26 00:16:34', N'1', N'2022-02-16 10:22:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数键值', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'value' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (62, 0, N'未处理', N'0', N'infra_api_error_log_process_status', 0, N'primary', N'', NULL, N'', N'2021-02-26 07:07:19', N'1', N'2022-02-16 20:14:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否可见', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'visible' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (63, 1, N'已处理', N'1', N'infra_api_error_log_process_status', 0, N'success', N'', NULL, N'', N'2021-02-26 07:07:26', N'1', N'2022-02-16 20:14:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'remark' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (64, 2, N'已忽略', N'2', N'infra_api_error_log_process_status', 0, N'danger', N'', NULL, N'', N'2021-02-26 07:07:34', N'1', N'2022-02-16 20:14:14', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (66, 2, N'阿里云', N'ALIYUN', N'system_sms_channel_code', 0, N'primary', N'', NULL, N'1', N'2021-04-05 01:05:26', N'1', N'2022-02-16 10:09:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (67, 1, N'验证码', N'1', N'system_sms_template_type', 0, N'warning', N'', NULL, N'1', N'2021-04-05 21:50:57', N'1', N'2022-02-16 12:48:30', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (68, 2, N'通知', N'2', N'system_sms_template_type', 0, N'primary', N'', NULL, N'1', N'2021-04-05 21:51:08', N'1', N'2022-02-16 12:48:27', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (69, 0, N'营销', N'3', N'system_sms_template_type', 0, N'danger', N'', NULL, N'1', N'2021-04-05 21:51:15', N'1', N'2022-02-16 12:48:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_config', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (70, 0, N'初始化', N'0', N'system_sms_send_status', 0, N'primary', N'', NULL, N'1', N'2021-04-11 20:18:33', N'1', N'2022-02-16 10:26:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数配置表', -'SCHEMA', N'dbo', -'TABLE', N'infra_config' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (71, 1, N'发送成功', N'10', N'system_sms_send_status', 0, N'success', N'', NULL, N'1', N'2021-04-11 20:18:43', N'1', N'2022-02-16 10:25:56', N'0') GO - - --- ---------------------------- --- Records of infra_config --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (72, 2, N'发送失败', N'20', N'system_sms_send_status', 0, N'danger', N'', NULL, N'1', N'2021-04-11 20:18:49', N'1', N'2022-02-16 10:26:03', N'0') GO - -INSERT INTO [dbo].[infra_config] ([id], [category], [type], [name], [config_key], [value], [visible], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'ui', N'1', N'主框架页-默认皮肤样式名称', N'sys.index.skinName', N'skin-blue', N'0', N'蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-03-26 23:10:31.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (73, 3, N'不发送', N'30', N'system_sms_send_status', 0, N'info', N'', NULL, N'1', N'2021-04-11 20:19:44', N'1', N'2022-02-16 10:26:10', N'0') GO - -INSERT INTO [dbo].[infra_config] ([id], [category], [type], [name], [config_key], [value], [visible], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'2', N'biz', N'1', N'用户管理-账号初始密码', N'sys.user.init-password', N'123456', N'0', N'初始化密码 123456', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-03-20 02:25:51.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (74, 0, N'等待结果', N'0', N'system_sms_receive_status', 0, N'primary', N'', NULL, N'1', N'2021-04-11 20:27:43', N'1', N'2022-02-16 10:28:24', N'0') GO - -INSERT INTO [dbo].[infra_config] ([id], [category], [type], [name], [config_key], [value], [visible], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'3', N'ui', N'1', N'主框架页-侧边栏主题', N'sys.index.sideTheme', N'theme-dark', N'0', N'深色主题theme-dark,浅色主题theme-light', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2021-01-19 03:05:21.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (75, 1, N'接收成功', N'10', N'system_sms_receive_status', 0, N'success', N'', NULL, N'1', N'2021-04-11 20:29:25', N'1', N'2022-02-16 10:28:28', N'0') GO - -INSERT INTO [dbo].[infra_config] ([id], [category], [type], [name], [config_key], [value], [visible], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'6', N'biz', N'2', N'登陆验证码的开关', N'yudao.captcha.enable', N'true', N'1', NULL, N'1', N'2022-02-17 00:03:11.0000000', N'1', N'2022-04-04 12:51:40.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (76, 2, N'接收失败', N'20', N'system_sms_receive_status', 0, N'danger', N'', NULL, N'1', N'2021-04-11 20:29:31', N'1', N'2022-02-16 10:28:32', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (77, 0, N'调试(钉钉)', N'DEBUG_DING_TALK', N'system_sms_channel_code', 0, N'info', N'', NULL, N'1', N'2021-04-13 00:20:37', N'1', N'2022-02-16 10:10:00', N'0') GO - - --- ---------------------------- --- Table structure for infra_data_source_config --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_data_source_config]') AND type IN ('U')) - DROP TABLE [dbo].[infra_data_source_config] -GO - -CREATE TABLE [dbo].[infra_data_source_config] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [username] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [password] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (80, 100, N'账号登录', N'100', N'system_login_type', 0, N'primary', N'', N'账号登录', N'1', N'2021-10-06 00:52:02', N'1', N'2022-02-16 13:11:34', N'0') GO - -ALTER TABLE [dbo].[infra_data_source_config] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (81, 101, N'社交登录', N'101', N'system_login_type', 0, N'info', N'', N'社交登录', N'1', N'2021-10-06 00:52:17', N'1', N'2022-02-16 13:11:40', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'主键编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (83, 200, N'主动登出', N'200', N'system_login_type', 0, N'primary', N'', N'主动登出', N'1', N'2021-10-06 00:52:58', N'1', N'2022-02-16 13:11:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数名称', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (85, 202, N'强制登出', N'202', N'system_login_type', 0, N'danger', N'', N'强制退出', N'1', N'2021-10-06 00:53:41', N'1', N'2022-02-16 13:11:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据源连接', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'url' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (86, 0, N'病假', N'1', N'bpm_oa_leave_type', 0, N'primary', N'', NULL, N'1', N'2021-09-21 22:35:28', N'1', N'2022-02-16 10:00:41', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户名', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'username' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (87, 1, N'事假', N'2', N'bpm_oa_leave_type', 0, N'info', N'', NULL, N'1', N'2021-09-21 22:36:11', N'1', N'2022-02-16 10:00:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'密码', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'password' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (88, 2, N'婚假', N'3', N'bpm_oa_leave_type', 0, N'warning', N'', NULL, N'1', N'2021-09-21 22:36:38', N'1', N'2022-02-16 10:00:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (113, 1, N'微信公众号支付', N'wx_pub', N'pay_channel_code', 0, N'success', N'', N'微信公众号支付', N'1', N'2021-12-03 10:40:24', N'1', N'2023-07-19 20:08:47', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (114, 2, N'微信小程序支付', N'wx_lite', N'pay_channel_code', 0, N'success', N'', N'微信小程序支付', N'1', N'2021-12-03 10:41:06', N'1', N'2023-07-19 20:08:50', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (115, 3, N'微信 App 支付', N'wx_app', N'pay_channel_code', 0, N'success', N'', N'微信 App 支付', N'1', N'2021-12-03 10:41:20', N'1', N'2023-07-19 20:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (116, 10, N'支付宝 PC 网站支付', N'alipay_pc', N'pay_channel_code', 0, N'primary', N'', N'支付宝 PC 网站支付', N'1', N'2021-12-03 10:42:09', N'1', N'2023-07-19 20:09:12', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (117, 11, N'支付宝 Wap 网站支付', N'alipay_wap', N'pay_channel_code', 0, N'primary', N'', N'支付宝 Wap 网站支付', N'1', N'2021-12-03 10:42:26', N'1', N'2023-07-19 20:09:16', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据源配置表', -'SCHEMA', N'dbo', -'TABLE', N'infra_data_source_config' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (118, 12, N'支付宝 App 支付', N'alipay_app', N'pay_channel_code', 0, N'primary', N'', N'支付宝 App 支付', N'1', N'2021-12-03 10:42:55', N'1', N'2023-07-19 20:09:20', N'0') GO - - --- ---------------------------- --- Records of infra_data_source_config --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (119, 14, N'支付宝扫码支付', N'alipay_qr', N'pay_channel_code', 0, N'primary', N'', N'支付宝扫码支付', N'1', N'2021-12-03 10:43:10', N'1', N'2023-07-19 20:09:28', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_data_source_config] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (120, 10, N'通知成功', N'10', N'pay_notify_status', 0, N'success', N'', N'通知成功', N'1', N'2021-12-03 11:02:41', N'1', N'2023-07-19 10:08:19', N'0') GO - -INSERT INTO [dbo].[infra_data_source_config] ([id], [name], [url], [username], [password], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'8', N'test', N'jdbc:mysql://127.0.0.1:3306/testb5f4', N'root', N'3xgHTSHmF3mlgL3Ybw45ztewGDxGgEkWF3wTSYey7k+uXI/wdz45TrvYvYssQtmA', N'1', N'2022-04-27 22:48:20.0000000', N'1', N'2022-04-28 20:04:06.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (121, 20, N'通知失败', N'20', N'pay_notify_status', 0, N'danger', N'', N'通知失败', N'1', N'2021-12-03 11:02:59', N'1', N'2023-07-19 10:08:21', N'0') GO - -INSERT INTO [dbo].[infra_data_source_config] ([id], [name], [url], [username], [password], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'9', N'oracle_test', N'jdbc:oracle:thin:@127.0.0.1:1521:xe', N'root', N'vwmNAPLiEi+NX4AVdC+zNvpejPLwcFXp6dlhgNxCfDTi4vKRy76iIeFqyvpRerNC', N'1', N'2022-04-28 20:41:26.0000000', N'1', N'2022-04-28 20:41:26.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (122, 0, N'等待通知', N'0', N'pay_notify_status', 0, N'info', N'', N'未通知', N'1', N'2021-12-03 11:03:10', N'1', N'2023-07-19 10:08:24', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_data_source_config] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (123, 10, N'支付成功', N'10', N'pay_order_status', 0, N'success', N'', N'支付成功', N'1', N'2021-12-03 11:18:29', N'1', N'2023-07-19 18:04:28', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (124, 30, N'支付关闭', N'30', N'pay_order_status', 0, N'info', N'', N'支付关闭', N'1', N'2021-12-03 11:18:42', N'1', N'2023-07-19 18:05:07', N'0') GO - - --- ---------------------------- --- Table structure for infra_file --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_file]') AND type IN ('U')) - DROP TABLE [dbo].[infra_file] -GO - -CREATE TABLE [dbo].[infra_file] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [config_id] bigint NULL, - [path] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [size] int NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [name] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (125, 0, N'等待支付', N'0', N'pay_order_status', 0, N'info', N'', N'未支付', N'1', N'2021-12-03 11:18:18', N'1', N'2023-07-19 18:04:15', N'0') GO - -ALTER TABLE [dbo].[infra_file] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (600, 5, N'首页', N'1', N'promotion_banner_position', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (601, 4, N'秒杀活动页', N'2', N'promotion_banner_position', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'配置编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'config_id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (602, 3, N'砍价活动页', N'3', N'promotion_banner_position', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件路径', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'path' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (603, 2, N'限时折扣页', N'4', N'promotion_banner_position', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件 URL', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'url' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (604, 1, N'满减送页', N'5', N'promotion_banner_position', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件 MIME 类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'type' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1118, 0, N'等待退款', N'0', N'pay_refund_status', 0, N'info', N'', N'等待退款', N'1', N'2021-12-10 16:44:59', N'1', N'2023-07-19 10:14:39', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件大小', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'size' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1119, 20, N'退款失败', N'20', N'pay_refund_status', 0, N'danger', N'', N'退款失败', N'1', N'2021-12-10 16:45:10', N'1', N'2023-07-19 10:15:10', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1124, 10, N'退款成功', N'10', N'pay_refund_status', 0, N'success', N'', N'退款成功', N'1', N'2021-12-10 16:46:26', N'1', N'2023-07-19 10:15:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1127, 1, N'审批中', N'1', N'bpm_process_instance_status', 0, N'default', N'', N'流程实例的状态 - 进行中', N'1', N'2022-01-07 23:47:22', N'1', N'2024-03-16 16:11:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1128, 2, N'审批通过', N'2', N'bpm_process_instance_status', 0, N'success', N'', N'流程实例的状态 - 已完成', N'1', N'2022-01-07 23:47:49', N'1', N'2024-03-16 16:11:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1129, 1, N'审批中', N'1', N'bpm_task_status', 0, N'primary', N'', N'流程实例的结果 - 处理中', N'1', N'2022-01-07 23:48:32', N'1', N'2024-03-08 22:41:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1130, 2, N'审批通过', N'2', N'bpm_task_status', 0, N'success', N'', N'流程实例的结果 - 通过', N'1', N'2022-01-07 23:48:45', N'1', N'2024-03-08 22:41:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件路径', -'SCHEMA', N'dbo', -'TABLE', N'infra_file', -'COLUMN', N'name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1131, 3, N'审批不通过', N'3', N'bpm_task_status', 0, N'danger', N'', N'流程实例的结果 - 不通过', N'1', N'2022-01-07 23:48:55', N'1', N'2024-03-08 22:41:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件表', -'SCHEMA', N'dbo', -'TABLE', N'infra_file' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1132, 4, N'已取消', N'4', N'bpm_task_status', 0, N'info', N'', N'流程实例的结果 - 撤销', N'1', N'2022-01-07 23:49:06', N'1', N'2024-03-08 22:41:39', N'0') GO - - --- ---------------------------- --- Records of infra_file --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1133, 10, N'流程表单', N'10', N'bpm_model_form_type', 0, N'', N'', N'流程的表单类型 - 流程表单', N'103', N'2022-01-11 23:51:30', N'103', N'2022-01-11 23:51:30', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1134, 20, N'业务表单', N'20', N'bpm_model_form_type', 0, N'', N'', N'流程的表单类型 - 业务表单', N'103', N'2022-01-11 23:51:47', N'103', N'2022-01-11 23:51:47', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1135, 10, N'角色', N'10', N'bpm_task_candidate_strategy', 0, N'info', N'', N'任务分配规则的类型 - 角色', N'103', N'2022-01-12 23:21:22', N'1', N'2024-03-06 02:53:16', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1136, 20, N'部门的成员', N'20', N'bpm_task_candidate_strategy', 0, N'primary', N'', N'任务分配规则的类型 - 部门的成员', N'103', N'2022-01-12 23:21:47', N'1', N'2024-03-06 02:53:17', N'0') GO - - --- ---------------------------- --- Table structure for infra_file_config --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_file_config]') AND type IN ('U')) - DROP TABLE [dbo].[infra_file_config] -GO - -CREATE TABLE [dbo].[infra_file_config] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [storage] tinyint NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [master] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [config] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1137, 21, N'部门的负责人', N'21', N'bpm_task_candidate_strategy', 0, N'primary', N'', N'任务分配规则的类型 - 部门的负责人', N'103', N'2022-01-12 23:33:36', N'1', N'2024-03-06 02:53:18', N'0') GO - -ALTER TABLE [dbo].[infra_file_config] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1138, 30, N'用户', N'30', N'bpm_task_candidate_strategy', 0, N'info', N'', N'任务分配规则的类型 - 用户', N'103', N'2022-01-12 23:34:02', N'1', N'2024-03-06 02:53:19', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1139, 40, N'用户组', N'40', N'bpm_task_candidate_strategy', 0, N'warning', N'', N'任务分配规则的类型 - 用户组', N'103', N'2022-01-12 23:34:21', N'1', N'2024-03-06 02:53:20', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'配置名', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1140, 60, N'流程表达式', N'60', N'bpm_task_candidate_strategy', 0, N'danger', N'', N'任务分配规则的类型 - 流程表达式', N'103', N'2022-01-12 23:34:43', N'1', N'2024-03-06 02:53:20', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'存储器', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'storage' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1141, 22, N'岗位', N'22', N'bpm_task_candidate_strategy', 0, N'success', N'', N'任务分配规则的类型 - 岗位', N'103', N'2022-01-14 18:41:55', N'1', N'2024-03-06 02:53:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'remark' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1145, 1, N'管理后台', N'1', N'infra_codegen_scene', 0, N'', N'', N'代码生成的场景枚举 - 管理后台', N'1', N'2022-02-02 13:15:06', N'1', N'2022-03-10 16:32:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否为主配置', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'master' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1146, 2, N'用户 APP', N'2', N'infra_codegen_scene', 0, N'', N'', N'代码生成的场景枚举 - 用户 APP', N'1', N'2022-02-02 13:15:19', N'1', N'2022-03-10 16:33:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'存储配置', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'config' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1150, 1, N'数据库', N'1', N'infra_file_storage', 0, N'default', N'', NULL, N'1', N'2022-03-15 00:25:28', N'1', N'2022-03-15 00:25:28', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1151, 10, N'本地磁盘', N'10', N'infra_file_storage', 0, N'default', N'', NULL, N'1', N'2022-03-15 00:25:41', N'1', N'2022-03-15 00:25:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1152, 11, N'FTP 服务器', N'11', N'infra_file_storage', 0, N'default', N'', NULL, N'1', N'2022-03-15 00:26:06', N'1', N'2022-03-15 00:26:10', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1153, 12, N'SFTP 服务器', N'12', N'infra_file_storage', 0, N'default', N'', NULL, N'1', N'2022-03-15 00:26:22', N'1', N'2022-03-15 00:26:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1154, 20, N'S3 对象存储', N'20', N'infra_file_storage', 0, N'default', N'', NULL, N'1', N'2022-03-15 00:26:31', N'1', N'2022-03-15 00:26:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1155, 103, N'短信登录', N'103', N'system_login_type', 0, N'default', N'', NULL, N'1', N'2022-05-09 23:57:58', N'1', N'2022-05-09 23:58:09', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件配置表', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_config' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1156, 1, N'password', N'password', N'system_oauth2_grant_type', 0, N'default', N'', N'密码模式', N'1', N'2022-05-12 00:22:05', N'1', N'2022-05-11 16:26:01', N'0') GO - - --- ---------------------------- --- Records of infra_file_config --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1157, 2, N'authorization_code', N'authorization_code', N'system_oauth2_grant_type', 0, N'primary', N'', N'授权码模式', N'1', N'2022-05-12 00:22:59', N'1', N'2022-05-11 16:26:02', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file_config] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1158, 3, N'implicit', N'implicit', N'system_oauth2_grant_type', 0, N'success', N'', N'简化模式', N'1', N'2022-05-12 00:23:40', N'1', N'2022-05-11 16:26:05', N'0') GO - -INSERT INTO [dbo].[infra_file_config] ([id], [name], [storage], [remark], [master], [config], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'4', N'数据库', N'1', N'我是数据库', N'0', N'{"@class":"cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', N'1', N'2022-03-15 23:56:24.0000000', N'1', N'2022-03-26 21:39:26.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1159, 4, N'client_credentials', N'client_credentials', N'system_oauth2_grant_type', 0, N'default', N'', N'客户端模式', N'1', N'2022-05-12 00:23:51', N'1', N'2022-05-11 16:26:08', N'0') GO - -INSERT INTO [dbo].[infra_file_config] ([id], [name], [storage], [remark], [master], [config], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'5', N'本地磁盘', N'10', N'测试下本地存储', N'0', N'{"@class":"cn.iocoder.yudao.framework.file.core.client.local.LocalFileClientConfig","basePath":"/Users/yunai/file_test","domain":"http://127.0.0.1:48080"}', N'1', N'2022-03-15 23:57:00.0000000', N'1', N'2022-03-26 21:39:26.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1160, 5, N'refresh_token', N'refresh_token', N'system_oauth2_grant_type', 0, N'info', N'', N'刷新模式', N'1', N'2022-05-12 00:24:02', N'1', N'2022-05-11 16:26:11', N'0') GO - -INSERT INTO [dbo].[infra_file_config] ([id], [name], [storage], [remark], [master], [config], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'11', N'S3 - 七牛云', N'20', NULL, N'1', N'{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}', N'1', N'2022-03-19 18:00:03.0000000', N'1', N'2022-03-26 21:39:26.0000000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1162, 1, N'销售中', N'1', N'product_spu_status', 0, N'success', N'', N'商品 SPU 状态 - 销售中', N'1', N'2022-10-24 21:19:47', N'1', N'2022-10-24 21:20:38', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file_config] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1163, 0, N'仓库中', N'0', N'product_spu_status', 0, N'info', N'', N'商品 SPU 状态 - 仓库中', N'1', N'2022-10-24 21:20:54', N'1', N'2022-10-24 21:21:22', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1164, 0, N'回收站', N'-1', N'product_spu_status', 0, N'default', N'', N'商品 SPU 状态 - 回收站', N'1', N'2022-10-24 21:21:11', N'1', N'2022-10-24 21:21:11', N'0') GO - - --- ---------------------------- --- Table structure for infra_file_content --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_file_content]') AND type IN ('U')) - DROP TABLE [dbo].[infra_file_content] +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1165, 1, N'满减', N'1', N'promotion_discount_type', 0, N'success', N'', N'优惠类型 - 满减', N'1', N'2022-11-01 12:46:41', N'1', N'2022-11-01 12:50:11', N'0') GO - -CREATE TABLE [dbo].[infra_file_content] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [config_id] bigint NOT NULL, - [path] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [content] varbinary(max) NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1166, 2, N'折扣', N'2', N'promotion_discount_type', 0, N'primary', N'', N'优惠类型 - 折扣', N'1', N'2022-11-01 12:46:51', N'1', N'2022-11-01 12:50:08', N'0') GO - -ALTER TABLE [dbo].[infra_file_content] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1167, 1, N'固定日期', N'1', N'promotion_coupon_template_validity_type', 0, N'default', N'', N'优惠劵模板的有限期类型 - 固定日期', N'1', N'2022-11-02 00:07:34', N'1', N'2022-11-04 00:07:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1168, 2, N'领取之后', N'2', N'promotion_coupon_template_validity_type', 0, N'default', N'', N'优惠劵模板的有限期类型 - 领取之后', N'1', N'2022-11-02 00:07:54', N'1', N'2022-11-04 00:07:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'配置编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'config_id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1169, 1, N'通用劵', N'1', N'promotion_product_scope', 0, N'default', N'', N'营销的商品范围 - 全部商品参与', N'1', N'2022-11-02 00:28:22', N'1', N'2023-09-28 00:27:42', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件路径', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'path' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1170, 2, N'商品劵', N'2', N'promotion_product_scope', 0, N'default', N'', N'营销的商品范围 - 指定商品参与', N'1', N'2022-11-02 00:28:34', N'1', N'2023-09-28 00:27:44', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件内容', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'content' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1171, 1, N'未使用', N'1', N'promotion_coupon_status', 0, N'primary', N'', N'优惠劵的状态 - 已领取', N'1', N'2022-11-04 00:15:08', N'1', N'2023-10-03 12:54:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1172, 2, N'已使用', N'2', N'promotion_coupon_status', 0, N'success', N'', N'优惠劵的状态 - 已使用', N'1', N'2022-11-04 00:15:21', N'1', N'2022-11-04 19:16:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1173, 3, N'已过期', N'3', N'promotion_coupon_status', 0, N'info', N'', N'优惠劵的状态 - 已过期', N'1', N'2022-11-04 00:15:43', N'1', N'2022-11-04 19:16:12', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1174, 1, N'直接领取', N'1', N'promotion_coupon_take_type', 0, N'primary', N'', N'优惠劵的领取方式 - 直接领取', N'1', N'2022-11-04 19:13:00', N'1', N'2022-11-04 19:13:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1175, 2, N'指定发放', N'2', N'promotion_coupon_take_type', 0, N'success', N'', N'优惠劵的领取方式 - 指定发放', N'1', N'2022-11-04 19:13:13', N'1', N'2022-11-04 19:14:48', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1176, 10, N'未开始', N'10', N'promotion_activity_status', 0, N'primary', N'', N'促销活动的状态枚举 - 未开始', N'1', N'2022-11-04 22:54:49', N'1', N'2022-11-04 22:55:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'文件表', -'SCHEMA', N'dbo', -'TABLE', N'infra_file_content' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1177, 20, N'进行中', N'20', N'promotion_activity_status', 0, N'success', N'', N'促销活动的状态枚举 - 进行中', N'1', N'2022-11-04 22:55:06', N'1', N'2022-11-04 22:55:20', N'0') GO - - --- ---------------------------- --- Records of infra_file_content --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1178, 30, N'已结束', N'30', N'promotion_activity_status', 0, N'info', N'', N'促销活动的状态枚举 - 已结束', N'1', N'2022-11-04 22:55:41', N'1', N'2022-11-04 22:55:41', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file_content] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1179, 40, N'已关闭', N'40', N'promotion_activity_status', 0, N'warning', N'', N'促销活动的状态枚举 - 已关闭', N'1', N'2022-11-04 22:56:10', N'1', N'2022-11-04 22:56:18', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_file_content] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1180, 10, N'满 N 元', N'10', N'promotion_condition_type', 0, N'primary', N'', N'营销的条件类型 - 满 N 元', N'1', N'2022-11-04 22:59:45', N'1', N'2022-11-04 22:59:45', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1181, 20, N'满 N 件', N'20', N'promotion_condition_type', 0, N'success', N'', N'营销的条件类型 - 满 N 件', N'1', N'2022-11-04 23:00:02', N'1', N'2022-11-04 23:00:02', N'0') GO - - --- ---------------------------- --- Table structure for infra_job --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_job]') AND type IN ('U')) - DROP TABLE [dbo].[infra_job] -GO - -CREATE TABLE [dbo].[infra_job] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [handler_name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [handler_param] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [cron_expression] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [retry_count] int NOT NULL, - [retry_interval] int NOT NULL, - [monitor_timeout] int NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1182, 10, N'申请售后', N'10', N'trade_after_sale_status', 0, N'primary', N'', N'交易售后状态 - 申请售后', N'1', N'2022-11-19 20:53:33', N'1', N'2022-11-19 20:54:42', N'0') GO - -ALTER TABLE [dbo].[infra_job] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1183, 20, N'商品待退货', N'20', N'trade_after_sale_status', 0, N'primary', N'', N'交易售后状态 - 商品待退货', N'1', N'2022-11-19 20:54:36', N'1', N'2022-11-19 20:58:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'任务编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1184, 30, N'商家待收货', N'30', N'trade_after_sale_status', 0, N'primary', N'', N'交易售后状态 - 商家待收货', N'1', N'2022-11-19 20:56:56', N'1', N'2022-11-19 20:59:20', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'任务名称', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1185, 40, N'等待退款', N'40', N'trade_after_sale_status', 0, N'primary', N'', N'交易售后状态 - 等待退款', N'1', N'2022-11-19 20:59:54', N'1', N'2022-11-19 21:00:01', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'任务状态', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'status' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1186, 50, N'退款成功', N'50', N'trade_after_sale_status', 0, N'default', N'', N'交易售后状态 - 退款成功', N'1', N'2022-11-19 21:00:33', N'1', N'2022-11-19 21:00:33', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理器的名字', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'handler_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1187, 61, N'买家取消', N'61', N'trade_after_sale_status', 0, N'info', N'', N'交易售后状态 - 买家取消', N'1', N'2022-11-19 21:01:29', N'1', N'2022-11-19 21:01:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理器的参数', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'handler_param' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1188, 62, N'商家拒绝', N'62', N'trade_after_sale_status', 0, N'info', N'', N'交易售后状态 - 商家拒绝', N'1', N'2022-11-19 21:02:17', N'1', N'2022-11-19 21:02:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'CRON 表达式', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'cron_expression' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1189, 63, N'商家拒收货', N'63', N'trade_after_sale_status', 0, N'info', N'', N'交易售后状态 - 商家拒收货', N'1', N'2022-11-19 21:02:37', N'1', N'2022-11-19 21:03:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'重试次数', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'retry_count' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1190, 10, N'售中退款', N'10', N'trade_after_sale_type', 0, N'success', N'', N'交易售后的类型 - 售中退款', N'1', N'2022-11-19 21:05:05', N'1', N'2022-11-19 21:38:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'重试间隔', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'retry_interval' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1191, 20, N'售后退款', N'20', N'trade_after_sale_type', 0, N'primary', N'', N'交易售后的类型 - 售后退款', N'1', N'2022-11-19 21:05:32', N'1', N'2022-11-19 21:38:32', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'监控超时时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'monitor_timeout' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1192, 10, N'仅退款', N'10', N'trade_after_sale_way', 0, N'primary', N'', N'交易售后的方式 - 仅退款', N'1', N'2022-11-19 21:39:19', N'1', N'2022-11-19 21:39:19', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'creator' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1193, 20, N'退货退款', N'20', N'trade_after_sale_way', 0, N'success', N'', N'交易售后的方式 - 退货退款', N'1', N'2022-11-19 21:39:38', N'1', N'2022-11-19 21:39:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'create_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1194, 10, N'微信小程序', N'10', N'terminal', 0, N'default', N'', N'终端 - 微信小程序', N'1', N'2022-12-10 10:51:11', N'1', N'2022-12-10 10:51:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'updater' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1195, 20, N'H5 网页', N'20', N'terminal', 0, N'default', N'', N'终端 - H5 网页', N'1', N'2022-12-10 10:51:30', N'1', N'2022-12-10 10:51:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'update_time' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1196, 11, N'微信公众号', N'11', N'terminal', 0, N'default', N'', N'终端 - 微信公众号', N'1', N'2022-12-10 10:54:16', N'1', N'2022-12-10 10:52:01', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_job', -'COLUMN', N'deleted' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1197, 31, N'苹果 App', N'31', N'terminal', 0, N'default', N'', N'终端 - 苹果 App', N'1', N'2022-12-10 10:54:42', N'1', N'2022-12-10 10:52:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'定时任务表', -'SCHEMA', N'dbo', -'TABLE', N'infra_job' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1198, 32, N'安卓 App', N'32', N'terminal', 0, N'default', N'', N'终端 - 安卓 App', N'1', N'2022-12-10 10:55:02', N'1', N'2022-12-10 10:59:17', N'0') GO - - --- ---------------------------- --- Records of infra_job --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1199, 0, N'普通订单', N'0', N'trade_order_type', 0, N'default', N'', N'交易订单的类型 - 普通订单', N'1', N'2022-12-10 16:34:14', N'1', N'2022-12-10 16:34:14', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_job] ON +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1200, 1, N'秒杀订单', N'1', N'trade_order_type', 0, N'default', N'', N'交易订单的类型 - 秒杀订单', N'1', N'2022-12-10 16:34:26', N'1', N'2022-12-10 16:34:26', N'0') GO - -INSERT INTO [dbo].[infra_job] ([id], [name], [status], [handler_name], [handler_param], [cron_expression], [retry_count], [retry_interval], [monitor_timeout], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'16', N'用户 Session 超时 Job', N'1', N'userSessionTimeoutJob', NULL, N'0 * * * * ? *', N'2000', N'3', N'0', N'1', N'2022-05-02 17:28:48.8850000', N'1', N'2022-05-02 17:28:49.0240000', N'0') +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1201, 2, N'拼团订单', N'2', N'trade_order_type', 0, N'default', N'', N'交易订单的类型 - 拼团订单', N'1', N'2022-12-10 16:34:36', N'1', N'2022-12-10 16:34:36', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_job] OFF +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1202, 3, N'砍价订单', N'3', N'trade_order_type', 0, N'default', N'', N'交易订单的类型 - 砍价订单', N'1', N'2022-12-10 16:34:48', N'1', N'2022-12-10 16:34:48', N'0') GO - -COMMIT +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1203, 0, N'待支付', N'0', N'trade_order_status', 0, N'default', N'', N'交易订单状态 - 待支付', N'1', N'2022-12-10 16:49:29', N'1', N'2022-12-10 16:49:29', N'0') GO - - --- ---------------------------- --- Table structure for infra_job_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_job_log]') AND type IN ('U')) - DROP TABLE [dbo].[infra_job_log] -GO - -CREATE TABLE [dbo].[infra_job_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [job_id] bigint NOT NULL, - [handler_name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [handler_param] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [execute_index] tinyint NOT NULL, - [begin_time] datetime2(7) NOT NULL, - [end_time] datetime2(7) NULL, - [duration] int NULL, - [status] tinyint NOT NULL, - [result] nvarchar(4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1204, 10, N'待发货', N'10', N'trade_order_status', 0, N'primary', N'', N'交易订单状态 - 待发货', N'1', N'2022-12-10 16:49:53', N'1', N'2022-12-10 16:51:17', N'0') GO - -ALTER TABLE [dbo].[infra_job_log] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1205, 20, N'已发货', N'20', N'trade_order_status', 0, N'primary', N'', N'交易订单状态 - 已发货', N'1', N'2022-12-10 16:50:13', N'1', N'2022-12-10 16:51:31', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'日志编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1206, 30, N'已完成', N'30', N'trade_order_status', 0, N'success', N'', N'交易订单状态 - 已完成', N'1', N'2022-12-10 16:50:30', N'1', N'2022-12-10 16:51:06', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'任务编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'job_id' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1207, 40, N'已取消', N'40', N'trade_order_status', 0, N'danger', N'', N'交易订单状态 - 已取消', N'1', N'2022-12-10 16:50:50', N'1', N'2022-12-10 16:51:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'处理器的名字', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'handler_name' +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1208, 0, N'未售后', N'0', N'trade_order_item_after_sale_status', 0, N'info', N'', N'交易订单项的售后状态 - 未售后', N'1', N'2022-12-10 20:58:42', N'1', N'2022-12-10 20:59:29', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1209, 1, N'售后中', N'1', N'trade_order_item_after_sale_status', 0, N'primary', N'', N'交易订单项的售后状态 - 售后中', N'1', N'2022-12-10 20:59:21', N'1', N'2022-12-10 20:59:21', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1210, 2, N'已退款', N'2', N'trade_order_item_after_sale_status', 0, N'success', N'', N'交易订单项的售后状态 - 已退款', N'1', N'2022-12-10 20:59:46', N'1', N'2022-12-10 20:59:46', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1211, 1, N'完全匹配', N'1', N'mp_auto_reply_request_match', 0, N'primary', N'', N'公众号自动回复的请求关键字匹配模式 - 完全匹配', N'1', N'2023-01-16 23:30:39', N'1', N'2023-01-16 23:31:00', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1212, 2, N'半匹配', N'2', N'mp_auto_reply_request_match', 0, N'success', N'', N'公众号自动回复的请求关键字匹配模式 - 半匹配', N'1', N'2023-01-16 23:30:55', N'1', N'2023-01-16 23:31:10', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1213, 1, N'文本', N'text', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 文本', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 22:17:39', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1214, 2, N'图片', N'image', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 图片', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:19:47', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1215, 3, N'语音', N'voice', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 语音', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:20:08', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1216, 4, N'视频', N'video', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 视频', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:21:08', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1217, 5, N'小视频', N'shortvideo', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 小视频', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:19:59', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1218, 6, N'图文', N'news', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 图文', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:22:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1219, 7, N'音乐', N'music', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 音乐', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:22:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1220, 8, N'地理位置', N'location', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 地理位置', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:23:51', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1221, 9, N'链接', N'link', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 链接', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:24:49', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1222, 10, N'事件', N'event', N'mp_message_type', 0, N'default', N'', N'公众号的消息类型 - 事件', N'1', N'2023-01-17 22:17:32', N'1', N'2023-01-17 14:24:49', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1223, 0, N'初始化', N'0', N'system_mail_send_status', 0, N'primary', N'', N'邮件发送状态 - 初始化\n', N'1', N'2023-01-26 09:53:49', N'1', N'2023-01-26 16:36:14', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1224, 10, N'发送成功', N'10', N'system_mail_send_status', 0, N'success', N'', N'邮件发送状态 - 发送成功', N'1', N'2023-01-26 09:54:28', N'1', N'2023-01-26 16:36:22', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1225, 20, N'发送失败', N'20', N'system_mail_send_status', 0, N'danger', N'', N'邮件发送状态 - 发送失败', N'1', N'2023-01-26 09:54:50', N'1', N'2023-01-26 16:36:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1226, 30, N'不发送', N'30', N'system_mail_send_status', 0, N'info', N'', N'邮件发送状态 - 不发送', N'1', N'2023-01-26 09:55:06', N'1', N'2023-01-26 16:36:36', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1227, 1, N'通知公告', N'1', N'system_notify_template_type', 0, N'primary', N'', N'站内信模版的类型 - 通知公告', N'1', N'2023-01-28 10:35:59', N'1', N'2023-01-28 10:35:59', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1228, 2, N'系统消息', N'2', N'system_notify_template_type', 0, N'success', N'', N'站内信模版的类型 - 系统消息', N'1', N'2023-01-28 10:36:20', N'1', N'2023-01-28 10:36:25', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1230, 13, N'支付宝条码支付', N'alipay_bar', N'pay_channel_code', 0, N'primary', N'', N'支付宝条码支付', N'1', N'2023-02-18 23:32:24', N'1', N'2023-07-19 20:09:23', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1231, 10, N'Vue2 Element UI 标准模版', N'10', N'infra_codegen_front_type', 0, N'', N'', N'', N'1', N'2023-04-13 00:03:55', N'1', N'2023-04-13 00:03:55', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, N'Vue3 Element Plus 标准模版', N'20', N'infra_codegen_front_type', 0, N'', N'', N'', N'1', N'2023-04-13 00:04:08', N'1', N'2023-04-13 00:04:08', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, N'Vue3 Element Plus Schema 模版', N'21', N'infra_codegen_front_type', 0, N'', N'', N'', N'1', N'2023-04-13 00:04:26', N'1', N'2023-04-13 00:04:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, N'Vue3 vben 模版', N'30', N'infra_codegen_front_type', 0, N'', N'', N'', N'1', N'2023-04-13 00:04:26', N'1', N'2023-04-13 00:04:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, N'按件', N'1', N'trade_delivery_express_charge_mode', 0, N'', N'', N'', N'1', N'2023-05-21 22:46:40', N'1', N'2023-05-21 22:46:40', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, N'按重量', N'2', N'trade_delivery_express_charge_mode', 0, N'', N'', N'', N'1', N'2023-05-21 22:46:58', N'1', N'2023-05-21 22:46:58', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, N'按体积', N'3', N'trade_delivery_express_charge_mode', 0, N'', N'', N'', N'1', N'2023-05-21 22:47:18', N'1', N'2023-05-21 22:47:18', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1335, 11, N'订单积分抵扣', N'11', N'member_point_biz_type', 0, N'', N'', N'', N'1', N'2023-06-10 12:15:27', N'1', N'2023-10-11 07:41:43', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1336, 1, N'签到', N'1', N'member_point_biz_type', 0, N'', N'', N'', N'1', N'2023-06-10 12:15:48', N'1', N'2023-08-20 11:59:53', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1341, 20, N'已退款', N'20', N'pay_order_status', 0, N'danger', N'', N'已退款', N'1', N'2023-07-19 18:05:37', N'1', N'2023-07-19 18:05:37', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1342, 21, N'请求成功,但是结果失败', N'21', N'pay_notify_status', 0, N'warning', N'', N'请求成功,但是结果失败', N'1', N'2023-07-19 18:10:47', N'1', N'2023-07-19 18:11:38', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1343, 22, N'请求失败', N'22', N'pay_notify_status', 0, N'warning', N'', NULL, N'1', N'2023-07-19 18:11:05', N'1', N'2023-07-19 18:11:27', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1344, 4, N'微信扫码支付', N'wx_native', N'pay_channel_code', 0, N'success', N'', N'微信扫码支付', N'1', N'2023-07-19 20:07:47', N'1', N'2023-07-19 20:09:03', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1345, 5, N'微信条码支付', N'wx_bar', N'pay_channel_code', 0, N'success', N'', N'微信条码支付\n', N'1', N'2023-07-19 20:08:06', N'1', N'2023-07-19 20:09:08', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1346, 1, N'支付单', N'1', N'pay_notify_type', 0, N'primary', N'', N'支付单', N'1', N'2023-07-20 12:23:17', N'1', N'2023-07-20 12:23:17', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1347, 2, N'退款单', N'2', N'pay_notify_type', 0, N'danger', N'', NULL, N'1', N'2023-07-20 12:23:26', N'1', N'2023-07-20 12:23:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1348, 20, N'模拟支付', N'mock', N'pay_channel_code', 0, N'default', N'', N'模拟支付', N'1', N'2023-07-29 11:10:51', N'1', N'2023-07-29 03:14:10', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1349, 12, N'订单积分抵扣(整单取消)', N'12', N'member_point_biz_type', 0, N'', N'', N'', N'1', N'2023-08-20 12:00:03', N'1', N'2023-10-11 07:42:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1350, 0, N'管理员调整', N'0', N'member_experience_biz_type', 0, N'', N'', NULL, N'', N'2023-08-22 12:41:01', N'', N'2023-08-22 12:41:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1351, 1, N'邀新奖励', N'1', N'member_experience_biz_type', 0, N'', N'', NULL, N'', N'2023-08-22 12:41:01', N'', N'2023-08-22 12:41:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1352, 11, N'下单奖励', N'11', N'member_experience_biz_type', 0, N'success', N'', NULL, N'', N'2023-08-22 12:41:01', N'1', N'2023-10-11 07:45:09', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1353, 12, N'下单奖励(整单取消)', N'12', N'member_experience_biz_type', 0, N'warning', N'', NULL, N'', N'2023-08-22 12:41:01', N'1', N'2023-10-11 07:45:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1354, 4, N'签到奖励', N'4', N'member_experience_biz_type', 0, N'', N'', NULL, N'', N'2023-08-22 12:41:01', N'', N'2023-08-22 12:41:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1355, 5, N'抽奖奖励', N'5', N'member_experience_biz_type', 0, N'', N'', NULL, N'', N'2023-08-22 12:41:01', N'', N'2023-08-22 12:41:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1356, 1, N'快递发货', N'1', N'trade_delivery_type', 0, N'', N'', N'', N'1', N'2023-08-23 00:04:55', N'1', N'2023-08-23 00:04:55', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1357, 2, N'用户自提', N'2', N'trade_delivery_type', 0, N'', N'', N'', N'1', N'2023-08-23 00:05:05', N'1', N'2023-08-23 00:05:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1358, 3, N'品类劵', N'3', N'promotion_product_scope', 0, N'default', N'', N'', N'1', N'2023-09-01 23:43:07', N'1', N'2023-09-28 00:27:47', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1359, 1, N'人人分销', N'1', N'brokerage_enabled_condition', 0, N'', N'', N'所有用户都可以分销', N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1360, 2, N'指定分销', N'2', N'brokerage_enabled_condition', 0, N'', N'', N'仅可后台手动设置推广员', N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1361, 1, N'首次绑定', N'1', N'brokerage_bind_mode', 0, N'', N'', N'只要用户没有推广人,随时都可以绑定推广关系', N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1362, 2, N'注册绑定', N'2', N'brokerage_bind_mode', 0, N'', N'', N'仅新用户注册时才能绑定推广关系', N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1363, 3, N'覆盖绑定', N'3', N'brokerage_bind_mode', 0, N'', N'', N'如果用户已经有推广人,推广人会被变更', N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1364, 1, N'钱包', N'1', N'brokerage_withdraw_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1365, 2, N'银行卡', N'2', N'brokerage_withdraw_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1366, 3, N'微信', N'3', N'brokerage_withdraw_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1367, 4, N'支付宝', N'4', N'brokerage_withdraw_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1368, 1, N'订单返佣', N'1', N'brokerage_record_biz_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1369, 2, N'申请提现', N'2', N'brokerage_record_biz_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1370, 3, N'申请提现驳回', N'3', N'brokerage_record_biz_type', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1371, 0, N'待结算', N'0', N'brokerage_record_status', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1372, 1, N'已结算', N'1', N'brokerage_record_status', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1373, 2, N'已取消', N'2', N'brokerage_record_status', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1374, 0, N'审核中', N'0', N'brokerage_withdraw_status', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1375, 10, N'审核通过', N'10', N'brokerage_withdraw_status', 0, N'success', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1376, 11, N'提现成功', N'11', N'brokerage_withdraw_status', 0, N'success', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1377, 20, N'审核不通过', N'20', N'brokerage_withdraw_status', 0, N'danger', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1378, 21, N'提现失败', N'21', N'brokerage_withdraw_status', 0, N'danger', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1379, 0, N'工商银行', N'0', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1380, 1, N'建设银行', N'1', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1381, 2, N'农业银行', N'2', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1382, 3, N'中国银行', N'3', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1383, 4, N'交通银行', N'4', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1384, 5, N'招商银行', N'5', N'brokerage_bank_name', 0, N'', N'', NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1385, 21, N'钱包', N'wallet', N'pay_channel_code', 0, N'primary', N'', N'', N'1', N'2023-10-01 21:46:19', N'1', N'2023-10-01 21:48:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1386, 1, N'砍价中', N'1', N'promotion_bargain_record_status', 0, N'default', N'', N'', N'1', N'2023-10-05 10:41:26', N'1', N'2023-10-05 10:41:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1387, 2, N'砍价成功', N'2', N'promotion_bargain_record_status', 0, N'success', N'', N'', N'1', N'2023-10-05 10:41:39', N'1', N'2023-10-05 10:41:39', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1388, 3, N'砍价失败', N'3', N'promotion_bargain_record_status', 0, N'warning', N'', N'', N'1', N'2023-10-05 10:41:57', N'1', N'2023-10-05 10:41:57', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1389, 1, N'拼团中', N'1', N'promotion_combination_record_status', 0, N'', N'', N'', N'1', N'2023-10-08 07:24:44', N'1', N'2023-10-08 07:24:44', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1390, 2, N'拼团成功', N'2', N'promotion_combination_record_status', 0, N'success', N'', N'', N'1', N'2023-10-08 07:24:56', N'1', N'2023-10-08 07:24:56', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1391, 3, N'拼团失败', N'3', N'promotion_combination_record_status', 0, N'warning', N'', N'', N'1', N'2023-10-08 07:25:11', N'1', N'2023-10-08 07:25:11', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1392, 2, N'管理员修改', N'2', N'member_point_biz_type', 0, N'default', N'', N'', N'1', N'2023-10-11 07:41:34', N'1', N'2023-10-11 07:41:34', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1393, 13, N'订单积分抵扣(单个退款)', N'13', N'member_point_biz_type', 0, N'', N'', N'', N'1', N'2023-10-11 07:42:29', N'1', N'2023-10-11 07:42:29', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1394, 21, N'订单积分奖励', N'21', N'member_point_biz_type', 0, N'default', N'', N'', N'1', N'2023-10-11 07:42:44', N'1', N'2023-10-11 07:42:44', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1395, 22, N'订单积分奖励(整单取消)', N'22', N'member_point_biz_type', 0, N'default', N'', N'', N'1', N'2023-10-11 07:42:55', N'1', N'2023-10-11 07:43:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1396, 23, N'订单积分奖励(单个退款)', N'23', N'member_point_biz_type', 0, N'default', N'', N'', N'1', N'2023-10-11 07:43:16', N'1', N'2023-10-11 07:43:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1397, 13, N'下单奖励(单个退款)', N'13', N'member_experience_biz_type', 0, N'warning', N'', N'', N'1', N'2023-10-11 07:45:24', N'1', N'2023-10-11 07:45:38', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1398, 5, N'网上转账', N'5', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:55:24', N'1', N'2023-10-18 21:55:24', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1399, 6, N'支付宝', N'6', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:55:38', N'1', N'2023-10-18 21:55:38', N'0') GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1400, 7, N'微信支付', N'7', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:55:53', N'1', N'2023-10-18 21:55:53', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1401, 8, N'其他', N'8', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:56:06', N'1', N'2023-10-18 21:56:06', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1402, 1, N'IT', N'1', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:02:15', N'1', N'2024-02-18 23:30:38', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1403, 2, N'金融业', N'2', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:02:29', N'1', N'2024-02-18 23:30:43', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1404, 3, N'房地产', N'3', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:02:41', N'1', N'2024-02-18 23:30:48', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1405, 4, N'商业服务', N'4', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:02:54', N'1', N'2024-02-18 23:30:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1406, 5, N'运输/物流', N'5', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:03:03', N'1', N'2024-02-18 23:31:00', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1407, 6, N'生产', N'6', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:03:13', N'1', N'2024-02-18 23:31:08', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1408, 7, N'政府', N'7', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:03:27', N'1', N'2024-02-18 23:31:13', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1409, 8, N'文化传媒', N'8', N'crm_customer_industry', 0, N'default', N'', N'', N'1', N'2023-10-28 23:03:37', N'1', N'2024-02-18 23:31:20', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1422, 1, N'A (重点客户)', N'1', N'crm_customer_level', 0, N'primary', N'', N'', N'1', N'2023-10-28 23:07:13', N'1', N'2023-10-28 23:07:13', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1423, 2, N'B (普通客户)', N'2', N'crm_customer_level', 0, N'info', N'', N'', N'1', N'2023-10-28 23:07:35', N'1', N'2023-10-28 23:07:35', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1424, 3, N'C (非优先客户)', N'3', N'crm_customer_level', 0, N'default', N'', N'', N'1', N'2023-10-28 23:07:53', N'1', N'2023-10-28 23:07:53', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1425, 1, N'促销', N'1', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:08:29', N'1', N'2023-10-28 23:08:29', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1426, 2, N'搜索引擎', N'2', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:08:39', N'1', N'2023-10-28 23:08:39', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1427, 3, N'广告', N'3', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:08:47', N'1', N'2023-10-28 23:08:47', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1428, 4, N'转介绍', N'4', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:08:58', N'1', N'2023-10-28 23:08:58', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1429, 5, N'线上注册', N'5', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:09:12', N'1', N'2023-10-28 23:09:12', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1430, 6, N'线上咨询', N'6', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:09:22', N'1', N'2023-10-28 23:09:22', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1431, 7, N'预约上门', N'7', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:09:39', N'1', N'2023-10-28 23:09:39', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1432, 8, N'陌拜', N'8', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:10:04', N'1', N'2023-10-28 23:10:04', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1433, 9, N'电话咨询', N'9', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:10:18', N'1', N'2023-10-28 23:10:18', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1434, 10, N'邮件咨询', N'10', N'crm_customer_source', 0, N'default', N'', N'', N'1', N'2023-10-28 23:10:33', N'1', N'2023-10-28 23:10:33', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1435, 10, N'Gitee', N'10', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:04:42', N'1', N'2023-11-04 13:04:42', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1436, 20, N'钉钉', N'20', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:04:54', N'1', N'2023-11-04 13:04:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1437, 30, N'企业微信', N'30', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:05:09', N'1', N'2023-11-04 13:05:09', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1438, 31, N'微信公众平台', N'31', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:05:18', N'1', N'2023-11-04 13:05:18', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1439, 32, N'微信开放平台', N'32', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:05:30', N'1', N'2023-11-04 13:05:30', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1440, 34, N'微信小程序', N'34', N'system_social_type', 0, N'', N'', N'', N'1', N'2023-11-04 13:05:38', N'1', N'2023-11-04 13:07:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1441, 1, N'上架', N'1', N'crm_product_status', 0, N'success', N'', N'', N'1', N'2023-10-30 21:49:34', N'1', N'2023-10-30 21:49:34', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1442, 0, N'下架', N'0', N'crm_product_status', 0, N'success', N'', N'', N'1', N'2023-10-30 21:49:13', N'1', N'2023-10-30 21:49:13', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1443, 15, N'子表', N'15', N'infra_codegen_template_type', 0, N'default', N'', N'', N'1', N'2023-11-13 23:06:16', N'1', N'2023-11-13 23:06:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1444, 10, N'主表(标准模式)', N'10', N'infra_codegen_template_type', 0, N'default', N'', N'', N'1', N'2023-11-14 12:32:49', N'1', N'2023-11-14 12:32:49', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1445, 11, N'主表(ERP 模式)', N'11', N'infra_codegen_template_type', 0, N'default', N'', N'', N'1', N'2023-11-14 12:33:05', N'1', N'2023-11-14 12:33:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1446, 12, N'主表(内嵌模式)', N'12', N'infra_codegen_template_type', 0, N'', N'', N'', N'1', N'2023-11-14 12:33:31', N'1', N'2023-11-14 12:33:31', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1447, 1, N'负责人', N'1', N'crm_permission_level', 0, N'default', N'', N'', N'1', N'2023-11-30 09:53:12', N'1', N'2023-11-30 09:53:12', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1448, 2, N'只读', N'2', N'crm_permission_level', 0, N'', N'', N'', N'1', N'2023-11-30 09:53:29', N'1', N'2023-11-30 09:53:29', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1449, 3, N'读写', N'3', N'crm_permission_level', 0, N'', N'', N'', N'1', N'2023-11-30 09:53:36', N'1', N'2023-11-30 09:53:36', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1450, 0, N'未提交', N'0', N'crm_audit_status', 0, N'', N'', N'', N'1', N'2023-11-30 18:56:59', N'1', N'2023-11-30 18:56:59', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1451, 10, N'审批中', N'10', N'crm_audit_status', 0, N'', N'', N'', N'1', N'2023-11-30 18:57:10', N'1', N'2023-11-30 18:57:10', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1452, 20, N'审核通过', N'20', N'crm_audit_status', 0, N'', N'', N'', N'1', N'2023-11-30 18:57:24', N'1', N'2023-11-30 18:57:24', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1453, 30, N'审核不通过', N'30', N'crm_audit_status', 0, N'', N'', N'', N'1', N'2023-11-30 18:57:32', N'1', N'2023-11-30 18:57:32', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1454, 40, N'已取消', N'40', N'crm_audit_status', 0, N'', N'', N'', N'1', N'2023-11-30 18:57:42', N'1', N'2023-11-30 18:57:42', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1456, 1, N'支票', N'1', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:54:29', N'1', N'2023-10-18 21:54:29', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1457, 2, N'现金', N'2', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:54:41', N'1', N'2023-10-18 21:54:41', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1458, 3, N'邮政汇款', N'3', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:54:53', N'1', N'2023-10-18 21:54:53', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1459, 4, N'电汇', N'4', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:55:07', N'1', N'2023-10-18 21:55:07', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1460, 5, N'网上转账', N'5', N'crm_receivable_return_type', 0, N'default', N'', N'', N'1', N'2023-10-18 21:55:24', N'1', N'2023-10-18 21:55:24', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1461, 1, N'个', N'1', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:02:26', N'1', N'2023-12-05 23:02:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1462, 2, N'块', N'2', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:02:34', N'1', N'2023-12-05 23:02:34', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1463, 3, N'只', N'3', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:02:57', N'1', N'2023-12-05 23:02:57', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1464, 4, N'把', N'4', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:05', N'1', N'2023-12-05 23:03:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1465, 5, N'枚', N'5', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:14', N'1', N'2023-12-05 23:03:14', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1466, 6, N'瓶', N'6', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:20', N'1', N'2023-12-05 23:03:20', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1467, 7, N'盒', N'7', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:30', N'1', N'2023-12-05 23:03:30', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1468, 8, N'台', N'8', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:41', N'1', N'2023-12-05 23:03:41', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1469, 9, N'吨', N'9', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:03:48', N'1', N'2023-12-05 23:03:48', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1470, 10, N'千克', N'10', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:04:03', N'1', N'2023-12-05 23:04:03', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1471, 11, N'米', N'11', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:04:12', N'1', N'2023-12-05 23:04:12', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1472, 12, N'箱', N'12', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:04:25', N'1', N'2023-12-05 23:04:25', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1473, 13, N'套', N'13', N'crm_product_unit', 0, N'', N'', N'', N'1', N'2023-12-05 23:04:34', N'1', N'2023-12-05 23:04:34', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1474, 1, N'打电话', N'1', N'crm_follow_up_type', 0, N'', N'', N'', N'1', N'2024-01-15 20:48:20', N'1', N'2024-01-15 20:48:20', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1475, 2, N'发短信', N'2', N'crm_follow_up_type', 0, N'', N'', N'', N'1', N'2024-01-15 20:48:31', N'1', N'2024-01-15 20:48:31', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1476, 3, N'上门拜访', N'3', N'crm_follow_up_type', 0, N'', N'', N'', N'1', N'2024-01-15 20:49:07', N'1', N'2024-01-15 20:49:07', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1477, 4, N'微信沟通', N'4', N'crm_follow_up_type', 0, N'', N'', N'', N'1', N'2024-01-15 20:49:15', N'1', N'2024-01-15 20:49:15', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1478, 4, N'钱包余额', N'4', N'pay_transfer_type', 0, N'info', N'', N'', N'1', N'2023-10-28 16:28:37', N'1', N'2023-10-28 16:28:37', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1479, 3, N'银行卡', N'3', N'pay_transfer_type', 0, N'default', N'', N'', N'1', N'2023-10-28 16:28:21', N'1', N'2023-10-28 16:28:21', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1480, 2, N'微信余额', N'2', N'pay_transfer_type', 0, N'info', N'', N'', N'1', N'2023-10-28 16:28:07', N'1', N'2023-10-28 16:28:07', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1481, 1, N'支付宝余额', N'1', N'pay_transfer_type', 0, N'default', N'', N'', N'1', N'2023-10-28 16:27:44', N'1', N'2023-10-28 16:27:44', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1482, 4, N'转账失败', N'30', N'pay_transfer_status', 0, N'warning', N'', N'', N'1', N'2023-10-28 16:24:16', N'1', N'2023-10-28 16:24:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1483, 3, N'转账成功', N'20', N'pay_transfer_status', 0, N'success', N'', N'', N'1', N'2023-10-28 16:23:50', N'1', N'2023-10-28 16:23:50', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1484, 2, N'转账进行中', N'10', N'pay_transfer_status', 0, N'info', N'', N'', N'1', N'2023-10-28 16:23:12', N'1', N'2023-10-28 16:23:12', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1485, 1, N'等待转账', N'0', N'pay_transfer_status', 0, N'default', N'', N'', N'1', N'2023-10-28 16:21:43', N'1', N'2023-10-28 16:23:22', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1486, 10, N'其它入库', N'10', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-05 18:07:25', N'1', N'2024-02-05 18:07:43', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1487, 11, N'其它入库(作废)', N'11', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-05 18:08:07', N'1', N'2024-02-05 19:20:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1488, 20, N'其它出库', N'20', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-05 18:08:51', N'1', N'2024-02-05 18:08:51', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1489, 21, N'其它出库(作废)', N'21', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-05 18:09:00', N'1', N'2024-02-05 19:20:10', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1490, 10, N'未审核', N'10', N'erp_audit_status', 0, N'default', N'', N'', N'1', N'2024-02-06 00:00:21', N'1', N'2024-02-06 00:00:21', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1491, 20, N'已审核', N'20', N'erp_audit_status', 0, N'success', N'', N'', N'1', N'2024-02-06 00:00:35', N'1', N'2024-02-06 00:00:35', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1492, 30, N'调拨入库', N'30', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-07 20:34:19', N'1', N'2024-02-07 12:36:31', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1493, 31, N'调拨入库(作废)', N'31', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-07 20:34:29', N'1', N'2024-02-07 20:37:11', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1494, 32, N'调拨出库', N'32', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-07 20:34:38', N'1', N'2024-02-07 12:36:33', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1495, 33, N'调拨出库(作废)', N'33', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-07 20:34:49', N'1', N'2024-02-07 20:37:06', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1496, 40, N'盘盈入库', N'40', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-08 08:53:00', N'1', N'2024-02-08 08:53:09', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1497, 41, N'盘盈入库(作废)', N'41', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-08 08:53:39', N'1', N'2024-02-16 19:40:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1498, 42, N'盘亏出库', N'42', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-08 08:54:16', N'1', N'2024-02-08 08:54:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1499, 43, N'盘亏出库(作废)', N'43', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-08 08:54:31', N'1', N'2024-02-16 19:40:46', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1500, 50, N'销售出库', N'50', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-11 21:47:25', N'1', N'2024-02-11 21:50:40', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1501, 51, N'销售出库(作废)', N'51', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-11 21:47:37', N'1', N'2024-02-11 21:51:12', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1502, 60, N'销售退货入库', N'60', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-12 06:51:05', N'1', N'2024-02-12 06:51:05', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1503, 61, N'销售退货入库(作废)', N'61', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-12 06:51:18', N'1', N'2024-02-12 06:51:18', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1504, 70, N'采购入库', N'70', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-16 13:10:02', N'1', N'2024-02-16 13:10:02', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1505, 71, N'采购入库(作废)', N'71', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-16 13:10:10', N'1', N'2024-02-16 19:40:40', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1506, 80, N'采购退货出库', N'80', N'erp_stock_record_biz_type', 0, N'', N'', N'', N'1', N'2024-02-16 13:10:17', N'1', N'2024-02-16 13:10:17', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1507, 81, N'采购退货出库(作废)', N'81', N'erp_stock_record_biz_type', 0, N'danger', N'', N'', N'1', N'2024-02-16 13:10:26', N'1', N'2024-02-16 19:40:33', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1509, 3, N'审批不通过', N'3', N'bpm_process_instance_status', 0, N'danger', N'', N'', N'1', N'2024-03-16 16:12:06', N'1', N'2024-03-16 16:12:06', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1510, 4, N'已取消', N'4', N'bpm_process_instance_status', 0, N'warning', N'', N'', N'1', N'2024-03-16 16:12:22', N'1', N'2024-03-16 16:12:22', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1511, 5, N'已退回', N'5', N'bpm_task_status', 0, N'warning', N'', N'', N'1', N'2024-03-16 19:10:46', N'1', N'2024-03-08 22:41:40', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1512, 6, N'委派中', N'6', N'bpm_task_status', 0, N'primary', N'', N'', N'1', N'2024-03-17 10:06:22', N'1', N'2024-03-08 22:41:40', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1513, 7, N'审批通过中', N'7', N'bpm_task_status', 0, N'success', N'', N'', N'1', N'2024-03-17 10:06:47', N'1', N'2024-03-08 22:41:41', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1514, 0, N'待审批', N'0', N'bpm_task_status', 0, N'info', N'', N'', N'1', N'2024-03-17 10:07:11', N'1', N'2024-03-08 22:41:42', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1515, 35, N'发起人自选', N'35', N'bpm_task_candidate_strategy', 0, N'', N'', N'', N'1', N'2024-03-22 19:45:16', N'1', N'2024-03-22 19:45:16', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1516, 1, N'执行监听器', N'execution', N'bpm_process_listener_type', 0, N'primary', N'', N'', N'1', N'2024-03-23 12:54:03', N'1', N'2024-03-23 19:14:19', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1517, 1, N'任务监听器', N'task', N'bpm_process_listener_type', 0, N'success', N'', N'', N'1', N'2024-03-23 12:54:13', N'1', N'2024-03-23 19:14:24', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1526, 1, N'Java 类', N'class', N'bpm_process_listener_value_type', 0, N'primary', N'', N'', N'1', N'2024-03-23 15:08:45', N'1', N'2024-03-23 19:14:32', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1527, 2, N'表达式', N'expression', N'bpm_process_listener_value_type', 0, N'success', N'', N'', N'1', N'2024-03-23 15:09:06', N'1', N'2024-03-23 19:14:38', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1528, 3, N'代理表达式', N'delegateExpression', N'bpm_process_listener_value_type', 0, N'info', N'', N'', N'1', N'2024-03-23 15:11:23', N'1', N'2024-03-23 19:14:41', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1529, 1, N'天', N'1', N'date_interval', 0, N'', N'', N'', N'1', N'2024-03-29 22:50:26', N'1', N'2024-03-29 22:50:26', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1530, 2, N'周', N'2', N'date_interval', 0, N'', N'', N'', N'1', N'2024-03-29 22:50:36', N'1', N'2024-03-29 22:50:36', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1531, 3, N'月', N'3', N'date_interval', 0, N'', N'', N'', N'1', N'2024-03-29 22:50:46', N'1', N'2024-03-29 22:50:54', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1532, 4, N'季度', N'4', N'date_interval', 0, N'', N'', N'', N'1', N'2024-03-29 22:51:01', N'1', N'2024-03-29 22:51:01', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1533, 5, N'年', N'5', N'date_interval', 0, N'', N'', N'', N'1', N'2024-03-29 22:51:07', N'1', N'2024-03-29 22:51:07', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1534, 1, N'赢单', N'1', N'crm_business_end_status_type', 0, N'success', N'', N'', N'1', N'2024-04-13 23:26:57', N'1', N'2024-04-13 23:26:57', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1535, 2, N'输单', N'2', N'crm_business_end_status_type', 0, N'primary', N'', N'', N'1', N'2024-04-13 23:27:31', N'1', N'2024-04-13 23:27:31', N'0') +GO +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1536, 3, N'无效', N'3', N'crm_business_end_status_type', 0, N'info', N'', N'', N'1', N'2024-04-13 23:27:59', N'1', N'2024-04-13 23:27:59', N'0') +GO +SET IDENTITY_INSERT system_dict_data OFF +GO +COMMIT +GO +-- @formatter:on -EXEC sp_addextendedproperty -'MS_Description', N'处理器的参数', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'handler_param' +-- ---------------------------- +-- Table structure for system_dict_type +-- ---------------------------- +DROP TABLE IF EXISTS system_dict_type; +CREATE TABLE system_dict_type +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(100) DEFAULT '' NOT NULL, + type nvarchar(100) DEFAULT '' NOT NULL, + status tinyint DEFAULT 0 NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + deleted_time datetime2 DEFAULT NULL NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'第几次执行', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'execute_index' + 'MS_Description', N'字典主键', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'开始执行时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'begin_time' + 'MS_Description', N'字典名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'结束执行时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'end_time' + 'MS_Description', N'字典类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'type' GO EXEC sp_addextendedproperty -'MS_Description', N'执行时长', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'duration' + 'MS_Description', N'状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'任务状态', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'status' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'结果数据', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'result' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'creator' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'create_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'updater' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'update_time' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log', -'COLUMN', N'deleted' + 'MS_Description', N'删除时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type', + 'COLUMN', N'deleted_time' GO EXEC sp_addextendedproperty -'MS_Description', N'定时任务日志表', -'SCHEMA', N'dbo', -'TABLE', N'infra_job_log' + 'MS_Description', N'字典类型表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_dict_type' GO - -- ---------------------------- --- Records of infra_job_log +-- Records of system_dict_type -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[infra_job_log] ON +SET IDENTITY_INSERT system_dict_type ON +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, N'用户性别', N'system_user_sex', 0, NULL, N'admin', N'2021-01-05 17:03:48', N'1', N'2022-05-16 20:29:32', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, N'参数类型', N'infra_config_type', 0, NULL, N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:36:54', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (7, N'通知类型', N'system_notice_type', 0, NULL, N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:35:26', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (9, N'操作类型', N'infra_operate_type', 0, NULL, N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-14 12:44:01', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (10, N'系统状态', N'common_status', 0, NULL, N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-01 16:21:28', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (11, N'Boolean 是否类型', N'infra_boolean_string', 0, N'boolean 转是否', N'', N'2021-01-19 03:20:08', N'', N'2022-02-01 16:37:10', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (104, N'登陆结果', N'system_login_result', 0, N'登陆结果', N'', N'2021-01-18 06:17:11', N'', N'2022-02-01 16:36:00', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (106, N'代码生成模板类型', N'infra_codegen_template_type', 0, NULL, N'', N'2021-02-05 07:08:06', N'1', N'2022-05-16 20:26:50', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (107, N'定时任务状态', N'infra_job_status', 0, NULL, N'', N'2021-02-07 07:44:16', N'', N'2022-02-01 16:51:11', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (108, N'定时任务日志状态', N'infra_job_log_status', 0, NULL, N'', N'2021-02-08 10:03:51', N'', N'2022-02-01 16:50:43', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (109, N'用户类型', N'user_type', 0, NULL, N'', N'2021-02-26 00:15:51', N'', N'2021-02-26 00:15:51', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (110, N'API 异常数据的处理状态', N'infra_api_error_log_process_status', 0, NULL, N'', N'2021-02-26 07:07:01', N'', N'2022-02-01 16:50:53', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (111, N'短信渠道编码', N'system_sms_channel_code', 0, NULL, N'1', N'2021-04-05 01:04:50', N'1', N'2022-02-16 02:09:08', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (112, N'短信模板的类型', N'system_sms_template_type', 0, NULL, N'1', N'2021-04-05 21:50:43', N'1', N'2022-02-01 16:35:06', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (113, N'短信发送状态', N'system_sms_send_status', 0, NULL, N'1', N'2021-04-11 20:18:03', N'1', N'2022-02-01 16:35:09', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (114, N'短信接收状态', N'system_sms_receive_status', 0, NULL, N'1', N'2021-04-11 20:27:14', N'1', N'2022-02-01 16:35:14', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (116, N'登陆日志的类型', N'system_login_type', 0, N'登陆日志的类型', N'1', N'2021-10-06 00:50:46', N'1', N'2022-02-01 16:35:56', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (117, N'OA 请假类型', N'bpm_oa_leave_type', 0, NULL, N'1', N'2021-09-21 22:34:33', N'1', N'2022-01-22 10:41:37', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (130, N'支付渠道编码类型', N'pay_channel_code', 0, N'支付渠道的编码', N'1', N'2021-12-03 10:35:08', N'1', N'2023-07-10 10:11:39', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (131, N'支付回调状态', N'pay_notify_status', 0, N'支付回调状态(包括退款回调)', N'1', N'2021-12-03 10:53:29', N'1', N'2023-07-19 18:09:43', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (132, N'支付订单状态', N'pay_order_status', 0, N'支付订单状态', N'1', N'2021-12-03 11:17:50', N'1', N'2021-12-03 11:17:50', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (134, N'退款订单状态', N'pay_refund_status', 0, N'退款订单状态', N'1', N'2021-12-10 16:42:50', N'1', N'2023-07-19 10:13:17', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (139, N'流程实例的状态', N'bpm_process_instance_status', 0, N'流程实例的状态', N'1', N'2022-01-07 23:46:42', N'1', N'2022-01-07 23:46:42', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (140, N'流程实例的结果', N'bpm_task_status', 0, N'流程实例的结果', N'1', N'2022-01-07 23:48:10', N'1', N'2024-03-08 22:42:03', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (141, N'流程的表单类型', N'bpm_model_form_type', 0, N'流程的表单类型', N'103', N'2022-01-11 23:50:45', N'103', N'2022-01-11 23:50:45', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (142, N'任务分配规则的类型', N'bpm_task_candidate_strategy', 0, N'BPM 任务的候选人的策略', N'103', N'2022-01-12 23:21:04', N'103', N'2024-03-06 02:53:59', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (144, N'代码生成的场景枚举', N'infra_codegen_scene', 0, N'代码生成的场景枚举', N'1', N'2022-02-02 13:14:45', N'1', N'2022-03-10 16:33:46', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (145, N'角色类型', N'system_role_type', 0, N'角色类型', N'1', N'2022-02-16 13:01:46', N'1', N'2022-02-16 13:01:46', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (146, N'文件存储器', N'infra_file_storage', 0, N'文件存储器', N'1', N'2022-03-15 00:24:38', N'1', N'2022-03-15 00:24:38', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (147, N'OAuth 2.0 授权类型', N'system_oauth2_grant_type', 0, N'OAuth 2.0 授权类型(模式)', N'1', N'2022-05-12 00:20:52', N'1', N'2022-05-11 16:25:49', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (149, N'商品 SPU 状态', N'product_spu_status', 0, N'商品 SPU 状态', N'1', N'2022-10-24 21:19:04', N'1', N'2022-10-24 21:19:08', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (150, N'优惠类型', N'promotion_discount_type', 0, N'优惠类型', N'1', N'2022-11-01 12:46:06', N'1', N'2022-11-01 12:46:06', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (151, N'优惠劵模板的有限期类型', N'promotion_coupon_template_validity_type', 0, N'优惠劵模板的有限期类型', N'1', N'2022-11-02 00:06:20', N'1', N'2022-11-04 00:08:26', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (152, N'营销的商品范围', N'promotion_product_scope', 0, N'营销的商品范围', N'1', N'2022-11-02 00:28:01', N'1', N'2022-11-02 00:28:01', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (153, N'优惠劵的状态', N'promotion_coupon_status', 0, N'优惠劵的状态', N'1', N'2022-11-04 00:14:49', N'1', N'2022-11-04 00:14:49', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (154, N'优惠劵的领取方式', N'promotion_coupon_take_type', 0, N'优惠劵的领取方式', N'1', N'2022-11-04 19:12:27', N'1', N'2022-11-04 19:12:27', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (155, N'促销活动的状态', N'promotion_activity_status', 0, N'促销活动的状态', N'1', N'2022-11-04 22:54:23', N'1', N'2022-11-04 22:54:23', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (156, N'营销的条件类型', N'promotion_condition_type', 0, N'营销的条件类型', N'1', N'2022-11-04 22:59:23', N'1', N'2022-11-04 22:59:23', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (157, N'交易售后状态', N'trade_after_sale_status', 0, N'交易售后状态', N'1', N'2022-11-19 20:52:56', N'1', N'2022-11-19 20:52:56', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (158, N'交易售后的类型', N'trade_after_sale_type', 0, N'交易售后的类型', N'1', N'2022-11-19 21:04:09', N'1', N'2022-11-19 21:04:09', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (159, N'交易售后的方式', N'trade_after_sale_way', 0, N'交易售后的方式', N'1', N'2022-11-19 21:39:04', N'1', N'2022-11-19 21:39:04', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (160, N'终端', N'terminal', 0, N'终端', N'1', N'2022-12-10 10:50:50', N'1', N'2022-12-10 10:53:11', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (161, N'交易订单的类型', N'trade_order_type', 0, N'交易订单的类型', N'1', N'2022-12-10 16:33:54', N'1', N'2022-12-10 16:33:54', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (162, N'交易订单的状态', N'trade_order_status', 0, N'交易订单的状态', N'1', N'2022-12-10 16:48:44', N'1', N'2022-12-10 16:48:44', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (163, N'交易订单项的售后状态', N'trade_order_item_after_sale_status', 0, N'交易订单项的售后状态', N'1', N'2022-12-10 20:58:08', N'1', N'2022-12-10 20:58:08', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (164, N'公众号自动回复的请求关键字匹配模式', N'mp_auto_reply_request_match', 0, N'公众号自动回复的请求关键字匹配模式', N'1', N'2023-01-16 23:29:56', N'1', N'2023-01-16 23:29:56', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (165, N'公众号的消息类型', N'mp_message_type', 0, N'公众号的消息类型', N'1', N'2023-01-17 22:17:09', N'1', N'2023-01-17 22:17:09', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, N'邮件发送状态', N'system_mail_send_status', 0, N'邮件发送状态', N'1', N'2023-01-26 09:53:13', N'1', N'2023-01-26 09:53:13', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, N'站内信模版的类型', N'system_notify_template_type', 0, N'站内信模版的类型', N'1', N'2023-01-28 10:35:10', N'1', N'2023-01-28 10:35:10', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, N'代码生成的前端类型', N'infra_codegen_front_type', 0, N'', N'1', N'2023-04-12 23:57:52', N'1', N'2023-04-12 23:57:52', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, N'快递计费方式', N'trade_delivery_express_charge_mode', 0, N'用于商城交易模块配送管理', N'1', N'2023-05-21 22:45:03', N'1', N'2023-05-21 22:45:03', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, N'积分业务类型', N'member_point_biz_type', 0, N'', N'1', N'2023-06-10 12:15:00', N'1', N'2023-06-28 13:48:20', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, N'支付通知类型', N'pay_notify_type', 0, NULL, N'1', N'2023-07-20 12:23:03', N'1', N'2023-07-20 12:23:03', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (174, N'会员经验业务类型', N'member_experience_biz_type', 0, NULL, N'', N'2023-08-22 12:41:01', N'', N'2023-08-22 12:41:01', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (175, N'交易配送类型', N'trade_delivery_type', 0, N'', N'1', N'2023-08-23 00:03:14', N'1', N'2023-08-23 00:03:14', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (176, N'分佣模式', N'brokerage_enabled_condition', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (177, N'分销关系绑定模式', N'brokerage_bind_mode', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (178, N'佣金提现类型', N'brokerage_withdraw_type', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (179, N'佣金记录业务类型', N'brokerage_record_biz_type', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (180, N'佣金记录状态', N'brokerage_record_status', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (181, N'佣金提现状态', N'brokerage_withdraw_status', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (182, N'佣金提现银行', N'brokerage_bank_name', 0, NULL, N'', N'2023-09-28 02:46:05', N'', N'2023-09-28 02:46:05', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (183, N'砍价记录的状态', N'promotion_bargain_record_status', 0, N'', N'1', N'2023-10-05 10:41:08', N'1', N'2023-10-05 10:41:08', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (184, N'拼团记录的状态', N'promotion_combination_record_status', 0, N'', N'1', N'2023-10-08 07:24:25', N'1', N'2023-10-08 07:24:25', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (185, N'回款-回款方式', N'crm_receivable_return_type', 0, N'回款-回款方式', N'1', N'2023-10-18 21:54:10', N'1', N'2023-10-18 21:54:10', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (186, N'CRM 客户行业', N'crm_customer_industry', 0, N'CRM 客户所属行业', N'1', N'2023-10-28 22:57:07', N'1', N'2024-02-18 23:30:22', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (187, N'客户等级', N'crm_customer_level', 0, N'CRM 客户等级', N'1', N'2023-10-28 22:59:12', N'1', N'2023-10-28 15:11:16', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (188, N'客户来源', N'crm_customer_source', 0, N'CRM 客户来源', N'1', N'2023-10-28 23:00:34', N'1', N'2023-10-28 15:11:16', N'0', NULL) +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (600, N'Banner 位置', N'promotion_banner_position', 0, N'', N'1', N'2023-10-08 07:24:25', N'1', N'2023-11-04 13:04:02', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (601, N'社交类型', N'system_social_type', 0, N'', N'1', N'2023-11-04 13:03:54', N'1', N'2023-11-04 13:03:54', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (604, N'产品状态', N'crm_product_status', 0, N'', N'1', N'2023-10-30 21:47:59', N'1', N'2023-10-30 21:48:45', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (605, N'CRM 数据权限的级别', N'crm_permission_level', 0, N'', N'1', N'2023-11-30 09:51:59', N'1', N'2023-11-30 09:51:59', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (606, N'CRM 审批状态', N'crm_audit_status', 0, N'', N'1', N'2023-11-30 18:56:23', N'1', N'2023-11-30 18:56:23', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (607, N'CRM 产品单位', N'crm_product_unit', 0, N'', N'1', N'2023-12-05 23:01:51', N'1', N'2023-12-05 23:01:51', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (608, N'CRM 跟进方式', N'crm_follow_up_type', 0, N'', N'1', N'2024-01-15 20:48:05', N'1', N'2024-01-15 20:48:05', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (609, N'支付转账类型', N'pay_transfer_type', 0, N'', N'1', N'2023-10-28 16:27:18', N'1', N'2023-10-28 16:27:18', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (610, N'转账订单状态', N'pay_transfer_status', 0, N'', N'1', N'2023-10-28 16:18:32', N'1', N'2023-10-28 16:18:32', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (611, N'ERP 库存明细的业务类型', N'erp_stock_record_biz_type', 0, N'ERP 库存明细的业务类型', N'1', N'2024-02-05 18:07:02', N'1', N'2024-02-05 18:07:02', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (612, N'ERP 审批状态', N'erp_audit_status', 0, N'', N'1', N'2024-02-06 00:00:07', N'1', N'2024-02-06 00:00:07', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (613, N'BPM 监听器类型', N'bpm_process_listener_type', 0, N'', N'1', N'2024-03-23 12:52:24', N'1', N'2024-03-09 15:54:28', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (615, N'BPM 监听器值类型', N'bpm_process_listener_value_type', 0, N'', N'1', N'2024-03-23 13:00:31', N'1', N'2024-03-23 13:00:31', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (616, N'时间间隔', N'date_interval', 0, N'', N'1', N'2024-03-29 22:50:09', N'1', N'2024-03-29 22:50:09', N'0', N'1970-01-01 00:00:00') +GO +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (619, N'CRM 商机结束状态类型', N'crm_business_end_status_type', 0, N'', N'1', N'2024-04-13 23:23:00', N'1', N'2024-04-13 23:23:00', N'0', N'1970-01-01 00:00:00') +GO +SET IDENTITY_INSERT system_dict_type OFF +GO +COMMIT +GO +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_login_log +-- ---------------------------- +DROP TABLE IF EXISTS system_login_log; +CREATE TABLE system_login_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + log_type bigint NOT NULL, + trace_id nvarchar(64) DEFAULT '' NOT NULL, + user_id bigint DEFAULT 0 NOT NULL, + user_type tinyint DEFAULT 0 NOT NULL, + username nvarchar(50) DEFAULT '' NOT NULL, + result tinyint NOT NULL, + user_ip nvarchar(50) NOT NULL, + user_agent nvarchar(512) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'访问ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'日志类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'log_type' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'链路追踪编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'trace_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'user_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'user_type' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户账号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'username' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'登陆结果', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'result' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'user_ip' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'浏览器 UA', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'user_agent' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'creator' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'create_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'updater' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'update_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'deleted' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log', + 'COLUMN', N'tenant_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'系统访问记录', + 'SCHEMA', N'dbo', + 'TABLE', N'system_login_log' +GO + +-- ---------------------------- +-- Table structure for system_mail_account +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_account; +CREATE TABLE system_mail_account +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + mail nvarchar(255) NOT NULL, + username nvarchar(255) NOT NULL, + password nvarchar(255) NOT NULL, + host nvarchar(255) NOT NULL, + port int NOT NULL, + ssl_enable varchar(1) DEFAULT '0' NOT NULL, + starttls_enable varchar(1) DEFAULT '0' NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'主键', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮箱', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'mail' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'username' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'密码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'password' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'SMTP 服务器域名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'host' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'SMTP 服务器端口', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'port' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否开启 SSL', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'ssl_enable' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否开启 STARTTLS', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'starttls_enable' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'creator' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'create_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'updater' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'update_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account', + 'COLUMN', N'deleted' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮箱账号表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_account' +GO + +-- ---------------------------- +-- Records of system_mail_account +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION +GO +SET IDENTITY_INSERT system_mail_account ON +GO +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, N'7684413@qq.com', N'7684413@qq.com', N'1234576', N'127.0.0.1', 8080, N'0', N'0', N'1', N'2023-01-25 17:39:52', N'1', N'2024-04-24 09:13:56', N'0') +GO +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, N'ydym_test@163.com', N'ydym_test@163.com', N'WBZTEINMIFVRYSOE', N'smtp.163.com', 465, N'1', N'0', N'1', N'2023-01-26 01:26:03', N'1', N'2023-04-12 22:39:38', N'0') +GO +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, N'76854114@qq.com', N'3335', N'11234', N'yunai1.cn', 466, N'0', N'0', N'1', N'2023-01-27 15:06:38', N'1', N'2023-01-27 07:08:36', N'1') +GO +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, N'7685413x@qq.com', N'2', N'3', N'4', 5, N'1', N'0', N'1', N'2023-04-12 23:05:06', N'1', N'2023-04-12 15:05:11', N'1') +GO +SET IDENTITY_INSERT system_mail_account OFF +GO +COMMIT +GO +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_mail_log +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_log; +CREATE TABLE system_mail_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint DEFAULT NULL NULL, + user_type tinyint DEFAULT NULL NULL, + to_mail nvarchar(255) NOT NULL, + account_id bigint NOT NULL, + from_mail nvarchar(255) NOT NULL, + template_id bigint NOT NULL, + template_code nvarchar(63) NOT NULL, + template_nickname nvarchar(255) DEFAULT NULL NULL, + template_title nvarchar(255) NOT NULL, + template_content nvarchar(4000) NOT NULL, + template_params nvarchar(255) NOT NULL, + send_status tinyint DEFAULT 0 NOT NULL, + send_time datetime2 DEFAULT NULL NULL, + send_message_id nvarchar(255) DEFAULT NULL NULL, + send_exception nvarchar(4000) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'user_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'user_type' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'接收邮箱地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'to_mail' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮箱账号编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'account_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送邮箱地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'from_mail' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_code' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模版发送人名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_nickname' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮件标题', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_title' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮件内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_content' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮件参数', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'template_params' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'send_status' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'send_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送返回的消息 ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'send_message_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送异常', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'send_exception' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'creator' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'create_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'updater' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'update_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log', + 'COLUMN', N'deleted' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮件日志表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_log' +GO + +-- ---------------------------- +-- Table structure for system_mail_template +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_template; +CREATE TABLE system_mail_template +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(63) NOT NULL, + code nvarchar(63) NOT NULL, + account_id bigint NOT NULL, + nickname nvarchar(255) DEFAULT NULL NULL, + title nvarchar(255) NOT NULL, + content nvarchar(4000) NOT NULL, + params nvarchar(255) NOT NULL, + status tinyint NOT NULL, + remark nvarchar(255) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'name' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'code' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送的邮箱账号编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'account_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'发送人名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'nickname' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板标题', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'title' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'模板内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'content' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'参数数组', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'params' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'开启状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'status' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'remark' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'creator' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'create_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'updater' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'update_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template', + 'COLUMN', N'deleted' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'邮件模版表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_mail_template' +GO + +-- ---------------------------- +-- Records of system_mail_template +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION +GO +SET IDENTITY_INSERT system_mail_template ON +GO +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, N'后台用户短信登录', N'admin-sms-login', 1, N'奥特曼', N'你猜我猜', N'

您的验证码是{code},名字是{name}

', N'["code","name"]', 0, N'3', N'1', N'2021-10-11 08:10:00', N'1', N'2023-12-02 19:51:14', N'0') +GO +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, N'测试模版', N'test_01', 2, N'芋艿', N'一个标题', N'

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', N'["key01","key02"]', 0, NULL, N'1', N'2023-01-26 01:27:40', N'1', N'2023-01-27 10:32:16', N'0') +GO +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, N'3', N'2', 2, N'7', N'4', N'

45

', N'[]', 1, N'80', N'1', N'2023-01-27 15:50:35', N'1', N'2023-01-27 16:34:49', N'0') +GO +SET IDENTITY_INSERT system_mail_template OFF +GO +COMMIT +GO +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_menu +-- ---------------------------- +DROP TABLE IF EXISTS system_menu; +CREATE TABLE system_menu +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(50) NOT NULL, + permission nvarchar(100) DEFAULT '' NOT NULL, + type tinyint NOT NULL, + sort int DEFAULT 0 NOT NULL, + parent_id bigint DEFAULT 0 NOT NULL, + path nvarchar(200) DEFAULT '' NULL, + icon nvarchar(100) DEFAULT '#' NULL, + component nvarchar(255) DEFAULT NULL NULL, + component_name nvarchar(255) DEFAULT NULL NULL, + status tinyint DEFAULT 0 NOT NULL, + visible varchar(1) DEFAULT '1' NOT NULL, + keep_alive varchar(1) DEFAULT '1' NOT NULL, + always_show varchar(1) DEFAULT '1' NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'name' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'权限标识', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'permission' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'type' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'显示顺序', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'sort' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'父菜单ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'parent_id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'路由地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'path' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单图标', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'icon' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'组件路径', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'component' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'组件名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'component_name' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'status' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否可见', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'visible' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否缓存', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'keep_alive' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否总是显示', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'always_show' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'creator' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'create_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'updater' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'update_time' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu', + 'COLUMN', N'deleted' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'菜单权限表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_menu' +GO + +-- ---------------------------- +-- Records of system_menu +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION +GO +SET IDENTITY_INSERT system_menu ON +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, N'系统管理', N'', 1, 10, 0, N'/system', N'ep:tools', NULL, NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:04:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, N'基础设施', N'', 1, 20, 0, N'/infra', N'ep:monitor', NULL, NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-03-01 08:28:40', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5, N'OA 示例', N'', 1, 40, 1185, N'oa', N'fa:road', NULL, NULL, 0, N'1', N'1', N'1', N'admin', N'2021-09-20 16:26:19', N'1', N'2024-02-29 12:38:13', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (100, N'用户管理', N'system:user:list', 2, 1, 1, N'user', N'ep:avatar', N'system/user/index', N'SystemUser', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:02:04', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (101, N'角色管理', N'', 2, 2, 1, N'role', N'ep:user', N'system/role/index', N'SystemRole', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:03:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (102, N'菜单管理', N'', 2, 3, 1, N'menu', N'ep:menu', N'system/menu/index', N'SystemMenu', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:03:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (103, N'部门管理', N'', 2, 4, 1, N'dept', N'fa:address-card', N'system/dept/index', N'SystemDept', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:06:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (104, N'岗位管理', N'', 2, 5, 1, N'post', N'fa:address-book-o', N'system/post/index', N'SystemPost', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:06:39', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (105, N'字典管理', N'', 2, 6, 1, N'dict', N'ep:collection', N'system/dict/index', N'SystemDictType', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:07:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (106, N'配置管理', N'', 2, 8, 2, N'config', N'fa:connectdevelop', N'infra/config/index', N'InfraConfig', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-23 00:02:45', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (107, N'通知公告', N'', 2, 4, 2739, N'notice', N'ep:takeaway-box', N'system/notice/index', N'SystemNotice', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-22 23:56:17', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (108, N'审计日志', N'', 1, 9, 1, N'log', N'ep:document-copy', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:08:30', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (109, N'令牌管理', N'', 2, 2, 1261, N'token', N'fa:key', N'system/oauth2/token/index', N'SystemTokenClient', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:13:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (110, N'定时任务', N'', 2, 7, 2, N'job', N'fa-solid:tasks', N'infra/job/index', N'InfraJob', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 08:57:36', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (111, N'MySQL 监控', N'', 2, 1, 2740, N'druid', N'fa-solid:box', N'infra/druid/index', N'InfraDruid', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-23 00:05:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (112, N'Java 监控', N'', 2, 3, 2740, N'admin-server', N'ep:coffee-cup', N'infra/server/index', N'InfraAdminServer', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-23 00:06:57', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (113, N'Redis 监控', N'', 2, 2, 2740, N'redis', N'fa:reddit-square', N'infra/redis/index', N'InfraRedis', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-23 00:06:09', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (114, N'表单构建', N'infra:build:list', 2, 2, 2, N'build', N'fa:wpforms', N'infra/build/index', N'InfraBuild', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 08:51:35', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (115, N'代码生成', N'infra:codegen:query', 2, 1, 2, N'codegen', N'ep:document-copy', N'infra/codegen/index', N'InfraCodegen', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 08:51:06', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (116, N'API 接口', N'infra:swagger:list', 2, 3, 2, N'swagger', N'fa:fighter-jet', N'infra/swagger/index', N'InfraSwagger', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-04-23 00:01:24', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (500, N'操作日志', N'', 2, 1, 108, N'operate-log', N'ep:position', N'system/operatelog/index', N'SystemOperateLog', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:09:59', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (501, N'登录日志', N'', 2, 2, 108, N'login-log', N'ep:promotion', N'system/loginlog/index', N'SystemLoginLog', 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2024-02-29 01:10:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1001, N'用户查询', N'system:user:query', 3, 1, 100, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1002, N'用户新增', N'system:user:create', 3, 2, 100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1003, N'用户修改', N'system:user:update', 3, 3, 100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1004, N'用户删除', N'system:user:delete', 3, 4, 100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1005, N'用户导出', N'system:user:export', 3, 5, 100, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1006, N'用户导入', N'system:user:import', 3, 6, 100, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1007, N'重置密码', N'system:user:update-password', 3, 7, 100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1008, N'角色查询', N'system:role:query', 3, 1, 101, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1009, N'角色新增', N'system:role:create', 3, 2, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1010, N'角色修改', N'system:role:update', 3, 3, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1011, N'角色删除', N'system:role:delete', 3, 4, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1012, N'角色导出', N'system:role:export', 3, 5, 101, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1013, N'菜单查询', N'system:menu:query', 3, 1, 102, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1014, N'菜单新增', N'system:menu:create', 3, 2, 102, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1015, N'菜单修改', N'system:menu:update', 3, 3, 102, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1016, N'菜单删除', N'system:menu:delete', 3, 4, 102, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1017, N'部门查询', N'system:dept:query', 3, 1, 103, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1018, N'部门新增', N'system:dept:create', 3, 2, 103, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1019, N'部门修改', N'system:dept:update', 3, 3, 103, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1020, N'部门删除', N'system:dept:delete', 3, 4, 103, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1021, N'岗位查询', N'system:post:query', 3, 1, 104, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1022, N'岗位新增', N'system:post:create', 3, 2, 104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1023, N'岗位修改', N'system:post:update', 3, 3, 104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1024, N'岗位删除', N'system:post:delete', 3, 4, 104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1025, N'岗位导出', N'system:post:export', 3, 5, 104, N'', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1026, N'字典查询', N'system:dict:query', 3, 1, 105, N'#', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1027, N'字典新增', N'system:dict:create', 3, 2, 105, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1028, N'字典修改', N'system:dict:update', 3, 3, 105, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1029, N'字典删除', N'system:dict:delete', 3, 4, 105, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1030, N'字典导出', N'system:dict:export', 3, 5, 105, N'#', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1031, N'配置查询', N'infra:config:query', 3, 1, 106, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1032, N'配置新增', N'infra:config:create', 3, 2, 106, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1033, N'配置修改', N'infra:config:update', 3, 3, 106, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1034, N'配置删除', N'infra:config:delete', 3, 4, 106, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1035, N'配置导出', N'infra:config:export', 3, 5, 106, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1036, N'公告查询', N'system:notice:query', 3, 1, 107, N'#', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1037, N'公告新增', N'system:notice:create', 3, 2, 107, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1038, N'公告修改', N'system:notice:update', 3, 3, 107, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1039, N'公告删除', N'system:notice:delete', 3, 4, 107, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1040, N'操作查询', N'system:operate-log:query', 3, 1, 500, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1042, N'日志导出', N'system:operate-log:export', 3, 2, 500, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1043, N'登录查询', N'system:login-log:query', 3, 1, 501, N'#', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1045, N'日志导出', N'system:login-log:export', 3, 3, 501, N'#', N'#', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1046, N'令牌列表', N'system:oauth2-token:page', 3, 1, 109, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-05-09 23:54:42', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1048, N'令牌删除', N'system:oauth2-token:delete', 3, 2, 109, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-05-09 23:54:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1050, N'任务新增', N'infra:job:create', 3, 2, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1051, N'任务修改', N'infra:job:update', 3, 3, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1052, N'任务删除', N'infra:job:delete', 3, 4, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1053, N'状态修改', N'infra:job:update', 3, 5, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1054, N'任务导出', N'infra:job:export', 3, 7, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1056, N'生成修改', N'infra:codegen:update', 3, 2, 115, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1057, N'生成删除', N'infra:codegen:delete', 3, 3, 115, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1058, N'导入代码', N'infra:codegen:create', 3, 2, 115, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1059, N'预览代码', N'infra:codegen:preview', 3, 4, 115, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1060, N'生成代码', N'infra:codegen:download', 3, 5, 115, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'admin', N'2021-01-05 17:03:48', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1063, N'设置角色菜单权限', N'system:permission:assign-role-menu', 3, 6, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-01-06 17:53:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1064, N'设置角色数据权限', N'system:permission:assign-role-data-scope', 3, 7, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-01-06 17:56:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1065, N'设置用户角色', N'system:permission:assign-user-role', 3, 8, 101, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-01-07 10:23:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1066, N'获得 Redis 监控信息', N'infra:redis:get-monitor-info', 3, 1, 113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-01-26 01:02:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1067, N'获得 Redis Key 列表', N'infra:redis:get-key-list', 3, 2, 113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-01-26 01:02:52', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1070, N'代码生成案例', N'', 1, 1, 2, N'demo', N'ep:aim', N'infra/testDemo/index', NULL, 0, N'1', N'1', N'1', N'', N'2021-02-06 12:42:49', N'1', N'2023-11-15 23:45:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1075, N'任务触发', N'infra:job:trigger', 3, 8, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-02-07 13:03:10', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1077, N'链路追踪', N'', 2, 4, 2740, N'skywalking', N'fa:eye', N'infra/skywalking/index', N'InfraSkyWalking', 0, N'1', N'1', N'1', N'', N'2021-02-08 20:41:31', N'1', N'2024-04-23 00:07:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1078, N'访问日志', N'', 2, 1, 1083, N'api-access-log', N'ep:place', N'infra/apiAccessLog/index', N'InfraApiAccessLog', 0, N'1', N'1', N'1', N'', N'2021-02-26 01:32:59', N'1', N'2024-02-29 08:54:57', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1082, N'日志导出', N'infra:api-access-log:export', 3, 2, 1078, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-02-26 01:32:59', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1083, N'API 日志', N'', 2, 4, 2, N'log', N'fa:tasks', NULL, NULL, 0, N'1', N'1', N'1', N'', N'2021-02-26 02:18:24', N'1', N'2024-04-22 23:58:36', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1084, N'错误日志', N'infra:api-error-log:query', 2, 2, 1083, N'api-error-log', N'ep:warning-filled', N'infra/apiErrorLog/index', N'InfraApiErrorLog', 0, N'1', N'1', N'1', N'', N'2021-02-26 07:53:20', N'1', N'2024-02-29 08:55:17', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1085, N'日志处理', N'infra:api-error-log:update-status', 3, 2, 1084, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-02-26 07:53:20', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1086, N'日志导出', N'infra:api-error-log:export', 3, 3, 1084, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-02-26 07:53:20', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1087, N'任务查询', N'infra:job:query', 3, 1, 110, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-03-10 01:26:19', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1088, N'日志查询', N'infra:api-access-log:query', 3, 1, 1078, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-03-10 01:28:04', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1089, N'日志查询', N'infra:api-error-log:query', 3, 1, 1084, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-03-10 01:29:09', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1090, N'文件列表', N'', 2, 5, 1243, N'file', N'ep:upload-filled', N'infra/file/index', N'InfraFile', 0, N'1', N'1', N'1', N'', N'2021-03-12 20:16:20', N'1', N'2024-02-29 08:53:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1091, N'文件查询', N'infra:file:query', 3, 1, 1090, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-03-12 20:16:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1092, N'文件删除', N'infra:file:delete', 3, 4, 1090, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-03-12 20:16:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1093, N'短信管理', N'', 1, 1, 2739, N'sms', N'ep:message', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2021-04-05 01:10:16', N'1', N'2024-04-22 23:56:03', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1094, N'短信渠道', N'', 2, 0, 1093, N'sms-channel', N'fa:stack-exchange', N'system/sms/channel/index', N'SystemSmsChannel', 0, N'1', N'1', N'1', N'', N'2021-04-01 11:07:15', N'1', N'2024-02-29 01:15:54', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1095, N'短信渠道查询', N'system:sms-channel:query', 3, 1, 1094, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 11:07:15', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1096, N'短信渠道创建', N'system:sms-channel:create', 3, 2, 1094, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 11:07:15', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1097, N'短信渠道更新', N'system:sms-channel:update', 3, 3, 1094, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 11:07:15', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1098, N'短信渠道删除', N'system:sms-channel:delete', 3, 4, 1094, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 11:07:15', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1100, N'短信模板', N'', 2, 1, 1093, N'sms-template', N'ep:connection', N'system/sms/template/index', N'SystemSmsTemplate', 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'1', N'2024-02-29 01:16:18', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1101, N'短信模板查询', N'system:sms-template:query', 3, 1, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1102, N'短信模板创建', N'system:sms-template:create', 3, 2, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1103, N'短信模板更新', N'system:sms-template:update', 3, 3, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1104, N'短信模板删除', N'system:sms-template:delete', 3, 4, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1105, N'短信模板导出', N'system:sms-template:export', 3, 5, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-01 17:35:17', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1106, N'发送测试短信', N'system:sms-template:send-sms', 3, 6, 1100, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-04-11 00:26:40', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1107, N'短信日志', N'', 2, 2, 1093, N'sms-log', N'fa:edit', N'system/sms/log/index', N'SystemSmsLog', 0, N'1', N'1', N'1', N'', N'2021-04-11 08:37:05', N'1', N'2024-02-29 08:49:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1108, N'短信日志查询', N'system:sms-log:query', 3, 1, 1107, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-11 08:37:05', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1109, N'短信日志导出', N'system:sms-log:export', 3, 5, 1107, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-04-11 08:37:05', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1117, N'支付管理', N'', 1, 30, 0, N'/pay', N'ep:money', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2021-12-25 16:43:41', N'1', N'2024-02-29 08:58:38', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1118, N'请假查询', N'', 2, 0, 5, N'leave', N'fa:leanpub', N'bpm/oa/leave/index', N'BpmOALeave', 0, N'1', N'1', N'1', N'', N'2021-09-20 08:51:03', N'1', N'2024-02-29 12:38:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1119, N'请假申请查询', N'bpm:oa-leave:query', 3, 1, 1118, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-09-20 08:51:03', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1120, N'请假申请创建', N'bpm:oa-leave:create', 3, 2, 1118, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-09-20 08:51:03', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1126, N'应用信息', N'', 2, 1, 1117, N'app', N'fa:apple', N'pay/app/index', N'PayApp', 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:30', N'1', N'2024-02-29 08:59:55', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1127, N'支付应用信息查询', N'pay:app:query', 3, 1, 1126, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1128, N'支付应用信息创建', N'pay:app:create', 3, 2, 1126, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1129, N'支付应用信息更新', N'pay:app:update', 3, 3, 1126, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1130, N'支付应用信息删除', N'pay:app:delete', 3, 4, 1126, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:31', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1132, N'秘钥解析', N'pay:channel:parsing', 3, 6, 1129, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-11-08 15:15:47', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1133, N'支付商户信息查询', N'pay:merchant:query', 3, 1, 1132, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:41', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1134, N'支付商户信息创建', N'pay:merchant:create', 3, 2, 1132, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:41', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1135, N'支付商户信息更新', N'pay:merchant:update', 3, 3, 1132, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:41', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1136, N'支付商户信息删除', N'pay:merchant:delete', 3, 4, 1132, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:41', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1137, N'支付商户信息导出', N'pay:merchant:export', 3, 5, 1132, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-11-10 01:13:41', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1138, N'租户列表', N'', 2, 0, 1224, N'list', N'ep:house', N'system/tenant/index', N'SystemTenant', 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:43', N'1', N'2024-02-29 01:01:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1139, N'租户查询', N'system:tenant:query', 3, 1, 1138, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1140, N'租户创建', N'system:tenant:create', 3, 2, 1138, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1141, N'租户更新', N'system:tenant:update', 3, 3, 1138, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1142, N'租户删除', N'system:tenant:delete', 3, 4, 1138, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1143, N'租户导出', N'system:tenant:export', 3, 5, 1138, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-14 12:31:44', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1150, N'秘钥解析', N'', 3, 6, 1129, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2021-11-08 15:15:47', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1161, N'退款订单', N'', 2, 3, 1117, N'refund', N'fa:registered', N'pay/refund/index', N'PayRefund', 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'1', N'2024-02-29 08:59:20', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1162, N'退款订单查询', N'pay:refund:query', 3, 1, 1161, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1163, N'退款订单创建', N'pay:refund:create', 3, 2, 1161, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1164, N'退款订单更新', N'pay:refund:update', 3, 3, 1161, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1165, N'退款订单删除', N'pay:refund:delete', 3, 4, 1161, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1166, N'退款订单导出', N'pay:refund:export', 3, 5, 1161, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:29:07', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1173, N'支付订单', N'', 2, 2, 1117, N'order', N'fa:cc-paypal', N'pay/order/index', N'PayOrder', 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'1', N'2024-02-29 08:59:43', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1174, N'支付订单查询', N'pay:order:query', 3, 1, 1173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1175, N'支付订单创建', N'pay:order:create', 3, 2, 1173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1176, N'支付订单更新', N'pay:order:update', 3, 3, 1173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1177, N'支付订单删除', N'pay:order:delete', 3, 4, 1173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1178, N'支付订单导出', N'pay:order:export', 3, 5, 1173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-25 08:49:43', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1185, N'工作流程', N'', 1, 50, 0, N'/bpm', N'fa:medium', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2021-12-30 20:26:36', N'1', N'2024-02-29 12:43:43', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1186, N'流程管理', N'', 1, 10, 1185, N'manager', N'fa:dedent', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2021-12-30 20:28:30', N'1', N'2024-02-29 12:36:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1187, N'流程表单', N'', 2, 2, 1186, N'form', N'fa:hdd-o', N'bpm/form/index', N'BpmForm', 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2024-03-19 12:25:25', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1188, N'表单查询', N'bpm:form:query', 3, 1, 1187, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1189, N'表单创建', N'bpm:form:create', 3, 2, 1187, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1190, N'表单更新', N'bpm:form:update', 3, 3, 1187, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1191, N'表单删除', N'bpm:form:delete', 3, 4, 1187, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1192, N'表单导出', N'bpm:form:export', 3, 5, 1187, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2021-12-30 12:38:22', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1193, N'流程模型', N'', 2, 1, 1186, N'model', N'fa-solid:project-diagram', N'bpm/model/index', N'BpmModel', 0, N'1', N'1', N'1', N'1', N'2021-12-31 23:24:58', N'1', N'2024-03-19 12:25:19', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1194, N'模型查询', N'bpm:model:query', 3, 1, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:01:10', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1195, N'模型创建', N'bpm:model:create', 3, 2, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:01:24', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1196, N'模型导入', N'bpm:model:import', 3, 3, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:01:35', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1197, N'模型更新', N'bpm:model:update', 3, 4, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:02:28', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1198, N'模型删除', N'bpm:model:delete', 3, 5, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:02:43', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1199, N'模型发布', N'bpm:model:deploy', 3, 6, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-03 19:03:24', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1200, N'审批中心', N'', 2, 20, 1185, N'task', N'fa:tasks', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-07 23:51:48', N'1', N'2024-03-21 00:33:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1201, N'我的流程', N'', 2, 1, 1200, N'my', N'fa-solid:book', N'bpm/processInstance/index', N'BpmProcessInstanceMy', 0, N'1', N'1', N'1', N'', N'2022-01-07 15:53:44', N'1', N'2024-03-21 23:52:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1202, N'流程实例的查询', N'bpm:process-instance:query', 3, 1, 1201, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-01-07 15:53:44', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1207, N'待办任务', N'', 2, 10, 1200, N'todo', N'fa:slack', N'bpm/task/todo/index', N'BpmTodoTask', 0, N'1', N'1', N'1', N'1', N'2022-01-08 10:33:37', N'1', N'2024-02-29 12:37:39', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1208, N'已办任务', N'', 2, 20, 1200, N'done', N'fa:delicious', N'bpm/task/done/index', N'BpmDoneTask', 0, N'1', N'1', N'1', N'1', N'2022-01-08 10:34:13', N'1', N'2024-02-29 12:37:54', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1209, N'用户分组', N'', 2, 4, 1186, N'user-group', N'fa:user-secret', N'bpm/group/index', N'BpmUserGroup', 0, N'1', N'1', N'1', N'', N'2022-01-14 02:14:20', N'1', N'2024-03-21 23:55:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1210, N'用户组查询', N'bpm:user-group:query', 3, 1, 1209, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-01-14 02:14:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1211, N'用户组创建', N'bpm:user-group:create', 3, 2, 1209, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-01-14 02:14:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1212, N'用户组更新', N'bpm:user-group:update', 3, 3, 1209, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-01-14 02:14:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1213, N'用户组删除', N'bpm:user-group:delete', 3, 4, 1209, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-01-14 02:14:20', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1215, N'流程定义查询', N'bpm:process-definition:query', 3, 10, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:21:43', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1216, N'流程任务分配规则查询', N'bpm:task-assign-rule:query', 3, 20, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:26:53', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1217, N'流程任务分配规则创建', N'bpm:task-assign-rule:create', 3, 21, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:28:15', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1218, N'流程任务分配规则更新', N'bpm:task-assign-rule:update', 3, 22, 1193, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:28:41', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1219, N'流程实例的创建', N'bpm:process-instance:create', 3, 2, 1201, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:36:15', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1220, N'流程实例的取消', N'bpm:process-instance:cancel', 3, 3, 1201, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:36:33', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1221, N'流程任务的查询', N'bpm:task:query', 3, 1, 1207, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:38:52', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1222, N'流程任务的更新', N'bpm:task:update', 3, 2, 1207, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-01-23 00:39:24', N'1', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1224, N'租户管理', N'', 2, 0, 1, N'tenant', N'fa-solid:house-user', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-02-20 01:41:13', N'1', N'2024-02-29 00:59:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1225, N'租户套餐', N'', 2, 0, 1224, N'package', N'fa:bars', N'system/tenantPackage/index', N'SystemTenantPackage', 0, N'1', N'1', N'1', N'', N'2022-02-19 17:44:06', N'1', N'2024-02-29 01:01:43', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1226, N'租户套餐查询', N'system:tenant-package:query', 3, 1, 1225, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-02-19 17:44:06', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1227, N'租户套餐创建', N'system:tenant-package:create', 3, 2, 1225, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-02-19 17:44:06', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1228, N'租户套餐更新', N'system:tenant-package:update', 3, 3, 1225, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-02-19 17:44:06', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1229, N'租户套餐删除', N'system:tenant-package:delete', 3, 4, 1225, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-02-19 17:44:06', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1237, N'文件配置', N'', 2, 0, 1243, N'file-config', N'fa-solid:file-signature', N'infra/fileConfig/index', N'InfraFileConfig', 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'1', N'2024-02-29 08:52:54', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1238, N'文件配置查询', N'infra:file-config:query', 3, 1, 1237, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1239, N'文件配置创建', N'infra:file-config:create', 3, 2, 1237, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1240, N'文件配置更新', N'infra:file-config:update', 3, 3, 1237, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1241, N'文件配置删除', N'infra:file-config:delete', 3, 4, 1237, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1242, N'文件配置导出', N'infra:file-config:export', 3, 5, 1237, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-03-15 14:35:28', N'', N'2022-04-20 17:03:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1243, N'文件管理', N'', 2, 6, 2, N'file', N'ep:files', NULL, N'', 0, N'1', N'1', N'1', N'1', N'2022-03-16 23:47:40', N'1', N'2024-04-23 00:02:11', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1254, N'作者动态', N'', 1, 0, 0, N'https://www.iocoder.cn', N'ep:avatar', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-04-23 01:03:15', N'1', N'2023-12-08 23:40:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1255, N'数据源配置', N'', 2, 1, 2, N'data-source-config', N'ep:data-analysis', N'infra/dataSourceConfig/index', N'InfraDataSourceConfig', 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'1', N'2024-02-29 08:51:25', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1256, N'数据源配置查询', N'infra:data-source-config:query', 3, 1, 1255, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'', N'2022-04-27 14:37:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1257, N'数据源配置创建', N'infra:data-source-config:create', 3, 2, 1255, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'', N'2022-04-27 14:37:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1258, N'数据源配置更新', N'infra:data-source-config:update', 3, 3, 1255, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'', N'2022-04-27 14:37:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1259, N'数据源配置删除', N'infra:data-source-config:delete', 3, 4, 1255, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'', N'2022-04-27 14:37:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1260, N'数据源配置导出', N'infra:data-source-config:export', 3, 5, 1255, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-04-27 14:37:32', N'', N'2022-04-27 14:37:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1261, N'OAuth 2.0', N'', 2, 10, 1, N'oauth2', N'fa:dashcube', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-05-09 23:38:17', N'1', N'2024-02-29 01:12:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1263, N'应用管理', N'', 2, 0, 1261, N'oauth2/application', N'fa:hdd-o', N'system/oauth2/client/index', N'SystemOAuth2Client', 0, N'1', N'1', N'1', N'', N'2022-05-10 16:26:33', N'1', N'2024-02-29 01:13:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1264, N'客户端查询', N'system:oauth2-client:query', 3, 1, 1263, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-05-10 16:26:33', N'1', N'2022-05-11 00:31:06', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1265, N'客户端创建', N'system:oauth2-client:create', 3, 2, 1263, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-05-10 16:26:33', N'1', N'2022-05-11 00:31:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1266, N'客户端更新', N'system:oauth2-client:update', 3, 3, 1263, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-05-10 16:26:33', N'1', N'2022-05-11 00:31:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1267, N'客户端删除', N'system:oauth2-client:delete', 3, 4, 1263, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-05-10 16:26:33', N'1', N'2022-05-11 00:31:33', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1281, N'报表管理', N'', 2, 40, 0, N'/report', N'ep:pie-chart', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-07-10 20:22:15', N'1', N'2024-02-29 12:33:03', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1282, N'报表设计器', N'', 2, 1, 1281, N'jimu-report', N'ep:trend-charts', N'report/jmreport/index', N'GoView', 0, N'1', N'1', N'1', N'1', N'2022-07-10 20:26:36', N'1', N'2024-02-29 12:33:54', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2000, N'商品中心', N'', 1, 60, 2362, N'product', N'fa:product-hunt', NULL, NULL, 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'1', N'2023-09-30 11:52:36', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2002, N'商品分类', N'', 2, 2, 2000, N'category', N'ep:cellphone', N'mall/product/category/index', N'ProductCategory', 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'1', N'2023-08-21 10:27:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2003, N'分类查询', N'product:category:query', 3, 1, 2002, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'', N'2022-07-29 15:53:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2004, N'分类创建', N'product:category:create', 3, 2, 2002, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'', N'2022-07-29 15:53:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2005, N'分类更新', N'product:category:update', 3, 3, 2002, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'', N'2022-07-29 15:53:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2006, N'分类删除', N'product:category:delete', 3, 4, 2002, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-29 15:53:53', N'', N'2022-07-29 15:53:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2008, N'商品品牌', N'', 2, 3, 2000, N'brand', N'ep:chicken', N'mall/product/brand/index', N'ProductBrand', 0, N'1', N'1', N'1', N'', N'2022-07-30 13:52:44', N'1', N'2023-08-21 10:27:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2009, N'品牌查询', N'product:brand:query', 3, 1, 2008, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 13:52:44', N'', N'2022-07-30 13:52:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2010, N'品牌创建', N'product:brand:create', 3, 2, 2008, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 13:52:44', N'', N'2022-07-30 13:52:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2011, N'品牌更新', N'product:brand:update', 3, 3, 2008, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 13:52:44', N'', N'2022-07-30 13:52:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2012, N'品牌删除', N'product:brand:delete', 3, 4, 2008, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 13:52:44', N'', N'2022-07-30 13:52:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, N'商品列表', N'', 2, 1, 2000, N'spu', N'ep:apple', N'mall/product/spu/index', N'ProductSpu', 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'1', N'2023-08-21 10:27:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2015, N'商品查询', N'product:spu:query', 3, 1, 2014, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'', N'2022-07-30 14:22:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2016, N'商品创建', N'product:spu:create', 3, 2, 2014, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'', N'2022-07-30 14:22:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2017, N'商品更新', N'product:spu:update', 3, 3, 2014, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'', N'2022-07-30 14:22:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2018, N'商品删除', N'product:spu:delete', 3, 4, 2014, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'', N'2022-07-30 14:22:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2019, N'商品属性', N'', 2, 4, 2000, N'property', N'ep:cold-drink', N'mall/product/property/index', N'ProductProperty', 0, N'1', N'1', N'1', N'', N'2022-08-01 14:55:35', N'1', N'2023-08-26 11:01:05', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2020, N'规格查询', N'product:property:query', 3, 1, 2019, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-08-01 14:55:35', N'', N'2022-12-12 20:26:24', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2021, N'规格创建', N'product:property:create', 3, 2, 2019, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-08-01 14:55:35', N'', N'2022-12-12 20:26:30', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2022, N'规格更新', N'product:property:update', 3, 3, 2019, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-08-01 14:55:35', N'', N'2022-12-12 20:26:33', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2023, N'规格删除', N'product:property:delete', 3, 4, 2019, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-08-01 14:55:35', N'', N'2022-12-12 20:26:37', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2025, N'Banner', N'', 2, 100, 2387, N'banner', N'fa:bandcamp', N'mall/promotion/banner/index', NULL, 0, N'1', N'1', N'1', N'', N'2022-08-01 14:56:14', N'1', N'2023-10-24 20:20:06', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2026, N'Banner查询', N'promotion:banner:query', 3, 1, 2025, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-08-01 14:56:14', N'1', N'2023-10-24 20:20:18', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2027, N'Banner创建', N'promotion:banner:create', 3, 2, 2025, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-08-01 14:56:14', N'1', N'2023-10-24 20:20:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2028, N'Banner更新', N'promotion:banner:update', 3, 3, 2025, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-08-01 14:56:14', N'1', N'2023-10-24 20:20:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2029, N'Banner删除', N'promotion:banner:delete', 3, 4, 2025, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-08-01 14:56:14', N'1', N'2023-10-24 20:20:36', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2030, N'营销中心', N'', 1, 70, 2362, N'promotion', N'ep:present', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-10-31 21:25:09', N'1', N'2023-09-30 11:54:27', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2032, N'优惠劵列表', N'', 2, 1, 2365, N'template', N'ep:discount', N'mall/promotion/coupon/template/index', N'PromotionCouponTemplate', 0, N'1', N'1', N'1', N'', N'2022-10-31 22:27:14', N'1', N'2023-10-03 12:40:06', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2033, N'优惠劵模板查询', N'promotion:coupon-template:query', 3, 1, 2032, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-10-31 22:27:14', N'', N'2022-10-31 22:27:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2034, N'优惠劵模板创建', N'promotion:coupon-template:create', 3, 2, 2032, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-10-31 22:27:14', N'', N'2022-10-31 22:27:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2035, N'优惠劵模板更新', N'promotion:coupon-template:update', 3, 3, 2032, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-10-31 22:27:14', N'', N'2022-10-31 22:27:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2036, N'优惠劵模板删除', N'promotion:coupon-template:delete', 3, 4, 2032, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-10-31 22:27:14', N'', N'2022-10-31 22:27:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2038, N'领取记录', N'', 2, 2, 2365, N'list', N'ep:collection-tag', N'mall/promotion/coupon/index', N'PromotionCoupon', 0, N'1', N'1', N'1', N'', N'2022-11-03 23:21:31', N'1', N'2023-10-03 12:55:30', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2039, N'优惠劵查询', N'promotion:coupon:query', 3, 1, 2038, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-03 23:21:31', N'', N'2022-11-03 23:21:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2040, N'优惠劵删除', N'promotion:coupon:delete', 3, 4, 2038, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-03 23:21:31', N'', N'2022-11-03 23:21:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2041, N'满减送', N'', 2, 10, 2390, N'reward-activity', N'ep:goblet-square-full', N'mall/promotion/rewardActivity/index', N'PromotionRewardActivity', 0, N'1', N'1', N'1', N'', N'2022-11-04 23:47:49', N'1', N'2023-10-21 19:24:46', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2042, N'满减送活动查询', N'promotion:reward-activity:query', 3, 1, 2041, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-04 23:47:49', N'', N'2022-11-04 23:47:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2043, N'满减送活动创建', N'promotion:reward-activity:create', 3, 2, 2041, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-04 23:47:49', N'', N'2022-11-04 23:47:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2044, N'满减送活动更新', N'promotion:reward-activity:update', 3, 3, 2041, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-04 23:47:50', N'', N'2022-11-04 23:47:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2045, N'满减送活动删除', N'promotion:reward-activity:delete', 3, 4, 2041, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-04 23:47:50', N'', N'2022-11-04 23:47:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2046, N'满减送活动关闭', N'promotion:reward-activity:close', 3, 5, 2041, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2022-11-05 10:42:53', N'1', N'2022-11-05 10:42:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2047, N'限时折扣', N'', 2, 7, 2390, N'discount-activity', N'ep:timer', N'mall/promotion/discountActivity/index', N'PromotionDiscountActivity', 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:15', N'1', N'2023-10-21 19:24:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2048, N'限时折扣活动查询', N'promotion:discount-activity:query', 3, 1, 2047, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:15', N'', N'2022-11-05 17:12:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2049, N'限时折扣活动创建', N'promotion:discount-activity:create', 3, 2, 2047, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:15', N'', N'2022-11-05 17:12:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2050, N'限时折扣活动更新', N'promotion:discount-activity:update', 3, 3, 2047, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:16', N'', N'2022-11-05 17:12:16', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2051, N'限时折扣活动删除', N'promotion:discount-activity:delete', 3, 4, 2047, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:16', N'', N'2022-11-05 17:12:16', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2052, N'限时折扣活动关闭', N'promotion:discount-activity:close', 3, 5, 2047, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-05 17:12:16', N'', N'2022-11-05 17:12:16', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2059, N'秒杀商品', N'', 2, 2, 2209, N'activity', N'ep:basketball', N'mall/promotion/seckill/activity/index', N'PromotionSeckillActivity', 0, N'1', N'1', N'1', N'', N'2022-11-06 22:24:49', N'1', N'2023-06-24 18:57:25', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2060, N'秒杀活动查询', N'promotion:seckill-activity:query', 3, 1, 2059, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-06 22:24:49', N'', N'2022-11-06 22:24:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2061, N'秒杀活动创建', N'promotion:seckill-activity:create', 3, 2, 2059, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-06 22:24:49', N'', N'2022-11-06 22:24:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2062, N'秒杀活动更新', N'promotion:seckill-activity:update', 3, 3, 2059, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-06 22:24:49', N'', N'2022-11-06 22:24:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2063, N'秒杀活动删除', N'promotion:seckill-activity:delete', 3, 4, 2059, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-06 22:24:49', N'', N'2022-11-06 22:24:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2066, N'秒杀时段', N'', 2, 1, 2209, N'config', N'ep:baseball', N'mall/promotion/seckill/config/index', N'PromotionSeckillConfig', 0, N'1', N'1', N'1', N'', N'2022-11-15 19:46:50', N'1', N'2023-06-24 18:57:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2067, N'秒杀时段查询', N'promotion:seckill-config:query', 3, 1, 2066, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-11-15 19:46:51', N'1', N'2023-06-24 17:50:25', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2068, N'秒杀时段创建', N'promotion:seckill-config:create', 3, 2, 2066, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-11-15 19:46:51', N'1', N'2023-06-24 17:48:39', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2069, N'秒杀时段更新', N'promotion:seckill-config:update', 3, 3, 2066, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-11-15 19:46:51', N'1', N'2023-06-24 17:50:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2070, N'秒杀时段删除', N'promotion:seckill-config:delete', 3, 4, 2066, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2022-11-15 19:46:51', N'1', N'2023-06-24 17:50:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2072, N'订单中心', N'', 1, 65, 2362, N'trade', N'ep:eleme', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2022-11-19 18:57:19', N'1', N'2023-09-30 11:54:07', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2073, N'售后退款', N'', 2, 2, 2072, N'after-sale', N'ep:refrigerator', N'mall/trade/afterSale/index', N'TradeAfterSale', 0, N'1', N'1', N'1', N'', N'2022-11-19 20:15:32', N'1', N'2023-10-01 21:42:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2074, N'售后查询', N'trade:after-sale:query', 3, 1, 2073, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-11-19 20:15:33', N'1', N'2022-12-10 21:04:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2075, N'秒杀活动关闭', N'promotion:seckill-activity:close', 3, 5, 2059, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2022-11-28 20:20:15', N'1', N'2023-10-03 18:34:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2076, N'订单列表', N'', 2, 1, 2072, N'order', N'ep:list', N'mall/trade/order/index', N'TradeOrder', 0, N'1', N'1', N'1', N'1', N'2022-12-10 21:05:44', N'1', N'2023-10-01 21:42:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2083, N'地区管理', N'', 2, 14, 1, N'area', N'fa:map-marker', N'system/area/index', N'SystemArea', 0, N'1', N'1', N'1', N'1', N'2022-12-23 17:35:05', N'1', N'2024-02-29 08:50:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2084, N'公众号管理', N'', 1, 100, 0, N'/mp', N'ep:compass', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-01 20:11:04', N'1', N'2024-02-29 12:39:30', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2085, N'账号管理', N'', 2, 1, 2084, N'account', N'fa:user', N'mp/account/index', N'MpAccount', 0, N'1', N'1', N'1', N'1', N'2023-01-01 20:13:31', N'1', N'2024-02-29 12:42:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2086, N'新增账号', N'mp:account:create', 3, 1, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-01 20:21:40', N'1', N'2023-01-07 17:32:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2087, N'修改账号', N'mp:account:update', 3, 2, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-07 17:32:46', N'1', N'2023-01-07 17:32:46', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2088, N'查询账号', N'mp:account:query', 3, 0, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-07 17:33:07', N'1', N'2023-01-07 17:33:07', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2089, N'删除账号', N'mp:account:delete', 3, 3, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-07 17:33:21', N'1', N'2023-01-07 17:33:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2090, N'生成二维码', N'mp:account:qr-code', 3, 4, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-07 17:33:58', N'1', N'2023-01-07 17:33:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2091, N'清空 API 配额', N'mp:account:clear-quota', 3, 5, 2085, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-07 18:20:32', N'1', N'2023-01-07 18:20:59', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2092, N'数据统计', N'mp:statistics:query', 2, 2, 2084, N'statistics', N'ep:trend-charts', N'mp/statistics/index', N'MpStatistics', 0, N'1', N'1', N'1', N'1', N'2023-01-07 20:17:36', N'1', N'2024-02-29 12:42:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2093, N'标签管理', N'', 2, 3, 2084, N'tag', N'ep:collection-tag', N'mp/tag/index', N'MpTag', 0, N'1', N'1', N'1', N'1', N'2023-01-08 11:37:32', N'1', N'2024-02-29 12:42:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2094, N'查询标签', N'mp:tag:query', 3, 0, 2093, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 11:59:03', N'1', N'2023-01-08 11:59:03', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2095, N'新增标签', N'mp:tag:create', 3, 1, 2093, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 11:59:23', N'1', N'2023-01-08 11:59:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2096, N'修改标签', N'mp:tag:update', 3, 2, 2093, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 11:59:41', N'1', N'2023-01-08 11:59:41', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2097, N'删除标签', N'mp:tag:delete', 3, 3, 2093, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 12:00:04', N'1', N'2023-01-08 12:00:13', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2098, N'同步标签', N'mp:tag:sync', 3, 4, 2093, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 12:00:29', N'1', N'2023-01-08 12:00:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2099, N'粉丝管理', N'', 2, 4, 2084, N'user', N'fa:user-secret', N'mp/user/index', N'MpUser', 0, N'1', N'1', N'1', N'1', N'2023-01-08 16:51:20', N'1', N'2024-02-29 12:42:39', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2100, N'查询粉丝', N'mp:user:query', 3, 0, 2099, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 17:16:59', N'1', N'2023-01-08 17:17:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2101, N'修改粉丝', N'mp:user:update', 3, 1, 2099, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 17:17:11', N'1', N'2023-01-08 17:17:11', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2102, N'同步粉丝', N'mp:user:sync', 3, 2, 2099, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-08 17:17:40', N'1', N'2023-01-08 17:17:40', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2103, N'消息管理', N'', 2, 5, 2084, N'message', N'ep:message', N'mp/message/index', N'MpMessage', 0, N'1', N'1', N'1', N'1', N'2023-01-08 18:44:19', N'1', N'2024-02-29 12:42:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2104, N'图文发表记录', N'', 2, 10, 2084, N'free-publish', N'ep:edit-pen', N'mp/freePublish/index', N'MpFreePublish', 0, N'1', N'1', N'1', N'1', N'2023-01-13 00:30:50', N'1', N'2024-02-29 12:43:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2105, N'查询发布列表', N'mp:free-publish:query', 3, 1, 2104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-13 07:19:17', N'1', N'2023-01-13 07:19:17', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2106, N'发布草稿', N'mp:free-publish:submit', 3, 2, 2104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-13 07:19:46', N'1', N'2023-01-13 07:19:46', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2107, N'删除发布记录', N'mp:free-publish:delete', 3, 3, 2104, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-13 07:20:01', N'1', N'2023-01-13 07:20:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2108, N'图文草稿箱', N'', 2, 9, 2084, N'draft', N'ep:edit', N'mp/draft/index', N'MpDraft', 0, N'1', N'1', N'1', N'1', N'2023-01-13 07:40:21', N'1', N'2024-02-29 12:43:26', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2109, N'新建草稿', N'mp:draft:create', 3, 1, 2108, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-13 23:15:30', N'1', N'2023-01-13 23:15:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2110, N'修改草稿', N'mp:draft:update', 3, 2, 2108, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 10:08:47', N'1', N'2023-01-14 10:08:47', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2111, N'查询草稿', N'mp:draft:query', 3, 0, 2108, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 10:09:01', N'1', N'2023-01-14 10:09:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2112, N'删除草稿', N'mp:draft:delete', 3, 3, 2108, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 10:09:19', N'1', N'2023-01-14 10:09:19', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2113, N'素材管理', N'', 2, 8, 2084, N'material', N'ep:basketball', N'mp/material/index', N'MpMaterial', 0, N'1', N'1', N'1', N'1', N'2023-01-14 14:12:07', N'1', N'2024-02-29 12:43:18', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2114, N'上传临时素材', N'mp:material:upload-temporary', 3, 1, 2113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 15:33:55', N'1', N'2023-01-14 15:33:55', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2115, N'上传永久素材', N'mp:material:upload-permanent', 3, 2, 2113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 15:34:14', N'1', N'2023-01-14 15:34:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2116, N'删除素材', N'mp:material:delete', 3, 3, 2113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 15:35:37', N'1', N'2023-01-14 15:35:37', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2117, N'上传图文图片', N'mp:material:upload-news-image', 3, 4, 2113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 15:36:31', N'1', N'2023-01-14 15:36:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2118, N'查询素材', N'mp:material:query', 3, 5, 2113, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-14 15:39:22', N'1', N'2023-01-14 15:39:22', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2119, N'菜单管理', N'', 2, 6, 2084, N'menu', N'ep:menu', N'mp/menu/index', N'MpMenu', 0, N'1', N'1', N'1', N'1', N'2023-01-14 17:43:54', N'1', N'2024-02-29 12:42:56', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2120, N'自动回复', N'', 2, 7, 2084, N'auto-reply', N'fa-solid:republican', N'mp/autoReply/index', N'MpAutoReply', 0, N'1', N'1', N'1', N'1', N'2023-01-15 22:13:09', N'1', N'2024-02-29 12:43:10', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2121, N'查询回复', N'mp:auto-reply:query', 3, 0, 2120, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-16 22:28:41', N'1', N'2023-01-16 22:28:41', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2122, N'新增回复', N'mp:auto-reply:create', 3, 1, 2120, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-16 22:28:54', N'1', N'2023-01-16 22:28:54', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2123, N'修改回复', N'mp:auto-reply:update', 3, 2, 2120, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-16 22:29:05', N'1', N'2023-01-16 22:29:05', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2124, N'删除回复', N'mp:auto-reply:delete', 3, 3, 2120, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-16 22:29:34', N'1', N'2023-01-16 22:29:34', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2125, N'查询菜单', N'mp:menu:query', 3, 0, 2119, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-17 23:05:41', N'1', N'2023-01-17 23:05:41', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2126, N'保存菜单', N'mp:menu:save', 3, 1, 2119, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-17 23:06:01', N'1', N'2023-01-17 23:06:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2127, N'删除菜单', N'mp:menu:delete', 3, 2, 2119, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-17 23:06:16', N'1', N'2023-01-17 23:06:16', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2128, N'查询消息', N'mp:message:query', 3, 0, 2103, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-17 23:07:14', N'1', N'2023-01-17 23:07:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2129, N'发送消息', N'mp:message:send', 3, 1, 2103, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-17 23:07:26', N'1', N'2023-01-17 23:07:26', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2130, N'邮箱管理', N'', 2, 2, 2739, N'mail', N'fa-solid:mail-bulk', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-25 17:27:44', N'1', N'2024-04-22 23:56:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2131, N'邮箱账号', N'', 2, 0, 2130, N'mail-account', N'fa:universal-access', N'system/mail/account/index', N'SystemMailAccount', 0, N'1', N'1', N'1', N'', N'2023-01-25 09:33:48', N'1', N'2024-02-29 08:48:16', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2132, N'账号查询', N'system:mail-account:query', 3, 1, 2131, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 09:33:48', N'', N'2023-01-25 09:33:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2133, N'账号创建', N'system:mail-account:create', 3, 2, 2131, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 09:33:48', N'', N'2023-01-25 09:33:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2134, N'账号更新', N'system:mail-account:update', 3, 3, 2131, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 09:33:48', N'', N'2023-01-25 09:33:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2135, N'账号删除', N'system:mail-account:delete', 3, 4, 2131, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 09:33:48', N'', N'2023-01-25 09:33:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2136, N'邮件模版', N'', 2, 0, 2130, N'mail-template', N'fa:tag', N'system/mail/template/index', N'SystemMailTemplate', 0, N'1', N'1', N'1', N'', N'2023-01-25 12:05:31', N'1', N'2024-02-29 08:48:41', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2137, N'模版查询', N'system:mail-template:query', 3, 1, 2136, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 12:05:31', N'', N'2023-01-25 12:05:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2138, N'模版创建', N'system:mail-template:create', 3, 2, 2136, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 12:05:31', N'', N'2023-01-25 12:05:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2139, N'模版更新', N'system:mail-template:update', 3, 3, 2136, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 12:05:31', N'', N'2023-01-25 12:05:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2140, N'模版删除', N'system:mail-template:delete', 3, 4, 2136, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-25 12:05:31', N'', N'2023-01-25 12:05:31', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2141, N'邮件记录', N'', 2, 0, 2130, N'mail-log', N'fa:edit', N'system/mail/log/index', N'SystemMailLog', 0, N'1', N'1', N'1', N'', N'2023-01-26 02:16:50', N'1', N'2024-02-29 08:48:51', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2142, N'日志查询', N'system:mail-log:query', 3, 1, 2141, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-26 02:16:50', N'', N'2023-01-26 02:16:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2143, N'发送测试邮件', N'system:mail-template:send-mail', 3, 5, 2136, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-26 23:29:15', N'1', N'2023-01-26 23:29:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2144, N'站内信管理', N'', 1, 3, 2739, N'notify', N'ep:message-box', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-28 10:25:18', N'1', N'2024-04-22 23:56:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2145, N'模板管理', N'', 2, 0, 2144, N'notify-template', N'fa:archive', N'system/notify/template/index', N'SystemNotifyTemplate', 0, N'1', N'1', N'1', N'', N'2023-01-28 02:26:42', N'1', N'2024-02-29 08:49:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2146, N'站内信模板查询', N'system:notify-template:query', 3, 1, 2145, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-28 02:26:42', N'', N'2023-01-28 02:26:42', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2147, N'站内信模板创建', N'system:notify-template:create', 3, 2, 2145, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-28 02:26:42', N'', N'2023-01-28 02:26:42', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2148, N'站内信模板更新', N'system:notify-template:update', 3, 3, 2145, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-28 02:26:42', N'', N'2023-01-28 02:26:42', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2149, N'站内信模板删除', N'system:notify-template:delete', 3, 4, 2145, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-28 02:26:42', N'', N'2023-01-28 02:26:42', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2150, N'发送测试站内信', N'system:notify-template:send-notify', 3, 5, 2145, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-01-28 10:54:43', N'1', N'2023-01-28 10:54:43', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2151, N'消息记录', N'', 2, 0, 2144, N'notify-message', N'fa:edit', N'system/notify/message/index', N'SystemNotifyMessage', 0, N'1', N'1', N'1', N'', N'2023-01-28 04:28:22', N'1', N'2024-02-29 08:49:22', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2152, N'站内信消息查询', N'system:notify-message:query', 3, 1, 2151, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-01-28 04:28:22', N'', N'2023-01-28 04:28:22', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2153, N'大屏设计器', N'', 2, 2, 1281, N'go-view', N'fa:area-chart', N'report/goview/index', N'JimuReport', 0, N'1', N'1', N'1', N'1', N'2023-02-07 00:03:19', N'1', N'2024-02-29 12:34:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2154, N'创建项目', N'report:go-view-project:create', 3, 1, 2153, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-07 19:25:14', N'1', N'2023-02-07 19:25:14', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2155, N'更新项目', N'report:go-view-project:update', 3, 2, 2153, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-02-07 19:25:34', N'1', N'2024-04-24 20:01:18', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2156, N'查询项目', N'report:go-view-project:query', 3, 0, 2153, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-07 19:25:53', N'1', N'2023-02-07 19:25:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2157, N'使用 SQL 查询数据', N'report:go-view-data:get-by-sql', 3, 3, 2153, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-07 19:26:15', N'1', N'2023-02-07 19:26:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2158, N'使用 HTTP 查询数据', N'report:go-view-data:get-by-http', 3, 4, 2153, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-07 19:26:35', N'1', N'2023-02-07 19:26:35', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2159, N'Boot 开发文档', N'', 1, 1, 0, N'https://doc.iocoder.cn/', N'ep:document', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-10 22:46:28', N'1', N'2023-12-02 21:32:20', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2160, N'Cloud 开发文档', N'', 1, 2, 0, N'https://cloud.iocoder.cn', N'ep:document-copy', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-02-10 22:47:07', N'1', N'2023-12-02 21:32:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2161, N'接入示例', N'', 1, 99, 1117, N'demo', N'fa-solid:dragon', N'pay/demo/index', NULL, 0, N'1', N'1', N'1', N'', N'2023-02-11 14:21:42', N'1', N'2024-01-18 23:50:00', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2162, N'商品导出', N'product:spu:export', 3, 5, 2014, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2022-07-30 14:22:58', N'', N'2022-07-30 14:22:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2164, N'配送管理', N'', 1, 3, 2072, N'delivery', N'ep:shopping-cart', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-05-18 09:18:02', N'1', N'2023-09-28 10:58:09', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2165, N'快递发货', N'', 1, 0, 2164, N'express', N'ep:bicycle', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-05-18 09:22:06', N'1', N'2023-08-30 21:02:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2166, N'门店自提', N'', 1, 1, 2164, N'pick-up-store', N'ep:add-location', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-05-18 09:23:14', N'1', N'2023-08-30 21:03:21', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2167, N'快递公司', N'', 2, 0, 2165, N'express', N'ep:compass', N'mall/trade/delivery/express/index', N'Express', 0, N'1', N'1', N'1', N'1', N'2023-05-18 09:27:21', N'1', N'2023-08-30 21:02:59', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2168, N'快递公司查询', N'trade:delivery:express:query', 3, 1, 2167, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-18 09:37:53', N'', N'2023-05-18 09:37:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2169, N'快递公司创建', N'trade:delivery:express:create', 3, 2, 2167, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-18 09:37:53', N'', N'2023-05-18 09:37:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2170, N'快递公司更新', N'trade:delivery:express:update', 3, 3, 2167, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-18 09:37:53', N'', N'2023-05-18 09:37:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2171, N'快递公司删除', N'trade:delivery:express:delete', 3, 4, 2167, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-18 09:37:53', N'', N'2023-05-18 09:37:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2172, N'快递公司导出', N'trade:delivery:express:export', 3, 5, 2167, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-18 09:37:53', N'', N'2023-05-18 09:37:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2173, N'运费模版', N'trade:delivery:express-template:query', 2, 1, 2165, N'express-template', N'ep:coordinate', N'mall/trade/delivery/expressTemplate/index', N'ExpressTemplate', 0, N'1', N'1', N'1', N'1', N'2023-05-20 06:48:10', N'1', N'2023-08-30 21:03:13', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2174, N'快递运费模板查询', N'trade:delivery:express-template:query', 3, 1, 2173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-20 06:49:53', N'', N'2023-05-20 06:49:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2175, N'快递运费模板创建', N'trade:delivery:express-template:create', 3, 2, 2173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-20 06:49:53', N'', N'2023-05-20 06:49:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2176, N'快递运费模板更新', N'trade:delivery:express-template:update', 3, 3, 2173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-20 06:49:53', N'', N'2023-05-20 06:49:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2177, N'快递运费模板删除', N'trade:delivery:express-template:delete', 3, 4, 2173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-20 06:49:53', N'', N'2023-05-20 06:49:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2178, N'快递运费模板导出', N'trade:delivery:express-template:export', 3, 5, 2173, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-20 06:49:53', N'', N'2023-05-20 06:49:53', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2179, N'门店管理', N'', 2, 1, 2166, N'pick-up-store', N'ep:basketball', N'mall/trade/delivery/pickUpStore/index', N'PickUpStore', 0, N'1', N'1', N'1', N'1', N'2023-05-25 10:50:00', N'1', N'2023-08-30 21:03:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2180, N'自提门店查询', N'trade:delivery:pick-up-store:query', 3, 1, 2179, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-25 10:53:29', N'', N'2023-05-25 10:53:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2181, N'自提门店创建', N'trade:delivery:pick-up-store:create', 3, 2, 2179, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-25 10:53:29', N'', N'2023-05-25 10:53:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2182, N'自提门店更新', N'trade:delivery:pick-up-store:update', 3, 3, 2179, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-25 10:53:29', N'', N'2023-05-25 10:53:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2183, N'自提门店删除', N'trade:delivery:pick-up-store:delete', 3, 4, 2179, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-25 10:53:29', N'', N'2023-05-25 10:53:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2184, N'自提门店导出', N'trade:delivery:pick-up-store:export', 3, 5, 2179, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-05-25 10:53:29', N'', N'2023-05-25 10:53:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2209, N'秒杀活动', N'', 2, 3, 2030, N'seckill', N'ep:place', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-06-24 17:39:13', N'1', N'2023-06-24 18:55:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2262, N'会员中心', N'', 1, 55, 0, N'/member', N'ep:bicycle', NULL, NULL, 0, N'1', N'1', N'1', N'1', N'2023-06-10 00:42:03', N'1', N'2023-08-20 09:23:56', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2275, N'会员配置', N'', 2, 0, 2262, N'config', N'fa:archive', N'member/config/index', N'MemberConfig', 0, N'1', N'1', N'1', N'', N'2023-06-10 02:07:44', N'1', N'2023-10-01 23:41:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2276, N'会员配置查询', N'member:config:query', 3, 1, 2275, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-06-10 02:07:44', N'1', N'2024-04-24 19:48:58', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2277, N'会员配置保存', N'member:config:save', 3, 2, 2275, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-06-10 02:07:44', N'1', N'2024-04-24 19:49:28', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2281, N'签到配置', N'', 2, 2, 2300, N'config', N'ep:calendar', N'member/signin/config/index', N'SignInConfig', 0, N'1', N'1', N'1', N'', N'2023-06-10 03:26:12', N'1', N'2023-08-20 19:25:51', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2282, N'积分签到规则查询', N'point:sign-in-config:query', 3, 1, 2281, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 03:26:12', N'', N'2023-06-10 03:26:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2283, N'积分签到规则创建', N'point:sign-in-config:create', 3, 2, 2281, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 03:26:12', N'', N'2023-06-10 03:26:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2284, N'积分签到规则更新', N'point:sign-in-config:update', 3, 3, 2281, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 03:26:12', N'', N'2023-06-10 03:26:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2285, N'积分签到规则删除', N'point:sign-in-config:delete', 3, 4, 2281, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 03:26:12', N'', N'2023-06-10 03:26:12', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2287, N'会员积分', N'', 2, 10, 2262, N'record', N'fa:asterisk', N'member/point/record/index', N'PointRecord', 0, N'1', N'1', N'1', N'', N'2023-06-10 04:18:50', N'1', N'2023-10-01 23:42:11', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2288, N'用户积分记录查询', N'point:record:query', 3, 1, 2287, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 04:18:50', N'', N'2023-06-10 04:18:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2293, N'签到记录', N'', 2, 3, 2300, N'record', N'ep:chicken', N'member/signin/record/index', N'SignInRecord', 0, N'1', N'1', N'1', N'', N'2023-06-10 04:48:22', N'1', N'2023-08-20 19:26:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2294, N'用户签到积分查询', N'point:sign-in-record:query', 3, 1, 2293, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 04:48:22', N'', N'2023-06-10 04:48:22', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2297, N'用户签到积分删除', N'point:sign-in-record:delete', 3, 4, 2293, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-06-10 04:48:22', N'', N'2023-06-10 04:48:22', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2300, N'会员签到', N'', 1, 11, 2262, N'signin', N'ep:alarm-clock', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-06-27 22:49:53', N'1', N'2023-08-20 09:23:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2301, N'回调通知', N'', 2, 5, 1117, N'notify', N'ep:mute-notification', N'pay/notify/index', N'PayNotify', 0, N'1', N'1', N'1', N'', N'2023-07-20 04:41:32', N'1', N'2024-01-18 23:56:48', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2302, N'支付通知查询', N'pay:notify:query', 3, 1, 2301, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-07-20 04:41:32', N'', N'2023-07-20 04:41:32', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2303, N'拼团活动', N'', 2, 3, 2030, N'combination', N'fa:group', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:19:54', N'1', N'2023-08-12 17:20:05', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2304, N'拼团商品', N'', 2, 1, 2303, N'acitivity', N'ep:apple', N'mall/promotion/combination/activity/index', N'PromotionCombinationActivity', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:22:03', N'1', N'2023-08-12 17:22:29', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2305, N'拼团活动查询', N'promotion:combination-activity:query', 3, 1, 2304, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:54:32', N'1', N'2023-11-24 11:57:40', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2306, N'拼团活动创建', N'promotion:combination-activity:create', 3, 2, 2304, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:54:49', N'1', N'2023-08-12 17:54:49', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2307, N'拼团活动更新', N'promotion:combination-activity:update', 3, 3, 2304, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:55:04', N'1', N'2023-08-12 17:55:04', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2308, N'拼团活动删除', N'promotion:combination-activity:delete', 3, 4, 2304, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:55:23', N'1', N'2023-08-12 17:55:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2309, N'拼团活动关闭', N'promotion:combination-activity:close', 3, 5, 2304, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-12 17:55:37', N'1', N'2023-10-06 10:51:57', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2310, N'砍价活动', N'', 2, 4, 2030, N'bargain', N'ep:box', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:27:25', N'1', N'2023-08-13 00:27:25', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2311, N'砍价商品', N'', 2, 1, 2310, N'activity', N'ep:burger', N'mall/promotion/bargain/activity/index', N'PromotionBargainActivity', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:28:49', N'1', N'2023-10-05 01:16:23', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2312, N'砍价活动查询', N'promotion:bargain-activity:query', 3, 1, 2311, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:32:30', N'1', N'2023-08-13 00:32:30', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2313, N'砍价活动创建', N'promotion:bargain-activity:create', 3, 2, 2311, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:32:44', N'1', N'2023-08-13 00:32:44', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2314, N'砍价活动更新', N'promotion:bargain-activity:update', 3, 3, 2311, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:32:55', N'1', N'2023-08-13 00:32:55', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2315, N'砍价活动删除', N'promotion:bargain-activity:delete', 3, 4, 2311, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:34:50', N'1', N'2023-08-13 00:34:50', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2316, N'砍价活动关闭', N'promotion:bargain-activity:close', 3, 5, 2311, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-13 00:35:02', N'1', N'2023-08-13 00:35:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2317, N'会员管理', N'', 2, 0, 2262, N'user', N'ep:avatar', N'member/user/index', N'MemberUser', 0, N'1', N'1', N'1', N'', N'2023-08-19 04:12:15', N'1', N'2023-08-24 00:50:55', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2318, N'会员用户查询', N'member:user:query', 3, 1, 2317, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-19 04:12:15', N'', N'2023-08-19 04:12:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2319, N'会员用户更新', N'member:user:update', 3, 3, 2317, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-19 04:12:15', N'', N'2023-08-19 04:12:15', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2320, N'会员标签', N'', 2, 1, 2262, N'tag', N'ep:collection-tag', N'member/tag/index', N'MemberTag', 0, N'1', N'1', N'1', N'', N'2023-08-20 01:03:08', N'1', N'2023-08-20 09:23:19', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2321, N'会员标签查询', N'member:tag:query', 3, 1, 2320, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-20 01:03:08', N'', N'2023-08-20 01:03:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2322, N'会员标签创建', N'member:tag:create', 3, 2, 2320, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-20 01:03:08', N'', N'2023-08-20 01:03:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2323, N'会员标签更新', N'member:tag:update', 3, 3, 2320, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-20 01:03:08', N'', N'2023-08-20 01:03:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2324, N'会员标签删除', N'member:tag:delete', 3, 4, 2320, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-20 01:03:08', N'', N'2023-08-20 01:03:08', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2325, N'会员等级', N'', 2, 2, 2262, N'level', N'fa:level-up', N'member/level/index', N'MemberLevel', 0, N'1', N'1', N'1', N'', N'2023-08-22 12:41:01', N'1', N'2023-08-22 21:47:00', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2326, N'会员等级查询', N'member:level:query', 3, 1, 2325, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 12:41:02', N'', N'2023-08-22 12:41:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2327, N'会员等级创建', N'member:level:create', 3, 2, 2325, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 12:41:02', N'', N'2023-08-22 12:41:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2328, N'会员等级更新', N'member:level:update', 3, 3, 2325, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 12:41:02', N'', N'2023-08-22 12:41:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2329, N'会员等级删除', N'member:level:delete', 3, 4, 2325, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 12:41:02', N'', N'2023-08-22 12:41:02', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2330, N'会员分组', N'', 2, 3, 2262, N'group', N'fa:group', N'member/group/index', N'MemberGroup', 0, N'1', N'1', N'1', N'', N'2023-08-22 13:50:06', N'1', N'2023-10-01 23:42:01', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2331, N'用户分组查询', N'member:group:query', 3, 1, 2330, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 13:50:06', N'', N'2023-08-22 13:50:06', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2332, N'用户分组创建', N'member:group:create', 3, 2, 2330, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 13:50:06', N'', N'2023-08-22 13:50:06', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_job_log] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2333, N'用户分组更新', N'member:group:update', 3, 3, 2330, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 13:50:06', N'', N'2023-08-22 13:50:06', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2334, N'用户分组删除', N'member:group:delete', 3, 4, 2330, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-22 13:50:06', N'', N'2023-08-22 13:50:06', N'0') GO - - --- ---------------------------- --- Table structure for infra_test_demo --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[infra_test_demo]') AND type IN ('U')) - DROP TABLE [dbo].[infra_test_demo] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2335, N'用户等级修改', N'member:user:update-level', 3, 5, 2317, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-08-23 16:49:05', N'', N'2023-08-23 16:50:48', N'0') GO - -CREATE TABLE [dbo].[infra_test_demo] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [type] tinyint NOT NULL, - [category] tinyint NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2336, N'商品评论', N'', 2, 5, 2000, N'comment', N'ep:comment', N'mall/product/comment/index', N'ProductComment', 0, N'1', N'1', N'1', N'1', N'2023-08-26 11:03:00', N'1', N'2023-08-26 11:03:38', N'0') GO - -ALTER TABLE [dbo].[infra_test_demo] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2337, N'评论查询', N'product:comment:query', 3, 1, 2336, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-26 11:04:01', N'1', N'2023-08-26 11:04:01', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2338, N'添加自评', N'product:comment:create', 3, 2, 2336, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-26 11:04:23', N'1', N'2023-08-26 11:08:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'名字', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'name' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2339, N'商家回复', N'product:comment:update', 3, 3, 2336, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-26 11:04:37', N'1', N'2023-08-26 11:04:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2340, N'显隐评论', N'product:comment:update', 3, 4, 2336, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-08-26 11:04:55', N'1', N'2023-08-26 11:04:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'类型', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'type' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2341, N'优惠劵发送', N'promotion:coupon:send', 3, 2, 2038, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-09-02 00:03:14', N'1', N'2023-09-02 00:03:14', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'分类', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'category' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2342, N'交易配置', N'', 2, 0, 2072, N'config', N'ep:setting', N'mall/trade/config/index', N'TradeConfig', 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'1', N'2024-02-26 20:30:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'remark' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2343, N'交易中心配置查询', N'trade:config:query', 3, 1, 2342, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2344, N'交易中心配置保存', N'trade:config:save', 3, 2, 2342, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2345, N'分销管理', N'', 1, 4, 2072, N'brokerage', N'fa-solid:project-diagram', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'1', N'2023-09-28 10:58:44', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2346, N'分销用户', N'', 2, 0, 2345, N'brokerage-user', N'fa-solid:user-tie', N'mall/trade/brokerage/user/index', N'TradeBrokerageUser', 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'1', N'2024-02-26 20:33:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2347, N'分销用户查询', N'trade:brokerage-user:query', 3, 1, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2348, N'分销用户推广人查询', N'trade:brokerage-user:user-query', 3, 2, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典类型表', -'SCHEMA', N'dbo', -'TABLE', N'infra_test_demo' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2349, N'分销用户推广订单查询', N'trade:brokerage-user:order-query', 3, 3, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - - --- ---------------------------- --- Records of infra_test_demo --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2350, N'分销用户修改推广资格', N'trade:brokerage-user:update-brokerage-enable', 3, 4, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_test_demo] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2351, N'分销用户修改推广员', N'trade:brokerage-user:update-bind-user', 3, 5, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -SET IDENTITY_INSERT [dbo].[infra_test_demo] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2352, N'分销用户清除推广员', N'trade:brokerage-user:clear-bind-user', 3, 6, 2346, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2353, N'佣金记录', N'', 2, 1, 2345, N'brokerage-record', N'fa:money', N'mall/trade/brokerage/record/index', N'TradeBrokerageRecord', 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'1', N'2024-02-26 20:33:30', N'0') GO - - --- ---------------------------- --- Table structure for member_user --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[member_user]') AND type IN ('U')) - DROP TABLE [dbo].[member_user] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2354, N'佣金记录查询', N'trade:brokerage-record:query', 3, 1, 2353, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -CREATE TABLE [dbo].[member_user] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [nickname] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [avatar] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [mobile] nvarchar(11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [password] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [register_ip] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [login_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [login_date] datetime2(7) NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2355, N'佣金提现', N'', 2, 2, 2345, N'brokerage-withdraw', N'fa:credit-card', N'mall/trade/brokerage/withdraw/index', N'TradeBrokerageWithdraw', 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'1', N'2024-02-26 20:33:35', N'0') GO - -ALTER TABLE [dbo].[member_user] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2356, N'佣金提现查询', N'trade:brokerage-withdraw:query', 3, 1, 2355, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2357, N'佣金提现审核', N'trade:brokerage-withdraw:audit', 3, 2, 2355, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-28 02:46:22', N'', N'2023-09-28 02:46:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户昵称', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'nickname' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2358, N'统计中心', N'', 1, 75, 2362, N'statistics', N'ep:data-line', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-09-30 03:22:40', N'1', N'2023-09-30 11:54:48', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'头像', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'avatar' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2359, N'交易统计', N'', 2, 4, 2358, N'trade', N'fa-solid:credit-card', N'mall/statistics/trade/index', N'TradeStatistics', 0, N'1', N'1', N'1', N'', N'2023-09-30 03:22:40', N'1', N'2024-02-26 20:42:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2360, N'交易统计查询', N'statistics:trade:query', 3, 1, 2359, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-30 03:22:40', N'', N'2023-09-30 03:22:40', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'手机号', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'mobile' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2361, N'交易统计导出', N'statistics:trade:export', 3, 2, 2359, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-09-30 03:22:40', N'', N'2023-09-30 03:22:40', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'密码', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'password' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2362, N'商城系统', N'', 1, 59, 0, N'/mall', N'ep:shop', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-09-30 11:52:02', N'1', N'2023-09-30 11:52:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'注册 IP', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'register_ip' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2363, N'用户积分修改', N'member:user:update-point', 3, 6, 2317, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-01 14:39:43', N'', N'2023-10-01 14:39:43', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'最后登录IP', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'login_ip' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2364, N'用户余额修改', N'member:user:update-balance', 3, 7, 2317, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-10-01 14:39:43', N'1', N'2023-10-01 22:42:31', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'最后登录时间', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'login_date' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2365, N'优惠劵', N'', 1, 2, 2030, N'coupon', N'fa-solid:disease', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-03 12:39:15', N'1', N'2023-10-05 00:16:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2366, N'砍价记录', N'', 2, 2, 2310, N'record', N'ep:list', N'mall/promotion/bargain/record/index', N'PromotionBargainRecord', 0, N'1', N'1', N'1', N'', N'2023-10-05 02:49:06', N'1', N'2023-10-05 10:50:38', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2367, N'砍价记录查询', N'promotion:bargain-record:query', 3, 1, 2366, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-05 02:49:06', N'', N'2023-10-05 02:49:06', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2368, N'助力记录查询', N'promotion:bargain-help:query', 3, 2, 2366, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-05 12:27:49', N'1', N'2023-10-05 12:27:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2369, N'拼团记录', N'promotion:combination-record:query', 2, 2, 2303, N'record', N'ep:avatar', N'mall/promotion/combination/record/index.vue', N'PromotionCombinationRecord', 0, N'1', N'1', N'1', N'1', N'2023-10-08 07:10:22', N'1', N'2023-10-08 07:34:11', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2374, N'会员统计', N'', 2, 2, 2358, N'member', N'ep:avatar', N'mall/statistics/member/index', N'MemberStatistics', 0, N'1', N'1', N'1', N'', N'2023-10-11 04:39:24', N'1', N'2024-02-26 20:41:46', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'member_user', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2375, N'会员统计查询', N'statistics:member:query', 3, 1, 2374, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-11 04:39:24', N'', N'2023-10-11 04:39:24', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户', -'SCHEMA', N'dbo', -'TABLE', N'member_user' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2376, N'订单核销', N'trade:order:pick-up', 3, 10, 2076, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-14 17:11:58', N'1', N'2023-10-14 17:11:58', N'0') GO - - --- ---------------------------- --- Records of member_user --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2377, N'文章分类', N'', 2, 0, 2387, N'article/category', N'fa:certificate', N'mall/promotion/article/category/index', N'ArticleCategory', 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'1', N'2023-10-16 09:38:26', N'0') GO - -SET IDENTITY_INSERT [dbo].[member_user] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2378, N'分类查询', N'promotion:article-category:query', 3, 1, 2377, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -SET IDENTITY_INSERT [dbo].[member_user] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2379, N'分类创建', N'promotion:article-category:create', 3, 2, 2377, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2380, N'分类更新', N'promotion:article-category:update', 3, 3, 2377, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - - --- ---------------------------- --- Table structure for pay_app --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_app]') AND type IN ('U')) - DROP TABLE [dbo].[pay_app] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2381, N'分类删除', N'promotion:article-category:delete', 3, 4, 2377, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -CREATE TABLE [dbo].[pay_app] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [pay_notify_url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [refund_notify_url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [merchant_id] bigint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2382, N'文章列表', N'', 2, 2, 2387, N'article', N'ep:connection', N'mall/promotion/article/index', N'Article', 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'1', N'2023-10-16 09:41:19', N'0') GO - -ALTER TABLE [dbo].[pay_app] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2383, N'文章管理查询', N'promotion:article:query', 3, 1, 2382, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2384, N'文章管理创建', N'promotion:article:create', 3, 2, 2382, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用名', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'name' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2385, N'文章管理更新', N'promotion:article:update', 3, 3, 2382, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2386, N'文章管理删除', N'promotion:article:delete', 3, 4, 2382, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-16 01:26:18', N'', N'2023-10-16 01:26:18', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'remark' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2387, N'内容管理', N'', 1, 1, 2030, N'content', N'ep:collection', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-16 09:37:31', N'1', N'2023-10-16 09:37:31', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付结果的回调地址', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'pay_notify_url' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2388, N'商城首页', N'', 2, 1, 2362, N'home', N'ep:home-filled', N'mall/home/index', N'MallHome', 0, N'1', N'1', N'1', N'', N'2023-10-16 12:10:33', N'', N'2023-10-16 12:10:33', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款结果的回调地址', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'refund_notify_url' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2389, N'核销订单', N'', 2, 2, 2166, N'pick-up-order', N'ep:list', N'mall/trade/delivery/pickUpOrder/index', N'PickUpOrder', 0, N'1', N'1', N'1', N'', N'2023-10-19 16:09:51', N'', N'2023-10-19 16:09:51', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'merchant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2390, N'优惠活动', N'', 1, 99, 2030, N'youhui', N'ep:aim', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-21 19:23:49', N'1', N'2023-10-21 19:23:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2391, N'客户管理', N'', 2, 10, 2397, N'customer', N'fa:address-book-o', N'crm/customer/index', N'CrmCustomer', 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'1', N'2024-02-17 17:13:32', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2392, N'客户查询', N'crm:customer:query', 3, 1, 2391, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'', N'2023-10-29 09:04:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2393, N'客户创建', N'crm:customer:create', 3, 2, 2391, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'', N'2023-10-29 09:04:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2394, N'客户更新', N'crm:customer:update', 3, 3, 2391, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'', N'2023-10-29 09:04:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2395, N'客户删除', N'crm:customer:delete', 3, 4, 2391, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'', N'2023-10-29 09:04:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_app', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2396, N'客户导出', N'crm:customer:export', 3, 5, 2391, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 09:04:21', N'', N'2023-10-29 09:04:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付应用信息', -'SCHEMA', N'dbo', -'TABLE', N'pay_app' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2397, N'CRM 系统', N'', 1, 200, 0, N'/crm', N'ep:avatar', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-10-29 17:08:30', N'1', N'2024-02-04 15:37:31', N'0') GO - - --- ---------------------------- --- Records of pay_app --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2398, N'合同管理', N'', 2, 50, 2397, N'contract', N'ep:notebook', N'crm/contract/index', N'CrmContract', 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'1', N'2024-02-17 17:15:09', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_app] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2399, N'合同查询', N'crm:contract:query', 3, 1, 2398, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'', N'2023-10-29 10:50:41', N'0') GO - -INSERT INTO [dbo].[pay_app] ([id], [name], [status], [remark], [pay_notify_url], [refund_notify_url], [merchant_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'6', N'芋道', N'0', N'我是一个公众号', N'http://127.0.0.1:28080/api/shop/order/pay-notify', N'http://127.0.0.1', N'1', N'', N'2021-10-23 08:49:25.0000000', N'', N'2022-02-27 04:14:53.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2400, N'合同创建', N'crm:contract:create', 3, 2, 2398, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'', N'2023-10-29 10:50:41', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_app] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2401, N'合同更新', N'crm:contract:update', 3, 3, 2398, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'', N'2023-10-29 10:50:41', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2402, N'合同删除', N'crm:contract:delete', 3, 4, 2398, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'', N'2023-10-29 10:50:41', N'0') GO - - --- ---------------------------- --- Table structure for pay_channel --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_channel]') AND type IN ('U')) - DROP TABLE [dbo].[pay_channel] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2403, N'合同导出', N'crm:contract:export', 3, 5, 2398, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 10:50:41', N'', N'2023-10-29 10:50:41', N'0') GO - -CREATE TABLE [dbo].[pay_channel] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [code] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [fee_rate] float(53) NOT NULL, - [merchant_id] bigint NOT NULL, - [app_id] bigint NOT NULL, - [config] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2404, N'线索管理', N'', 2, 8, 2397, N'clue', N'fa:pagelines', N'crm/clue/index', N'CrmClue', 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'1', N'2024-02-17 17:15:41', N'0') GO - -ALTER TABLE [dbo].[pay_channel] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2405, N'线索查询', N'crm:clue:query', 3, 1, 2404, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'', N'2023-10-29 11:06:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2406, N'线索创建', N'crm:clue:create', 3, 2, 2404, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'', N'2023-10-29 11:06:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'code' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2407, N'线索更新', N'crm:clue:update', 3, 3, 2404, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'', N'2023-10-29 11:06:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2408, N'线索删除', N'crm:clue:delete', 3, 4, 2404, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'', N'2023-10-29 11:06:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'remark' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2409, N'线索导出', N'crm:clue:export', 3, 5, 2404, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:06:29', N'', N'2023-10-29 11:06:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道费率,单位:百分比', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'fee_rate' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2410, N'商机管理', N'', 2, 40, 2397, N'business', N'fa:bus', N'crm/business/index', N'CrmBusiness', 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'1', N'2024-02-17 17:14:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'merchant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2411, N'商机查询', N'crm:business:query', 3, 1, 2410, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'', N'2023-10-29 11:12:35', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'app_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2412, N'商机创建', N'crm:business:create', 3, 2, 2410, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'', N'2023-10-29 11:12:35', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付渠道配置', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'config' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2413, N'商机更新', N'crm:business:update', 3, 3, 2410, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'', N'2023-10-29 11:12:35', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2414, N'商机删除', N'crm:business:delete', 3, 4, 2410, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'', N'2023-10-29 11:12:35', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2415, N'商机导出', N'crm:business:export', 3, 5, 2410, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:12:35', N'', N'2023-10-29 11:12:35', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2416, N'联系人管理', N'', 2, 20, 2397, N'contact', N'fa:address-book-o', N'crm/contact/index', N'CrmContact', 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'1', N'2024-02-17 17:13:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2417, N'联系人查询', N'crm:contact:query', 3, 1, 2416, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'', N'2023-10-29 11:14:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2418, N'联系人创建', N'crm:contact:create', 3, 2, 2416, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'', N'2023-10-29 11:14:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2419, N'联系人更新', N'crm:contact:update', 3, 3, 2416, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'', N'2023-10-29 11:14:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付渠道 -', -'SCHEMA', N'dbo', -'TABLE', N'pay_channel' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2420, N'联系人删除', N'crm:contact:delete', 3, 4, 2416, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'', N'2023-10-29 11:14:56', N'0') GO - - --- ---------------------------- --- Records of pay_channel --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2421, N'联系人导出', N'crm:contact:export', 3, 5, 2416, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:14:56', N'', N'2023-10-29 11:14:56', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_channel] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2422, N'回款管理', N'', 2, 60, 2397, N'receivable', N'ep:money', N'crm/receivable/index', N'CrmReceivable', 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'1', N'2024-02-17 17:16:18', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'9', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-10-23 17:12:10.0000000', NULL, N'2022-02-27 04:15:13.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2423, N'回款管理查询', N'crm:receivable:query', 3, 1, 2422, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'10', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-14 22:01:24.0000000', NULL, N'2022-02-27 04:15:12.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2424, N'回款管理创建', N'crm:receivable:create', 3, 2, 2422, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'11', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-14 22:02:57.0000000', NULL, N'2022-02-27 04:15:11.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2425, N'回款管理更新', N'crm:receivable:update', 3, 3, 2422, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'12', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-14 22:06:10.0000000', NULL, N'2022-02-27 04:15:09.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2426, N'回款管理删除', N'crm:receivable:delete', 3, 4, 2422, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'13', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-14 22:09:39.0000000', NULL, N'2022-02-27 04:15:08.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2427, N'回款管理导出', N'crm:receivable:export', 3, 5, 2422, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'14', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-14 22:38:49.0000000', NULL, N'2022-02-27 04:15:05.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2428, N'回款计划', N'', 2, 61, 2397, N'receivable-plan', N'fa:money', N'crm/receivable/plan/index', N'CrmReceivablePlan', 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'1', N'2024-02-17 17:16:11', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'15', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2021-12-15 09:32:26.0000000', NULL, N'2022-02-27 04:15:04.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2429, N'回款计划查询', N'crm:receivable-plan:query', 3, 1, 2428, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'16', N'wx_pub', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig","appId":"wx041349c6f39b268b","mchId":"1545083881","apiVersion":"v2","mchKey":"0alL64UDQdlCwiKZ73ib7ypaIjMns06p","privateKeyContent":"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5q2hYE3loOQoH\nl/2kh/epuj17W8VpV5vBl7ysJWAbBXux6mlq4gKTHD0QUQdiKtDEUm/bKC9Bi6VU\nuklM5Y8oCaCbhjklHRbET8jsgd9phSNGviHclYRLsQRO8oXnN89kN0y7DYKm0hYd\nmaiS12Z3v8VaImSTr4HVeHlC/z3S6mdwSr263stKt931YTcbTj/QFH7znsv9Na0u\nX6LaMBEEAsJctWdm8Ndrd1tGh9Fzf0DA5VRXsJR3kkWspy+IwiDTPV/FDKOU9NJC\nSxMmDePerTfkoZ2s1rltqBK0ykDJrXtxR+hTzEsKZ/KpNi8tyYpfNZsviHIlUsLP\nFJ5UvUhpAgMBAAECggEAd90NltazqTIxpGdeCwrwOzWNnYbIclJprlhMKIJUgf1P\nNrPTbHoOGXTAgzkcYCat8iAaMEzH/TOu/3zn92m3uqxEcEL9v1UBLqknWHAbkB6w\ngGocqDAqYUcdNe5hvbyM+fCta5C0SQgV2PQrHOlMMICwYpkTfzhtxCdreXIYMoGg\nJEIRkZWgrm/N7LTtNgizznuUjy6OURWjXaWKPcs3b3j6G1gLj9Vp++z4y0u51nqM\n4R6fcvl8M6BjlcC8zo6DbOvCW8cXtuXsnru+2TPrUnsGeybJok4fEQsfW1BvpvPo\nief38rYJn4OWxIrHcpWrhNtXtgRPeiMGFfIsEQDmVQKBgQDzXK6Nn3Nr3TFfGVTy\n8QYrzOuY2NqzH8nnsLL6qn3HoKxTv+PcFKOTPsi6f4hIYCzBP0esRrPv0ffMu9oQ\nJvFtCJvMmcKGtp0Q5hcj0y/XkbC3AWuahJtBv8lhKXVnQXSL0j3+ombljw4/8yN0\nAzgBz+j/skQQgZ3sN5h+DHGtgwKBgQDDT784/2pd4m86c/uBmrwYfqu6MJo0eHJh\n1XPtE+u8pOHyNTFk77rKobKDqN5VlrF0uEmBc/08LKhyxJ3vh/zAbcmqT1Mq778y\nAKKUtVmvcaVDrvSQHsnhj0zt4SHGmmU34U2b9hV+nocq5VszX6/jp//HJi9bs3We\ndAzfFCmaowKBgC1MmDVGc+6lCraf+X8LPFHU4Bnga70h8qxM6NPd/nG1R76DHn/t\n25DiA+0rJgwK0unZxJadxoqic9TJNssA5Lmd+5o3GM2Imm311mLVwbcHqHQ4MHZf\nrqKrd2m9lNv2hCIurVmDk1Gxsj5XHMdQfhFgSQengCHubp30r07vNA3PAoGAUEAE\nIjdQTSMs8KeXP7mEb8wcY3R05/pVhT1fVJpK0kgtTofss7yM05V88/v+3sv8Pik6\niqZN9tuimwWOn00Q3UA/DGtrkMjRlooMQ24AW8YmUZkhg9YivTtUMKnAZwopbLx2\nVw7V5iDdCRMUVheK/c+ZmQpnixZBzcmBQGfYcGECgYBjEq3Mem+Aw6pXOu6+0FwH\n9y6Xi4HhBkq0OOZZuXFtWVry7YrD3pBgzWVAZJqJCkyPKKZzCzwdbFd3u0lYBs35\nzYgx7ug4hR+wfI980a3vxjcWGOqnOUUnUJ7ucIa+KDgnYV/bBy4jqpVreXmWAJXl\nfyjG3eLWBrtrsI9YX6zeAA==\n-----END PRIVATE KEY-----\n","privateCertContent":"-----BEGIN CERTIFICATE-----\nMIID6TCCAtGgAwIBAgIUNkEHq6aQcF80NSYqWS58ybsJzI4wDQYJKoZIhvcNAQEL\nBQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\nFFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\nQ0EwHhcNMjExMDIxMDU0NTQxWhcNMjYxMDIwMDU0NTQxWjB7MRMwEQYDVQQDDAox\nNTQ1MDgzODgxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM\nHuWOhuWfjuWMuuWkp+adjuWwp+aXpeeUqOWTgeW6lzELMAkGA1UEBgwCQ04xETAP\nBgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nuatoWBN5aDkKB5f9pIf3qbo9e1vFaVebwZe8rCVgGwV7seppauICkxw9EFEHYirQ\nxFJv2ygvQYulVLpJTOWPKAmgm4Y5JR0WxE/I7IHfaYUjRr4h3JWES7EETvKF5zfP\nZDdMuw2CptIWHZmoktdmd7/FWiJkk6+B1Xh5Qv890upncEq9ut7LSrfd9WE3G04/\n0BR+857L/TWtLl+i2jARBALCXLVnZvDXa3dbRofRc39AwOVUV7CUd5JFrKcviMIg\n0z1fxQyjlPTSQksTJg3j3q035KGdrNa5bagStMpAya17cUfoU8xLCmfyqTYvLcmK\nXzWbL4hyJVLCzxSeVL1IaQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC\nBPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1\nYmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw\nMUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQBe7XgncAY/1PLbCsnMsYt11k3V\n2cdNZ+yuCxhlOEKk3nHE6WCTL6zL0qWlTKKpnw1rE/+4OS76Tg72wWXcHfHDAOgt\n9icp62cKx1WO3QweeZpSvLDmtdLgKKrqeIWh+rL8+ZhuAOxSkaRwcsMTWDaLeDOi\n0pGeqvfG8WNhPxkkaSI8xbiTK641Yg9WT/Q4yfHS7Q6wg1dj9YQdo0dvVB0S2Nir\nX9IK6PUaHDnQeFKDmKgLkDGLaKaiijEvC91wMEE6qB8b0eNhciaxq2YhGHcFmSRP\nWUyc5CmBadt7wIOH5Z3bfuwWGxqxKjNw/baM/d+nk7hlDr01YL9c0g16B9MW\n-----END CERTIFICATE-----\n","apiV3Key":"joerVi8y5DJ3o4ttA0o1uH47Xz1u2Ase"}', NULL, N'2022-01-31 22:13:25.0000000', NULL, N'2022-02-27 04:15:03.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2430, N'回款计划创建', N'crm:receivable-plan:create', 3, 2, 2428, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -INSERT INTO [dbo].[pay_channel] ([id], [code], [status], [remark], [fee_rate], [merchant_id], [app_id], [config], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'17', N'alipay_qr', N'0', NULL, N'1', N'1', N'6', N'{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig","serverUrl":"https://openapi.alipaydev.com/gateway.do","appId":"2021000118634035","signType":"RSA2","mode":null,"privateKey":"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCHsEV1cDupwJv890x84qbppUtRIfhaKSwSVN0thCcsDCaAsGR5MZslDkO8NCT9V4r2SVXjyY7eJUZlZd1M0C8T01Tg4UOx5LUbic0O3A1uJMy6V1n9IyYwbAW3AEZhBd5bSbPgrqvmv3NeWSTQT6Anxnllf+2iDH6zyA2fPl7cYyQtbZoDJQFGqr4F+cGh2R6akzRKNoBkAeMYwoY6es2lX8sJxCVPWUmxNUoL3tScwlSpd7Bxw0q9c/X01jMwuQ0+Va358zgFiGERTE6yD01eu40OBDXOYO3z++y+TAYHlQQ2toMO63trepo88X3xV3R44/1DH+k2pAm2IF5ixiLrAgMBAAECggEAPx3SoXcseaD7rmcGcE0p4SMfbsUDdkUSmBBbtfF0GzwnqNLkWa+mgE0rWt9SmXngTQH97vByAYmLPl1s3G82ht1V7Sk7yQMe74lhFllr8eEyTjeVx3dTK1EEM4TwN+936DTXdFsr4TELJEcJJdD0KaxcCcfBLRDs2wnitEFZ9N+GoZybVmY8w0e0MI7PLObUZ2l0X4RurQnfG9ZxjXjC7PkeMVv7cGGylpNFi3BbvkRhdhLPDC2E6wqnr9e7zk+hiENivAezXrtxtwKovzCtnWJ1r0IO14Rh47H509Ic0wFnj+o5YyUL4LdmpL7yaaH6fM7zcSLFjNZPHvZCKPwYcQKBgQDQFho98QvnL8ex4v6cry4VitGpjSXm1qP3vmMQk4rTsn8iPWtcxPjqGEqOQJjdi4Mi0VZKQOLFwlH0kl95wNrD/isJ4O1yeYfX7YAXApzHqYNINzM79HemO3Yx1qLMW3okRFJ9pPRzbQ9qkTpsaegsmyX316zOBhzGRYjKbutTYwKBgQCm7phr9XdFW5Vh+XR90mVs483nrLmMiDKg7YKxSLJ8amiDjzPejCn7i95Hah08P+2MIZLIPbh2VLacczR6ltRRzN5bg5etFuqSgfkuHyxpoDmpjbe08+Q2h8JBYqcC5Nhv1AKU4iOUhVLHo/FBAQliMcGc/J3eiYTFC7EsNx382QKBgClb20doe7cttgFTXswBvaUmfFm45kmla924B7SpvrQpDD/f+VDtDZRp05fGmxuduSjYdtA3aVtpLiTwWu22OUUvZZqHDGruYOO4Hvdz23mL5b4ayqImCwoNU4bAZIc9v18p/UNf3/55NNE3oGcf/bev9rH2OjCQ4nM+Ktwhg8CFAoGACSgvbkShzUkv0ZcIf9ppu+ZnJh1AdGgINvGwaJ8vQ0nm/8h8NOoFZ4oNoGc+wU5Ubops7dUM6FjPR5e+OjdJ4E7Xp7d5O4J1TaIZlCEbo5OpdhaTDDcQvrkFu+Z4eN0qzj+YAKjDAOOrXc4tbr5q0FsgXscwtcNfaBuzFVTUrUkCgYEAwzPnMNhWG3zOWLUs2QFA2GP4Y+J8cpUYfj6pbKKzeLwyG9qBwF1NJpN8m+q9q7V9P2LY+9Lp9e1mGsGeqt5HMEA3P6vIpcqLJLqE/4PBLLRzfccTcmqb1m71+erxTRhHBRkGS+I7dZEb3olQfnS1Y1tpMBxiwYwR3LW4oXuJwj8=","alipayPublicKey":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnq90KnF4dTnlzzmxpujbI05OYqi5WxAS6cL0gnZFv2gK51HExF8v/BaP7P979PhFMgWTqmOOI+Dtno5s+yD09XTY1WkshbLk6i4g2Xlr8fyW9ODnkU88RI2w9UdPhQU4cPPwBNlrsYhKkVK2OxwM3kFqjoBBY0CZoZCsSQ3LDH5WeZqPArlsS6xa2zqJBuuoKjMrdpELl3eXSjP8K54eDJCbeetCZNKWLL3DPahTPB7LZikfYmslb0QUvCgGapD0xkS7eVq70NaL1G57MWABs4tbfWgxike4Daj3EfUrzIVspQxj7w8HEj9WozJPgL88kSJSits0pqD3n5r8HSuseQIDAQAB","appCertContent":null,"alipayPublicCertContent":null,"rootCertContent":null}', NULL, N'2022-01-31 22:13:25.0000000', NULL, N'2022-02-27 04:15:02.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2431, N'回款计划更新', N'crm:receivable-plan:update', 3, 3, 2428, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_channel] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2432, N'回款计划删除', N'crm:receivable-plan:delete', 3, 4, 2428, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2433, N'回款计划导出', N'crm:receivable-plan:export', 3, 5, 2428, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 11:18:09', N'', N'2023-10-29 11:18:09', N'0') GO - - --- ---------------------------- --- Table structure for pay_merchant --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_merchant]') AND type IN ('U')) - DROP TABLE [dbo].[pay_merchant] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2435, N'商城装修', N'', 2, 20, 2030, N'diy-template', N'fa6-solid:brush', N'mall/promotion/diy/template/index', N'DiyTemplate', 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -CREATE TABLE [dbo].[pay_merchant] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [no] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [short_name] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2436, N'装修模板', N'', 2, 1, 2435, N'diy-template', N'fa6-solid:brush', N'mall/promotion/diy/template/index', N'DiyTemplate', 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -ALTER TABLE [dbo].[pay_merchant] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2437, N'装修模板查询', N'promotion:diy-template:query', 3, 1, 2436, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2438, N'装修模板创建', N'promotion:diy-template:create', 3, 2, 2436, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户号', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2439, N'装修模板更新', N'promotion:diy-template:update', 3, 3, 2436, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户全称', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'name' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2440, N'装修模板删除', N'promotion:diy-template:delete', 3, 4, 2436, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户简称', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'short_name' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2441, N'装修模板使用', N'promotion:diy-template:use', 3, 5, 2436, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2442, N'装修页面', N'', 2, 2, 2435, N'diy-page', N'foundation:page-edit', N'mall/promotion/diy/page/index', N'DiyPage', 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'remark' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2443, N'装修页面查询', N'promotion:diy-page:query', 3, 1, 2442, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:25', N'', N'2023-10-29 14:19:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2444, N'装修页面创建', N'promotion:diy-page:create', 3, 2, 2442, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:26', N'', N'2023-10-29 14:19:26', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2445, N'装修页面更新', N'promotion:diy-page:update', 3, 3, 2442, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:26', N'', N'2023-10-29 14:19:26', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2446, N'装修页面删除', N'promotion:diy-page:delete', 3, 4, 2442, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-10-29 14:19:26', N'', N'2023-10-29 14:19:26', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2447, N'三方登录', N'', 1, 10, 1, N'social', N'fa:rocket', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:12:01', N'1', N'2024-02-29 01:14:05', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2448, N'三方应用', N'', 2, 1, 2447, N'client', N'ep:set-up', N'views/system/social/client/index.vue', N'SocialClient', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:17:19', N'1', N'2023-11-04 12:17:19', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2449, N'三方应用查询', N'system:social-client:query', 3, 1, 2448, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:43:12', N'1', N'2023-11-04 12:43:33', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付商户信息', -'SCHEMA', N'dbo', -'TABLE', N'pay_merchant' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2450, N'三方应用创建', N'system:social-client:create', 3, 2, 2448, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:43:58', N'1', N'2023-11-04 12:43:58', N'0') GO - - --- ---------------------------- --- Records of pay_merchant --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2451, N'三方应用更新', N'system:social-client:update', 3, 3, 2448, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:44:27', N'1', N'2023-11-04 12:44:27', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_merchant] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2452, N'三方应用删除', N'system:social-client:delete', 3, 4, 2448, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-04 12:44:43', N'1', N'2023-11-04 12:44:43', N'0') GO - -INSERT INTO [dbo].[pay_merchant] ([id], [no], [name], [short_name], [status], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'M233666999', N'芋道源码', N'芋艿', N'0', N'我是备注', N'', N'2021-10-23 08:31:14.0000000', N'', N'2022-02-27 04:15:20.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2453, N'三方用户', N'system:social-user:query', 2, 2, 2447, N'user', N'ep:avatar', N'system/social/user/index.vue', N'SocialUser', 0, N'1', N'1', N'1', N'1', N'2023-11-04 14:01:05', N'1', N'2023-11-04 14:01:05', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_merchant] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2472, N'主子表(内嵌)', N'', 2, 12, 1070, N'demo03-inner', N'fa:power-off', N'infra/demo/demo03/inner/index', N'Demo03StudentInner', 0, N'1', N'1', N'1', N'', N'2023-11-13 04:39:51', N'1', N'2023-11-16 23:53:46', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2478, N'单表(增删改查)', N'', 2, 1, 1070, N'demo01-contact', N'ep:bicycle', N'infra/demo/demo01/index', N'Demo01Contact', 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'1', N'2023-11-16 20:34:40', N'0') GO - - --- ---------------------------- --- Table structure for pay_notify_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_notify_log]') AND type IN ('U')) - DROP TABLE [dbo].[pay_notify_log] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2479, N'示例联系人查询', N'infra:demo01-contact:query', 3, 1, 2478, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'', N'2023-11-15 14:42:30', N'0') GO - -CREATE TABLE [dbo].[pay_notify_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [task_id] bigint NOT NULL, - [notify_times] tinyint NOT NULL, - [response] nvarchar(2048) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2480, N'示例联系人创建', N'infra:demo01-contact:create', 3, 2, 2478, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'', N'2023-11-15 14:42:30', N'0') GO - -ALTER TABLE [dbo].[pay_notify_log] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2481, N'示例联系人更新', N'infra:demo01-contact:update', 3, 3, 2478, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'', N'2023-11-15 14:42:30', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'日志编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2482, N'示例联系人删除', N'infra:demo01-contact:delete', 3, 4, 2478, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'', N'2023-11-15 14:42:30', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知任务编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'task_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2483, N'示例联系人导出', N'infra:demo01-contact:export', 3, 5, 2478, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-15 14:42:30', N'', N'2023-11-15 14:42:30', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'第几次被通知', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'notify_times' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2484, N'树表(增删改查)', N'', 2, 2, 1070, N'demo02-category', N'fa:tree', N'infra/demo/demo02/index', N'Demo02Category', 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'1', N'2023-11-16 20:35:01', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'请求参数', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'response' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2485, N'示例分类查询', N'infra:demo02-category:query', 3, 1, 2484, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'', N'2023-11-16 12:18:27', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2486, N'示例分类创建', N'infra:demo02-category:create', 3, 2, 2484, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'', N'2023-11-16 12:18:27', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2487, N'示例分类更新', N'infra:demo02-category:update', 3, 3, 2484, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'', N'2023-11-16 12:18:27', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2488, N'示例分类删除', N'infra:demo02-category:delete', 3, 4, 2484, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'', N'2023-11-16 12:18:27', N'0') +GO +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2489, N'示例分类导出', N'infra:demo02-category:export', 3, 5, 2484, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:18:27', N'', N'2023-11-16 12:18:27', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2490, N'主子表(标准)', N'', 2, 10, 1070, N'demo03-normal', N'fa:battery-3', N'infra/demo/demo03/normal/index', N'Demo03StudentNormal', 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'1', N'2023-11-16 23:10:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2491, N'学生查询', N'infra:demo03-student:query', 3, 1, 2490, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'', N'2023-11-16 12:53:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2492, N'学生创建', N'infra:demo03-student:create', 3, 2, 2490, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'', N'2023-11-16 12:53:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2493, N'学生更新', N'infra:demo03-student:update', 3, 3, 2490, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'', N'2023-11-16 12:53:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2494, N'学生删除', N'infra:demo03-student:delete', 3, 4, 2490, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'', N'2023-11-16 12:53:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付通知 App 的日志', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_log' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2495, N'学生导出', N'infra:demo03-student:export', 3, 5, 2490, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-16 12:53:37', N'', N'2023-11-16 12:53:37', N'0') GO - - --- ---------------------------- --- Records of pay_notify_log --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2497, N'主子表(ERP)', N'', 2, 11, 1070, N'demo03-erp', N'ep:calendar', N'infra/demo/demo03/erp/index', N'Demo03StudentERP', 0, N'1', N'1', N'1', N'', N'2023-11-16 15:50:59', N'1', N'2023-11-17 13:19:56', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_notify_log] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2516, N'客户公海配置', N'', 2, 0, 2524, N'customer-pool-config', N'ep:data-analysis', N'crm/customer/poolConfig/index', N'CrmCustomerPoolConfig', 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:31', N'1', N'2024-01-03 19:52:06', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_notify_log] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2517, N'客户公海配置保存', N'crm:customer-pool-config:update', 3, 1, 2516, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:31', N'', N'2023-11-18 13:33:31', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2518, N'客户限制配置', N'', 2, 1, 2524, N'customer-limit-config', N'ep:avatar', N'crm/customer/limitConfig/index', N'CrmCustomerLimitConfig', 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'1', N'2024-02-24 16:43:33', N'0') GO - - --- ---------------------------- --- Table structure for pay_notify_task --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_notify_task]') AND type IN ('U')) - DROP TABLE [dbo].[pay_notify_task] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2519, N'客户限制配置查询', N'crm:customer-limit-config:query', 3, 1, 2518, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'', N'2023-11-18 13:33:53', N'0') GO - -CREATE TABLE [dbo].[pay_notify_task] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [merchant_id] bigint NOT NULL, - [app_id] bigint NOT NULL, - [type] tinyint NOT NULL, - [data_id] bigint NOT NULL, - [status] tinyint NOT NULL, - [merchant_order_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [next_notify_time] datetime2(7) NOT NULL, - [last_execute_time] datetime2(7) NOT NULL, - [notify_times] tinyint NOT NULL, - [max_notify_times] tinyint NOT NULL, - [notify_url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2520, N'客户限制配置创建', N'crm:customer-limit-config:create', 3, 2, 2518, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'', N'2023-11-18 13:33:53', N'0') GO - -ALTER TABLE [dbo].[pay_notify_task] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2521, N'客户限制配置更新', N'crm:customer-limit-config:update', 3, 3, 2518, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'', N'2023-11-18 13:33:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'任务编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2522, N'客户限制配置删除', N'crm:customer-limit-config:delete', 3, 4, 2518, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'', N'2023-11-18 13:33:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'merchant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2523, N'客户限制配置导出', N'crm:customer-limit-config:export', 3, 5, 2518, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-11-18 13:33:53', N'', N'2023-11-18 13:33:53', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'app_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2524, N'系统配置', N'', 1, 999, 2397, N'config', N'ep:connection', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-11-18 21:58:00', N'1', N'2024-02-17 17:14:34', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知类型', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'type' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2525, N'WebSocket', N'', 2, 5, 2, N'websocket', N'ep:connection', N'infra/webSocket/index', N'InfraWebSocket', 0, N'1', N'1', N'1', N'1', N'2023-11-23 19:41:55', N'1', N'2024-04-23 00:02:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'data_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2526, N'产品管理', N'', 2, 80, 2397, N'product', N'fa:product-hunt', N'crm/product/index', N'CrmProduct', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:45:26', N'1', N'2024-02-20 20:36:20', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2527, N'产品查询', N'crm:product:query', 3, 1, 2526, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:47:16', N'1', N'2023-12-05 22:47:16', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户订单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'merchant_order_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2528, N'产品创建', N'crm:product:create', 3, 2, 2526, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:47:41', N'1', N'2023-12-05 22:47:48', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'下一次通知时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'next_notify_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2529, N'产品更新', N'crm:product:update', 3, 3, 2526, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:48:03', N'1', N'2023-12-05 22:48:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'最后一次执行时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'last_execute_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2530, N'产品删除', N'crm:product:delete', 3, 4, 2526, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:48:17', N'1', N'2023-12-05 22:48:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'当前通知次数', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'notify_times' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2531, N'产品导出', N'crm:product:export', 3, 5, 2526, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-05 22:48:29', N'1', N'2023-12-05 22:48:29', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'最大可通知次数', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'max_notify_times' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2532, N'产品分类配置', N'', 2, 3, 2524, N'product/category', N'fa-solid:window-restore', N'crm/product/category/index', N'CrmProductCategory', 0, N'1', N'1', N'1', N'1', N'2023-12-06 12:52:36', N'1', N'2023-12-06 12:52:51', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'异步通知地址', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'notify_url' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2533, N'产品分类查询', N'crm:product-category:query', 3, 1, 2532, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-06 12:53:23', N'1', N'2023-12-06 12:53:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2534, N'产品分类创建', N'crm:product-category:create', 3, 2, 2532, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-06 12:53:41', N'1', N'2023-12-06 12:53:41', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2535, N'产品分类更新', N'crm:product-category:update', 3, 3, 2532, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-06 12:53:59', N'1', N'2023-12-06 12:53:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2536, N'产品分类删除', N'crm:product-category:delete', 3, 4, 2532, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2023-12-06 12:54:14', N'1', N'2023-12-06 12:54:14', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2543, N'关联商机', N'crm:contact:create-business', 3, 10, 2416, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-02 17:28:25', N'1', N'2024-01-02 17:28:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2544, N'取关商机', N'crm:contact:delete-business', 3, 11, 2416, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-02 17:28:43', N'1', N'2024-01-02 17:28:51', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2545, N'商品统计', N'', 2, 3, 2358, N'product', N'fa:product-hunt', N'mall/statistics/product/index', N'ProductStatistics', 0, N'1', N'1', N'1', N'', N'2023-12-15 18:54:28', N'1', N'2024-02-26 20:41:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户支付、退款等的通知 -', -'SCHEMA', N'dbo', -'TABLE', N'pay_notify_task' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2546, N'客户公海', N'', 2, 30, 2397, N'customer/pool', N'fa-solid:swimming-pool', N'crm/customer/pool/index', N'CrmCustomerPool', 0, N'1', N'1', N'1', N'1', N'2024-01-15 21:29:34', N'1', N'2024-02-17 17:14:18', N'0') GO - - --- ---------------------------- --- Records of pay_notify_task --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2547, N'订单查询', N'trade:order:query', 3, 1, 2076, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-16 08:52:00', N'1', N'2024-01-16 08:52:00', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_notify_task] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2548, N'订单更新', N'trade:order:update', 3, 2, 2076, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-16 08:52:21', N'1', N'2024-01-16 08:52:21', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_notify_task] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2549, N'支付&退款案例', N'', 2, 1, 2161, N'order', N'fa:paypal', N'pay/demo/order/index', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-18 23:45:00', N'1', N'2024-01-18 23:47:21', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2550, N'转账案例', N'', 2, 2, 2161, N'transfer', N'fa:transgender-alt', N'pay/demo/transfer/index', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-18 23:51:16', N'1', N'2024-01-18 23:51:16', N'0') GO - - --- ---------------------------- --- Table structure for pay_order --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_order]') AND type IN ('U')) - DROP TABLE [dbo].[pay_order] -GO - -CREATE TABLE [dbo].[pay_order] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [merchant_id] bigint NOT NULL, - [app_id] bigint NOT NULL, - [channel_id] bigint NULL, - [channel_code] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [merchant_order_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [subject] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [body] nvarchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [notify_url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [notify_status] tinyint NOT NULL, - [amount] bigint NOT NULL, - [channel_fee_rate] float(53) NULL, - [channel_fee_amount] bigint NULL, - [status] tinyint NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [expire_time] datetime2(7) NOT NULL, - [success_time] datetime2(7) NULL, - [notify_time] datetime2(7) NULL, - [success_extension_id] bigint NULL, - [refund_status] tinyint NOT NULL, - [refund_times] tinyint NOT NULL, - [refund_amount] bigint NOT NULL, - [channel_user_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_order_no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2551, N'钱包管理', N'', 1, 4, 1117, N'wallet', N'ep:wallet', N'', N'', 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'1', N'2024-02-29 08:58:54', N'0') GO - -ALTER TABLE [dbo].[pay_order] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2552, N'充值套餐', N'', 2, 2, 2551, N'wallet-recharge-package', N'fa:leaf', N'pay/wallet/rechargePackage/index', N'WalletRechargePackage', 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2553, N'钱包充值套餐查询', N'pay:wallet-recharge-package:query', 3, 1, 2552, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'merchant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2554, N'钱包充值套餐创建', N'pay:wallet-recharge-package:create', 3, 2, 2552, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'app_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2555, N'钱包充值套餐更新', N'pay:wallet-recharge-package:update', 3, 3, 2552, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2556, N'钱包充值套餐删除', N'pay:wallet-recharge-package:delete', 3, 4, 2552, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_code' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2557, N'钱包余额', N'', 2, 1, 2551, N'wallet-balance', N'fa:leaf', N'pay/wallet/balance/index', N'WalletBalance', 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户订单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'merchant_order_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2558, N'钱包余额查询', N'pay:wallet:query', 3, 1, 2557, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商品标题', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'subject' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2559, N'转账订单', N'', 2, 3, 1117, N'transfer', N'ep:credit-card', N'pay/transfer/index', N'PayTransfer', 0, N'1', N'1', N'1', N'', N'2023-12-29 02:32:54', N'', N'2023-12-29 02:32:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商品描述', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'body' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2560, N'数据统计', N'', 1, 200, 2397, N'statistics', N'ep:data-line', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-01-26 22:50:35', N'1', N'2024-02-24 20:10:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'异步通知地址', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'notify_url' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2561, N'排行榜', N'crm:statistics-rank:query', 2, 1, 2560, N'ranking', N'fa:area-chart', N'crm/statistics/rank/index', N'CrmStatisticsRank', 0, N'1', N'1', N'1', N'1', N'2024-01-26 22:52:09', N'1', N'2024-04-24 19:39:11', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知商户支付结果的回调状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'notify_status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2562, N'客户导入', N'crm:customer:import', 3, 6, 2391, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-01 13:09:00', N'1', N'2024-02-01 13:09:05', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付金额,单位:分', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'amount' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2563, N'ERP 系统', N'', 1, 300, 0, N'/erp', N'fa-solid:store', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-04 15:37:25', N'1', N'2024-02-04 15:37:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道手续费,单位:百分比', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_fee_rate' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2564, N'产品管理', N'', 1, 40, 2563, N'product', N'fa:product-hunt', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-04 15:38:43', N'1', N'2024-02-04 15:38:43', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道手续金额,单位:分', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_fee_amount' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2565, N'产品信息', N'', 2, 0, 2564, N'product', N'fa-solid:apple-alt', N'erp/product/product/index', N'ErpProduct', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-05 14:42:11', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2566, N'产品查询', N'erp:product:query', 3, 1, 2565, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-04 17:21:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'user_ip' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2567, N'产品创建', N'erp:product:create', 3, 2, 2565, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-04 17:22:12', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'订单失效时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'expire_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2568, N'产品更新', N'erp:product:update', 3, 3, 2565, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-04 17:22:16', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'订单支付成功时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'success_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2569, N'产品删除', N'erp:product:delete', 3, 4, 2565, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-04 17:22:22', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'订单支付通知时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'notify_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2570, N'产品导出', N'erp:product:export', 3, 5, 2565, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-02-04 07:52:15', N'1', N'2024-02-04 17:22:26', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付成功的订单拓展单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'success_extension_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2571, N'产品分类', N'', 2, 1, 2564, N'product-category', N'fa:certificate', N'erp/product/category/index', N'ErpProductCategory', 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'1', N'2024-02-04 17:24:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'refund_status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2572, N'分类查询', N'erp:product-category:query', 3, 1, 2571, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'', N'2024-02-04 09:21:04', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款次数', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'refund_times' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2573, N'分类创建', N'erp:product-category:create', 3, 2, 2571, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'', N'2024-02-04 09:21:04', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款总金额,单位:分', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'refund_amount' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2574, N'分类更新', N'erp:product-category:update', 3, 3, 2571, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'', N'2024-02-04 09:21:04', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道用户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_user_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2575, N'分类删除', N'erp:product-category:delete', 3, 4, 2571, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'', N'2024-02-04 09:21:04', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道订单号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'channel_order_no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2576, N'分类导出', N'erp:product-category:export', 3, 5, 2571, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 09:21:04', N'', N'2024-02-04 09:21:04', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2577, N'产品单位', N'', 2, 2, 2564, N'unit', N'ep:opportunity', N'erp/product/unit/index', N'ErpProductUnit', 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'1', N'2024-02-04 19:54:37', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2578, N'单位查询', N'erp:product-unit:query', 3, 1, 2577, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'', N'2024-02-04 11:54:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2579, N'单位创建', N'erp:product-unit:create', 3, 2, 2577, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'', N'2024-02-04 11:54:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2580, N'单位更新', N'erp:product-unit:update', 3, 3, 2577, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'', N'2024-02-04 11:54:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2581, N'单位删除', N'erp:product-unit:delete', 3, 4, 2577, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'', N'2024-02-04 11:54:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_order', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2582, N'单位导出', N'erp:product-unit:export', 3, 5, 2577, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 11:54:08', N'', N'2024-02-04 11:54:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单 -', -'SCHEMA', N'dbo', -'TABLE', N'pay_order' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2583, N'库存管理', N'', 1, 30, 2563, N'stock', N'fa:window-restore', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-05 00:29:37', N'1', N'2024-02-05 00:29:37', N'0') GO - - --- ---------------------------- --- Records of pay_order --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2584, N'仓库信息', N'', 2, 0, 2583, N'warehouse', N'ep:house', N'erp/stock/warehouse/index', N'ErpWarehouse', 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'1', N'2024-02-05 01:12:53', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_order] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2585, N'仓库查询', N'erp:warehouse:query', 3, 1, 2584, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'', N'2024-02-04 17:12:09', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_order] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2586, N'仓库创建', N'erp:warehouse:create', 3, 2, 2584, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'', N'2024-02-04 17:12:09', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2587, N'仓库更新', N'erp:warehouse:update', 3, 3, 2584, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'', N'2024-02-04 17:12:09', N'0') GO - - --- ---------------------------- --- Table structure for pay_order_extension --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_order_extension]') AND type IN ('U')) - DROP TABLE [dbo].[pay_order_extension] +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2588, N'仓库删除', N'erp:warehouse:delete', 3, 4, 2584, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'', N'2024-02-04 17:12:09', N'0') GO - -CREATE TABLE [dbo].[pay_order_extension] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [order_id] bigint NOT NULL, - [channel_id] bigint NOT NULL, - [channel_code] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [channel_extras] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_notify_data] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2589, N'仓库导出', N'erp:warehouse:export', 3, 5, 2584, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-04 17:12:09', N'', N'2024-02-04 17:12:09', N'0') GO - -ALTER TABLE [dbo].[pay_order_extension] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2590, N'产品库存', N'', 2, 1, 2583, N'stock', N'ep:coffee', N'erp/stock/stock/index', N'ErpStock', 0, N'1', N'1', N'1', N'', N'2024-02-05 06:40:50', N'1', N'2024-02-05 14:42:44', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2591, N'库存查询', N'erp:stock:query', 3, 1, 2590, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 06:40:50', N'', N'2024-02-05 06:40:50', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2592, N'库存导出', N'erp:stock:export', 3, 5, 2590, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 06:40:50', N'', N'2024-02-05 06:40:50', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'order_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2593, N'出入库明细', N'', 2, 2, 2583, N'record', N'fa-solid:blog', N'erp/stock/record/index', N'ErpStockRecord', 0, N'1', N'1', N'1', N'', N'2024-02-05 10:27:21', N'1', N'2024-02-06 17:26:11', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'channel_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2594, N'库存明细查询', N'erp:stock-record:query', 3, 1, 2593, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 10:27:21', N'', N'2024-02-05 10:27:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'channel_code' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2595, N'库存明细导出', N'erp:stock-record:export', 3, 5, 2593, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 10:27:21', N'', N'2024-02-05 10:27:21', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'user_ip' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2596, N'其它入库', N'', 2, 3, 2583, N'in', N'ep:zoom-in', N'erp/stock/in/index', N'ErpStockIn', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-07 19:06:51', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2597, N'其它入库单查询', N'erp:stock-in:query', 3, 1, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付渠道的额外参数', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'channel_extras' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2598, N'其它入库单创建', N'erp:stock-in:create', 3, 2, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付渠道异步通知的内容', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'channel_notify_data' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2599, N'其它入库单更新', N'erp:stock-in:update', 3, 3, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2600, N'其它入库单删除', N'erp:stock-in:delete', 3, 4, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2601, N'其它入库单导出', N'erp:stock-in:export', 3, 5, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2602, N'采购管理', N'', 1, 10, 2563, N'purchase', N'fa:buysellads', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-06 16:01:01', N'1', N'2024-02-06 16:01:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2603, N'供应商信息', N'', 2, 4, 2602, N'supplier', N'fa:superpowers', N'erp/purchase/supplier/index', N'ErpSupplier', 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'1', N'2024-02-06 16:22:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2604, N'供应商查询', N'erp:supplier:query', 3, 1, 2603, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'', N'2024-02-06 08:21:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2605, N'供应商创建', N'erp:supplier:create', 3, 2, 2603, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'', N'2024-02-06 08:21:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单 -', -'SCHEMA', N'dbo', -'TABLE', N'pay_order_extension' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2606, N'供应商更新', N'erp:supplier:update', 3, 3, 2603, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'', N'2024-02-06 08:21:55', N'0') GO - - --- ---------------------------- --- Records of pay_order_extension --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2607, N'供应商删除', N'erp:supplier:delete', 3, 4, 2603, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'', N'2024-02-06 08:21:55', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_order_extension] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2608, N'供应商导出', N'erp:supplier:export', 3, 5, 2603, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-06 08:21:55', N'', N'2024-02-06 08:21:55', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_order_extension] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2609, N'其它入库单审批', N'erp:stock-in:update-status', 3, 6, 2596, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-05 16:08:56', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2610, N'其它出库', N'', 2, 4, 2583, N'out', N'ep:zoom-out', N'erp/stock/out/index', N'ErpStockOut', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-07 19:06:55', N'0') GO - - --- ---------------------------- --- Table structure for pay_refund --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[pay_refund]') AND type IN ('U')) - DROP TABLE [dbo].[pay_refund] -GO - -CREATE TABLE [dbo].[pay_refund] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [merchant_id] bigint NOT NULL, - [app_id] bigint NOT NULL, - [channel_id] bigint NOT NULL, - [channel_code] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [order_id] bigint NOT NULL, - [trade_no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [merchant_order_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [merchant_refund_no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [notify_url] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [notify_status] tinyint NOT NULL, - [status] tinyint NOT NULL, - [type] tinyint NOT NULL, - [pay_amount] bigint NOT NULL, - [refund_amount] bigint NOT NULL, - [reason] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_order_no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [channel_refund_no] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_error_code] nvarchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_error_msg] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [channel_extras] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [expire_time] datetime2(7) NULL, - [success_time] datetime2(7) NULL, - [notify_time] datetime2(7) NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2611, N'其它出库单查询', N'erp:stock-out:query', 3, 1, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:39', N'0') GO - -ALTER TABLE [dbo].[pay_refund] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2612, N'其它出库单创建', N'erp:stock-out:create', 3, 2, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:42', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付退款编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2613, N'其它出库单更新', N'erp:stock-out:update', 3, 3, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:44', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'merchant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2614, N'其它出库单删除', N'erp:stock-out:delete', 3, 4, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:56', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'app_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2615, N'其它出库单导出', N'erp:stock-out:export', 3, 5, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2616, N'其它出库单审批', N'erp:stock-out:update-status', 3, 6, 2610, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 06:43:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_code' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2617, N'销售管理', N'', 1, 20, 2563, N'sale', N'fa:sellsy', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-07 15:12:32', N'1', N'2024-02-07 15:12:32', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付订单编号 pay_order 表id', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'order_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2618, N'客户信息', N'', 2, 4, 2617, N'customer', N'ep:avatar', N'erp/sale/customer/index', N'ErpCustomer', 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'1', N'2024-02-07 15:22:25', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'交易订单号 pay_extension 表no 字段', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'trade_no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2619, N'客户查询', N'erp:customer:query', 3, 1, 2618, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'', N'2024-02-07 07:21:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户订单编号(商户系统生成)', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'merchant_order_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2620, N'客户创建', N'erp:customer:create', 3, 2, 2618, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'', N'2024-02-07 07:21:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'商户退款订单号(商户系统生成)', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'merchant_refund_no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2621, N'客户更新', N'erp:customer:update', 3, 3, 2618, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'', N'2024-02-07 07:21:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'异步通知商户地址', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'notify_url' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2622, N'客户删除', N'erp:customer:delete', 3, 4, 2618, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'', N'2024-02-07 07:21:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知商户退款结果的回调状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'notify_status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2623, N'客户导出', N'erp:customer:export', 3, 5, 2618, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-07 07:21:45', N'', N'2024-02-07 07:21:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款状态', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2624, N'库存调拨', N'', 2, 5, 2583, N'move', N'ep:folder-remove', N'erp/stock/move/index', N'ErpStockMove', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-16 18:53:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款类型(部分退款,全部退款)', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'type' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2625, N'库存调度单查询', N'erp:stock-move:query', 3, 1, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付金额,单位分', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'pay_amount' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2626, N'库存调度单创建', N'erp:stock-move:create', 3, 2, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款金额,单位分', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'refund_amount' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2627, N'库存调度单更新', N'erp:stock-move:update', 3, 3, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款原因', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'reason' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2628, N'库存调度单删除', N'erp:stock-move:delete', 3, 4, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'user_ip' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2629, N'库存调度单导出', N'erp:stock-move:export', 3, 5, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道订单号,pay_order 中的channel_order_no 对应', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_order_no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2630, N'库存调度单审批', N'erp:stock-move:update-status', 3, 6, 2624, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:13:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道退款单号,渠道返回', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_refund_no' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2631, N'库存盘点', N'', 2, 6, 2583, N'check', N'ep:circle-check-filled', N'erp/stock/check/index', N'ErpStockCheck', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-08 08:31:09', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道调用报错时,错误码', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_error_code' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2632, N'库存盘点单查询', N'erp:stock-check:query', 3, 1, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道调用报错时,错误信息', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_error_msg' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2633, N'库存盘点单创建', N'erp:stock-check:create', 3, 2, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'支付渠道的额外参数', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'channel_extras' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2634, N'库存盘点单更新', N'erp:stock-check:update', 3, 3, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款失效时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'expire_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2635, N'库存盘点单删除', N'erp:stock-check:delete', 3, 4, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款成功时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'success_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2636, N'库存盘点单导出', N'erp:stock-check:export', 3, 5, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款通知时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'notify_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2637, N'库存盘点单审批', N'erp:stock-check:update-status', 3, 6, 2631, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:13:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2638, N'销售订单', N'', 2, 1, 2617, N'order', N'fa:first-order', N'erp/sale/order/index', N'ErpSaleOrder', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-10 21:59:20', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2639, N'销售订单查询', N'erp:sale-order:query', 3, 1, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2640, N'销售订单创建', N'erp:sale-order:create', 3, 2, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2641, N'销售订单更新', N'erp:sale-order:update', 3, 3, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2642, N'销售订单删除', N'erp:sale-order:delete', 3, 4, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2643, N'销售订单导出', N'erp:sale-order:export', 3, 5, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'退款订单', -'SCHEMA', N'dbo', -'TABLE', N'pay_refund' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2644, N'销售订单审批', N'erp:sale-order:update-status', 3, 6, 2638, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:13:03', N'0') GO - - --- ---------------------------- --- Records of pay_refund --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2645, N'财务管理', N'', 1, 50, 2563, N'finance', N'ep:money', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-10 08:05:58', N'1', N'2024-02-10 08:06:07', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_refund] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2646, N'结算账户', N'', 2, 10, 2645, N'account', N'fa:universal-access', N'erp/finance/account/index', N'ErpAccount', 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'1', N'2024-02-14 08:24:31', N'0') GO - -SET IDENTITY_INSERT [dbo].[pay_refund] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2647, N'结算账户查询', N'erp:account:query', 3, 1, 2646, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'', N'2024-02-10 00:15:07', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2648, N'结算账户创建', N'erp:account:create', 3, 2, 2646, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'', N'2024-02-10 00:15:07', N'0') GO - - --- ---------------------------- --- Table structure for system_dept --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_dept]') AND type IN ('U')) - DROP TABLE [dbo].[system_dept] -GO - -CREATE TABLE [dbo].[system_dept] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [parent_id] bigint NOT NULL, - [sort] int NOT NULL, - [leader_user_id] bigint NULL, - [phone] nvarchar(11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [email] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2649, N'结算账户更新', N'erp:account:update', 3, 3, 2646, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'', N'2024-02-10 00:15:07', N'0') GO - -ALTER TABLE [dbo].[system_dept] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2650, N'结算账户删除', N'erp:account:delete', 3, 4, 2646, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'', N'2024-02-10 00:15:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'部门id', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2651, N'结算账户导出', N'erp:account:export', 3, 5, 2646, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-10 00:15:07', N'', N'2024-02-10 00:15:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'部门名称', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'name' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2652, N'销售出库', N'', 2, 2, 2617, N'out', N'ep:sold-out', N'erp/sale/out/index', N'ErpSaleOut', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-10 22:02:07', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'父部门id', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'parent_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2653, N'销售出库查询', N'erp:sale-out:query', 3, 1, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'显示顺序', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'sort' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2654, N'销售出库创建', N'erp:sale-out:create', 3, 2, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'负责人', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'leader_user_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2655, N'销售出库更新', N'erp:sale-out:update', 3, 3, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'联系电话', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'phone' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2656, N'销售出库删除', N'erp:sale-out:delete', 3, 4, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'邮箱', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'email' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2657, N'销售出库导出', N'erp:sale-out:export', 3, 5, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'部门状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2658, N'销售出库审批', N'erp:sale-out:update-status', 3, 6, 2652, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:13:03', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2659, N'销售退货', N'', 2, 3, 2617, N'return', N'fa-solid:bone', N'erp/sale/return/index', N'ErpSaleReturn', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-12 06:12:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2660, N'销售退货查询', N'erp:sale-return:query', 3, 1, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:49', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2661, N'销售退货创建', N'erp:sale-return:create', 3, 2, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:52', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2662, N'销售退货更新', N'erp:sale-return:update', 3, 3, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:55', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'tenant_id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2663, N'销售退货删除', N'erp:sale-return:delete', 3, 4, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:57', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_dept', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2664, N'销售退货导出', N'erp:sale-return:export', 3, 5, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:12:59', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'部门表', -'SCHEMA', N'dbo', -'TABLE', N'system_dept' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2665, N'销售退货审批', N'erp:sale-return:update-status', 3, 6, 2659, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-07 11:13:03', N'0') GO - - --- ---------------------------- --- Records of system_dept --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2666, N'采购订单', N'', 2, 1, 2602, N'order', N'fa-solid:border-all', N'erp/purchase/order/index', N'ErpPurchaseOrder', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-12 08:51:49', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_dept] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2667, N'采购订单查询', N'erp:purchase-order:query', 3, 1, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:17', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'100', N'芋道源码', N'0', N'0', N'1', N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'103', N'2022-01-14 01:04:05.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2668, N'采购订单创建', N'erp:purchase-order:create', 3, 2, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:54', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'101', N'深圳总公司', N'100', N'1', N'104', N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'1', N'2022-02-22 19:47:48.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2669, N'采购订单更新', N'erp:purchase-order:update', 3, 3, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:58', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'102', N'长沙分公司', N'100', N'2', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'', N'2021-12-15 05:01:40.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2670, N'采购订单删除', N'erp:purchase-order:delete', 3, 4, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:00', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'103', N'研发部门', N'101', N'1', N'104', N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'103', N'2022-01-14 01:04:14.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2671, N'采购订单导出', N'erp:purchase-order:export', 3, 5, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:05', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'104', N'市场部门', N'101', N'2', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'', N'2021-12-15 05:01:38.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2672, N'采购订单审批', N'erp:purchase-order:update-status', 3, 6, 2666, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:08', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'105', N'测试部门', N'101', N'3', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'', N'2021-12-15 05:01:37.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2673, N'采购入库', N'', 2, 2, 2602, N'in', N'fa-solid:gopuram', N'erp/purchase/in/index', N'ErpPurchaseIn', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-12 11:19:27', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'106', N'财务部门', N'101', N'4', N'103', N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'103', N'2022-01-15 21:32:22.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2674, N'采购入库查询', N'erp:purchase-in:query', 3, 1, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:17', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'107', N'运维部门', N'101', N'5', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'', N'2021-12-15 05:01:33.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2675, N'采购入库创建', N'erp:purchase-in:create', 3, 2, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:54', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'108', N'市场部门', N'102', N'1', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'1', N'2022-02-16 08:35:45.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2676, N'采购入库更新', N'erp:purchase-in:update', 3, 3, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:58', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'109', N'财务部门', N'102', N'2', NULL, N'15888888888', N'ry@qq.com', N'0', N'admin', N'2021-01-05 17:03:47.0000000', N'', N'2021-12-15 05:01:29.0000000', N'1', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2677, N'采购入库删除', N'erp:purchase-in:delete', 3, 4, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:00', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'110', N'新部门', N'0', N'1', NULL, NULL, NULL, N'0', N'110', N'2022-02-23 20:46:30.0000000', N'110', N'2022-02-23 20:46:30.0000000', N'121', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2678, N'采购入库导出', N'erp:purchase-in:export', 3, 5, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:05', N'0') GO - -INSERT INTO [dbo].[system_dept] ([id], [name], [parent_id], [sort], [leader_user_id], [phone], [email], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'111', N'顶级部门', N'0', N'1', NULL, NULL, NULL, N'0', N'113', N'2022-03-07 21:44:50.0000000', N'113', N'2022-03-07 21:44:50.0000000', N'122', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2679, N'采购入库审批', N'erp:purchase-in:update-status', 3, 6, 2673, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:08', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_dept] OFF +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2680, N'采购退货', N'', 2, 3, 2602, N'return', N'ep:minus', N'erp/purchase/return/index', N'ErpPurchaseReturn', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-12 20:51:02', N'0') GO - -COMMIT +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2681, N'采购退货查询', N'erp:purchase-return:query', 3, 1, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:17', N'0') GO - - --- ---------------------------- --- Table structure for system_dict_data --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_dict_data]') AND type IN ('U')) - DROP TABLE [dbo].[system_dict_data] -GO - -CREATE TABLE [dbo].[system_dict_data] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [sort] int NOT NULL, - [label] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [value] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [dict_type] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [color_type] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [css_class] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2682, N'采购退货创建', N'erp:purchase-return:create', 3, 2, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:54', N'0') GO - -ALTER TABLE [dbo].[system_dict_data] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2683, N'采购退货更新', N'erp:purchase-return:update', 3, 3, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典编码', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'id' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2684, N'采购退货删除', N'erp:purchase-return:delete', 3, 4, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典排序', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'sort' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2685, N'采购退货导出', N'erp:purchase-return:export', 3, 5, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:05', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典标签', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'label' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2686, N'采购退货审批', N'erp:purchase-return:update-status', 3, 6, 2680, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典键值', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'value' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2687, N'付款单', N'', 2, 1, 2645, N'payment', N'ep:caret-right', N'erp/finance/payment/index', N'ErpFinancePayment', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-14 08:24:23', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典类型', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'dict_type' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2688, N'付款单查询', N'erp:finance-payment:query', 3, 1, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'status' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2689, N'付款单创建', N'erp:finance-payment:create', 3, 2, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'颜色类型', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'color_type' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2690, N'付款单更新', N'erp:finance-payment:update', 3, 3, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'css 样式', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'css_class' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2691, N'付款单删除', N'erp:finance-payment:delete', 3, 4, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:00', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'remark' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2692, N'付款单导出', N'erp:finance-payment:export', 3, 5, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:05', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'creator' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2693, N'付款单审批', N'erp:finance-payment:update-status', 3, 6, 2687, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:08', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'create_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2694, N'收款单', N'', 2, 2, 2645, N'receipt', N'ep:expand', N'erp/finance/receipt/index', N'ErpFinanceReceipt', 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'1', N'2024-02-15 19:35:45', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'updater' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2695, N'收款单查询', N'erp:finance-receipt:query', 3, 1, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:17', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'update_time' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2696, N'收款单创建', N'erp:finance-receipt:create', 3, 2, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:54', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data', -'COLUMN', N'deleted' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2697, N'收款单更新', N'erp:finance-receipt:update', 3, 3, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:44:58', N'0') GO - -EXEC sp_addextendedproperty -'MS_Description', N'字典数据表', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_data' +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2698, N'收款单删除', N'erp:finance-receipt:delete', 3, 4, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:00', N'0') GO - - --- ---------------------------- --- Records of system_dict_data --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2699, N'收款单导出', N'erp:finance-receipt:export', 3, 5, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:05', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_dict_data] ON +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2700, N'收款单审批', N'erp:finance-receipt:update-status', 3, 6, 2694, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-02-05 16:08:56', N'', N'2024-02-12 00:45:08', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'1', N'男', N'1', N'system_user_sex', N'0', N'default', N'A', N'性别男', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-03-29 00:14:39.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2701, N'待办事项', N'', 2, 0, 2397, N'backlog', N'fa-solid:tasks', N'crm/backlog/index', N'CrmBacklog', 0, N'1', N'1', N'1', N'1', N'2024-02-17 17:17:11', N'1', N'2024-02-17 17:17:11', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'2', N'2', N'女', N'2', N'system_user_sex', N'1', N'success', N'', N'性别女', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 01:30:51.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2702, N'ERP 首页', N'erp:statistics:query', 2, 0, 2563, N'home', N'ep:home-filled', N'erp/home/index.vue', N'ErpHome', 0, N'1', N'1', N'1', N'1', N'2024-02-18 16:49:40', N'1', N'2024-02-26 21:12:18', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'8', N'1', N'正常', N'1', N'infra_job_status', N'0', N'success', N'', N'正常状态', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 19:33:38.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2703, N'商机状态配置', N'', 2, 4, 2524, N'business-status', N'fa-solid:charging-station', N'crm/business/status/index', N'CrmBusinessStatus', 0, N'1', N'1', N'1', N'1', N'2024-02-21 20:15:17', N'1', N'2024-02-21 20:15:17', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'9', N'2', N'暂停', N'2', N'infra_job_status', N'0', N'danger', N'', N'停用状态', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 19:33:45.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2704, N'商机状态查询', N'crm:business-status:query', 3, 1, 2703, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-21 20:35:36', N'1', N'2024-02-21 20:36:06', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'12', N'1', N'系统内置', N'1', N'infra_config_type', N'0', N'danger', N'', N'参数类型 - 系统内置', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 19:06:02.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2705, N'商机状态创建', N'crm:business-status:create', 3, 2, 2703, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-21 20:35:57', N'1', N'2024-02-21 20:35:57', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'13', N'2', N'自定义', N'2', N'infra_config_type', N'0', N'primary', N'', N'参数类型 - 自定义', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 19:06:07.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2706, N'商机状态更新', N'crm:business-status:update', 3, 3, 2703, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-21 20:36:21', N'1', N'2024-02-21 20:36:21', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'14', N'1', N'通知', N'1', N'system_notice_type', N'0', N'success', N'', N'通知', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 13:05:57.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2707, N'商机状态删除', N'crm:business-status:delete', 3, 4, 2703, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-21 20:36:36', N'1', N'2024-02-21 20:36:36', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'15', N'2', N'公告', N'2', N'system_notice_type', N'0', N'info', N'', N'公告', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 13:06:01.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2708, N'合同配置', N'', 2, 5, 2524, N'contract-config', N'ep:connection', N'crm/contract/config/index', N'CrmContractConfig', 0, N'1', N'1', N'1', N'1', N'2024-02-24 16:44:40', N'1', N'2024-02-24 16:44:48', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'16', N'0', N'其它', N'0', N'system_operate_type', N'0', N'default', N'', N'其它操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:32:46.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2709, N'客户公海配置查询', N'crm:customer-pool-config:query', 3, 2, 2516, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-24 16:45:19', N'1', N'2024-02-24 16:45:28', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'17', N'1', N'查询', N'1', N'system_operate_type', N'0', N'info', N'', N'查询操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:16.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2710, N'合同配置更新', N'crm:contract-config:update', 3, 1, 2708, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-24 16:45:56', N'1', N'2024-02-24 16:45:56', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'18', N'2', N'新增', N'2', N'system_operate_type', N'0', N'primary', N'', N'新增操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:13.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2711, N'合同配置查询', N'crm:contract-config:query', 3, 2, 2708, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-02-24 16:46:16', N'1', N'2024-02-24 16:46:16', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'19', N'3', N'修改', N'3', N'system_operate_type', N'0', N'warning', N'', N'修改操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:22.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2712, N'客户分析', N'crm:statistics-customer:query', 2, 0, 2560, N'customer', N'ep:avatar', N'views/crm/statistics/customer/index.vue', N'CrmStatisticsCustomer', 0, N'1', N'1', N'1', N'1', N'2024-03-09 16:43:56', N'1', N'2024-04-24 19:42:52', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'20', N'4', N'删除', N'4', N'system_operate_type', N'0', N'danger', N'', N'删除操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:27.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2713, N'抄送我的', N'bpm:process-instance-cc:query', 2, 30, 1200, N'copy', N'ep:copy-document', N'bpm/task/copy/index', N'BpmProcessInstanceCopy', 0, N'1', N'1', N'1', N'1', N'2024-03-17 21:50:23', N'1', N'2024-04-24 19:55:12', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'22', N'5', N'导出', N'5', N'system_operate_type', N'0', N'default', N'', N'导出操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:32.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2714, N'流程分类', N'', 2, 3, 1186, N'category', N'fa:object-ungroup', N'bpm/category/index', N'BpmCategory', 0, N'1', N'1', N'1', N'', N'2024-03-08 02:00:51', N'1', N'2024-03-21 23:51:18', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'23', N'6', N'导入', N'6', N'system_operate_type', N'0', N'default', N'', N'导入操作', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:33:35.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2715, N'分类查询', N'bpm:category:query', 3, 1, 2714, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-03-08 02:00:51', N'1', N'2024-03-19 14:36:25', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'27', N'1', N'开启', N'0', N'common_status', N'0', N'primary', N'', N'开启状态', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 08:00:39.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2716, N'分类创建', N'bpm:category:create', 3, 2, 2714, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-03-08 02:00:51', N'1', N'2024-03-19 14:36:31', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'28', N'2', N'关闭', N'1', N'common_status', N'0', N'info', N'', N'关闭状态', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 08:00:44.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2717, N'分类更新', N'bpm:category:update', 3, 3, 2714, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-03-08 02:00:51', N'1', N'2024-03-19 14:36:35', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'29', N'1', N'目录', N'1', N'system_menu_type', N'0', N'', N'', N'目录', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:43:45.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2718, N'分类删除', N'bpm:category:delete', 3, 4, 2714, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'', N'2024-03-08 02:00:51', N'1', N'2024-03-19 14:36:41', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'30', N'2', N'菜单', N'2', N'system_menu_type', N'0', N'', N'', N'菜单', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:43:41.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2720, N'发起流程', N'', 2, 0, 1200, N'create', N'fa-solid:grin-stars', N'bpm/processInstance/create/index', N'BpmProcessInstanceCreate', 0, N'1', N'0', N'1', N'1', N'2024-03-19 19:46:05', N'1', N'2024-03-23 19:03:42', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'31', N'3', N'按钮', N'3', N'system_menu_type', N'0', N'', N'', N'按钮', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:43:39.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2721, N'流程实例', N'', 2, 10, 1186, N'process-instance/manager', N'fa:square', N'bpm/processInstance/manager/index', N'BpmProcessInstanceManager', 0, N'1', N'1', N'1', N'1', N'2024-03-21 23:57:30', N'1', N'2024-03-21 23:57:30', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'32', N'1', N'内置', N'1', N'system_role_type', N'0', N'danger', N'', N'内置角色', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 13:02:08.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2722, N'流程实例的查询(管理员)', N'bpm:process-instance:manager-query', 3, 1, 2721, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-03-22 08:18:27', N'1', N'2024-03-22 08:19:05', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'33', N'2', N'自定义', N'2', N'system_role_type', N'0', N'primary', N'', N'自定义角色', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 13:02:12.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2723, N'流程实例的取消(管理员)', N'bpm:process-instance:cancel-by-admin', 3, 2, 2721, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-03-22 08:19:25', N'1', N'2024-03-22 08:19:25', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'34', N'1', N'全部数据权限', N'1', N'system_data_scope', N'0', N'', N'', N'全部数据权限', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:47:17.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2724, N'流程任务', N'', 2, 11, 1186, N'process-tasnk', N'ep:collection-tag', N'bpm/task/manager/index', N'BpmManagerTask', 0, N'1', N'1', N'1', N'1', N'2024-03-22 08:43:22', N'1', N'2024-03-22 08:43:27', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'35', N'2', N'指定部门数据权限', N'2', N'system_data_scope', N'0', N'', N'', N'指定部门数据权限', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:47:18.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2725, N'流程任务的查询(管理员)', N'bpm:task:mananger-query', 3, 1, 2724, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-03-22 08:43:49', N'1', N'2024-03-22 08:43:49', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'36', N'3', N'本部门数据权限', N'3', N'system_data_scope', N'0', N'', N'', N'本部门数据权限', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:47:16.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2726, N'流程监听器', N'', 2, 5, 1186, N'process-listener', N'fa:assistive-listening-systems', N'bpm/processListener/index', N'BpmProcessListener', 0, N'1', N'1', N'1', N'', N'2024-03-09 16:05:34', N'1', N'2024-03-23 13:13:38', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'37', N'4', N'本部门及以下数据权限', N'4', N'system_data_scope', N'0', N'', N'', N'本部门及以下数据权限', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:47:21.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2727, N'流程监听器查询', N'bpm:process-listener:query', 3, 1, 2726, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 16:05:34', N'', N'2024-03-09 16:05:34', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'38', N'5', N'仅本人数据权限', N'5', N'system_data_scope', N'0', N'', N'', N'仅本人数据权限', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:47:23.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2728, N'流程监听器创建', N'bpm:process-listener:create', 3, 2, 2726, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 16:05:34', N'', N'2024-03-09 16:05:34', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'39', N'0', N'成功', N'0', N'system_login_result', N'0', N'success', N'', N'登陆结果 - 成功', N'', N'2021-01-18 06:17:36.0000000', N'1', N'2022-02-16 13:23:49.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2729, N'流程监听器更新', N'bpm:process-listener:update', 3, 3, 2726, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 16:05:34', N'', N'2024-03-09 16:05:34', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'40', N'10', N'账号或密码不正确', N'10', N'system_login_result', N'0', N'primary', N'', N'登陆结果 - 账号或密码不正确', N'', N'2021-01-18 06:17:54.0000000', N'1', N'2022-02-16 13:24:27.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2730, N'流程监听器删除', N'bpm:process-listener:delete', 3, 4, 2726, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 16:05:34', N'', N'2024-03-09 16:05:34', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'41', N'20', N'用户被禁用', N'20', N'system_login_result', N'0', N'warning', N'', N'登陆结果 - 用户被禁用', N'', N'2021-01-18 06:17:54.0000000', N'1', N'2022-02-16 13:23:57.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2731, N'流程表达式', N'', 2, 6, 1186, N'process-expression', N'fa:wpexplorer', N'bpm/processExpression/index', N'BpmProcessExpression', 0, N'1', N'1', N'1', N'', N'2024-03-09 22:35:08', N'1', N'2024-03-23 19:43:05', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'42', N'30', N'验证码不存在', N'30', N'system_login_result', N'0', N'info', N'', N'登陆结果 - 验证码不存在', N'', N'2021-01-18 06:17:54.0000000', N'1', N'2022-02-16 13:24:07.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2732, N'流程表达式查询', N'bpm:process-expression:query', 3, 1, 2731, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 22:35:08', N'', N'2024-03-09 22:35:08', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'43', N'31', N'验证码不正确', N'31', N'system_login_result', N'0', N'info', N'', N'登陆结果 - 验证码不正确', N'', N'2021-01-18 06:17:54.0000000', N'1', N'2022-02-16 13:24:11.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2733, N'流程表达式创建', N'bpm:process-expression:create', 3, 2, 2731, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 22:35:08', N'', N'2024-03-09 22:35:08', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'44', N'100', N'未知异常', N'100', N'system_login_result', N'0', N'danger', N'', N'登陆结果 - 未知异常', N'', N'2021-01-18 06:17:54.0000000', N'1', N'2022-02-16 13:24:23.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2734, N'流程表达式更新', N'bpm:process-expression:update', 3, 3, 2731, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 22:35:08', N'', N'2024-03-09 22:35:08', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'45', N'1', N'是', N'true', N'infra_boolean_string', N'0', N'danger', N'', N'Boolean 是否类型 - 是', N'', N'2021-01-19 03:20:55.0000000', N'1', N'2022-03-15 23:01:45.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2735, N'流程表达式删除', N'bpm:process-expression:delete', 3, 4, 2731, N'', N'', N'', NULL, 0, N'1', N'1', N'1', N'', N'2024-03-09 22:35:08', N'', N'2024-03-09 22:35:08', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'46', N'1', N'否', N'false', N'infra_boolean_string', N'0', N'info', N'', N'Boolean 是否类型 - 否', N'', N'2021-01-19 03:20:55.0000000', N'1', N'2022-03-15 23:09:45.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2736, N'员工业绩', N'crm:statistics-performance:query', 2, 3, 2560, N'performance', N'ep:dish-dot', N'crm/statistics/performance/index', N'CrmStatisticsPerformance', 0, N'1', N'1', N'1', N'1', N'2024-04-05 13:49:20', N'1', N'2024-04-24 19:42:43', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'47', N'1', N'永不超时', N'1', N'infra_redis_timeout_type', N'0', N'primary', N'', N'Redis 未设置超时的情况', N'', N'2021-01-26 00:53:17.0000000', N'1', N'2022-02-16 19:03:35.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2737, N'客户画像', N'crm:statistics-portrait:query', 2, 4, 2560, N'portrait', N'ep:picture', N'crm/statistics/portrait/index', N'CrmStatisticsPortrait', 0, N'1', N'1', N'1', N'1', N'2024-04-05 13:57:40', N'1', N'2024-04-24 19:42:24', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'48', N'1', N'动态超时', N'2', N'infra_redis_timeout_type', N'0', N'info', N'', N'程序里动态传入超时时间,无法固定', N'', N'2021-01-26 00:55:00.0000000', N'1', N'2022-02-16 19:03:41.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2738, N'销售漏斗', N'crm:statistics-funnel:query', 2, 5, 2560, N'funnel', N'ep:grape', N'crm/statistics/funnel/index', N'CrmStatisticsFunnel', 0, N'1', N'1', N'1', N'1', N'2024-04-13 10:53:26', N'1', N'2024-04-24 19:39:33', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'49', N'3', N'固定超时', N'3', N'infra_redis_timeout_type', N'0', N'success', N'', N'Redis 设置了过期时间', N'', N'2021-01-26 00:55:26.0000000', N'1', N'2022-02-16 19:03:45.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2739, N'消息中心', N'', 1, 7, 1, N'messages', N'ep:chat-dot-round', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-22 23:54:30', N'1', N'2024-04-23 09:36:35', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'50', N'1', N'单表(增删改查)', N'1', N'infra_codegen_template_type', N'0', N'', N'', NULL, N'', N'2021-02-05 07:09:06.0000000', N'', N'2022-03-10 16:33:15.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2740, N'监控中心', N'', 1, 10, 2, N'monitors', N'ep:monitor', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-23 00:04:44', N'1', N'2024-04-23 00:04:44', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'51', N'2', N'树表(增删改查)', N'2', N'infra_codegen_template_type', N'0', N'', N'', NULL, N'', N'2021-02-05 07:14:46.0000000', N'', N'2022-03-10 16:33:19.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2741, N'领取公海客户', N'crm:customer:receive', 3, 1, 2546, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:47:45', N'1', N'2024-04-24 19:47:45', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'53', N'0', N'初始化中', N'0', N'infra_job_status', N'0', N'primary', N'', NULL, N'', N'2021-02-07 07:46:49.0000000', N'1', N'2022-02-16 19:33:29.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2742, N'分配公海客户', N'crm:customer:distribute', 3, 2, 2546, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:48:05', N'1', N'2024-04-24 19:48:05', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'57', N'0', N'运行中', N'0', N'infra_job_log_status', N'0', N'primary', N'', N'RUNNING', N'', N'2021-02-08 10:04:24.0000000', N'1', N'2022-02-16 19:07:48.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2743, N'商品统计查询', N'statistics:product:query', 3, 1, 2545, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:50:05', N'1', N'2024-04-24 19:50:05', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'58', N'1', N'成功', N'1', N'infra_job_log_status', N'0', N'success', N'', NULL, N'', N'2021-02-08 10:06:57.0000000', N'1', N'2022-02-16 19:07:52.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2744, N'商品统计导出', N'statistics:product:export', 3, 2, 2545, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:50:26', N'1', N'2024-04-24 19:50:26', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'59', N'2', N'失败', N'2', N'infra_job_log_status', N'0', N'warning', N'', N'失败', N'', N'2021-02-08 10:07:38.0000000', N'1', N'2022-02-16 19:07:56.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2745, N'支付渠道查询', N'pay:channel:query', 3, 10, 1126, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:53:01', N'1', N'2024-04-24 19:53:01', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'60', N'1', N'会员', N'1', N'user_type', N'0', N'primary', N'', NULL, N'', N'2021-02-26 00:16:27.0000000', N'1', N'2022-02-16 10:22:19.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2746, N'支付渠道创建', N'pay:channel:create', 3, 11, 1126, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:53:18', N'1', N'2024-04-24 19:53:18', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'61', N'2', N'管理员', N'2', N'user_type', N'0', N'success', N'', NULL, N'', N'2021-02-26 00:16:34.0000000', N'1', N'2022-02-16 10:22:22.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2747, N'支付渠道更新', N'pay:channel:update', 3, 12, 1126, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:53:32', N'1', N'2024-04-24 19:53:58', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'62', N'0', N'未处理', N'0', N'infra_api_error_log_process_status', N'0', N'primary', N'', NULL, N'', N'2021-02-26 07:07:19.0000000', N'1', N'2022-02-16 20:14:17.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2748, N'支付渠道删除', N'pay:channel:delete', 3, 13, 1126, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:54:34', N'1', N'2024-04-24 19:54:34', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'63', N'1', N'已处理', N'1', N'infra_api_error_log_process_status', N'0', N'success', N'', NULL, N'', N'2021-02-26 07:07:26.0000000', N'1', N'2022-02-16 20:14:08.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2749, N'商品收藏查询', N'product:favorite:query', 3, 10, 2014, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:55:47', N'1', N'2024-04-24 19:55:47', N'0') GO - - - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'66', N'2', N'阿里云', N'ALIYUN', N'system_sms_channel_code', N'0', N'primary', N'', NULL, N'1', N'2021-04-05 01:05:26.0000000', N'1', N'2022-02-16 10:09:52.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2750, N'商品浏览查询', N'product:browse-history:query', 3, 20, 2014, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:57:43', N'1', N'2024-04-24 19:57:43', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'67', N'1', N'验证码', N'1', N'system_sms_template_type', N'0', N'warning', N'', NULL, N'1', N'2021-04-05 21:50:57.0000000', N'1', N'2022-02-16 12:48:30.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2751, N'售后同意', N'trade:after-sale:agree', 3, 2, 2073, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:58:40', N'1', N'2024-04-24 19:58:40', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'68', N'2', N'通知', N'2', N'system_sms_template_type', N'0', N'primary', N'', NULL, N'1', N'2021-04-05 21:51:08.0000000', N'1', N'2022-02-16 12:48:27.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2752, N'售后不同意', N'trade:after-sale:disagree', 3, 3, 2073, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 19:59:03', N'1', N'2024-04-24 19:59:03', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'69', N'0', N'营销', N'3', N'system_sms_template_type', N'0', N'danger', N'', NULL, N'1', N'2021-04-05 21:51:15.0000000', N'1', N'2022-02-16 12:48:22.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2753, N'售后确认退货', N'trade:after-sale:receive', 3, 4, 2073, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 20:00:07', N'1', N'2024-04-24 20:00:07', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'70', N'0', N'初始化', N'0', N'system_sms_send_status', N'0', N'primary', N'', NULL, N'1', N'2021-04-11 20:18:33.0000000', N'1', N'2022-02-16 10:26:07.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2754, N'售后确认退款', N'trade:after-sale:refund', 3, 5, 2073, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 20:00:24', N'1', N'2024-04-24 20:00:24', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'71', N'1', N'发送成功', N'10', N'system_sms_send_status', N'0', N'success', N'', NULL, N'1', N'2021-04-11 20:18:43.0000000', N'1', N'2022-02-16 10:25:56.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2755, N'删除项目', N'report:go-view-project:delete', 3, 2, 2153, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 20:01:37', N'1', N'2024-04-24 20:01:37', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'72', N'2', N'发送失败', N'20', N'system_sms_send_status', N'0', N'danger', N'', NULL, N'1', N'2021-04-11 20:18:49.0000000', N'1', N'2022-02-16 10:26:03.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2756, N'会员等级记录查询', N'member:level-record:query', 3, 10, 2325, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 20:02:32', N'1', N'2024-04-24 20:02:32', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'73', N'3', N'不发送', N'30', N'system_sms_send_status', N'0', N'info', N'', NULL, N'1', N'2021-04-11 20:19:44.0000000', N'1', N'2022-02-16 10:26:10.0000000', N'0') +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2757, N'会员经验记录查询', N'member:experience-record:query', 3, 11, 2325, N'', N'', N'', N'', 0, N'1', N'1', N'1', N'1', N'2024-04-24 20:02:51', N'1', N'2024-04-24 20:02:51', N'0') GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'74', N'0', N'等待结果', N'0', N'system_sms_receive_status', N'0', N'primary', N'', NULL, N'1', N'2021-04-11 20:27:43.0000000', N'1', N'2022-02-16 10:28:24.0000000', N'0') +SET IDENTITY_INSERT system_menu OFF GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'75', N'1', N'接收成功', N'10', N'system_sms_receive_status', N'0', N'success', N'', NULL, N'1', N'2021-04-11 20:29:25.0000000', N'1', N'2022-02-16 10:28:28.0000000', N'0') +COMMIT GO +-- @formatter:on -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'76', N'2', N'接收失败', N'20', N'system_sms_receive_status', N'0', N'danger', N'', NULL, N'1', N'2021-04-11 20:29:31.0000000', N'1', N'2022-02-16 10:28:32.0000000', N'0') +-- ---------------------------- +-- Table structure for system_notice +-- ---------------------------- +DROP TABLE IF EXISTS system_notice; +CREATE TABLE system_notice +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + title nvarchar(50) NOT NULL, + content nvarchar(max) NOT NULL, + type tinyint NOT NULL, + status tinyint DEFAULT 0 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'77', N'0', N'调试(钉钉)', N'DEBUG_DING_TALK', N'system_sms_channel_code', N'0', N'info', N'', NULL, N'1', N'2021-04-13 00:20:37.0000000', N'1', N'2022-02-16 10:10:00.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'公告ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'78', N'1', N'自动生成', N'1', N'system_error_code_type', N'0', N'warning', N'', NULL, N'1', N'2021-04-21 00:06:48.0000000', N'1', N'2022-02-16 13:57:20.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'公告标题', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'title' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'79', N'2', N'手动编辑', N'2', N'system_error_code_type', N'0', N'primary', N'', NULL, N'1', N'2021-04-21 00:07:14.0000000', N'1', N'2022-02-16 13:57:24.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'公告内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'content' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'80', N'100', N'账号登录', N'100', N'system_login_type', N'0', N'primary', N'', N'账号登录', N'1', N'2021-10-06 00:52:02.0000000', N'1', N'2022-02-16 13:11:34.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'公告类型(1通知 2公告)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'type' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'81', N'101', N'社交登录', N'101', N'system_login_type', N'0', N'info', N'', N'社交登录', N'1', N'2021-10-06 00:52:17.0000000', N'1', N'2022-02-16 13:11:40.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'公告状态(0正常 1关闭)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'status' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'83', N'200', N'主动登出', N'200', N'system_login_type', N'0', N'primary', N'', N'主动登出', N'1', N'2021-10-06 00:52:58.0000000', N'1', N'2022-02-16 13:11:49.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'85', N'202', N'强制登出', N'202', N'system_login_type', N'0', N'danger', N'', N'强制退出', N'1', N'2021-10-06 00:53:41.0000000', N'1', N'2022-02-16 13:11:57.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'86', N'0', N'病假', N'1', N'bpm_oa_leave_type', N'0', N'primary', N'', NULL, N'1', N'2021-09-21 22:35:28.0000000', N'1', N'2022-02-16 10:00:41.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'87', N'1', N'事假', N'2', N'bpm_oa_leave_type', N'0', N'info', N'', NULL, N'1', N'2021-09-21 22:36:11.0000000', N'1', N'2022-02-16 10:00:49.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'88', N'2', N'婚假', N'3', N'bpm_oa_leave_type', N'0', N'warning', N'', NULL, N'1', N'2021-09-21 22:36:38.0000000', N'1', N'2022-02-16 10:00:53.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'98', N'1', N'v2', N'v2', N'pay_channel_wechat_version', N'0', N'', N'', N'v2版本', N'1', N'2021-11-08 17:00:58.0000000', N'1', N'2021-11-08 17:00:58.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice', + 'COLUMN', N'tenant_id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'99', N'2', N'v3', N'v3', N'pay_channel_wechat_version', N'0', N'', N'', N'v3版本', N'1', N'2021-11-08 17:01:07.0000000', N'1', N'2021-11-08 17:01:07.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'通知公告表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notice' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'108', N'1', N'RSA2', N'RSA2', N'pay_channel_alipay_sign_type', N'0', N'', N'', N'RSA2', N'1', N'2021-11-18 15:39:29.0000000', N'1', N'2021-11-18 15:39:29.0000000', N'0') +-- ---------------------------- +-- Records of system_notice +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'109', N'1', N'公钥模式', N'1', N'pay_channel_alipay_mode', N'0', N'', N'', N'公钥模式:privateKey + alipayPublicKey', N'1', N'2021-11-18 15:45:23.0000000', N'1', N'2021-11-18 15:45:23.0000000', N'0') +SET IDENTITY_INSERT system_notice ON GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'110', N'2', N'证书模式', N'2', N'pay_channel_alipay_mode', N'0', N'', N'', N'证书模式:appCertContent + alipayPublicCertContent + rootCertContent', N'1', N'2021-11-18 15:45:40.0000000', N'1', N'2021-11-18 15:45:40.0000000', N'0') +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'芋道的公众', N'

新版本内容133

', 1, 0, N'admin', N'2021-01-05 17:03:48', N'1', N'2022-05-04 21:00:20', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'111', N'1', N'线上', N'https://openapi.alipay.com/gateway.do', N'pay_channel_alipay_server_type', N'0', N'', N'', N'网关地址 - 线上', N'1', N'2021-11-18 16:59:32.0000000', N'1', N'2021-11-21 17:37:29.0000000', N'0') +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'维护通知:2018-07-01 系统凌晨维护', N'

11112222

', 2, 1, N'admin', N'2021-01-05 17:03:48', N'1', N'2023-12-02 20:07:26', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'112', N'2', N'沙箱', N'https://openapi.alipaydev.com/gateway.do', N'pay_channel_alipay_server_type', N'0', N'', N'', N'网关地址 - 沙箱', N'1', N'2021-11-18 16:59:48.0000000', N'1', N'2021-11-21 17:37:39.0000000', N'0') +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, N'我是测试标题', N'

哈哈哈哈123

', 1, 0, N'110', N'2022-02-22 01:01:25', N'110', N'2022-02-22 01:01:46', N'0', 121) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'113', N'1', N'微信 JSAPI 支付', N'wx_pub', N'pay_channel_code_type', N'0', N'', N'', N'微信 JSAPI(公众号) 支付', N'1', N'2021-12-03 10:40:24.0000000', N'1', N'2021-12-04 16:41:00.0000000', N'0') +SET IDENTITY_INSERT system_notice OFF GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'114', N'2', N'微信小程序支付', N'wx_lite', N'pay_channel_code_type', N'0', N'', N'', N'微信小程序支付', N'1', N'2021-12-03 10:41:06.0000000', N'1', N'2021-12-03 10:41:06.0000000', N'0') +COMMIT GO +-- @formatter:on -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'115', N'3', N'微信 App 支付', N'wx_app', N'pay_channel_code_type', N'0', N'', N'', N'微信 App 支付', N'1', N'2021-12-03 10:41:20.0000000', N'1', N'2021-12-03 10:41:20.0000000', N'0') +-- ---------------------------- +-- Table structure for system_notify_message +-- ---------------------------- +DROP TABLE IF EXISTS system_notify_message; +CREATE TABLE system_notify_message +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type tinyint NOT NULL, + template_id bigint NOT NULL, + template_code nvarchar(64) NOT NULL, + template_nickname nvarchar(63) NOT NULL, + template_content nvarchar(1024) NOT NULL, + template_type int NOT NULL, + template_params nvarchar(255) NOT NULL, + read_status varchar(1) NOT NULL, + read_time datetime2 DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'116', N'4', N'支付宝 PC 网站支付', N'alipay_pc', N'pay_channel_code_type', N'0', N'', N'', N'支付宝 PC 网站支付', N'1', N'2021-12-03 10:42:09.0000000', N'1', N'2021-12-03 10:42:09.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'117', N'5', N'支付宝 Wap 网站支付', N'alipay_wap', N'pay_channel_code_type', N'0', N'', N'', N'支付宝 Wap 网站支付', N'1', N'2021-12-03 10:42:26.0000000', N'1', N'2021-12-03 10:42:26.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户id', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'user_id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'118', N'6', N'支付宝App 支付', N'alipay_app', N'pay_channel_code_type', N'0', N'', N'', N'支付宝App 支付', N'1', N'2021-12-03 10:42:55.0000000', N'1', N'2021-12-03 10:42:55.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'user_type' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'119', N'7', N'支付宝扫码支付', N'alipay_qr', N'pay_channel_code_type', N'0', N'', N'', N'支付宝扫码支付', N'1', N'2021-12-03 10:43:10.0000000', N'1', N'2021-12-03 10:43:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'120', N'1', N'通知成功', N'10', N'pay_order_notify_status', N'0', N'success', N'', N'通知成功', N'1', N'2021-12-03 11:02:41.0000000', N'1', N'2022-02-16 13:59:13.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模板编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_code' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'121', N'2', N'通知失败', N'20', N'pay_order_notify_status', N'0', N'danger', N'', N'通知失败', N'1', N'2021-12-03 11:02:59.0000000', N'1', N'2022-02-16 13:59:17.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版发送人名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_nickname' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'122', N'3', N'未通知', N'0', N'pay_order_notify_status', N'0', N'info', N'', N'未通知', N'1', N'2021-12-03 11:03:10.0000000', N'1', N'2022-02-16 13:59:23.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_content' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'123', N'1', N'支付成功', N'10', N'pay_order_status', N'0', N'success', N'', N'支付成功', N'1', N'2021-12-03 11:18:29.0000000', N'1', N'2022-02-16 15:24:25.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_type' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'124', N'2', N'支付关闭', N'20', N'pay_order_status', N'0', N'danger', N'', N'支付关闭', N'1', N'2021-12-03 11:18:42.0000000', N'1', N'2022-02-16 15:24:31.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版参数', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'template_params' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'125', N'3', N'未支付', N'0', N'pay_order_status', N'0', N'info', N'', N'未支付', N'1', N'2021-12-03 11:18:18.0000000', N'1', N'2022-02-16 15:24:35.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否已读', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'read_status' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'126', N'1', N'未退款', N'0', N'pay_order_refund_status', N'0', N'', N'', N'未退款', N'1', N'2021-12-03 11:30:35.0000000', N'1', N'2021-12-03 11:34:05.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'阅读时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'read_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'127', N'2', N'部分退款', N'10', N'pay_order_refund_status', N'0', N'', N'', N'部分退款', N'1', N'2021-12-03 11:30:44.0000000', N'1', N'2021-12-03 11:34:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'128', N'3', N'全部退款', N'20', N'pay_order_refund_status', N'0', N'', N'', N'全部退款', N'1', N'2021-12-03 11:30:52.0000000', N'1', N'2021-12-03 11:34:14.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1117', N'1', N'退款订单生成', N'0', N'pay_refund_order_status', N'0', N'primary', N'', N'退款订单生成', N'1', N'2021-12-10 16:44:44.0000000', N'1', N'2022-02-16 14:05:24.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1118', N'2', N'退款成功', N'1', N'pay_refund_order_status', N'0', N'success', N'', N'退款成功', N'1', N'2021-12-10 16:44:59.0000000', N'1', N'2022-02-16 14:05:28.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1119', N'3', N'退款失败', N'2', N'pay_refund_order_status', N'0', N'danger', N'', N'退款失败', N'1', N'2021-12-10 16:45:10.0000000', N'1', N'2022-02-16 14:05:34.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1124', N'8', N'退款关闭', N'99', N'pay_refund_order_status', N'0', N'info', N'', N'退款关闭', N'1', N'2021-12-10 16:46:26.0000000', N'1', N'2022-02-16 14:05:40.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message', + 'COLUMN', N'tenant_id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1125', N'0', N'默认', N'1', N'bpm_model_category', N'0', N'primary', N'', N'流程分类 - 默认', N'1', N'2022-01-02 08:41:11.0000000', N'1', N'2022-02-16 20:01:42.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'站内信消息表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_message' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1126', N'0', N'OA', N'2', N'bpm_model_category', N'0', N'success', N'', N'流程分类 - OA', N'1', N'2022-01-02 08:41:22.0000000', N'1', N'2022-02-16 20:01:50.0000000', N'0') +-- ---------------------------- +-- Records of system_notify_message +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1127', N'0', N'进行中', N'1', N'bpm_process_instance_status', N'0', N'primary', N'', N'流程实例的状态 - 进行中', N'1', N'2022-01-07 23:47:22.0000000', N'1', N'2022-02-16 20:07:49.0000000', N'0') +SET IDENTITY_INSERT system_notify_message ON GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1128', N'2', N'已完成', N'2', N'bpm_process_instance_status', N'0', N'success', N'', N'流程实例的状态 - 已完成', N'1', N'2022-01-07 23:47:49.0000000', N'1', N'2022-02-16 20:07:54.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, N'test', N'123', N'我是 1,我开始 2 了', 1, N'{"name":"1","what":"2"}', N'1', N'2023-02-10 00:47:04', N'1', N'2023-01-28 11:44:08', N'1', N'2023-02-10 00:47:04', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1129', N'1', N'处理中', N'1', N'bpm_process_instance_result', N'0', N'primary', N'', N'流程实例的结果 - 处理中', N'1', N'2022-01-07 23:48:32.0000000', N'1', N'2022-02-16 09:53:26.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, N'test', N'123', N'我是 1,我开始 2 了', 1, N'{"name":"1","what":"2"}', N'1', N'2023-02-10 00:47:04', N'1', N'2023-01-28 11:45:04', N'1', N'2023-02-10 00:47:04', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1130', N'2', N'通过', N'2', N'bpm_process_instance_result', N'0', N'success', N'', N'流程实例的结果 - 通过', N'1', N'2022-01-07 23:48:45.0000000', N'1', N'2022-02-16 09:53:31.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 103, 2, 2, N'register', N'系统消息', N'你好,欢迎 哈哈 加入大家庭!', 2, N'{"name":"哈哈"}', N'0', NULL, N'1', N'2023-01-28 21:02:20', N'1', N'2023-01-28 21:02:20', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1131', N'3', N'不通过', N'3', N'bpm_process_instance_result', N'0', N'danger', N'', N'流程实例的结果 - 不通过', N'1', N'2022-01-07 23:48:55.0000000', N'1', N'2022-02-16 09:53:38.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 1, 2, 1, N'test', N'123', N'我是 芋艿,我开始 写代码 了', 1, N'{"name":"芋艿","what":"写代码"}', N'1', N'2023-02-10 00:47:04', N'1', N'2023-01-28 22:21:42', N'1', N'2023-02-10 00:47:04', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1132', N'4', N'已取消', N'4', N'bpm_process_instance_result', N'0', N'info', N'', N'流程实例的结果 - 撤销', N'1', N'2022-01-07 23:49:06.0000000', N'1', N'2022-02-16 09:53:42.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 1, 2, 1, N'test', N'123', N'我是 芋艿,我开始 写代码 了', 1, N'{"name":"芋艿","what":"写代码"}', N'1', N'2023-01-29 10:52:06', N'1', N'2023-01-28 22:22:07', N'1', N'2023-01-29 10:52:06', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1133', N'10', N'流程表单', N'10', N'bpm_model_form_type', N'0', N'', N'', N'流程的表单类型 - 流程表单', N'103', N'2022-01-11 23:51:30.0000000', N'103', N'2022-01-11 23:51:30.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 1, 2, 1, N'test', N'123', N'我是 2,我开始 3 了', 1, N'{"name":"2","what":"3"}', N'1', N'2023-01-29 10:52:06', N'1', N'2023-01-28 23:45:21', N'1', N'2023-01-29 10:52:06', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1134', N'20', N'业务表单', N'20', N'bpm_model_form_type', N'0', N'', N'', N'流程的表单类型 - 业务表单', N'103', N'2022-01-11 23:51:47.0000000', N'103', N'2022-01-11 23:51:47.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 1, 2, 2, N'register', N'系统消息', N'你好,欢迎 123 加入大家庭!', 2, N'{"name":"123"}', N'1', N'2023-01-29 10:52:06', N'1', N'2023-01-28 23:50:21', N'1', N'2023-01-29 10:52:06', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1135', N'10', N'角色', N'10', N'bpm_task_assign_rule_type', N'0', N'info', N'', N'任务分配规则的类型 - 角色', N'103', N'2022-01-12 23:21:22.0000000', N'1', N'2022-02-16 20:06:14.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 247, 1, 4, N'brokerage_withdraw_audit_approve', N'system', N'您在2023-09-28 08:35:46提现¥0.09元的申请已通过审核', 2, N'{"reason":null,"createTime":"2023-09-28 08:35:46","price":"0.09"}', N'0', NULL, N'1', N'2023-09-28 16:36:22', N'1', N'2023-09-28 16:36:22', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1136', N'20', N'部门的成员', N'20', N'bpm_task_assign_rule_type', N'0', N'primary', N'', N'任务分配规则的类型 - 部门的成员', N'103', N'2022-01-12 23:21:47.0000000', N'1', N'2022-02-16 20:05:28.0000000', N'0') +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 247, 1, 4, N'brokerage_withdraw_audit_approve', N'system', N'您在2023-09-30 20:59:40提现¥1.00元的申请已通过审核', 2, N'{"reason":null,"createTime":"2023-09-30 20:59:40","price":"1.00"}', N'0', NULL, N'1', N'2023-10-03 12:11:34', N'1', N'2023-10-03 12:11:34', N'0', 1) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1137', N'21', N'部门的负责人', N'21', N'bpm_task_assign_rule_type', N'0', N'primary', N'', N'任务分配规则的类型 - 部门的负责人', N'103', N'2022-01-12 23:33:36.0000000', N'1', N'2022-02-16 20:05:31.0000000', N'0') +SET IDENTITY_INSERT system_notify_message OFF GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1138', N'30', N'用户', N'30', N'bpm_task_assign_rule_type', N'0', N'info', N'', N'任务分配规则的类型 - 用户', N'103', N'2022-01-12 23:34:02.0000000', N'1', N'2022-02-16 20:05:50.0000000', N'0') +COMMIT GO +-- @formatter:on -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1139', N'40', N'用户组', N'40', N'bpm_task_assign_rule_type', N'0', N'warning', N'', N'任务分配规则的类型 - 用户组', N'103', N'2022-01-12 23:34:21.0000000', N'1', N'2022-02-16 20:05:57.0000000', N'0') +-- ---------------------------- +-- Table structure for system_notify_template +-- ---------------------------- +DROP TABLE IF EXISTS system_notify_template; +CREATE TABLE system_notify_template +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(63) NOT NULL, + code nvarchar(64) NOT NULL, + nickname nvarchar(255) NOT NULL, + content nvarchar(1024) NOT NULL, + type tinyint NOT NULL, + params nvarchar(255) DEFAULT NULL NULL, + status tinyint NOT NULL, + remark nvarchar(255) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1140', N'50', N'自定义脚本', N'50', N'bpm_task_assign_rule_type', N'0', N'danger', N'', N'任务分配规则的类型 - 自定义脚本', N'103', N'2022-01-12 23:34:43.0000000', N'1', N'2022-02-16 20:06:01.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'主键', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1141', N'22', N'岗位', N'22', N'bpm_task_assign_rule_type', N'0', N'success', N'', N'任务分配规则的类型 - 岗位', N'103', N'2022-01-14 18:41:55.0000000', N'1', N'2022-02-16 20:05:39.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模板名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'name' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1142', N'10', N'流程发起人', N'10', N'bpm_task_assign_script', N'0', N'', N'', N'任务分配自定义脚本 - 流程发起人', N'103', N'2022-01-15 00:10:57.0000000', N'103', N'2022-01-15 21:24:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'code' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1143', N'20', N'流程发起人的一级领导', N'20', N'bpm_task_assign_script', N'0', N'', N'', N'任务分配自定义脚本 - 流程发起人的一级领导', N'103', N'2022-01-15 21:24:31.0000000', N'103', N'2022-01-15 21:24:31.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'发送人名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'nickname' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1144', N'21', N'流程发起人的二级领导', N'21', N'bpm_task_assign_script', N'0', N'', N'', N'任务分配自定义脚本 - 流程发起人的二级领导', N'103', N'2022-01-15 21:24:46.0000000', N'103', N'2022-01-15 21:24:57.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'模版内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'content' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1145', N'1', N'管理后台', N'1', N'infra_codegen_scene', N'0', N'', N'', N'代码生成的场景枚举 - 管理后台', N'1', N'2022-02-02 13:15:06.0000000', N'1', N'2022-03-10 16:32:59.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'type' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1146', N'2', N'用户 APP', N'2', N'infra_codegen_scene', N'0', N'', N'', N'代码生成的场景枚举 - 用户 APP', N'1', N'2022-02-02 13:15:19.0000000', N'1', N'2022-03-10 16:33:03.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'参数数组', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'params' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1147', N'0', N'未退款', N'0', N'pay_refund_order_type', N'0', N'info', N'', N'退款类型 - 未退款', N'1', N'2022-02-16 14:09:01.0000000', N'1', N'2022-02-16 14:09:01.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'status' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1148', N'10', N'部分退款', N'10', N'pay_refund_order_type', N'0', N'success', N'', N'退款类型 - 部分退款', N'1', N'2022-02-16 14:09:25.0000000', N'1', N'2022-02-16 14:11:38.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'remark' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1149', N'20', N'全部退款', N'20', N'pay_refund_order_type', N'0', N'warning', N'', N'退款类型 - 全部退款', N'1', N'2022-02-16 14:11:33.0000000', N'1', N'2022-02-16 14:11:33.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1150', N'1', N'数据库', N'1', N'infra_file_storage', N'0', N'default', N'', NULL, N'1', N'2022-03-15 00:25:28.0000000', N'1', N'2022-03-15 00:25:28.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1151', N'10', N'本地磁盘', N'10', N'infra_file_storage', N'0', N'default', N'', NULL, N'1', N'2022-03-15 00:25:41.0000000', N'1', N'2022-03-15 00:25:56.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1152', N'11', N'FTP 服务器', N'11', N'infra_file_storage', N'0', N'default', N'', NULL, N'1', N'2022-03-15 00:26:06.0000000', N'1', N'2022-03-15 00:26:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1153', N'12', N'SFTP 服务器', N'12', N'infra_file_storage', N'0', N'default', N'', NULL, N'1', N'2022-03-15 00:26:22.0000000', N'1', N'2022-03-15 00:26:22.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1154', N'20', N'S3 对象存储', N'20', N'infra_file_storage', N'0', N'default', N'', NULL, N'1', N'2022-03-15 00:26:31.0000000', N'1', N'2022-03-15 00:26:45.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'站内信模板表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_notify_template' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1155', N'103', N'短信登录', N'103', N'system_login_type', N'0', N'default', N'', NULL, N'1', N'2022-05-09 23:57:58.0000000', N'1', N'2022-05-09 23:58:09.0000000', N'0') +-- ---------------------------- +-- Table structure for system_oauth2_access_token +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_access_token; +CREATE TABLE system_oauth2_access_token +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type tinyint NOT NULL, + user_info nvarchar(512) NOT NULL, + access_token nvarchar(255) NOT NULL, + refresh_token nvarchar(32) NOT NULL, + client_id nvarchar(255) NOT NULL, + scopes nvarchar(255) DEFAULT NULL NULL, + expires_time datetime2 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1156', N'1', N'password', N'password', N'system_oauth2_grant_type', N'0', N'default', N'', N'密码模式', N'1', N'2022-05-12 00:22:05.0000000', N'1', N'2022-05-11 16:26:01.0000000', N'0') +CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token) GO - -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1157', N'2', N'authorization_code', N'authorization_code', N'system_oauth2_grant_type', N'0', N'primary', N'', N'授权码模式', N'1', N'2022-05-12 00:22:59.0000000', N'1', N'2022-05-11 16:26:02.0000000', N'0') +CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token) GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1158', N'3', N'implicit', N'implicit', N'system_oauth2_grant_type', N'0', N'success', N'', N'简化模式', N'1', N'2022-05-12 00:23:40.0000000', N'1', N'2022-05-11 16:26:05.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1159', N'4', N'client_credentials', N'client_credentials', N'system_oauth2_grant_type', N'0', N'default', N'', N'客户端模式', N'1', N'2022-05-12 00:23:51.0000000', N'1', N'2022-05-11 16:26:08.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'user_id' GO -INSERT INTO [dbo].[system_dict_data] ([id], [sort], [label], [value], [dict_type], [status], [color_type], [css_class], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1160', N'5', N'refresh_token', N'refresh_token', N'system_oauth2_grant_type', N'0', N'info', N'', N'刷新模式', N'1', N'2022-05-12 00:24:02.0000000', N'1', N'2022-05-11 16:26:11.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'user_type' GO -SET IDENTITY_INSERT [dbo].[system_dict_data] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'用户信息', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'user_info' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'访问令牌', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'access_token' GO - --- ---------------------------- --- Table structure for system_dict_type --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_dict_type]') AND type IN ('U')) - DROP TABLE [dbo].[system_dict_type] +EXEC sp_addextendedproperty + 'MS_Description', N'刷新令牌', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'refresh_token' GO -CREATE TABLE [dbo].[system_dict_type] -( - [id] - bigint - IDENTITY -( - 1, - 1 -) NOT NULL, - [name] nvarchar -( - 100 -) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] nvarchar -( - 100 -) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar -( - 500 -) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar -( - 64 -) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2 -( - 7 -) NOT NULL, - [updater] nvarchar -( - 64 -) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2 -( - 7 -) NOT NULL, - [deleted_time] datetime2 -( - 7 -), - [deleted] bit DEFAULT 0 NOT NULL - ) +EXEC sp_addextendedproperty + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'client_id' GO -ALTER TABLE [dbo].[system_dict_type] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'scopes' GO EXEC sp_addextendedproperty -'MS_Description', N'字典主键', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'id' + 'MS_Description', N'过期时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'expires_time' GO EXEC sp_addextendedproperty -'MS_Description', N'字典名称', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'name' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'字典类型', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'type' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'status' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'remark' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'creator' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type', -'COLUMN', N'create_time' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token', + 'COLUMN', N'tenant_id' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', - 'TABLE', N'system_dict_type', - 'COLUMN', N'updater' - GO - EXEC sp_addextendedproperty - 'MS_Description', N'更新时间', - 'SCHEMA', N'dbo', - 'TABLE', N'system_dict_type', - 'COLUMN', N'update_time' - GO - EXEC sp_addextendedproperty - 'MS_Description', N'删除时间', - 'SCHEMA', N'dbo', - 'TABLE', N'system_dict_type', - 'COLUMN', N'deleted_time' - GO - EXEC sp_addextendedproperty - 'MS_Description', N'是否删除', - 'SCHEMA', N'dbo', - 'TABLE', N'system_dict_type', - 'COLUMN', N'deleted' - GO - EXEC sp_addextendedproperty - 'MS_Description', N'字典类型表', -'SCHEMA', N'dbo', -'TABLE', N'system_dict_type' + 'MS_Description', N'OAuth2 访问令牌', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_access_token' GO - -- ---------------------------- --- Records of system_dict_type +-- Table structure for system_oauth2_approve -- ---------------------------- -BEGIN TRANSACTION +DROP TABLE IF EXISTS system_oauth2_approve; +CREATE TABLE system_oauth2_approve +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type tinyint NOT NULL, + client_id nvarchar(255) NOT NULL, + scope nvarchar(255) DEFAULT '' NOT NULL, + approved varchar(1) DEFAULT '0' NOT NULL, + expires_time datetime2 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -SET IDENTITY_INSERT [dbo].[system_dict_type] ON +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'用户性别', N'system_user_sex', N'0', NULL, N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:30:31.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'user_id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'6', N'参数类型', N'infra_config_type', N'0', NULL, N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:36:54.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'user_type' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'7', N'通知类型', N'system_notice_type', N'0', NULL, N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:35:26.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'client_id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'9', N'操作类型', N'system_operate_type', N'0', NULL, N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-16 09:32:21.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'scope' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'10', N'系统状态', N'common_status', N'0', NULL, N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-01 16:21:28.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否接受', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'approved' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'11', N'Boolean 是否类型', N'infra_boolean_string', N'0', N'boolean 转是否', N'', N'2021-01-19 03:20:08.0000000', N'', N'2022-02-01 16:37:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'过期时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'expires_time' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'104', N'登陆结果', N'system_login_result', N'0', N'登陆结果', N'', N'2021-01-18 06:17:11.0000000', N'', N'2022-02-01 16:36:00.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'105', N'Redis 超时类型', N'infra_redis_timeout_type', N'0', N'RedisKeyDefine.TimeoutTypeEnum', N'', N'2021-01-26 00:52:50.0000000', N'', N'2022-02-01 16:50:29.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'106', N'代码生成模板类型', N'infra_codegen_template_type', N'0', NULL, N'', N'2021-02-05 07:08:06.0000000', N'', N'2022-03-10 16:33:42.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'107', N'定时任务状态', N'infra_job_status', N'0', NULL, N'', N'2021-02-07 07:44:16.0000000', N'', N'2022-02-01 16:51:11.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'108', N'定时任务日志状态', N'infra_job_log_status', N'0', NULL, N'', N'2021-02-08 10:03:51.0000000', N'', N'2022-02-01 16:50:43.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'109', N'用户类型', N'user_type', N'0', NULL, N'', N'2021-02-26 00:15:51.0000000', N'', N'2021-02-26 00:15:51.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve', + 'COLUMN', N'tenant_id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'110', N'API 异常数据的处理状态', N'infra_api_error_log_process_status', N'0', NULL, N'', N'2021-02-26 07:07:01.0000000', N'', N'2022-02-01 16:50:53.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'OAuth2 批准表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_approve' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'111', N'短信渠道编码', N'system_sms_channel_code', N'0', NULL, N'1', N'2021-04-05 01:04:50.0000000', N'1', N'2022-02-16 02:09:08.0000000', N'0') +-- ---------------------------- +-- Table structure for system_oauth2_client +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_client; +CREATE TABLE system_oauth2_client +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + client_id nvarchar(255) NOT NULL, + secret nvarchar(255) NOT NULL, + name nvarchar(255) NOT NULL, + logo nvarchar(255) NOT NULL, + description nvarchar(255) DEFAULT NULL NULL, + status tinyint NOT NULL, + access_token_validity_seconds int NOT NULL, + refresh_token_validity_seconds int NOT NULL, + redirect_uris nvarchar(255) NOT NULL, + authorized_grant_types nvarchar(255) NOT NULL, + scopes nvarchar(255) DEFAULT NULL NULL, + auto_approve_scopes nvarchar(255) DEFAULT NULL NULL, + authorities nvarchar(255) DEFAULT NULL NULL, + resource_ids nvarchar(255) DEFAULT NULL NULL, + additional_information nvarchar(4000) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'112', N'短信模板的类型', N'system_sms_template_type', N'0', NULL, N'1', N'2021-04-05 21:50:43.0000000', N'1', N'2022-02-01 16:35:06.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'113', N'短信发送状态', N'system_sms_send_status', N'0', NULL, N'1', N'2021-04-11 20:18:03.0000000', N'1', N'2022-02-01 16:35:09.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'client_id' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'114', N'短信接收状态', N'system_sms_receive_status', N'0', NULL, N'1', N'2021-04-11 20:27:14.0000000', N'1', N'2022-02-01 16:35:14.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'客户端密钥', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'secret' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'115', N'错误码的类型', N'system_error_code_type', N'0', NULL, N'1', N'2021-04-21 00:06:30.0000000', N'1', N'2022-02-01 16:36:49.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'应用名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'name' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'116', N'登陆日志的类型', N'system_login_type', N'0', N'登陆日志的类型', N'1', N'2021-10-06 00:50:46.0000000', N'1', N'2022-02-01 16:35:56.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'应用图标', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'logo' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'117', N'OA 请假类型', N'bpm_oa_leave_type', N'0', NULL, N'1', N'2021-09-21 22:34:33.0000000', N'1', N'2022-01-22 10:41:37.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'应用描述', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'description' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'122', N'支付渠道微信版本', N'pay_channel_wechat_version', N'0', N'支付渠道微信版本', N'1', N'2021-11-08 17:00:26.0000000', N'1', N'2021-11-08 17:00:26.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'status' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'127', N'支付渠道支付宝算法类型', N'pay_channel_alipay_sign_type', N'0', N'支付渠道支付宝算法类型', N'1', N'2021-11-18 15:39:09.0000000', N'1', N'2021-11-18 15:39:09.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'访问令牌的有效期', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'access_token_validity_seconds' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'128', N'支付渠道支付宝公钥类型', N'pay_channel_alipay_mode', N'0', N'支付渠道支付宝公钥类型', N'1', N'2021-11-18 15:44:28.0000000', N'1', N'2021-11-18 15:44:28.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'刷新令牌的有效期', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'refresh_token_validity_seconds' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'129', N'支付宝网关地址', N'pay_channel_alipay_server_type', N'0', N'支付宝网关地址', N'1', N'2021-11-18 16:58:55.0000000', N'1', N'2021-11-18 17:01:34.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'可重定向的 URI 地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'redirect_uris' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'130', N'支付渠道编码类型', N'pay_channel_code_type', N'0', N'支付渠道的编码', N'1', N'2021-12-03 10:35:08.0000000', N'1', N'2021-12-03 10:35:08.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'授权类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'authorized_grant_types' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'131', N'支付订单回调状态', N'pay_order_notify_status', N'0', N'支付订单回调状态', N'1', N'2021-12-03 10:53:29.0000000', N'1', N'2021-12-03 10:53:29.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'scopes' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'132', N'支付订单状态', N'pay_order_status', N'0', N'支付订单状态', N'1', N'2021-12-03 11:17:50.0000000', N'1', N'2021-12-03 11:17:50.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'自动通过的授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'auto_approve_scopes' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'133', N'支付订单退款状态', N'pay_order_refund_status', N'0', N'支付订单退款状态', N'1', N'2021-12-03 11:27:31.0000000', N'1', N'2021-12-03 11:27:31.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'权限', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'authorities' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'134', N'退款订单状态', N'pay_refund_order_status', N'0', N'退款订单状态', N'1', N'2021-12-10 16:42:50.0000000', N'1', N'2021-12-10 16:42:50.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'资源', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'resource_ids' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'135', N'退款订单类别', N'pay_refund_order_type', N'0', N'退款订单类别', N'1', N'2021-12-10 17:14:53.0000000', N'1', N'2021-12-10 17:14:53.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'附加信息', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'additional_information' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'138', N'流程分类', N'bpm_model_category', N'0', N'流程分类', N'1', N'2022-01-02 08:40:45.0000000', N'1', N'2022-01-02 08:40:45.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'139', N'流程实例的状态', N'bpm_process_instance_status', N'0', N'流程实例的状态', N'1', N'2022-01-07 23:46:42.0000000', N'1', N'2022-01-07 23:46:42.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'140', N'流程实例的结果', N'bpm_process_instance_result', N'0', N'流程实例的结果', N'1', N'2022-01-07 23:48:10.0000000', N'1', N'2022-01-07 23:48:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'141', N'流程的表单类型', N'bpm_model_form_type', N'0', N'流程的表单类型', N'103', N'2022-01-11 23:50:45.0000000', N'103', N'2022-01-11 23:50:45.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'142', N'任务分配规则的类型', N'bpm_task_assign_rule_type', N'0', N'任务分配规则的类型', N'103', N'2022-01-12 23:21:04.0000000', N'103', N'2022-01-12 15:46:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'143', N'任务分配自定义脚本', N'bpm_task_assign_script', N'0', N'任务分配自定义脚本', N'103', N'2022-01-15 00:10:35.0000000', N'103', N'2022-01-15 00:10:35.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'OAuth2 客户端表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_client' GO -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'144', N'代码生成的场景枚举', N'infra_codegen_scene', N'0', N'代码生成的场景枚举', N'1', N'2022-02-02 13:14:45.0000000', N'1', N'2022-03-10 16:33:46.0000000', N'0') +-- ---------------------------- +-- Records of system_oauth2_client +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'145', N'角色类型', N'system_role_type', N'0', N'角色类型', N'1', N'2022-02-16 13:01:46.0000000', N'1', N'2022-02-16 13:01:46.0000000', N'0') +SET IDENTITY_INSERT system_oauth2_client ON GO - -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'146', N'文件存储器', N'infra_file_storage', N'0', N'文件存储器', N'1', N'2022-03-15 00:24:38.0000000', N'1', N'2022-03-15 00:24:38.0000000', N'0') +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, N'default', N'admin123', N'芋道源码', N'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', N'我是描述', 0, 1800, 2592000, N'["https://www.iocoder.cn","https://doc.iocoder.cn"]', N'["password","authorization_code","implicit","refresh_token"]', N'["user.read","user.write"]', N'[]', N'["user.read","user.write"]', N'[]', N'{}', N'1', N'2022-05-11 21:47:12', N'1', N'2024-02-22 16:31:52', N'0') GO - -INSERT INTO [dbo].[system_dict_type] ([id], [name], [type], [status], [remark], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'147', N'OAuth 2.0 授权类型', N'system_oauth2_grant_type', N'0', N'OAuth 2.0 授权类型(模式)', N'1', N'2022-05-12 00:20:52.0000000', N'1', N'2022-05-11 16:25:49.0000000', N'0') +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, N'test', N'test2', N'biubiu', N'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', N'啦啦啦啦', 0, 1800, 43200, N'["https://www.iocoder.cn"]', N'["password","authorization_code","implicit"]', N'["user_info","projects"]', N'["user_info"]', N'[]', N'[]', N'{}', N'1', N'2022-05-12 00:28:20', N'1', N'2023-12-02 21:01:01', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_dict_type] OFF +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (41, N'yudao-sso-demo-by-code', N'test', N'基于授权码模式,如何实现 SSO 单点登录?', N'http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png', NULL, 0, 1800, 43200, N'["http://127.0.0.1:18080"]', N'["authorization_code","refresh_token"]', N'["user.read","user.write"]', N'[]', N'[]', N'[]', NULL, N'1', N'2022-09-29 13:28:31', N'1', N'2022-09-29 13:28:31', N'0') +GO +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (42, N'yudao-sso-demo-by-password', N'test', N'基于密码模式,如何实现 SSO 单点登录?', N'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, N'["http://127.0.0.1:18080"]', N'["password","refresh_token"]', N'["user.read","user.write"]', N'[]', N'[]', N'[]', NULL, N'1', N'2022-10-04 17:40:16', N'1', N'2022-10-04 20:31:21', N'0') +GO +SET IDENTITY_INSERT system_oauth2_client OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for system_error_code +-- Table structure for system_oauth2_code -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_error_code]') AND type IN ('U')) - DROP TABLE [dbo].[system_error_code] +DROP TABLE IF EXISTS system_oauth2_code; +CREATE TABLE system_oauth2_code +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type tinyint NOT NULL, + code nvarchar(32) NOT NULL, + client_id nvarchar(255) NOT NULL, + scopes nvarchar(255) DEFAULT '' NULL, + expires_time datetime2 NOT NULL, + redirect_uri nvarchar(255) DEFAULT NULL NULL, + state nvarchar(255) DEFAULT '' NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -CREATE TABLE [dbo].[system_error_code] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [type] tinyint NOT NULL, - [application_name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [code] int NOT NULL, - [message] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [memo] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'user_id' GO -ALTER TABLE [dbo].[system_error_code] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'user_type' GO EXEC sp_addextendedproperty -'MS_Description', N'错误码编号', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'id' + 'MS_Description', N'授权码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'code' GO EXEC sp_addextendedproperty -'MS_Description', N'错误码类型', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'type' + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'client_id' GO EXEC sp_addextendedproperty -'MS_Description', N'应用名', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'application_name' + 'MS_Description', N'授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'scopes' GO EXEC sp_addextendedproperty -'MS_Description', N'错误码编码', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'code' + 'MS_Description', N'过期时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'expires_time' GO EXEC sp_addextendedproperty -'MS_Description', N'错误码错误提示', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'message' + 'MS_Description', N'可重定向的 URI 地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'redirect_uri' GO EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'memo' + 'MS_Description', N'状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'state' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'creator' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'create_time' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'updater' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'update_time' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'错误码表', -'SCHEMA', N'dbo', -'TABLE', N'system_error_code' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'OAuth2 授权码表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_code' +GO -- ---------------------------- --- Records of system_error_code +-- Table structure for system_oauth2_refresh_token -- ---------------------------- -BEGIN TRANSACTION +DROP TABLE IF EXISTS system_oauth2_refresh_token; +CREATE TABLE system_oauth2_refresh_token +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + refresh_token nvarchar(32) NOT NULL, + user_type tinyint NOT NULL, + client_id nvarchar(255) NOT NULL, + scopes nvarchar(255) DEFAULT NULL NULL, + expires_time datetime2 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -SET IDENTITY_INSERT [dbo].[system_error_code] ON +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'id' GO -SET IDENTITY_INSERT [dbo].[system_error_code] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'user_id' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'刷新令牌', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'refresh_token' GO - --- ---------------------------- --- Table structure for system_login_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_login_log]') AND type IN ('U')) - DROP TABLE [dbo].[system_login_log] -GO - -CREATE TABLE [dbo].[system_login_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [log_type] bigint NOT NULL, - [trace_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_id] bigint NOT NULL, - [user_type] tinyint NOT NULL, - [username] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [result] tinyint NOT NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_agent] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'user_type' GO -ALTER TABLE [dbo].[system_login_log] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'client_id' GO EXEC sp_addextendedproperty -'MS_Description', N'访问ID', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'id' + 'MS_Description', N'授权范围', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'scopes' GO EXEC sp_addextendedproperty -'MS_Description', N'日志类型', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'log_type' + 'MS_Description', N'过期时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'expires_time' GO EXEC sp_addextendedproperty -'MS_Description', N'链路追踪编号', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'trace_id' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'user_id' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'user_type' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'用户账号', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'username' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'登陆结果', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'result' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'user_ip' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token', + 'COLUMN', N'tenant_id' GO EXEC sp_addextendedproperty -'MS_Description', N'浏览器 UA', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'user_agent' + 'MS_Description', N'OAuth2 刷新令牌', + 'SCHEMA', N'dbo', + 'TABLE', N'system_oauth2_refresh_token' GO -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'creator' +-- ---------------------------- +-- Table structure for system_operate_log +-- ---------------------------- +DROP TABLE IF EXISTS system_operate_log; +CREATE TABLE system_operate_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id nvarchar(64) DEFAULT '' NOT NULL, + user_id bigint NOT NULL, + user_type tinyint DEFAULT 0 NOT NULL, + type nvarchar(50) NOT NULL, + sub_type nvarchar(50) NOT NULL, + biz_id bigint NOT NULL, + action nvarchar(2000) DEFAULT '' NOT NULL, + extra nvarchar(2000) DEFAULT '' NOT NULL, + request_method nvarchar(16) DEFAULT '' NULL, + request_url nvarchar(255) DEFAULT '' NULL, + user_ip nvarchar(50) DEFAULT NULL NULL, + user_agent nvarchar(200) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'create_time' + 'MS_Description', N'日志主键', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'updater' + 'MS_Description', N'链路追踪编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'trace_id' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'update_time' + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'user_id' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'tenant_id' + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'user_type' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log', -'COLUMN', N'deleted' + 'MS_Description', N'操作模块类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'type' GO EXEC sp_addextendedproperty -'MS_Description', N'系统访问记录', -'SCHEMA', N'dbo', -'TABLE', N'system_login_log' + 'MS_Description', N'操作名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'sub_type' GO +EXEC sp_addextendedproperty + 'MS_Description', N'操作数据模块编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'biz_id' +GO --- ---------------------------- --- Records of system_login_log --- ---------------------------- -BEGIN TRANSACTION +EXEC sp_addextendedproperty + 'MS_Description', N'操作内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'action' GO -SET IDENTITY_INSERT [dbo].[system_login_log] ON +EXEC sp_addextendedproperty + 'MS_Description', N'拓展字段', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'extra' GO -SET IDENTITY_INSERT [dbo].[system_login_log] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'请求方法名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'request_method' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'请求地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'request_url' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'user_ip' +GO --- ---------------------------- --- Table structure for system_menu --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_menu]') AND type IN ('U')) - DROP TABLE [dbo].[system_menu] -GO - -CREATE TABLE [dbo].[system_menu] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [permission] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] tinyint NOT NULL, - [sort] int NOT NULL, - [parent_id] bigint NOT NULL, - [path] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [icon] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [component] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [visible] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [keep_alive] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'浏览器 UA', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'user_agent' GO -ALTER TABLE [dbo].[system_menu] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单ID', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'id' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单名称', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'name' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'权限标识', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'permission' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单类型', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'type' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'显示顺序', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'sort' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log', + 'COLUMN', N'tenant_id' GO EXEC sp_addextendedproperty -'MS_Description', N'父菜单ID', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'parent_id' + 'MS_Description', N'操作日志记录 V2 版本', + 'SCHEMA', N'dbo', + 'TABLE', N'system_operate_log' +GO + +-- ---------------------------- +-- Table structure for system_post +-- ---------------------------- +DROP TABLE IF EXISTS system_post; +CREATE TABLE system_post +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + code nvarchar(64) NOT NULL, + name nvarchar(50) NOT NULL, + sort int NOT NULL, + status tinyint NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'路由地址', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'path' + 'MS_Description', N'岗位ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单图标', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'icon' + 'MS_Description', N'岗位编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'code' GO EXEC sp_addextendedproperty -'MS_Description', N'组件路径', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'component' + 'MS_Description', N'岗位名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单状态', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'status' + 'MS_Description', N'显示顺序', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'sort' GO EXEC sp_addextendedproperty -'MS_Description', N'是否可见', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'visible' + 'MS_Description', N'状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'是否缓存', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'keep_alive' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'creator' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'create_time' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'updater' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'update_time' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_menu', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'菜单权限表', -'SCHEMA', N'dbo', -'TABLE', N'system_menu' + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'岗位信息表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_post' +GO -- ---------------------------- --- Records of system_menu +-- Records of system_post -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[system_menu] ON +SET IDENTITY_INSERT system_post ON GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'系统管理', N'', N'1', N'10', N'0', N'/system', N'system', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'ceo', N'董事长', 1, 0, N'', N'admin', N'2021-01-06 17:03:48', N'1', N'2023-02-11 15:19:04', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'2', N'基础设施', N'', N'1', N'20', N'0', N'/infra', N'monitor', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'se', N'项目经理', 2, 0, N'', N'admin', N'2021-01-05 17:03:48', N'1', N'2023-11-15 09:18:20', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'5', N'OA 示例', N'', N'1', N'40', N'1185', N'oa', N'people', N'', N'0', N'1', N'1', N'admin', N'2021-09-20 16:26:19.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, N'user', N'普通员工', 4, 0, N'111', N'admin', N'2021-01-05 17:03:48', N'1', N'2023-12-02 10:04:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'100', N'用户管理', N'system:user:list', N'2', N'1', N'1', N'user', N'user', N'system/user/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, N'HR', N'人力资源', 5, 0, N'', N'1', N'2024-03-24 20:45:40', N'1', N'2024-03-24 20:45:40', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'101', N'角色管理', N'', N'2', N'2', N'1', N'role', N'peoples', N'system/role/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +SET IDENTITY_INSERT system_post OFF GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'102', N'菜单管理', N'', N'2', N'3', N'1', N'menu', N'tree-table', N'system/menu/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +COMMIT GO +-- @formatter:on -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'103', N'部门管理', N'', N'2', N'4', N'1', N'dept', N'tree', N'system/dept/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +-- ---------------------------- +-- Table structure for system_role +-- ---------------------------- +DROP TABLE IF EXISTS system_role; +CREATE TABLE system_role +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(30) NOT NULL, + code nvarchar(100) NOT NULL, + sort int NOT NULL, + data_scope tinyint DEFAULT 1 NOT NULL, + data_scope_dept_ids nvarchar(500) DEFAULT '' NOT NULL, + status tinyint NOT NULL, + type tinyint NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'104', N'岗位管理', N'', N'2', N'5', N'1', N'post', N'post', N'system/post/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'105', N'字典管理', N'', N'2', N'6', N'1', N'dict', N'dict', N'system/dict/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'name' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'106', N'配置管理', N'', N'2', N'6', N'2', N'config', N'edit', N'infra/config/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色权限字符串', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'code' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'107', N'通知公告', N'', N'2', N'8', N'1', N'notice', N'message', N'system/notice/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'显示顺序', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'sort' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'108', N'审计日志', N'', N'1', N'9', N'1', N'log', N'log', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'data_scope' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'109', N'令牌管理', N'', N'2', N'2', N'1261', N'token', N'online', N'system/oauth2/token/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-05-11 23:31:42.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'数据范围(指定部门数组)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'data_scope_dept_ids' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'110', N'定时任务', N'', N'2', N'12', N'2', N'job', N'job', N'infra/job/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'status' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'111', N'MySQL 监控', N'', N'2', N'9', N'2', N'druid', N'druid', N'infra/druid/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'type' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'112', N'Java 监控', N'', N'2', N'11', N'2', N'admin-server', N'server', N'infra/server/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'remark' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'113', N'Redis 监控', N'', N'2', N'10', N'2', N'redis', N'redis', N'infra/redis/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'114', N'表单构建', N'infra:build:list', N'2', N'2', N'2', N'build', N'build', N'infra/build/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'115', N'代码生成', N'infra:codegen:query', N'2', N'1', N'2', N'codegen', N'code', N'infra/codegen/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'116', N'系统接口', N'infra:swagger:list', N'2', N'3', N'2', N'swagger', N'swagger', N'infra/swagger/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'500', N'操作日志', N'', N'2', N'1', N'108', N'operate-log', N'form', N'system/operatelog/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'501', N'登录日志', N'', N'2', N'2', N'108', N'login-log', N'logininfor', N'system/loginlog/index', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role', + 'COLUMN', N'tenant_id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1001', N'用户查询', N'system:user:query', N'3', N'1', N'100', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色信息表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1002', N'用户新增', N'system:user:create', N'3', N'2', N'100', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +-- ---------------------------- +-- Records of system_role +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1003', N'用户修改', N'system:user:update', N'3', N'3', N'100', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +SET IDENTITY_INSERT system_role ON GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1004', N'用户删除', N'system:user:delete', N'3', N'4', N'100', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'超级管理员', N'super_admin', 1, 1, N'', 0, 1, N'超级管理员', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-22 05:08:21', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1005', N'用户导出', N'system:user:export', N'3', N'5', N'100', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'普通角色', N'common', 2, 2, N'', 0, 1, N'普通角色', N'admin', N'2021-01-05 17:03:48', N'', N'2022-02-22 05:08:20', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1006', N'用户导入', N'system:user:import', N'3', N'6', N'100', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, N'CRM 管理员', N'crm_admin', 2, 1, N'', 0, 1, N'CRM 专属角色', N'1', N'2024-02-24 10:51:13', N'1', N'2024-02-24 02:51:32', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1007', N'重置密码', N'system:user:update-password', N'3', N'7', N'100', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, N'测试账号', N'test', 0, 1, N'[]', 0, 2, N'我想测试', N'', N'2021-01-06 13:49:35', N'1', N'2024-03-24 22:22:45', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1008', N'角色查询', N'system:role:query', N'3', N'1', N'101', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, N'租户管理员', N'tenant_admin', 0, 1, N'', 0, 1, N'系统自动生成', N'1', N'2022-02-22 00:56:14', N'1', N'2022-02-22 00:56:14', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1009', N'角色新增', N'system:role:create', N'3', N'2', N'101', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, N'租户管理员', N'tenant_admin', 0, 1, N'', 0, 1, N'系统自动生成', N'1', N'2022-03-07 21:37:58', N'1', N'2022-03-07 21:37:58', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1010', N'角色修改', N'system:role:update', N'3', N'3', N'101', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +SET IDENTITY_INSERT system_role OFF GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1011', N'角色删除', N'system:role:delete', N'3', N'4', N'101', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +COMMIT GO +-- @formatter:on -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1012', N'角色导出', N'system:role:export', N'3', N'5', N'101', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +-- ---------------------------- +-- Table structure for system_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS system_role_menu; +CREATE TABLE system_role_menu +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + role_id bigint NOT NULL, + menu_id bigint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1013', N'菜单查询', N'system:menu:query', N'3', N'1', N'102', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'自增编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1014', N'菜单新增', N'system:menu:create', N'3', N'2', N'102', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'role_id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1015', N'菜单修改', N'system:menu:update', N'3', N'3', N'102', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'菜单ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'menu_id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1016', N'菜单删除', N'system:menu:delete', N'3', N'4', N'102', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'creator' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1017', N'部门查询', N'system:dept:query', N'3', N'1', N'103', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1018', N'部门新增', N'system:dept:create', N'3', N'2', N'103', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1019', N'部门修改', N'system:dept:update', N'3', N'3', N'103', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1020', N'部门删除', N'system:dept:delete', N'3', N'4', N'103', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'deleted' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1021', N'岗位查询', N'system:post:query', N'3', N'1', N'104', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu', + 'COLUMN', N'tenant_id' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1022', N'岗位新增', N'system:post:create', N'3', N'2', N'104', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'角色和菜单关联表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_role_menu' GO -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1023', N'岗位修改', N'system:post:update', N'3', N'3', N'104', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +-- ---------------------------- +-- Records of system_role_menu +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1024', N'岗位删除', N'system:post:delete', N'3', N'4', N'104', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +SET IDENTITY_INSERT system_role_menu ON GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1025', N'岗位导出', N'system:post:export', N'3', N'5', N'104', N'', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, N'1', N'2022-02-22 00:56:14', N'1', N'2022-02-22 00:56:14', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1026', N'字典查询', N'system:dict:query', N'3', N'1', N'105', N'#', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1027', N'字典新增', N'system:dict:create', N'3', N'2', N'105', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (454, 2, 1093, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1028', N'字典修改', N'system:dict:update', N'3', N'3', N'105', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (455, 2, 1094, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1029', N'字典删除', N'system:dict:delete', N'3', N'4', N'105', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (460, 2, 1100, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1030', N'字典导出', N'system:dict:export', N'3', N'5', N'105', N'#', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (467, 2, 1107, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1031', N'配置查询', N'infra:config:query', N'3', N'1', N'106', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (476, 2, 1117, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1032', N'配置新增', N'infra:config:create', N'3', N'2', N'106', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (477, 2, 100, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1033', N'配置修改', N'infra:config:update', N'3', N'3', N'106', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (478, 2, 101, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1034', N'配置删除', N'infra:config:delete', N'3', N'4', N'106', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (479, 2, 102, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1035', N'配置导出', N'infra:config:export', N'3', N'5', N'106', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (480, 2, 1126, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1036', N'公告查询', N'system:notice:query', N'3', N'1', N'107', N'#', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (481, 2, 103, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1037', N'公告新增', N'system:notice:create', N'3', N'2', N'107', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (483, 2, 104, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1038', N'公告修改', N'system:notice:update', N'3', N'3', N'107', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (485, 2, 105, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1039', N'公告删除', N'system:notice:delete', N'3', N'4', N'107', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (488, 2, 107, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1040', N'操作查询', N'system:operate-log:query', N'3', N'1', N'500', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (490, 2, 108, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1042', N'日志导出', N'system:operate-log:export', N'3', N'2', N'500', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (492, 2, 109, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (498, 2, 1138, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (523, 2, 1224, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (524, 2, 1225, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (541, 2, 500, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (543, 2, 501, N'1', N'2022-02-22 13:09:12', N'1', N'2022-02-22 13:09:12', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (675, 2, 2, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (689, 2, 1077, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (690, 2, 1078, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (692, 2, 1083, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (693, 2, 1084, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (699, 2, 1090, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (703, 2, 106, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (704, 2, 110, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1043', N'登录查询', N'system:login-log:query', N'3', N'1', N'501', N'#', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (705, 2, 111, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1045', N'日志导出', N'system:login-log:export', N'3', N'3', N'501', N'#', N'#', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1046', N'令牌列表', N'system:oauth2-token:page', N'3', N'1', N'109', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-05-09 23:54:42.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, N'1', N'2022-02-22 13:16:57', N'1', N'2022-02-22 13:16:57', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1048', N'令牌删除', N'system:oauth2-token:delete', N'3', N'2', N'109', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-05-09 23:54:53.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, N'110', N'2022-02-23 00:23:55', N'110', N'2022-02-23 00:23:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1050', N'任务新增', N'infra:job:create', N'3', N'2', N'110', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, N'1', N'2022-03-07 21:37:58', N'1', N'2022-03-07 21:37:58', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1051', N'任务修改', N'infra:job:update', N'3', N'3', N'110', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1052', N'任务删除', N'infra:job:delete', N'3', N'4', N'110', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1053', N'状态修改', N'infra:job:update', N'3', N'5', N'110', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1606, 101, 1218, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1054', N'任务导出', N'infra:job:export', N'3', N'7', N'110', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1607, 101, 1219, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1056', N'生成修改', N'infra:codegen:update', N'3', N'2', N'115', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1608, 101, 1220, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1057', N'生成删除', N'infra:codegen:delete', N'3', N'3', N'115', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1609, 101, 1221, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1058', N'导入代码', N'infra:codegen:create', N'3', N'2', N'115', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1610, 101, 5, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1059', N'预览代码', N'infra:codegen:preview', N'3', N'4', N'115', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1611, 101, 1222, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1060', N'生成代码', N'infra:codegen:download', N'3', N'5', N'115', N'', N'', N'', N'0', N'1', N'1', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1612, 101, 1118, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1063', N'设置角色菜单权限', N'system:permission:assign-role-menu', N'3', N'6', N'101', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-01-06 17:53:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1613, 101, 1119, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1064', N'设置角色数据权限', N'system:permission:assign-role-data-scope', N'3', N'7', N'101', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-01-06 17:56:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1614, 101, 1120, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1065', N'设置用户角色', N'system:permission:assign-user-role', N'3', N'8', N'101', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-01-07 10:23:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1615, 101, 1185, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1066', N'获得 Redis 监控信息', N'infra:redis:get-monitor-info', N'3', N'1', N'113', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-01-26 01:02:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1616, 101, 1186, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1067', N'获得 Redis Key 列表', N'infra:redis:get-key-list', N'3', N'2', N'113', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-01-26 01:02:52.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1617, 101, 1187, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1070', N'代码生成示例', N'infra:test-demo:query', N'2', N'1', N'2', N'test-demo', N'validCode', N'infra/testDemo/index', N'0', N'1', N'1', N'', N'2021-02-06 12:42:49.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1618, 101, 1188, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1071', N'测试示例表创建', N'infra:test-demo:create', N'3', N'1', N'1070', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-06 12:42:49.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1619, 101, 1189, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1072', N'测试示例表更新', N'infra:test-demo:update', N'3', N'2', N'1070', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-06 12:42:49.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1620, 101, 1190, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1073', N'测试示例表删除', N'infra:test-demo:delete', N'3', N'3', N'1070', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-06 12:42:49.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1621, 101, 1191, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1074', N'测试示例表导出', N'infra:test-demo:export', N'3', N'4', N'1070', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-06 12:42:49.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1622, 101, 1192, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1075', N'任务触发', N'infra:job:trigger', N'3', N'8', N'110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-07 13:03:10.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1623, 101, 1193, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1076', N'数据库文档', N'', N'2', N'4', N'2', N'db-doc', N'table', N'infra/dbDoc/index', N'0', N'1', N'1', N'', N'2021-02-08 01:41:47.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1624, 101, 1194, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1077', N'监控平台', N'', N'2', N'13', N'2', N'skywalking', N'eye-open', N'infra/skywalking/index', N'0', N'1', N'1', N'', N'2021-02-08 20:41:31.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1625, 101, 1195, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1078', N'访问日志', N'', N'2', N'1', N'1083', N'api-access-log', N'log', N'infra/apiAccessLog/index', N'0', N'1', N'1', N'', N'2021-02-26 01:32:59.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1626, 101, 1196, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1082', N'日志导出', N'infra:api-access-log:export', N'3', N'2', N'1078', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-26 01:32:59.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1627, 101, 1197, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1083', N'API 日志', N'', N'2', N'8', N'2', N'log', N'log', N'', N'0', N'1', N'1', N'', N'2021-02-26 02:18:24.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1628, 101, 1198, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1084', N'错误日志', N'infra:api-error-log:query', N'2', N'2', N'1083', N'api-error-log', N'log', N'infra/apiErrorLog/index', N'0', N'1', N'1', N'', N'2021-02-26 07:53:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1629, 101, 1199, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1085', N'日志处理', N'infra:api-error-log:update-status', N'3', N'2', N'1084', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-26 07:53:20.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1630, 101, 1200, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1086', N'日志导出', N'infra:api-error-log:export', N'3', N'3', N'1084', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-02-26 07:53:20.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1631, 101, 1201, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1087', N'任务查询', N'infra:job:query', N'3', N'1', N'110', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-03-10 01:26:19.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1632, 101, 1202, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1088', N'日志查询', N'infra:api-access-log:query', N'3', N'1', N'1078', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-03-10 01:28:04.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1633, 101, 1207, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1089', N'日志查询', N'infra:api-error-log:query', N'3', N'1', N'1084', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-03-10 01:29:09.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1634, 101, 1208, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1090', N'文件列表', N'', N'2', N'5', N'1243', N'file', N'upload', N'infra/file/index', N'0', N'1', N'1', N'', N'2021-03-12 20:16:20.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1635, 101, 1209, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1091', N'文件查询', N'infra:file:query', N'3', N'1', N'1090', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-03-12 20:16:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1636, 101, 1210, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1092', N'文件删除', N'infra:file:delete', N'3', N'4', N'1090', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-03-12 20:16:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1637, 101, 1211, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1093', N'短信管理', N'', N'1', N'11', N'1', N'sms', N'validCode', N'', N'0', N'1', N'1', N'1', N'2021-04-05 01:10:16.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1638, 101, 1212, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1094', N'短信渠道', N'', N'2', N'0', N'1093', N'sms-channel', N'phone', N'system/sms/smsChannel', N'0', N'1', N'1', N'', N'2021-04-01 11:07:15.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1639, 101, 1213, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1095', N'短信渠道查询', N'system:sms-channel:query', N'3', N'1', N'1094', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 11:07:15.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1640, 101, 1215, N'1', N'2022-03-19 21:45:52', N'1', N'2022-03-19 21:45:52', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1096', N'短信渠道创建', N'system:sms-channel:create', N'3', N'2', N'1094', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 11:07:15.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1641, 101, 2, N'1', N'2022-04-01 22:21:24', N'1', N'2022-04-01 22:21:24', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1097', N'短信渠道更新', N'system:sms-channel:update', N'3', N'3', N'1094', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 11:07:15.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1642, 101, 1031, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1098', N'短信渠道删除', N'system:sms-channel:delete', N'3', N'4', N'1094', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 11:07:15.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1643, 101, 1032, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1100', N'短信模板', N'', N'2', N'1', N'1093', N'sms-template', N'phone', N'system/sms/smsTemplate', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1644, 101, 1033, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1101', N'短信模板查询', N'system:sms-template:query', N'3', N'1', N'1100', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1645, 101, 1034, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1102', N'短信模板创建', N'system:sms-template:create', N'3', N'2', N'1100', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1646, 101, 1035, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1103', N'短信模板更新', N'system:sms-template:update', N'3', N'3', N'1100', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1647, 101, 1050, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1104', N'短信模板删除', N'system:sms-template:delete', N'3', N'4', N'1100', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1648, 101, 1051, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1105', N'短信模板导出', N'system:sms-template:export', N'3', N'5', N'1100', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-01 17:35:17.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1649, 101, 1052, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1106', N'发送测试短信', N'system:sms-template:send-sms', N'3', N'6', N'1100', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-04-11 00:26:40.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1650, 101, 1053, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1107', N'短信日志', N'', N'2', N'2', N'1093', N'sms-log', N'phone', N'system/sms/smsLog', N'0', N'1', N'1', N'', N'2021-04-11 08:37:05.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1651, 101, 1054, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1108', N'短信日志查询', N'system:sms-log:query', N'3', N'1', N'1107', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-11 08:37:05.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1652, 101, 1056, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1109', N'短信日志导出', N'system:sms-log:export', N'3', N'5', N'1107', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-11 08:37:05.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1653, 101, 1057, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1110', N'错误码管理', N'', N'2', N'12', N'1', N'error-code', N'code', N'system/errorCode/index', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1654, 101, 1058, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1111', N'错误码查询', N'system:error-code:query', N'3', N'1', N'1110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1655, 101, 1059, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1112', N'错误码创建', N'system:error-code:create', N'3', N'2', N'1110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1656, 101, 1060, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1113', N'错误码更新', N'system:error-code:update', N'3', N'3', N'1110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1657, 101, 1066, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1114', N'错误码删除', N'system:error-code:delete', N'3', N'4', N'1110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1658, 101, 1067, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1115', N'错误码导出', N'system:error-code:export', N'3', N'5', N'1110', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-04-13 21:46:42.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1659, 101, 1070, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1117', N'支付管理', N'', N'1', N'11', N'0', N'/pay', N'money', N'', N'0', N'1', N'1', N'1', N'2021-12-25 16:43:41.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1664, 101, 1075, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1118', N'请假查询', N'', N'2', N'0', N'5', N'leave', N'user', N'bpm/oa/leave/index', N'0', N'1', N'1', N'', N'2021-09-20 08:51:03.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1666, 101, 1077, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1119', N'请假申请查询', N'bpm:oa-leave:query', N'3', N'1', N'1118', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-09-20 08:51:03.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1667, 101, 1078, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1120', N'请假申请创建', N'bpm:oa-leave:create', N'3', N'2', N'1118', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-09-20 08:51:03.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1668, 101, 1082, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1126', N'应用信息', N'', N'2', N'1', N'1117', N'app', N'table', N'pay/app/index', N'0', N'1', N'1', N'', N'2021-11-10 01:13:30.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1669, 101, 1083, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1127', N'支付应用信息查询', N'pay:app:query', N'3', N'1', N'1126', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1670, 101, 1084, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1128', N'支付应用信息创建', N'pay:app:create', N'3', N'2', N'1126', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1671, 101, 1085, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1129', N'支付应用信息更新', N'pay:app:update', N'3', N'3', N'1126', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1672, 101, 1086, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1130', N'支付应用信息删除', N'pay:app:delete', N'3', N'4', N'1126', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1673, 101, 1087, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1131', N'支付应用信息导出', N'pay:app:export', N'3', N'5', N'1126', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:31.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1674, 101, 1088, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1132', N'秘钥解析', N'pay:channel:parsing', N'3', N'6', N'1129', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-11-08 15:15:47.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1675, 101, 1089, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1133', N'支付商户信息查询', N'pay:merchant:query', N'3', N'1', N'1132', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:41.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1679, 101, 1237, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1134', N'支付商户信息创建', N'pay:merchant:create', N'3', N'2', N'1132', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:41.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1680, 101, 1238, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1135', N'支付商户信息更新', N'pay:merchant:update', N'3', N'3', N'1132', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:41.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1681, 101, 1239, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1136', N'支付商户信息删除', N'pay:merchant:delete', N'3', N'4', N'1132', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:41.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1682, 101, 1240, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1137', N'支付商户信息导出', N'pay:merchant:export', N'3', N'5', N'1132', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-11-10 01:13:41.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1683, 101, 1241, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1138', N'租户列表', N'', N'2', N'0', N'1224', N'list', N'peoples', N'system/tenant/index', N'0', N'1', N'1', N'', N'2021-12-14 12:31:43.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1684, 101, 1242, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1139', N'租户查询', N'system:tenant:query', N'3', N'1', N'1138', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-14 12:31:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1685, 101, 1243, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1140', N'租户创建', N'system:tenant:create', N'3', N'2', N'1138', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-14 12:31:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1687, 101, 106, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1141', N'租户更新', N'system:tenant:update', N'3', N'3', N'1138', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-14 12:31:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1688, 101, 110, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1142', N'租户删除', N'system:tenant:delete', N'3', N'4', N'1138', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-14 12:31:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1689, 101, 111, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1143', N'租户导出', N'system:tenant:export', N'3', N'5', N'1138', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-14 12:31:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1690, 101, 112, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1150', N'秘钥解析', N'', N'3', N'6', N'1129', N'', N'', N'', N'0', N'1', N'1', N'1', N'2021-11-08 15:15:47.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1691, 101, 113, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1161', N'退款订单', N'', N'2', N'3', N'1117', N'refund', N'order', N'pay/refund/index', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1162', N'退款订单查询', N'pay:refund:query', N'3', N'1', N'1161', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1163', N'退款订单创建', N'pay:refund:create', N'3', N'2', N'1161', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, N'1', N'2022-04-01 22:21:37', N'1', N'2022-04-01 22:21:37', N'0', 1) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1164', N'退款订单更新', N'pay:refund:update', N'3', N'3', N'1161', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1165', N'退款订单删除', N'pay:refund:delete', N'3', N'4', N'1161', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1166', N'退款订单导出', N'pay:refund:export', N'3', N'5', N'1161', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:29:07.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1173', N'支付订单', N'', N'2', N'2', N'1117', N'order', N'pay', N'pay/order/index', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1732, 109, 1064, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1174', N'支付订单查询', N'pay:order:query', N'3', N'1', N'1173', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1733, 109, 1001, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1175', N'支付订单创建', N'pay:order:create', N'3', N'2', N'1173', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1734, 109, 1065, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1176', N'支付订单更新', N'pay:order:update', N'3', N'3', N'1173', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1735, 109, 1002, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1177', N'支付订单删除', N'pay:order:delete', N'3', N'4', N'1173', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1736, 109, 1003, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1178', N'支付订单导出', N'pay:order:export', N'3', N'5', N'1173', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 08:49:43.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1737, 109, 1004, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1179', N'商户信息', N'', N'2', N'0', N'1117', N'merchant', N'merchant', N'pay/merchant/index', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1738, 109, 1005, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1180', N'支付商户信息查询', N'pay:merchant:query', N'3', N'1', N'1179', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1739, 109, 1006, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1181', N'支付商户信息创建', N'pay:merchant:create', N'3', N'2', N'1179', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1740, 109, 1007, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1182', N'支付商户信息更新', N'pay:merchant:update', N'3', N'3', N'1179', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1741, 109, 1008, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1183', N'支付商户信息删除', N'', N'3', N'4', N'1179', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1742, 109, 1009, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1184', N'支付商户信息导出', N'pay:merchant:export', N'3', N'5', N'1179', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-25 09:01:44.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1743, 109, 1010, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1185', N'工作流程', N'', N'1', N'50', N'0', N'/bpm', N'tool', N'', N'0', N'1', N'1', N'1', N'2021-12-30 20:26:36.0000000', N'103', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1744, 109, 1011, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1186', N'流程管理', N'', N'1', N'10', N'1185', N'manager', N'nested', N'', N'0', N'1', N'1', N'1', N'2021-12-30 20:28:30.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1745, 109, 1012, N'1', N'2022-09-21 22:08:51', N'1', N'2022-09-21 22:08:51', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1187', N'流程表单', N'', N'2', N'0', N'1186', N'form', N'form', N'bpm/form/index', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1746, 111, 100, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1188', N'表单查询', N'bpm:form:query', N'3', N'1', N'1187', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1747, 111, 101, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1189', N'表单创建', N'bpm:form:create', N'3', N'2', N'1187', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1748, 111, 1063, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1190', N'表单更新', N'bpm:form:update', N'3', N'3', N'1187', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1749, 111, 1064, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1191', N'表单删除', N'bpm:form:delete', N'3', N'4', N'1187', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1750, 111, 1001, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1192', N'表单导出', N'bpm:form:export', N'3', N'5', N'1187', N'', N'', N'', N'0', N'1', N'1', N'', N'2021-12-30 12:38:22.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1751, 111, 1065, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1193', N'流程模型', N'', N'2', N'5', N'1186', N'model', N'guide', N'bpm/model/index', N'0', N'1', N'1', N'1', N'2021-12-31 23:24:58.0000000', N'103', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1752, 111, 1002, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1194', N'模型查询', N'bpm:model:query', N'3', N'1', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:01:10.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1753, 111, 1003, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1195', N'模型创建', N'bpm:model:create', N'3', N'2', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:01:24.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1754, 111, 1004, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1196', N'模型导入', N'bpm:model:import', N'3', N'3', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:01:35.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1755, 111, 1005, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1197', N'模型更新', N'bpm:model:update', N'3', N'4', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:02:28.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1756, 111, 1006, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1198', N'模型删除', N'bpm:model:delete', N'3', N'5', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:02:43.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1757, 111, 1007, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1199', N'模型发布', N'bpm:model:deploy', N'3', N'6', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-03 19:03:24.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1758, 111, 1008, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1200', N'任务管理', N'', N'1', N'20', N'1185', N'task', N'cascader', N'', N'0', N'1', N'1', N'1', N'2022-01-07 23:51:48.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1759, 111, 1009, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1201', N'我的流程', N'', N'2', N'0', N'1200', N'my', N'people', N'bpm/processInstance/index', N'0', N'1', N'1', N'', N'2022-01-07 15:53:44.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1760, 111, 1010, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1202', N'流程实例的查询', N'bpm:process-instance:query', N'3', N'1', N'1201', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-01-07 15:53:44.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1761, 111, 1011, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1207', N'待办任务', N'', N'2', N'10', N'1200', N'todo', N'eye-open', N'bpm/task/todo', N'0', N'1', N'1', N'1', N'2022-01-08 10:33:37.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1762, 111, 1012, N'1', N'2022-09-21 22:08:52', N'1', N'2022-09-21 22:08:52', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1208', N'已办任务', N'', N'2', N'20', N'1200', N'done', N'eye', N'bpm/task/done', N'0', N'1', N'1', N'1', N'2022-01-08 10:34:13.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1763, 109, 100, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1209', N'用户分组', N'', N'2', N'2', N'1186', N'user-group', N'people', N'bpm/group/index', N'0', N'1', N'1', N'', N'2022-01-14 02:14:20.0000000', N'103', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1764, 109, 101, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1210', N'用户组查询', N'bpm:user-group:query', N'3', N'1', N'1209', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-01-14 02:14:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1765, 109, 1063, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1211', N'用户组创建', N'bpm:user-group:create', N'3', N'2', N'1209', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-01-14 02:14:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1766, 109, 1064, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1212', N'用户组更新', N'bpm:user-group:update', N'3', N'3', N'1209', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-01-14 02:14:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1767, 109, 1001, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1213', N'用户组删除', N'bpm:user-group:delete', N'3', N'4', N'1209', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-01-14 02:14:20.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1768, 109, 1065, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1215', N'流程定义查询', N'bpm:process-definition:query', N'3', N'10', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:21:43.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1769, 109, 1002, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1216', N'流程任务分配规则查询', N'bpm:task-assign-rule:query', N'3', N'20', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:26:53.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1770, 109, 1003, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1217', N'流程任务分配规则创建', N'bpm:task-assign-rule:create', N'3', N'21', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:28:15.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1771, 109, 1004, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1218', N'流程任务分配规则更新', N'bpm:task-assign-rule:update', N'3', N'22', N'1193', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:28:41.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1772, 109, 1005, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1219', N'流程实例的创建', N'bpm:process-instance:create', N'3', N'2', N'1201', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:36:15.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1773, 109, 1006, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1220', N'流程实例的取消', N'bpm:process-instance:cancel', N'3', N'3', N'1201', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:36:33.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1774, 109, 1007, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1221', N'流程任务的查询', N'bpm:task:query', N'3', N'1', N'1207', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:38:52.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1775, 109, 1008, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1222', N'流程任务的更新', N'bpm:task:update', N'3', N'2', N'1207', N'', N'', N'', N'0', N'1', N'1', N'1', N'2022-01-23 00:39:24.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1776, 109, 1009, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1224', N'租户管理', N'', N'2', N'0', N'1', N'tenant', N'peoples', N'', N'0', N'1', N'1', N'1', N'2022-02-20 01:41:13.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1777, 109, 1010, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1225', N'租户套餐', N'', N'2', N'0', N'1224', N'package', N'eye', N'system/tenantPackage/index', N'0', N'1', N'1', N'', N'2022-02-19 17:44:06.0000000', N'1', N'2022-04-21 01:21:25.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1778, 109, 1011, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1226', N'租户套餐查询', N'system:tenant-package:query', N'3', N'1', N'1225', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-02-19 17:44:06.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1779, 109, 1012, N'1', N'2022-09-21 22:08:53', N'1', N'2022-09-21 22:08:53', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1227', N'租户套餐创建', N'system:tenant-package:create', N'3', N'2', N'1225', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-02-19 17:44:06.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1780, 111, 100, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1228', N'租户套餐更新', N'system:tenant-package:update', N'3', N'3', N'1225', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-02-19 17:44:06.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1781, 111, 101, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1229', N'租户套餐删除', N'system:tenant-package:delete', N'3', N'4', N'1225', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-02-19 17:44:06.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1782, 111, 1063, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1237', N'文件配置', N'', N'2', N'0', N'1243', N'file-config', N'config', N'infra/fileConfig/index', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1783, 111, 1064, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1238', N'文件配置查询', N'infra:file-config:query', N'3', N'1', N'1237', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1784, 111, 1001, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1239', N'文件配置创建', N'infra:file-config:create', N'3', N'2', N'1237', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1785, 111, 1065, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1240', N'文件配置更新', N'infra:file-config:update', N'3', N'3', N'1237', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1786, 111, 1002, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1241', N'文件配置删除', N'infra:file-config:delete', N'3', N'4', N'1237', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1787, 111, 1003, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1242', N'文件配置导出', N'infra:file-config:export', N'3', N'5', N'1237', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-03-15 14:35:28.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1788, 111, 1004, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1243', N'文件管理', N'', N'2', N'5', N'2', N'file', N'download', N'', N'0', N'1', N'1', N'1', N'2022-03-16 23:47:40.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1789, 111, 1005, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1247', N'敏感词管理', N'', N'2', N'13', N'1', N'sensitive-word', N'education', N'system/sensitiveWord/index', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'1', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1790, 111, 1006, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1248', N'敏感词查询', N'system:sensitive-word:query', N'3', N'1', N'1247', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1791, 111, 1007, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1249', N'敏感词创建', N'system:sensitive-word:create', N'3', N'2', N'1247', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1792, 111, 1008, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1250', N'敏感词更新', N'system:sensitive-word:update', N'3', N'3', N'1247', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1793, 111, 1009, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1251', N'敏感词删除', N'system:sensitive-word:delete', N'3', N'4', N'1247', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1794, 111, 1010, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1252', N'敏感词导出', N'system:sensitive-word:export', N'3', N'5', N'1247', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-07 16:55:03.0000000', N'', N'2022-04-20 17:03:10.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1795, 111, 1011, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1254', N'作者动态', N'', N'1', N'0', N'0', N'https://www.iocoder.cn', N'people', N'', N'0', N'1', N'1', N'1', N'2022-04-23 01:03:15.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1796, 111, 1012, N'1', N'2022-09-21 22:08:54', N'1', N'2022-09-21 22:08:54', N'0', 122) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1255', N'数据源配置', N'', N'2', N'1', N'2', N'data-source-config', N'rate', N'infra/dataSourceConfig/index', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'1', N'2022-04-27 22:42:06.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1797, 109, 100, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1256', N'数据源配置查询', N'infra:data-source-config:query', N'3', N'1', N'1255', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'', N'2022-04-27 14:37:32.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1798, 109, 101, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1257', N'数据源配置创建', N'infra:data-source-config:create', N'3', N'2', N'1255', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'', N'2022-04-27 14:37:32.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1799, 109, 1063, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1258', N'数据源配置更新', N'infra:data-source-config:update', N'3', N'3', N'1255', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'', N'2022-04-27 14:37:32.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1800, 109, 1064, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1259', N'数据源配置删除', N'infra:data-source-config:delete', N'3', N'4', N'1255', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'', N'2022-04-27 14:37:32.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1801, 109, 1001, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1260', N'数据源配置导出', N'infra:data-source-config:export', N'3', N'5', N'1255', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-04-27 14:37:32.0000000', N'', N'2022-04-27 14:37:32.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1802, 109, 1065, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1261', N'OAuth 2.0', N'', N'1', N'10', N'1', N'oauth2', N'people', N'', N'0', N'1', N'1', N'1', N'2022-05-09 23:38:17.0000000', N'1', N'2022-05-12 18:11:34.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1803, 109, 1002, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1263', N'应用管理', N'', N'2', N'0', N'1261', N'oauth2/application', N'tool', N'system/oauth2/client/index', N'0', N'1', N'1', N'', N'2022-05-10 16:26:33.0000000', N'1', N'2022-05-11 23:31:36.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1804, 109, 1003, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1264', N'客户端查询', N'system:oauth2-client:query', N'3', N'1', N'1263', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-05-10 16:26:33.0000000', N'1', N'2022-05-11 00:31:06.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1805, 109, 1004, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1265', N'客户端创建', N'system:oauth2-client:create', N'3', N'2', N'1263', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-05-10 16:26:33.0000000', N'1', N'2022-05-11 00:31:23.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1806, 109, 1005, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1266', N'客户端更新', N'system:oauth2-client:update', N'3', N'3', N'1263', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-05-10 16:26:33.0000000', N'1', N'2022-05-11 00:31:28.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1807, 109, 1006, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -INSERT INTO [dbo].[system_menu] ([id], [name], [permission], [type], [sort], [parent_id], [path], [icon], [component], [status], [visible], [keep_alive], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1267', N'客户端删除', N'system:oauth2-client:delete', N'3', N'4', N'1263', N'', N'', N'', N'0', N'1', N'1', N'', N'2022-05-10 16:26:33.0000000', N'1', N'2022-05-11 00:31:33.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1808, 109, 1007, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -SET IDENTITY_INSERT [dbo].[system_menu] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1809, 109, 1008, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1810, 109, 1009, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - - --- ---------------------------- --- Table structure for system_notice --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_notice]') AND type IN ('U')) - DROP TABLE [dbo].[system_notice] -GO - -CREATE TABLE [dbo].[system_notice] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [title] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [content] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] tinyint NOT NULL, - [status] tinyint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1811, 109, 1010, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -ALTER TABLE [dbo].[system_notice] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1812, 109, 1011, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'公告ID', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1813, 109, 1012, N'1', N'2022-09-21 22:08:55', N'1', N'2022-09-21 22:08:55', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'公告标题', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'title' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1814, 111, 100, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'公告内容', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'content' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1815, 111, 101, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'公告类型(1通知 2公告)', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1816, 111, 1063, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'公告状态(0正常 1关闭)', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1817, 111, 1064, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1818, 111, 1001, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1819, 111, 1065, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1820, 111, 1002, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1821, 111, 1003, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1822, 111, 1004, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_notice', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1823, 111, 1005, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'通知公告表', -'SCHEMA', N'dbo', -'TABLE', N'system_notice' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1824, 111, 1006, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - - --- ---------------------------- --- Records of system_notice --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1825, 111, 1007, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_notice] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1826, 111, 1008, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -INSERT INTO [dbo].[system_notice] ([id], [title], [content], [type], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'温馨提醒:2018-07-01 若依新版本发布啦', N'

新版本内容133

', N'2', N'0', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-02-15 19:47:20.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1827, 111, 1009, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -INSERT INTO [dbo].[system_notice] ([id], [title], [content], [type], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'2', N'维护通知:2018-07-01 若依系统凌晨维护', N'维护内容', N'1', N'0', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2021-12-15 05:02:22.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1828, 111, 1010, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -INSERT INTO [dbo].[system_notice] ([id], [title], [content], [type], [status], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'4', N'我是测试标题', N'

哈哈哈哈123

', N'1', N'0', N'110', N'2022-02-22 01:01:25.0000000', N'110', N'2022-02-22 01:01:46.0000000', N'121', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1829, 111, 1011, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_notice] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1830, 111, 1012, N'1', N'2022-09-21 22:08:56', N'1', N'2022-09-21 22:08:56', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1831, 109, 103, N'1', N'2022-09-21 22:43:23', N'1', N'2022-09-21 22:43:23', N'0', 121) GO - - --- ---------------------------- --- Table structure for system_oauth2_access_token --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_oauth2_access_token]') AND type IN ('U')) - DROP TABLE [dbo].[system_oauth2_access_token] -GO - -CREATE TABLE [dbo].[system_oauth2_access_token] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [access_token] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [refresh_token] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_type] tinyint NOT NULL, - [client_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [expires_time] datetime2(7) NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL, - [scopes] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1832, 109, 1017, N'1', N'2022-09-21 22:43:23', N'1', N'2022-09-21 22:43:23', N'0', 121) GO - -ALTER TABLE [dbo].[system_oauth2_access_token] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1833, 109, 1018, N'1', N'2022-09-21 22:43:23', N'1', N'2022-09-21 22:43:23', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1834, 109, 1019, N'1', N'2022-09-21 22:43:23', N'1', N'2022-09-21 22:43:23', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1835, 109, 1020, N'1', N'2022-09-21 22:43:23', N'1', N'2022-09-21 22:43:23', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'访问令牌', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'access_token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1836, 111, 103, N'1', N'2022-09-21 22:43:24', N'1', N'2022-09-21 22:43:24', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'刷新令牌', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'refresh_token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1837, 111, 1017, N'1', N'2022-09-21 22:43:24', N'1', N'2022-09-21 22:43:24', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1838, 111, 1018, N'1', N'2022-09-21 22:43:24', N'1', N'2022-09-21 22:43:24', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'client_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1839, 111, 1019, N'1', N'2022-09-21 22:43:24', N'1', N'2022-09-21 22:43:24', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'过期时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'expires_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1840, 111, 1020, N'1', N'2022-09-21 22:43:24', N'1', N'2022-09-21 22:43:24', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1841, 109, 1036, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1842, 109, 1037, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1843, 109, 1038, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1844, 109, 1039, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1845, 109, 107, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1846, 111, 1036, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token', -'COLUMN', N'scopes' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1847, 111, 1037, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'刷新令牌', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_access_token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 122) GO - - --- ---------------------------- --- Records of system_oauth2_access_token --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_access_token] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, N'1', N'2022-09-21 22:48:13', N'1', N'2022-09-21 22:48:13', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_access_token] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_oauth2_approve --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_oauth2_approve]') AND type IN ('U')) - DROP TABLE [dbo].[system_oauth2_approve] -GO - -CREATE TABLE [dbo].[system_oauth2_approve] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [user_type] tinyint NOT NULL, - [client_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [scope] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [approved] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [expires_time] datetime2(7) NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_oauth2_approve] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1994, 2, 1027, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1995, 2, 1028, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1996, 2, 1029, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1997, 2, 1030, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'client_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1998, 2, 1031, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'scope' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1999, 2, 1032, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否接受', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'approved' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2000, 2, 1033, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'过期时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'expires_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2001, 2, 1034, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2002, 2, 1035, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2003, 2, 1036, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2004, 2, 1037, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2005, 2, 1038, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2006, 2, 1039, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2007, 2, 1040, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'OAuth2 批准表', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_approve' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2008, 2, 1042, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Records of system_oauth2_approve --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2009, 2, 1043, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_approve] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2010, 2, 1045, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_approve] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2011, 2, 1046, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2012, 2, 1048, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_oauth2_client --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_oauth2_client]') AND type IN ('U')) - DROP TABLE [dbo].[system_oauth2_client] -GO - -CREATE TABLE [dbo].[system_oauth2_client] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [client_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [secret] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [name] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [logo] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [description] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [access_token_validity_seconds] int NOT NULL, - [refresh_token_validity_seconds] int NOT NULL, - [redirect_uris] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [auto_approve_scopes] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NOT NULL, - [authorized_grant_types] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [scopes] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NULL, - [authorities] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [resource_ids] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [additional_information] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2013, 2, 1050, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_oauth2_client] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2014, 2, 1051, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2015, 2, 1052, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'client_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2016, 2, 1053, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端密钥', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'secret' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2017, 2, 1054, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用名', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2018, 2, 1056, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用图标', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'logo' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2019, 2, 1057, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'应用描述', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'description' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2020, 2, 1058, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2021, 2, 2083, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'访问令牌的有效期', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'access_token_validity_seconds' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2022, 2, 1059, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'刷新令牌的有效期', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'refresh_token_validity_seconds' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2023, 2, 1060, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'可重定向的 URI 地址', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'redirect_uris' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2024, 2, 1063, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'自动通过的授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'auto_approve_scopes' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2025, 2, 1064, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权类型', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'authorized_grant_types' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2026, 2, 1065, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'scopes' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2027, 2, 1066, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'权限', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'authorities' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2028, 2, 1067, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'资源', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'resource_ids' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2029, 2, 1070, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'附加信息', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'additional_information' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2034, 2, 1075, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2036, 2, 1082, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2037, 2, 1085, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2038, 2, 1086, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2039, 2, 1087, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2040, 2, 1088, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'OAuth2 客户端表', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_client' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2041, 2, 1089, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Records of system_oauth2_client --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2042, 2, 1091, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_client] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2043, 2, 1092, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -INSERT INTO [dbo].[system_oauth2_client] ([id], [client_id], [secret], [name], [logo], [description], [status], [access_token_validity_seconds], [refresh_token_validity_seconds], [redirect_uris], [auto_approve_scopes], [authorized_grant_types], [scopes], [authorities], [resource_ids], [additional_information], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'default', N'admin123', N'芋道源码', N'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', N'我是描述', N'0', N'180', N'8640', N'["https://www.iocoder.cn","https://doc.iocoder.cn"]', N'', N'["password","authorization_code","implicit","refresh_token"]', N'["user.read", "user.write"]', N'["system:user:query"]', N'[]', N'{}', N'1', N'2022-05-11 21:47:12.0000000', N'1', N'2022-05-13 10:50:16.9620000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2044, 2, 1095, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_client] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2045, 2, 1096, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2046, 2, 1097, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_oauth2_code --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_oauth2_code]') AND type IN ('U')) - DROP TABLE [dbo].[system_oauth2_code] -GO - -CREATE TABLE [dbo].[system_oauth2_code] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [user_type] tinyint NOT NULL, - [code] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [client_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [scopes] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [expires_time] datetime2(7) NOT NULL, - [redirect_uri] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [state] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2047, 2, 1098, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_oauth2_code] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2048, 2, 1101, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2049, 2, 1102, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2050, 2, 1103, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2051, 2, 1104, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权码', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2052, 2, 1105, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'client_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2053, 2, 1106, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'scopes' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2054, 2, 1108, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'过期时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'expires_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2055, 2, 1109, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'可重定向的 URI 地址', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'redirect_uri' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2061, 2, 1127, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'state' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2062, 2, 1128, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2063, 2, 1129, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2064, 2, 1130, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2066, 2, 1132, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2067, 2, 1133, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2068, 2, 1134, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2069, 2, 1135, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'OAuth2 授权码表', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2070, 2, 1136, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Records of system_oauth2_code --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2071, 2, 1137, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_code] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2072, 2, 114, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_code] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2073, 2, 1139, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2074, 2, 115, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_oauth2_refresh_token --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_oauth2_refresh_token]') AND type IN ('U')) - DROP TABLE [dbo].[system_oauth2_refresh_token] -GO - -CREATE TABLE [dbo].[system_oauth2_refresh_token] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [refresh_token] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_type] tinyint NOT NULL, - [client_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [expires_time] datetime2(7) NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint NOT NULL, - [scopes] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2075, 2, 1140, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_oauth2_refresh_token] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2076, 2, 116, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2077, 2, 1141, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2078, 2, 1142, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'刷新令牌', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'refresh_token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2079, 2, 1143, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2080, 2, 1150, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'客户端编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'client_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2081, 2, 1161, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'过期时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'expires_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2082, 2, 1162, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2083, 2, 1163, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2084, 2, 1164, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2085, 2, 1165, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2086, 2, 1166, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2087, 2, 1173, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2088, 2, 1174, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'授权范围', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token', -'COLUMN', N'scopes' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2089, 2, 1175, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'刷新令牌', -'SCHEMA', N'dbo', -'TABLE', N'system_oauth2_refresh_token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2090, 2, 1176, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Records of system_oauth2_refresh_token --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2091, 2, 1177, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_refresh_token] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2092, 2, 1178, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_oauth2_refresh_token] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2099, 2, 1226, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2100, 2, 1227, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_operate_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_operate_log]') AND type IN ('U')) - DROP TABLE [dbo].[system_operate_log] -GO - -CREATE TABLE [dbo].[system_operate_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [trace_id] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_id] bigint NOT NULL, - [user_type] tinyint NOT NULL, - [module] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [type] bigint NOT NULL, - [content] nvarchar(2000) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NOT NULL, - [exts] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS DEFAULT '' NOT NULL, - [request_method] nvarchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [request_url] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [user_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [user_agent] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [java_method] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [java_method_args] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [start_time] datetime2(7) NOT NULL, - [duration] int NOT NULL, - [result_code] int NOT NULL, - [result_msg] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [result_data] nvarchar(4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2101, 2, 1228, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_operate_log] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2102, 2, 1229, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'日志主键', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2103, 2, 1237, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'链路追踪编号', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'trace_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2104, 2, 1238, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2105, 2, 1239, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2106, 2, 1240, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模块标题', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'module' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2107, 2, 1241, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'操作名', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2108, 2, 1242, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'操作分类', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2109, 2, 1243, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'操作内容', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'content' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2116, 2, 1254, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'拓展字段', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'exts' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2117, 2, 1255, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'请求方法名', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'request_method' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2118, 2, 1256, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'请求地址', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'request_url' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2119, 2, 1257, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户 IP', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'user_ip' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2120, 2, 1258, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'浏览器 UA', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'user_agent' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2121, 2, 1259, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'Java 方法名', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'java_method' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2122, 2, 1260, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'Java 方法的参数', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'java_method_args' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2123, 2, 1261, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'操作时间', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'start_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2124, 2, 1263, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'执行时长', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'duration' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2125, 2, 1264, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'结果码', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'result_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2126, 2, 1265, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'结果提示', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'result_msg' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2127, 2, 1266, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'结果数据', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'result_data' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2128, 2, 1267, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2129, 2, 1001, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2130, 2, 1002, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2131, 2, 1003, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) +GO +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2132, 2, 1004, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2133, 2, 1005, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2134, 2, 1006, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2135, 2, 1007, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'操作日志记录', -'SCHEMA', N'dbo', -'TABLE', N'system_operate_log' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2136, 2, 1008, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Records of system_operate_log --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2137, 2, 1009, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_operate_log] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2138, 2, 1010, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_operate_log] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2139, 2, 1011, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2140, 2, 1012, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_post --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_post]') AND type IN ('U')) - DROP TABLE [dbo].[system_post] -GO - -CREATE TABLE [dbo].[system_post] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [code] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [name] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [sort] int NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2141, 2, 1013, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -ALTER TABLE [dbo].[system_post] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2142, 2, 1014, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'岗位ID', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2143, 2, 1015, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'岗位编码', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2144, 2, 1016, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'岗位名称', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2145, 2, 1017, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'显示顺序', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'sort' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2146, 2, 1018, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2147, 2, 1019, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'remark' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2148, 2, 1020, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2149, 2, 1021, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2150, 2, 1022, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2151, 2, 1023, N'1', N'2023-01-25 08:42:52', N'1', N'2023-01-25 08:42:52', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2152, 2, 1281, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2153, 2, 1282, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_post', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2154, 2, 2000, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'岗位信息表', -'SCHEMA', N'dbo', -'TABLE', N'system_post' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2155, 2, 2002, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - - --- ---------------------------- --- Records of system_post --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2156, 2, 2003, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_post] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2157, 2, 2004, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -INSERT INTO [dbo].[system_post] ([id], [code], [name], [sort], [status], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'ceo', N'董事长', N'1', N'0', N'', N'admin', N'2021-01-06 17:03:48.0000000', N'1', N'2022-04-19 16:53:39.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2158, 2, 2005, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -INSERT INTO [dbo].[system_post] ([id], [code], [name], [sort], [status], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'2', N'se', N'项目经理', N'2', N'0', N'', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2021-12-12 10:47:47.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2159, 2, 2006, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -INSERT INTO [dbo].[system_post] ([id], [code], [name], [sort], [status], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'4', N'user', N'普通员工', N'4', N'0', N'111', N'admin', N'2021-01-05 17:03:48.0000000', N'1', N'2022-04-20 00:59:35.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2160, 2, 2008, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_post] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2161, 2, 2009, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2162, 2, 2010, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_role --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_role]') AND type IN ('U')) - DROP TABLE [dbo].[system_role] -GO - -CREATE TABLE [dbo].[system_role] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [code] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [sort] int NOT NULL, - [data_scope] tinyint NOT NULL, - [data_scope_dept_ids] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [type] tinyint NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2163, 2, 2011, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -ALTER TABLE [dbo].[system_role] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2164, 2, 2012, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色ID', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2170, 2, 2019, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色名称', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2171, 2, 2020, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色权限字符串', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2172, 2, 2021, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'显示顺序', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'sort' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2173, 2, 2022, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'data_scope' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2174, 2, 2023, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'数据范围(指定部门数组)', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'data_scope_dept_ids' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2175, 2, 2025, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2177, 2, 2027, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色类型', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2178, 2, 2028, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'remark' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2179, 2, 2029, N'1', N'2023-01-25 08:42:58', N'1', N'2023-01-25 08:42:58', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2180, 2, 2014, N'1', N'2023-01-25 08:43:12', N'1', N'2023-01-25 08:43:12', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2181, 2, 2015, N'1', N'2023-01-25 08:43:12', N'1', N'2023-01-25 08:43:12', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2182, 2, 2016, N'1', N'2023-01-25 08:43:12', N'1', N'2023-01-25 08:43:12', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2183, 2, 2017, N'1', N'2023-01-25 08:43:12', N'1', N'2023-01-25 08:43:12', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2184, 2, 2018, N'1', N'2023-01-25 08:43:12', N'1', N'2023-01-25 08:43:12', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_role', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2188, 101, 1024, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色信息表', -'SCHEMA', N'dbo', -'TABLE', N'system_role' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2189, 101, 1, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - - --- ---------------------------- --- Records of system_role --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2190, 101, 1025, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_role] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2191, 101, 1026, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'超级管理员', N'super_admin', N'1', N'1', N'', N'0', N'1', N'超级管理员', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-22 05:08:21.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2192, 101, 1027, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'2', N'普通角色', N'common', N'2', N'2', N'', N'0', N'1', N'普通角色', N'admin', N'2021-01-05 17:03:48.0000000', N'', N'2022-02-22 05:08:20.0000000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2193, 101, 1028, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'101', N'测试账号', N'test', N'0', N'1', N'[]', N'0', N'2', N'132', N'', N'2021-01-06 13:49:35.0000000', N'1', N'2022-05-02 02:32:06.6180000', N'1', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2194, 101, 1029, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'109', N'租户管理员', N'tenant_admin', N'0', N'1', N'', N'0', N'1', N'系统自动生成', N'1', N'2022-02-22 00:56:14.0000000', N'1', N'2022-02-22 00:56:14.0000000', N'121', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2195, 101, 1030, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'110', N'测试角色', N'test', N'0', N'1', N'[]', N'0', N'2', N'嘿嘿', N'110', N'2022-02-23 00:14:34.0000000', N'110', N'2022-02-23 13:14:58.0000000', N'121', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2196, 101, 1036, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role] ([id], [name], [code], [sort], [data_scope], [data_scope_dept_ids], [status], [type], [remark], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'111', N'租户管理员', N'tenant_admin', N'0', N'1', N'', N'0', N'1', N'系统自动生成', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2197, 101, 1037, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_role] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2198, 101, 1038, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2199, 101, 1039, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - - --- ---------------------------- --- Table structure for system_role_menu --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_role_menu]') AND type IN ('U')) - DROP TABLE [dbo].[system_role_menu] +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2200, 101, 1040, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -CREATE TABLE [dbo].[system_role_menu] ( - [role_id] bigint NOT NULL, - [menu_id] bigint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [id] bigint IDENTITY(1,1) NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2201, 101, 1042, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -ALTER TABLE [dbo].[system_role_menu] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2202, 101, 1043, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色ID', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'role_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2203, 101, 1045, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'菜单ID', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'menu_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2204, 101, 1046, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2205, 101, 1048, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2206, 101, 2083, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2207, 101, 1063, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2208, 101, 1064, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2209, 101, 1065, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2210, 101, 1093, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'自增编号', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2211, 101, 1094, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -EXEC sp_addextendedproperty -'MS_Description', N'角色和菜单关联表', -'SCHEMA', N'dbo', -'TABLE', N'system_role_menu' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2212, 101, 1095, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - - --- ---------------------------- --- Records of system_role_menu --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2213, 101, 1096, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_role_menu] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2214, 101, 1097, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1', N'1', N'2022-02-22 00:56:14.0000000', N'1', N'2022-02-22 00:56:14.0000000', N'121', N'0', N'1') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2215, 101, 1098, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'2') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2216, 101, 1100, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1093', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'3') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2217, 101, 1101, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1094', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'4') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2218, 101, 1102, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1100', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'5') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2219, 101, 1103, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1107', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'6') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2220, 101, 1104, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1110', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'7') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2221, 101, 1105, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1117', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'8') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2222, 101, 1106, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'100', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'9') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2223, 101, 2130, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'101', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'10') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2224, 101, 1107, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'102', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'11') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2225, 101, 2131, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1126', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'12') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2226, 101, 1108, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'103', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'13') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2227, 101, 2132, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'104', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'14') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2228, 101, 1109, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'105', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'15') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2229, 101, 2133, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'107', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'16') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2230, 101, 2134, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'108', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'17') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2232, 101, 2135, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'109', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'18') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2234, 101, 2136, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1138', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'19') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2236, 101, 2137, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1224', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'20') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2238, 101, 2138, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1225', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'21') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2240, 101, 2139, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'500', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'22') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2242, 101, 2140, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'501', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'2022-02-22 13:09:12.0000000', N'1', N'0', N'23') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2243, 101, 2141, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'2', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'24') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2244, 101, 2142, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1077', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'25') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2245, 101, 2143, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1078', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'26') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2246, 101, 2144, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1083', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'27') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2247, 101, 2145, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1084', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'28') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2248, 101, 2146, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'1090', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'29') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2249, 101, 2147, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'106', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'30') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2250, 101, 100, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'110', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'31') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2251, 101, 2148, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'111', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'32') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2252, 101, 101, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'112', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'33') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2253, 101, 2149, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'2', N'113', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'2022-02-22 13:16:57.0000000', N'1', N'0', N'34') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2254, 101, 102, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'110', N'1', N'110', N'2022-02-23 00:23:55.0000000', N'110', N'2022-02-23 00:23:55.0000000', N'121', N'0', N'35') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2255, 101, 2150, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'103', N'1', N'2022-02-23 19:32:14.0000000', N'1', N'2022-02-23 19:32:14.0000000', N'121', N'0', N'36') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2256, 101, 103, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'104', N'1', N'2022-02-23 19:32:14.0000000', N'1', N'2022-02-23 19:32:14.0000000', N'121', N'0', N'37') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2257, 101, 2151, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'38') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2258, 101, 104, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'2', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'39') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2259, 101, 2152, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1077', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'40') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2260, 101, 105, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1078', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'41') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2261, 101, 107, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1083', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'42') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2262, 101, 108, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1084', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'43') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2263, 101, 109, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1090', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'44') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2264, 101, 1138, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1093', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'45') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2265, 101, 1139, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1094', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'46') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2266, 101, 1140, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1100', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'47') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2267, 101, 1141, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1107', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'48') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2268, 101, 1142, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1110', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'49') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2269, 101, 1143, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1117', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'50') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2270, 101, 1224, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'100', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'51') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2271, 101, 1225, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'101', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'52') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2272, 101, 1226, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'102', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'53') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2273, 101, 1227, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1126', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'54') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2274, 101, 1228, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'103', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'55') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2275, 101, 1229, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'104', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'56') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2282, 101, 1261, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'105', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'57') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2283, 101, 1263, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'106', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'58') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2284, 101, 1264, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'107', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'59') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2285, 101, 1265, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'108', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'60') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2286, 101, 1266, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'109', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'61') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2287, 101, 1267, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'110', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'62') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2288, 101, 1001, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'111', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'63') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2289, 101, 1002, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'112', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'64') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2290, 101, 1003, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'113', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'65') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2291, 101, 1004, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1138', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'66') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2292, 101, 1005, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1224', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'67') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2293, 101, 1006, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'1225', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'68') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2294, 101, 1007, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'500', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'69') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2295, 101, 1008, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'1', N'501', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'2022-02-23 20:03:57.0000000', N'1', N'0', N'70') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2296, 101, 1009, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1024', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'71') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2297, 101, 1010, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1025', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'72') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2298, 101, 1011, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1017', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'73') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2299, 101, 1012, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1018', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'74') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2300, 101, 500, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1019', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'75') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2301, 101, 1013, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1020', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'76') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2302, 101, 501, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1021', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'77') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2303, 101, 1014, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1022', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'78') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2304, 101, 1015, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1023', N'1', N'2022-02-23 20:30:14.0000000', N'1', N'2022-02-23 20:30:14.0000000', N'121', N'0', N'79') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2305, 101, 1016, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1024', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'80') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2306, 101, 1017, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1025', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'81') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2307, 101, 1018, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'82') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2308, 101, 1019, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'103', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'83') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2309, 101, 1020, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'104', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'84') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1017', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'85') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1018', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'86') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, N'1', N'2023-02-09 23:49:46', N'1', N'2023-02-09 23:49:46', N'0', 1) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1019', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'87') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1020', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'88') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1021', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'89') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1022', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'90') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2932, 109, 1227, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1023', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0', N'91') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2933, 109, 1228, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'102', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'121', N'0', N'92') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2934, 109, 1229, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1013', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'121', N'0', N'93') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2935, 109, 1138, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1014', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'121', N'0', N'94') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2936, 109, 1139, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1015', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'121', N'0', N'95') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2937, 109, 1140, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'109', N'1016', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'121', N'0', N'96') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2938, 109, 1141, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'102', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'122', N'0', N'97') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2939, 109, 1142, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1013', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'122', N'0', N'98') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2940, 109, 1143, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1014', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'122', N'0', N'99') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2941, 111, 1224, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1015', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'122', N'0', N'100') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2942, 111, 1225, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'111', N'1016', N'1', N'2022-03-19 18:39:13.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'122', N'0', N'101') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2943, 111, 1226, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1216', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'102') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2944, 111, 1227, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1217', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'103') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2945, 111, 1228, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1218', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'104') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2946, 111, 1229, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1219', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'105') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2947, 111, 1138, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1220', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'106') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2948, 111, 1139, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1221', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'107') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2949, 111, 1140, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'5', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'108') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1222', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'109') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1118', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'110') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, N'1', N'2023-12-02 23:19:40', N'1', N'2023-12-02 23:19:40', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1119', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'111') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1120', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'112') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1185', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'113') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1186', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'114') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2996, 109, 1033, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1187', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'115') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2997, 109, 1034, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1188', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'116') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2998, 109, 1035, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1189', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'117') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2999, 109, 1050, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1190', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'118') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3000, 109, 1051, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1191', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'119') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3001, 109, 1052, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1192', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'120') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3002, 109, 1053, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1193', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'121') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3003, 109, 1054, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1194', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'122') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3004, 109, 1056, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1195', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'123') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3005, 109, 1057, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1196', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'124') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3006, 109, 1058, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1197', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'125') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3007, 109, 1059, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1198', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'126') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3008, 109, 1060, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1199', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'127') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3009, 109, 1066, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1200', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'128') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3010, 109, 1067, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1201', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'129') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3011, 109, 1070, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1202', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'130') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3012, 109, 1075, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1207', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'131') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3013, 109, 1076, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1208', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'132') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3014, 109, 1077, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1209', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'133') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3015, 109, 1078, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1210', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'134') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3016, 109, 1082, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1211', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'135') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3017, 109, 1083, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1212', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'136') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3018, 109, 1084, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1213', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'137') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3019, 109, 1085, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1215', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'2022-03-19 21:45:52.0000000', N'1', N'0', N'138') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3020, 109, 1086, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'2', N'1', N'2022-04-01 22:21:24.0000000', N'1', N'2022-04-01 22:21:24.0000000', N'1', N'0', N'139') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3021, 109, 1087, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1031', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'140') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3022, 109, 1088, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1032', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'141') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3023, 109, 1089, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1033', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'142') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3024, 109, 1090, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1034', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'143') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3025, 109, 1091, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1035', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'144') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3026, 109, 1092, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1050', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'145') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3027, 109, 106, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1051', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'146') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3028, 109, 110, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1052', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'147') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3029, 109, 111, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1053', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'148') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3030, 109, 112, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1054', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'149') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3031, 109, 113, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1056', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'150') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3032, 109, 114, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1057', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'151') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3033, 109, 115, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1058', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'152') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3034, 109, 116, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1059', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'153') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3035, 109, 2472, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1060', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'154') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3036, 109, 2478, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1066', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'155') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3037, 109, 2479, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1067', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'156') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3038, 109, 2480, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1070', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'157') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3039, 109, 2481, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1071', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'158') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3040, 109, 2482, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1072', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'159') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3041, 109, 2483, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1073', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'160') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3042, 109, 2484, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1074', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'161') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3043, 109, 2485, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1075', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'162') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3044, 109, 2486, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1076', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'163') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3045, 109, 2487, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1077', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'164') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3046, 109, 2488, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1078', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'165') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3047, 109, 2489, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1082', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'166') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3048, 109, 2490, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1083', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'167') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3049, 109, 2491, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1084', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'168') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3050, 109, 2492, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1085', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'169') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3051, 109, 2493, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1086', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'170') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3052, 109, 2494, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1087', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'171') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3053, 109, 2495, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1088', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'172') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3054, 109, 2497, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1089', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'173') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3055, 109, 1237, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1090', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'174') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3056, 109, 1238, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1091', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'175') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3057, 109, 1239, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1092', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'176') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3058, 109, 1240, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1237', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'177') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3059, 109, 1241, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1238', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'178') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3060, 109, 1242, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1239', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'179') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3061, 109, 1243, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1240', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'180') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3062, 109, 2525, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1241', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'181') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3063, 109, 1255, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1242', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'182') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3064, 109, 1256, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'1243', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'183') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3065, 109, 1257, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'106', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'184') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3066, 109, 1258, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'110', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'185') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3067, 109, 1259, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'111', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'186') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3068, 109, 1260, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 121) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'112', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'187') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3069, 111, 2, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'113', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'188') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3070, 111, 1031, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'114', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'189') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3071, 111, 1032, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'115', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'190') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3072, 111, 1033, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_role_menu] ([role_id], [menu_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted], [id]) VALUES (N'101', N'116', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'2022-04-01 22:21:37.0000000', N'1', N'0', N'191') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3073, 111, 1034, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_role_menu] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3074, 111, 1035, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3075, 111, 1050, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_sensitive_word --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_sensitive_word]') AND type IN ('U')) - DROP TABLE [dbo].[system_sensitive_word] +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3076, 111, 1051, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -CREATE TABLE [dbo].[system_sensitive_word] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [description] nvarchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [tags] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3077, 111, 1052, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -ALTER TABLE [dbo].[system_sensitive_word] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3078, 111, 1053, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3079, 111, 1054, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'敏感词', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3080, 111, 1056, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'描述', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'description' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3081, 111, 1057, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'标签数组', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'tags' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3082, 111, 1058, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'状态', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3083, 111, 1059, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3084, 111, 1060, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3085, 111, 1066, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3086, 111, 1067, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3087, 111, 1070, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3088, 111, 1075, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'敏感词', -'SCHEMA', N'dbo', -'TABLE', N'system_sensitive_word' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3089, 111, 1076, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Records of system_sensitive_word --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3090, 111, 1077, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sensitive_word] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3091, 111, 1078, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_sensitive_word] ([id], [name], [description], [tags], [status], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'3', N'土豆', N'好呀', N'蔬菜,短信', N'0', N'1', N'2022-04-08 21:07:12.0000000', N'1', N'2022-04-09 10:28:14.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3092, 111, 1082, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_sensitive_word] ([id], [name], [description], [tags], [status], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'4', N'XXX', NULL, N'短信', N'0', N'1', N'2022-04-08 21:27:49.0000000', N'1', N'2022-04-08 21:27:49.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3093, 111, 1083, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sensitive_word] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3094, 111, 1084, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3095, 111, 1085, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_sms_channel --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_sms_channel]') AND type IN ('U')) - DROP TABLE [dbo].[system_sms_channel] -GO - -CREATE TABLE [dbo].[system_sms_channel] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [signature] nvarchar(12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_key] nvarchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [api_secret] nvarchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [callback_url] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3096, 111, 1086, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -ALTER TABLE [dbo].[system_sms_channel] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3097, 111, 1087, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3098, 111, 1088, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信签名', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'signature' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3099, 111, 1089, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3100, 111, 1090, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3101, 111, 1091, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'remark' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3102, 111, 1092, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 的账号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'api_key' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3103, 111, 106, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 的秘钥', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'api_secret' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3104, 111, 110, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信发送回调 URL', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'callback_url' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3105, 111, 111, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3106, 111, 112, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3107, 111, 113, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3108, 111, 114, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3109, 111, 115, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3110, 111, 116, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信渠道', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_channel' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3111, 111, 2472, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Records of system_sms_channel --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3112, 111, 2478, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sms_channel] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3113, 111, 2479, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_sms_channel] ([id], [signature], [code], [status], [remark], [api_key], [api_secret], [callback_url], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'2', N'Ballcat', N'ALIYUN', N'0', N'啦啦啦', N'LTAI5tCnKso2uG3kJ5gRav88', N'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, N'', N'2021-03-31 11:53:10.0000000', N'1', N'2021-04-14 00:08:37.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3114, 111, 2480, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_sms_channel] ([id], [signature], [code], [status], [remark], [api_key], [api_secret], [callback_url], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'4', N'测试渠道', N'DEBUG_DING_TALK', N'0', N'123', N'696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', N'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, N'1', N'2021-04-13 00:23:14.0000000', N'1', N'2022-03-27 20:29:49.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3115, 111, 2481, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -INSERT INTO [dbo].[system_sms_channel] ([id], [signature], [code], [status], [remark], [api_key], [api_secret], [callback_url], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'6', N'测试演示', N'DEBUG_DING_TALK', N'0', NULL, N'696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', N'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, N'1', N'2022-04-10 23:07:59.0000000', N'1', N'2022-04-10 23:07:59.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3116, 111, 2482, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sms_channel] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3117, 111, 2483, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3118, 111, 2484, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_sms_code --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_sms_code]') AND type IN ('U')) - DROP TABLE [dbo].[system_sms_code] -GO - -CREATE TABLE [dbo].[system_sms_code] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [mobile] nvarchar(11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [code] nvarchar(6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [create_ip] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [scene] tinyint NOT NULL, - [today_index] tinyint NOT NULL, - [used] tinyint NOT NULL, - [used_time] datetime2(7) NULL, - [used_ip] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3119, 111, 2485, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -ALTER TABLE [dbo].[system_sms_code] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3120, 111, 2486, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3121, 111, 2487, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'手机号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'mobile' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3122, 111, 2488, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'验证码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3123, 111, 2489, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建 IP', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'create_ip' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3124, 111, 2490, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'发送场景', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'scene' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3125, 111, 2491, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'今日发送的第几条', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'today_index' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3126, 111, 2492, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否使用', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'used' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3127, 111, 2493, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'使用时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'used_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3128, 111, 2494, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'使用 IP', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'used_ip' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3129, 111, 2495, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3130, 111, 2497, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3131, 111, 1237, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3132, 111, 1238, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3133, 111, 1239, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3134, 111, 1240, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3135, 111, 1241, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'手机验证码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3136, 111, 1242, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Records of system_sms_code --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3137, 111, 1243, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sms_code] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3138, 111, 2525, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_sms_code] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3139, 111, 1255, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3140, 111, 1256, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_sms_log --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_sms_log]') AND type IN ('U')) - DROP TABLE [dbo].[system_sms_log] -GO - -CREATE TABLE [dbo].[system_sms_log] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [channel_id] bigint NOT NULL, - [channel_code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [template_id] bigint NOT NULL, - [template_code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [template_type] tinyint NOT NULL, - [template_content] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [template_params] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [api_template_id] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [mobile] nvarchar(11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [user_id] bigint NULL, - [user_type] tinyint NULL, - [send_status] tinyint NOT NULL, - [send_time] datetime2(7) NULL, - [send_code] int NULL, - [send_msg] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_send_code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_send_msg] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_request_id] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_serial_no] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [receive_status] tinyint NOT NULL, - [receive_time] datetime2(7) NULL, - [api_receive_code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_receive_msg] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3141, 111, 1257, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -ALTER TABLE [dbo].[system_sms_log] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信渠道编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'channel_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, N'1', N'2023-12-02 23:41:02', N'1', N'2023-12-02 23:41:02', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'channel_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'template_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'template_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信类型', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'template_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3224, 109, 1015, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信内容', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'template_content' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3225, 109, 1016, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信参数', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'template_params' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3226, 111, 102, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 的模板编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_template_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3227, 111, 1013, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'手机号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'mobile' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, N'1', N'2023-12-30 11:42:36', N'1', N'2023-12-30 11:42:36', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'发送状态', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'send_status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'发送时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'send_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'发送结果的编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'send_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'发送结果的提示', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'send_msg' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4166, 109, 1120, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 发送结果的编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_send_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4167, 109, 2713, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 发送失败的提示', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_send_msg' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4168, 109, 2714, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 发送返回的唯一请求 ID', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_request_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4169, 109, 2715, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 发送返回的序号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_serial_no' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4170, 109, 2716, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'接收状态', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'receive_status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4171, 109, 2717, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'接收时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'receive_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4172, 109, 2718, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'API 接收结果的编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_receive_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4173, 109, 2720, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'API 接收结果的说明', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'api_receive_msg' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4174, 109, 1185, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4175, 109, 2721, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4176, 109, 1186, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4177, 109, 2722, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4178, 109, 1187, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4179, 109, 2723, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信日志', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_log' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4180, 109, 1188, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - - --- ---------------------------- --- Records of system_sms_log --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4181, 109, 2724, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -SET IDENTITY_INSERT [dbo].[system_sms_log] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4182, 109, 1189, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -SET IDENTITY_INSERT [dbo].[system_sms_log] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4183, 109, 2725, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4184, 109, 1190, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - - --- ---------------------------- --- Table structure for system_sms_template --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_sms_template]') AND type IN ('U')) - DROP TABLE [dbo].[system_sms_template] -GO - -CREATE TABLE [dbo].[system_sms_template] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [type] tinyint NOT NULL, - [status] tinyint NOT NULL, - [code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [name] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [content] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [params] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [remark] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [api_template_id] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [channel_id] bigint NOT NULL, - [channel_code] nvarchar(63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4185, 109, 2726, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -ALTER TABLE [dbo].[system_sms_template] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4186, 109, 1191, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4187, 109, 2727, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信签名', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4188, 109, 1192, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'开启状态', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4189, 109, 2728, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4190, 109, 1193, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板名称', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4191, 109, 2729, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'模板内容', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'content' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4192, 109, 1194, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'参数数组', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'params' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4193, 109, 2730, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'remark' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4194, 109, 1195, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信 API 的模板编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'api_template_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4195, 109, 2731, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信渠道编号', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'channel_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4196, 109, 1196, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信渠道编码', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'channel_code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4197, 109, 2732, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4198, 109, 1197, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4199, 109, 2733, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4200, 109, 1198, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4201, 109, 2734, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4202, 109, 1199, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'短信模板', -'SCHEMA', N'dbo', -'TABLE', N'system_sms_template' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4203, 109, 2735, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - - --- ---------------------------- --- Records of system_sms_template --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4204, 109, 1200, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -SET IDENTITY_INSERT [dbo].[system_sms_template] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4205, 109, 1201, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'2', N'1', N'0', N'test_01', N'测试验证码短信', N'正在进行登录操作{operation},您的验证码是{code}', N'["operation","code"]', NULL, N'4383920', N'1', N'YUN_PIAN', N'', N'2021-03-31 10:49:38.0000000', N'1', N'2021-04-10 01:22:00.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4206, 109, 1202, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'3', N'1', N'0', N'test_02', N'公告通知', N'您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', N'["code"]', NULL, N'SMS_207945135', N'2', N'ALIYUN', N'', N'2021-03-31 11:56:30.0000000', N'1', N'2021-04-10 01:22:02.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4207, 109, 1207, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'6', N'3', N'0', N'test-01', N'测试模板', N'哈哈哈 {name}', N'["name"]', N'f哈哈哈', N'4383920', N'1', N'YUN_PIAN', N'1', N'2021-04-10 01:07:21.0000000', N'1', N'2021-04-10 01:22:05.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4208, 109, 1208, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'7', N'3', N'0', N'test-04', N'测试下', N'老鸡{name},牛逼{code}', N'["name","code"]', NULL, N'suibian', N'4', N'DEBUG_DING_TALK', N'1', N'2021-04-13 00:29:53.0000000', N'1', N'2021-04-14 00:30:38.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4209, 109, 1209, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'8', N'1', N'0', N'user-sms-login', N'前台用户短信登录', N'您的验证码是{code}', N'["code"]', NULL, N'4372216', N'1', N'YUN_PIAN', N'1', N'2021-10-11 08:10:00.0000000', N'1', N'2021-10-11 08:10:00.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4210, 109, 1210, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'9', N'2', N'0', N'bpm_task_assigned', N'【工作流】任务被分配', N'您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}', N'["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, N'suibian', N'4', N'DEBUG_DING_TALK', N'1', N'2022-01-21 22:31:19.0000000', N'1', N'2022-01-22 00:03:36.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4211, 109, 1211, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'10', N'2', N'0', N'bpm_process_instance_reject', N'【工作流】流程被不通过', N'您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}', N'["processInstanceName","reason","detailUrl"]', NULL, N'suibian', N'4', N'DEBUG_DING_TALK', N'1', N'2022-01-22 00:03:31.0000000', N'1', N'2022-05-01 12:33:14.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4212, 109, 1212, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'11', N'2', N'0', N'bpm_process_instance_approve', N'【工作流】流程被通过', N'您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}', N'["processInstanceName","detailUrl"]', NULL, N'suibian', N'4', N'DEBUG_DING_TALK', N'1', N'2022-01-22 00:04:31.0000000', N'1', N'2022-03-27 20:32:21.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4213, 109, 1213, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'12', N'2', N'0', N'demo', N'演示模板', N'我就是测试一下下', N'[]', NULL, N'biubiubiu', N'6', N'DEBUG_DING_TALK', N'1', N'2022-04-10 23:22:49.0000000', N'1', N'2022-04-10 23:22:49.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4214, 109, 1215, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -INSERT INTO [dbo].[system_sms_template] ([id], [type], [status], [code], [name], [content], [params], [remark], [api_template_id], [channel_id], [channel_code], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'13', N'1', N'0', N'admin-sms-login', N'后台用户短信登录', N'您的验证码是{code}', N'["code"]', N'', N'4372216', N'1', N'YUN_PIAN', N'1', N'2021-10-11 08:10:00.0000000', N'1', N'2021-10-11 08:10:00.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4215, 109, 1216, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -SET IDENTITY_INSERT [dbo].[system_sms_template] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4216, 109, 1217, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4217, 109, 1218, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - - --- ---------------------------- --- Table structure for system_social_user --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_social_user]') AND type IN ('U')) - DROP TABLE [dbo].[system_social_user] -GO - -CREATE TABLE [dbo].[system_social_user] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [type] tinyint NOT NULL, - [openid] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [token] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [raw_token_info] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [nickname] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [avatar] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [raw_user_info] nvarchar(1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [code] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [state] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4218, 109, 1219, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -ALTER TABLE [dbo].[system_social_user] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4219, 109, 1220, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'主键(自增策略)', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4220, 109, 1221, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交平台的类型', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4221, 109, 1222, N'1', N'2024-03-30 17:53:17', N'1', N'2024-03-30 17:53:17', N'0', 121) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交 openid', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'openid' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4222, 111, 5, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交 token', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'token' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4223, 111, 1118, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'原始 Token 数据,一般是 JSON 格式', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'raw_token_info' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4224, 111, 1119, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户昵称', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'nickname' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4225, 111, 1120, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户头像', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'avatar' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4226, 111, 2713, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'原始用户数据,一般是 JSON 格式', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'raw_user_info' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4227, 111, 2714, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'最后一次的认证 code', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'code' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4228, 111, 2715, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'最后一次的认证 state', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'state' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4229, 111, 2716, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4230, 111, 2717, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4231, 111, 2718, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4232, 111, 2720, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4233, 111, 1185, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4234, 111, 2721, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4235, 111, 1186, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交用户表', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4236, 111, 2722, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - - --- ---------------------------- --- Records of system_social_user --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4237, 111, 1187, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_social_user] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4238, 111, 2723, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_social_user] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4239, 111, 1188, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4240, 111, 2724, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_social_user_bind --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_social_user_bind]') AND type IN ('U')) - DROP TABLE [dbo].[system_social_user_bind] -GO - -CREATE TABLE [dbo].[system_social_user_bind] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [user_type] tinyint NOT NULL, - [social_type] tinyint NOT NULL, - [social_user_id] bigint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4241, 111, 1189, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -ALTER TABLE [dbo].[system_social_user_bind] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4242, 111, 2725, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'主键(自增策略)', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4243, 111, 1190, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4244, 111, 2726, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'用户类型', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'user_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4245, 111, 1191, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交平台的类型', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'social_type' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4246, 111, 2727, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交用户的编号', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'social_user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4247, 111, 1192, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4248, 111, 2728, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4249, 111, 1193, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4250, 111, 2729, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4251, 111, 1194, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'tenant_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4252, 111, 2730, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4253, 111, 1195, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'社交绑定表', -'SCHEMA', N'dbo', -'TABLE', N'system_social_user_bind' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4254, 111, 2731, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - - --- ---------------------------- --- Records of system_social_user_bind --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4255, 111, 1196, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_social_user_bind] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4256, 111, 2732, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_social_user_bind] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4257, 111, 1197, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -COMMIT +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4258, 111, 2733, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - - --- ---------------------------- --- Table structure for system_tenant --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_tenant]') AND type IN ('U')) - DROP TABLE [dbo].[system_tenant] -GO - -CREATE TABLE [dbo].[system_tenant] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [contact_user_id] bigint NULL, - [contact_name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [contact_mobile] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [website] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [package_id] bigint NOT NULL, - [expire_time] datetime2(7) NOT NULL, - [account_count] int NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4259, 111, 1198, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -ALTER TABLE [dbo].[system_tenant] SET (LOCK_ESCALATION = TABLE) +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4260, 111, 2734, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4261, 111, 1199, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户名', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4262, 111, 2735, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'联系人的用户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'contact_user_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4263, 111, 1200, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'联系人', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'contact_name' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4264, 111, 1201, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'联系手机', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'contact_mobile' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4265, 111, 1202, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'status' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4266, 111, 1207, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'绑定域名', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'website' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4267, 111, 1208, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户套餐编号', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'package_id' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4268, 111, 1209, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'过期时间', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'expire_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4269, 111, 1210, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'账号数量', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'account_count' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4270, 111, 1211, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'creator' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4271, 111, 1212, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'create_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4272, 111, 1213, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'updater' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4273, 111, 1215, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'update_time' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4274, 111, 1216, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant', -'COLUMN', N'deleted' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4275, 111, 1217, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -EXEC sp_addextendedproperty -'MS_Description', N'租户表', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant' +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4276, 111, 1218, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - - --- ---------------------------- --- Records of system_tenant --- ---------------------------- -BEGIN TRANSACTION +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4277, 111, 1219, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -SET IDENTITY_INSERT [dbo].[system_tenant] ON +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -INSERT INTO [dbo].[system_tenant] ([id], [name], [contact_user_id], [contact_name], [contact_mobile], [status], [website], [package_id], [expire_time], [account_count], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'1', N'芋道源码', NULL, N'芋艿', N'17321315478', N'0', N'https://www.iocoder.cn', N'0', N'2099-02-19 17:14:16.0000000', N'9999', N'1', N'2021-01-05 17:03:47.0000000', N'1', N'2022-02-23 12:15:11.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -INSERT INTO [dbo].[system_tenant] ([id], [name], [contact_user_id], [contact_name], [contact_mobile], [status], [website], [package_id], [expire_time], [account_count], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'121', N'小租户', N'110', N'小王2', N'15601691300', N'0', N'http://www.iocoder.cn', N'111', N'2024-03-11 00:00:00.0000000', N'20', N'1', N'2022-02-22 00:56:14.0000000', N'1', N'2022-03-19 18:37:20.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, N'1', N'2024-03-30 17:53:18', N'1', N'2024-03-30 17:53:18', N'0', 122) GO - -INSERT INTO [dbo].[system_tenant] ([id], [name], [contact_user_id], [contact_name], [contact_mobile], [status], [website], [package_id], [expire_time], [account_count], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'122', N'测试租户', N'113', N'芋道', N'15601691300', N'0', N'https://www.iocoder.cn', N'111', N'2022-04-30 00:00:00.0000000', N'50', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'0') +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, N'1', N'2024-04-30 09:38:37', N'1', N'2024-04-30 09:38:37', N'0', 1) GO - -SET IDENTITY_INSERT [dbo].[system_tenant] OFF +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, N'1', N'2024-04-30 09:38:37', N'1', N'2024-04-30 09:38:37', N'0', 1) +GO +SET IDENTITY_INSERT system_role_menu OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for system_tenant_package +-- Table structure for system_sms_channel -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_tenant_package]') AND type IN ('U')) - DROP TABLE [dbo].[system_tenant_package] -GO - -CREATE TABLE [dbo].[system_tenant_package] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [name] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [status] tinyint NOT NULL, - [remark] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [menu_ids] nvarchar(2048) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS system_sms_channel; +CREATE TABLE system_sms_channel +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + signature nvarchar(12) NOT NULL, + code nvarchar(63) NOT NULL, + status tinyint NOT NULL, + remark nvarchar(255) DEFAULT NULL NULL, + api_key nvarchar(128) NOT NULL, + api_secret nvarchar(128) DEFAULT NULL NULL, + callback_url nvarchar(255) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[system_tenant_package] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'id' +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'短信签名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'signature' GO EXEC sp_addextendedproperty -'MS_Description', N'套餐编号', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'id' + 'MS_Description', N'渠道编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'code' GO EXEC sp_addextendedproperty -'MS_Description', N'套餐名', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'name' + 'MS_Description', N'开启状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'租户状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'status' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'remark' + 'MS_Description', N'短信 API 的账号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'api_key' GO EXEC sp_addextendedproperty -'MS_Description', N'关联的菜单编号', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'menu_ids' + 'MS_Description', N'短信 API 的秘钥', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'api_secret' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'creator' + 'MS_Description', N'短信发送回调 URL', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'callback_url' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package', -'COLUMN', N'deleted' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'租户套餐表', -'SCHEMA', N'dbo', -'TABLE', N'system_tenant_package' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel', + 'COLUMN', N'deleted' GO +EXEC sp_addextendedproperty + 'MS_Description', N'短信渠道', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_channel' +GO -- ---------------------------- --- Records of system_tenant_package +-- Records of system_sms_channel -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[system_tenant_package] ON +SET IDENTITY_INSERT system_sms_channel ON GO - -INSERT INTO [dbo].[system_tenant_package] ([id], [name], [status], [remark], [menu_ids], [creator], [create_time], [updater], [update_time], [deleted]) VALUES (N'111', N'普通套餐', N'0', N'小功能', N'[1024,1025,1,102,103,104,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023]', N'1', N'2022-02-22 00:54:00.0000000', N'1', N'2022-03-19 18:39:13.0000000', N'0') +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, N'Ballcat', N'ALIYUN', 0, N'你要改哦,只有我可以用!!!!', N'LTAI5tCnKso2uG3kJ5gRav88', N'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, N'', N'2021-03-31 11:53:10', N'1', N'2023-12-02 22:10:17', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_tenant_package] OFF +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, N'测试渠道', N'DEBUG_DING_TALK', 0, N'123', N'696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', N'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, N'1', N'2021-04-13 00:23:14', N'1', N'2022-03-27 20:29:49', N'0') +GO +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (6, N'测试演示', N'DEBUG_DING_TALK', 0, N'仅测试', N'696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', N'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, N'1', N'2022-04-10 23:07:59', N'1', N'2023-12-02 22:10:08', N'0') +GO +SET IDENTITY_INSERT system_sms_channel OFF GO - COMMIT GO - +-- @formatter:on -- ---------------------------- --- Table structure for system_user_post +-- Table structure for system_sms_code -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_user_post]') AND type IN ('U')) - DROP TABLE [dbo].[system_user_post] -GO - -CREATE TABLE [dbo].[system_user_post] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [post_id] bigint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL, - [tenant_id] bigint DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS system_sms_code; +CREATE TABLE system_sms_code +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + mobile nvarchar(11) NOT NULL, + code nvarchar(6) NOT NULL, + create_ip nvarchar(15) NOT NULL, + scene tinyint NOT NULL, + today_index tinyint NOT NULL, + used tinyint NOT NULL, + used_time datetime2 DEFAULT NULL NULL, + used_ip nvarchar(255) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[system_user_post] SET (LOCK_ESCALATION = TABLE) +CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile) GO EXEC sp_addextendedproperty -'MS_Description', N'ID 主键', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'id' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'用户ID', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'user_id' + 'MS_Description', N'手机号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'mobile' GO EXEC sp_addextendedproperty -'MS_Description', N'岗位ID', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'post_id' + 'MS_Description', N'验证码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'code' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'creator' + 'MS_Description', N'创建 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'create_ip' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'create_time' + 'MS_Description', N'发送场景', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'scene' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'updater' + 'MS_Description', N'今日发送的第几条', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'today_index' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'update_time' + 'MS_Description', N'是否使用', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'used' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'deleted' + 'MS_Description', N'使用时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'used_time' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post', -'COLUMN', N'tenant_id' + 'MS_Description', N'使用 IP', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'used_ip' GO EXEC sp_addextendedproperty -'MS_Description', N'用户岗位表', -'SCHEMA', N'dbo', -'TABLE', N'system_user_post' -GO - - --- ---------------------------- --- Records of system_user_post --- ---------------------------- -BEGIN TRANSACTION + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'creator' GO -SET IDENTITY_INSERT [dbo].[system_user_post] ON +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'create_time' GO -INSERT INTO [dbo].[system_user_post] ([id], [user_id], [post_id], [creator], [create_time], [updater], [update_time], [deleted], [tenant_id]) VALUES (N'112', N'1', N'1', N'admin', N'2022-05-02 07:25:24.0000000', N'admin', N'2022-05-02 07:25:24.0000000', N'0', N'1') +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'updater' GO -INSERT INTO [dbo].[system_user_post] ([id], [user_id], [post_id], [creator], [create_time], [updater], [update_time], [deleted], [tenant_id]) VALUES (N'113', N'100', N'1', N'admin', N'2022-05-02 07:25:24.0000000', N'admin', N'2022-05-02 07:25:24.0000000', N'0', N'1') +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'update_time' GO -INSERT INTO [dbo].[system_user_post] ([id], [user_id], [post_id], [creator], [create_time], [updater], [update_time], [deleted], [tenant_id]) VALUES (N'114', N'114', N'3', N'admin', N'2022-05-02 07:25:24.0000000', N'admin', N'2022-05-02 07:25:24.0000000', N'0', N'1') +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'deleted' GO -SET IDENTITY_INSERT [dbo].[system_user_post] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code', + 'COLUMN', N'tenant_id' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'手机验证码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_code' GO - -- ---------------------------- --- Table structure for system_user_role +-- Table structure for system_sms_log -- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_user_role]') AND type IN ('U')) - DROP TABLE [dbo].[system_user_role] -GO - -CREATE TABLE [dbo].[system_user_role] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [user_id] bigint NOT NULL, - [role_id] bigint NOT NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL +DROP TABLE IF EXISTS system_sms_log; +CREATE TABLE system_sms_log +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + channel_id bigint NOT NULL, + channel_code nvarchar(63) NOT NULL, + template_id bigint NOT NULL, + template_code nvarchar(63) NOT NULL, + template_type tinyint NOT NULL, + template_content nvarchar(255) NOT NULL, + template_params nvarchar(255) NOT NULL, + api_template_id nvarchar(63) NOT NULL, + mobile nvarchar(11) NOT NULL, + user_id bigint DEFAULT NULL NULL, + user_type tinyint DEFAULT NULL NULL, + send_status tinyint DEFAULT 0 NOT NULL, + send_time datetime2 DEFAULT NULL NULL, + api_send_code nvarchar(63) DEFAULT NULL NULL, + api_send_msg nvarchar(255) DEFAULT NULL NULL, + api_request_id nvarchar(255) DEFAULT NULL NULL, + api_serial_no nvarchar(255) DEFAULT NULL NULL, + receive_status tinyint DEFAULT 0 NOT NULL, + receive_time datetime2 DEFAULT NULL NULL, + api_receive_code nvarchar(63) DEFAULT NULL NULL, + api_receive_msg nvarchar(255) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL ) GO -ALTER TABLE [dbo].[system_user_role] SET (LOCK_ESCALATION = TABLE) -GO - EXEC sp_addextendedproperty -'MS_Description', N'自增编号', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'id' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'用户ID', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'user_id' + 'MS_Description', N'短信渠道编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'channel_id' GO EXEC sp_addextendedproperty -'MS_Description', N'角色ID', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'role_id' + 'MS_Description', N'短信渠道编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'channel_code' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'creator' + 'MS_Description', N'模板编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'template_id' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'create_time' + 'MS_Description', N'模板编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'template_code' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'updater' + 'MS_Description', N'短信类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'template_type' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'update_time' + 'MS_Description', N'短信内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'template_content' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'tenant_id' + 'MS_Description', N'短信参数', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'template_params' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role', -'COLUMN', N'deleted' + 'MS_Description', N'短信 API 的模板编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_template_id' GO EXEC sp_addextendedproperty -'MS_Description', N'用户和角色关联表', -'SCHEMA', N'dbo', -'TABLE', N'system_user_role' -GO - - --- ---------------------------- --- Records of system_user_role --- ---------------------------- -BEGIN TRANSACTION -GO - -SET IDENTITY_INSERT [dbo].[system_user_role] ON -GO - -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'1', N'1', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') -GO - -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'2', N'2', N'2', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') -GO - -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'4', N'100', N'101', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') + 'MS_Description', N'手机号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'mobile' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'5', N'100', N'1', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'user_id' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'6', N'100', N'2', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'user_type' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'7', N'104', N'101', N'', N'2022-01-11 13:19:45.0000000', N'', N'2022-01-11 13:19:45.0000000', N'1', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'发送状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'send_status' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'10', N'103', N'1', N'1', N'2022-01-11 13:19:45.0000000', N'1', N'2022-01-11 13:19:45.0000000', N'1', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'发送时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'send_time' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'11', N'107', N'106', N'1', N'2022-02-20 22:59:33.0000000', N'1', N'2022-02-20 22:59:33.0000000', N'118', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'短信 API 发送结果的编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_send_code' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'12', N'108', N'107', N'1', N'2022-02-20 23:00:50.0000000', N'1', N'2022-02-20 23:00:50.0000000', N'119', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'短信 API 发送失败的提示', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_send_msg' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'13', N'109', N'108', N'1', N'2022-02-20 23:11:50.0000000', N'1', N'2022-02-20 23:11:50.0000000', N'120', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'短信 API 发送返回的唯一请求 ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_request_id' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'14', N'110', N'109', N'1', N'2022-02-22 00:56:14.0000000', N'1', N'2022-02-22 00:56:14.0000000', N'121', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'短信 API 发送返回的序号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_serial_no' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'15', N'111', N'110', N'110', N'2022-02-23 13:14:38.0000000', N'110', N'2022-02-23 13:14:38.0000000', N'121', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'接收状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'receive_status' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'16', N'113', N'111', N'1', N'2022-03-07 21:37:58.0000000', N'1', N'2022-03-07 21:37:58.0000000', N'122', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'接收时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'receive_time' GO -INSERT INTO [dbo].[system_user_role] ([id], [user_id], [role_id], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'17', N'114', N'101', N'1', N'2022-03-19 21:51:13.0000000', N'1', N'2022-03-19 21:51:13.0000000', N'1', N'0') +EXEC sp_addextendedproperty + 'MS_Description', N'API 接收结果的编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_receive_code' GO -SET IDENTITY_INSERT [dbo].[system_user_role] OFF +EXEC sp_addextendedproperty + 'MS_Description', N'API 接收结果的说明', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'api_receive_msg' GO -COMMIT +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'creator' GO - --- ---------------------------- --- Table structure for system_users --- ---------------------------- -IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[system_users]') AND type IN ('U')) - DROP TABLE [dbo].[system_users] -GO - -CREATE TABLE [dbo].[system_users] ( - [id] bigint IDENTITY(1,1) NOT NULL, - [username] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [password] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [nickname] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [remark] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [dept_id] bigint NULL, - [post_ids] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [email] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [mobile] nvarchar(11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [sex] tinyint NULL, - [avatar] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [status] tinyint NOT NULL, - [login_ip] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [login_date] datetime2(7) NULL, - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [create_time] datetime2(7) NOT NULL, - [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [update_time] datetime2(7) NOT NULL, - [tenant_id] bigint NOT NULL, - [deleted] bit DEFAULT 0 NOT NULL -) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'create_time' GO -ALTER TABLE [dbo].[system_users] SET (LOCK_ESCALATION = TABLE) +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'用户ID', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'用户账号', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'username' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'密码', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'password' + 'MS_Description', N'短信日志', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_log' GO -EXEC sp_addextendedproperty -'MS_Description', N'用户昵称', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'nickname' +-- ---------------------------- +-- Table structure for system_sms_template +-- ---------------------------- +DROP TABLE IF EXISTS system_sms_template; +CREATE TABLE system_sms_template +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + type tinyint NOT NULL, + status tinyint NOT NULL, + code nvarchar(63) NOT NULL, + name nvarchar(63) NOT NULL, + content nvarchar(255) NOT NULL, + params nvarchar(255) NOT NULL, + remark nvarchar(255) DEFAULT NULL NULL, + api_template_id nvarchar(63) NOT NULL, + channel_id bigint NOT NULL, + channel_code nvarchar(63) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO EXEC sp_addextendedproperty -'MS_Description', N'备注', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'remark' + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'id' GO EXEC sp_addextendedproperty -'MS_Description', N'部门ID', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'dept_id' + 'MS_Description', N'模板类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'type' GO EXEC sp_addextendedproperty -'MS_Description', N'岗位编号数组', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'post_ids' + 'MS_Description', N'开启状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'status' GO EXEC sp_addextendedproperty -'MS_Description', N'用户邮箱', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'email' + 'MS_Description', N'模板编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'code' GO EXEC sp_addextendedproperty -'MS_Description', N'手机号码', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'mobile' + 'MS_Description', N'模板名称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'name' GO EXEC sp_addextendedproperty -'MS_Description', N'用户性别', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'sex' + 'MS_Description', N'模板内容', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'content' GO EXEC sp_addextendedproperty -'MS_Description', N'头像地址', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'avatar' + 'MS_Description', N'参数数组', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'params' GO EXEC sp_addextendedproperty -'MS_Description', N'帐号状态(0正常 1停用)', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'status' + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'remark' GO EXEC sp_addextendedproperty -'MS_Description', N'最后登录IP', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'login_ip' + 'MS_Description', N'短信 API 的模板编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'api_template_id' GO EXEC sp_addextendedproperty -'MS_Description', N'最后登录时间', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'login_date' + 'MS_Description', N'短信渠道编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'channel_id' GO EXEC sp_addextendedproperty -'MS_Description', N'创建者', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'creator' + 'MS_Description', N'短信渠道编码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'channel_code' GO EXEC sp_addextendedproperty -'MS_Description', N'创建时间', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'create_time' + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'creator' GO EXEC sp_addextendedproperty -'MS_Description', N'更新者', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'updater' + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'create_time' GO EXEC sp_addextendedproperty -'MS_Description', N'更新时间', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'update_time' + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'updater' GO EXEC sp_addextendedproperty -'MS_Description', N'租户编号', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'tenant_id' + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'update_time' GO EXEC sp_addextendedproperty -'MS_Description', N'是否删除', -'SCHEMA', N'dbo', -'TABLE', N'system_users', -'COLUMN', N'deleted' + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template', + 'COLUMN', N'deleted' GO EXEC sp_addextendedproperty -'MS_Description', N'用户信息表', -'SCHEMA', N'dbo', -'TABLE', N'system_users' + 'MS_Description', N'短信模板', + 'SCHEMA', N'dbo', + 'TABLE', N'system_sms_template' GO - -- ---------------------------- --- Records of system_users +-- Records of system_sms_template -- ---------------------------- +-- @formatter:off BEGIN TRANSACTION GO - -SET IDENTITY_INSERT [dbo].[system_users] ON -GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'1', N'admin', N'$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', N'芋道源码', N'管理员', N'103', N'[1]', N'aoteman@126.com', N'15612345678', N'1', N'http://test.yudao.iocoder.cn/48934f2f-92d4-4250-b917-d10d2b262c6a', N'0', N'127.0.0.1', N'2022-05-26 00:51:15.3820000', N'admin', N'2021-01-05 17:03:47.0000000', NULL, N'2022-05-26 00:51:15.3870000', N'1', N'0') +SET IDENTITY_INSERT system_sms_template ON GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'100', N'yudao', N'$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', N'芋道', N'不要吓我', N'104', N'[1]', N'yudao@iocoder.cn', N'15601691300', N'1', N'', N'1', N'127.0.0.1', N'2022-05-03 16:49:24.6860000', N'', N'2021-01-07 09:07:17.0000000', NULL, N'2022-05-03 16:49:24.6860000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, N'test_01', N'测试验证码短信', N'正在进行登录操作{operation},您的验证码是{code}', N'["operation","code"]', N'测试备注', N'4383920', 6, N'DEBUG_DING_TALK', N'', N'2021-03-31 10:49:38', N'1', N'2023-12-02 22:32:47', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'103', N'yuanma', N'$2a$10$wWoPT7sqriM2O1YXRL.je.GiL538OR6ZTN8aQZr9JAGdnpCH2tpYe', N'源码', NULL, N'106', NULL, N'yuanma@iocoder.cn', N'15601701300', N'0', N'', N'0', N'127.0.0.1', N'2022-01-18 00:33:40.0000000', N'', N'2021-01-13 23:50:35.0000000', NULL, N'2022-01-18 00:33:40.0000000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, N'test_02', N'公告通知', N'您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', N'["code"]', NULL, N'SMS_207945135', 2, N'ALIYUN', N'', N'2021-03-31 11:56:30', N'1', N'2021-04-10 01:22:02', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'104', N'test', N'$2a$10$e5RpuDCC0GYSt0Hvd2.CjujIXwgGct4SnXi6dVGxdgFsnqgEryk5a', N'测试号', NULL, N'107', N'[]', N'111@qq.com', N'15601691200', N'1', N'', N'0', N'127.0.0.1', N'2022-03-19 21:46:19.0000000', N'', N'2021-01-21 02:13:53.0000000', NULL, N'2022-03-19 21:46:19.0000000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (6, 3, 0, N'test-01', N'测试模板', N'哈哈哈 {name}', N'["name"]', N'f哈哈哈', N'4383920', 6, N'DEBUG_DING_TALK', N'1', N'2021-04-10 01:07:21', N'1', N'2022-12-10 21:26:09', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'107', N'admin107', N'$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', N'0', N'', N'0', N'', NULL, N'1', N'2022-02-20 22:59:33.0000000', N'1', N'2022-02-27 08:26:51.0000000', N'118', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (7, 3, 0, N'test-04', N'测试下', N'老鸡{name},牛逼{code}', N'["name","code"]', N'哈哈哈哈', N'suibian', 4, N'DEBUG_DING_TALK', N'1', N'2021-04-13 00:29:53', N'1', N'2023-12-02 22:35:34', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'108', N'admin108', N'$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', N'0', N'', N'0', N'', NULL, N'1', N'2022-02-20 23:00:50.0000000', N'1', N'2022-02-27 08:26:53.0000000', N'119', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (8, 1, 0, N'user-sms-login', N'前台用户短信登录', N'您的验证码是{code}', N'["code"]', NULL, N'4372216', 6, N'DEBUG_DING_TALK', N'1', N'2021-10-11 08:10:00', N'1', N'2022-12-10 21:25:59', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'109', N'admin109', N'$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', N'0', N'', N'0', N'', NULL, N'1', N'2022-02-20 23:11:50.0000000', N'1', N'2022-02-27 08:26:56.0000000', N'120', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (9, 2, 0, N'bpm_task_assigned', N'【工作流】任务被分配', N'您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}', N'["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, N'suibian', 4, N'DEBUG_DING_TALK', N'1', N'2022-01-21 22:31:19', N'1', N'2022-01-22 00:03:36', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'110', N'admin110', N'$2a$10$qYxoXs0ogPHgYllyEneYde9xcCW5hZgukrxeXZ9lmLhKse8TK6IwW', N'小王', NULL, NULL, NULL, N'', N'15601691300', N'0', N'', N'0', N'127.0.0.1', N'2022-02-23 19:36:28.0000000', N'1', N'2022-02-22 00:56:14.0000000', NULL, N'2022-02-27 08:26:59.0000000', N'121', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (10, 2, 0, N'bpm_process_instance_reject', N'【工作流】流程被不通过', N'您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}', N'["processInstanceName","reason","detailUrl"]', NULL, N'suibian', 4, N'DEBUG_DING_TALK', N'1', N'2022-01-22 00:03:31', N'1', N'2022-05-01 12:33:14', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'111', N'test', N'$2a$10$mExveopHUx9Q4QiLtAzhDeH3n4/QlNLzEsM4AqgxKrU.ciUZDXZCy', N'测试用户', NULL, NULL, N'[]', N'', N'', N'0', N'', N'0', N'', NULL, N'110', N'2022-02-23 13:14:33.0000000', N'110', N'2022-02-23 13:14:33.0000000', N'121', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (11, 2, 0, N'bpm_process_instance_approve', N'【工作流】流程被通过', N'您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}', N'["processInstanceName","detailUrl"]', NULL, N'suibian', 4, N'DEBUG_DING_TALK', N'1', N'2022-01-22 00:04:31', N'1', N'2022-03-27 20:32:21', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'112', N'newobject', N'$2a$10$jh5MsR.ud/gKe3mVeUp5t.nEXGDSmHyv5OYjWQwHO8wlGmMSI9Twy', N'新对象', NULL, NULL, N'[]', N'', N'', N'0', N'', N'0', N'', NULL, N'1', N'2022-02-23 19:08:03.0000000', N'1', N'2022-02-23 19:08:03.0000000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (12, 2, 0, N'demo', N'演示模板', N'我就是测试一下下', N'[]', NULL, N'biubiubiu', 6, N'DEBUG_DING_TALK', N'1', N'2022-04-10 23:22:49', N'1', N'2023-03-24 23:45:07', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'113', N'aoteman', N'$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', N'芋道', NULL, NULL, NULL, N'', N'15601691300', N'0', N'', N'0', N'127.0.0.1', N'2022-03-19 18:38:51.0000000', N'1', N'2022-03-07 21:37:58.0000000', NULL, N'2022-03-19 18:38:51.0000000', N'122', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (14, 1, 0, N'user-update-mobile', N'会员用户 - 修改手机', N'您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', N'["code"]', N'', N'null', 4, N'DEBUG_DING_TALK', N'1', N'2023-08-19 18:58:01', N'1', N'2023-08-19 11:34:04', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'114', N'hrmgr', N'$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', N'hr 小姐姐', NULL, NULL, N'[3]', N'', N'', N'0', N'', N'0', N'127.0.0.1', N'2022-03-19 22:15:43.0000000', N'1', N'2022-03-19 21:50:58.0000000', NULL, N'2022-03-19 22:15:43.0000000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (15, 1, 0, N'user-update-password', N'会员用户 - 修改密码', N'您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', N'["code"]', N'', N'null', 4, N'DEBUG_DING_TALK', N'1', N'2023-08-19 18:58:01', N'1', N'2023-08-19 11:34:18', N'0') GO - -INSERT INTO [dbo].[system_users] ([id], [username], [password], [nickname], [remark], [dept_id], [post_ids], [email], [mobile], [sex], [avatar], [status], [login_ip], [login_date], [creator], [create_time], [updater], [update_time], [tenant_id], [deleted]) VALUES (N'115', N'aotemane', N'$2a$10$/WCwGHu1eq0wOVDd/u8HweJ0gJCHyLS6T7ndCqI8UXZAQom1etk2e', N'1', N'11', N'100', N'[]', N'', N'', N'0', N'', N'0', N'', NULL, N'1', N'2022-04-30 02:55:43.0000000', N'1', N'2022-04-30 02:55:43.0000000', N'1', N'0') +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (16, 1, 0, N'user-reset-password', N'会员用户 - 重置密码', N'您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', N'["code"]', N'', N'null', 4, N'DEBUG_DING_TALK', N'1', N'2023-08-19 18:58:01', N'1', N'2023-12-02 22:35:27', N'0') GO - -SET IDENTITY_INSERT [dbo].[system_users] OFF +SET IDENTITY_INSERT system_sms_template OFF GO - COMMIT GO - - --- ---------------------------- --- Primary Key structure for table QRTZ_CALENDARS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_CALENDARS] ADD CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [CALENDAR_NAME]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] -GO - +-- @formatter:on -- ---------------------------- --- Indexes structure for table QRTZ_CRON_TRIGGERS +-- Table structure for system_social_client -- ---------------------------- -CREATE NONCLUSTERED INDEX [IX_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] -ON [dbo].[QRTZ_CRON_TRIGGERS] ( - [SCHED_NAME] ASC, - [TRIGGER_NAME] ASC, - [TRIGGER_GROUP] ASC +DROP TABLE IF EXISTS system_social_client; +CREATE TABLE system_social_client +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(255) NOT NULL, + social_type tinyint NOT NULL, + user_type tinyint NOT NULL, + client_id nvarchar(255) NOT NULL, + client_secret nvarchar(255) NOT NULL, + agent_id nvarchar(255) DEFAULT NULL NULL, + status tinyint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ) GO - --- ---------------------------- --- Primary Key structure for table QRTZ_CRON_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'id' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_FIRED_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [ENTRY_ID]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'应用名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'name' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_JOB_DETAILS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] ADD CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'社交平台的类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'social_type' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_LOCKS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_LOCKS] ADD CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [LOCK_NAME]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'user_type' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ADD CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'客户端编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'client_id' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_SCHEDULER_STATE --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] ADD CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED ([SCHED_NAME], [INSTANCE_NAME]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'客户端密钥', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'client_secret' GO - --- ---------------------------- --- Indexes structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] -ON [dbo].[QRTZ_SIMPLE_TRIGGERS] ( - [SCHED_NAME] ASC, - [TRIGGER_NAME] ASC, - [TRIGGER_GROUP] ASC -) +EXEC sp_addextendedproperty + 'MS_Description', N'代理编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'agent_id' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'状态', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'status' GO - --- ---------------------------- --- Indexes structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] -ON [dbo].[QRTZ_SIMPROP_TRIGGERS] ( - [SCHED_NAME] ASC, - [TRIGGER_NAME] ASC, - [TRIGGER_GROUP] ASC -) +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'creator' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPROP_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'create_time' GO - --- ---------------------------- --- Indexes structure for table QRTZ_TRIGGERS --- ---------------------------- -CREATE NONCLUSTERED INDEX [IX_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] -ON [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME] ASC, - [TRIGGER_NAME] ASC, - [TRIGGER_GROUP] ASC -) +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'updater' GO - --- ---------------------------- --- Primary Key structure for table QRTZ_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'update_time' GO - --- ---------------------------- --- Auto increment value for bpm_form --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_form]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'deleted' GO - --- ---------------------------- --- Primary Key structure for table bpm_form --- ---------------------------- -ALTER TABLE [dbo].[bpm_form] ADD CONSTRAINT [PK__bpm_form__3213E83F86C2B27F] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client', + 'COLUMN', N'tenant_id' GO - --- ---------------------------- --- Auto increment value for bpm_oa_leave --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_oa_leave]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'社交客户端表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_client' GO - -- ---------------------------- --- Primary Key structure for table bpm_oa_leave +-- Records of system_social_client -- ---------------------------- -ALTER TABLE [dbo].[bpm_oa_leave] ADD CONSTRAINT [PK__bpm_oa_l__3213E83F3569F596] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - - --- ---------------------------- --- Auto increment value for bpm_process_definition_ext --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_process_definition_ext]', RESEED, 1) +SET IDENTITY_INSERT system_social_client ON GO - - --- ---------------------------- --- Primary Key structure for table bpm_process_definition_ext --- ---------------------------- -ALTER TABLE [dbo].[bpm_process_definition_ext] ADD CONSTRAINT [PK__bpm_proc__3213E83F0A8AB015] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'钉钉', 20, 2, N'dingvrnreaje3yqvzhxg', N'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, N'', N'2023-10-18 11:21:18', N'1', N'2023-12-20 21:28:26', N'1', 1) GO - - --- ---------------------------- --- Auto increment value for bpm_process_instance_ext --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_process_instance_ext]', RESEED, 1) +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'钉钉(王土豆)', 20, 2, N'dingtsu9hpepjkbmthhw', N'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, N'', N'2023-10-18 11:21:18', N'', N'2023-12-20 21:28:26', N'1', 121) GO - - --- ---------------------------- --- Primary Key structure for table bpm_process_instance_ext --- ---------------------------- -ALTER TABLE [dbo].[bpm_process_instance_ext] ADD CONSTRAINT [PK__bpm_proc__3213E83FFD88328F] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, N'微信公众号', 31, 1, N'wx5b23ba7a5589ecbb', N'2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, N'', N'2023-10-18 16:07:46', N'1', N'2023-12-20 21:28:23', N'1', 1) GO - - --- ---------------------------- --- Auto increment value for bpm_task_assign_rule --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_task_assign_rule]', RESEED, 2) +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (43, N'微信小程序', 34, 1, N'wx63c280fe3248a3e7', N'6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, N'', N'2023-10-19 13:37:41', N'1', N'2023-12-20 21:28:25', N'1', 1) GO - - --- ---------------------------- --- Primary Key structure for table bpm_task_assign_rule --- ---------------------------- -ALTER TABLE [dbo].[bpm_task_assign_rule] ADD CONSTRAINT [PK__bpm_task__3213E83F474371C5] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +SET IDENTITY_INSERT system_social_client OFF GO - - --- ---------------------------- --- Auto increment value for bpm_task_ext --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_task_ext]', RESEED, 1) +COMMIT GO - +-- @formatter:on -- ---------------------------- --- Primary Key structure for table bpm_task_ext +-- Table structure for system_social_user -- ---------------------------- -ALTER TABLE [dbo].[bpm_task_ext] ADD CONSTRAINT [PK__bpm_task__3213E83FD8AFE1F9] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +DROP TABLE IF EXISTS system_social_user; +CREATE TABLE system_social_user +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + type tinyint NOT NULL, + openid nvarchar(32) NOT NULL, + token nvarchar(256) DEFAULT NULL NULL, + raw_token_info nvarchar(1024) NOT NULL, + nickname nvarchar(32) NOT NULL, + avatar nvarchar(255) DEFAULT NULL NULL, + raw_user_info nvarchar(1024) NOT NULL, + code nvarchar(256) NOT NULL, + state nvarchar(256) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Auto increment value for bpm_user_group --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[bpm_user_group]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'主键(自增策略)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'id' GO - --- ---------------------------- --- Primary Key structure for table bpm_user_group --- ---------------------------- -ALTER TABLE [dbo].[bpm_user_group] ADD CONSTRAINT [PK__bpm_user__3213E83F25E4725B] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'社交平台的类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'type' GO - --- ---------------------------- --- Auto increment value for infra_api_access_log --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_api_access_log]', RESEED, 40615) +EXEC sp_addextendedproperty + 'MS_Description', N'社交 openid', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'openid' GO - --- ---------------------------- --- Primary Key structure for table infra_api_access_log --- ---------------------------- -ALTER TABLE [dbo].[infra_api_access_log] ADD CONSTRAINT [PK__infra_ap__3213E83F04F27A05] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'社交 token', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'token' GO - --- ---------------------------- --- Auto increment value for infra_api_error_log --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_api_error_log]', RESEED, 2021) +EXEC sp_addextendedproperty + 'MS_Description', N'原始 Token 数据,一般是 JSON 格式', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'raw_token_info' GO - --- ---------------------------- --- Primary Key structure for table infra_api_error_log --- ---------------------------- -ALTER TABLE [dbo].[infra_api_error_log] ADD CONSTRAINT [PK__infra_ap__3213E83FCA2446D4] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'用户昵称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'nickname' GO - --- ---------------------------- --- Auto increment value for infra_codegen_column --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_codegen_column]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'用户头像', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'avatar' GO - --- ---------------------------- --- Primary Key structure for table infra_codegen_column --- ---------------------------- -ALTER TABLE [dbo].[infra_codegen_column] ADD CONSTRAINT [PK__infra_co__3213E83FA9EC5005] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'原始用户数据,一般是 JSON 格式', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'raw_user_info' GO - --- ---------------------------- --- Auto increment value for infra_codegen_table --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_codegen_table]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'最后一次的认证 code', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'code' GO - --- ---------------------------- --- Primary Key structure for table infra_codegen_table --- ---------------------------- -ALTER TABLE [dbo].[infra_codegen_table] ADD CONSTRAINT [PK__infra_co__3213E83F555031D0] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'最后一次的认证 state', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'state' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Primary Key structure for table infra_config --- ---------------------------- -ALTER TABLE [dbo].[infra_config] ADD CONSTRAINT [PK__infra_co__3213E83FF4C71E85] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Auto increment value for infra_data_source_config --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_data_source_config]', RESEED, 9) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Primary Key structure for table infra_data_source_config --- ---------------------------- -ALTER TABLE [dbo].[infra_data_source_config] ADD CONSTRAINT [PK__infra_da__3213E83F02D21AEB] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'社交用户表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user' +GO -- ---------------------------- --- Auto increment value for infra_file +-- Table structure for system_social_user_bind -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_file]', RESEED, 1) +DROP TABLE IF EXISTS system_social_user_bind; +CREATE TABLE system_social_user_bind +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type tinyint NOT NULL, + social_type tinyint NOT NULL, + social_user_id bigint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Auto increment value for infra_file_config --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_file_config]', RESEED, 11) +EXEC sp_addextendedproperty + 'MS_Description', N'主键(自增策略)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'user_id' +GO --- ---------------------------- --- Primary Key structure for table infra_file_config --- ---------------------------- -ALTER TABLE [dbo].[infra_file_config] ADD CONSTRAINT [PK__infra_fi__3213E83F8A7903EA] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'用户类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'user_type' GO +EXEC sp_addextendedproperty + 'MS_Description', N'社交平台的类型', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'social_type' +GO --- ---------------------------- --- Auto increment value for infra_file_content --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_file_content]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'社交用户的编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'social_user_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Primary Key structure for table infra_file_content --- ---------------------------- -ALTER TABLE [dbo].[infra_file_content] ADD CONSTRAINT [PK__infra_fi__3213E83F033E6045] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Auto increment value for infra_job --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_job]', RESEED, 16) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Primary Key structure for table infra_job --- ---------------------------- -ALTER TABLE [dbo].[infra_job] ADD CONSTRAINT [PK__infra_jo__3213E83F3C7DE10C] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'社交绑定表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_social_user_bind' +GO -- ---------------------------- --- Auto increment value for infra_job_log +-- Table structure for system_tenant -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_job_log]', RESEED, 16) +DROP TABLE IF EXISTS system_tenant; +CREATE TABLE system_tenant +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(30) NOT NULL, + contact_user_id bigint DEFAULT NULL NULL, + contact_name nvarchar(30) NOT NULL, + contact_mobile nvarchar(500) DEFAULT NULL NULL, + status tinyint DEFAULT 0 NOT NULL, + website nvarchar(256) DEFAULT '' NULL, + package_id bigint NOT NULL, + expire_time datetime2 NOT NULL, + account_count int NOT NULL, + creator nvarchar(64) DEFAULT '' NOT NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Primary Key structure for table infra_job_log --- ---------------------------- -ALTER TABLE [dbo].[infra_job_log] ADD CONSTRAINT [PK__infra_jo__3213E83F4CA8F353] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'name' +GO --- ---------------------------- --- Auto increment value for infra_test_demo --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[infra_test_demo]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'联系人的用户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'contact_user_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'联系人', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'contact_name' +GO --- ---------------------------- --- Auto increment value for member_user --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[member_user]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'联系手机', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'contact_mobile' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'status' +GO --- ---------------------------- --- Primary Key structure for table member_user --- ---------------------------- -ALTER TABLE [dbo].[member_user] ADD CONSTRAINT [PK__member_u__3213E83F0A9AEC0B] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'绑定域名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'website' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户套餐编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'package_id' +GO --- ---------------------------- --- Auto increment value for pay_app --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_app]', RESEED, 6) +EXEC sp_addextendedproperty + 'MS_Description', N'过期时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'expire_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'账号数量', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'account_count' +GO --- ---------------------------- --- Primary Key structure for table pay_app --- ---------------------------- -ALTER TABLE [dbo].[pay_app] ADD CONSTRAINT [PK__pay_app__3213E83FB26E0A6B] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'creator' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'create_time' +GO --- ---------------------------- --- Auto increment value for pay_channel --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_channel]', RESEED, 17) +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'updater' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'update_time' +GO --- ---------------------------- --- Primary Key structure for table pay_channel --- ---------------------------- -ALTER TABLE [dbo].[pay_channel] ADD CONSTRAINT [PK__pay_chan__3213E83F2556A7FC] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant', + 'COLUMN', N'deleted' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant' +GO -- ---------------------------- --- Auto increment value for pay_merchant +-- Records of system_tenant -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_merchant]', RESEED, 1) +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT system_tenant ON +GO +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, N'芋道源码', NULL, N'芋艿', N'17321315478', 0, N'www.iocoder.cn', 0, N'2099-02-19 17:14:16', 9999, N'1', N'2021-01-05 17:03:47', N'1', N'2023-11-06 11:41:41', N'0') +GO +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, N'小租户', 110, N'小王2', N'15601691300', 0, N'zsxq.iocoder.cn', 111, N'2024-03-11 00:00:00', 20, N'1', N'2022-02-22 00:56:14', N'1', N'2023-11-06 11:41:47', N'0') +GO +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, N'测试租户', 113, N'芋道', N'15601691300', 0, N'test.iocoder.cn', 111, N'2022-04-30 00:00:00', 50, N'1', N'2022-03-07 21:37:58', N'1', N'2023-11-06 11:41:53', N'0') +GO +SET IDENTITY_INSERT system_tenant OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Primary Key structure for table pay_merchant +-- Table structure for system_tenant_package -- ---------------------------- -ALTER TABLE [dbo].[pay_merchant] ADD CONSTRAINT [PK__pay_merc__3213E83F010D02B8] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +DROP TABLE IF EXISTS system_tenant_package; +CREATE TABLE system_tenant_package +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(30) NOT NULL, + status tinyint DEFAULT 0 NOT NULL, + remark nvarchar(256) DEFAULT '' NULL, + menu_ids nvarchar(4000) NOT NULL, + creator nvarchar(64) DEFAULT '' NOT NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL +) GO +EXEC sp_addextendedproperty + 'MS_Description', N'套餐编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'id' +GO --- ---------------------------- --- Auto increment value for pay_notify_log --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_notify_log]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'套餐名', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'name' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'status' +GO --- ---------------------------- --- Primary Key structure for table pay_notify_log --- ---------------------------- -ALTER TABLE [dbo].[pay_notify_log] ADD CONSTRAINT [PK__pay_noti__3213E83F5F4B3447] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'remark' GO +EXEC sp_addextendedproperty + 'MS_Description', N'关联的菜单编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'menu_ids' +GO --- ---------------------------- --- Auto increment value for pay_notify_task --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_notify_task]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'creator' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'create_time' +GO --- ---------------------------- --- Primary Key structure for table pay_notify_task --- ---------------------------- -ALTER TABLE [dbo].[pay_notify_task] ADD CONSTRAINT [PK__pay_noti__3213E83FB9215103] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'updater' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'update_time' +GO --- ---------------------------- --- Auto increment value for pay_order --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_order]', RESEED, 124) +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package', + 'COLUMN', N'deleted' GO +EXEC sp_addextendedproperty + 'MS_Description', N'租户套餐表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_tenant_package' +GO -- ---------------------------- --- Primary Key structure for table pay_order +-- Records of system_tenant_package -- ---------------------------- -ALTER TABLE [dbo].[pay_order] ADD CONSTRAINT [PK__pay_orde__3213E83F34C95271] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT system_tenant_package ON +GO +INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, N'普通套餐', 0, N'小功能', N'[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', N'1', N'2022-02-22 00:54:00', N'1', N'2024-03-30 17:53:17', N'0') +GO +SET IDENTITY_INSERT system_tenant_package OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Auto increment value for pay_order_extension +-- Table structure for system_user_post -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_order_extension]', RESEED, 1) +DROP TABLE IF EXISTS system_user_post; +CREATE TABLE system_user_post +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint DEFAULT 0 NOT NULL, + post_id bigint DEFAULT 0 NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Primary Key structure for table pay_order_extension --- ---------------------------- -ALTER TABLE [dbo].[pay_order_extension] ADD CONSTRAINT [PK__pay_orde__3213E83F5ACB776F] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'id', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'user_id' +GO --- ---------------------------- --- Auto increment value for pay_refund --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[pay_refund]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'岗位ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'post_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Primary Key structure for table pay_refund --- ---------------------------- -ALTER TABLE [dbo].[pay_refund] ADD CONSTRAINT [PK__pay_refu__3213E83FBE1B54AC] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Auto increment value for system_dept --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_dept]', RESEED, 111) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Primary Key structure for table system_dept --- ---------------------------- -ALTER TABLE [dbo].[system_dept] ADD CONSTRAINT [PK__system_d__3213E83FFA72847C] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户岗位表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_post' +GO -- ---------------------------- --- Auto increment value for system_dict_data +-- Records of system_user_post -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_dict_data]', RESEED, 1160) +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT system_user_post ON +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, N'admin', N'2022-05-02 07:25:24', N'admin', N'2022-05-02 07:25:24', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, N'admin', N'2022-05-02 07:25:24', N'admin', N'2022-05-02 07:25:24', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 104, 1, N'1', N'2022-05-16 19:36:28', N'1', N'2022-05-16 19:36:28', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, 117, 2, N'1', N'2022-07-09 17:40:26', N'1', N'2022-07-09 17:40:26', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 118, 1, N'1', N'2022-07-09 17:44:44', N'1', N'2022-07-09 17:44:44', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (119, 114, 5, N'1', N'2024-03-24 20:45:51', N'1', N'2024-03-24 20:45:51', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (123, 115, 1, N'1', N'2024-04-04 09:37:14', N'1', N'2024-04-04 09:37:14', N'0', 1) +GO +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (124, 115, 2, N'1', N'2024-04-04 09:37:14', N'1', N'2024-04-04 09:37:14', N'0', 1) +GO +SET IDENTITY_INSERT system_user_post OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Primary Key structure for table system_dict_data +-- Table structure for system_user_role -- ---------------------------- -ALTER TABLE [dbo].[system_dict_data] ADD CONSTRAINT [PK__system_d__3213E83F20407597] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +DROP TABLE IF EXISTS system_user_role; +CREATE TABLE system_user_role +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + role_id bigint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Auto increment value for system_dict_type --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_dict_type]', RESEED, 147) +EXEC sp_addextendedproperty + 'MS_Description', N'自增编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'user_id' +GO --- ---------------------------- --- Primary Key structure for table system_dict_type --- ---------------------------- -ALTER TABLE [dbo].[system_dict_type] ADD CONSTRAINT [PK__system_d__3213E83F7C36B1FD] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'角色ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'role_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Auto increment value for system_error_code --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_error_code]', RESEED, 15466) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Primary Key structure for table system_error_code --- ---------------------------- -ALTER TABLE [dbo].[system_error_code] ADD CONSTRAINT [PK__system_e__3213E83F68B8DFD0] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Auto increment value for system_login_log --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_login_log]', RESEED, 24) +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户和角色关联表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_user_role' +GO -- ---------------------------- --- Primary Key structure for table system_login_log +-- Records of system_user_role -- ---------------------------- -ALTER TABLE [dbo].[system_login_log] ADD CONSTRAINT [PK__system_l__3213E83F717953E9] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT system_user_role ON +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, N'', N'2022-01-11 13:19:45', N'', N'2022-05-12 12:35:17', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, N'', N'2022-01-11 13:19:45', N'', N'2022-05-12 12:35:13', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, N'', N'2022-01-11 13:19:45', N'', N'2022-05-12 12:35:13', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, N'', N'2022-01-11 13:19:45', N'', N'2022-05-12 12:35:12', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, N'', N'2022-01-11 13:19:45', N'', N'2022-05-12 12:35:11', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, N'1', N'2022-01-11 13:19:45', N'1', N'2022-01-11 13:19:45', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, N'1', N'2022-02-22 00:56:14', N'1', N'2022-02-22 00:56:14', N'0', 121) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, N'110', N'2022-02-23 13:14:38', N'110', N'2022-02-23 13:14:38', N'0', 121) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, N'1', N'2022-03-07 21:37:58', N'1', N'2022-03-07 21:37:58', N'0', 122) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, N'1', N'2022-05-12 20:39:29', N'1', N'2022-05-12 20:39:29', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, N'1', N'2022-05-28 15:43:57', N'1', N'2022-05-28 15:43:57', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, N'1', N'2022-07-21 22:08:30', N'1', N'2022-07-21 22:08:30', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, N'1', N'2024-03-15 20:00:24', N'1', N'2024-03-15 20:00:24', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, N'1', N'2024-03-17 09:12:08', N'1', N'2024-03-17 09:12:08', N'0', 1) +GO +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, N'1', N'2024-03-24 22:23:03', N'1', N'2024-03-24 22:23:03', N'0', 1) +GO +SET IDENTITY_INSERT system_user_role OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Auto increment value for system_menu +-- Table structure for system_users -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_menu]', RESEED, 1267) +DROP TABLE IF EXISTS system_users; +CREATE TABLE system_users +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + username nvarchar(30) NOT NULL, + password nvarchar(100) DEFAULT '' NOT NULL, + nickname nvarchar(30) NOT NULL, + remark nvarchar(500) DEFAULT NULL NULL, + dept_id bigint DEFAULT NULL NULL, + post_ids nvarchar(255) DEFAULT NULL NULL, + email nvarchar(50) DEFAULT '' NULL, + mobile nvarchar(11) DEFAULT '' NULL, + sex tinyint DEFAULT 0 NULL, + avatar nvarchar(512) DEFAULT '' NULL, + status tinyint DEFAULT 0 NOT NULL, + login_ip nvarchar(50) DEFAULT '' NULL, + login_date datetime2 DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'id' +GO --- ---------------------------- --- Primary Key structure for table system_menu --- ---------------------------- -ALTER TABLE [dbo].[system_menu] ADD CONSTRAINT [PK__system_m__3213E83F14175801] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'用户账号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'username' GO +EXEC sp_addextendedproperty + 'MS_Description', N'密码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'password' +GO --- ---------------------------- --- Auto increment value for system_notice --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_notice]', RESEED, 4) +EXEC sp_addextendedproperty + 'MS_Description', N'用户昵称', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'nickname' GO +EXEC sp_addextendedproperty + 'MS_Description', N'备注', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'remark' +GO --- ---------------------------- --- Primary Key structure for table system_notice --- ---------------------------- -ALTER TABLE [dbo].[system_notice] ADD CONSTRAINT [PK__system_n__3213E83FA158BA8D] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'部门ID', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'dept_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'岗位编号数组', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'post_ids' +GO --- ---------------------------- --- Auto increment value for system_oauth2_access_token --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_oauth2_access_token]', RESEED, 5) +EXEC sp_addextendedproperty + 'MS_Description', N'用户邮箱', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'email' GO +EXEC sp_addextendedproperty + 'MS_Description', N'手机号码', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'mobile' +GO --- ---------------------------- --- Auto increment value for system_oauth2_approve --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_oauth2_approve]', RESEED, 2) +EXEC sp_addextendedproperty + 'MS_Description', N'用户性别', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'sex' GO +EXEC sp_addextendedproperty + 'MS_Description', N'头像地址', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'avatar' +GO --- ---------------------------- --- Primary Key structure for table system_oauth2_approve --- ---------------------------- -ALTER TABLE [dbo].[system_oauth2_approve] ADD CONSTRAINT [PK__system_o__3213E83F7CC08ED6] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'帐号状态(0正常 1停用)', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'status' GO +EXEC sp_addextendedproperty + 'MS_Description', N'最后登录IP', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'login_ip' +GO --- ---------------------------- --- Auto increment value for system_oauth2_client --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_oauth2_client]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'最后登录时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'login_date' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Auto increment value for system_oauth2_code --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_oauth2_code]', RESEED, 4) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Primary Key structure for table system_oauth2_code --- ---------------------------- -ALTER TABLE [dbo].[system_oauth2_code] ADD CONSTRAINT [PK__system_o__3213E83F38C13543] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Auto increment value for system_oauth2_refresh_token --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_oauth2_refresh_token]', RESEED, 3) +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'用户信息表', + 'SCHEMA', N'dbo', + 'TABLE', N'system_users' +GO -- ---------------------------- --- Primary Key structure for table system_oauth2_refresh_token +-- Records of system_users -- ---------------------------- -ALTER TABLE [dbo].[system_oauth2_refresh_token] ADD CONSTRAINT [PK__system_o__3213E83FCFB541CC] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT system_users ON +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'admin', N'$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', N'芋道源码', N'管理员', 103, N'[1]', N'aoteman@126.com', N'18818260277', 2, N'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, N'0:0:0:0:0:0:0:1', N'2024-04-29 21:50:32', N'admin', N'2021-01-05 17:03:47', NULL, N'2024-04-29 21:50:32', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, N'yudao', N'$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', N'芋道', N'不要吓我', 104, N'[1]', N'yudao@iocoder.cn', N'15601691300', 1, N'', 1, N'127.0.0.1', N'2022-07-09 23:03:33', N'', N'2021-01-07 09:07:17', NULL, N'2022-07-09 23:03:33', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, N'yuanma', N'$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', N'源码', NULL, 106, NULL, N'yuanma@iocoder.cn', N'15601701300', 0, N'', 0, N'0:0:0:0:0:0:0:1', N'2024-03-18 21:09:04', N'', N'2021-01-13 23:50:35', NULL, N'2024-03-18 21:09:04', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, N'test', N'$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', N'测试号', NULL, 107, N'[1,2]', N'111@qq.com', N'15601691200', 1, N'', 0, N'0:0:0:0:0:0:0:1', N'2024-03-26 07:11:35', N'', N'2021-01-21 02:13:53', NULL, N'2024-03-26 07:11:35', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, N'admin107', N'$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', 0, N'', 0, N'', NULL, N'1', N'2022-02-20 22:59:33', N'1', N'2022-02-27 08:26:51', N'0', 118) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, N'admin108', N'$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', 0, N'', 0, N'', NULL, N'1', N'2022-02-20 23:00:50', N'1', N'2022-02-27 08:26:53', N'0', 119) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, N'admin109', N'$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', N'芋艿', NULL, NULL, NULL, N'', N'15601691300', 0, N'', 0, N'', NULL, N'1', N'2022-02-20 23:11:50', N'1', N'2022-02-27 08:26:56', N'0', 120) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, N'admin110', N'$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', N'小王', NULL, NULL, NULL, N'', N'15601691300', 0, N'', 0, N'127.0.0.1', N'2022-09-25 22:47:33', N'1', N'2022-02-22 00:56:14', NULL, N'2022-09-25 22:47:33', N'0', 121) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, N'test', N'$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', N'测试用户', NULL, NULL, N'[]', N'', N'', 0, N'', 0, N'0:0:0:0:0:0:0:1', N'2023-12-30 11:42:17', N'110', N'2022-02-23 13:14:33', NULL, N'2023-12-30 11:42:17', N'0', 121) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, N'newobject', N'$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', N'新对象', NULL, 100, N'[]', N'', N'15601691235', 1, N'', 0, N'0:0:0:0:0:0:0:1', N'2024-03-16 23:11:38', N'1', N'2022-02-23 19:08:03', NULL, N'2024-03-16 23:11:38', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, N'aoteman', N'$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', N'芋道', NULL, NULL, NULL, N'', N'15601691300', 0, N'', 0, N'127.0.0.1', N'2022-03-19 18:38:51', N'1', N'2022-03-07 21:37:58', NULL, N'2022-03-19 18:38:51', N'0', 122) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, N'hrmgr', N'$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', N'hr 小姐姐', NULL, NULL, N'[5]', N'', N'15601691236', 1, N'', 0, N'0:0:0:0:0:0:0:1', N'2024-03-24 22:21:05', N'1', N'2022-03-19 21:50:58', NULL, N'2024-03-24 22:21:05', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, N'aotemane', N'$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', N'阿呆', N'11222', 102, N'[1,2]', N'7648@qq.com', N'15601691229', 2, N'', 0, N'', NULL, N'1', N'2022-04-30 02:55:43', N'1', N'2024-04-04 09:37:14', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, N'admin123', N'$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', N'测试号', N'1111', 100, N'[2]', N'', N'15601691234', 1, N'', 0, N'', NULL, N'1', N'2022-07-09 17:40:26', N'1', N'2022-07-09 17:40:26', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, N'goudan', N'$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', N'狗蛋', NULL, 103, N'[1]', N'', N'15601691239', 1, N'', 0, N'0:0:0:0:0:0:0:1', N'2024-03-17 09:10:27', N'1', N'2022-07-09 17:44:43', N'1', N'2024-04-04 09:48:05', N'0', 1) +GO +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, N'hh', N'$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', N'呵呵', NULL, 100, N'[]', N'777@qq.com', N'15601882312', 1, N'', 0, N'', NULL, N'1', N'2024-04-27 08:45:56', N'1', N'2024-04-27 08:45:56', N'0', 1) +GO +SET IDENTITY_INSERT system_users OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Auto increment value for system_operate_log +-- Table structure for yudao_demo01_contact -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_operate_log]', RESEED, 19) +DROP TABLE IF EXISTS yudao_demo01_contact; +CREATE TABLE yudao_demo01_contact +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(100) DEFAULT '' NOT NULL, + sex tinyint NOT NULL, + birthday datetime2 NOT NULL, + description nvarchar(255) NOT NULL, + avatar nvarchar(512) DEFAULT NULL NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'id' +GO --- ---------------------------- --- Primary Key structure for table system_operate_log --- ---------------------------- -ALTER TABLE [dbo].[system_operate_log] ADD CONSTRAINT [PK__system_o__3213E83F85EC81FD] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'名字', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'name' GO +EXEC sp_addextendedproperty + 'MS_Description', N'性别', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'sex' +GO --- ---------------------------- --- Auto increment value for system_post --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_post]', RESEED, 4) +EXEC sp_addextendedproperty + 'MS_Description', N'出生年', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'birthday' GO +EXEC sp_addextendedproperty + 'MS_Description', N'简介', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'description' +GO --- ---------------------------- --- Primary Key structure for table system_post --- ---------------------------- -ALTER TABLE [dbo].[system_post] ADD CONSTRAINT [PK__system_p__3213E83FBC098F34] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'头像', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'avatar' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Auto increment value for system_role --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_role]', RESEED, 111) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Primary Key structure for table system_role --- ---------------------------- -ALTER TABLE [dbo].[system_role] ADD CONSTRAINT [PK__system_r__3213E83F209B43F2] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Auto increment value for system_role_menu --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_role_menu]', RESEED, 191) +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'示例联系人表', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo01_contact' +GO -- ---------------------------- --- Primary Key structure for table system_role_menu +-- Records of yudao_demo01_contact -- ---------------------------- -ALTER TABLE [dbo].[system_role_menu] ADD CONSTRAINT [PK__system_r__3213E83F6F1E4A9B] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT yudao_demo01_contact ON +GO +INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'土豆', 2, N'2023-11-07 00:00:00', N'

天蚕土豆!呀

', N'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', N'1', N'2023-11-15 23:34:30', N'1', N'2023-11-15 23:47:39', N'0', 1) +GO +SET IDENTITY_INSERT yudao_demo01_contact OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Auto increment value for system_sensitive_word +-- Table structure for yudao_demo02_category -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_sensitive_word]', RESEED, 4) +DROP TABLE IF EXISTS yudao_demo02_category; +CREATE TABLE yudao_demo02_category +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(100) DEFAULT '' NOT NULL, + parent_id bigint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Primary Key structure for table system_sensitive_word --- ---------------------------- -ALTER TABLE [dbo].[system_sensitive_word] ADD CONSTRAINT [PK__system_s__3213E83FFFD8E555] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'名字', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'name' +GO --- ---------------------------- --- Auto increment value for system_sms_channel --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_sms_channel]', RESEED, 6) +EXEC sp_addextendedproperty + 'MS_Description', N'父级编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'parent_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Primary Key structure for table system_sms_channel --- ---------------------------- -ALTER TABLE [dbo].[system_sms_channel] ADD CONSTRAINT [PK__system_s__3213E83FA96B966E] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Auto increment value for system_sms_code --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_sms_code]', RESEED, 470) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Primary Key structure for table system_sms_code --- ---------------------------- -ALTER TABLE [dbo].[system_sms_code] ADD CONSTRAINT [PK__system_s__3213E83F825CBCB9] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'示例分类表', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo02_category' +GO -- ---------------------------- --- Auto increment value for system_sms_log +-- Records of yudao_demo02_category -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_sms_log]', RESEED, 6) +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT yudao_demo02_category ON +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, N'土豆', 0, N'1', N'2023-11-15 23:34:30', N'1', N'2023-11-16 20:24:23', N'0', 1) +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'番茄', 0, N'1', N'2023-11-16 20:24:00', N'1', N'2023-11-16 20:24:15', N'0', 1) +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, N'怪怪', 0, N'1', N'2023-11-16 20:24:32', N'1', N'2023-11-16 20:24:32', N'0', 1) +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, N'小番茄', 2, N'1', N'2023-11-16 20:24:39', N'1', N'2023-11-16 20:24:39', N'0', 1) +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, N'大番茄', 2, N'1', N'2023-11-16 20:24:46', N'1', N'2023-11-16 20:24:46', N'0', 1) +GO +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, N'11', 3, N'1', N'2023-11-24 19:29:34', N'1', N'2023-11-24 19:29:34', N'0', 1) +GO +SET IDENTITY_INSERT yudao_demo02_category OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Primary Key structure for table system_sms_log +-- Table structure for yudao_demo03_course -- ---------------------------- -ALTER TABLE [dbo].[system_sms_log] ADD CONSTRAINT [PK__system_s__3213E83F5F1968A9] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +DROP TABLE IF EXISTS yudao_demo03_course; +CREATE TABLE yudao_demo03_course +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + student_id bigint NOT NULL, + name nvarchar(100) DEFAULT '' NOT NULL, + score tinyint NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'id' +GO --- ---------------------------- --- Auto increment value for system_sms_template --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_sms_template]', RESEED, 13) +EXEC sp_addextendedproperty + 'MS_Description', N'学生编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'student_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'名字', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'name' +GO --- ---------------------------- --- Primary Key structure for table system_sms_template --- ---------------------------- -ALTER TABLE [dbo].[system_sms_template] ADD CONSTRAINT [PK__system_s__3213E83F5C91CA37] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'分数', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'score' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Auto increment value for system_social_user --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_social_user]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Primary Key structure for table system_social_user --- ---------------------------- -ALTER TABLE [dbo].[system_social_user] ADD CONSTRAINT [PK__system_s__3213E83F6EF3863C] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Auto increment value for system_social_user_bind --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_social_user_bind]', RESEED, 1) +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'学生课程表', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_course' +GO -- ---------------------------- --- Primary Key structure for table system_social_user_bind +-- Records of yudao_demo03_course -- ---------------------------- -ALTER TABLE [dbo].[system_social_user_bind] ADD CONSTRAINT [PK__system_s__3213E83F21F44049] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT yudao_demo03_course ON +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, N'语文', 66, N'1', N'2023-11-16 23:21:49', N'1', N'2023-11-16 23:21:49', N'0', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, N'数学', 22, N'1', N'2023-11-16 23:21:49', N'1', N'2023-11-16 23:21:49', N'0', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, N'体育', 23, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 15:44:40', N'1', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, N'计算机', 11, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 15:44:40', N'1', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, N'体育', 23, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 15:47:09', N'1', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, N'计算机', 11, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 15:47:09', N'1', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, N'体育', 23, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 23:47:10', N'0', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, N'计算机', 11, N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 23:47:10', N'0', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, N'电脑', 33, N'1', N'2023-11-17 00:20:42', N'1', N'2023-11-16 16:20:45', N'1', 1) +GO +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, N'滑雪', 12, N'1', N'2023-11-17 13:13:20', N'1', N'2023-11-17 13:13:20', N'0', 1) +GO +SET IDENTITY_INSERT yudao_demo03_course OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Auto increment value for system_tenant +-- Table structure for yudao_demo03_grade -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_tenant]', RESEED, 122) +DROP TABLE IF EXISTS yudao_demo03_grade; +CREATE TABLE yudao_demo03_grade +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + student_id bigint NOT NULL, + name nvarchar(100) DEFAULT '' NOT NULL, + teacher nvarchar(255) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'id' +GO --- ---------------------------- --- Primary Key structure for table system_tenant --- ---------------------------- -ALTER TABLE [dbo].[system_tenant] ADD CONSTRAINT [PK__system_t__3213E83FAF444092] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'学生编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'student_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'名字', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'name' +GO --- ---------------------------- --- Auto increment value for system_tenant_package --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_tenant_package]', RESEED, 111) +EXEC sp_addextendedproperty + 'MS_Description', N'班主任', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'teacher' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Primary Key structure for table system_tenant_package --- ---------------------------- -ALTER TABLE [dbo].[system_tenant_package] ADD CONSTRAINT [PK__system_t__3213E83FA2213DB5] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Auto increment value for system_user_post --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_user_post]', RESEED, 115) +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Primary Key structure for table system_user_post --- ---------------------------- -ALTER TABLE [dbo].[system_user_post] ADD CONSTRAINT [PK__system_u__3213E83F56DD4107] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'学生班级表', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_grade' +GO -- ---------------------------- --- Auto increment value for system_user_role +-- Records of yudao_demo03_grade -- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_user_role]', RESEED, 17) +-- @formatter:off +BEGIN TRANSACTION GO - +SET IDENTITY_INSERT yudao_demo03_grade ON +GO +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, N'三年 2 班', N'周杰伦', N'1', N'2023-11-16 23:21:49', N'1', N'2023-11-16 23:21:49', N'0', 1) +GO +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, N'华为', N'遥遥领先', N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-16 23:47:10', N'0', 1) +GO +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, N'小图', N'小娃111', N'1', N'2023-11-17 13:10:23', N'1', N'2023-11-17 13:10:23', N'0', 1) +GO +SET IDENTITY_INSERT yudao_demo03_grade OFF +GO +COMMIT +GO +-- @formatter:on -- ---------------------------- --- Primary Key structure for table system_user_role +-- Table structure for yudao_demo03_student -- ---------------------------- -ALTER TABLE [dbo].[system_user_role] ADD CONSTRAINT [PK__system_u__3213E83F3593F652] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +DROP TABLE IF EXISTS yudao_demo03_student; +CREATE TABLE yudao_demo03_student +( + id bigint NOT NULL PRIMARY KEY IDENTITY, + name nvarchar(100) DEFAULT '' NOT NULL, + sex tinyint NOT NULL, + birthday datetime2 NOT NULL, + description nvarchar(255) NOT NULL, + creator nvarchar(64) DEFAULT '' NULL, + create_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater nvarchar(64) DEFAULT '' NULL, + update_time datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT 0 NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL +) GO - --- ---------------------------- --- Auto increment value for system_users --- ---------------------------- -DBCC CHECKIDENT ('[dbo].[system_users]', RESEED, 115) +EXEC sp_addextendedproperty + 'MS_Description', N'编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'名字', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'name' +GO --- ---------------------------- --- Primary Key structure for table system_users --- ---------------------------- -ALTER TABLE [dbo].[system_users] ADD CONSTRAINT [PK__system_u__3213E83F7CF2516E] PRIMARY KEY CLUSTERED ([id]) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) -ON [PRIMARY] +EXEC sp_addextendedproperty + 'MS_Description', N'性别', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'sex' GO +EXEC sp_addextendedproperty + 'MS_Description', N'出生日期', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'birthday' +GO --- ---------------------------- --- Foreign Keys structure for table QRTZ_BLOB_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_BLOB_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION +EXEC sp_addextendedproperty + 'MS_Description', N'简介', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'description' GO +EXEC sp_addextendedproperty + 'MS_Description', N'创建者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'creator' +GO --- ---------------------------- --- Foreign Keys structure for table QRTZ_CRON_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION +EXEC sp_addextendedproperty + 'MS_Description', N'创建时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'create_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'更新者', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'updater' +GO --- ---------------------------- --- Foreign Keys structure for table QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION +EXEC sp_addextendedproperty + 'MS_Description', N'更新时间', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'update_time' GO +EXEC sp_addextendedproperty + 'MS_Description', N'是否删除', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'deleted' +GO --- ---------------------------- --- Foreign Keys structure for table QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION +EXEC sp_addextendedproperty + 'MS_Description', N'租户编号', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student', + 'COLUMN', N'tenant_id' GO +EXEC sp_addextendedproperty + 'MS_Description', N'学生表', + 'SCHEMA', N'dbo', + 'TABLE', N'yudao_demo03_student' +GO -- ---------------------------- --- Foreign Keys structure for table QRTZ_TRIGGERS +-- Records of yudao_demo03_student -- ---------------------------- -ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) REFERENCES [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) ON DELETE NO ACTION ON UPDATE NO ACTION +-- @formatter:off +BEGIN TRANSACTION +GO +SET IDENTITY_INSERT yudao_demo03_student ON +GO +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, N'小白', 1, N'2023-11-16 00:00:00', N'

厉害

', N'1', N'2023-11-16 23:21:49', N'1', N'2023-11-17 16:49:06', N'0', 1) +GO +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, N'大黑', 2, N'2023-11-13 00:00:00', N'

你在教我做事?

', N'1', N'2023-11-16 23:22:46', N'1', N'2023-11-17 16:49:07', N'0', 1) +GO +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, N'小花', 1, N'2023-11-07 00:00:00', N'

哈哈哈

', N'1', N'2023-11-17 00:04:47', N'1', N'2023-11-17 16:49:08', N'0', 1) +GO +SET IDENTITY_INSERT yudao_demo03_student OFF +GO +COMMIT GO +-- @formatter:on diff --git a/sql/tools/docker-compose.yaml b/sql/tools/docker-compose.yaml index 4cc064dcf1..0ac421c391 100644 --- a/sql/tools/docker-compose.yaml +++ b/sql/tools/docker-compose.yaml @@ -61,7 +61,7 @@ services: environment: TZ: Asia/Shanghai ACCEPT_EULA: "Y" - SA_PASSWORD: "Yudao@24" + SA_PASSWORD: "Yudao@2024" ports: - "1433:1433" volumes: diff --git a/sql/tools/sqlserver/create_schema.sh b/sql/tools/sqlserver/create_schema.sh index d158fa0558..172650b214 100755 --- a/sql/tools/sqlserver/create_schema.sh +++ b/sql/tools/sqlserver/create_schema.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Yudao@24' -Q "CREATE DATABASE [ruoyi-vue-pro]; +/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ${SA_PASSWORD} -Q "CREATE DATABASE [ruoyi-vue-pro]; GO" -/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Yudao@24' -d 'ruoyi-vue-pro' -i /tmp/schema.sql +/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ${SA_PASSWORD} -d 'ruoyi-vue-pro' -i /tmp/schema.sql diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 20e84b8143..b479ab45d1 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -46,16 +46,16 @@ spring: primary: master datasource: master: - url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 +# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@//127.0.0.1:1521/XEPDB1 # Oracle 连接的示例 -# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 + url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 - username: root - password: 123456 -# username: sa # SQLServer 连接的示例 -# password: Yudao@24 # SQLServer 连接的示例 +# username: root +# password: 123456 + username: sa # SQLServer 连接的示例 + password: Yudao@2024 # SQLServer 连接的示例 # username: SYSDBA # DM 连接的示例 # password: SYSDBA # DM 连接的示例 slave: # 模拟从库,可根据自己需要修改 @@ -66,10 +66,10 @@ spring: # url: jdbc:oracle:thin:@//127.0.0.1:1521/XEPDB1 # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 - username: root - password: 123456 - # username: sa # SQLServer 连接的示例 - # password: Yudao@24 # SQLServer 连接的示例 +# username: root +# password: 123456 + username: sa # SQLServer 连接的示例 + password: Yudao@2024 # SQLServer 连接的示例 # username: SYSDBA # DM 连接的示例 # password: SYSDBA # DM 连接的示例 -- Gitee From 1d4bb4d563b3c7a6c41eb4676de1b6f0b2940452 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 2 May 2024 17:42:07 +0800 Subject: [PATCH 0438/1557] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=BD=AC=E6=8D=A2py=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tools/.gitignore | 8 + sql/tools/convertor.py | 636 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 644 insertions(+) create mode 100644 sql/tools/.gitignore create mode 100644 sql/tools/convertor.py diff --git a/sql/tools/.gitignore b/sql/tools/.gitignore new file mode 100644 index 0000000000..e00c3e7cad --- /dev/null +++ b/sql/tools/.gitignore @@ -0,0 +1,8 @@ +# 忽略python虚拟环境 +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py new file mode 100644 index 0000000000..d5e75647f5 --- /dev/null +++ b/sql/tools/convertor.py @@ -0,0 +1,636 @@ +# encoding=utf8 +"""芋道系统数据库迁移工具 + +Author: dhb52 (https://gitee.com/dhb52) + +pip install simple-ddl-parser +""" + +import pathlib +import re +import time +from abc import ABC, abstractmethod +from typing import Dict, Tuple + +from simple_ddl_parser import DDLParser + +PREAMBLE = """/* + Yudao Database Transfer Tool + + Source Server Type : MySQL + + Target Server Type : {db_type} + + Date: {date} +*/ + +""" + + +def load_and_clean(sql_file: str) -> str: + """加载源 SQL 文件,并清理内容方便下一步 ddl 解析 + + Args: + sql_file (str): sql文件路径 + + Returns: + str: 清理后的sql文件内容 + """ + REPLACE_PAIR_LIST = ( + (" CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ", " "), + (" KEY `", " INDEX `"), + ("UNIQUE INDEX", "UNIQUE KEY"), + ("b'0'", "'0'"), + ("b'1'", "'1'"), + ) + + content = open(sql_file).read() + for replace_pair in REPLACE_PAIR_LIST: + content = content.replace(*replace_pair) + content = re.sub(r"ENGINE.*COMMENT", "COMMENT", content) + content = re.sub(r"ENGINE.*;", ";", content) + return content + + +class Convertor(ABC): + def __init__(self, src: str, db_type) -> None: + self.src = src + self.db_type = db_type + self.content = load_and_clean(self.src) + self.table_script_list = re.findall(r"CREATE TABLE [^;]*;", self.content) + + @abstractmethod + def translate_type(self, type: str, size: None | int | Tuple[int]) -> str: + """字段类型转换 + + Args: + type (str): 字段类型 + size (None | int | Tuple[int]): 字段长度描述, 如varchar(255), decimal(10,2) + + Returns: + str: 类型定义 + """ + pass + + @abstractmethod + def gen_create(self, table_ddl: Dict) -> str: + """生成 create 脚本 + + Args: + table_ddl (Dict): 表DDL + + Returns: + str: 生成脚本 + """ + pass + + @abstractmethod + def gen_pk(self, table_name: str) -> str: + """生成主键定义 + + Args: + table_name (str): 表名 + + Returns: + str: 生成脚本 + """ + pass + + @abstractmethod + def gen_index(self, table_ddl: Dict) -> str: + """生成索引定义 + + Args: + table_ddl (Dict): 表DDL + + Returns: + str: 生成脚本 + """ + pass + + @abstractmethod + def gen_comment(self, table_sql: str, table_name: str) -> str: + """生成字段/表注释 + + Args: + table_sql (str): 原始表SQL + table_name (str): 表名 + + Returns: + str: 生成脚本 + """ + pass + + @abstractmethod + def gen_insert(self, table_name: str) -> str: + """生成 insert 语句块 + + Args: + table_name (str): 表名 + + Returns: + str: 生成脚本 + """ + pass + + def print(self): + """打印转换后的sql脚本到终端""" + print( + PREAMBLE.format( + db_type=self.db_type, + date=time.strftime("%Y-%m-%d %H:%M:%S"), + ) + ) + + error_scripts = [] + for table_sql in self.table_script_list: + ddl = DDLParser(table_sql.replace("`", "")).run() + + # 如果parse失败, 需要跟进 + if len(ddl) == 0: + error_scripts.append(table_sql) + continue + + table_ddl = ddl[0] + table_name = table_ddl["table_name"] + + # 忽略 quartz 的内容 + if table_name.lower().startswith("qrtz"): + continue + + # 为每个表生成个5个基本部分 + create = self.gen_create(table_ddl) + pk = self.gen_pk(table_name) + index = self.gen_index(table_ddl) + comment = self.gen_comment(table_sql, table_name) + inserts = self.gen_insert(table_name) + + # 组合当前表的DDL脚本 + script = f"""{create} + +{pk} + +{index} + +{comment} + +{inserts} +""" + + # 清理 + script = re.sub("\n{3,}", "\n\n", script).strip() + "\n" + + print(script) + + # 将parse失败的脚本打印出来 + if error_scripts: + for script in error_scripts: + print(script) + + +class PostgreSQLConvertor(Convertor): + def __init__(self, src): + super().__init__(src, "PostgreSQL") + + def translate_type(self, type, size): + """类型转换""" + + type = type.lower() + + if type == "varchar": + return f"varchar({size})" + if type == "int": + return "int4" + if type == "bigint" or type == "bigint unsigned": + return "int8" + if type == "datetime": + return "timestamp" + if type == "bit": + return "bool" + if type in ("tinyint", "smallint"): + return "int2" + if type == "text": + return "text" + if type in ("blob", "mediumblob"): + return "bytea" + if type == "decimal": + return ( + f"numeric({','.join(str(s) for s in size)})" if len(size) else "numeric" + ) + + def gen_create(self, ddl: Dict) -> str: + """生成 create""" + + def _generate_column(col): + name = col["name"].lower() + if name == "deleted": + return "deleted int2 NOT NULL DEFAULT 0" + + type = col["type"].lower() + full_type = self.translate_type(type, col["size"]) + nullable = "NULL" if col["nullable"] else "NOT NULL" + default = f"DEFAULT {col['default']}" if col["default"] is not None else "" + return f"{name} {full_type} {nullable} {default}" + + table_name = ddl["table_name"].lower() + columns = [f"{_generate_column(col).strip()}" for col in ddl["columns"]] + script = f"""-- ---------------------------- +-- Table structure for {table_name} +-- ---------------------------- +DROP TABLE IF EXISTS {table_name}; +CREATE TABLE {table_name} ( + {',\n '.join(columns)} +);""" + + return script + + def gen_comment(self, table_sql, table_name) -> str: + """生成字段及表的注释""" + + script = "" + for line in table_sql.split("\n"): + match = re.match(r"^`([^`]+)`.* COMMENT '([^']+)'", line.strip()) + if match: + script += f"COMMENT ON COLUMN {table_name}.{match.group(1)} IS '{match.group(2).replace('\\n', '\n')}';\n" + + match = re.search(r"COMMENT \= '([^']+)';", table_sql) + table_comment = match.group(1) if match else None + if table_comment: + script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';\n" + + return script + + def gen_pk(self, table_name) -> str: + """生成主键定义""" + return f"ALTER TABLE {table_name} ADD CONSTRAINT pk_{table_name} PRIMARY KEY (id);\n" + + def gen_index(self, ddl) -> str: + """生成 index""" + + def generate_columns(columns): + keys = [ + f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" + for col in columns[0] + ] + return ", ".join(keys) + + script = "" + for no, index in enumerate(ddl["index"], 1): + columns = generate_columns(index["columns"]) + table_name = ddl["table_name"].lower() + script += ( + f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns});\n" + ) + + return script + + def gen_insert(self, table_name) -> str: + """生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence""" + + PREFIX = f"INSERT INTO `{table_name}`" + + # 收集 `table_name` 对应的 insert 语句 + inserts = [] + for line in self.content.split("\n"): + if line.startswith(PREFIX): + head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) + head = head.strip().replace("`", "").lower() + tail = tail.strip().replace(r"\"", '"') + script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" + # bit(1)数据转换 + script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") + inserts.append(script) + + ## 生成 insert 脚本 + script = "" + last_id = 0 + if inserts: + script += f"""\n\n-- ---------------------------- +-- Records of {table_name.lower()} +-- ---------------------------- +-- @formatter:off +BEGIN; +{'\n'.join(inserts)} +COMMIT; +-- @formatter:on""" + match = re.search(r"VALUES \((\d+),", inserts[-1]) + if match: + last_id = int(match.group(1)) + + # 生成 Sequence + script += ( + "\n\n" + + f"""DROP SEQUENCE IF EXISTS {table_name}_seq; +CREATE SEQUENCE {table_name}_seq + START {last_id + 1};""" + ) + + return script + + +class OracleConvertor(Convertor): + def __init__(self, src): + super().__init__(src, "Oracle") + + def translate_type(self, type, size: None | int | Tuple[int]): + """类型转换""" + type = type.lower() + + if type == "varchar": + return f"varchar2({size if size < 4000 else 4000})" + if type == "int": + return "number" + if type == "bigint" or type == "bigint unsigned": + return "number" + if type == "datetime": + return "date" + if type == "bit": + return "number(1,0)" + if type in ("tinyint", "smallint"): + return "smallint" + if type == "text": + return "clob" + if type in ("blob", "mediumblob"): + return "blob" + if type == "decimal": + return ( + f"number({','.join(str(s) for s in size)})" if len(size) else "number" + ) + + def gen_create(self, ddl) -> str: + """生成 CREATE 语句""" + + def generate_column(col): + name = col["name"].lower() + if name == "deleted": + return "deleted number(1,0) DEFAULT 0 NOT NULL" + + type = col["type"].lower() + full_type = self.translate_type(type, col["size"]) + nullable = "NULL" if col["nullable"] else "NOT NULL" + default = f"DEFAULT {col['default']}" if col["default"] is not None else "" + return f"{'\"size\"' if name == "size" else name } {full_type} {default} {nullable}" + + table_name = ddl["table_name"].lower() + columns = [f"{generate_column(col).strip()}" for col in ddl["columns"]] + script = f"""-- ---------------------------- +-- Table structure for {table_name} +-- ---------------------------- +CREATE TABLE {ddl['table_name'].lower()} ( + {',\n '.join(columns)} +);""" + + # oracle INSERT '' 不能通过 NOT NULL 校验 + script = script.replace("DEFAULT '' NOT NULL", "DEFAULT '' NULL") + + return script + + def gen_comment(self, table_sql, table_name) -> str: + script = "" + for line in table_sql.split("\n"): + match = re.search(r"`([^`]+)`.* COMMENT '([^']+)'", line) + if match: + script += f"COMMENT ON COLUMN {table_name}.{match.group(1)} IS '{match.group(2).replace('\\n', '\n')}';\n" + + match = re.search(r"COMMENT \= '([^']+)';", table_sql) + table_comment = match.group(1) if match else None + if table_comment: + script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';" + + return script + + def gen_pk(self, table_name) -> str: + """生成主键定义""" + return f"ALTER TABLE {table_name} ADD CONSTRAINT pk_{table_name} PRIMARY KEY (id);\n" + + def gen_index(self, table_ddl) -> str: + """生成 INDEX 定义""" + + def generate_columns(columns): + keys = [ + f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" + for col in columns[0] + ] + return ", ".join(keys) + + script = "" + for no, index in enumerate(table_ddl["index"], 1): + columns = generate_columns(index["columns"]) + table_name = table_ddl["table_name"].lower() + script += ( + f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns});\n" + ) + return script + + def gen_insert(self, table_name) -> str: + """拷贝 INSERT 语句""" + PREFIX = f"INSERT INTO `{table_name}`" + inserts = [] + for line in self.content.split("\n"): + if line.startswith(PREFIX): + head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) + head = head.strip().replace("`", "").lower() + tail = tail.strip().replace(r"\"", '"') + script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" + # bit(1)数据转换 + script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") + # 对日期数据添加 TO_DATE 转换 + script = re.sub( + r"('\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}')", + r"to_date(\g<1>, 'SYYYY-MM-DD HH24:MI:SS')", + script, + ) + inserts.append(script) + + ## 生成 insert 脚本 + script = "" + last_id = 0 + if inserts: + script += f"""\n\n-- ---------------------------- +-- Records of {table_name.lower()} +-- ---------------------------- +-- @formatter:off +{'\n'.join(inserts)} +COMMIT; +-- @formatter:on""" + match = re.search(r"VALUES \((\d+),", inserts[-1]) + if match: + last_id = int(match.group(1)) + + # 生成 Sequence + script += f""" + +CREATE SEQUENCE {table_name}_seq + START WITH {last_id + 1};""" + + return script + + +class SQLServerConvertor(Convertor): + """_summary_ + + Args: + Convertor (_type_): _description_ + """ + + def __init__(self, src): + super().__init__(src, "Microsoft SQL Server") + + def translate_type(self, type, size): + """类型转换""" + + type = type.lower() + + if type == "varchar": + return f"nvarchar({size if size < 4000 else 4000})" + if type == "int": + return "int" + if type == "bigint" or type == "bigint unsigned": + return "bigint" + if type == "datetime": + return "datetime2" + if type == "bit": + return "varchar(1)" + if type in ("tinyint", "smallint"): + return "tinyint" + if type == "text": + return "nvarchar(max)" + if type in ("blob", "mediumblob"): + return "varbinary(max)" + if type == "decimal": + return ( + f"numeric({','.join(str(s) for s in size)})" if len(size) else "numeric" + ) + + def gen_create(self, ddl: Dict) -> str: + """生成 create""" + + def _generate_column(col): + name = col["name"].lower() + if name == 'id': + return "id bigint NOT NULL PRIMARY KEY IDENTITY" + if name == "deleted": + return "deleted bit DEFAULT 0 NOT NULL" + + type = col["type"].lower() + full_type = self.translate_type(type, col["size"]) + nullable = "NULL" if col["nullable"] else "NOT NULL" + default = f"DEFAULT {col['default']}" if col["default"] is not None else "" + return f"{name} {full_type} {default} {nullable}" + + table_name = ddl["table_name"].lower() + columns = [f"{_generate_column(col).strip()}" for col in ddl["columns"]] + script = f"""-- ---------------------------- +-- Table structure for {table_name} +-- ---------------------------- +DROP TABLE IF EXISTS {table_name}; +CREATE TABLE {table_name} ( + {',\n '.join(columns)} +) +GO""" + + return script + + def gen_comment(self, table_sql, table_name) -> str: + """生成字段及表的注释""" + + script = "" + for line in table_sql.split("\n"): + match = re.match(r"^`([^`]+)`.* COMMENT '([^']+)'", line.strip()) + if match: + script += f"""EXEC sp_addextendedproperty + 'MS_Description', N'{match.group(2).replace('\\n', '\n')}', + 'SCHEMA', N'dbo', + 'TABLE', N'{table_name}', + 'COLUMN', N'{match.group(1)}' +GO + +""" + + match = re.search(r"COMMENT \= '([^']+)';", table_sql) + table_comment = match.group(1) if match else None + if table_comment: + script += f"""EXEC sp_addextendedproperty + 'MS_Description', N'{table_comment}', + 'SCHEMA', N'dbo', + 'TABLE', N'{table_name}' +GO + +""" + + return script + + def gen_pk(self, table_name) -> str: + """生成主键定义""" + return "" + + def gen_index(self, ddl) -> str: + """生成 index""" + + def generate_columns(columns): + keys = [ + f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" + for col in columns[0] + ] + return ", ".join(keys) + + script = "" + for no, index in enumerate(ddl["index"], 1): + columns = generate_columns(index["columns"]) + table_name = ddl["table_name"].lower() + script += f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns})\nGO\n" + + return script + + def gen_insert(self, table_name) -> str: + """生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence""" + + PREFIX = f"INSERT INTO `{table_name}`" + + # 收集 `table_name` 对应的 insert 语句 + inserts = [] + for line in self.content.split("\n"): + if line.startswith(PREFIX): + head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) + head = head.strip().replace("`", "").lower() + tail = tail.strip().replace(r"\"", '"') + # SQLServer: 字符串前加N,hack,是否存在替换字符串内容的风险 + tail = tail.replace(", '", ", N'").replace("VALUES ('", "VALUES (N')") + script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" + # bit(1)数据转换 + script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") + # 删除 insert 的结尾分号 + script = re.sub(";$", r"\nGO", script) + inserts.append(script) + + ## 生成 insert 脚本 + script = "" + if inserts: + script += f"""\n\n-- ---------------------------- +-- Records of {table_name.lower()} +-- ---------------------------- +-- @formatter:off +BEGIN TRANSACTION +GO +SET IDENTITY_INSERT {table_name.lower()} ON +GO +{'\n'.join(inserts)} +SET IDENTITY_INSERT {table_name.lower()} OFF +GO +COMMIT +GO +-- @formatter:on""" + + return script + + +def main(): + sql_file = pathlib.Path('../mysql/ruoyi-vue-pro.sql').resolve().as_posix() + # convertor = PostgreSQLConvertor(sql_file) + # convertor = OracleConvertor(sql_file) + convertor = SQLServerConvertor(sql_file) + convertor.print() + + +if __name__ == "__main__": + main() -- Gitee From b0b806762980cfc407f13d5f1858112d3ffcd487 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 2 May 2024 18:03:34 +0800 Subject: [PATCH 0439/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=9A=E5=A4=84=E7=90=86?= =?UTF-8?q?=20SQLServer=20=E6=95=B0=E6=8D=AE=E5=BA=93=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=95=B0=E6=8D=AE=E8=A1=A8=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/db/DatabaseTableServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java index c1c9d3edee..6d38822082 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java @@ -3,18 +3,22 @@ package cn.iocoder.yudao.module.infra.service.db; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.mybatis.core.util.JdbcUtils; import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; +import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.generator.config.DataSourceConfig; import com.baomidou.mybatisplus.generator.config.GlobalConfig; import com.baomidou.mybatisplus.generator.config.StrategyConfig; import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import com.baomidou.mybatisplus.generator.config.rules.DateType; +import com.baomidou.mybatisplus.generator.query.SQLQuery; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; import java.util.Comparator; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -45,10 +49,14 @@ public class DatabaseTableServiceImpl implements DatabaseTableService { // 获得数据源配置 DataSourceConfigDO config = dataSourceConfigService.getDataSourceConfig(dataSourceConfigId); Assert.notNull(config, "数据源({}) 不存在!", dataSourceConfigId); + DbType dbType = JdbcUtils.getDbType(config.getUrl()); // 使用 MyBatis Plus Generator 解析表结构 - DataSourceConfig dataSourceConfig = new DataSourceConfig.Builder(config.getUrl(), config.getUsername(), - config.getPassword()).build(); + DataSourceConfig.Builder dataSourceConfigBuilder = new DataSourceConfig.Builder(config.getUrl(), config.getUsername(), + config.getPassword()); + if (Objects.equals(dbType, DbType.SQL_SERVER)) { // 特殊:SQLServer jdbc 非标准,参见 https://github.com/baomidou/mybatis-plus/issues/5419 + dataSourceConfigBuilder.databaseQueryClass(SQLQuery.class); + } StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder().enableSkipView(); // 忽略视图,业务上一般用不到 if (StrUtil.isNotEmpty(name)) { strategyConfig.addInclude(name); @@ -61,7 +69,7 @@ public class DatabaseTableServiceImpl implements DatabaseTableService { } GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 LocalDateTime 类型,不使用 LocalDate - ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfig, strategyConfig.build(), + ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfigBuilder.build(), strategyConfig.build(), null, globalConfig, null); // 按照名字排序 List tables = builder.getTableInfoList(); -- Gitee From d98419b03f5939a243bfeed905c9d61de78bbb2c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 2 May 2024 18:47:42 +0800 Subject: [PATCH 0440/1557] =?UTF-8?q?=E3=80=90=E5=AE=8C=E5=96=84=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20sql-tools=20=E7=9A=84=20README.md=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=A4=A7=E5=AE=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tools/README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sql/tools/README.md diff --git a/sql/tools/README.md b/sql/tools/README.md new file mode 100644 index 0000000000..5bc99fadb3 --- /dev/null +++ b/sql/tools/README.md @@ -0,0 +1,57 @@ +## 0. 友情提示 + +在 `sql/tools` 目录下,我们提供一些数据库相关的工具,包括测试数据库的快速启动、MySQL 转换其它数据库等等。 + +注意!所有的操作,必须在 `sql/tools` 目录下执行。 + +## 1. 测试数据库的快速启动 + +基于 Docker Compose,快速启动 MySQL、Oracle、PostgreSQL、SQL Server 等数据库。 + +注意!使用 Docker Compose 启动完测试数据后,因为会自动导入项目的 SQL 脚本,所以可能需要等待 1-2 分钟。 + +### 1.1 MySQL + +```Bash +docker compose up -d mysql +``` + +#### 1.2 Oracle + +```Bash +docker compose up -d oracle +``` + +暂不支持 MacBook Apple Silicon,因为 Oracle 官方没有提供 Apple Silicon 版本的 Docker 镜像。 + +### 1.3 PostgreSQL + +```Bash +docker compose up -d postgres +``` + +### 1.4 SQL Server + +```Bash +docker compose up -d sqlserver +# 注意:启动完 sqlserver 后,需要手动再执行如下命令,因为 SQL Server 不支持初始化脚本 +docker compose exec sqlserver bash /tmp/create_schema.sh +``` + +暂不支持 MacBook Apple Silicon,因为 SQL Server 官方没有提供 Apple Silicon 版本的 Docker 镜像。 + +### 1.5 DM 达梦 + +TODO 暂未支持 + +## 2. MySQL 转换其它数据库 + +实现原理:通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server 等数据库的脚本。 + +使用方式如下: + +```Bash +python3 convertor.py +``` + +然后,TODO \ No newline at end of file -- Gitee From 6d19690bea275ce6669df4d6594b08205b20c595 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 2 May 2024 23:38:56 +0800 Subject: [PATCH 0441/1557] =?UTF-8?q?feat:=20=E8=84=9A=E6=9C=AC=E5=85=BC?= =?UTF-8?q?=E5=AE=B9Python=203.9,=20=E6=8A=BD=E5=8F=96=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E4=BB=A3=E7=A0=81;=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tools/README.md | 12 +- sql/tools/convertor.py | 296 ++++++++++++++++++++--------------------- 2 files changed, 157 insertions(+), 151 deletions(-) diff --git a/sql/tools/README.md b/sql/tools/README.md index 5bc99fadb3..887cc87a14 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -50,8 +50,16 @@ TODO 暂未支持 使用方式如下: +安装依赖库 + +```bash +pip install simple-ddl-parser +``` + +执行如下命令打印生成 postgresql 的脚本内容,其他可选参数有:oracle, sqlserver + ```Bash -python3 convertor.py +python3 convertor.py postgres ``` -然后,TODO \ No newline at end of file +程序将sql脚本打印到终端,可以重定向到临时文件tmp.sql, 确认无误后可以利用IDEA(专业版)进行格式化。 diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index d5e75647f5..9f9cd955c2 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -6,11 +6,12 @@ Author: dhb52 (https://gitee.com/dhb52) pip install simple-ddl-parser """ +import argparse import pathlib import re import time from abc import ABC, abstractmethod -from typing import Dict, Tuple +from typing import Dict, Generator, Optional, Tuple, Union from simple_ddl_parser import DDLParser @@ -60,12 +61,12 @@ class Convertor(ABC): self.table_script_list = re.findall(r"CREATE TABLE [^;]*;", self.content) @abstractmethod - def translate_type(self, type: str, size: None | int | Tuple[int]) -> str: + def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]) -> str: """字段类型转换 Args: type (str): 字段类型 - size (None | int | Tuple[int]): 字段长度描述, 如varchar(255), decimal(10,2) + size (Optional[Union[int, Tuple[int]]]): 字段长度描述, 如varchar(255), decimal(10,2) Returns: str: 类型定义 @@ -97,7 +98,7 @@ class Convertor(ABC): pass @abstractmethod - def gen_index(self, table_ddl: Dict) -> str: + def gen_index(self, ddl: Dict) -> str: """生成索引定义 Args: @@ -133,6 +134,55 @@ class Convertor(ABC): """ pass + @staticmethod + def inserts(table_name: str, script_content: str) -> Generator: + PREFIX = f"INSERT INTO `{table_name}`" + + # 收集 `table_name` 对应的 insert 语句 + for line in script_content.split("\n"): + if line.startswith(PREFIX): + head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) + head = head.strip().replace("`", "").lower() + tail = tail.strip().replace(r"\"", '"') + # tail = tail.replace("b'0'", "'0'").replace("b'1'", "'1'") + yield f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" + + @staticmethod + def index(ddl: Dict) -> Generator: + """生成索引定义 + + Args: + ddl (Dict): 表DDL + + Yields: + Generator[str]: create index 语句 + """ + + def generate_columns(columns): + keys = [ + f"{col['name'].lower()}{' ' + col['order'].lower() if col['order'] != 'ASC' else ''}" + for col in columns[0] + ] + return ", ".join(keys) + + for no, index in enumerate(ddl["index"], 1): + columns = generate_columns(index["columns"]) + table_name = ddl["table_name"].lower() + yield f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns})" + + @staticmethod + def filed_comments(table_sql: str) -> Generator: + for line in table_sql.split("\n"): + match = re.match(r"^`([^`]+)`.* COMMENT '([^']+)'", line.strip()) + if match: + field = match.group(1) + comment_string = match.group(2).replace("\\n", "\n") + yield field, comment_string + + def table_comment(self, table_sql: str) -> str: + match = re.search(r"COMMENT \= '([^']+)';", table_sql) + return match.group(1) if match else None + def print(self): """打印转换后的sql脚本到终端""" print( @@ -192,7 +242,7 @@ class PostgreSQLConvertor(Convertor): def __init__(self, src): super().__init__(src, "PostgreSQL") - def translate_type(self, type, size): + def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]): """类型转换""" type = type.lower() @@ -234,27 +284,30 @@ class PostgreSQLConvertor(Convertor): table_name = ddl["table_name"].lower() columns = [f"{_generate_column(col).strip()}" for col in ddl["columns"]] + filed_def_list = ",\n ".join(columns) script = f"""-- ---------------------------- -- Table structure for {table_name} -- ---------------------------- DROP TABLE IF EXISTS {table_name}; CREATE TABLE {table_name} ( - {',\n '.join(columns)} + {filed_def_list} );""" return script - def gen_comment(self, table_sql, table_name) -> str: + def gen_index(self, ddl: Dict) -> str: + return "\n".join(f"{script};" for script in self.index(ddl)) + + def gen_comment(self, table_sql: str, table_name: str) -> str: """生成字段及表的注释""" script = "" - for line in table_sql.split("\n"): - match = re.match(r"^`([^`]+)`.* COMMENT '([^']+)'", line.strip()) - if match: - script += f"COMMENT ON COLUMN {table_name}.{match.group(1)} IS '{match.group(2).replace('\\n', '\n')}';\n" + for field, comment_string in self.filed_comments(table_sql): + script += ( + f"COMMENT ON COLUMN {table_name}.{field} IS '{comment_string}';" + "\n" + ) - match = re.search(r"COMMENT \= '([^']+)';", table_sql) - table_comment = match.group(1) if match else None + table_comment = self.table_comment(table_sql) if table_comment: script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';\n" @@ -264,53 +317,21 @@ CREATE TABLE {table_name} ( """生成主键定义""" return f"ALTER TABLE {table_name} ADD CONSTRAINT pk_{table_name} PRIMARY KEY (id);\n" - def gen_index(self, ddl) -> str: - """生成 index""" - - def generate_columns(columns): - keys = [ - f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" - for col in columns[0] - ] - return ", ".join(keys) - - script = "" - for no, index in enumerate(ddl["index"], 1): - columns = generate_columns(index["columns"]) - table_name = ddl["table_name"].lower() - script += ( - f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns});\n" - ) - - return script - - def gen_insert(self, table_name) -> str: + def gen_insert(self, table_name: str) -> str: """生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence""" - PREFIX = f"INSERT INTO `{table_name}`" - - # 收集 `table_name` 对应的 insert 语句 - inserts = [] - for line in self.content.split("\n"): - if line.startswith(PREFIX): - head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) - head = head.strip().replace("`", "").lower() - tail = tail.strip().replace(r"\"", '"') - script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" - # bit(1)数据转换 - script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") - inserts.append(script) - + inserts = list(Convertor.inserts(table_name, self.content)) ## 生成 insert 脚本 script = "" last_id = 0 if inserts: + inserts_lines = "\n".join(inserts) script += f"""\n\n-- ---------------------------- -- Records of {table_name.lower()} -- ---------------------------- -- @formatter:off BEGIN; -{'\n'.join(inserts)} +{inserts_lines} COMMIT; -- @formatter:on""" match = re.search(r"VALUES \((\d+),", inserts[-1]) @@ -332,7 +353,7 @@ class OracleConvertor(Convertor): def __init__(self, src): super().__init__(src, "Oracle") - def translate_type(self, type, size: None | int | Tuple[int]): + def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]): """类型转换""" type = type.lower() @@ -369,15 +390,19 @@ class OracleConvertor(Convertor): full_type = self.translate_type(type, col["size"]) nullable = "NULL" if col["nullable"] else "NOT NULL" default = f"DEFAULT {col['default']}" if col["default"] is not None else "" - return f"{'\"size\"' if name == "size" else name } {full_type} {default} {nullable}" + # Oracle 中 size 不能作为字段名 + field_name = '"size"' if name == "size" else name + # Oracle DEFAULT 定义在 NULLABLE 之前 + return f"{field_name} {full_type} {default} {nullable}" table_name = ddl["table_name"].lower() columns = [f"{generate_column(col).strip()}" for col in ddl["columns"]] + field_def_list = ",\n ".join(columns) script = f"""-- ---------------------------- -- Table structure for {table_name} -- ---------------------------- -CREATE TABLE {ddl['table_name'].lower()} ( - {',\n '.join(columns)} +CREATE TABLE {table_name} ( + {field_def_list} );""" # oracle INSERT '' 不能通过 NOT NULL 校验 @@ -385,72 +410,51 @@ CREATE TABLE {ddl['table_name'].lower()} ( return script - def gen_comment(self, table_sql, table_name) -> str: + def gen_index(self, ddl: Dict) -> str: + return "\n".join(f"{script};" for script in self.index(ddl)) + + def gen_comment(self, table_sql: str, table_name: str) -> str: script = "" - for line in table_sql.split("\n"): - match = re.search(r"`([^`]+)`.* COMMENT '([^']+)'", line) - if match: - script += f"COMMENT ON COLUMN {table_name}.{match.group(1)} IS '{match.group(2).replace('\\n', '\n')}';\n" + for field, comment_string in self.filed_comments(table_sql): + script += ( + f"COMMENT ON COLUMN {table_name}.{field} IS '{comment_string}';" + "\n" + ) - match = re.search(r"COMMENT \= '([^']+)';", table_sql) - table_comment = match.group(1) if match else None + table_comment = self.table_comment(table_sql) if table_comment: - script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';" + script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';\n" return script - def gen_pk(self, table_name) -> str: + def gen_pk(self, table_name: str) -> str: """生成主键定义""" return f"ALTER TABLE {table_name} ADD CONSTRAINT pk_{table_name} PRIMARY KEY (id);\n" - def gen_index(self, table_ddl) -> str: - """生成 INDEX 定义""" - - def generate_columns(columns): - keys = [ - f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" - for col in columns[0] - ] - return ", ".join(keys) - - script = "" - for no, index in enumerate(table_ddl["index"], 1): - columns = generate_columns(index["columns"]) - table_name = table_ddl["table_name"].lower() - script += ( - f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns});\n" - ) - return script + def gen_index(self, ddl: Dict) -> str: + return "\n".join(f"{script};" for script in self.index(ddl)) - def gen_insert(self, table_name) -> str: + def gen_insert(self, table_name: str) -> str: """拷贝 INSERT 语句""" - PREFIX = f"INSERT INTO `{table_name}`" inserts = [] - for line in self.content.split("\n"): - if line.startswith(PREFIX): - head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) - head = head.strip().replace("`", "").lower() - tail = tail.strip().replace(r"\"", '"') - script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" - # bit(1)数据转换 - script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") - # 对日期数据添加 TO_DATE 转换 - script = re.sub( - r"('\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}')", - r"to_date(\g<1>, 'SYYYY-MM-DD HH24:MI:SS')", - script, - ) - inserts.append(script) + for insert_script in Convertor.inserts(table_name, self.content): + # 对日期数据添加 TO_DATE 转换 + insert_script = re.sub( + r"('\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}')", + r"to_date(\g<1>, 'SYYYY-MM-DD HH24:MI:SS')", + insert_script, + ) + inserts.append(insert_script) ## 生成 insert 脚本 script = "" last_id = 0 if inserts: + inserts_lines = "\n".join(inserts) script += f"""\n\n-- ---------------------------- -- Records of {table_name.lower()} -- ---------------------------- -- @formatter:off -{'\n'.join(inserts)} +{inserts_lines} COMMIT; -- @formatter:on""" match = re.search(r"VALUES \((\d+),", inserts[-1]) @@ -476,7 +480,7 @@ class SQLServerConvertor(Convertor): def __init__(self, src): super().__init__(src, "Microsoft SQL Server") - def translate_type(self, type, size): + def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]): """类型转换""" type = type.lower() @@ -507,7 +511,7 @@ class SQLServerConvertor(Convertor): def _generate_column(col): name = col["name"].lower() - if name == 'id': + if name == "id": return "id bigint NOT NULL PRIMARY KEY IDENTITY" if name == "deleted": return "deleted bit DEFAULT 0 NOT NULL" @@ -520,35 +524,34 @@ class SQLServerConvertor(Convertor): table_name = ddl["table_name"].lower() columns = [f"{_generate_column(col).strip()}" for col in ddl["columns"]] + filed_def_list = ",\n ".join(columns) script = f"""-- ---------------------------- -- Table structure for {table_name} -- ---------------------------- DROP TABLE IF EXISTS {table_name}; CREATE TABLE {table_name} ( - {',\n '.join(columns)} + {filed_def_list} ) GO""" return script - def gen_comment(self, table_sql, table_name) -> str: + def gen_comment(self, table_sql: str, table_name: str) -> str: """生成字段及表的注释""" script = "" - for line in table_sql.split("\n"): - match = re.match(r"^`([^`]+)`.* COMMENT '([^']+)'", line.strip()) - if match: - script += f"""EXEC sp_addextendedproperty - 'MS_Description', N'{match.group(2).replace('\\n', '\n')}', + + for field, comment_string in self.filed_comments(table_sql): + script += f"""EXEC sp_addextendedproperty + 'MS_Description', N'{comment_string}', 'SCHEMA', N'dbo', 'TABLE', N'{table_name}', - 'COLUMN', N'{match.group(1)}' + 'COLUMN', N'{field}' GO """ - match = re.search(r"COMMENT \= '([^']+)';", table_sql) - table_comment = match.group(1) if match else None + table_comment = self.table_comment(table_sql) if table_comment: script += f"""EXEC sp_addextendedproperty 'MS_Description', N'{table_comment}', @@ -557,55 +560,34 @@ GO GO """ - return script - def gen_pk(self, table_name) -> str: + def gen_pk(self, table_name: str) -> str: """生成主键定义""" return "" - def gen_index(self, ddl) -> str: + def gen_index(self, ddl: Dict) -> str: """生成 index""" + return "\n".join(f"{script}\nGO" for script in self.index(ddl)) - def generate_columns(columns): - keys = [ - f"{col['name'].lower()}{" " + col['order'].lower() if col['order'] != 'ASC' else ''}" - for col in columns[0] - ] - return ", ".join(keys) - - script = "" - for no, index in enumerate(ddl["index"], 1): - columns = generate_columns(index["columns"]) - table_name = ddl["table_name"].lower() - script += f"CREATE INDEX idx_{table_name}_{no:02d} ON {table_name} ({columns})\nGO\n" - - return script - - def gen_insert(self, table_name) -> str: + def gen_insert(self, table_name: str) -> str: """生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence""" - PREFIX = f"INSERT INTO `{table_name}`" - # 收集 `table_name` 对应的 insert 语句 inserts = [] - for line in self.content.split("\n"): - if line.startswith(PREFIX): - head, tail = line.replace(PREFIX, "").split(" VALUES ", maxsplit=1) - head = head.strip().replace("`", "").lower() - tail = tail.strip().replace(r"\"", '"') - # SQLServer: 字符串前加N,hack,是否存在替换字符串内容的风险 - tail = tail.replace(", '", ", N'").replace("VALUES ('", "VALUES (N')") - script = f"INSERT INTO {table_name.lower()} {head} VALUES {tail}" - # bit(1)数据转换 - script = script.replace("b'0'", "'0'").replace("b'1'", "'1'") - # 删除 insert 的结尾分号 - script = re.sub(";$", r"\nGO", script) - inserts.append(script) + for insert_script in Convertor.inserts(table_name, self.content): + # SQLServer: 字符串前加N,hack,是否存在替换字符串内容的风险 + insert_script = insert_script.replace(", '", ", N'").replace( + "VALUES ('", "VALUES (N')" + ) + # 删除 insert 的结尾分号 + insert_script = re.sub(";$", r"\nGO", insert_script) + inserts.append(insert_script) ## 生成 insert 脚本 script = "" if inserts: + inserts_lines = "\n".join(inserts) script += f"""\n\n-- ---------------------------- -- Records of {table_name.lower()} -- ---------------------------- @@ -614,7 +596,7 @@ BEGIN TRANSACTION GO SET IDENTITY_INSERT {table_name.lower()} ON GO -{'\n'.join(inserts)} +{inserts_lines} SET IDENTITY_INSERT {table_name.lower()} OFF GO COMMIT @@ -625,10 +607,26 @@ GO def main(): - sql_file = pathlib.Path('../mysql/ruoyi-vue-pro.sql').resolve().as_posix() - # convertor = PostgreSQLConvertor(sql_file) - # convertor = OracleConvertor(sql_file) - convertor = SQLServerConvertor(sql_file) + parser = argparse.ArgumentParser(description="芋道系统数据库转换工具") + parser.add_argument( + "type", + type=str, + help="目标数据库类型", + choices=["postgres", "oracle", "sqlserver"], + ) + args = parser.parse_args() + + sql_file = pathlib.Path("../mysql/ruoyi-vue-pro.sql").resolve().as_posix() + convertor = None + if args.type == "postgres": + convertor = PostgreSQLConvertor(sql_file) + elif args.type == "oracle": + convertor = OracleConvertor(sql_file) + elif args.type == "sqlserver": + convertor = SQLServerConvertor(sql_file) + else: + raise NotImplementedError(f"不支持目标数据库类型: {args.type}") + convertor.print() -- Gitee From 29746d14593120165956eeeeef8e5d4d526c3727 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 09:04:47 +0800 Subject: [PATCH 0442/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91M?= =?UTF-8?q?ySQL=20jdbc=20=E8=BF=9E=E6=8E=A5=205.7=20=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yaml | 13 +++++------ .../src/main/resources/application-local.yaml | 22 ++++++------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index ead65d51ed..936aaae694 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -40,17 +40,14 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true - driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 username: root - password: 3WLiVUBEwTbvAfsh + password: 123456 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true - driver-class-name: com.mysql.jdbc.Driver + lazy: true # 开启懒加载,保证启动速度 + url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 username: root - password: 3WLiVUBEwTbvAfsh + password: 123456 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index ea1a7e8096..96e6cda350 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -46,31 +46,23 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 - # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 - # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 + # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 - # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 + # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root password: 123456 - # username: sa - # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W + # username: sa # SQL Server 连接的示例 + # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 # password: SYSDBA # DM 连接的示例 slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 - # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 - # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 - # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 - # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root password: 123456 - # username: sa - # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: -- Gitee From 88ac5be882915c44ae6c064d9d245a96fc219581 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 09:37:49 +0800 Subject: [PATCH 0443/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91A?= =?UTF-8?q?piAccessLogInterceptor=20=E5=A4=84=E7=90=86=20request=20body=20?= =?UTF-8?q?=E4=B8=BA=20""=20=E7=A9=BA=E4=B8=B2=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apilog/core/interceptor/ApiAccessLogInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java index 1cd43916fa..04296ec57a 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java @@ -43,7 +43,7 @@ public class ApiAccessLogInterceptor implements HandlerInterceptor { log.info("[preHandle][开始请求 URL({}) 无参数]", request.getRequestURI()); } else { log.info("[preHandle][开始请求 URL({}) 参数({})]", request.getRequestURI(), - StrUtil.nullToDefault(requestBody, queryString.toString())); + StrUtil.blankToDefault(requestBody, queryString.toString())); } // 计时 StopWatch stopWatch = new StopWatch(); -- Gitee From ee3e507f07f4284dfbcf09dd222fca9c03228a64 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 09:55:04 +0800 Subject: [PATCH 0444/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91G?= =?UTF-8?q?lobalExceptionHandler=20=E6=96=B0=E5=A2=9E=20IGNORE=5FERROR=5FM?= =?UTF-8?q?ESSAGES=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=BF=BD=E7=95=A5=E2=80=9C?= =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84=E5=88=B7=E6=96=B0=E4=BB=A4=E7=89=8C?= =?UTF-8?q?=E2=80=9D=E7=AD=89=E9=9D=9E=E5=85=B3=E9=94=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/core/handler/GlobalExceptionHandler.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index 7c60141953..d86f353bcc 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; @@ -32,6 +33,7 @@ import org.springframework.web.servlet.NoHandlerFoundException; import java.time.LocalDateTime; import java.util.Map; +import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.*; @@ -45,6 +47,11 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC @Slf4j public class GlobalExceptionHandler { + /** + * 忽略的 ServiceException 错误提示,避免打印过多 logger + */ + public static final Set IGNORE_ERROR_MESSAGES = SetUtils.asSet("无效的刷新令牌"); + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") private final String applicationName; @@ -199,7 +206,10 @@ public class GlobalExceptionHandler { */ @ExceptionHandler(value = ServiceException.class) public CommonResult serviceExceptionHandler(ServiceException ex) { - log.info("[serviceExceptionHandler]", ex); + if (!IGNORE_ERROR_MESSAGES.contains(ex.getMessage())) { + // 不包含的时候,才进行打印,避免 ex 堆栈过多 + log.info("[serviceExceptionHandler]", ex); + } return CommonResult.error(ex.getCode(), ex.getMessage()); } -- Gitee From 022238758cc1860e32846f00c88f4e88143f6e06 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 10:12:40 +0800 Subject: [PATCH 0445/1557] =?UTF-8?q?=E3=80=90=E5=AE=8C=E5=96=84=E3=80=91?= =?UTF-8?q?=E9=80=82=E9=85=8D=20jimu=20=E6=8A=A5=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jmreport/config/JmReportConfiguration.java | 7 +++++-- .../core/service/JmReportTokenServiceImpl.java | 15 ++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/config/JmReportConfiguration.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/config/JmReportConfiguration.java index 3c99b28586..1946d052e8 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/config/JmReportConfiguration.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/config/JmReportConfiguration.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.report.framework.jmreport.config; import cn.iocoder.yudao.framework.security.config.SecurityProperties; import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; import cn.iocoder.yudao.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl; +import cn.iocoder.yudao.module.system.api.permission.PermissionApi; import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -19,8 +20,10 @@ public class JmReportConfiguration { @Bean @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") - public JmReportTokenServiceI jmReportTokenService(OAuth2TokenApi oAuth2TokenApi, SecurityProperties securityProperties) { - return new JmReportTokenServiceImpl(oAuth2TokenApi, securityProperties); + public JmReportTokenServiceI jmReportTokenService(OAuth2TokenApi oAuth2TokenApi, + PermissionApi permissionApi, + SecurityProperties securityProperties) { + return new JmReportTokenServiceImpl(oAuth2TokenApi, permissionApi, securityProperties); } } diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java index f4685432f6..6d3225164b 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java @@ -11,12 +11,13 @@ import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespDTO; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; +import cn.iocoder.yudao.module.system.api.permission.PermissionApi; +import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; +import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; import org.springframework.http.HttpHeaders; -import jakarta.servlet.http.HttpServletRequest; import java.util.Objects; /** @@ -37,6 +38,7 @@ public class JmReportTokenServiceImpl implements JmReportTokenServiceI { private static final String AUTHORIZATION_FORMAT = SecurityFrameworkUtils.AUTHORIZATION_BEARER + " %s"; private final OAuth2TokenApi oauth2TokenApi; + private final PermissionApi permissionApi; private final SecurityProperties securityProperties; @@ -130,9 +132,12 @@ public class JmReportTokenServiceImpl implements JmReportTokenServiceI { } @Override - public String[] getRoles(String s) { - // 暂时不用实现,因为不用 JmReport 的角色 - return null; + public String[] getRoles(String token) { + // 参见文档 https://help.jeecg.com/jimureport/prodSafe.html 文档 + // 适配:如果是本系统的管理员,则转换成 jimu 报表的管理员 + Long userId = SecurityFrameworkUtils.getLoginUserId(); + return permissionApi.hasAnyRoles(userId, RoleCodeEnum.SUPER_ADMIN.getCode()) + ? new String[]{"admin"} : null; } @Override -- Gitee From f381568f6b5b02f45142b91af1195d0bc0945db3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 10:35:58 +0800 Subject: [PATCH 0446/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91C?= =?UTF-8?q?RM=EF=BC=9A=E5=95=86=E6=9C=BA=E6=B7=BB=E5=8A=A0=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=97=B6=EF=BC=8CbusinessProducts=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=98=AF?= =?UTF-8?q?=20products?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/business/vo/business/CrmBusinessSaveReqVO.java | 2 +- .../module/crm/service/business/CrmBusinessServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java index fa86692e7b..102fcba9b2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java @@ -66,7 +66,7 @@ public class CrmBusinessSaveReqVO { private Long contactId; // 使用场景,在【联系人详情】添加商机时,如果需要关联两者,需要传递 contactId 字段 @Schema(description = "产品列表") - private List businessProducts; + private List products; @Schema(description = "产品列表") @Data diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java index 9d80a31aca..2da3eb1505 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/business/CrmBusinessServiceImpl.java @@ -89,7 +89,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { success = CRM_BUSINESS_CREATE_SUCCESS) public Long createBusiness(CrmBusinessSaveReqVO createReqVO, Long userId) { // 1.1 校验产品项的有效性 - List businessProducts = validateBusinessProducts(createReqVO.getBusinessProducts()); + List businessProducts = validateBusinessProducts(createReqVO.getProducts()); // 1.2 校验关联字段 validateRelationDataExists(createReqVO); @@ -130,7 +130,7 @@ public class CrmBusinessServiceImpl implements CrmBusinessService { // 1.1 校验存在 CrmBusinessDO oldBusiness = validateBusinessExists(updateReqVO.getId()); // 1.2 校验产品项的有效性 - List businessProducts = validateBusinessProducts(updateReqVO.getBusinessProducts()); + List businessProducts = validateBusinessProducts(updateReqVO.getProducts()); // 1.3 校验关联字段 validateRelationDataExists(updateReqVO); -- Gitee From 290a981cae0c99a506caac543bb1c4797e219c6b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 10:38:05 +0800 Subject: [PATCH 0447/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A=E7=A7=BB=E9=99=A4=20Druid=20?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E9=80=BB=E8=BE=91=E6=9C=AA=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E6=9C=9F=E6=9C=9B=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasource/config/YudaoDataSourceAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java index 99c7f09450..879a19aae3 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java @@ -23,7 +23,7 @@ public class YudaoDataSourceAutoConfiguration { * 创建 DruidAdRemoveFilter 过滤器,过滤 common.js 的广告 */ @Bean - @ConditionalOnProperty(name = "spring.datasource.druid.web-stat-filter.enabled", havingValue = "true") + @ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled", havingValue = "true") public FilterRegistrationBean druidAdRemoveFilterFilter(DruidStatProperties properties) { // 获取 druid web 监控页面的参数 DruidStatProperties.StatViewServlet config = properties.getStatViewServlet(); -- Gitee From df08a2ecf0b0377ec61071d177e190b7cfb19c3b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 11:28:04 +0800 Subject: [PATCH 0448/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20quartz.sql=EF=BC=8C=E5=AE=8C=E5=96=84=20RE?= =?UTF-8?q?ADME.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/quartz.sql | 305 ++++++++++++++ sql/oracle/quartz.sql | 851 +++++++++++++++++++++++++++++++++++++++ sql/sqlserver/quartz.sql | 547 +++++++++++++++++++++++++ sql/tools/README.md | 16 +- 4 files changed, 1714 insertions(+), 5 deletions(-) create mode 100644 sql/mysql/quartz.sql create mode 100644 sql/oracle/quartz.sql create mode 100644 sql/sqlserver/quartz.sql diff --git a/sql/mysql/quartz.sql b/sql/mysql/quartz.sql new file mode 100644 index 0000000000..200860e2f8 --- /dev/null +++ b/sql/mysql/quartz.sql @@ -0,0 +1,305 @@ +/* + 注意:仅仅需要 Quartz 定时任务的场景,可选!!! + + Date: 30/04/2024 09:54:18 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for QRTZ_BLOB_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`; +CREATE TABLE `QRTZ_BLOB_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `BLOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `SCHED_NAME`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, + CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_BLOB_TRIGGERS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_CALENDARS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_CALENDARS`; +CREATE TABLE `QRTZ_CALENDARS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `CALENDAR` blob NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_CALENDARS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_CRON_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`; +CREATE TABLE `QRTZ_CRON_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_CRON_TRIGGERS +-- ---------------------------- +BEGIN; +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_FIRED_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`; +CREATE TABLE `QRTZ_FIRED_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `FIRED_TIME` bigint NOT NULL, + `SCHED_TIME` bigint NOT NULL, + `PRIORITY` int NOT NULL, + `STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE, + INDEX `IDX_QRTZ_FT_TRIG_INST_NAME`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC) USING BTREE, + INDEX `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, + INDEX `IDX_QRTZ_FT_J_G`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_FT_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_FT_T_G`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_FT_TG`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_FIRED_TRIGGERS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_JOB_DETAILS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`; +CREATE TABLE `QRTZ_JOB_DETAILS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_J_REQ_RECOVERY`(`SCHED_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, + INDEX `IDX_QRTZ_J_GRP`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_JOB_DETAILS +-- ---------------------------- +BEGIN; +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000197400104A4F425F48414E444C45525F4E414D457400116163636573734C6F67436C65616E4A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000187400104A4F425F48414E444C45525F4E414D4574001A62726F6B65726167655265636F7264556E667265657A654A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001A7400104A4F425F48414E444C45525F4E414D457400106572726F724C6F67436C65616E4A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001B7400104A4F425F48414E444C45525F4E414D4574000E6A6F624C6F67436C65616E4A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000137400104A4F425F48414E444C45525F4E414D45740010706179526566756E6453796E634A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000157400104A4F425F48414E444C45525F4E414D4574001774726164654F726465724175746F43616E63656C4A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000177400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F436F6D6D656E744A6F627800); +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000167400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F526563656976654A6F627800); +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_LOCKS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_LOCKS`; +CREATE TABLE `QRTZ_LOCKS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_LOCKS +-- ---------------------------- +BEGIN; +INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'STATE_ACCESS'); +INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'TRIGGER_ACCESS'); +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`; +CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SCHEDULER_STATE +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`; +CREATE TABLE `QRTZ_SCHEDULER_STATE` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `LAST_CHECKIN_TIME` bigint NOT NULL, + `CHECKIN_INTERVAL` bigint NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_SCHEDULER_STATE +-- ---------------------------- +BEGIN; +INSERT INTO `QRTZ_SCHEDULER_STATE` (`SCHED_NAME`, `INSTANCE_NAME`, `LAST_CHECKIN_TIME`, `CHECKIN_INTERVAL`) VALUES ('schedulerName', 'MacBook-Pro.local1713489703551', 1713742509534, 15000); +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`; +CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `REPEAT_COUNT` bigint NOT NULL, + `REPEAT_INTERVAL` bigint NOT NULL, + `TIMES_TRIGGERED` bigint NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`; +CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `INT_PROP_1` int NULL DEFAULT NULL, + `INT_PROP_2` int NULL DEFAULT NULL, + `LONG_PROP_1` bigint NULL DEFAULT NULL, + `LONG_PROP_2` bigint NULL DEFAULT NULL, + `DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL, + `DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL, + `BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_TRIGGERS +-- ---------------------------- +DROP TABLE IF EXISTS `QRTZ_TRIGGERS`; +CREATE TABLE `QRTZ_TRIGGERS` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `NEXT_FIRE_TIME` bigint NULL DEFAULT NULL, + `PREV_FIRE_TIME` bigint NULL DEFAULT NULL, + `PRIORITY` int NULL DEFAULT NULL, + `TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `START_TIME` bigint NOT NULL, + `END_TIME` bigint NULL DEFAULT NULL, + `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `MISFIRE_INSTR` smallint NULL DEFAULT NULL, + `JOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_T_J`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_C`(`SCHED_NAME` ASC, `CALENDAR_NAME` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_G`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_STATE`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_N_STATE`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_N_G_STATE`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_NEXT_FIRE_TIME`(`SCHED_NAME` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_STATE` ASC) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, + CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +-- ---------------------------- +-- Records of QRTZ_TRIGGERS +-- ---------------------------- +BEGIN; +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', 'accessLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696301981000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 1695909720000, -1, 5, 'PAUSED', 'CRON', 1695909706000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', 'errorLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302043000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', 'jobLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302092000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', 'payRefundSyncJob', 'DEFAULT', NULL, 1690117560000, 1690117500000, 5, 'PAUSED', 'CRON', 1690117424000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 1695727440000, 1695727380000, 5, 'PAUSED', 'CRON', 1695656605000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 1695783840000, 1695783780000, 5, 'PAUSED', 'CRON', 1695742709000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 1695742740000, 1695742680000, 5, 'PAUSED', 'CRON', 1695727433000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +COMMIT; + +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/sql/oracle/quartz.sql b/sql/oracle/quartz.sql new file mode 100644 index 0000000000..fd01dcbfb2 --- /dev/null +++ b/sql/oracle/quartz.sql @@ -0,0 +1,851 @@ +/* + 注意:仅仅需要 Quartz 定时任务的场景,可选!!! + + Date: 15/06/2022 08:20:08 +*/ + +-- ---------------------------- +-- Table structure for QRTZ_BLOB_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_BLOB_TRIGGERS"; +CREATE TABLE "QRTZ_BLOB_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "BLOB_DATA" BLOB +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_BLOB_TRIGGERS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_CALENDARS +-- ---------------------------- +DROP TABLE "QRTZ_CALENDARS"; +CREATE TABLE "QRTZ_CALENDARS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "CALENDAR_NAME" VARCHAR2(200 BYTE) NOT NULL, + "CALENDAR" BLOB NOT NULL +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_CALENDARS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_CRON_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_CRON_TRIGGERS"; +CREATE TABLE "QRTZ_CRON_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "CRON_EXPRESSION" VARCHAR2(120 BYTE) NOT NULL, + "TIME_ZONE_ID" VARCHAR2(80 BYTE) +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_CRON_TRIGGERS +-- ---------------------------- +INSERT INTO "QRTZ_CRON_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "CRON_EXPRESSION", "TIME_ZONE_ID") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', '0 * * * * ? *', 'Asia/Shanghai'); +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_FIRED_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_FIRED_TRIGGERS"; +CREATE TABLE "QRTZ_FIRED_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "ENTRY_ID" VARCHAR2(95 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "INSTANCE_NAME" VARCHAR2(200 BYTE) NOT NULL, + "FIRED_TIME" NUMBER(13,0) NOT NULL, + "SCHED_TIME" NUMBER(13,0) NOT NULL, + "PRIORITY" NUMBER(13,0) NOT NULL, + "STATE" VARCHAR2(16 BYTE) NOT NULL, + "JOB_NAME" VARCHAR2(200 BYTE), + "JOB_GROUP" VARCHAR2(200 BYTE), + "IS_NONCONCURRENT" VARCHAR2(1 BYTE), + "REQUESTS_RECOVERY" VARCHAR2(1 BYTE) +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_FIRED_TRIGGERS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_JOB_DETAILS +-- ---------------------------- +DROP TABLE "QRTZ_JOB_DETAILS"; +CREATE TABLE "QRTZ_JOB_DETAILS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "JOB_NAME" VARCHAR2(200 BYTE) NOT NULL, + "JOB_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "DESCRIPTION" VARCHAR2(250 BYTE), + "JOB_CLASS_NAME" VARCHAR2(250 BYTE) NOT NULL, + "IS_DURABLE" VARCHAR2(1 BYTE) NOT NULL, + "IS_NONCONCURRENT" VARCHAR2(1 BYTE) NOT NULL, + "IS_UPDATE_DATA" VARCHAR2(1 BYTE) NOT NULL, + "REQUESTS_RECOVERY" VARCHAR2(1 BYTE) NOT NULL, + "JOB_DATA" BLOB +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_JOB_DETAILS +-- ---------------------------- +INSERT INTO "QRTZ_JOB_DETAILS" ("SCHED_NAME", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "JOB_CLASS_NAME", "IS_DURABLE", "IS_NONCONCURRENT", "IS_UPDATE_DATA", "REQUESTS_RECOVERY", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000007400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800')); +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_LOCKS +-- ---------------------------- +DROP TABLE "QRTZ_LOCKS"; +CREATE TABLE "QRTZ_LOCKS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "LOCK_NAME" VARCHAR2(40 BYTE) NOT NULL +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_LOCKS +-- ---------------------------- +INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'STATE_ACCESS'); +INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'TRIGGER_ACCESS'); +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +DROP TABLE "QRTZ_PAUSED_TRIGGER_GRPS"; +CREATE TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SCHEDULER_STATE +-- ---------------------------- +DROP TABLE "QRTZ_SCHEDULER_STATE"; +CREATE TABLE "QRTZ_SCHEDULER_STATE" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "INSTANCE_NAME" VARCHAR2(200 BYTE) NOT NULL, + "LAST_CHECKIN_TIME" NUMBER(13,0) NOT NULL, + "CHECKIN_INTERVAL" NUMBER(13,0) NOT NULL +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_SCHEDULER_STATE +-- ---------------------------- +INSERT INTO "QRTZ_SCHEDULER_STATE" ("SCHED_NAME", "INSTANCE_NAME", "LAST_CHECKIN_TIME", "CHECKIN_INTERVAL") VALUES ('schedulerName', 'Yunai.local1651409076356', '1651409097967', '15000'); +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_SIMPLE_TRIGGERS"; +CREATE TABLE "QRTZ_SIMPLE_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "REPEAT_COUNT" NUMBER(7,0) NOT NULL, + "REPEAT_INTERVAL" NUMBER(12,0) NOT NULL, + "TIMES_TRIGGERED" NUMBER(10,0) NOT NULL +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_SIMPROP_TRIGGERS"; +CREATE TABLE "QRTZ_SIMPROP_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "STR_PROP_1" VARCHAR2(512 BYTE), + "STR_PROP_2" VARCHAR2(512 BYTE), + "STR_PROP_3" VARCHAR2(512 BYTE), + "INT_PROP_1" NUMBER(10,0), + "INT_PROP_2" NUMBER(10,0), + "LONG_PROP_1" NUMBER(13,0), + "LONG_PROP_2" NUMBER(13,0), + "DEC_PROP_1" NUMBER(13,4), + "DEC_PROP_2" NUMBER(13,4), + "BOOL_PROP_1" VARCHAR2(1 BYTE), + "BOOL_PROP_2" VARCHAR2(1 BYTE) +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +COMMIT; +COMMIT; + +-- ---------------------------- +-- Table structure for QRTZ_TRIGGERS +-- ---------------------------- +DROP TABLE "QRTZ_TRIGGERS"; +CREATE TABLE "QRTZ_TRIGGERS" ( + "SCHED_NAME" VARCHAR2(120 BYTE) NOT NULL, + "TRIGGER_NAME" VARCHAR2(200 BYTE) NOT NULL, + "TRIGGER_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "JOB_NAME" VARCHAR2(200 BYTE) NOT NULL, + "JOB_GROUP" VARCHAR2(200 BYTE) NOT NULL, + "DESCRIPTION" VARCHAR2(250 BYTE), + "NEXT_FIRE_TIME" NUMBER(13,0), + "PREV_FIRE_TIME" NUMBER(13,0), + "PRIORITY" NUMBER(13,0), + "TRIGGER_STATE" VARCHAR2(16 BYTE) NOT NULL, + "TRIGGER_TYPE" VARCHAR2(8 BYTE) NOT NULL, + "START_TIME" NUMBER(13,0) NOT NULL, + "END_TIME" NUMBER(13,0), + "CALENDAR_NAME" VARCHAR2(200 BYTE), + "MISFIRE_INSTR" NUMBER(2,0), + "JOB_DATA" BLOB +) + LOGGING +NOCOMPRESS +PCTFREE 10 +INITRANS 1 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +) +PARALLEL 1 +NOCACHE +DISABLE ROW MOVEMENT +; + +-- ---------------------------- +-- Records of QRTZ_TRIGGERS +-- ---------------------------- +INSERT INTO "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "NEXT_FIRE_TIME", "PREV_FIRE_TIME", "PRIORITY", "TRIGGER_STATE", "TRIGGER_TYPE", "START_TIME", "END_TIME", "CALENDAR_NAME", "MISFIRE_INSTR", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', 'userSessionTimeoutJob', 'DEFAULT', NULL, '1651409160000', '1651409100000', '5', 'WAITING', 'CRON', '1651409043000', '0', NULL, '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000007D074000F4A4F425F52455452595F434F554E547371007E0009000000037800')); +COMMIT; +COMMIT; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_BLOB_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "QRTZ_BLOB_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_BLOB_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008266" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008267" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008268" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008653" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008654" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "SYS_C008655" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_CALENDARS +-- ---------------------------- +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "QRTZ_CALENDARS_PK" PRIMARY KEY ("SCHED_NAME", "CALENDAR_NAME"); + +-- ---------------------------- +-- Checks structure for table QRTZ_CALENDARS +-- ---------------------------- +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008271" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008272" CHECK ("CALENDAR_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008273" CHECK ("CALENDAR" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008656" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008657" CHECK ("CALENDAR_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CALENDARS" ADD CONSTRAINT "SYS_C008658" CHECK ("CALENDAR" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "QRTZ_CRON_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008255" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008256" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008257" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008258" CHECK ("CRON_EXPRESSION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008659" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008660" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008661" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "SYS_C008662" CHECK ("CRON_EXPRESSION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_FIRED_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "QRTZ_FIRED_TRIGGER_PK" PRIMARY KEY ("SCHED_NAME", "ENTRY_ID"); + +-- ---------------------------- +-- Checks structure for table QRTZ_FIRED_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008278" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008279" CHECK ("ENTRY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008280" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008281" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008282" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008283" CHECK ("FIRED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008284" CHECK ("SCHED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008285" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008286" CHECK ("STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008663" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008664" CHECK ("ENTRY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008665" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008666" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008667" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008668" CHECK ("FIRED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008669" CHECK ("SCHED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008670" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT "SYS_C008671" CHECK ("STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Indexes structure for table QRTZ_FIRED_TRIGGERS +-- ---------------------------- +CREATE INDEX "IDX_QRTZ_FT_INST_JOB_REQ_RCVRY" + ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "INSTANCE_NAME" ASC, "REQUESTS_RECOVERY" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_FT_JG" + ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) + LOGGING + ONLINE + NOSORT + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_FT_J_G" + ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "JOB_NAME" ASC, "JOB_GROUP" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_FT_TG" + ON "QRTZ_FIRED_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_GROUP" ASC) LOCAL + LOGGING + NOSORT + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); + +-- ---------------------------- +-- Primary Key structure for table QRTZ_JOB_DETAILS +-- ---------------------------- +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "QRTZ_JOB_DETAILS_PK" PRIMARY KEY ("SCHED_NAME", "JOB_NAME", "JOB_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_JOB_DETAILS +-- ---------------------------- +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008228" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008229" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008230" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008231" CHECK ("JOB_CLASS_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008232" CHECK ("IS_DURABLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008233" CHECK ("IS_NONCONCURRENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008234" CHECK ("IS_UPDATE_DATA" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_JOB_DETAILS" ADD CONSTRAINT "SYS_C008235" CHECK ("REQUESTS_RECOVERY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Indexes structure for table QRTZ_JOB_DETAILS +-- ---------------------------- +CREATE INDEX "IDX_QRTZ_J_GRP" + ON "QRTZ_JOB_DETAILS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_J_REQ_RECOVERY" + ON "QRTZ_JOB_DETAILS" ("SCHED_NAME" ASC, "REQUESTS_RECOVERY" ASC) LOCAL + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); + +-- ---------------------------- +-- Primary Key structure for table QRTZ_LOCKS +-- ---------------------------- +ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "QRTZ_LOCKS_PK" PRIMARY KEY ("SCHED_NAME", "LOCK_NAME"); + +-- ---------------------------- +-- Checks structure for table QRTZ_LOCKS +-- ---------------------------- +ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008293" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008294" CHECK ("LOCK_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008672" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_LOCKS" ADD CONSTRAINT "SYS_C008673" CHECK ("LOCK_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "QRTZ_PAUSED_TRIG_GRPS_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008275" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008276" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008674" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT "SYS_C008675" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SCHEDULER_STATE +-- ---------------------------- +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "QRTZ_SCHEDULER_STATE_PK" PRIMARY KEY ("SCHED_NAME", "INSTANCE_NAME"); + +-- ---------------------------- +-- Checks structure for table QRTZ_SCHEDULER_STATE +-- ---------------------------- +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008288" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008289" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008290" CHECK ("LAST_CHECKIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008291" CHECK ("CHECKIN_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008676" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008677" CHECK ("INSTANCE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008678" CHECK ("LAST_CHECKIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SCHEDULER_STATE" ADD CONSTRAINT "SYS_C008679" CHECK ("CHECKIN_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPLE_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008247" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008248" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008249" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008250" CHECK ("REPEAT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008251" CHECK ("REPEAT_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008252" CHECK ("TIMES_TRIGGERED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008680" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008681" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008682" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008683" CHECK ("REPEAT_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008684" CHECK ("REPEAT_INTERVAL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "SYS_C008685" CHECK ("TIMES_TRIGGERED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPROP_TRIG_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008261" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008262" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008263" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008686" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008687" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "SYS_C008688" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Primary Key structure for table QRTZ_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "QRTZ_TRIGGERS_PK" PRIMARY KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"); + +-- ---------------------------- +-- Checks structure for table QRTZ_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008237" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008238" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008239" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008240" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008241" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008242" CHECK ("TRIGGER_STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008243" CHECK ("TRIGGER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008244" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008689" CHECK ("SCHED_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008690" CHECK ("TRIGGER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008691" CHECK ("TRIGGER_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008692" CHECK ("JOB_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008693" CHECK ("JOB_GROUP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008694" CHECK ("TRIGGER_STATE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008695" CHECK ("TRIGGER_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; +ALTER TABLE "QRTZ_TRIGGERS" ADD CONSTRAINT "SYS_C008696" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Indexes structure for table QRTZ_TRIGGERS +-- ---------------------------- +CREATE INDEX "IDX_QRTZ_T_C" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "CALENDAR_NAME" ASC) LOCAL + LOGGING + ONLINE + NOSORT + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_J" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "JOB_NAME" ASC, "JOB_GROUP" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_JG" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "JOB_GROUP" ASC) LOCAL + LOGGING + ONLINE + NOSORT + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_NEXT_FIRE_TIME" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "NEXT_FIRE_TIME" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_NFT_ST" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_STATE" ASC, "NEXT_FIRE_TIME" ASC) LOCAL + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_NFT_ST_MISFIRE" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "MISFIRE_INSTR" ASC, "NEXT_FIRE_TIME" ASC, "TRIGGER_STATE" ASC) LOCAL + LOGGING + ONLINE + NOSORT + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); +CREATE INDEX "IDX_QRTZ_T_STATE" + ON "QRTZ_TRIGGERS" ("SCHED_NAME" ASC, "TRIGGER_STATE" ASC) + LOGGING + VISIBLE +PCTFREE 10 +INITRANS 2 +STORAGE ( + INITIAL 65536 + NEXT 1048576 + MINEXTENTS 1 + MAXEXTENTS 2147483645 + FREELISTS 1 + FREELIST GROUPS 1 + BUFFER_POOL DEFAULT +); + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_BLOB_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT "QRTZ_BLOB_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_CRON_TRIGGERS" ADD CONSTRAINT "QRTZ_CRON_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPLE_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +ALTER TABLE "QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT "QRTZ_SIMPROP_TRIG_TO_TRIG_FK" FOREIGN KEY ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE; \ No newline at end of file diff --git a/sql/sqlserver/quartz.sql b/sql/sqlserver/quartz.sql new file mode 100644 index 0000000000..e78044364c --- /dev/null +++ b/sql/sqlserver/quartz.sql @@ -0,0 +1,547 @@ +/* + 注意:仅仅需要 Quartz 定时任务的场景,可选!!! + + Date: 30/04/2024 09:54:18 +*/ + +-- ---------------------------- +-- Table structure for QRTZ_BLOB_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [BLOB_DATA] varbinary(max) NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_BLOB_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_CALENDARS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_CALENDARS] + GO + +CREATE TABLE [dbo].[QRTZ_CALENDARS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [CALENDAR] varbinary(max) NOT NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_CALENDARS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_CALENDARS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_CRON_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [CRON_EXPRESSION] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TIME_ZONE_ID] varchar(80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_CRON_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +INSERT INTO [dbo].[QRTZ_CRON_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [CRON_EXPRESSION], [TIME_ZONE_ID]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'0 * * * * ? *', N'Asia/Shanghai') +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_FIRED_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [ENTRY_ID] varchar(95) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [FIRED_TIME] bigint NOT NULL, + [SCHED_TIME] bigint NOT NULL, + [PRIORITY] int NOT NULL, + [STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_FIRED_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_JOB_DETAILS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_JOB_DETAILS] + GO + +CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [JOB_CLASS_NAME] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [IS_DURABLE] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [IS_UPDATE_DATA] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_DATA] varbinary(max) NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_JOB_DETAILS +-- ---------------------------- +BEGIN TRANSACTION +GO + +INSERT INTO [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [JOB_CLASS_NAME], [IS_DURABLE], [IS_NONCONCURRENT], [IS_UPDATE_DATA], [REQUESTS_RECOVERY], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', N'0', N'1', N'1', N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000107400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800) +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_LOCKS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_LOCKS] + GO + +CREATE TABLE [dbo].[QRTZ_LOCKS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [LOCK_NAME] varchar(40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_LOCKS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_LOCKS +-- ---------------------------- +BEGIN TRANSACTION +GO + +INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'STATE_ACCESS') +GO + +INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'TRIGGER_ACCESS') +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] + GO + +CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_SCHEDULER_STATE +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE] + GO + +CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [LAST_CHECKIN_TIME] bigint NOT NULL, + [CHECKIN_INTERVAL] bigint NOT NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_SCHEDULER_STATE +-- ---------------------------- +BEGIN TRANSACTION +GO + +INSERT INTO [dbo].[QRTZ_SCHEDULER_STATE] ([SCHED_NAME], [INSTANCE_NAME], [LAST_CHECKIN_TIME], [CHECKIN_INTERVAL]) VALUES (N'schedulerName', N'Yunai1651483828928', N'1651484588813', N'15000') +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [REPEAT_COUNT] bigint NOT NULL, + [REPEAT_INTERVAL] bigint NOT NULL, + [TIMES_TRIGGERED] bigint NOT NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [STR_PROP_1] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [STR_PROP_2] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [STR_PROP_3] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [INT_PROP_1] int NULL, + [INT_PROP_2] int NULL, + [LONG_PROP_1] bigint NULL, + [LONG_PROP_2] bigint NULL, + [DEC_PROP_1] numeric(13,4) NULL, + [DEC_PROP_2] numeric(13,4) NULL, + [BOOL_PROP_1] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [BOOL_PROP_2] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +COMMIT +GO + + +-- ---------------------------- +-- Table structure for QRTZ_TRIGGERS +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND type IN ('U')) +DROP TABLE [dbo].[QRTZ_TRIGGERS] + GO + +CREATE TABLE [dbo].[QRTZ_TRIGGERS] ( + [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [NEXT_FIRE_TIME] bigint NULL, + [PREV_FIRE_TIME] bigint NULL, + [PRIORITY] int NULL, + [TRIGGER_STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [TRIGGER_TYPE] varchar(8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [START_TIME] bigint NOT NULL, + [END_TIME] bigint NULL, + [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [MISFIRE_INSTR] smallint NULL, + [JOB_DATA] varbinary(max) NULL + ) + GO + +ALTER TABLE [dbo].[QRTZ_TRIGGERS] SET (LOCK_ESCALATION = TABLE) + GO + + +-- ---------------------------- +-- Records of QRTZ_TRIGGERS +-- ---------------------------- +BEGIN TRANSACTION +GO + +INSERT INTO [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [NEXT_FIRE_TIME], [PREV_FIRE_TIME], [PRIORITY], [TRIGGER_STATE], [TRIGGER_TYPE], [START_TIME], [END_TIME], [CALENDAR_NAME], [MISFIRE_INSTR], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'1651484640000', N'1651484580000', N'5', N'WAITING', N'CRON', N'1651483728000', N'0', NULL, N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000374000F4A4F425F52455452595F434F554E547371007E0009000007D07800) +GO + +COMMIT +GO + +-- ---------------------------- +-- Primary Key structure for table QRTZ_CALENDARS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_CALENDARS] ADD CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [CALENDAR_NAME]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Indexes structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +CREATE NONCLUSTERED INDEX [IX_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] +ON [dbo].[QRTZ_CRON_TRIGGERS] ( + [SCHED_NAME] ASC, + [TRIGGER_NAME] ASC, + [TRIGGER_GROUP] ASC +) +GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_FIRED_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [ENTRY_ID]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_JOB_DETAILS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] ADD CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_LOCKS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_LOCKS] ADD CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [LOCK_NAME]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_PAUSED_TRIGGER_GRPS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ADD CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SCHEDULER_STATE +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] ADD CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED ([SCHED_NAME], [INSTANCE_NAME]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Indexes structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] +ON [dbo].[QRTZ_SIMPLE_TRIGGERS] ( + [SCHED_NAME] ASC, + [TRIGGER_NAME] ASC, + [TRIGGER_GROUP] ASC +) +GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Indexes structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] +ON [dbo].[QRTZ_SIMPROP_TRIGGERS] ( + [SCHED_NAME] ASC, + [TRIGGER_NAME] ASC, + [TRIGGER_GROUP] ASC +) +GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPROP_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + +-- ---------------------------- +-- Indexes structure for table QRTZ_TRIGGERS +-- ---------------------------- +CREATE NONCLUSTERED INDEX [IX_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] +ON [dbo].[QRTZ_TRIGGERS] ( + [SCHED_NAME] ASC, + [TRIGGER_NAME] ASC, + [TRIGGER_GROUP] ASC +) +GO + + +-- ---------------------------- +-- Primary Key structure for table QRTZ_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_BLOB_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_BLOB_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION + GO + + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_CRON_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION + GO + + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_SIMPLE_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION + GO + + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_SIMPROP_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION + GO + + +-- ---------------------------- +-- Foreign Keys structure for table QRTZ_TRIGGERS +-- ---------------------------- +ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) REFERENCES [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) ON DELETE NO ACTION ON UPDATE NO ACTION + GO \ No newline at end of file diff --git a/sql/tools/README.md b/sql/tools/README.md index 887cc87a14..20b9301aed 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -46,20 +46,26 @@ TODO 暂未支持 ## 2. MySQL 转换其它数据库 -实现原理:通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server 等数据库的脚本。 +### 2.1 实现原理 -使用方式如下: +通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server 等数据库的脚本。 -安装依赖库 +### 2.2 使用方法 + +① 安装依赖库 `simple-ddl-parser` ```bash pip install simple-ddl-parser +# pip3 install simple-ddl-parser ``` -执行如下命令打印生成 postgresql 的脚本内容,其他可选参数有:oracle, sqlserver +② 执行如下命令打印生成 postgres 的脚本内容,其他可选参数有:`oracle`、`sqlserver` ```Bash python3 convertor.py postgres +# python3 convertor.py postgres > tmp.sql ``` -程序将sql脚本打印到终端,可以重定向到临时文件tmp.sql, 确认无误后可以利用IDEA(专业版)进行格式化。 +程序将 SQL 脚本打印到终端,可以重定向到临时文件 `tmp.sql`。 + +确认无误后,可以利用 IDEA 进行格式化。当然,也可以直接导入到数据库中。 \ No newline at end of file -- Gitee From b6d0176186c77af8ef3053c818932dd6fac1b8f3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 19:56:12 +0800 Subject: [PATCH 0449/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9Areview=20=E4=BB=BF=E9=92=89?= =?UTF-8?q?=E9=92=89=E6=B5=81=E7=A8=8B=E8=AE=BE=E8=AE=A1=20-=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=8E=92=E4=BB=96=E7=BD=91=E5=85=B3=E5=92=8C=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/enums/definition/BpmSimpleModeConditionType.java | 2 +- .../framework/flowable/core/enums/SimpleModelConstants.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java index 0421193466..9c9732a206 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java @@ -15,11 +15,11 @@ public enum BpmSimpleModeConditionType { CUSTOM_EXPRESSION(1, "自定义条件表达式"); - private final Integer type; private final String name; public static BpmSimpleModeConditionType valueOf(Integer type) { return ArrayUtil.firstMatch(nodeType -> nodeType.getType().equals(type), values()); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java index 32dae5a8f8..96dc6733a2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java @@ -13,6 +13,8 @@ public interface SimpleModelConstants { */ String APPROVE_METHOD_ATTRIBUTE = "approveMethod"; + // TODO @芋艿:条件表达式的字段名 + /** * 网关节点默认序列流属性 */ @@ -27,4 +29,5 @@ public interface SimpleModelConstants { * 条件节点条件表达式属性 */ String CONDITION_EXPRESSION_ATTRIBUTE = "conditionExpression"; + } -- Gitee From ffac294fbd67c6a83e469260e47b676f09c8086f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 22:11:22 +0800 Subject: [PATCH 0450/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A=E5=85=BC=E5=AE=B9=20MyBatis=20Plus?= =?UTF-8?q?=20=E9=92=88=E5=AF=B9=20SQL=20Server=20=E7=9A=84=20saveBatch=20?= =?UTF-8?q?=E4=B8=8D=E5=85=BC=E5=AE=B9=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/mybatis/core/mapper/BaseMapperX.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java index d6bbe922bd..e7767c6f1d 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java @@ -5,7 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.SortablePageParam; import cn.iocoder.yudao.framework.common.pojo.SortingField; +import cn.iocoder.yudao.framework.mybatis.core.enums.SqlConstants; import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils; +import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -20,6 +22,7 @@ import org.apache.ibatis.annotations.Param; import java.util.Collection; import java.util.List; +import java.util.Objects; /** * 在 MyBatis Plus 的 BaseMapper 的基础上拓展,提供更多的能力 @@ -147,6 +150,11 @@ public interface BaseMapperX extends MPJBaseMapper { * @param entities 实体们 */ default Boolean insertBatch(Collection entities) { + // 特殊:SQL Server 批量插入后,获取 id 会报错,因此通过循环处理 + if (Objects.equals(SqlConstants.DB_TYPE, DbType.SQL_SERVER)) { + entities.forEach(this::insert); + return CollUtil.isNotEmpty(entities); + } return Db.saveBatch(entities); } @@ -157,6 +165,11 @@ public interface BaseMapperX extends MPJBaseMapper { * @param size 插入数量 Db.saveBatch 默认为 1000 */ default Boolean insertBatch(Collection entities, int size) { + // 特殊:SQL Server 批量插入后,获取 id 会报错,因此通过循环处理 + if (Objects.equals(SqlConstants.DB_TYPE, DbType.SQL_SERVER)) { + entities.forEach(this::insert); + return CollUtil.isNotEmpty(entities); + } return Db.saveBatch(entities, size); } -- Gitee From 93e8e9c7af61903c9a7a3bc2d98f139be4cd8e38 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 May 2024 22:37:15 +0800 Subject: [PATCH 0451/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9AJobController=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20sync=20=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E5=B0=86=20infra=5Fjob=20=E5=90=8C=E6=AD=A5=E5=88=B0=20Quartz?= =?UTF-8?q?=20=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/job/JobController.http | 5 ++++ .../controller/admin/job/JobController.java | 8 ++++++ .../module/infra/service/job/JobService.java | 7 ++++++ .../infra/service/job/JobServiceImpl.java | 25 +++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.http diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.http b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.http new file mode 100644 index 0000000000..62f8dd6066 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.http @@ -0,0 +1,5 @@ +### 请求 /infra/job/sync 接口 => 成功 +POST {{baseUrl}}/infra/job/sync +Content-Type: application/json +tenant-id: {{adminTenentId}} +Authorization: Bearer {{token}} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java index 1881db53aa..372b6391b1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java @@ -90,6 +90,14 @@ public class JobController { return success(true); } + @PostMapping("/sync") + @Operation(summary = "同步定时任务") + @PreAuthorize("@ss.hasPermission('infra:job:create')") + public CommonResult syncJob() throws SchedulerException { + jobService.syncJob(); + return success(true); + } + @GetMapping("/get") @Operation(summary = "获得定时任务") @Parameter(name = "id", description = "编号", required = true, example = "1024") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobService.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobService.java index 882c211125..971fd1b62d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobService.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobService.java @@ -45,6 +45,13 @@ public interface JobService { */ void triggerJob(Long id) throws SchedulerException; + /** + * 同步定时任务 + * + * 目的:自己存储的 Job 信息,强制同步到 Quartz 中 + */ + void syncJob() throws SchedulerException; + /** * 删除定时任务 * diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java index dd887e165c..cfc52d29d9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java @@ -12,11 +12,15 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.dal.mysql.job.JobMapper; import cn.iocoder.yudao.module.infra.enums.job.JobStatusEnum; import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; import org.quartz.SchedulerException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import java.util.List; +import java.util.Objects; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.containsAny; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; @@ -28,6 +32,7 @@ import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; */ @Service @Validated +@Slf4j public class JobServiceImpl implements JobService { @Resource @@ -129,6 +134,26 @@ public class JobServiceImpl implements JobService { schedulerManager.triggerJob(job.getId(), job.getHandlerName(), job.getHandlerParam()); } + @Override + @Transactional(rollbackFor = Exception.class) + public void syncJob() throws SchedulerException { + // 1. 查询 Job 配置 + List jobList = jobMapper.selectList(); + + // 2. 遍历处理 + for (JobDO job : jobList) { + // 2.1 先删除,再创建 + schedulerManager.deleteJob(job.getHandlerName()); + schedulerManager.addJob(job.getId(), job.getHandlerName(), job.getHandlerParam(), job.getCronExpression(), + job.getRetryCount(), job.getRetryInterval()); + // 2.2 如果 status 为暂停,则需要暂停 + if (Objects.equals(job.getStatus(), JobStatusEnum.STOP.getStatus())) { + schedulerManager.pauseJob(job.getHandlerName()); + } + log.info("[syncJob][id({}) handlerName({}) 同步完成]", job.getId(), job.getHandlerName()); + } + } + @Override @Transactional(rollbackFor = Exception.class) public void deleteJob(Long id) throws SchedulerException { -- Gitee From 774082509b105d5fa03b079ee72998f464319f74 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 3 May 2024 23:22:53 +0800 Subject: [PATCH 0452/1557] =?UTF-8?q?feat:=20=E8=BE=BE=E6=A2=A6DM8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/dm/ruoyi-vue-pro-dm8.sql | 9948 +++++++---------- sql/tools/README.md | 19 +- sql/tools/convertor.py | 110 +- sql/tools/docker-compose.yaml | 23 + .../src/main/resources/application-local.yaml | 12 +- 5 files changed, 4406 insertions(+), 5706 deletions(-) diff --git a/sql/dm/ruoyi-vue-pro-dm8.sql b/sql/dm/ruoyi-vue-pro-dm8.sql index 98c29b4318..78ae24d5bd 100644 --- a/sql/dm/ruoyi-vue-pro-dm8.sql +++ b/sql/dm/ruoyi-vue-pro-dm8.sql @@ -1,5795 +1,4349 @@ -CREATE TABLE "RUOYI_VUE_PRO"."BPM_FORM" -( - "ID" BIGINT IDENTITY(24,1) NOT NULL, - "NAME" VARCHAR(64) NOT NULL, - "STATUS" TINYINT NOT NULL, - "CONF" VARCHAR(1000) NOT NULL, - "FIELDS" VARCHAR(5000) NOT NULL, - "REMARK" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_OA_LEAVE" -( - "ID" BIGINT IDENTITY(35,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "TYPE" TINYINT NOT NULL, - "REASON" VARCHAR(200) NOT NULL, - "START_TIME" TIMESTAMP(0) NOT NULL, - "END_TIME" TIMESTAMP(0) NOT NULL, - "DAY" TINYINT NOT NULL, - "RESULT" TINYINT NOT NULL, - "PROCESS_INSTANCE_ID" VARCHAR(64) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT" +/* + Yudao Database Transfer Tool + + Source Server Type : MySQL + + Target Server Type : DM8 + + Date: 2024-05-03 22:21:06 +*/ + + +-- ---------------------------- +-- Table structure for infra_api_access_log +-- ---------------------------- +CREATE TABLE infra_api_access_log ( - "ID" BIGINT IDENTITY(141,1) NOT NULL, - "PROCESS_DEFINITION_ID" VARCHAR(64) NOT NULL, - "MODEL_ID" VARCHAR(64) NOT NULL, - "DESCRIPTION" VARCHAR(255) NULL, - "FORM_TYPE" TINYINT NOT NULL, - "FORM_ID" BIGINT NULL, - "FORM_CONF" VARCHAR(1000) NULL, - "FORM_FIELDS" VARCHAR(5000) NULL, - "FORM_CUSTOM_CREATE_PATH" VARCHAR(255) NULL, - "FORM_CUSTOM_VIEW_PATH" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id varchar(64) DEFAULT '' NULL, + user_id bigint DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + application_name varchar(50) NOT NULL, + request_method varchar(16) DEFAULT '' NULL, + request_url varchar(255) DEFAULT '' NULL, + request_params text NULL, + response_body text NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + operate_module varchar(50) DEFAULT NULL NULL, + operate_name varchar(50) DEFAULT NULL NULL, + operate_type smallint DEFAULT 0 NULL, + begin_time datetime NOT NULL, + end_time datetime NOT NULL, + duration int NOT NULL, + result_code int DEFAULT 0 NOT NULL, + result_msg varchar(512) DEFAULT '' NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT" + +CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); + +COMMENT ON COLUMN infra_api_access_log.id IS '־'; +COMMENT ON COLUMN infra_api_access_log.trace_id IS '·׷ٱ'; +COMMENT ON COLUMN infra_api_access_log.user_id IS 'û'; +COMMENT ON COLUMN infra_api_access_log.user_type IS 'û'; +COMMENT ON COLUMN infra_api_access_log.application_name IS 'Ӧ'; +COMMENT ON COLUMN infra_api_access_log.request_method IS '󷽷'; +COMMENT ON COLUMN infra_api_access_log.request_url IS 'ַ'; +COMMENT ON COLUMN infra_api_access_log.request_params IS ''; +COMMENT ON COLUMN infra_api_access_log.response_body IS 'Ӧ'; +COMMENT ON COLUMN infra_api_access_log.user_ip IS 'û IP'; +COMMENT ON COLUMN infra_api_access_log.user_agent IS ' UA'; +COMMENT ON COLUMN infra_api_access_log.operate_module IS 'ģ'; +COMMENT ON COLUMN infra_api_access_log.operate_name IS ''; +COMMENT ON COLUMN infra_api_access_log.operate_type IS ''; +COMMENT ON COLUMN infra_api_access_log.begin_time IS 'ʼʱ'; +COMMENT ON COLUMN infra_api_access_log.end_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_access_log.duration IS 'ִʱ'; +COMMENT ON COLUMN infra_api_access_log.result_code IS ''; +COMMENT ON COLUMN infra_api_access_log.result_msg IS 'ʾ'; +COMMENT ON COLUMN infra_api_access_log.creator IS ''; +COMMENT ON COLUMN infra_api_access_log.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_access_log.updater IS ''; +COMMENT ON COLUMN infra_api_access_log.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_access_log.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN infra_api_access_log.tenant_id IS '⻧'; +COMMENT ON TABLE infra_api_access_log IS 'API ־'; + +-- ---------------------------- +-- Table structure for infra_api_error_log +-- ---------------------------- +CREATE TABLE infra_api_error_log ( - "ID" BIGINT IDENTITY(296,1) NOT NULL, - "START_USER_ID" BIGINT NOT NULL, - "NAME" VARCHAR(64) NULL, - "PROCESS_INSTANCE_ID" VARCHAR(64) NOT NULL, - "PROCESS_DEFINITION_ID" VARCHAR(64) NOT NULL, - "CATEGORY" VARCHAR(64) NULL, - "STATUS" TINYINT NOT NULL, - "RESULT" TINYINT NOT NULL, - "END_TIME" TIMESTAMP(0) NULL, - "FORM_VARIABLES" VARCHAR(5000) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id varchar(64) NOT NULL, + user_id int DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + application_name varchar(50) NOT NULL, + request_method varchar(16) NOT NULL, + request_url varchar(255) NOT NULL, + request_params varchar(8000) NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + exception_time datetime NOT NULL, + exception_name varchar(128) DEFAULT '' NULL, + exception_message text NOT NULL, + exception_root_cause_message text NOT NULL, + exception_stack_trace text NOT NULL, + exception_class_name varchar(512) NOT NULL, + exception_file_name varchar(512) NOT NULL, + exception_method_name varchar(512) NOT NULL, + exception_line_number int NOT NULL, + process_status smallint NOT NULL, + process_time datetime DEFAULT NULL NULL, + process_user_id int DEFAULT 0 NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE" + +COMMENT ON COLUMN infra_api_error_log.id IS ''; +COMMENT ON COLUMN infra_api_error_log.trace_id IS '·׷ٱ + * + * һ˵ͨ·׷ٱţԽ־־·׷־logger ӡ־ȣһ𣬴ӶŴ'; +COMMENT ON COLUMN infra_api_error_log.user_id IS 'û'; +COMMENT ON COLUMN infra_api_error_log.user_type IS 'û'; +COMMENT ON COLUMN infra_api_error_log.application_name IS 'Ӧ + * + * Ŀǰȡ spring.application.name'; +COMMENT ON COLUMN infra_api_error_log.request_method IS '󷽷'; +COMMENT ON COLUMN infra_api_error_log.request_url IS 'ַ'; +COMMENT ON COLUMN infra_api_error_log.request_params IS ''; +COMMENT ON COLUMN infra_api_error_log.user_ip IS 'û IP'; +COMMENT ON COLUMN infra_api_error_log.user_agent IS ' UA'; +COMMENT ON COLUMN infra_api_error_log.exception_time IS '쳣ʱ'; +COMMENT ON COLUMN infra_api_error_log.exception_name IS '쳣 + * + * {@link Throwable#getClass()} ȫ'; +COMMENT ON COLUMN infra_api_error_log.exception_message IS '쳣µϢ + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; +COMMENT ON COLUMN infra_api_error_log.exception_root_cause_message IS '쳣µĸϢ + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}'; +COMMENT ON COLUMN infra_api_error_log.exception_stack_trace IS '쳣ջ켣 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}'; +COMMENT ON COLUMN infra_api_error_log.exception_class_name IS '쳣ȫ + * + * {@link StackTraceElement#getClassName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_file_name IS '쳣ļ + * + * {@link StackTraceElement#getFileName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_method_name IS '쳣ķ + * + * {@link StackTraceElement#getMethodName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_line_number IS '쳣ķ + * + * {@link StackTraceElement#getLineNumber()}'; +COMMENT ON COLUMN infra_api_error_log.process_status IS '״̬'; +COMMENT ON COLUMN infra_api_error_log.process_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_error_log.process_user_id IS 'û'; +COMMENT ON COLUMN infra_api_error_log.creator IS ''; +COMMENT ON COLUMN infra_api_error_log.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_error_log.updater IS ''; +COMMENT ON COLUMN infra_api_error_log.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_api_error_log.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN infra_api_error_log.tenant_id IS '⻧'; +COMMENT ON TABLE infra_api_error_log IS 'ϵͳ쳣־'; + +-- ---------------------------- +-- Table structure for infra_codegen_column +-- ---------------------------- +CREATE TABLE infra_codegen_column ( - "ID" BIGINT IDENTITY(275,1) NOT NULL, - "MODEL_ID" VARCHAR(64) NOT NULL, - "PROCESS_DEFINITION_ID" VARCHAR(64) NOT NULL, - "TASK_DEFINITION_KEY" VARCHAR(64) NOT NULL, - "TYPE" TINYINT NOT NULL, - "OPTIONS" VARCHAR(1024) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + table_id bigint NOT NULL, + column_name varchar(200) NOT NULL, + data_type varchar(100) NOT NULL, + column_comment varchar(500) NOT NULL, + nullable bit NOT NULL, + primary_key bit NOT NULL, + ordinal_position int NOT NULL, + java_type varchar(32) NOT NULL, + java_field varchar(64) NOT NULL, + dict_type varchar(200) DEFAULT '' NULL, + example varchar(64) DEFAULT NULL NULL, + create_operation bit NOT NULL, + update_operation bit NOT NULL, + list_operation bit NOT NULL, + list_operation_condition varchar(32) DEFAULT '=' NOT NULL, + list_operation_result bit NOT NULL, + html_type varchar(32) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_TASK_EXT" + +COMMENT ON COLUMN infra_codegen_column.id IS ''; +COMMENT ON COLUMN infra_codegen_column.table_id IS ''; +COMMENT ON COLUMN infra_codegen_column.column_name IS 'ֶ'; +COMMENT ON COLUMN infra_codegen_column.data_type IS 'ֶ'; +COMMENT ON COLUMN infra_codegen_column.column_comment IS 'ֶ'; +COMMENT ON COLUMN infra_codegen_column.nullable IS 'ǷΪ'; +COMMENT ON COLUMN infra_codegen_column.primary_key IS 'Ƿ'; +COMMENT ON COLUMN infra_codegen_column.ordinal_position IS ''; +COMMENT ON COLUMN infra_codegen_column.java_type IS 'Java '; +COMMENT ON COLUMN infra_codegen_column.java_field IS 'Java '; +COMMENT ON COLUMN infra_codegen_column.dict_type IS 'ֵ'; +COMMENT ON COLUMN infra_codegen_column.example IS 'ʾ'; +COMMENT ON COLUMN infra_codegen_column.create_operation IS 'ǷΪ Create ֶ'; +COMMENT ON COLUMN infra_codegen_column.update_operation IS 'ǷΪ Update ²ֶ'; +COMMENT ON COLUMN infra_codegen_column.list_operation IS 'ǷΪ List ѯֶ'; +COMMENT ON COLUMN infra_codegen_column.list_operation_condition IS 'List ѯ'; +COMMENT ON COLUMN infra_codegen_column.list_operation_result IS 'ǷΪ List ѯķֶ'; +COMMENT ON COLUMN infra_codegen_column.html_type IS 'ʾ'; +COMMENT ON COLUMN infra_codegen_column.creator IS ''; +COMMENT ON COLUMN infra_codegen_column.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_codegen_column.updater IS ''; +COMMENT ON COLUMN infra_codegen_column.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_codegen_column.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_codegen_column IS 'ɱֶζ'; + +-- ---------------------------- +-- Table structure for infra_codegen_table +-- ---------------------------- +CREATE TABLE infra_codegen_table ( - "ID" BIGINT IDENTITY(351,1) NOT NULL, - "ASSIGNEE_USER_ID" BIGINT NULL, - "NAME" VARCHAR(64) NULL, - "TASK_ID" VARCHAR(64) NOT NULL, - "RESULT" TINYINT NOT NULL, - "REASON" VARCHAR(255) NULL, - "END_TIME" TIMESTAMP(0) NULL, - "PROCESS_INSTANCE_ID" VARCHAR(64) NOT NULL, - "PROCESS_DEFINITION_ID" VARCHAR(64) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + data_source_config_id bigint NOT NULL, + scene smallint DEFAULT 1 NOT NULL, + table_name varchar(200) DEFAULT '' NULL, + table_comment varchar(500) DEFAULT '' NULL, + remark varchar(500) DEFAULT NULL NULL, + module_name varchar(30) NOT NULL, + business_name varchar(30) NOT NULL, + class_name varchar(100) DEFAULT '' NULL, + class_comment varchar(50) NOT NULL, + author varchar(50) NOT NULL, + template_type smallint DEFAULT 1 NOT NULL, + front_type smallint NOT NULL, + parent_menu_id bigint DEFAULT NULL NULL, + master_table_id bigint DEFAULT NULL NULL, + sub_join_column_id bigint DEFAULT NULL NULL, + sub_join_many bit DEFAULT NULL NULL, + tree_parent_column_id bigint DEFAULT NULL NULL, + tree_name_column_id bigint DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."BPM_USER_GROUP" + +COMMENT ON COLUMN infra_codegen_table.id IS ''; +COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS 'Դõı'; +COMMENT ON COLUMN infra_codegen_table.scene IS 'ɳ'; +COMMENT ON COLUMN infra_codegen_table.table_name IS ''; +COMMENT ON COLUMN infra_codegen_table.table_comment IS ''; +COMMENT ON COLUMN infra_codegen_table.remark IS 'ע'; +COMMENT ON COLUMN infra_codegen_table.module_name IS 'ģ'; +COMMENT ON COLUMN infra_codegen_table.business_name IS 'ҵ'; +COMMENT ON COLUMN infra_codegen_table.class_name IS ''; +COMMENT ON COLUMN infra_codegen_table.class_comment IS ''; +COMMENT ON COLUMN infra_codegen_table.author IS ''; +COMMENT ON COLUMN infra_codegen_table.template_type IS 'ģ'; +COMMENT ON COLUMN infra_codegen_table.front_type IS 'ǰ'; +COMMENT ON COLUMN infra_codegen_table.parent_menu_id IS '˵'; +COMMENT ON COLUMN infra_codegen_table.master_table_id IS 'ı'; +COMMENT ON COLUMN infra_codegen_table.sub_join_column_id IS 'ӱֶα'; +COMMENT ON COLUMN infra_codegen_table.sub_join_many IS 'ӱǷһԶ'; +COMMENT ON COLUMN infra_codegen_table.tree_parent_column_id IS 'ĸֶα'; +COMMENT ON COLUMN infra_codegen_table.tree_name_column_id IS 'ֶα'; +COMMENT ON COLUMN infra_codegen_table.creator IS ''; +COMMENT ON COLUMN infra_codegen_table.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_codegen_table.updater IS ''; +COMMENT ON COLUMN infra_codegen_table.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_codegen_table.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_codegen_table IS 'ɱ'; + +-- ---------------------------- +-- Table structure for infra_config +-- ---------------------------- +CREATE TABLE infra_config ( - "ID" BIGINT IDENTITY(113,1) NOT NULL, - "NAME" VARCHAR(30) DEFAULT '' - NOT NULL, - "DESCRIPTION" VARCHAR(255) DEFAULT '' - NOT NULL, - "MEMBER_USER_IDS" VARCHAR(1024) DEFAULT '0' - NOT NULL, - "STATUS" TINYINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + category varchar(50) NOT NULL, + type smallint NOT NULL, + name varchar(100) DEFAULT '' NULL, + config_key varchar(100) DEFAULT '' NULL, + value varchar(500) DEFAULT '' NULL, + visible bit NOT NULL, + remark varchar(500) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG" + +COMMENT ON COLUMN infra_config.id IS ''; +COMMENT ON COLUMN infra_config.category IS ''; +COMMENT ON COLUMN infra_config.type IS ''; +COMMENT ON COLUMN infra_config.name IS ''; +COMMENT ON COLUMN infra_config.config_key IS ''; +COMMENT ON COLUMN infra_config.value IS 'ֵ'; +COMMENT ON COLUMN infra_config.visible IS 'Ƿɼ'; +COMMENT ON COLUMN infra_config.remark IS 'ע'; +COMMENT ON COLUMN infra_config.creator IS ''; +COMMENT ON COLUMN infra_config.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_config.updater IS ''; +COMMENT ON COLUMN infra_config.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_config.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_config IS 'ñ'; + +-- ---------------------------- +-- Records of infra_config +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT infra_config ON; +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 'biz', 1, 'û-˺ųʼ', 'sys.user.init-password', '123456', '0', 'ʼ 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-04-03 17:22:28', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, 'url', 2, 'MySQL صĵַ', 'url.druid', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:33:38', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 'url', 2, 'SkyWalking صĵַ', 'url.skywalking', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:57:03', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 'url', 2, 'Spring Boot Admin صĵַ', 'url.spring-boot-admin', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:52:07', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (10, 'url', 2, 'Swagger ӿĵĵַ', 'url.swagger', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:59:00', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (11, 'ui', 2, 'Ѷͼ key', 'tencent.lbs.key', 'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E', '1', 'Ѷͼ key', '1', '2023-06-03 19:16:27', '1', '2023-06-03 19:16:27', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 'test2', 2, 'test3', 'test4', 'test5', '1', 'test6', '1', '2023-12-03 09:55:16', '1', '2023-12-03 09:55:27', '0'); +COMMIT; +SET IDENTITY_INSERT infra_config OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for infra_data_source_config +-- ---------------------------- +CREATE TABLE infra_data_source_config ( - "ID" BIGINT IDENTITY(35832,1) NOT NULL, - "TRACE_ID" VARCHAR(64) DEFAULT '' - NOT NULL, - "USER_ID" BIGINT DEFAULT 0 - NOT NULL, - "USER_TYPE" TINYINT DEFAULT 0 - NOT NULL, - "APPLICATION_NAME" VARCHAR(50) NOT NULL, - "REQUEST_METHOD" VARCHAR(16) DEFAULT '' - NOT NULL, - "REQUEST_URL" VARCHAR(255) DEFAULT '' - NOT NULL, - "REQUEST_PARAMS" VARCHAR(8000) DEFAULT '' - NOT NULL, - "USER_IP" VARCHAR(50) NOT NULL, - "USER_AGENT" VARCHAR(512) NOT NULL, - "BEGIN_TIME" TIMESTAMP(0) NOT NULL, - "END_TIME" TIMESTAMP(0) NOT NULL, - "DURATION" INT NOT NULL, - "RESULT_CODE" INT DEFAULT 0 - NOT NULL, - "RESULT_MSG" VARCHAR(512) DEFAULT '' - NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(100) DEFAULT '' NULL, + url varchar(1024) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) DEFAULT '' NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG" + +COMMENT ON COLUMN infra_data_source_config.id IS ''; +COMMENT ON COLUMN infra_data_source_config.name IS ''; +COMMENT ON COLUMN infra_data_source_config.url IS 'Դ'; +COMMENT ON COLUMN infra_data_source_config.username IS 'û'; +COMMENT ON COLUMN infra_data_source_config.password IS ''; +COMMENT ON COLUMN infra_data_source_config.creator IS ''; +COMMENT ON COLUMN infra_data_source_config.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_data_source_config.updater IS ''; +COMMENT ON COLUMN infra_data_source_config.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_data_source_config.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_data_source_config IS 'Դñ'; + +-- ---------------------------- +-- Table structure for infra_file +-- ---------------------------- +CREATE TABLE infra_file ( - "ID" INT IDENTITY(1110,1) NOT NULL, - "TRACE_ID" VARCHAR(64) NOT NULL, - "USER_ID" INT DEFAULT 0 - NOT NULL, - "USER_TYPE" TINYINT DEFAULT 0 - NOT NULL, - "APPLICATION_NAME" VARCHAR(50) NOT NULL, - "REQUEST_METHOD" VARCHAR(16) NOT NULL, - "REQUEST_URL" VARCHAR(255) NOT NULL, - "REQUEST_PARAMS" VARCHAR(8000) NOT NULL, - "USER_IP" VARCHAR(50) NOT NULL, - "USER_AGENT" VARCHAR(512) NOT NULL, - "EXCEPTION_TIME" TIMESTAMP(0) NOT NULL, - "EXCEPTION_NAME" VARCHAR(128) DEFAULT '' - NOT NULL, - "EXCEPTION_MESSAGE" TEXT NOT NULL, - "EXCEPTION_ROOT_CAUSE_MESSAGE" TEXT NOT NULL, - "EXCEPTION_STACK_TRACE" TEXT NOT NULL, - "EXCEPTION_CLASS_NAME" VARCHAR(512) NOT NULL, - "EXCEPTION_FILE_NAME" VARCHAR(512) NOT NULL, - "EXCEPTION_METHOD_NAME" VARCHAR(512) NOT NULL, - "EXCEPTION_LINE_NUMBER" INT NOT NULL, - "PROCESS_STATUS" TINYINT NOT NULL, - "PROCESS_TIME" TIMESTAMP(0) NULL, - "PROCESS_USER_ID" INT DEFAULT 0 - NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + config_id bigint DEFAULT NULL NULL, + name varchar(256) DEFAULT NULL NULL, + path varchar(512) NOT NULL, + url varchar(1024) NOT NULL, + type varchar(128) DEFAULT NULL NULL, + size int NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" + +COMMENT ON COLUMN infra_file.id IS 'ļ'; +COMMENT ON COLUMN infra_file.config_id IS 'ñ'; +COMMENT ON COLUMN infra_file.name IS 'ļ'; +COMMENT ON COLUMN infra_file.path IS 'ļ·'; +COMMENT ON COLUMN infra_file.url IS 'ļ URL'; +COMMENT ON COLUMN infra_file.type IS 'ļ'; +COMMENT ON COLUMN infra_file.size IS 'ļС'; +COMMENT ON COLUMN infra_file.creator IS ''; +COMMENT ON COLUMN infra_file.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_file.updater IS ''; +COMMENT ON COLUMN infra_file.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_file.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_file IS 'ļ'; + +-- ---------------------------- +-- Table structure for infra_file_config +-- ---------------------------- +CREATE TABLE infra_file_config ( - "ID" BIGINT IDENTITY(1688,1) NOT NULL, - "TABLE_ID" BIGINT NOT NULL, - "COLUMN_NAME" VARCHAR(200) NOT NULL, - "DATA_TYPE" VARCHAR(100) NOT NULL, - "COLUMN_COMMENT" VARCHAR(500) NOT NULL, - "NULLABLE" BIT NOT NULL, - "PRIMARY_KEY" BIT NOT NULL, - "ORDINAL_POSITION" INT NOT NULL, - "JAVA_TYPE" VARCHAR(32) NOT NULL, - "JAVA_FIELD" VARCHAR(64) NOT NULL, - "DICT_TYPE" VARCHAR(200) DEFAULT '' - NULL, - "EXAMPLE" VARCHAR(64) NULL, - "CREATE_OPERATION" BIT NOT NULL, - "UPDATE_OPERATION" BIT NOT NULL, - "LIST_OPERATION" BIT NOT NULL, - "LIST_OPERATION_CONDITION" VARCHAR(32) DEFAULT '=' - NOT NULL, - "LIST_OPERATION_RESULT" BIT NOT NULL, - "HTML_TYPE" VARCHAR(32) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(63) NOT NULL, + storage smallint NOT NULL, + remark varchar(255) DEFAULT NULL NULL, + master bit NOT NULL, + config varchar(4096) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE" + +COMMENT ON COLUMN infra_file_config.id IS ''; +COMMENT ON COLUMN infra_file_config.name IS ''; +COMMENT ON COLUMN infra_file_config.storage IS '洢'; +COMMENT ON COLUMN infra_file_config.remark IS 'ע'; +COMMENT ON COLUMN infra_file_config.master IS 'ǷΪ'; +COMMENT ON COLUMN infra_file_config.config IS '洢'; +COMMENT ON COLUMN infra_file_config.creator IS ''; +COMMENT ON COLUMN infra_file_config.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_file_config.updater IS ''; +COMMENT ON COLUMN infra_file_config.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_file_config.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_file_config IS 'ļñ'; + +-- ---------------------------- +-- Records of infra_file_config +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT infra_file_config ON; +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, 'ݿ', 1, 'ݿ', '0', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', '2022-03-15 23:56:24', '1', '2024-02-28 22:54:07', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, 'ţ洢', 20, '', '1', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', '1', '2024-01-13 22:11:12', '1', '2024-04-03 19:38:34', '0'); +COMMIT; +SET IDENTITY_INSERT infra_file_config OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for infra_file_content +-- ---------------------------- +CREATE TABLE infra_file_content ( - "ID" BIGINT IDENTITY(131,1) NOT NULL, - "DATA_SOURCE_CONFIG_ID" BIGINT NOT NULL, - "SCENE" TINYINT DEFAULT 1 - NOT NULL, - "TABLE_NAME" VARCHAR(200) DEFAULT '' - NOT NULL, - "TABLE_COMMENT" VARCHAR(500) DEFAULT '' - NOT NULL, - "REMARK" VARCHAR(500) NULL, - "MODULE_NAME" VARCHAR(30) NOT NULL, - "BUSINESS_NAME" VARCHAR(30) NOT NULL, - "CLASS_NAME" VARCHAR(100) DEFAULT '' - NOT NULL, - "CLASS_COMMENT" VARCHAR(50) NOT NULL, - "AUTHOR" VARCHAR(50) NOT NULL, - "TEMPLATE_TYPE" TINYINT DEFAULT 1 - NOT NULL, - "FRONT_TYPE" TINYINT NOT NULL, - "PARENT_MENU_ID" BIGINT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + config_id bigint NOT NULL, + path varchar(512) NOT NULL, + content varchar(10240) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_CONFIG" + +COMMENT ON COLUMN infra_file_content.id IS ''; +COMMENT ON COLUMN infra_file_content.config_id IS 'ñ'; +COMMENT ON COLUMN infra_file_content.path IS 'ļ·'; +COMMENT ON COLUMN infra_file_content.content IS 'ļ'; +COMMENT ON COLUMN infra_file_content.creator IS ''; +COMMENT ON COLUMN infra_file_content.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_file_content.updater IS ''; +COMMENT ON COLUMN infra_file_content.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_file_content.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_file_content IS 'ļ'; + +-- ---------------------------- +-- Table structure for infra_job +-- ---------------------------- +CREATE TABLE infra_job ( - "ID" INT IDENTITY(11,1) NOT NULL, - "CATEGORY" VARCHAR(50) NOT NULL, - "TYPE" TINYINT NOT NULL, - "NAME" VARCHAR(100) DEFAULT '' - NOT NULL, - "CONFIG_KEY" VARCHAR(100) DEFAULT '' - NOT NULL, - "VALUE" VARCHAR(500) DEFAULT '' - NOT NULL, - "VISIBLE" BIT NOT NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(32) NOT NULL, + status smallint NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) DEFAULT NULL NULL, + cron_expression varchar(32) NOT NULL, + retry_count int DEFAULT 0 NOT NULL, + retry_interval int DEFAULT 0 NOT NULL, + monitor_timeout int DEFAULT 0 NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG" + +COMMENT ON COLUMN infra_job.id IS ''; +COMMENT ON COLUMN infra_job.name IS ''; +COMMENT ON COLUMN infra_job.status IS '״̬'; +COMMENT ON COLUMN infra_job.handler_name IS ''; +COMMENT ON COLUMN infra_job.handler_param IS 'IJ'; +COMMENT ON COLUMN infra_job.cron_expression IS 'CRON ʽ'; +COMMENT ON COLUMN infra_job.retry_count IS 'Դ'; +COMMENT ON COLUMN infra_job.retry_interval IS 'Լ'; +COMMENT ON COLUMN infra_job.monitor_timeout IS 'سʱʱ'; +COMMENT ON COLUMN infra_job.creator IS ''; +COMMENT ON COLUMN infra_job.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_job.updater IS ''; +COMMENT ON COLUMN infra_job.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_job.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_job IS 'ʱ'; + +-- ---------------------------- +-- Records of infra_job +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT infra_job ON; +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, '֧֪ͨ Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', '2021-10-27 08:34:42', '1', '2023-07-09 20:51:41', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, '֧ͬ Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (18, '֧ Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (19, '˿ͬ Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-23 21:03:44', '1', '2023-07-23 21:09:00', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (21, '׶Զ Job', 2, 'tradeOrderAutoCancelJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-25 23:43:26', '1', '2023-09-26 19:23:30', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (22, '׶Զջ Job', 2, 'tradeOrderAutoReceiveJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 19:23:53', '1', '2023-09-26 23:38:08', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (23, '׶Զ Job', 2, 'tradeOrderAutoCommentJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 23:38:29', '1', '2023-09-27 11:03:10', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (24, 'Ӷⶳ Job', 2, 'brokerageRecordUnfreezeJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-28 22:01:46', '1', '2023-09-28 22:01:56', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (25, '־ Job', 2, 'accessLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 10:59:41', '1', '2023-10-03 11:01:10', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (26, '־ Job', 2, 'errorLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:00:43', '1', '2023-10-03 11:01:12', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (27, '־ Job', 2, 'jobLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:01:33', '1', '2023-10-03 11:01:42', '0'); +COMMIT; +SET IDENTITY_INSERT infra_job OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for infra_job_log +-- ---------------------------- +CREATE TABLE infra_job_log ( - "ID" BIGINT IDENTITY(13,1) NOT NULL, - "NAME" VARCHAR(100) DEFAULT '' - NOT NULL, - "URL" VARCHAR(1024) NOT NULL, - "USERNAME" VARCHAR(255) NOT NULL, - "PASSWORD" VARCHAR(255) DEFAULT '' - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + job_id bigint NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) DEFAULT NULL NULL, + execute_index smallint DEFAULT 1 NOT NULL, + begin_time datetime NOT NULL, + end_time datetime DEFAULT NULL NULL, + duration int DEFAULT NULL NULL, + status smallint NOT NULL, + result varchar(4000) DEFAULT '' NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_FILE" + +COMMENT ON COLUMN infra_job_log.id IS '־'; +COMMENT ON COLUMN infra_job_log.job_id IS ''; +COMMENT ON COLUMN infra_job_log.handler_name IS ''; +COMMENT ON COLUMN infra_job_log.handler_param IS 'IJ'; +COMMENT ON COLUMN infra_job_log.execute_index IS 'ڼִ'; +COMMENT ON COLUMN infra_job_log.begin_time IS 'ʼִʱ'; +COMMENT ON COLUMN infra_job_log.end_time IS 'ִʱ'; +COMMENT ON COLUMN infra_job_log.duration IS 'ִʱ'; +COMMENT ON COLUMN infra_job_log.status IS '״̬'; +COMMENT ON COLUMN infra_job_log.result IS ''; +COMMENT ON COLUMN infra_job_log.creator IS ''; +COMMENT ON COLUMN infra_job_log.create_time IS 'ʱ'; +COMMENT ON COLUMN infra_job_log.updater IS ''; +COMMENT ON COLUMN infra_job_log.update_time IS 'ʱ'; +COMMENT ON COLUMN infra_job_log.deleted IS 'Ƿɾ'; +COMMENT ON TABLE infra_job_log IS 'ʱ־'; + +-- ---------------------------- +-- Table structure for system_dept +-- ---------------------------- +CREATE TABLE system_dept ( - "ID" BIGINT IDENTITY(912,1) NOT NULL, - "CONFIG_ID" BIGINT NULL, - "NAME" VARCHAR(256) NULL, - "PATH" VARCHAR(512) NOT NULL, - "URL" VARCHAR(1024) NOT NULL, - "TYPE" VARCHAR(128) NULL, - "SIZE" INT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(30) DEFAULT '' NULL, + parent_id bigint DEFAULT 0 NOT NULL, + sort int DEFAULT 0 NOT NULL, + leader_user_id bigint DEFAULT NULL NULL, + phone varchar(11) DEFAULT NULL NULL, + email varchar(50) DEFAULT NULL NULL, + status smallint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG" + +COMMENT ON COLUMN system_dept.id IS 'id'; +COMMENT ON COLUMN system_dept.name IS ''; +COMMENT ON COLUMN system_dept.parent_id IS 'id'; +COMMENT ON COLUMN system_dept.sort IS 'ʾ˳'; +COMMENT ON COLUMN system_dept.leader_user_id IS ''; +COMMENT ON COLUMN system_dept.phone IS 'ϵ绰'; +COMMENT ON COLUMN system_dept.email IS ''; +COMMENT ON COLUMN system_dept.status IS '״̬0 1ͣã'; +COMMENT ON COLUMN system_dept.creator IS ''; +COMMENT ON COLUMN system_dept.create_time IS 'ʱ'; +COMMENT ON COLUMN system_dept.updater IS ''; +COMMENT ON COLUMN system_dept.update_time IS 'ʱ'; +COMMENT ON COLUMN system_dept.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_dept.tenant_id IS '⻧'; +COMMENT ON TABLE system_dept IS 'ű'; + +-- ---------------------------- +-- Records of system_dept +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_dept ON; +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'Դ', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-11-14 23:30:36', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, 'ܹ˾', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:53:35', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (102, 'ɳֹ˾', 100, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:40', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'з', 101, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2024-03-24 20:56:04', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'г', 101, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:38', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (105, 'Բ', 101, 3, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2022-05-16 20:25:15', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (106, '', 101, 4, 103, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '103', '2022-01-15 21:32:22', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, 'ά', 101, 5, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:28:22', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, 'г', 102, 1, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2022-02-16 08:35:45', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '', 102, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:29', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '²', 0, 1, NULL, NULL, NULL, 0, '110', '2022-02-23 20:46:30', '110', '2022-02-23 20:46:30', '0', 121); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '', 0, 1, NULL, NULL, NULL, 0, '113', '2022-03-07 21:44:50', '113', '2022-03-07 21:44:50', '0', 122); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 'Ʒ', 101, 100, 1, NULL, NULL, 1, '1', '2023-12-02 09:45:13', '1', '2023-12-02 09:45:31', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'ֲ֧', 102, 3, 104, NULL, NULL, 1, '1', '2023-12-02 09:47:38', '1', '2023-12-02 09:47:38', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_dept OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_dict_data +-- ---------------------------- +CREATE TABLE system_dict_data ( - "ID" BIGINT IDENTITY(18,1) NOT NULL, - "NAME" VARCHAR(63) NOT NULL, - "STORAGE" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "MASTER" BIT NOT NULL, - "CONFIG" VARCHAR(4096) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + sort int DEFAULT 0 NOT NULL, + label varchar(100) DEFAULT '' NULL, + value varchar(100) DEFAULT '' NULL, + dict_type varchar(100) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + color_type varchar(100) DEFAULT '' NULL, + css_class varchar(100) DEFAULT '' NULL, + remark varchar(500) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT" + +COMMENT ON COLUMN system_dict_data.id IS 'ֵ'; +COMMENT ON COLUMN system_dict_data.sort IS 'ֵ'; +COMMENT ON COLUMN system_dict_data.label IS 'ֵǩ'; +COMMENT ON COLUMN system_dict_data.value IS 'ֵֵ'; +COMMENT ON COLUMN system_dict_data.dict_type IS 'ֵ'; +COMMENT ON COLUMN system_dict_data.status IS '״̬0 1ͣã'; +COMMENT ON COLUMN system_dict_data.color_type IS 'ɫ'; +COMMENT ON COLUMN system_dict_data.css_class IS 'css ʽ'; +COMMENT ON COLUMN system_dict_data.remark IS 'ע'; +COMMENT ON COLUMN system_dict_data.creator IS ''; +COMMENT ON COLUMN system_dict_data.create_time IS 'ʱ'; +COMMENT ON COLUMN system_dict_data.updater IS ''; +COMMENT ON COLUMN system_dict_data.update_time IS 'ʱ'; +COMMENT ON COLUMN system_dict_data.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_dict_data IS 'ֵݱ'; + +-- ---------------------------- +-- Records of system_dict_data +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_dict_data ON; +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, '', '1', 'system_user_sex', 0, 'default', 'A', 'Ա', 'admin', '2021-01-05 17:03:48', '1', '2022-03-29 00:14:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, 'Ů', '2', 'system_user_sex', 0, 'success', '', 'ԱŮ', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 23:30:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 1, '', '1', 'infra_job_status', 0, 'success', '', '״̬', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:33:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 2, 'ͣ', '2', 'infra_job_status', 0, 'danger', '', 'ͣ״̬', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:33:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 1, 'ϵͳ', '1', 'infra_config_type', 0, 'danger', '', ' - ϵͳ', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:06:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (13, 2, 'Զ', '2', 'infra_config_type', 0, 'primary', '', ' - Զ', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:06:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (14, 1, '֪ͨ', '1', 'system_notice_type', 0, 'success', '', '֪ͨ', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:05:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (15, 2, '', '2', 'system_notice_type', 0, 'info', '', '', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:06:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (16, 0, '', '0', 'infra_operate_type', 0, 'default', '', '', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (17, 1, 'ѯ', '1', 'infra_operate_type', 0, 'info', '', 'ѯ', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (18, 2, '', '2', 'infra_operate_type', 0, 'primary', '', '', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (19, 3, '޸', '3', 'infra_operate_type', 0, 'warning', '', '޸IJ', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (20, 4, 'ɾ', '4', 'infra_operate_type', 0, 'danger', '', 'ɾ', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (22, 5, '', '5', 'infra_operate_type', 0, 'default', '', '', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (23, 6, '', '6', 'infra_operate_type', 0, 'default', '', '', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (27, 1, '', '0', 'common_status', 0, 'primary', '', '״̬', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (28, 2, 'ر', '1', 'common_status', 0, 'info', '', 'ر״̬', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (29, 1, 'Ŀ¼', '1', 'system_menu_type', 0, '', '', 'Ŀ¼', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (30, 2, '˵', '2', 'system_menu_type', 0, '', '', '˵', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (31, 3, 'ť', '3', 'system_menu_type', 0, '', '', 'ť', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (32, 1, '', '1', 'system_role_type', 0, 'danger', '', 'ýɫ', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:02:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (33, 2, 'Զ', '2', 'system_role_type', 0, 'primary', '', 'Զɫ', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:02:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (34, 1, 'ȫȨ', '1', 'system_data_scope', 0, '', '', 'ȫȨ', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (35, 2, 'ָȨ', '2', 'system_data_scope', 0, '', '', 'ָȨ', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (36, 3, 'Ȩ', '3', 'system_data_scope', 0, '', '', 'Ȩ', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (37, 4, 'żȨ', '4', 'system_data_scope', 0, '', '', 'żȨ', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (38, 5, 'Ȩ', '5', 'system_data_scope', 0, '', '', 'Ȩ', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (39, 0, 'ɹ', '0', 'system_login_result', 0, 'success', '', '½ - ɹ', '', '2021-01-18 06:17:36', '1', '2022-02-16 13:23:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (40, 10, '˺Ż벻ȷ', '10', 'system_login_result', 0, 'primary', '', '½ - ˺Ż벻ȷ', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (41, 20, 'û', '20', 'system_login_result', 0, 'warning', '', '½ - û', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:23:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (42, 30, '֤벻', '30', 'system_login_result', 0, 'info', '', '½ - ֤벻', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (43, 31, '֤벻ȷ', '31', 'system_login_result', 0, 'info', '', '½ - ֤벻ȷ', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (44, 100, 'δ֪쳣', '100', 'system_login_result', 0, 'danger', '', '½ - δ֪쳣', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (45, 1, '', 'true', 'infra_boolean_string', 0, 'danger', '', 'Boolean Ƿ - ', '', '2021-01-19 03:20:55', '1', '2022-03-15 23:01:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (46, 1, '', 'false', 'infra_boolean_string', 0, 'info', '', 'Boolean Ƿ - ', '', '2021-01-19 03:20:55', '1', '2022-03-15 23:09:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (50, 1, 'ɾIJ飩', '1', 'infra_codegen_template_type', 0, '', '', NULL, '', '2021-02-05 07:09:06', '', '2022-03-10 16:33:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (51, 2, 'ɾIJ飩', '2', 'infra_codegen_template_type', 0, '', '', NULL, '', '2021-02-05 07:14:46', '', '2022-03-10 16:33:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (53, 0, 'ʼ', '0', 'infra_job_status', 0, 'primary', '', NULL, '', '2021-02-07 07:46:49', '1', '2022-02-16 19:33:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (57, 0, '', '0', 'infra_job_log_status', 0, 'primary', '', 'RUNNING', '', '2021-02-08 10:04:24', '1', '2022-02-16 19:07:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (58, 1, 'ɹ', '1', 'infra_job_log_status', 0, 'success', '', NULL, '', '2021-02-08 10:06:57', '1', '2022-02-16 19:07:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (59, 2, 'ʧ', '2', 'infra_job_log_status', 0, 'warning', '', 'ʧ', '', '2021-02-08 10:07:38', '1', '2022-02-16 19:07:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (60, 1, 'Ա', '1', 'user_type', 0, 'primary', '', NULL, '', '2021-02-26 00:16:27', '1', '2022-02-16 10:22:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (61, 2, 'Ա', '2', 'user_type', 0, 'success', '', NULL, '', '2021-02-26 00:16:34', '1', '2022-02-16 10:22:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (62, 0, 'δ', '0', 'infra_api_error_log_process_status', 0, 'primary', '', NULL, '', '2021-02-26 07:07:19', '1', '2022-02-16 20:14:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (63, 1, 'Ѵ', '1', 'infra_api_error_log_process_status', 0, 'success', '', NULL, '', '2021-02-26 07:07:26', '1', '2022-02-16 20:14:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (64, 2, 'Ѻ', '2', 'infra_api_error_log_process_status', 0, 'danger', '', NULL, '', '2021-02-26 07:07:34', '1', '2022-02-16 20:14:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (66, 2, '', 'ALIYUN', 'system_sms_channel_code', 0, 'primary', '', NULL, '1', '2021-04-05 01:05:26', '1', '2022-02-16 10:09:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (67, 1, '֤', '1', 'system_sms_template_type', 0, 'warning', '', NULL, '1', '2021-04-05 21:50:57', '1', '2022-02-16 12:48:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (68, 2, '֪ͨ', '2', 'system_sms_template_type', 0, 'primary', '', NULL, '1', '2021-04-05 21:51:08', '1', '2022-02-16 12:48:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (69, 0, 'Ӫ', '3', 'system_sms_template_type', 0, 'danger', '', NULL, '1', '2021-04-05 21:51:15', '1', '2022-02-16 12:48:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (70, 0, 'ʼ', '0', 'system_sms_send_status', 0, 'primary', '', NULL, '1', '2021-04-11 20:18:33', '1', '2022-02-16 10:26:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (71, 1, 'ͳɹ', '10', 'system_sms_send_status', 0, 'success', '', NULL, '1', '2021-04-11 20:18:43', '1', '2022-02-16 10:25:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (72, 2, 'ʧ', '20', 'system_sms_send_status', 0, 'danger', '', NULL, '1', '2021-04-11 20:18:49', '1', '2022-02-16 10:26:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (73, 3, '', '30', 'system_sms_send_status', 0, 'info', '', NULL, '1', '2021-04-11 20:19:44', '1', '2022-02-16 10:26:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (74, 0, 'ȴ', '0', 'system_sms_receive_status', 0, 'primary', '', NULL, '1', '2021-04-11 20:27:43', '1', '2022-02-16 10:28:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (75, 1, 'ճɹ', '10', 'system_sms_receive_status', 0, 'success', '', NULL, '1', '2021-04-11 20:29:25', '1', '2022-02-16 10:28:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (76, 2, 'ʧ', '20', 'system_sms_receive_status', 0, 'danger', '', NULL, '1', '2021-04-11 20:29:31', '1', '2022-02-16 10:28:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (77, 0, '()', 'DEBUG_DING_TALK', 'system_sms_channel_code', 0, 'info', '', NULL, '1', '2021-04-13 00:20:37', '1', '2022-02-16 10:10:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (80, 100, '˺ŵ¼', '100', 'system_login_type', 0, 'primary', '', '˺ŵ¼', '1', '2021-10-06 00:52:02', '1', '2022-02-16 13:11:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (81, 101, '罻¼', '101', 'system_login_type', 0, 'info', '', '罻¼', '1', '2021-10-06 00:52:17', '1', '2022-02-16 13:11:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (83, 200, 'dz', '200', 'system_login_type', 0, 'primary', '', 'dz', '1', '2021-10-06 00:52:58', '1', '2022-02-16 13:11:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (85, 202, 'ǿƵdz', '202', 'system_login_type', 0, 'danger', '', 'ǿ˳', '1', '2021-10-06 00:53:41', '1', '2022-02-16 13:11:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (86, 0, '', '1', 'bpm_oa_leave_type', 0, 'primary', '', NULL, '1', '2021-09-21 22:35:28', '1', '2022-02-16 10:00:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (87, 1, '¼', '2', 'bpm_oa_leave_type', 0, 'info', '', NULL, '1', '2021-09-21 22:36:11', '1', '2022-02-16 10:00:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (88, 2, '', '3', 'bpm_oa_leave_type', 0, 'warning', '', NULL, '1', '2021-09-21 22:36:38', '1', '2022-02-16 10:00:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (113, 1, '΢Źں֧', 'wx_pub', 'pay_channel_code', 0, 'success', '', '΢Źں֧', '1', '2021-12-03 10:40:24', '1', '2023-07-19 20:08:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (114, 2, '΢С֧', 'wx_lite', 'pay_channel_code', 0, 'success', '', '΢С֧', '1', '2021-12-03 10:41:06', '1', '2023-07-19 20:08:50', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (115, 3, '΢ App ֧', 'wx_app', 'pay_channel_code', 0, 'success', '', '΢ App ֧', '1', '2021-12-03 10:41:20', '1', '2023-07-19 20:08:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (116, 10, '֧ PC վ֧', 'alipay_pc', 'pay_channel_code', 0, 'primary', '', '֧ PC վ֧', '1', '2021-12-03 10:42:09', '1', '2023-07-19 20:09:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (117, 11, '֧ Wap վ֧', 'alipay_wap', 'pay_channel_code', 0, 'primary', '', '֧ Wap վ֧', '1', '2021-12-03 10:42:26', '1', '2023-07-19 20:09:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (118, 12, '֧ App ֧', 'alipay_app', 'pay_channel_code', 0, 'primary', '', '֧ App ֧', '1', '2021-12-03 10:42:55', '1', '2023-07-19 20:09:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (119, 14, '֧ɨ֧', 'alipay_qr', 'pay_channel_code', 0, 'primary', '', '֧ɨ֧', '1', '2021-12-03 10:43:10', '1', '2023-07-19 20:09:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (120, 10, '֪ͨɹ', '10', 'pay_notify_status', 0, 'success', '', '֪ͨɹ', '1', '2021-12-03 11:02:41', '1', '2023-07-19 10:08:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (121, 20, '֪ͨʧ', '20', 'pay_notify_status', 0, 'danger', '', '֪ͨʧ', '1', '2021-12-03 11:02:59', '1', '2023-07-19 10:08:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (122, 0, 'ȴ֪ͨ', '0', 'pay_notify_status', 0, 'info', '', 'δ֪ͨ', '1', '2021-12-03 11:03:10', '1', '2023-07-19 10:08:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (123, 10, '֧ɹ', '10', 'pay_order_status', 0, 'success', '', '֧ɹ', '1', '2021-12-03 11:18:29', '1', '2023-07-19 18:04:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (124, 30, '֧ر', '30', 'pay_order_status', 0, 'info', '', '֧ر', '1', '2021-12-03 11:18:42', '1', '2023-07-19 18:05:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (125, 0, 'ȴ֧', '0', 'pay_order_status', 0, 'info', '', 'δ֧', '1', '2021-12-03 11:18:18', '1', '2023-07-19 18:04:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (600, 5, 'ҳ', '1', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (601, 4, 'ɱҳ', '2', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (602, 3, 'ۻҳ', '3', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (603, 2, 'ʱۿҳ', '4', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (604, 1, 'ҳ', '5', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1118, 0, 'ȴ˿', '0', 'pay_refund_status', 0, 'info', '', 'ȴ˿', '1', '2021-12-10 16:44:59', '1', '2023-07-19 10:14:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1119, 20, '˿ʧ', '20', 'pay_refund_status', 0, 'danger', '', '˿ʧ', '1', '2021-12-10 16:45:10', '1', '2023-07-19 10:15:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1124, 10, '˿ɹ', '10', 'pay_refund_status', 0, 'success', '', '˿ɹ', '1', '2021-12-10 16:46:26', '1', '2023-07-19 10:15:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1127, 1, '', '1', 'bpm_process_instance_status', 0, 'default', '', 'ʵ״̬ - ', '1', '2022-01-07 23:47:22', '1', '2024-03-16 16:11:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1128, 2, 'ͨ', '2', 'bpm_process_instance_status', 0, 'success', '', 'ʵ״̬ - ', '1', '2022-01-07 23:47:49', '1', '2024-03-16 16:11:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1129, 1, '', '1', 'bpm_task_status', 0, 'primary', '', 'ʵĽ - ', '1', '2022-01-07 23:48:32', '1', '2024-03-08 22:41:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1130, 2, 'ͨ', '2', 'bpm_task_status', 0, 'success', '', 'ʵĽ - ͨ', '1', '2022-01-07 23:48:45', '1', '2024-03-08 22:41:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1131, 3, 'ͨ', '3', 'bpm_task_status', 0, 'danger', '', 'ʵĽ - ͨ', '1', '2022-01-07 23:48:55', '1', '2024-03-08 22:41:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1132, 4, 'ȡ', '4', 'bpm_task_status', 0, 'info', '', 'ʵĽ - ', '1', '2022-01-07 23:49:06', '1', '2024-03-08 22:41:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1133, 10, '̱', '10', 'bpm_model_form_type', 0, '', '', '̵ı - ̱', '103', '2022-01-11 23:51:30', '103', '2022-01-11 23:51:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1134, 20, 'ҵ', '20', 'bpm_model_form_type', 0, '', '', '̵ı - ҵ', '103', '2022-01-11 23:51:47', '103', '2022-01-11 23:51:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1135, 10, 'ɫ', '10', 'bpm_task_candidate_strategy', 0, 'info', '', ' - ɫ', '103', '2022-01-12 23:21:22', '1', '2024-03-06 02:53:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1136, 20, 'ŵijԱ', '20', 'bpm_task_candidate_strategy', 0, 'primary', '', ' - ŵijԱ', '103', '2022-01-12 23:21:47', '1', '2024-03-06 02:53:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1137, 21, 'ŵĸ', '21', 'bpm_task_candidate_strategy', 0, 'primary', '', ' - ŵĸ', '103', '2022-01-12 23:33:36', '1', '2024-03-06 02:53:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1138, 30, 'û', '30', 'bpm_task_candidate_strategy', 0, 'info', '', ' - û', '103', '2022-01-12 23:34:02', '1', '2024-03-06 02:53:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1139, 40, 'û', '40', 'bpm_task_candidate_strategy', 0, 'warning', '', ' - û', '103', '2022-01-12 23:34:21', '1', '2024-03-06 02:53:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1140, 60, '̱ʽ', '60', 'bpm_task_candidate_strategy', 0, 'danger', '', ' - ̱ʽ', '103', '2022-01-12 23:34:43', '1', '2024-03-06 02:53:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1141, 22, 'λ', '22', 'bpm_task_candidate_strategy', 0, 'success', '', ' - λ', '103', '2022-01-14 18:41:55', '1', '2024-03-06 02:53:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1145, 1, '̨', '1', 'infra_codegen_scene', 0, '', '', 'ɵijö - ̨', '1', '2022-02-02 13:15:06', '1', '2022-03-10 16:32:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1146, 2, 'û APP', '2', 'infra_codegen_scene', 0, '', '', 'ɵijö - û APP', '1', '2022-02-02 13:15:19', '1', '2022-03-10 16:33:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1150, 1, 'ݿ', '1', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:25:28', '1', '2022-03-15 00:25:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1151, 10, 'ش', '10', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:25:41', '1', '2022-03-15 00:25:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1152, 11, 'FTP ', '11', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:06', '1', '2022-03-15 00:26:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1153, 12, 'SFTP ', '12', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:22', '1', '2022-03-15 00:26:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1154, 20, 'S3 洢', '20', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:31', '1', '2022-03-15 00:26:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1155, 103, 'ŵ¼', '103', 'system_login_type', 0, 'default', '', NULL, '1', '2022-05-09 23:57:58', '1', '2022-05-09 23:58:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1156, 1, 'password', 'password', 'system_oauth2_grant_type', 0, 'default', '', 'ģʽ', '1', '2022-05-12 00:22:05', '1', '2022-05-11 16:26:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1157, 2, 'authorization_code', 'authorization_code', 'system_oauth2_grant_type', 0, 'primary', '', 'Ȩģʽ', '1', '2022-05-12 00:22:59', '1', '2022-05-11 16:26:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1158, 3, 'implicit', 'implicit', 'system_oauth2_grant_type', 0, 'success', '', 'ģʽ', '1', '2022-05-12 00:23:40', '1', '2022-05-11 16:26:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1159, 4, 'client_credentials', 'client_credentials', 'system_oauth2_grant_type', 0, 'default', '', 'ͻģʽ', '1', '2022-05-12 00:23:51', '1', '2022-05-11 16:26:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1160, 5, 'refresh_token', 'refresh_token', 'system_oauth2_grant_type', 0, 'info', '', 'ˢģʽ', '1', '2022-05-12 00:24:02', '1', '2022-05-11 16:26:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1162, 1, '', '1', 'product_spu_status', 0, 'success', '', 'Ʒ SPU ״̬ - ', '1', '2022-10-24 21:19:47', '1', '2022-10-24 21:20:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1163, 0, 'ֿ', '0', 'product_spu_status', 0, 'info', '', 'Ʒ SPU ״̬ - ֿ', '1', '2022-10-24 21:20:54', '1', '2022-10-24 21:21:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1164, 0, 'վ', '-1', 'product_spu_status', 0, 'default', '', 'Ʒ SPU ״̬ - վ', '1', '2022-10-24 21:21:11', '1', '2022-10-24 21:21:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1165, 1, '', '1', 'promotion_discount_type', 0, 'success', '', 'Ż - ', '1', '2022-11-01 12:46:41', '1', '2022-11-01 12:50:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1166, 2, 'ۿ', '2', 'promotion_discount_type', 0, 'primary', '', 'Ż - ۿ', '1', '2022-11-01 12:46:51', '1', '2022-11-01 12:50:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1167, 1, '̶', '1', 'promotion_coupon_template_validity_type', 0, 'default', '', 'Ż݄ģ - ̶', '1', '2022-11-02 00:07:34', '1', '2022-11-04 00:07:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1168, 2, 'ȡ֮', '2', 'promotion_coupon_template_validity_type', 0, 'default', '', 'Ż݄ģ - ȡ֮', '1', '2022-11-02 00:07:54', '1', '2022-11-04 00:07:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1169, 1, 'ͨÄ', '1', 'promotion_product_scope', 0, 'default', '', 'ӪƷΧ - ȫƷ', '1', '2022-11-02 00:28:22', '1', '2023-09-28 00:27:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1170, 2, 'Ʒ', '2', 'promotion_product_scope', 0, 'default', '', 'ӪƷΧ - ָƷ', '1', '2022-11-02 00:28:34', '1', '2023-09-28 00:27:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1171, 1, 'δʹ', '1', 'promotion_coupon_status', 0, 'primary', '', 'Ż݄״̬ - ȡ', '1', '2022-11-04 00:15:08', '1', '2023-10-03 12:54:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1172, 2, 'ʹ', '2', 'promotion_coupon_status', 0, 'success', '', 'Ż݄״̬ - ʹ', '1', '2022-11-04 00:15:21', '1', '2022-11-04 19:16:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1173, 3, 'ѹ', '3', 'promotion_coupon_status', 0, 'info', '', 'Ż݄״̬ - ѹ', '1', '2022-11-04 00:15:43', '1', '2022-11-04 19:16:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1174, 1, 'ֱȡ', '1', 'promotion_coupon_take_type', 0, 'primary', '', 'Ż݄ȡʽ - ֱȡ', '1', '2022-11-04 19:13:00', '1', '2022-11-04 19:13:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1175, 2, 'ָ', '2', 'promotion_coupon_take_type', 0, 'success', '', 'Ż݄ȡʽ - ָ', '1', '2022-11-04 19:13:13', '1', '2022-11-04 19:14:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1176, 10, 'δʼ', '10', 'promotion_activity_status', 0, 'primary', '', '״̬ö - δʼ', '1', '2022-11-04 22:54:49', '1', '2022-11-04 22:55:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1177, 20, '', '20', 'promotion_activity_status', 0, 'success', '', '״̬ö - ', '1', '2022-11-04 22:55:06', '1', '2022-11-04 22:55:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1178, 30, 'ѽ', '30', 'promotion_activity_status', 0, 'info', '', '״̬ö - ѽ', '1', '2022-11-04 22:55:41', '1', '2022-11-04 22:55:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1179, 40, 'ѹر', '40', 'promotion_activity_status', 0, 'warning', '', '״̬ö - ѹر', '1', '2022-11-04 22:56:10', '1', '2022-11-04 22:56:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1180, 10, ' N Ԫ', '10', 'promotion_condition_type', 0, 'primary', '', 'Ӫ - N Ԫ', '1', '2022-11-04 22:59:45', '1', '2022-11-04 22:59:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1181, 20, ' N ', '20', 'promotion_condition_type', 0, 'success', '', 'Ӫ - N ', '1', '2022-11-04 23:00:02', '1', '2022-11-04 23:00:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1182, 10, 'ۺ', '10', 'trade_after_sale_status', 0, 'primary', '', 'ۺ״̬ - ۺ', '1', '2022-11-19 20:53:33', '1', '2022-11-19 20:54:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1183, 20, 'Ʒ˻', '20', 'trade_after_sale_status', 0, 'primary', '', 'ۺ״̬ - Ʒ˻', '1', '2022-11-19 20:54:36', '1', '2022-11-19 20:58:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1184, 30, '̼Ҵջ', '30', 'trade_after_sale_status', 0, 'primary', '', 'ۺ״̬ - ̼Ҵջ', '1', '2022-11-19 20:56:56', '1', '2022-11-19 20:59:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1185, 40, 'ȴ˿', '40', 'trade_after_sale_status', 0, 'primary', '', 'ۺ״̬ - ȴ˿', '1', '2022-11-19 20:59:54', '1', '2022-11-19 21:00:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1186, 50, '˿ɹ', '50', 'trade_after_sale_status', 0, 'default', '', 'ۺ״̬ - ˿ɹ', '1', '2022-11-19 21:00:33', '1', '2022-11-19 21:00:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1187, 61, 'ȡ', '61', 'trade_after_sale_status', 0, 'info', '', 'ۺ״̬ - ȡ', '1', '2022-11-19 21:01:29', '1', '2022-11-19 21:01:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1188, 62, '̼Ҿܾ', '62', 'trade_after_sale_status', 0, 'info', '', 'ۺ״̬ - ̼Ҿܾ', '1', '2022-11-19 21:02:17', '1', '2022-11-19 21:02:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1189, 63, '̼Ҿջ', '63', 'trade_after_sale_status', 0, 'info', '', 'ۺ״̬ - ̼Ҿջ', '1', '2022-11-19 21:02:37', '1', '2022-11-19 21:03:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1190, 10, '˿', '10', 'trade_after_sale_type', 0, 'success', '', 'ۺ - ˿', '1', '2022-11-19 21:05:05', '1', '2022-11-19 21:38:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1191, 20, 'ۺ˿', '20', 'trade_after_sale_type', 0, 'primary', '', 'ۺ - ۺ˿', '1', '2022-11-19 21:05:32', '1', '2022-11-19 21:38:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1192, 10, '˿', '10', 'trade_after_sale_way', 0, 'primary', '', 'ۺķʽ - ˿', '1', '2022-11-19 21:39:19', '1', '2022-11-19 21:39:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1193, 20, '˻˿', '20', 'trade_after_sale_way', 0, 'success', '', 'ۺķʽ - ˻˿', '1', '2022-11-19 21:39:38', '1', '2022-11-19 21:39:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1194, 10, '΢С', '10', 'terminal', 0, 'default', '', 'ն - ΢С', '1', '2022-12-10 10:51:11', '1', '2022-12-10 10:51:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1195, 20, 'H5 ҳ', '20', 'terminal', 0, 'default', '', 'ն - H5 ҳ', '1', '2022-12-10 10:51:30', '1', '2022-12-10 10:51:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1196, 11, '΢Źں', '11', 'terminal', 0, 'default', '', 'ն - ΢Źں', '1', '2022-12-10 10:54:16', '1', '2022-12-10 10:52:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1197, 31, 'ƻ App', '31', 'terminal', 0, 'default', '', 'ն - ƻ App', '1', '2022-12-10 10:54:42', '1', '2022-12-10 10:52:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1198, 32, '׿ App', '32', 'terminal', 0, 'default', '', 'ն - ׿ App', '1', '2022-12-10 10:55:02', '1', '2022-12-10 10:59:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1199, 0, 'ͨ', '0', 'trade_order_type', 0, 'default', '', '׶ - ͨ', '1', '2022-12-10 16:34:14', '1', '2022-12-10 16:34:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1200, 1, 'ɱ', '1', 'trade_order_type', 0, 'default', '', '׶ - ɱ', '1', '2022-12-10 16:34:26', '1', '2022-12-10 16:34:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1201, 2, 'ƴŶ', '2', 'trade_order_type', 0, 'default', '', '׶ - ƴŶ', '1', '2022-12-10 16:34:36', '1', '2022-12-10 16:34:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1202, 3, '۶', '3', 'trade_order_type', 0, 'default', '', '׶ - ۶', '1', '2022-12-10 16:34:48', '1', '2022-12-10 16:34:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1203, 0, '֧', '0', 'trade_order_status', 0, 'default', '', '׶״̬ - ֧', '1', '2022-12-10 16:49:29', '1', '2022-12-10 16:49:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1204, 10, '', '10', 'trade_order_status', 0, 'primary', '', '׶״̬ - ', '1', '2022-12-10 16:49:53', '1', '2022-12-10 16:51:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1205, 20, 'ѷ', '20', 'trade_order_status', 0, 'primary', '', '׶״̬ - ѷ', '1', '2022-12-10 16:50:13', '1', '2022-12-10 16:51:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1206, 30, '', '30', 'trade_order_status', 0, 'success', '', '׶״̬ - ', '1', '2022-12-10 16:50:30', '1', '2022-12-10 16:51:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1207, 40, 'ȡ', '40', 'trade_order_status', 0, 'danger', '', '׶״̬ - ȡ', '1', '2022-12-10 16:50:50', '1', '2022-12-10 16:51:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1208, 0, 'δۺ', '0', 'trade_order_item_after_sale_status', 0, 'info', '', '׶ۺ״̬ - δۺ', '1', '2022-12-10 20:58:42', '1', '2022-12-10 20:59:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1209, 1, 'ۺ', '1', 'trade_order_item_after_sale_status', 0, 'primary', '', '׶ۺ״̬ - ۺ', '1', '2022-12-10 20:59:21', '1', '2022-12-10 20:59:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1210, 2, '˿', '2', 'trade_order_item_after_sale_status', 0, 'success', '', '׶ۺ״̬ - ˿', '1', '2022-12-10 20:59:46', '1', '2022-12-10 20:59:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1211, 1, 'ȫƥ', '1', 'mp_auto_reply_request_match', 0, 'primary', '', 'ںԶظؼƥģʽ - ȫƥ', '1', '2023-01-16 23:30:39', '1', '2023-01-16 23:31:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1212, 2, 'ƥ', '2', 'mp_auto_reply_request_match', 0, 'success', '', 'ںԶظؼƥģʽ - ƥ', '1', '2023-01-16 23:30:55', '1', '2023-01-16 23:31:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1213, 1, 'ı', 'text', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ı', '1', '2023-01-17 22:17:32', '1', '2023-01-17 22:17:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1214, 2, 'ͼƬ', 'image', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ͼƬ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:19:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1215, 3, '', 'voice', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:20:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1216, 4, 'Ƶ', 'video', 'mp_message_type', 0, 'default', '', 'ںŵϢ - Ƶ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:21:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1217, 5, 'СƵ', 'shortvideo', 'mp_message_type', 0, 'default', '', 'ںŵϢ - СƵ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:19:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1218, 6, 'ͼ', 'news', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ͼ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:22:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1219, 7, '', 'music', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:22:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1220, 8, 'λ', 'location', 'mp_message_type', 0, 'default', '', 'ںŵϢ - λ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:23:51', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1221, 9, '', 'link', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1222, 10, '¼', 'event', 'mp_message_type', 0, 'default', '', 'ںŵϢ - ¼', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1223, 0, 'ʼ', '0', 'system_mail_send_status', 0, 'primary', '', 'ʼ״̬ - ʼ\n', '1', '2023-01-26 09:53:49', '1', '2023-01-26 16:36:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1224, 10, 'ͳɹ', '10', 'system_mail_send_status', 0, 'success', '', 'ʼ״̬ - ͳɹ', '1', '2023-01-26 09:54:28', '1', '2023-01-26 16:36:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1225, 20, 'ʧ', '20', 'system_mail_send_status', 0, 'danger', '', 'ʼ״̬ - ʧ', '1', '2023-01-26 09:54:50', '1', '2023-01-26 16:36:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1226, 30, '', '30', 'system_mail_send_status', 0, 'info', '', 'ʼ״̬ - ', '1', '2023-01-26 09:55:06', '1', '2023-01-26 16:36:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1227, 1, '֪ͨ', '1', 'system_notify_template_type', 0, 'primary', '', 'վģ - ֪ͨ', '1', '2023-01-28 10:35:59', '1', '2023-01-28 10:35:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1228, 2, 'ϵͳϢ', '2', 'system_notify_template_type', 0, 'success', '', 'վģ - ϵͳϢ', '1', '2023-01-28 10:36:20', '1', '2023-01-28 10:36:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1230, 13, '֧֧', 'alipay_bar', 'pay_channel_code', 0, 'primary', '', '֧֧', '1', '2023-02-18 23:32:24', '1', '2023-07-19 20:09:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1231, 10, 'Vue2 Element UI ׼ģ', '10', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:03:55', '1', '2023-04-13 00:03:55', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus ׼ģ', '20', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:08', '1', '2023-04-13 00:04:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, 'Vue3 Element Plus Schema ģ', '21', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vue3 vben ģ', '30', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1335, 11, 'ֵֿ', '11', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:27', '1', '2023-10-11 07:41:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1336, 1, 'ǩ', '1', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:48', '1', '2023-08-20 11:59:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1341, 20, '˿', '20', 'pay_order_status', 0, 'danger', '', '˿', '1', '2023-07-19 18:05:37', '1', '2023-07-19 18:05:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1342, 21, 'ɹǽʧ', '21', 'pay_notify_status', 0, 'warning', '', 'ɹǽʧ', '1', '2023-07-19 18:10:47', '1', '2023-07-19 18:11:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1343, 22, 'ʧ', '22', 'pay_notify_status', 0, 'warning', '', NULL, '1', '2023-07-19 18:11:05', '1', '2023-07-19 18:11:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1344, 4, '΢ɨ֧', 'wx_native', 'pay_channel_code', 0, 'success', '', '΢ɨ֧', '1', '2023-07-19 20:07:47', '1', '2023-07-19 20:09:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1345, 5, '΢֧', 'wx_bar', 'pay_channel_code', 0, 'success', '', '΢֧\n', '1', '2023-07-19 20:08:06', '1', '2023-07-19 20:09:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1346, 1, '֧', '1', 'pay_notify_type', 0, 'primary', '', '֧', '1', '2023-07-20 12:23:17', '1', '2023-07-20 12:23:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1347, 2, '˿', '2', 'pay_notify_type', 0, 'danger', '', NULL, '1', '2023-07-20 12:23:26', '1', '2023-07-20 12:23:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1348, 20, 'ģ֧', 'mock', 'pay_channel_code', 0, 'default', '', 'ģ֧', '1', '2023-07-29 11:10:51', '1', '2023-07-29 03:14:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1349, 12, 'ֵֿۣȡ', '12', 'member_point_biz_type', 0, '', '', '', '1', '2023-08-20 12:00:03', '1', '2023-10-11 07:42:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1350, 0, 'Ա', '0', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1351, 1, '½', '1', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1352, 11, 'µ', '11', 'member_experience_biz_type', 0, 'success', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1353, 12, 'µȡ', '12', 'member_experience_biz_type', 0, 'warning', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1354, 4, 'ǩ', '4', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1355, 5, '齱', '5', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1356, 1, 'ݷ', '1', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:04:55', '1', '2023-08-23 00:04:55', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1357, 2, 'û', '2', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:05:05', '1', '2023-08-23 00:05:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1358, 3, 'Ʒ', '3', 'promotion_product_scope', 0, 'default', '', '', '1', '2023-09-01 23:43:07', '1', '2023-09-28 00:27:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1359, 1, '˷', '1', 'brokerage_enabled_condition', 0, '', '', 'ûԷ', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1360, 2, 'ָ', '2', 'brokerage_enabled_condition', 0, '', '', 'ɺֶ̨ƹԱ', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1361, 1, '״ΰ', '1', 'brokerage_bind_mode', 0, '', '', 'ֻҪûûƹˣʱ԰ƹϵ', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1362, 2, 'ע', '2', 'brokerage_bind_mode', 0, '', '', 'ûעʱܰƹϵ', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1363, 3, 'ǰ', '3', 'brokerage_bind_mode', 0, '', '', 'ûѾƹˣƹ˻ᱻ', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1364, 1, 'Ǯ', '1', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1365, 2, 'п', '2', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1366, 3, '΢', '3', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1367, 4, '֧', '4', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1368, 1, 'Ӷ', '1', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1369, 2, '', '2', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1370, 3, 'ֲ', '3', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1371, 0, '', '0', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1372, 1, 'ѽ', '1', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1373, 2, 'ȡ', '2', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1374, 0, '', '0', 'brokerage_withdraw_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1375, 10, 'ͨ', '10', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1376, 11, 'ֳɹ', '11', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1377, 20, '˲ͨ', '20', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1378, 21, 'ʧ', '21', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1379, 0, '', '0', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1380, 1, '', '1', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1381, 2, 'ũҵ', '2', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1382, 3, 'й', '3', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1383, 4, 'ͨ', '4', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1384, 5, '', '5', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1385, 21, 'Ǯ', 'wallet', 'pay_channel_code', 0, 'primary', '', '', '1', '2023-10-01 21:46:19', '1', '2023-10-01 21:48:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1386, 1, '', '1', 'promotion_bargain_record_status', 0, 'default', '', '', '1', '2023-10-05 10:41:26', '1', '2023-10-05 10:41:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1387, 2, '۳ɹ', '2', 'promotion_bargain_record_status', 0, 'success', '', '', '1', '2023-10-05 10:41:39', '1', '2023-10-05 10:41:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1388, 3, 'ʧ', '3', 'promotion_bargain_record_status', 0, 'warning', '', '', '1', '2023-10-05 10:41:57', '1', '2023-10-05 10:41:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1389, 1, 'ƴ', '1', 'promotion_combination_record_status', 0, '', '', '', '1', '2023-10-08 07:24:44', '1', '2023-10-08 07:24:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1390, 2, 'ƴųɹ', '2', 'promotion_combination_record_status', 0, 'success', '', '', '1', '2023-10-08 07:24:56', '1', '2023-10-08 07:24:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1391, 3, 'ƴʧ', '3', 'promotion_combination_record_status', 0, 'warning', '', '', '1', '2023-10-08 07:25:11', '1', '2023-10-08 07:25:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1392, 2, 'Ա޸', '2', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:41:34', '1', '2023-10-11 07:41:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1393, 13, 'ֵֿۣ˿', '13', 'member_point_biz_type', 0, '', '', '', '1', '2023-10-11 07:42:29', '1', '2023-10-11 07:42:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1394, 21, 'ֽ', '21', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:44', '1', '2023-10-11 07:42:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1395, 22, 'ֽȡ', '22', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:55', '1', '2023-10-11 07:43:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1396, 23, 'ֽ˿', '23', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:43:16', '1', '2023-10-11 07:43:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1397, 13, 'µ˿', '13', 'member_experience_biz_type', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1398, 5, 'ת', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:24', '1', '2023-10-18 21:55:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1399, 6, '֧', '6', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:38', '1', '2023-10-18 21:55:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1400, 7, '΢֧', '7', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:53', '1', '2023-10-18 21:55:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1401, 8, '', '8', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:56:06', '1', '2023-10-18 21:56:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1402, 1, 'IT', '1', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:15', '1', '2024-02-18 23:30:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1403, 2, 'ҵ', '2', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:29', '1', '2024-02-18 23:30:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1404, 3, 'ز', '3', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:41', '1', '2024-02-18 23:30:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1405, 4, 'ҵ', '4', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:54', '1', '2024-02-18 23:30:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1406, 5, '/', '5', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:03', '1', '2024-02-18 23:31:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1407, 6, '', '6', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:13', '1', '2024-02-18 23:31:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1408, 7, '', '7', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:27', '1', '2024-02-18 23:31:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1409, 8, 'Ļý', '8', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:37', '1', '2024-02-18 23:31:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1422, 1, 'A صͻ', '1', 'crm_customer_level', 0, 'primary', '', '', '1', '2023-10-28 23:07:13', '1', '2023-10-28 23:07:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1423, 2, 'B ͨͻ', '2', 'crm_customer_level', 0, 'info', '', '', '1', '2023-10-28 23:07:35', '1', '2023-10-28 23:07:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1424, 3, 'C ȿͻ', '3', 'crm_customer_level', 0, 'default', '', '', '1', '2023-10-28 23:07:53', '1', '2023-10-28 23:07:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1425, 1, '', '1', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:29', '1', '2023-10-28 23:08:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1426, 2, '', '2', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:39', '1', '2023-10-28 23:08:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1427, 3, '', '3', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:47', '1', '2023-10-28 23:08:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1428, 4, 'ת', '4', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:58', '1', '2023-10-28 23:08:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1429, 5, 'ע', '5', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:12', '1', '2023-10-28 23:09:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1430, 6, 'ѯ', '6', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:22', '1', '2023-10-28 23:09:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1431, 7, 'ԤԼ', '7', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:39', '1', '2023-10-28 23:09:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1432, 8, 'İ', '8', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:04', '1', '2023-10-28 23:10:04', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1433, 9, '绰ѯ', '9', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:18', '1', '2023-10-28 23:10:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1434, 10, 'ʼѯ', '10', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:33', '1', '2023-10-28 23:10:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1435, 10, 'Gitee', '10', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:04:42', '1', '2023-11-04 13:04:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1436, 20, '', '20', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:04:54', '1', '2023-11-04 13:04:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1437, 30, 'ҵ΢', '30', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:09', '1', '2023-11-04 13:05:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1438, 31, '΢Źƽ̨', '31', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:18', '1', '2023-11-04 13:05:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1439, 32, '΢ſƽ̨', '32', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:30', '1', '2023-11-04 13:05:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1440, 34, '΢С', '34', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:38', '1', '2023-11-04 13:07:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1441, 1, 'ϼ', '1', 'crm_product_status', 0, 'success', '', '', '1', '2023-10-30 21:49:34', '1', '2023-10-30 21:49:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1442, 0, '¼', '0', 'crm_product_status', 0, 'success', '', '', '1', '2023-10-30 21:49:13', '1', '2023-10-30 21:49:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1443, 15, 'ӱ', '15', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-13 23:06:16', '1', '2023-11-13 23:06:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1444, 10, '׼ģʽ', '10', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-14 12:32:49', '1', '2023-11-14 12:32:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1445, 11, 'ERP ģʽ', '11', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-14 12:33:05', '1', '2023-11-14 12:33:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1446, 12, 'Ƕģʽ', '12', 'infra_codegen_template_type', 0, '', '', '', '1', '2023-11-14 12:33:31', '1', '2023-11-14 12:33:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1447, 1, '', '1', 'crm_permission_level', 0, 'default', '', '', '1', '2023-11-30 09:53:12', '1', '2023-11-30 09:53:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1448, 2, 'ֻ', '2', 'crm_permission_level', 0, '', '', '', '1', '2023-11-30 09:53:29', '1', '2023-11-30 09:53:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1449, 3, 'д', '3', 'crm_permission_level', 0, '', '', '', '1', '2023-11-30 09:53:36', '1', '2023-11-30 09:53:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1450, 0, 'δύ', '0', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:56:59', '1', '2023-11-30 18:56:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1451, 10, '', '10', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:10', '1', '2023-11-30 18:57:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1452, 20, 'ͨ', '20', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:24', '1', '2023-11-30 18:57:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1453, 30, '˲ͨ', '30', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:32', '1', '2023-11-30 18:57:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1454, 40, 'ȡ', '40', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:42', '1', '2023-11-30 18:57:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1456, 1, '֧Ʊ', '1', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:29', '1', '2023-10-18 21:54:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1457, 2, 'ֽ', '2', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:41', '1', '2023-10-18 21:54:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1458, 3, '', '3', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:53', '1', '2023-10-18 21:54:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1459, 4, '', '4', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:07', '1', '2023-10-18 21:55:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1460, 5, 'ת', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:24', '1', '2023-10-18 21:55:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1461, 1, '', '1', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:26', '1', '2023-12-05 23:02:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1462, 2, '', '2', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:34', '1', '2023-12-05 23:02:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1463, 3, 'ֻ', '3', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:57', '1', '2023-12-05 23:02:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1464, 4, '', '4', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:05', '1', '2023-12-05 23:03:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1465, 5, 'ö', '5', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:14', '1', '2023-12-05 23:03:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1466, 6, 'ƿ', '6', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:20', '1', '2023-12-05 23:03:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1467, 7, '', '7', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:30', '1', '2023-12-05 23:03:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1468, 8, '̨', '8', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:41', '1', '2023-12-05 23:03:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1469, 9, '', '9', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:48', '1', '2023-12-05 23:03:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1470, 10, 'ǧ', '10', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:03', '1', '2023-12-05 23:04:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1471, 11, '', '11', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:12', '1', '2023-12-05 23:04:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1472, 12, '', '12', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:25', '1', '2023-12-05 23:04:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1473, 13, '', '13', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:34', '1', '2023-12-05 23:04:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1474, 1, '绰', '1', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:48:20', '1', '2024-01-15 20:48:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1475, 2, '', '2', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:48:31', '1', '2024-01-15 20:48:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1476, 3, 'Űݷ', '3', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:49:07', '1', '2024-01-15 20:49:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1477, 4, '΢Źͨ', '4', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:49:15', '1', '2024-01-15 20:49:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1478, 4, 'Ǯ', '4', 'pay_transfer_type', 0, 'info', '', '', '1', '2023-10-28 16:28:37', '1', '2023-10-28 16:28:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1479, 3, 'п', '3', 'pay_transfer_type', 0, 'default', '', '', '1', '2023-10-28 16:28:21', '1', '2023-10-28 16:28:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1480, 2, '΢', '2', 'pay_transfer_type', 0, 'info', '', '', '1', '2023-10-28 16:28:07', '1', '2023-10-28 16:28:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1481, 1, '֧', '1', 'pay_transfer_type', 0, 'default', '', '', '1', '2023-10-28 16:27:44', '1', '2023-10-28 16:27:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1482, 4, 'תʧ', '30', 'pay_transfer_status', 0, 'warning', '', '', '1', '2023-10-28 16:24:16', '1', '2023-10-28 16:24:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1483, 3, 'ת˳ɹ', '20', 'pay_transfer_status', 0, 'success', '', '', '1', '2023-10-28 16:23:50', '1', '2023-10-28 16:23:50', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1484, 2, 'ת˽', '10', 'pay_transfer_status', 0, 'info', '', '', '1', '2023-10-28 16:23:12', '1', '2023-10-28 16:23:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1485, 1, 'ȴת', '0', 'pay_transfer_status', 0, 'default', '', '', '1', '2023-10-28 16:21:43', '1', '2023-10-28 16:23:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1486, 10, '', '10', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-05 18:07:25', '1', '2024-02-05 18:07:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1487, 11, '⣨ϣ', '11', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-05 18:08:07', '1', '2024-02-05 19:20:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1488, 20, '', '20', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-05 18:08:51', '1', '2024-02-05 18:08:51', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1489, 21, '⣨ϣ', '21', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-05 18:09:00', '1', '2024-02-05 19:20:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1490, 10, 'δ', '10', 'erp_audit_status', 0, 'default', '', '', '1', '2024-02-06 00:00:21', '1', '2024-02-06 00:00:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1491, 20, '', '20', 'erp_audit_status', 0, 'success', '', '', '1', '2024-02-06 00:00:35', '1', '2024-02-06 00:00:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1492, 30, '', '30', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-07 20:34:19', '1', '2024-02-07 12:36:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1493, 31, '⣨ϣ', '31', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-07 20:34:29', '1', '2024-02-07 20:37:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1494, 32, '', '32', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-07 20:34:38', '1', '2024-02-07 12:36:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1495, 33, '⣨ϣ', '33', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-07 20:34:49', '1', '2024-02-07 20:37:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1496, 40, 'ӯ', '40', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-08 08:53:00', '1', '2024-02-08 08:53:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1497, 41, 'ӯ⣨ϣ', '41', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-08 08:53:39', '1', '2024-02-16 19:40:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1498, 42, '̿', '42', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-08 08:54:16', '1', '2024-02-08 08:54:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1499, 43, '̿⣨ϣ', '43', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-08 08:54:31', '1', '2024-02-16 19:40:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1500, 50, '۳', '50', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-11 21:47:25', '1', '2024-02-11 21:50:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1501, 51, '۳⣨ϣ', '51', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-11 21:47:37', '1', '2024-02-11 21:51:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1502, 60, '˻', '60', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-12 06:51:05', '1', '2024-02-12 06:51:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1503, 61, '˻⣨ϣ', '61', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-12 06:51:18', '1', '2024-02-12 06:51:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1504, 70, 'ɹ', '70', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-16 13:10:02', '1', '2024-02-16 13:10:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1505, 71, 'ɹ⣨ϣ', '71', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:10', '1', '2024-02-16 19:40:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1506, 80, 'ɹ˻', '80', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-16 13:10:17', '1', '2024-02-16 13:10:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1507, 81, 'ɹ˻⣨ϣ', '81', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:26', '1', '2024-02-16 19:40:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1509, 3, 'ͨ', '3', 'bpm_process_instance_status', 0, 'danger', '', '', '1', '2024-03-16 16:12:06', '1', '2024-03-16 16:12:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1510, 4, 'ȡ', '4', 'bpm_process_instance_status', 0, 'warning', '', '', '1', '2024-03-16 16:12:22', '1', '2024-03-16 16:12:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1511, 5, '˻', '5', 'bpm_task_status', 0, 'warning', '', '', '1', '2024-03-16 19:10:46', '1', '2024-03-08 22:41:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1512, 6, 'ί', '6', 'bpm_task_status', 0, 'primary', '', '', '1', '2024-03-17 10:06:22', '1', '2024-03-08 22:41:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1513, 7, 'ͨ', '7', 'bpm_task_status', 0, 'success', '', '', '1', '2024-03-17 10:06:47', '1', '2024-03-08 22:41:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1514, 0, '', '0', 'bpm_task_status', 0, 'info', '', '', '1', '2024-03-17 10:07:11', '1', '2024-03-08 22:41:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1515, 35, 'ѡ', '35', 'bpm_task_candidate_strategy', 0, '', '', '', '1', '2024-03-22 19:45:16', '1', '2024-03-22 19:45:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1516, 1, 'ִм', 'execution', 'bpm_process_listener_type', 0, 'primary', '', '', '1', '2024-03-23 12:54:03', '1', '2024-03-23 19:14:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1517, 1, '', 'task', 'bpm_process_listener_type', 0, 'success', '', '', '1', '2024-03-23 12:54:13', '1', '2024-03-23 19:14:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1526, 1, 'Java ', 'class', 'bpm_process_listener_value_type', 0, 'primary', '', '', '1', '2024-03-23 15:08:45', '1', '2024-03-23 19:14:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1527, 2, 'ʽ', 'expression', 'bpm_process_listener_value_type', 0, 'success', '', '', '1', '2024-03-23 15:09:06', '1', '2024-03-23 19:14:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1528, 3, 'ʽ', 'delegateExpression', 'bpm_process_listener_value_type', 0, 'info', '', '', '1', '2024-03-23 15:11:23', '1', '2024-03-23 19:14:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1529, 1, '', '1', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:26', '1', '2024-03-29 22:50:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1530, 2, '', '2', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:36', '1', '2024-03-29 22:50:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1531, 3, '', '3', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:46', '1', '2024-03-29 22:50:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1532, 4, '', '4', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:01', '1', '2024-03-29 22:51:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1533, 5, '', '5', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:07', '1', '2024-03-29 22:51:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1534, 1, 'Ӯ', '1', 'crm_business_end_status_type', 0, 'success', '', '', '1', '2024-04-13 23:26:57', '1', '2024-04-13 23:26:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1535, 2, '䵥', '2', 'crm_business_end_status_type', 0, 'primary', '', '', '1', '2024-04-13 23:27:31', '1', '2024-04-13 23:27:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1536, 3, 'Ч', '3', 'crm_business_end_status_type', 0, 'info', '', '', '1', '2024-04-13 23:27:59', '1', '2024-04-13 23:27:59', '0'); +COMMIT; +SET IDENTITY_INSERT system_dict_data OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_dict_type +-- ---------------------------- +CREATE TABLE system_dict_type ( - "ID" BIGINT IDENTITY(3,1) NOT NULL, - "CONFIG_ID" BIGINT NOT NULL, - "PATH" VARCHAR(512) NOT NULL, - "CONTENT" BLOB NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(100) DEFAULT '' NULL, + type varchar(100) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + remark varchar(500) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + deleted_time datetime DEFAULT NULL NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_JOB" + +COMMENT ON COLUMN system_dict_type.id IS 'ֵ'; +COMMENT ON COLUMN system_dict_type.name IS 'ֵ'; +COMMENT ON COLUMN system_dict_type.type IS 'ֵ'; +COMMENT ON COLUMN system_dict_type.status IS '״̬0 1ͣã'; +COMMENT ON COLUMN system_dict_type.remark IS 'ע'; +COMMENT ON COLUMN system_dict_type.creator IS ''; +COMMENT ON COLUMN system_dict_type.create_time IS 'ʱ'; +COMMENT ON COLUMN system_dict_type.updater IS ''; +COMMENT ON COLUMN system_dict_type.update_time IS 'ʱ'; +COMMENT ON COLUMN system_dict_type.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_dict_type.deleted_time IS 'ɾʱ'; +COMMENT ON TABLE system_dict_type IS 'ֵͱ'; + +-- ---------------------------- +-- Records of system_dict_type +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_dict_type ON; +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, 'ûԱ', 'system_user_sex', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2022-05-16 20:29:32', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, '', 'infra_config_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:36:54', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (7, '֪ͨ', 'system_notice_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:35:26', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (9, '', 'infra_operate_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (10, 'ϵͳ״̬', 'common_status', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:21:28', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (11, 'Boolean Ƿ', 'infra_boolean_string', 0, 'boolean תǷ', '', '2021-01-19 03:20:08', '', '2022-02-01 16:37:10', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (104, '½', 'system_login_result', 0, '½', '', '2021-01-18 06:17:11', '', '2022-02-01 16:36:00', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (106, 'ģ', 'infra_codegen_template_type', 0, NULL, '', '2021-02-05 07:08:06', '1', '2022-05-16 20:26:50', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (107, 'ʱ״̬', 'infra_job_status', 0, NULL, '', '2021-02-07 07:44:16', '', '2022-02-01 16:51:11', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (108, 'ʱ־״̬', 'infra_job_log_status', 0, NULL, '', '2021-02-08 10:03:51', '', '2022-02-01 16:50:43', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (109, 'û', 'user_type', 0, NULL, '', '2021-02-26 00:15:51', '', '2021-02-26 00:15:51', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (110, 'API 쳣ݵĴ״̬', 'infra_api_error_log_process_status', 0, NULL, '', '2021-02-26 07:07:01', '', '2022-02-01 16:50:53', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (111, '', 'system_sms_channel_code', 0, NULL, '1', '2021-04-05 01:04:50', '1', '2022-02-16 02:09:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (112, 'ģ', 'system_sms_template_type', 0, NULL, '1', '2021-04-05 21:50:43', '1', '2022-02-01 16:35:06', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (113, 'ŷ״̬', 'system_sms_send_status', 0, NULL, '1', '2021-04-11 20:18:03', '1', '2022-02-01 16:35:09', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (114, 'Ž״̬', 'system_sms_receive_status', 0, NULL, '1', '2021-04-11 20:27:14', '1', '2022-02-01 16:35:14', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (116, '½־', 'system_login_type', 0, '½־', '1', '2021-10-06 00:50:46', '1', '2022-02-01 16:35:56', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (117, 'OA ', 'bpm_oa_leave_type', 0, NULL, '1', '2021-09-21 22:34:33', '1', '2022-01-22 10:41:37', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (130, '֧', 'pay_channel_code', 0, '֧ı', '1', '2021-12-03 10:35:08', '1', '2023-07-10 10:11:39', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (131, '֧ص״̬', 'pay_notify_status', 0, '֧ص״̬˿ص', '1', '2021-12-03 10:53:29', '1', '2023-07-19 18:09:43', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (132, '֧״̬', 'pay_order_status', 0, '֧״̬', '1', '2021-12-03 11:17:50', '1', '2021-12-03 11:17:50', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (134, '˿״̬', 'pay_refund_status', 0, '˿״̬', '1', '2021-12-10 16:42:50', '1', '2023-07-19 10:13:17', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (139, 'ʵ״̬', 'bpm_process_instance_status', 0, 'ʵ״̬', '1', '2022-01-07 23:46:42', '1', '2022-01-07 23:46:42', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (140, 'ʵĽ', 'bpm_task_status', 0, 'ʵĽ', '1', '2022-01-07 23:48:10', '1', '2024-03-08 22:42:03', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (141, '̵ı', 'bpm_model_form_type', 0, '̵ı', '103', '2022-01-11 23:50:45', '103', '2022-01-11 23:50:45', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (142, '', 'bpm_task_candidate_strategy', 0, 'BPM ĺѡ˵IJ', '103', '2022-01-12 23:21:04', '103', '2024-03-06 02:53:59', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (144, 'ɵijö', 'infra_codegen_scene', 0, 'ɵijö', '1', '2022-02-02 13:14:45', '1', '2022-03-10 16:33:46', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (145, 'ɫ', 'system_role_type', 0, 'ɫ', '1', '2022-02-16 13:01:46', '1', '2022-02-16 13:01:46', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (146, 'ļ洢', 'infra_file_storage', 0, 'ļ洢', '1', '2022-03-15 00:24:38', '1', '2022-03-15 00:24:38', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (147, 'OAuth 2.0 Ȩ', 'system_oauth2_grant_type', 0, 'OAuth 2.0 Ȩͣģʽ', '1', '2022-05-12 00:20:52', '1', '2022-05-11 16:25:49', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (149, 'Ʒ SPU ״̬', 'product_spu_status', 0, 'Ʒ SPU ״̬', '1', '2022-10-24 21:19:04', '1', '2022-10-24 21:19:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (150, 'Ż', 'promotion_discount_type', 0, 'Ż', '1', '2022-11-01 12:46:06', '1', '2022-11-01 12:46:06', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (151, 'Ż݄ģ', 'promotion_coupon_template_validity_type', 0, 'Ż݄ģ', '1', '2022-11-02 00:06:20', '1', '2022-11-04 00:08:26', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (152, 'ӪƷΧ', 'promotion_product_scope', 0, 'ӪƷΧ', '1', '2022-11-02 00:28:01', '1', '2022-11-02 00:28:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (153, 'Ż݄״̬', 'promotion_coupon_status', 0, 'Ż݄״̬', '1', '2022-11-04 00:14:49', '1', '2022-11-04 00:14:49', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (154, 'Ż݄ȡʽ', 'promotion_coupon_take_type', 0, 'Ż݄ȡʽ', '1', '2022-11-04 19:12:27', '1', '2022-11-04 19:12:27', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (155, '״̬', 'promotion_activity_status', 0, '״̬', '1', '2022-11-04 22:54:23', '1', '2022-11-04 22:54:23', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (156, 'Ӫ', 'promotion_condition_type', 0, 'Ӫ', '1', '2022-11-04 22:59:23', '1', '2022-11-04 22:59:23', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (157, 'ۺ״̬', 'trade_after_sale_status', 0, 'ۺ״̬', '1', '2022-11-19 20:52:56', '1', '2022-11-19 20:52:56', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (158, 'ۺ', 'trade_after_sale_type', 0, 'ۺ', '1', '2022-11-19 21:04:09', '1', '2022-11-19 21:04:09', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (159, 'ۺķʽ', 'trade_after_sale_way', 0, 'ۺķʽ', '1', '2022-11-19 21:39:04', '1', '2022-11-19 21:39:04', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (160, 'ն', 'terminal', 0, 'ն', '1', '2022-12-10 10:50:50', '1', '2022-12-10 10:53:11', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (161, '׶', 'trade_order_type', 0, '׶', '1', '2022-12-10 16:33:54', '1', '2022-12-10 16:33:54', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (162, '׶״̬', 'trade_order_status', 0, '׶״̬', '1', '2022-12-10 16:48:44', '1', '2022-12-10 16:48:44', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (163, '׶ۺ״̬', 'trade_order_item_after_sale_status', 0, '׶ۺ״̬', '1', '2022-12-10 20:58:08', '1', '2022-12-10 20:58:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (164, 'ںԶظؼƥģʽ', 'mp_auto_reply_request_match', 0, 'ںԶظؼƥģʽ', '1', '2023-01-16 23:29:56', '1', '2023-01-16 23:29:56', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (165, 'ںŵϢ', 'mp_message_type', 0, 'ںŵϢ', '1', '2023-01-17 22:17:09', '1', '2023-01-17 22:17:09', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, 'ʼ״̬', 'system_mail_send_status', 0, 'ʼ״̬', '1', '2023-01-26 09:53:13', '1', '2023-01-26 09:53:13', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, 'վģ', 'system_notify_template_type', 0, 'վģ', '1', '2023-01-28 10:35:10', '1', '2023-01-28 10:35:10', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, 'ɵǰ', 'infra_codegen_front_type', 0, '', '1', '2023-04-12 23:57:52', '1', '2023-04-12 23:57:52', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, 'ݼƷѷʽ', 'trade_delivery_express_charge_mode', 0, '̳ǽģ͹', '1', '2023-05-21 22:45:03', '1', '2023-05-21 22:45:03', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, 'ҵ', 'member_point_biz_type', 0, '', '1', '2023-06-10 12:15:00', '1', '2023-06-28 13:48:20', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, '֧֪ͨ', 'pay_notify_type', 0, NULL, '1', '2023-07-20 12:23:03', '1', '2023-07-20 12:23:03', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (174, 'Աҵ', 'member_experience_biz_type', 0, NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (175, '', 'trade_delivery_type', 0, '', '1', '2023-08-23 00:03:14', '1', '2023-08-23 00:03:14', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (176, 'Ӷģʽ', 'brokerage_enabled_condition', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (177, 'ϵģʽ', 'brokerage_bind_mode', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (178, 'Ӷ', 'brokerage_withdraw_type', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (179, 'Ӷ¼ҵ', 'brokerage_record_biz_type', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (180, 'Ӷ¼״̬', 'brokerage_record_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (181, 'Ӷ״̬', 'brokerage_withdraw_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (182, 'Ӷ', 'brokerage_bank_name', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (183, 'ۼ¼״̬', 'promotion_bargain_record_status', 0, '', '1', '2023-10-05 10:41:08', '1', '2023-10-05 10:41:08', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (184, 'ƴż¼״̬', 'promotion_combination_record_status', 0, '', '1', '2023-10-08 07:24:25', '1', '2023-10-08 07:24:25', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (185, 'ؿ-ؿʽ', 'crm_receivable_return_type', 0, 'ؿ-ؿʽ', '1', '2023-10-18 21:54:10', '1', '2023-10-18 21:54:10', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (186, 'CRM ͻҵ', 'crm_customer_industry', 0, 'CRM ͻҵ', '1', '2023-10-28 22:57:07', '1', '2024-02-18 23:30:22', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (187, 'ͻȼ', 'crm_customer_level', 0, 'CRM ͻȼ', '1', '2023-10-28 22:59:12', '1', '2023-10-28 15:11:16', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (188, 'ͻԴ', 'crm_customer_source', 0, 'CRM ͻԴ', '1', '2023-10-28 23:00:34', '1', '2023-10-28 15:11:16', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (600, 'Banner λ', 'promotion_banner_position', 0, '', '1', '2023-10-08 07:24:25', '1', '2023-11-04 13:04:02', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (601, '罻', 'system_social_type', 0, '', '1', '2023-11-04 13:03:54', '1', '2023-11-04 13:03:54', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (604, 'Ʒ״̬', 'crm_product_status', 0, '', '1', '2023-10-30 21:47:59', '1', '2023-10-30 21:48:45', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (605, 'CRM Ȩ޵ļ', 'crm_permission_level', 0, '', '1', '2023-11-30 09:51:59', '1', '2023-11-30 09:51:59', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (606, 'CRM ״̬', 'crm_audit_status', 0, '', '1', '2023-11-30 18:56:23', '1', '2023-11-30 18:56:23', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (607, 'CRM Ʒλ', 'crm_product_unit', 0, '', '1', '2023-12-05 23:01:51', '1', '2023-12-05 23:01:51', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (608, 'CRM ʽ', 'crm_follow_up_type', 0, '', '1', '2024-01-15 20:48:05', '1', '2024-01-15 20:48:05', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (609, '֧ת', 'pay_transfer_type', 0, '', '1', '2023-10-28 16:27:18', '1', '2023-10-28 16:27:18', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (610, 'ת˶״̬', 'pay_transfer_status', 0, '', '1', '2023-10-28 16:18:32', '1', '2023-10-28 16:18:32', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (611, 'ERP ϸҵ', 'erp_stock_record_biz_type', 0, 'ERP ϸҵ', '1', '2024-02-05 18:07:02', '1', '2024-02-05 18:07:02', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (612, 'ERP ״̬', 'erp_audit_status', 0, '', '1', '2024-02-06 00:00:07', '1', '2024-02-06 00:00:07', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (613, 'BPM ', 'bpm_process_listener_type', 0, '', '1', '2024-03-23 12:52:24', '1', '2024-03-09 15:54:28', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (615, 'BPM ֵ', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (616, 'ʱ', 'date_interval', 0, '', '1', '2024-03-29 22:50:09', '1', '2024-03-29 22:50:09', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (619, 'CRM ̻״̬', 'crm_business_end_status_type', 0, '', '1', '2024-04-13 23:23:00', '1', '2024-04-13 23:23:00', '0', '1970-01-01 00:00:00'); +COMMIT; +SET IDENTITY_INSERT system_dict_type OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_login_log +-- ---------------------------- +CREATE TABLE system_login_log ( - "ID" BIGINT IDENTITY(17,1) NOT NULL, - "NAME" VARCHAR(32) NOT NULL, - "STATUS" TINYINT NOT NULL, - "HANDLER_NAME" VARCHAR(64) NOT NULL, - "HANDLER_PARAM" VARCHAR(255) NULL, - "CRON_EXPRESSION" VARCHAR(32) NOT NULL, - "RETRY_COUNT" INT DEFAULT 0 - NOT NULL, - "RETRY_INTERVAL" INT DEFAULT 0 - NOT NULL, - "MONITOR_TIMEOUT" INT DEFAULT 0 - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + log_type bigint NOT NULL, + trace_id varchar(64) DEFAULT '' NULL, + user_id bigint DEFAULT 0 NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + username varchar(50) DEFAULT '' NULL, + result smallint NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_JOB_LOG" + +COMMENT ON COLUMN system_login_log.id IS 'ID'; +COMMENT ON COLUMN system_login_log.log_type IS '־'; +COMMENT ON COLUMN system_login_log.trace_id IS '·׷ٱ'; +COMMENT ON COLUMN system_login_log.user_id IS 'û'; +COMMENT ON COLUMN system_login_log.user_type IS 'û'; +COMMENT ON COLUMN system_login_log.username IS 'û˺'; +COMMENT ON COLUMN system_login_log.result IS '½'; +COMMENT ON COLUMN system_login_log.user_ip IS 'û IP'; +COMMENT ON COLUMN system_login_log.user_agent IS ' UA'; +COMMENT ON COLUMN system_login_log.creator IS ''; +COMMENT ON COLUMN system_login_log.create_time IS 'ʱ'; +COMMENT ON COLUMN system_login_log.updater IS ''; +COMMENT ON COLUMN system_login_log.update_time IS 'ʱ'; +COMMENT ON COLUMN system_login_log.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_login_log.tenant_id IS '⻧'; +COMMENT ON TABLE system_login_log IS 'ϵͳʼ¼'; + +-- ---------------------------- +-- Table structure for system_mail_account +-- ---------------------------- +CREATE TABLE system_mail_account ( - "ID" BIGINT IDENTITY(168767,1) NOT NULL, - "JOB_ID" BIGINT NOT NULL, - "HANDLER_NAME" VARCHAR(64) NOT NULL, - "HANDLER_PARAM" VARCHAR(255) NULL, - "EXECUTE_INDEX" TINYINT DEFAULT 1 - NOT NULL, - "BEGIN_TIME" TIMESTAMP(0) NOT NULL, - "END_TIME" TIMESTAMP(0) NULL, - "DURATION" INT NULL, - "STATUS" TINYINT NOT NULL, - "RESULT" VARCHAR(4000) DEFAULT '' - NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + mail varchar(255) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) NOT NULL, + host varchar(255) NOT NULL, + port int NOT NULL, + ssl_enable bit DEFAULT '0' NOT NULL, + starttls_enable bit DEFAULT '0' NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."INFRA_TEST_DEMO" + +COMMENT ON COLUMN system_mail_account.id IS ''; +COMMENT ON COLUMN system_mail_account.mail IS ''; +COMMENT ON COLUMN system_mail_account.username IS 'û'; +COMMENT ON COLUMN system_mail_account.password IS ''; +COMMENT ON COLUMN system_mail_account.host IS 'SMTP '; +COMMENT ON COLUMN system_mail_account.port IS 'SMTP ˿'; +COMMENT ON COLUMN system_mail_account.ssl_enable IS 'Ƿ SSL'; +COMMENT ON COLUMN system_mail_account.starttls_enable IS 'Ƿ STARTTLS'; +COMMENT ON COLUMN system_mail_account.creator IS ''; +COMMENT ON COLUMN system_mail_account.create_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_account.updater IS ''; +COMMENT ON COLUMN system_mail_account.update_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_account.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_mail_account IS '˺ű'; + +-- ---------------------------- +-- Records of system_mail_account +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_mail_account ON; +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', '2023-01-25 17:39:52', '1', '2024-04-24 09:13:56', '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', '2023-01-26 01:26:03', '1', '2023-04-12 22:39:38', '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, '0', '0', '1', '2023-01-27 15:06:38', '1', '2023-01-27 07:08:36', '1'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, '7685413x@qq.com', '2', '3', '4', 5, '1', '0', '1', '2023-04-12 23:05:06', '1', '2023-04-12 15:05:11', '1'); +COMMIT; +SET IDENTITY_INSERT system_mail_account OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_mail_log +-- ---------------------------- +CREATE TABLE system_mail_log ( - "ID" BIGINT IDENTITY(1,1) NOT NULL, - "NAME" VARCHAR(100) DEFAULT '' - NOT NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "TYPE" TINYINT NOT NULL, - "CATEGORY" TINYINT NOT NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint DEFAULT NULL NULL, + user_type smallint DEFAULT NULL NULL, + to_mail varchar(255) NOT NULL, + account_id bigint NOT NULL, + from_mail varchar(255) NOT NULL, + template_id bigint NOT NULL, + template_code varchar(63) NOT NULL, + template_nickname varchar(255) DEFAULT NULL NULL, + template_title varchar(255) NOT NULL, + template_content varchar(10240) NOT NULL, + template_params varchar(255) NOT NULL, + send_status smallint DEFAULT 0 NOT NULL, + send_time datetime DEFAULT NULL NULL, + send_message_id varchar(255) DEFAULT NULL NULL, + send_exception varchar(4096) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."MEMBER_USER" + +COMMENT ON COLUMN system_mail_log.id IS ''; +COMMENT ON COLUMN system_mail_log.user_id IS 'û'; +COMMENT ON COLUMN system_mail_log.user_type IS 'û'; +COMMENT ON COLUMN system_mail_log.to_mail IS 'ַ'; +COMMENT ON COLUMN system_mail_log.account_id IS '˺ű'; +COMMENT ON COLUMN system_mail_log.from_mail IS 'ַ'; +COMMENT ON COLUMN system_mail_log.template_id IS 'ģ'; +COMMENT ON COLUMN system_mail_log.template_code IS 'ģ'; +COMMENT ON COLUMN system_mail_log.template_nickname IS 'ģ淢'; +COMMENT ON COLUMN system_mail_log.template_title IS 'ʼ'; +COMMENT ON COLUMN system_mail_log.template_content IS 'ʼ'; +COMMENT ON COLUMN system_mail_log.template_params IS 'ʼ'; +COMMENT ON COLUMN system_mail_log.send_status IS '״̬'; +COMMENT ON COLUMN system_mail_log.send_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_log.send_message_id IS 'ͷصϢ ID'; +COMMENT ON COLUMN system_mail_log.send_exception IS '쳣'; +COMMENT ON COLUMN system_mail_log.creator IS ''; +COMMENT ON COLUMN system_mail_log.create_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_log.updater IS ''; +COMMENT ON COLUMN system_mail_log.update_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_log.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_mail_log IS 'ʼ־'; + +-- ---------------------------- +-- Table structure for system_mail_template +-- ---------------------------- +CREATE TABLE system_mail_template ( - "ID" BIGINT IDENTITY(247,1) NOT NULL, - "NICKNAME" VARCHAR(30) DEFAULT '' - NOT NULL, - "AVATAR" VARCHAR(255) DEFAULT '' - NOT NULL, - "STATUS" TINYINT NOT NULL, - "MOBILE" VARCHAR(11) NOT NULL, - "PASSWORD" VARCHAR(100) DEFAULT '' - NOT NULL, - "REGISTER_IP" VARCHAR(32) NOT NULL, - "LOGIN_IP" VARCHAR(50) DEFAULT '' - NULL, - "LOGIN_DATE" TIMESTAMP(0) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(63) NOT NULL, + code varchar(63) NOT NULL, + account_id bigint NOT NULL, + nickname varchar(255) DEFAULT NULL NULL, + title varchar(255) NOT NULL, + content varchar(10240) NOT NULL, + params varchar(255) NOT NULL, + status smallint NOT NULL, + remark varchar(255) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_APP" + +COMMENT ON COLUMN system_mail_template.id IS ''; +COMMENT ON COLUMN system_mail_template.name IS 'ģ'; +COMMENT ON COLUMN system_mail_template.code IS 'ģ'; +COMMENT ON COLUMN system_mail_template.account_id IS '͵˺ű'; +COMMENT ON COLUMN system_mail_template.nickname IS ''; +COMMENT ON COLUMN system_mail_template.title IS 'ģ'; +COMMENT ON COLUMN system_mail_template.content IS 'ģ'; +COMMENT ON COLUMN system_mail_template.params IS ''; +COMMENT ON COLUMN system_mail_template.status IS '״̬'; +COMMENT ON COLUMN system_mail_template.remark IS 'ע'; +COMMENT ON COLUMN system_mail_template.creator IS ''; +COMMENT ON COLUMN system_mail_template.create_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_template.updater IS ''; +COMMENT ON COLUMN system_mail_template.update_time IS 'ʱ'; +COMMENT ON COLUMN system_mail_template.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_mail_template IS 'ʼģ'; + +-- ---------------------------- +-- Records of system_mail_template +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_mail_template ON; +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '̨ûŵ¼', 'admin-sms-login', 1, '', 'Ҳ', '

֤{code}{name}

', '["code","name"]', 0, '3', '1', '2021-10-11 08:10:00', '1', '2023-12-02 19:51:14', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, 'ģ', 'test_01', 2, 'ܵ', 'һ', '

{key01}


ǵĻϽ {key02} һ£

', '["key01","key02"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2023-01-27 10:32:16', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2023-01-27 16:34:49', '0'); +COMMIT; +SET IDENTITY_INSERT system_mail_template OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_menu +-- ---------------------------- +CREATE TABLE system_menu ( - "ID" BIGINT IDENTITY(7,1) NOT NULL, - "NAME" VARCHAR(64) NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "PAY_NOTIFY_URL" VARCHAR(1024) NOT NULL, - "REFUND_NOTIFY_URL" VARCHAR(1024) NOT NULL, - "MERCHANT_ID" BIGINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(50) NOT NULL, + permission varchar(100) DEFAULT '' NULL, + type smallint NOT NULL, + sort int DEFAULT 0 NOT NULL, + parent_id bigint DEFAULT 0 NOT NULL, + path varchar(200) DEFAULT '' NULL, + icon varchar(100) DEFAULT '#' NULL, + component varchar(255) DEFAULT NULL NULL, + component_name varchar(255) DEFAULT NULL NULL, + status smallint DEFAULT 0 NOT NULL, + visible bit DEFAULT '1' NOT NULL, + keep_alive bit DEFAULT '1' NOT NULL, + always_show bit DEFAULT '1' NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_CHANNEL" + +COMMENT ON COLUMN system_menu.id IS '˵ID'; +COMMENT ON COLUMN system_menu.name IS '˵'; +COMMENT ON COLUMN system_menu.permission IS 'Ȩޱʶ'; +COMMENT ON COLUMN system_menu.type IS '˵'; +COMMENT ON COLUMN system_menu.sort IS 'ʾ˳'; +COMMENT ON COLUMN system_menu.parent_id IS '˵ID'; +COMMENT ON COLUMN system_menu.path IS '·ɵַ'; +COMMENT ON COLUMN system_menu.icon IS '˵ͼ'; +COMMENT ON COLUMN system_menu.component IS '·'; +COMMENT ON COLUMN system_menu.component_name IS ''; +COMMENT ON COLUMN system_menu.status IS '˵״̬'; +COMMENT ON COLUMN system_menu.visible IS 'Ƿɼ'; +COMMENT ON COLUMN system_menu.keep_alive IS 'Ƿ񻺴'; +COMMENT ON COLUMN system_menu.always_show IS 'Ƿʾ'; +COMMENT ON COLUMN system_menu.creator IS ''; +COMMENT ON COLUMN system_menu.create_time IS 'ʱ'; +COMMENT ON COLUMN system_menu.updater IS ''; +COMMENT ON COLUMN system_menu.update_time IS 'ʱ'; +COMMENT ON COLUMN system_menu.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_menu IS '˵Ȩޱ'; + +-- ---------------------------- +-- Records of system_menu +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_menu ON; +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, 'ϵͳ', '', 1, 10, 0, '/system', 'ep:tools', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:04:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, 'ʩ', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-03-01 08:28:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5, 'OA ʾ', '', 1, 40, 1185, 'oa', 'fa:road', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-09-20 16:26:19', '1', '2024-02-29 12:38:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (100, 'û', 'system:user:list', 2, 1, 1, 'user', 'ep:avatar', 'system/user/index', 'SystemUser', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:02:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (101, 'ɫ', '', 2, 2, 1, 'role', 'ep:user', 'system/role/index', 'SystemRole', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (102, '˵', '', 2, 3, 1, 'menu', 'ep:menu', 'system/menu/index', 'SystemMenu', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (103, 'Ź', '', 2, 4, 1, 'dept', 'fa:address-card', 'system/dept/index', 'SystemDept', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (104, 'λ', '', 2, 5, 1, 'post', 'fa:address-book-o', 'system/post/index', 'SystemPost', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (105, 'ֵ', '', 2, 6, 1, 'dict', 'ep:collection', 'system/dict/index', 'SystemDictType', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:07:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (106, 'ù', '', 2, 8, 2, 'config', 'fa:connectdevelop', 'infra/config/index', 'InfraConfig', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:02:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (107, '֪ͨ', '', 2, 4, 2739, 'notice', 'ep:takeaway-box', 'system/notice/index', 'SystemNotice', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-22 23:56:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (108, '־', '', 1, 9, 1, 'log', 'ep:document-copy', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:08:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (109, 'ƹ', '', 2, 2, 1261, 'token', 'fa:key', 'system/oauth2/token/index', 'SystemTokenClient', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:13:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (110, 'ʱ', '', 2, 7, 2, 'job', 'fa-solid:tasks', 'infra/job/index', 'InfraJob', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:57:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (111, 'MySQL ', '', 2, 1, 2740, 'druid', 'fa-solid:box', 'infra/druid/index', 'InfraDruid', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:05:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (112, 'Java ', '', 2, 3, 2740, 'admin-server', 'ep:coffee-cup', 'infra/server/index', 'InfraAdminServer', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:06:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (113, 'Redis ', '', 2, 2, 2740, 'redis', 'fa:reddit-square', 'infra/redis/index', 'InfraRedis', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:06:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (114, '', 'infra:build:list', 2, 2, 2, 'build', 'fa:wpforms', 'infra/build/index', 'InfraBuild', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:51:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (115, '', 'infra:codegen:query', 2, 1, 2, 'codegen', 'ep:document-copy', 'infra/codegen/index', 'InfraCodegen', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:51:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (116, 'API ӿ', 'infra:swagger:list', 2, 3, 2, 'swagger', 'fa:fighter-jet', 'infra/swagger/index', 'InfraSwagger', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:01:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (500, '־', '', 2, 1, 108, 'operate-log', 'ep:position', 'system/operatelog/index', 'SystemOperateLog', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:09:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (501, '¼־', '', 2, 2, 108, 'login-log', 'ep:promotion', 'system/loginlog/index', 'SystemLoginLog', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:10:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1001, 'ûѯ', 'system:user:query', 3, 1, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1002, 'û', 'system:user:create', 3, 2, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1003, 'û޸', 'system:user:update', 3, 3, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1004, 'ûɾ', 'system:user:delete', 3, 4, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1005, 'û', 'system:user:export', 3, 5, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1006, 'û', 'system:user:import', 3, 6, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1007, '', 'system:user:update-password', 3, 7, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1008, 'ɫѯ', 'system:role:query', 3, 1, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1009, 'ɫ', 'system:role:create', 3, 2, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1010, 'ɫ޸', 'system:role:update', 3, 3, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1011, 'ɫɾ', 'system:role:delete', 3, 4, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1012, 'ɫ', 'system:role:export', 3, 5, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1013, '˵ѯ', 'system:menu:query', 3, 1, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1014, '˵', 'system:menu:create', 3, 2, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1015, '˵޸', 'system:menu:update', 3, 3, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1016, '˵ɾ', 'system:menu:delete', 3, 4, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1017, 'Ųѯ', 'system:dept:query', 3, 1, 103, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1018, '', 'system:dept:create', 3, 2, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1019, '޸', 'system:dept:update', 3, 3, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1020, 'ɾ', 'system:dept:delete', 3, 4, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1021, 'λѯ', 'system:post:query', 3, 1, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1022, 'λ', 'system:post:create', 3, 2, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1023, 'λ޸', 'system:post:update', 3, 3, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1024, 'λɾ', 'system:post:delete', 3, 4, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1025, 'λ', 'system:post:export', 3, 5, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1026, 'ֵѯ', 'system:dict:query', 3, 1, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1027, 'ֵ', 'system:dict:create', 3, 2, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1028, 'ֵ޸', 'system:dict:update', 3, 3, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1029, 'ֵɾ', 'system:dict:delete', 3, 4, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1030, 'ֵ䵼', 'system:dict:export', 3, 5, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1031, 'òѯ', 'infra:config:query', 3, 1, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1032, '', 'infra:config:create', 3, 2, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1033, '޸', 'infra:config:update', 3, 3, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1034, 'ɾ', 'infra:config:delete', 3, 4, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1035, 'õ', 'infra:config:export', 3, 5, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1036, 'ѯ', 'system:notice:query', 3, 1, 107, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1037, '', 'system:notice:create', 3, 2, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1038, '޸', 'system:notice:update', 3, 3, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1039, 'ɾ', 'system:notice:delete', 3, 4, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1040, 'ѯ', 'system:operate-log:query', 3, 1, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1042, '־', 'system:operate-log:export', 3, 2, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1043, '¼ѯ', 'system:login-log:query', 3, 1, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1045, '־', 'system:login-log:export', 3, 3, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1046, 'б', 'system:oauth2-token:page', 3, 1, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-05-09 23:54:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1048, 'ɾ', 'system:oauth2-token:delete', 3, 2, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-05-09 23:54:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1050, '', 'infra:job:create', 3, 2, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1051, '޸', 'infra:job:update', 3, 3, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1052, 'ɾ', 'infra:job:delete', 3, 4, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1053, '״̬޸', 'infra:job:update', 3, 5, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1054, '񵼳', 'infra:job:export', 3, 7, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1056, '޸', 'infra:codegen:update', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1057, 'ɾ', 'infra:codegen:delete', 3, 3, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1058, '', 'infra:codegen:create', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1059, 'Ԥ', 'infra:codegen:preview', 3, 4, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1060, 'ɴ', 'infra:codegen:download', 3, 5, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1063, 'ýɫ˵Ȩ', 'system:permission:assign-role-menu', 3, 6, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-06 17:53:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1064, 'ýɫȨ', 'system:permission:assign-role-data-scope', 3, 7, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-06 17:56:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1065, 'ûɫ', 'system:permission:assign-user-role', 3, 8, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-07 10:23:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1066, ' Redis Ϣ', 'infra:redis:get-monitor-info', 3, 1, 113, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-26 01:02:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1067, ' Redis Key б', 'infra:redis:get-key-list', 3, 2, 113, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-26 01:02:52', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1070, 'ɰ', '', 1, 1, 2, 'demo', 'ep:aim', 'infra/testDemo/index', NULL, 0, '1', '1', '1', '', '2021-02-06 12:42:49', '1', '2023-11-15 23:45:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1075, '񴥷', 'infra:job:trigger', 3, 8, 110, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-07 13:03:10', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1077, '·׷', '', 2, 4, 2740, 'skywalking', 'fa:eye', 'infra/skywalking/index', 'InfraSkyWalking', 0, '1', '1', '1', '', '2021-02-08 20:41:31', '1', '2024-04-23 00:07:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1078, '־', '', 2, 1, 1083, 'api-access-log', 'ep:place', 'infra/apiAccessLog/index', 'InfraApiAccessLog', 0, '1', '1', '1', '', '2021-02-26 01:32:59', '1', '2024-02-29 08:54:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1082, '־', 'infra:api-access-log:export', 3, 2, 1078, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 01:32:59', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1083, 'API ־', '', 2, 4, 2, 'log', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '', '2021-02-26 02:18:24', '1', '2024-04-22 23:58:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1084, '־', 'infra:api-error-log:query', 2, 2, 1083, 'api-error-log', 'ep:warning-filled', 'infra/apiErrorLog/index', 'InfraApiErrorLog', 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2024-02-29 08:55:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1085, '־', 'infra:api-error-log:update-status', 3, 2, 1084, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1086, '־', 'infra:api-error-log:export', 3, 3, 1084, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1087, 'ѯ', 'infra:job:query', 3, 1, 110, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:26:19', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1088, '־ѯ', 'infra:api-access-log:query', 3, 1, 1078, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:28:04', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1089, '־ѯ', 'infra:api-error-log:query', 3, 1, 1084, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:29:09', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1090, 'ļб', '', 2, 5, 1243, 'file', 'ep:upload-filled', 'infra/file/index', 'InfraFile', 0, '1', '1', '1', '', '2021-03-12 20:16:20', '1', '2024-02-29 08:53:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1091, 'ļѯ', 'infra:file:query', 3, 1, 1090, '', '', '', NULL, 0, '1', '1', '1', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1092, 'ļɾ', 'infra:file:delete', 3, 4, 1090, '', '', '', NULL, 0, '1', '1', '1', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1093, 'Ź', '', 1, 1, 2739, 'sms', 'ep:message', NULL, NULL, 0, '1', '1', '1', '1', '2021-04-05 01:10:16', '1', '2024-04-22 23:56:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1094, '', '', 2, 0, 1093, 'sms-channel', 'fa:stack-exchange', 'system/sms/channel/index', 'SystemSmsChannel', 0, '1', '1', '1', '', '2021-04-01 11:07:15', '1', '2024-02-29 01:15:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1095, 'ѯ', 'system:sms-channel:query', 3, 1, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1096, '', 'system:sms-channel:create', 3, 2, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1097, '', 'system:sms-channel:update', 3, 3, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1098, 'ɾ', 'system:sms-channel:delete', 3, 4, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1100, 'ģ', '', 2, 1, 1093, 'sms-template', 'ep:connection', 'system/sms/template/index', 'SystemSmsTemplate', 0, '1', '1', '1', '', '2021-04-01 17:35:17', '1', '2024-02-29 01:16:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1101, 'ģѯ', 'system:sms-template:query', 3, 1, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1102, 'ģ崴', 'system:sms-template:create', 3, 2, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1103, 'ģ', 'system:sms-template:update', 3, 3, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1104, 'ģɾ', 'system:sms-template:delete', 3, 4, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1105, 'ģ嵼', 'system:sms-template:export', 3, 5, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1106, 'ͲԶ', 'system:sms-template:send-sms', 3, 6, 1100, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-04-11 00:26:40', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1107, '־', '', 2, 2, 1093, 'sms-log', 'fa:edit', 'system/sms/log/index', 'SystemSmsLog', 0, '1', '1', '1', '', '2021-04-11 08:37:05', '1', '2024-02-29 08:49:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1108, '־ѯ', 'system:sms-log:query', 3, 1, 1107, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1109, '־', 'system:sms-log:export', 3, 5, 1107, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1117, '֧', '', 1, 30, 0, '/pay', 'ep:money', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-25 16:43:41', '1', '2024-02-29 08:58:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1118, 'ٲѯ', '', 2, 0, 5, 'leave', 'fa:leanpub', 'bpm/oa/leave/index', 'BpmOALeave', 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2024-02-29 12:38:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1119, 'ѯ', 'bpm:oa-leave:query', 3, 1, 1118, '', '', '', NULL, 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1120, '봴', 'bpm:oa-leave:create', 3, 2, 1118, '', '', '', NULL, 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1126, 'ӦϢ', '', 2, 1, 1117, 'app', 'fa:apple', 'pay/app/index', 'PayApp', 0, '1', '1', '1', '', '2021-11-10 01:13:30', '1', '2024-02-29 08:59:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1127, '֧ӦϢѯ', 'pay:app:query', 3, 1, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1128, '֧ӦϢ', 'pay:app:create', 3, 2, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1129, '֧ӦϢ', 'pay:app:update', 3, 3, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1130, '֧ӦϢɾ', 'pay:app:delete', 3, 4, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1132, 'Կ', 'pay:channel:parsing', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-11-08 15:15:47', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1133, '֧̻Ϣѯ', 'pay:merchant:query', 3, 1, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1134, '֧̻Ϣ', 'pay:merchant:create', 3, 2, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1135, '֧̻Ϣ', 'pay:merchant:update', 3, 3, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1136, '֧̻Ϣɾ', 'pay:merchant:delete', 3, 4, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1137, '֧̻Ϣ', 'pay:merchant:export', 3, 5, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1138, '⻧б', '', 2, 0, 1224, 'list', 'ep:house', 'system/tenant/index', 'SystemTenant', 0, '1', '1', '1', '', '2021-12-14 12:31:43', '1', '2024-02-29 01:01:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1139, '⻧ѯ', 'system:tenant:query', 3, 1, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1140, '⻧', 'system:tenant:create', 3, 2, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1141, '⻧', 'system:tenant:update', 3, 3, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1142, '⻧ɾ', 'system:tenant:delete', 3, 4, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1143, '⻧', 'system:tenant:export', 3, 5, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1150, 'Կ', '', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-11-08 15:15:47', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1161, '˿', '', 2, 3, 1117, 'refund', 'fa:registered', 'pay/refund/index', 'PayRefund', 0, '1', '1', '1', '', '2021-12-25 08:29:07', '1', '2024-02-29 08:59:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1162, '˿ѯ', 'pay:refund:query', 3, 1, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1163, '˿', 'pay:refund:create', 3, 2, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1164, '˿', 'pay:refund:update', 3, 3, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1165, '˿ɾ', 'pay:refund:delete', 3, 4, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1166, '˿', 'pay:refund:export', 3, 5, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1173, '֧', '', 2, 2, 1117, 'order', 'fa:cc-paypal', 'pay/order/index', 'PayOrder', 0, '1', '1', '1', '', '2021-12-25 08:49:43', '1', '2024-02-29 08:59:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1174, '֧ѯ', 'pay:order:query', 3, 1, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1175, '֧', 'pay:order:create', 3, 2, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1176, '֧', 'pay:order:update', 3, 3, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1177, '֧ɾ', 'pay:order:delete', 3, 4, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1178, '֧', 'pay:order:export', 3, 5, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1185, '', '', 1, 50, 0, '/bpm', 'fa:medium', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-30 20:26:36', '1', '2024-02-29 12:43:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1186, '̹', '', 1, 10, 1185, 'manager', 'fa:dedent', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-30 20:28:30', '1', '2024-02-29 12:36:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1187, '̱', '', 2, 2, 1186, 'form', 'fa:hdd-o', 'bpm/form/index', 'BpmForm', 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2024-03-19 12:25:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1188, 'ѯ', 'bpm:form:query', 3, 1, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1189, '', 'bpm:form:create', 3, 2, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1190, '', 'bpm:form:update', 3, 3, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1191, 'ɾ', 'bpm:form:delete', 3, 4, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1192, '', 'bpm:form:export', 3, 5, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1193, 'ģ', '', 2, 1, 1186, 'model', 'fa-solid:project-diagram', 'bpm/model/index', 'BpmModel', 0, '1', '1', '1', '1', '2021-12-31 23:24:58', '1', '2024-03-19 12:25:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1194, 'ģͲѯ', 'bpm:model:query', 3, 1, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:10', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1195, 'ģʹ', 'bpm:model:create', 3, 2, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1196, 'ģ͵', 'bpm:model:import', 3, 3, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:35', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1197, 'ģ͸', 'bpm:model:update', 3, 4, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:02:28', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1198, 'ģɾ', 'bpm:model:delete', 3, 5, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:02:43', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1199, 'ģͷ', 'bpm:model:deploy', 3, 6, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:03:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1200, '', '', 2, 20, 1185, 'task', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '1', '2022-01-07 23:51:48', '1', '2024-03-21 00:33:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1201, 'ҵ', '', 2, 1, 1200, 'my', 'fa-solid:book', 'bpm/processInstance/index', 'BpmProcessInstanceMy', 0, '1', '1', '1', '', '2022-01-07 15:53:44', '1', '2024-03-21 23:52:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1202, 'ʵIJѯ', 'bpm:process-instance:query', 3, 1, 1201, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-07 15:53:44', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1207, '', '', 2, 10, 1200, 'todo', 'fa:slack', 'bpm/task/todo/index', 'BpmTodoTask', 0, '1', '1', '1', '1', '2022-01-08 10:33:37', '1', '2024-02-29 12:37:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1208, 'Ѱ', '', 2, 20, 1200, 'done', 'fa:delicious', 'bpm/task/done/index', 'BpmDoneTask', 0, '1', '1', '1', '1', '2022-01-08 10:34:13', '1', '2024-02-29 12:37:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1209, 'û', '', 2, 4, 1186, 'user-group', 'fa:user-secret', 'bpm/group/index', 'BpmUserGroup', 0, '1', '1', '1', '', '2022-01-14 02:14:20', '1', '2024-03-21 23:55:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1210, 'ûѯ', 'bpm:user-group:query', 3, 1, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1211, 'û鴴', 'bpm:user-group:create', 3, 2, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1212, 'û', 'bpm:user-group:update', 3, 3, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1213, 'ûɾ', 'bpm:user-group:delete', 3, 4, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1215, '̶ѯ', 'bpm:process-definition:query', 3, 10, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:21:43', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1216, 'ѯ', 'bpm:task-assign-rule:query', 3, 20, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:26:53', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1217, '򴴽', 'bpm:task-assign-rule:create', 3, 21, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:28:15', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1218, '', 'bpm:task-assign-rule:update', 3, 22, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:28:41', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1219, 'ʵĴ', 'bpm:process-instance:create', 3, 2, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:36:15', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1220, 'ʵȡ', 'bpm:process-instance:cancel', 3, 3, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:36:33', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1221, 'IJѯ', 'bpm:task:query', 3, 1, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:38:52', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1222, 'ĸ', 'bpm:task:update', 3, 2, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:39:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1224, '⻧', '', 2, 0, 1, 'tenant', 'fa-solid:house-user', NULL, NULL, 0, '1', '1', '1', '1', '2022-02-20 01:41:13', '1', '2024-02-29 00:59:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1225, '⻧ײ', '', 2, 0, 1224, 'package', 'fa:bars', 'system/tenantPackage/index', 'SystemTenantPackage', 0, '1', '1', '1', '', '2022-02-19 17:44:06', '1', '2024-02-29 01:01:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1226, '⻧ײͲѯ', 'system:tenant-package:query', 3, 1, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1227, '⻧ײʹ', 'system:tenant-package:create', 3, 2, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1228, '⻧ײ͸', 'system:tenant-package:update', 3, 3, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1229, '⻧ײɾ', 'system:tenant-package:delete', 3, 4, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1237, 'ļ', '', 2, 0, 1243, 'file-config', 'fa-solid:file-signature', 'infra/fileConfig/index', 'InfraFileConfig', 0, '1', '1', '1', '', '2022-03-15 14:35:28', '1', '2024-02-29 08:52:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1238, 'ļòѯ', 'infra:file-config:query', 3, 1, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1239, 'ļô', 'infra:file-config:create', 3, 2, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1240, 'ļø', 'infra:file-config:update', 3, 3, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1241, 'ļɾ', 'infra:file-config:delete', 3, 4, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1242, 'ļõ', 'infra:file-config:export', 3, 5, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1243, 'ļ', '', 2, 6, 2, 'file', 'ep:files', NULL, '', 0, '1', '1', '1', '1', '2022-03-16 23:47:40', '1', '2024-04-23 00:02:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1254, '߶̬', '', 1, 0, 0, 'https://www.iocoder.cn', 'ep:avatar', NULL, NULL, 0, '1', '1', '1', '1', '2022-04-23 01:03:15', '1', '2023-12-08 23:40:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1255, 'Դ', '', 2, 1, 2, 'data-source-config', 'ep:data-analysis', 'infra/dataSourceConfig/index', 'InfraDataSourceConfig', 0, '1', '1', '1', '', '2022-04-27 14:37:32', '1', '2024-02-29 08:51:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1256, 'Դòѯ', 'infra:data-source-config:query', 3, 1, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1257, 'Դô', 'infra:data-source-config:create', 3, 2, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1258, 'Դø', 'infra:data-source-config:update', 3, 3, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1259, 'Դɾ', 'infra:data-source-config:delete', 3, 4, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1260, 'Դõ', 'infra:data-source-config:export', 3, 5, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1261, 'OAuth 2.0', '', 2, 10, 1, 'oauth2', 'fa:dashcube', NULL, NULL, 0, '1', '1', '1', '1', '2022-05-09 23:38:17', '1', '2024-02-29 01:12:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1263, 'Ӧù', '', 2, 0, 1261, 'oauth2/application', 'fa:hdd-o', 'system/oauth2/client/index', 'SystemOAuth2Client', 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2024-02-29 01:13:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1264, 'ͻ˲ѯ', 'system:oauth2-client:query', 3, 1, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1265, 'ͻ˴', 'system:oauth2-client:create', 3, 2, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1266, 'ͻ˸', 'system:oauth2-client:update', 3, 3, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1267, 'ͻɾ', 'system:oauth2-client:delete', 3, 4, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1281, '', '', 2, 40, 0, '/report', 'ep:pie-chart', NULL, NULL, 0, '1', '1', '1', '1', '2022-07-10 20:22:15', '1', '2024-02-29 12:33:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1282, '', '', 2, 1, 1281, 'jimu-report', 'ep:trend-charts', 'report/jmreport/index', 'GoView', 0, '1', '1', '1', '1', '2022-07-10 20:26:36', '1', '2024-02-29 12:33:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2000, 'Ʒ', '', 1, 60, 2362, 'product', 'fa:product-hunt', NULL, NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '1', '2023-09-30 11:52:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2002, 'Ʒ', '', 2, 2, 2000, 'category', 'ep:cellphone', 'mall/product/category/index', 'ProductCategory', 0, '1', '1', '1', '', '2022-07-29 15:53:53', '1', '2023-08-21 10:27:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2003, 'ѯ', 'product:category:query', 3, 1, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2004, 'ഴ', 'product:category:create', 3, 2, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2005, '', 'product:category:update', 3, 3, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2006, 'ɾ', 'product:category:delete', 3, 4, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2008, 'ƷƷ', '', 2, 3, 2000, 'brand', 'ep:chicken', 'mall/product/brand/index', 'ProductBrand', 0, '1', '1', '1', '', '2022-07-30 13:52:44', '1', '2023-08-21 10:27:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2009, 'ƷƲѯ', 'product:brand:query', 3, 1, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2010, 'Ʒƴ', 'product:brand:create', 3, 2, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2011, 'ƷƸ', 'product:brand:update', 3, 3, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2012, 'Ʒɾ', 'product:brand:delete', 3, 4, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, 'Ʒб', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, '1', '1', '1', '', '2022-07-30 14:22:58', '1', '2023-08-21 10:27:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2015, 'Ʒѯ', 'product:spu:query', 3, 1, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2016, 'Ʒ', 'product:spu:create', 3, 2, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2017, 'Ʒ', 'product:spu:update', 3, 3, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2018, 'Ʒɾ', 'product:spu:delete', 3, 4, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2019, 'Ʒ', '', 2, 4, 2000, 'property', 'ep:cold-drink', 'mall/product/property/index', 'ProductProperty', 0, '1', '1', '1', '', '2022-08-01 14:55:35', '1', '2023-08-26 11:01:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2020, 'ѯ', 'product:property:query', 3, 1, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2021, '񴴽', 'product:property:create', 3, 2, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2022, '', 'product:property:update', 3, 3, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2023, 'ɾ', 'product:property:delete', 3, 4, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2025, 'Banner', '', 2, 100, 2387, 'banner', 'fa:bandcamp', 'mall/promotion/banner/index', NULL, 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2026, 'Bannerѯ', 'promotion:banner:query', 3, 1, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2027, 'Banner', 'promotion:banner:create', 3, 2, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2028, 'Banner', 'promotion:banner:update', 3, 3, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2029, 'Bannerɾ', 'promotion:banner:delete', 3, 4, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2030, 'Ӫ', '', 1, 70, 2362, 'promotion', 'ep:present', NULL, NULL, 0, '1', '1', '1', '1', '2022-10-31 21:25:09', '1', '2023-09-30 11:54:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2032, 'Ż݄б', '', 2, 1, 2365, 'template', 'ep:discount', 'mall/promotion/coupon/template/index', 'PromotionCouponTemplate', 0, '1', '1', '1', '', '2022-10-31 22:27:14', '1', '2023-10-03 12:40:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2033, 'Ż݄ģѯ', 'promotion:coupon-template:query', 3, 1, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2034, 'Ż݄ģ崴', 'promotion:coupon-template:create', 3, 2, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2035, 'Ż݄ģ', 'promotion:coupon-template:update', 3, 3, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2036, 'Ż݄ģɾ', 'promotion:coupon-template:delete', 3, 4, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2038, 'ȡ¼', '', 2, 2, 2365, 'list', 'ep:collection-tag', 'mall/promotion/coupon/index', 'PromotionCoupon', 0, '1', '1', '1', '', '2022-11-03 23:21:31', '1', '2023-10-03 12:55:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2039, 'Ż݄ѯ', 'promotion:coupon:query', 3, 1, 2038, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2040, 'Ż݄ɾ', 'promotion:coupon:delete', 3, 4, 2038, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2041, '', '', 2, 10, 2390, 'reward-activity', 'ep:goblet-square-full', 'mall/promotion/rewardActivity/index', 'PromotionRewardActivity', 0, '1', '1', '1', '', '2022-11-04 23:47:49', '1', '2023-10-21 19:24:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2042, 'ͻѯ', 'promotion:reward-activity:query', 3, 1, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2043, 'ͻ', 'promotion:reward-activity:create', 3, 2, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2044, 'ͻ', 'promotion:reward-activity:update', 3, 3, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2045, 'ͻɾ', 'promotion:reward-activity:delete', 3, 4, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2046, 'ͻر', 'promotion:reward-activity:close', 3, 5, 2041, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-11-05 10:42:53', '1', '2022-11-05 10:42:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2047, 'ʱۿ', '', 2, 7, 2390, 'discount-activity', 'ep:timer', 'mall/promotion/discountActivity/index', 'PromotionDiscountActivity', 0, '1', '1', '1', '', '2022-11-05 17:12:15', '1', '2023-10-21 19:24:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2048, 'ʱۿۻѯ', 'promotion:discount-activity:query', 3, 1, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2049, 'ʱۿۻ', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2050, 'ʱۿۻ', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2051, 'ʱۿۻɾ', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2052, 'ʱۿۻر', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2059, 'ɱƷ', '', 2, 2, 2209, 'activity', 'ep:basketball', 'mall/promotion/seckill/activity/index', 'PromotionSeckillActivity', 0, '1', '1', '1', '', '2022-11-06 22:24:49', '1', '2023-06-24 18:57:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2060, 'ɱѯ', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2061, 'ɱ', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2062, 'ɱ', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2063, 'ɱɾ', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2066, 'ɱʱ', '', 2, 1, 2209, 'config', 'ep:baseball', 'mall/promotion/seckill/config/index', 'PromotionSeckillConfig', 0, '1', '1', '1', '', '2022-11-15 19:46:50', '1', '2023-06-24 18:57:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2067, 'ɱʱβѯ', 'promotion:seckill-config:query', 3, 1, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2068, 'ɱʱδ', 'promotion:seckill-config:create', 3, 2, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:48:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2069, 'ɱʱθ', 'promotion:seckill-config:update', 3, 3, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2070, 'ɱʱɾ', 'promotion:seckill-config:delete', 3, 4, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2072, '', '', 1, 65, 2362, 'trade', 'ep:eleme', NULL, NULL, 0, '1', '1', '1', '1', '2022-11-19 18:57:19', '1', '2023-09-30 11:54:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2073, 'ۺ˿', '', 2, 2, 2072, 'after-sale', 'ep:refrigerator', 'mall/trade/afterSale/index', 'TradeAfterSale', 0, '1', '1', '1', '', '2022-11-19 20:15:32', '1', '2023-10-01 21:42:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2074, 'ۺѯ', 'trade:after-sale:query', 3, 1, 2073, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-19 20:15:33', '1', '2022-12-10 21:04:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2075, 'ɱر', 'promotion:seckill-activity:close', 3, 5, 2059, '', '', '', '', 0, '1', '1', '1', '1', '2022-11-28 20:20:15', '1', '2023-10-03 18:34:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2076, 'б', '', 2, 1, 2072, 'order', 'ep:list', 'mall/trade/order/index', 'TradeOrder', 0, '1', '1', '1', '1', '2022-12-10 21:05:44', '1', '2023-10-01 21:42:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2083, '', '', 2, 14, 1, 'area', 'fa:map-marker', 'system/area/index', 'SystemArea', 0, '1', '1', '1', '1', '2022-12-23 17:35:05', '1', '2024-02-29 08:50:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2084, 'ںŹ', '', 1, 100, 0, '/mp', 'ep:compass', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-01 20:11:04', '1', '2024-02-29 12:39:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2085, '˺Ź', '', 2, 1, 2084, 'account', 'fa:user', 'mp/account/index', 'MpAccount', 0, '1', '1', '1', '1', '2023-01-01 20:13:31', '1', '2024-02-29 12:42:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2086, '˺', 'mp:account:create', 3, 1, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-01 20:21:40', '1', '2023-01-07 17:32:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2087, '޸˺', 'mp:account:update', 3, 2, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:32:46', '1', '2023-01-07 17:32:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2088, 'ѯ˺', 'mp:account:query', 3, 0, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:07', '1', '2023-01-07 17:33:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2089, 'ɾ˺', 'mp:account:delete', 3, 3, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:21', '1', '2023-01-07 17:33:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2090, 'ɶά', 'mp:account:qr-code', 3, 4, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:58', '1', '2023-01-07 17:33:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2091, ' API ', 'mp:account:clear-quota', 3, 5, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 18:20:32', '1', '2023-01-07 18:20:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2092, 'ͳ', 'mp:statistics:query', 2, 2, 2084, 'statistics', 'ep:trend-charts', 'mp/statistics/index', 'MpStatistics', 0, '1', '1', '1', '1', '2023-01-07 20:17:36', '1', '2024-02-29 12:42:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2093, 'ǩ', '', 2, 3, 2084, 'tag', 'ep:collection-tag', 'mp/tag/index', 'MpTag', 0, '1', '1', '1', '1', '2023-01-08 11:37:32', '1', '2024-02-29 12:42:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2094, 'ѯǩ', 'mp:tag:query', 3, 0, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:03', '1', '2023-01-08 11:59:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2095, 'ǩ', 'mp:tag:create', 3, 1, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:23', '1', '2023-01-08 11:59:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2096, '޸ıǩ', 'mp:tag:update', 3, 2, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:41', '1', '2023-01-08 11:59:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2097, 'ɾǩ', 'mp:tag:delete', 3, 3, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 12:00:04', '1', '2023-01-08 12:00:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2098, 'ͬǩ', 'mp:tag:sync', 3, 4, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 12:00:29', '1', '2023-01-08 12:00:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2099, '˿', '', 2, 4, 2084, 'user', 'fa:user-secret', 'mp/user/index', 'MpUser', 0, '1', '1', '1', '1', '2023-01-08 16:51:20', '1', '2024-02-29 12:42:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2100, 'ѯ˿', 'mp:user:query', 3, 0, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:16:59', '1', '2023-01-08 17:17:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2101, '޸ķ˿', 'mp:user:update', 3, 1, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:17:11', '1', '2023-01-08 17:17:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2102, 'ͬ˿', 'mp:user:sync', 3, 2, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:17:40', '1', '2023-01-08 17:17:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2103, 'Ϣ', '', 2, 5, 2084, 'message', 'ep:message', 'mp/message/index', 'MpMessage', 0, '1', '1', '1', '1', '2023-01-08 18:44:19', '1', '2024-02-29 12:42:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2104, 'ͼķ¼', '', 2, 10, 2084, 'free-publish', 'ep:edit-pen', 'mp/freePublish/index', 'MpFreePublish', 0, '1', '1', '1', '1', '2023-01-13 00:30:50', '1', '2024-02-29 12:43:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2105, 'ѯб', 'mp:free-publish:query', 3, 1, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:19:17', '1', '2023-01-13 07:19:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2106, 'ݸ', 'mp:free-publish:submit', 3, 2, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:19:46', '1', '2023-01-13 07:19:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2107, 'ɾ¼', 'mp:free-publish:delete', 3, 3, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:20:01', '1', '2023-01-13 07:20:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2108, 'ͼIJݸ', '', 2, 9, 2084, 'draft', 'ep:edit', 'mp/draft/index', 'MpDraft', 0, '1', '1', '1', '1', '2023-01-13 07:40:21', '1', '2024-02-29 12:43:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2109, '½ݸ', 'mp:draft:create', 3, 1, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 23:15:30', '1', '2023-01-13 23:15:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2110, '޸IJݸ', 'mp:draft:update', 3, 2, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:08:47', '1', '2023-01-14 10:08:47', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2111, 'ѯݸ', 'mp:draft:query', 3, 0, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:09:01', '1', '2023-01-14 10:09:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2112, 'ɾݸ', 'mp:draft:delete', 3, 3, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:09:19', '1', '2023-01-14 10:09:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2113, 'زĹ', '', 2, 8, 2084, 'material', 'ep:basketball', 'mp/material/index', 'MpMaterial', 0, '1', '1', '1', '1', '2023-01-14 14:12:07', '1', '2024-02-29 12:43:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2114, 'ϴʱز', 'mp:material:upload-temporary', 3, 1, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:33:55', '1', '2023-01-14 15:33:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2115, 'ϴز', 'mp:material:upload-permanent', 3, 2, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:34:14', '1', '2023-01-14 15:34:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2116, 'ɾز', 'mp:material:delete', 3, 3, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:35:37', '1', '2023-01-14 15:35:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2117, 'ϴͼͼƬ', 'mp:material:upload-news-image', 3, 4, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:36:31', '1', '2023-01-14 15:36:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2118, 'ѯز', 'mp:material:query', 3, 5, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:39:22', '1', '2023-01-14 15:39:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2119, '˵', '', 2, 6, 2084, 'menu', 'ep:menu', 'mp/menu/index', 'MpMenu', 0, '1', '1', '1', '1', '2023-01-14 17:43:54', '1', '2024-02-29 12:42:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2120, 'Զظ', '', 2, 7, 2084, 'auto-reply', 'fa-solid:republican', 'mp/autoReply/index', 'MpAutoReply', 0, '1', '1', '1', '1', '2023-01-15 22:13:09', '1', '2024-02-29 12:43:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2121, 'ѯظ', 'mp:auto-reply:query', 3, 0, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:28:41', '1', '2023-01-16 22:28:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2122, 'ظ', 'mp:auto-reply:create', 3, 1, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:28:54', '1', '2023-01-16 22:28:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2123, '޸Ļظ', 'mp:auto-reply:update', 3, 2, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:29:05', '1', '2023-01-16 22:29:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2124, 'ɾظ', 'mp:auto-reply:delete', 3, 3, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:29:34', '1', '2023-01-16 22:29:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2125, 'ѯ˵', 'mp:menu:query', 3, 0, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:05:41', '1', '2023-01-17 23:05:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2126, '˵', 'mp:menu:save', 3, 1, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:06:01', '1', '2023-01-17 23:06:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2127, 'ɾ˵', 'mp:menu:delete', 3, 2, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:06:16', '1', '2023-01-17 23:06:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2128, 'ѯϢ', 'mp:message:query', 3, 0, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:07:14', '1', '2023-01-17 23:07:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2129, 'Ϣ', 'mp:message:send', 3, 1, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:07:26', '1', '2023-01-17 23:07:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2130, '', '', 2, 2, 2739, 'mail', 'fa-solid:mail-bulk', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-25 17:27:44', '1', '2024-04-22 23:56:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2131, '˺', '', 2, 0, 2130, 'mail-account', 'fa:universal-access', 'system/mail/account/index', 'SystemMailAccount', 0, '1', '1', '1', '', '2023-01-25 09:33:48', '1', '2024-02-29 08:48:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2132, '˺Ųѯ', 'system:mail-account:query', 3, 1, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2133, '˺Ŵ', 'system:mail-account:create', 3, 2, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2134, '˺Ÿ', 'system:mail-account:update', 3, 3, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2135, '˺ɾ', 'system:mail-account:delete', 3, 4, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2136, 'ʼģ', '', 2, 0, 2130, 'mail-template', 'fa:tag', 'system/mail/template/index', 'SystemMailTemplate', 0, '1', '1', '1', '', '2023-01-25 12:05:31', '1', '2024-02-29 08:48:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2137, 'ģѯ', 'system:mail-template:query', 3, 1, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2138, 'ģ洴', 'system:mail-template:create', 3, 2, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2139, 'ģ', 'system:mail-template:update', 3, 3, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2140, 'ģɾ', 'system:mail-template:delete', 3, 4, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2141, 'ʼ¼', '', 2, 0, 2130, 'mail-log', 'fa:edit', 'system/mail/log/index', 'SystemMailLog', 0, '1', '1', '1', '', '2023-01-26 02:16:50', '1', '2024-02-29 08:48:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2142, '־ѯ', 'system:mail-log:query', 3, 1, 2141, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-26 02:16:50', '', '2023-01-26 02:16:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2143, 'Ͳʼ', 'system:mail-template:send-mail', 3, 5, 2136, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-26 23:29:15', '1', '2023-01-26 23:29:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2144, 'վŹ', '', 1, 3, 2739, 'notify', 'ep:message-box', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-28 10:25:18', '1', '2024-04-22 23:56:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2145, 'ģ', '', 2, 0, 2144, 'notify-template', 'fa:archive', 'system/notify/template/index', 'SystemNotifyTemplate', 0, '1', '1', '1', '', '2023-01-28 02:26:42', '1', '2024-02-29 08:49:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2146, 'վģѯ', 'system:notify-template:query', 3, 1, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2147, 'վģ崴', 'system:notify-template:create', 3, 2, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2148, 'վģ', 'system:notify-template:update', 3, 3, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2149, 'վģɾ', 'system:notify-template:delete', 3, 4, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2150, 'Ͳվ', 'system:notify-template:send-notify', 3, 5, 2145, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-28 10:54:43', '1', '2023-01-28 10:54:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2151, 'Ϣ¼', '', 2, 0, 2144, 'notify-message', 'fa:edit', 'system/notify/message/index', 'SystemNotifyMessage', 0, '1', '1', '1', '', '2023-01-28 04:28:22', '1', '2024-02-29 08:49:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2152, 'վϢѯ', 'system:notify-message:query', 3, 1, 2151, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 04:28:22', '', '2023-01-28 04:28:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2153, '', '', 2, 2, 1281, 'go-view', 'fa:area-chart', 'report/goview/index', 'JimuReport', 0, '1', '1', '1', '1', '2023-02-07 00:03:19', '1', '2024-02-29 12:34:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2154, 'Ŀ', 'report:go-view-project:create', 3, 1, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:25:14', '1', '2023-02-07 19:25:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2155, 'Ŀ', 'report:go-view-project:update', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', '2023-02-07 19:25:34', '1', '2024-04-24 20:01:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2156, 'ѯĿ', 'report:go-view-project:query', 3, 0, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:25:53', '1', '2023-02-07 19:25:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2157, 'ʹ SQL ѯ', 'report:go-view-data:get-by-sql', 3, 3, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:26:15', '1', '2023-02-07 19:26:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2158, 'ʹ HTTP ѯ', 'report:go-view-data:get-by-http', 3, 4, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:26:35', '1', '2023-02-07 19:26:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2159, 'Boot ĵ', '', 1, 1, 0, 'https://doc.iocoder.cn/', 'ep:document', NULL, NULL, 0, '1', '1', '1', '1', '2023-02-10 22:46:28', '1', '2023-12-02 21:32:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2160, 'Cloud ĵ', '', 1, 2, 0, 'https://cloud.iocoder.cn', 'ep:document-copy', NULL, NULL, 0, '1', '1', '1', '1', '2023-02-10 22:47:07', '1', '2023-12-02 21:32:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2161, 'ʾ', '', 1, 99, 1117, 'demo', 'fa-solid:dragon', 'pay/demo/index', NULL, 0, '1', '1', '1', '', '2023-02-11 14:21:42', '1', '2024-01-18 23:50:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2162, 'Ʒ', 'product:spu:export', 3, 5, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2164, '͹', '', 1, 3, 2072, 'delivery', 'ep:shopping-cart', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:18:02', '1', '2023-09-28 10:58:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2165, 'ݷ', '', 1, 0, 2164, 'express', 'ep:bicycle', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:22:06', '1', '2023-08-30 21:02:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2166, 'ŵ', '', 1, 1, 2164, 'pick-up-store', 'ep:add-location', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:23:14', '1', '2023-08-30 21:03:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2167, 'ݹ˾', '', 2, 0, 2165, 'express', 'ep:compass', 'mall/trade/delivery/express/index', 'Express', 0, '1', '1', '1', '1', '2023-05-18 09:27:21', '1', '2023-08-30 21:02:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2168, 'ݹ˾ѯ', 'trade:delivery:express:query', 3, 1, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2169, 'ݹ˾', 'trade:delivery:express:create', 3, 2, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2170, 'ݹ˾', 'trade:delivery:express:update', 3, 3, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2171, 'ݹ˾ɾ', 'trade:delivery:express:delete', 3, 4, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2172, 'ݹ˾', 'trade:delivery:express:export', 3, 5, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2173, '˷ģ', 'trade:delivery:express-template:query', 2, 1, 2165, 'express-template', 'ep:coordinate', 'mall/trade/delivery/expressTemplate/index', 'ExpressTemplate', 0, '1', '1', '1', '1', '2023-05-20 06:48:10', '1', '2023-08-30 21:03:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2174, '˷ģѯ', 'trade:delivery:express-template:query', 3, 1, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2175, '˷ģ崴', 'trade:delivery:express-template:create', 3, 2, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2176, '˷ģ', 'trade:delivery:express-template:update', 3, 3, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2177, '˷ģɾ', 'trade:delivery:express-template:delete', 3, 4, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2178, '˷ģ嵼', 'trade:delivery:express-template:export', 3, 5, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2179, 'ŵ', '', 2, 1, 2166, 'pick-up-store', 'ep:basketball', 'mall/trade/delivery/pickUpStore/index', 'PickUpStore', 0, '1', '1', '1', '1', '2023-05-25 10:50:00', '1', '2023-08-30 21:03:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2180, 'ŵѯ', 'trade:delivery:pick-up-store:query', 3, 1, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2181, 'ŵ괴', 'trade:delivery:pick-up-store:create', 3, 2, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2182, 'ŵ', 'trade:delivery:pick-up-store:update', 3, 3, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2183, 'ŵɾ', 'trade:delivery:pick-up-store:delete', 3, 4, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2184, 'ŵ굼', 'trade:delivery:pick-up-store:export', 3, 5, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2209, 'ɱ', '', 2, 3, 2030, 'seckill', 'ep:place', '', '', 0, '1', '1', '1', '1', '2023-06-24 17:39:13', '1', '2023-06-24 18:55:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2262, 'Ա', '', 1, 55, 0, '/member', 'ep:bicycle', NULL, NULL, 0, '1', '1', '1', '1', '2023-06-10 00:42:03', '1', '2023-08-20 09:23:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2275, 'Ա', '', 2, 0, 2262, 'config', 'fa:archive', 'member/config/index', 'MemberConfig', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2023-10-01 23:41:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2276, 'Աòѯ', 'member:config:query', 3, 1, 2275, '', '', '', '', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2024-04-24 19:48:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2277, 'Աñ', 'member:config:save', 3, 2, 2275, '', '', '', '', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2024-04-24 19:49:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2281, 'ǩ', '', 2, 2, 2300, 'config', 'ep:calendar', 'member/signin/config/index', 'SignInConfig', 0, '1', '1', '1', '', '2023-06-10 03:26:12', '1', '2023-08-20 19:25:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2282, 'ǩѯ', 'point:sign-in-config:query', 3, 1, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2283, 'ǩ򴴽', 'point:sign-in-config:create', 3, 2, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2284, 'ǩ', 'point:sign-in-config:update', 3, 3, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2285, 'ǩɾ', 'point:sign-in-config:delete', 3, 4, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2287, 'Ա', '', 2, 10, 2262, 'record', 'fa:asterisk', 'member/point/record/index', 'PointRecord', 0, '1', '1', '1', '', '2023-06-10 04:18:50', '1', '2023-10-01 23:42:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2288, 'ûּ¼ѯ', 'point:record:query', 3, 1, 2287, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:18:50', '', '2023-06-10 04:18:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2293, 'ǩ¼', '', 2, 3, 2300, 'record', 'ep:chicken', 'member/signin/record/index', 'SignInRecord', 0, '1', '1', '1', '', '2023-06-10 04:48:22', '1', '2023-08-20 19:26:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2294, 'ûǩֲѯ', 'point:sign-in-record:query', 3, 1, 2293, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2297, 'ûǩɾ', 'point:sign-in-record:delete', 3, 4, 2293, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2300, 'Աǩ', '', 1, 11, 2262, 'signin', 'ep:alarm-clock', '', '', 0, '1', '1', '1', '1', '2023-06-27 22:49:53', '1', '2023-08-20 09:23:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2301, 'ص֪ͨ', '', 2, 5, 1117, 'notify', 'ep:mute-notification', 'pay/notify/index', 'PayNotify', 0, '1', '1', '1', '', '2023-07-20 04:41:32', '1', '2024-01-18 23:56:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2302, '֧֪ͨѯ', 'pay:notify:query', 3, 1, 2301, '', '', '', NULL, 0, '1', '1', '1', '', '2023-07-20 04:41:32', '', '2023-07-20 04:41:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2303, 'ƴŻ', '', 2, 3, 2030, 'combination', 'fa:group', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:19:54', '1', '2023-08-12 17:20:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2304, 'ƴƷ', '', 2, 1, 2303, 'acitivity', 'ep:apple', 'mall/promotion/combination/activity/index', 'PromotionCombinationActivity', 0, '1', '1', '1', '1', '2023-08-12 17:22:03', '1', '2023-08-12 17:22:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2305, 'ƴŻѯ', 'promotion:combination-activity:query', 3, 1, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:54:32', '1', '2023-11-24 11:57:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2306, 'ƴŻ', 'promotion:combination-activity:create', 3, 2, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:54:49', '1', '2023-08-12 17:54:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2307, 'ƴŻ', 'promotion:combination-activity:update', 3, 3, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:04', '1', '2023-08-12 17:55:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2308, 'ƴŻɾ', 'promotion:combination-activity:delete', 3, 4, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:23', '1', '2023-08-12 17:55:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2309, 'ƴŻر', 'promotion:combination-activity:close', 3, 5, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:37', '1', '2023-10-06 10:51:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2310, 'ۻ', '', 2, 4, 2030, 'bargain', 'ep:box', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:27:25', '1', '2023-08-13 00:27:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2311, 'Ʒ', '', 2, 1, 2310, 'activity', 'ep:burger', 'mall/promotion/bargain/activity/index', 'PromotionBargainActivity', 0, '1', '1', '1', '1', '2023-08-13 00:28:49', '1', '2023-10-05 01:16:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2312, 'ۻѯ', 'promotion:bargain-activity:query', 3, 1, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:30', '1', '2023-08-13 00:32:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2313, 'ۻ', 'promotion:bargain-activity:create', 3, 2, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:44', '1', '2023-08-13 00:32:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2314, 'ۻ', 'promotion:bargain-activity:update', 3, 3, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:55', '1', '2023-08-13 00:32:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2315, 'ۻɾ', 'promotion:bargain-activity:delete', 3, 4, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:34:50', '1', '2023-08-13 00:34:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2316, 'ۻر', 'promotion:bargain-activity:close', 3, 5, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:35:02', '1', '2023-08-13 00:35:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2317, 'Ա', '', 2, 0, 2262, 'user', 'ep:avatar', 'member/user/index', 'MemberUser', 0, '1', '1', '1', '', '2023-08-19 04:12:15', '1', '2023-08-24 00:50:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2318, 'Աûѯ', 'member:user:query', 3, 1, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-19 04:12:15', '', '2023-08-19 04:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2319, 'Աû', 'member:user:update', 3, 3, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-19 04:12:15', '', '2023-08-19 04:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2320, 'Աǩ', '', 2, 1, 2262, 'tag', 'ep:collection-tag', 'member/tag/index', 'MemberTag', 0, '1', '1', '1', '', '2023-08-20 01:03:08', '1', '2023-08-20 09:23:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2321, 'Աǩѯ', 'member:tag:query', 3, 1, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2322, 'Աǩ', 'member:tag:create', 3, 2, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2323, 'Աǩ', 'member:tag:update', 3, 3, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2324, 'Աǩɾ', 'member:tag:delete', 3, 4, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2325, 'Աȼ', '', 2, 2, 2262, 'level', 'fa:level-up', 'member/level/index', 'MemberLevel', 0, '1', '1', '1', '', '2023-08-22 12:41:01', '1', '2023-08-22 21:47:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2326, 'Աȼѯ', 'member:level:query', 3, 1, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2327, 'Աȼ', 'member:level:create', 3, 2, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2328, 'Աȼ', 'member:level:update', 3, 3, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2329, 'Աȼɾ', 'member:level:delete', 3, 4, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2330, 'Ա', '', 2, 3, 2262, 'group', 'fa:group', 'member/group/index', 'MemberGroup', 0, '1', '1', '1', '', '2023-08-22 13:50:06', '1', '2023-10-01 23:42:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2331, 'ûѯ', 'member:group:query', 3, 1, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2332, 'û鴴', 'member:group:create', 3, 2, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2333, 'û', 'member:group:update', 3, 3, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2334, 'ûɾ', 'member:group:delete', 3, 4, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2335, 'ûȼ޸', 'member:user:update-level', 3, 5, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-23 16:49:05', '', '2023-08-23 16:50:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2336, 'Ʒ', '', 2, 5, 2000, 'comment', 'ep:comment', 'mall/product/comment/index', 'ProductComment', 0, '1', '1', '1', '1', '2023-08-26 11:03:00', '1', '2023-08-26 11:03:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2337, '۲ѯ', 'product:comment:query', 3, 1, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:01', '1', '2023-08-26 11:04:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2338, '', 'product:comment:create', 3, 2, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:23', '1', '2023-08-26 11:08:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2339, '̼һظ', 'product:comment:update', 3, 3, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:37', '1', '2023-08-26 11:04:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2340, '', 'product:comment:update', 3, 4, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:55', '1', '2023-08-26 11:04:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2341, 'Ż݄', 'promotion:coupon:send', 3, 2, 2038, '', '', '', '', 0, '1', '1', '1', '1', '2023-09-02 00:03:14', '1', '2023-09-02 00:03:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2342, '', '', 2, 0, 2072, 'config', 'ep:setting', 'mall/trade/config/index', 'TradeConfig', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:30:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2343, 'òѯ', 'trade:config:query', 3, 1, 2342, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2344, 'ñ', 'trade:config:save', 3, 2, 2342, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2345, '', '', 1, 4, 2072, 'brokerage', 'fa-solid:project-diagram', '', '', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2023-09-28 10:58:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2346, 'û', '', 2, 0, 2345, 'brokerage-user', 'fa-solid:user-tie', 'mall/trade/brokerage/user/index', 'TradeBrokerageUser', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2347, 'ûѯ', 'trade:brokerage-user:query', 3, 1, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2348, 'ûƹ˲ѯ', 'trade:brokerage-user:user-query', 3, 2, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2349, 'ûƹ㶩ѯ', 'trade:brokerage-user:order-query', 3, 3, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2350, 'û޸ƹʸ', 'trade:brokerage-user:update-brokerage-enable', 3, 4, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2351, 'û޸ƹԱ', 'trade:brokerage-user:update-bind-user', 3, 5, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2352, 'ûƹԱ', 'trade:brokerage-user:clear-bind-user', 3, 6, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2353, 'Ӷ¼', '', 2, 1, 2345, 'brokerage-record', 'fa:money', 'mall/trade/brokerage/record/index', 'TradeBrokerageRecord', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2354, 'Ӷ¼ѯ', 'trade:brokerage-record:query', 3, 1, 2353, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2355, 'Ӷ', '', 2, 2, 2345, 'brokerage-withdraw', 'fa:credit-card', 'mall/trade/brokerage/withdraw/index', 'TradeBrokerageWithdraw', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2356, 'Ӷֲѯ', 'trade:brokerage-withdraw:query', 3, 1, 2355, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2357, 'Ӷ', 'trade:brokerage-withdraw:audit', 3, 2, 2355, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2358, 'ͳ', '', 1, 75, 2362, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '', '2023-09-30 03:22:40', '1', '2023-09-30 11:54:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2359, 'ͳ', '', 2, 4, 2358, 'trade', 'fa-solid:credit-card', 'mall/statistics/trade/index', 'TradeStatistics', 0, '1', '1', '1', '', '2023-09-30 03:22:40', '1', '2024-02-26 20:42:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2360, 'ͳƲѯ', 'statistics:trade:query', 3, 1, 2359, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-30 03:22:40', '', '2023-09-30 03:22:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2361, 'ͳƵ', 'statistics:trade:export', 3, 2, 2359, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-30 03:22:40', '', '2023-09-30 03:22:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2362, '̳ϵͳ', '', 1, 59, 0, '/mall', 'ep:shop', '', '', 0, '1', '1', '1', '1', '2023-09-30 11:52:02', '1', '2023-09-30 11:52:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2363, 'û޸', 'member:user:update-point', 3, 6, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-01 14:39:43', '', '2023-10-01 14:39:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2364, 'û޸', 'member:user:update-balance', 3, 7, 2317, '', '', '', '', 0, '1', '1', '1', '', '2023-10-01 14:39:43', '1', '2023-10-01 22:42:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2365, 'Ż݄', '', 1, 2, 2030, 'coupon', 'fa-solid:disease', '', '', 0, '1', '1', '1', '1', '2023-10-03 12:39:15', '1', '2023-10-05 00:16:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2366, 'ۼ¼', '', 2, 2, 2310, 'record', 'ep:list', 'mall/promotion/bargain/record/index', 'PromotionBargainRecord', 0, '1', '1', '1', '', '2023-10-05 02:49:06', '1', '2023-10-05 10:50:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2367, 'ۼ¼ѯ', 'promotion:bargain-record:query', 3, 1, 2366, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-05 02:49:06', '', '2023-10-05 02:49:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2368, '¼ѯ', 'promotion:bargain-help:query', 3, 2, 2366, '', '', '', '', 0, '1', '1', '1', '1', '2023-10-05 12:27:49', '1', '2023-10-05 12:27:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2369, 'ƴż¼', 'promotion:combination-record:query', 2, 2, 2303, 'record', 'ep:avatar', 'mall/promotion/combination/record/index.vue', 'PromotionCombinationRecord', 0, '1', '1', '1', '1', '2023-10-08 07:10:22', '1', '2023-10-08 07:34:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2374, 'Աͳ', '', 2, 2, 2358, 'member', 'ep:avatar', 'mall/statistics/member/index', 'MemberStatistics', 0, '1', '1', '1', '', '2023-10-11 04:39:24', '1', '2024-02-26 20:41:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2375, 'ԱͳƲѯ', 'statistics:member:query', 3, 1, 2374, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-11 04:39:24', '', '2023-10-11 04:39:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2376, '', 'trade:order:pick-up', 3, 10, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2023-10-14 17:11:58', '1', '2023-10-14 17:11:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2377, '·', '', 2, 0, 2387, 'article/category', 'fa:certificate', 'mall/promotion/article/category/index', 'ArticleCategory', 0, '1', '1', '1', '', '2023-10-16 01:26:18', '1', '2023-10-16 09:38:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2378, 'ѯ', 'promotion:article-category:query', 3, 1, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2379, 'ഴ', 'promotion:article-category:create', 3, 2, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2380, '', 'promotion:article-category:update', 3, 3, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2381, 'ɾ', 'promotion:article-category:delete', 3, 4, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2382, 'б', '', 2, 2, 2387, 'article', 'ep:connection', 'mall/promotion/article/index', 'Article', 0, '1', '1', '1', '', '2023-10-16 01:26:18', '1', '2023-10-16 09:41:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2383, '¹ѯ', 'promotion:article:query', 3, 1, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2384, '¹', 'promotion:article:create', 3, 2, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2385, '¹', 'promotion:article:update', 3, 3, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2386, '¹ɾ', 'promotion:article:delete', 3, 4, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2387, 'ݹ', '', 1, 1, 2030, 'content', 'ep:collection', '', '', 0, '1', '1', '1', '1', '2023-10-16 09:37:31', '1', '2023-10-16 09:37:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2388, '̳ҳ', '', 2, 1, 2362, 'home', 'ep:home-filled', 'mall/home/index', 'MallHome', 0, '1', '1', '1', '', '2023-10-16 12:10:33', '', '2023-10-16 12:10:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2389, '', '', 2, 2, 2166, 'pick-up-order', 'ep:list', 'mall/trade/delivery/pickUpOrder/index', 'PickUpOrder', 0, '1', '1', '1', '', '2023-10-19 16:09:51', '', '2023-10-19 16:09:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2390, 'Żݻ', '', 1, 99, 2030, 'youhui', 'ep:aim', '', '', 0, '1', '1', '1', '1', '2023-10-21 19:23:49', '1', '2023-10-21 19:23:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2391, 'ͻ', '', 2, 10, 2397, 'customer', 'fa:address-book-o', 'crm/customer/index', 'CrmCustomer', 0, '1', '1', '1', '', '2023-10-29 09:04:21', '1', '2024-02-17 17:13:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2392, 'ͻѯ', 'crm:customer:query', 3, 1, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2393, 'ͻ', 'crm:customer:create', 3, 2, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2394, 'ͻ', 'crm:customer:update', 3, 3, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2395, 'ͻɾ', 'crm:customer:delete', 3, 4, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2396, 'ͻ', 'crm:customer:export', 3, 5, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2397, 'CRM ϵͳ', '', 1, 200, 0, '/crm', 'ep:avatar', '', '', 0, '1', '1', '1', '1', '2023-10-29 17:08:30', '1', '2024-02-04 15:37:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2398, 'ͬ', '', 2, 50, 2397, 'contract', 'ep:notebook', 'crm/contract/index', 'CrmContract', 0, '1', '1', '1', '', '2023-10-29 10:50:41', '1', '2024-02-17 17:15:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2399, 'ͬѯ', 'crm:contract:query', 3, 1, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2400, 'ͬ', 'crm:contract:create', 3, 2, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2401, 'ͬ', 'crm:contract:update', 3, 3, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2402, 'ͬɾ', 'crm:contract:delete', 3, 4, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2403, 'ͬ', 'crm:contract:export', 3, 5, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2404, '', '', 2, 8, 2397, 'clue', 'fa:pagelines', 'crm/clue/index', 'CrmClue', 0, '1', '1', '1', '', '2023-10-29 11:06:29', '1', '2024-02-17 17:15:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2405, 'ѯ', 'crm:clue:query', 3, 1, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2406, '', 'crm:clue:create', 3, 2, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2407, '', 'crm:clue:update', 3, 3, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2408, 'ɾ', 'crm:clue:delete', 3, 4, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2409, '', 'crm:clue:export', 3, 5, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2410, '̻', '', 2, 40, 2397, 'business', 'fa:bus', 'crm/business/index', 'CrmBusiness', 0, '1', '1', '1', '', '2023-10-29 11:12:35', '1', '2024-02-17 17:14:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2411, '̻ѯ', 'crm:business:query', 3, 1, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2412, '̻', 'crm:business:create', 3, 2, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2413, '̻', 'crm:business:update', 3, 3, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2414, '̻ɾ', 'crm:business:delete', 3, 4, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2415, '̻', 'crm:business:export', 3, 5, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2416, 'ϵ˹', '', 2, 20, 2397, 'contact', 'fa:address-book-o', 'crm/contact/index', 'CrmContact', 0, '1', '1', '1', '', '2023-10-29 11:14:56', '1', '2024-02-17 17:13:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2417, 'ϵ˲ѯ', 'crm:contact:query', 3, 1, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2418, 'ϵ˴', 'crm:contact:create', 3, 2, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2419, 'ϵ˸', 'crm:contact:update', 3, 3, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2420, 'ϵɾ', 'crm:contact:delete', 3, 4, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2421, 'ϵ˵', 'crm:contact:export', 3, 5, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2422, 'ؿ', '', 2, 60, 2397, 'receivable', 'ep:money', 'crm/receivable/index', 'CrmReceivable', 0, '1', '1', '1', '', '2023-10-29 11:18:09', '1', '2024-02-17 17:16:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2423, 'ؿѯ', 'crm:receivable:query', 3, 1, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2424, 'ؿ', 'crm:receivable:create', 3, 2, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2425, 'ؿ', 'crm:receivable:update', 3, 3, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2426, 'ؿɾ', 'crm:receivable:delete', 3, 4, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2427, 'ؿ', 'crm:receivable:export', 3, 5, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2428, 'ؿƻ', '', 2, 61, 2397, 'receivable-plan', 'fa:money', 'crm/receivable/plan/index', 'CrmReceivablePlan', 0, '1', '1', '1', '', '2023-10-29 11:18:09', '1', '2024-02-17 17:16:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2429, 'ؿƻѯ', 'crm:receivable-plan:query', 3, 1, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2430, 'ؿƻ', 'crm:receivable-plan:create', 3, 2, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2431, 'ؿƻ', 'crm:receivable-plan:update', 3, 3, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2432, 'ؿƻɾ', 'crm:receivable-plan:delete', 3, 4, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2433, 'ؿƻ', 'crm:receivable-plan:export', 3, 5, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2435, '̳װ', '', 2, 20, 2030, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2436, 'װģ', '', 2, 1, 2435, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2437, 'װģѯ', 'promotion:diy-template:query', 3, 1, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2438, 'װģ崴', 'promotion:diy-template:create', 3, 2, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2439, 'װģ', 'promotion:diy-template:update', 3, 3, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2440, 'װģɾ', 'promotion:diy-template:delete', 3, 4, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2441, 'װģʹ', 'promotion:diy-template:use', 3, 5, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2442, 'װҳ', '', 2, 2, 2435, 'diy-page', 'foundation:page-edit', 'mall/promotion/diy/page/index', 'DiyPage', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2443, 'װҳѯ', 'promotion:diy-page:query', 3, 1, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2444, 'װҳ洴', 'promotion:diy-page:create', 3, 2, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2445, 'װҳ', 'promotion:diy-page:update', 3, 3, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2446, 'װҳɾ', 'promotion:diy-page:delete', 3, 4, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2447, '¼', '', 1, 10, 1, 'social', 'fa:rocket', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:12:01', '1', '2024-02-29 01:14:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2448, 'Ӧ', '', 2, 1, 2447, 'client', 'ep:set-up', 'views/system/social/client/index.vue', 'SocialClient', 0, '1', '1', '1', '1', '2023-11-04 12:17:19', '1', '2023-11-04 12:17:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2449, 'Ӧòѯ', 'system:social-client:query', 3, 1, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:43:12', '1', '2023-11-04 12:43:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2450, 'Ӧô', 'system:social-client:create', 3, 2, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:43:58', '1', '2023-11-04 12:43:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2451, 'Ӧø', 'system:social-client:update', 3, 3, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:44:27', '1', '2023-11-04 12:44:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2452, 'Ӧɾ', 'system:social-client:delete', 3, 4, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:44:43', '1', '2023-11-04 12:44:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2453, 'û', 'system:social-user:query', 2, 2, 2447, 'user', 'ep:avatar', 'system/social/user/index.vue', 'SocialUser', 0, '1', '1', '1', '1', '2023-11-04 14:01:05', '1', '2023-11-04 14:01:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2472, 'ӱǶ', '', 2, 12, 1070, 'demo03-inner', 'fa:power-off', 'infra/demo/demo03/inner/index', 'Demo03StudentInner', 0, '1', '1', '1', '', '2023-11-13 04:39:51', '1', '2023-11-16 23:53:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2478, 'ɾIJ飩', '', 2, 1, 1070, 'demo01-contact', 'ep:bicycle', 'infra/demo/demo01/index', 'Demo01Contact', 0, '1', '1', '1', '', '2023-11-15 14:42:30', '1', '2023-11-16 20:34:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2479, 'ʾϵ˲ѯ', 'infra:demo01-contact:query', 3, 1, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2480, 'ʾϵ˴', 'infra:demo01-contact:create', 3, 2, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2481, 'ʾϵ˸', 'infra:demo01-contact:update', 3, 3, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2482, 'ʾϵɾ', 'infra:demo01-contact:delete', 3, 4, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2483, 'ʾϵ˵', 'infra:demo01-contact:export', 3, 5, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2484, 'ɾIJ飩', '', 2, 2, 1070, 'demo02-category', 'fa:tree', 'infra/demo/demo02/index', 'Demo02Category', 0, '1', '1', '1', '', '2023-11-16 12:18:27', '1', '2023-11-16 20:35:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2485, 'ʾѯ', 'infra:demo02-category:query', 3, 1, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2486, 'ʾഴ', 'infra:demo02-category:create', 3, 2, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2487, 'ʾ', 'infra:demo02-category:update', 3, 3, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2488, 'ʾɾ', 'infra:demo02-category:delete', 3, 4, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2489, 'ʾർ', 'infra:demo02-category:export', 3, 5, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2490, 'ӱ׼', '', 2, 10, 1070, 'demo03-normal', 'fa:battery-3', 'infra/demo/demo03/normal/index', 'Demo03StudentNormal', 0, '1', '1', '1', '', '2023-11-16 12:53:37', '1', '2023-11-16 23:10:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2491, 'ѧѯ', 'infra:demo03-student:query', 3, 1, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2492, 'ѧ', 'infra:demo03-student:create', 3, 2, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2493, 'ѧ', 'infra:demo03-student:update', 3, 3, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2494, 'ѧɾ', 'infra:demo03-student:delete', 3, 4, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2495, 'ѧ', 'infra:demo03-student:export', 3, 5, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2497, 'ӱERP', '', 2, 11, 1070, 'demo03-erp', 'ep:calendar', 'infra/demo/demo03/erp/index', 'Demo03StudentERP', 0, '1', '1', '1', '', '2023-11-16 15:50:59', '1', '2023-11-17 13:19:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2516, 'ͻ', '', 2, 0, 2524, 'customer-pool-config', 'ep:data-analysis', 'crm/customer/poolConfig/index', 'CrmCustomerPoolConfig', 0, '1', '1', '1', '', '2023-11-18 13:33:31', '1', '2024-01-03 19:52:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2517, 'ͻñ', 'crm:customer-pool-config:update', 3, 1, 2516, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:31', '', '2023-11-18 13:33:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2518, 'ͻ', '', 2, 1, 2524, 'customer-limit-config', 'ep:avatar', 'crm/customer/limitConfig/index', 'CrmCustomerLimitConfig', 0, '1', '1', '1', '', '2023-11-18 13:33:53', '1', '2024-02-24 16:43:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2519, 'ͻòѯ', 'crm:customer-limit-config:query', 3, 1, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2520, 'ͻô', 'crm:customer-limit-config:create', 3, 2, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2521, 'ͻø', 'crm:customer-limit-config:update', 3, 3, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2522, 'ͻɾ', 'crm:customer-limit-config:delete', 3, 4, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2523, 'ͻõ', 'crm:customer-limit-config:export', 3, 5, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2524, 'ϵͳ', '', 1, 999, 2397, 'config', 'ep:connection', '', '', 0, '1', '1', '1', '1', '2023-11-18 21:58:00', '1', '2024-02-17 17:14:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2525, 'WebSocket', '', 2, 5, 2, 'websocket', 'ep:connection', 'infra/webSocket/index', 'InfraWebSocket', 0, '1', '1', '1', '1', '2023-11-23 19:41:55', '1', '2024-04-23 00:02:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2526, 'Ʒ', '', 2, 80, 2397, 'product', 'fa:product-hunt', 'crm/product/index', 'CrmProduct', 0, '1', '1', '1', '1', '2023-12-05 22:45:26', '1', '2024-02-20 20:36:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2527, 'Ʒѯ', 'crm:product:query', 3, 1, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:47:16', '1', '2023-12-05 22:47:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2528, 'Ʒ', 'crm:product:create', 3, 2, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:47:41', '1', '2023-12-05 22:47:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2529, 'Ʒ', 'crm:product:update', 3, 3, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:03', '1', '2023-12-05 22:48:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2530, 'Ʒɾ', 'crm:product:delete', 3, 4, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:17', '1', '2023-12-05 22:48:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2531, 'Ʒ', 'crm:product:export', 3, 5, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:29', '1', '2023-12-05 22:48:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2532, 'Ʒ', '', 2, 3, 2524, 'product/category', 'fa-solid:window-restore', 'crm/product/category/index', 'CrmProductCategory', 0, '1', '1', '1', '1', '2023-12-06 12:52:36', '1', '2023-12-06 12:52:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2533, 'Ʒѯ', 'crm:product-category:query', 3, 1, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:23', '1', '2023-12-06 12:53:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2534, 'Ʒഴ', 'crm:product-category:create', 3, 2, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:41', '1', '2023-12-06 12:53:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2535, 'Ʒ', 'crm:product-category:update', 3, 3, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:59', '1', '2023-12-06 12:53:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2536, 'Ʒɾ', 'crm:product-category:delete', 3, 4, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:54:14', '1', '2023-12-06 12:54:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2543, '̻', 'crm:contact:create-business', 3, 10, 2416, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-02 17:28:25', '1', '2024-01-02 17:28:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2544, 'ȡ̻', 'crm:contact:delete-business', 3, 11, 2416, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-02 17:28:43', '1', '2024-01-02 17:28:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2545, 'Ʒͳ', '', 2, 3, 2358, 'product', 'fa:product-hunt', 'mall/statistics/product/index', 'ProductStatistics', 0, '1', '1', '1', '', '2023-12-15 18:54:28', '1', '2024-02-26 20:41:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2546, 'ͻ', '', 2, 30, 2397, 'customer/pool', 'fa-solid:swimming-pool', 'crm/customer/pool/index', 'CrmCustomerPool', 0, '1', '1', '1', '1', '2024-01-15 21:29:34', '1', '2024-02-17 17:14:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2547, 'ѯ', 'trade:order:query', 3, 1, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-16 08:52:00', '1', '2024-01-16 08:52:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2548, '', 'trade:order:update', 3, 2, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-16 08:52:21', '1', '2024-01-16 08:52:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2549, '֧&˿', '', 2, 1, 2161, 'order', 'fa:paypal', 'pay/demo/order/index', '', 0, '1', '1', '1', '1', '2024-01-18 23:45:00', '1', '2024-01-18 23:47:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2550, 'ת˰', '', 2, 2, 2161, 'transfer', 'fa:transgender-alt', 'pay/demo/transfer/index', '', 0, '1', '1', '1', '1', '2024-01-18 23:51:16', '1', '2024-01-18 23:51:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2551, 'Ǯ', '', 1, 4, 1117, 'wallet', 'ep:wallet', '', '', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '1', '2024-02-29 08:58:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2552, 'ֵײ', '', 2, 2, 2551, 'wallet-recharge-package', 'fa:leaf', 'pay/wallet/rechargePackage/index', 'WalletRechargePackage', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2553, 'ǮֵײͲѯ', 'pay:wallet-recharge-package:query', 3, 1, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2554, 'Ǯֵײʹ', 'pay:wallet-recharge-package:create', 3, 2, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2555, 'Ǯֵײ͸', 'pay:wallet-recharge-package:update', 3, 3, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2556, 'Ǯֵײɾ', 'pay:wallet-recharge-package:delete', 3, 4, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2557, 'Ǯ', '', 2, 1, 2551, 'wallet-balance', 'fa:leaf', 'pay/wallet/balance/index', 'WalletBalance', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2558, 'Ǯѯ', 'pay:wallet:query', 3, 1, 2557, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2559, 'ת˶', '', 2, 3, 1117, 'transfer', 'ep:credit-card', 'pay/transfer/index', 'PayTransfer', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2560, 'ͳ', '', 1, 200, 2397, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '1', '2024-01-26 22:50:35', '1', '2024-02-24 20:10:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2561, 'а', 'crm:statistics-rank:query', 2, 1, 2560, 'ranking', 'fa:area-chart', 'crm/statistics/rank/index', 'CrmStatisticsRank', 0, '1', '1', '1', '1', '2024-01-26 22:52:09', '1', '2024-04-24 19:39:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2562, 'ͻ', 'crm:customer:import', 3, 6, 2391, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-01 13:09:00', '1', '2024-02-01 13:09:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2563, 'ERP ϵͳ', '', 1, 300, 0, '/erp', 'fa-solid:store', '', '', 0, '1', '1', '1', '1', '2024-02-04 15:37:25', '1', '2024-02-04 15:37:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2564, 'Ʒ', '', 1, 40, 2563, 'product', 'fa:product-hunt', '', '', 0, '1', '1', '1', '1', '2024-02-04 15:38:43', '1', '2024-02-04 15:38:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2565, 'ƷϢ', '', 2, 0, 2564, 'product', 'fa-solid:apple-alt', 'erp/product/product/index', 'ErpProduct', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-05 14:42:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2566, 'Ʒѯ', 'erp:product:query', 3, 1, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:21:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2567, 'Ʒ', 'erp:product:create', 3, 2, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2568, 'Ʒ', 'erp:product:update', 3, 3, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2569, 'Ʒɾ', 'erp:product:delete', 3, 4, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2570, 'Ʒ', 'erp:product:export', 3, 5, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2571, 'Ʒ', '', 2, 1, 2564, 'product-category', 'fa:certificate', 'erp/product/category/index', 'ErpProductCategory', 0, '1', '1', '1', '', '2024-02-04 09:21:04', '1', '2024-02-04 17:24:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2572, 'ѯ', 'erp:product-category:query', 3, 1, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2573, 'ഴ', 'erp:product-category:create', 3, 2, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2574, '', 'erp:product-category:update', 3, 3, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2575, 'ɾ', 'erp:product-category:delete', 3, 4, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2576, 'ർ', 'erp:product-category:export', 3, 5, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2577, 'Ʒλ', '', 2, 2, 2564, 'unit', 'ep:opportunity', 'erp/product/unit/index', 'ErpProductUnit', 0, '1', '1', '1', '', '2024-02-04 11:54:08', '1', '2024-02-04 19:54:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2578, 'λѯ', 'erp:product-unit:query', 3, 1, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2579, 'λ', 'erp:product-unit:create', 3, 2, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2580, 'λ', 'erp:product-unit:update', 3, 3, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2581, 'λɾ', 'erp:product-unit:delete', 3, 4, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2582, 'λ', 'erp:product-unit:export', 3, 5, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2583, '', '', 1, 30, 2563, 'stock', 'fa:window-restore', '', '', 0, '1', '1', '1', '1', '2024-02-05 00:29:37', '1', '2024-02-05 00:29:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2584, 'ֿϢ', '', 2, 0, 2583, 'warehouse', 'ep:house', 'erp/stock/warehouse/index', 'ErpWarehouse', 0, '1', '1', '1', '', '2024-02-04 17:12:09', '1', '2024-02-05 01:12:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2585, 'ֿѯ', 'erp:warehouse:query', 3, 1, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2586, 'ֿⴴ', 'erp:warehouse:create', 3, 2, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2587, 'ֿ', 'erp:warehouse:update', 3, 3, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2588, 'ֿɾ', 'erp:warehouse:delete', 3, 4, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2589, 'ֿ⵼', 'erp:warehouse:export', 3, 5, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2590, 'Ʒ', '', 2, 1, 2583, 'stock', 'ep:coffee', 'erp/stock/stock/index', 'ErpStock', 0, '1', '1', '1', '', '2024-02-05 06:40:50', '1', '2024-02-05 14:42:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2591, 'ѯ', 'erp:stock:query', 3, 1, 2590, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 06:40:50', '', '2024-02-05 06:40:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2592, '浼', 'erp:stock:export', 3, 5, 2590, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 06:40:50', '', '2024-02-05 06:40:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2593, 'ϸ', '', 2, 2, 2583, 'record', 'fa-solid:blog', 'erp/stock/record/index', 'ErpStockRecord', 0, '1', '1', '1', '', '2024-02-05 10:27:21', '1', '2024-02-06 17:26:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2594, 'ϸѯ', 'erp:stock-record:query', 3, 1, 2593, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 10:27:21', '', '2024-02-05 10:27:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2595, 'ϸ', 'erp:stock-record:export', 3, 5, 2593, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 10:27:21', '', '2024-02-05 10:27:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2596, '', '', 2, 3, 2583, 'in', 'ep:zoom-in', 'erp/stock/in/index', 'ErpStockIn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-07 19:06:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2597, 'ⵥѯ', 'erp:stock-in:query', 3, 1, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2598, 'ⵥ', 'erp:stock-in:create', 3, 2, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2599, 'ⵥ', 'erp:stock-in:update', 3, 3, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2600, 'ⵥɾ', 'erp:stock-in:delete', 3, 4, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2601, 'ⵥ', 'erp:stock-in:export', 3, 5, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2602, 'ɹ', '', 1, 10, 2563, 'purchase', 'fa:buysellads', '', '', 0, '1', '1', '1', '1', '2024-02-06 16:01:01', '1', '2024-02-06 16:01:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2603, 'ӦϢ', '', 2, 4, 2602, 'supplier', 'fa:superpowers', 'erp/purchase/supplier/index', 'ErpSupplier', 0, '1', '1', '1', '', '2024-02-06 08:21:55', '1', '2024-02-06 16:22:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2604, 'Ӧ̲ѯ', 'erp:supplier:query', 3, 1, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2605, 'Ӧ̴', 'erp:supplier:create', 3, 2, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2606, 'Ӧ̸', 'erp:supplier:update', 3, 3, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2607, 'Ӧɾ', 'erp:supplier:delete', 3, 4, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2608, 'Ӧ̵', 'erp:supplier:export', 3, 5, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2609, 'ⵥ', 'erp:stock-in:update-status', 3, 6, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2610, '', '', 2, 4, 2583, 'out', 'ep:zoom-out', 'erp/stock/out/index', 'ErpStockOut', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-07 19:06:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2611, 'ⵥѯ', 'erp:stock-out:query', 3, 1, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2612, 'ⵥ', 'erp:stock-out:create', 3, 2, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2613, 'ⵥ', 'erp:stock-out:update', 3, 3, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2614, 'ⵥɾ', 'erp:stock-out:delete', 3, 4, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2615, 'ⵥ', 'erp:stock-out:export', 3, 5, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2616, 'ⵥ', 'erp:stock-out:update-status', 3, 6, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2617, '۹', '', 1, 20, 2563, 'sale', 'fa:sellsy', '', '', 0, '1', '1', '1', '1', '2024-02-07 15:12:32', '1', '2024-02-07 15:12:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2618, 'ͻϢ', '', 2, 4, 2617, 'customer', 'ep:avatar', 'erp/sale/customer/index', 'ErpCustomer', 0, '1', '1', '1', '', '2024-02-07 07:21:45', '1', '2024-02-07 15:22:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2619, 'ͻѯ', 'erp:customer:query', 3, 1, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2620, 'ͻ', 'erp:customer:create', 3, 2, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2621, 'ͻ', 'erp:customer:update', 3, 3, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2622, 'ͻɾ', 'erp:customer:delete', 3, 4, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2623, 'ͻ', 'erp:customer:export', 3, 5, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2624, '', '', 2, 5, 2583, 'move', 'ep:folder-remove', 'erp/stock/move/index', 'ErpStockMove', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-16 18:53:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2625, 'ȵѯ', 'erp:stock-move:query', 3, 1, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2626, 'ȵ', 'erp:stock-move:create', 3, 2, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2627, 'ȵ', 'erp:stock-move:update', 3, 3, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2628, 'ȵɾ', 'erp:stock-move:delete', 3, 4, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2629, 'ȵ', 'erp:stock-move:export', 3, 5, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2630, 'ȵ', 'erp:stock-move:update-status', 3, 6, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2631, '̵', '', 2, 6, 2583, 'check', 'ep:circle-check-filled', 'erp/stock/check/index', 'ErpStockCheck', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-08 08:31:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2632, '̵㵥ѯ', 'erp:stock-check:query', 3, 1, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2633, '̵㵥', 'erp:stock-check:create', 3, 2, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2634, '̵㵥', 'erp:stock-check:update', 3, 3, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2635, '̵㵥ɾ', 'erp:stock-check:delete', 3, 4, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2636, '̵㵥', 'erp:stock-check:export', 3, 5, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2637, '̵㵥', 'erp:stock-check:update-status', 3, 6, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2638, '۶', '', 2, 1, 2617, 'order', 'fa:first-order', 'erp/sale/order/index', 'ErpSaleOrder', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-10 21:59:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2639, '۶ѯ', 'erp:sale-order:query', 3, 1, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2640, '۶', 'erp:sale-order:create', 3, 2, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2641, '۶', 'erp:sale-order:update', 3, 3, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2642, '۶ɾ', 'erp:sale-order:delete', 3, 4, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2643, '۶', 'erp:sale-order:export', 3, 5, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2644, '۶', 'erp:sale-order:update-status', 3, 6, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2645, '', '', 1, 50, 2563, 'finance', 'ep:money', '', '', 0, '1', '1', '1', '1', '2024-02-10 08:05:58', '1', '2024-02-10 08:06:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2646, '˻', '', 2, 10, 2645, 'account', 'fa:universal-access', 'erp/finance/account/index', 'ErpAccount', 0, '1', '1', '1', '', '2024-02-10 00:15:07', '1', '2024-02-14 08:24:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2647, '˻ѯ', 'erp:account:query', 3, 1, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2648, '˻', 'erp:account:create', 3, 2, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2649, '˻', 'erp:account:update', 3, 3, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2650, '˻ɾ', 'erp:account:delete', 3, 4, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2651, '˻', 'erp:account:export', 3, 5, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2652, '۳', '', 2, 2, 2617, 'out', 'ep:sold-out', 'erp/sale/out/index', 'ErpSaleOut', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-10 22:02:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2653, '۳ѯ', 'erp:sale-out:query', 3, 1, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2654, '۳ⴴ', 'erp:sale-out:create', 3, 2, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2655, '۳', 'erp:sale-out:update', 3, 3, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2656, '۳ɾ', 'erp:sale-out:delete', 3, 4, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2657, '۳⵼', 'erp:sale-out:export', 3, 5, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2658, '۳', 'erp:sale-out:update-status', 3, 6, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2659, '˻', '', 2, 3, 2617, 'return', 'fa-solid:bone', 'erp/sale/return/index', 'ErpSaleReturn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 06:12:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2660, '˻ѯ', 'erp:sale-return:query', 3, 1, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2661, '˻', 'erp:sale-return:create', 3, 2, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2662, '˻', 'erp:sale-return:update', 3, 3, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2663, '˻ɾ', 'erp:sale-return:delete', 3, 4, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2664, '˻', 'erp:sale-return:export', 3, 5, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2665, '˻', 'erp:sale-return:update-status', 3, 6, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2666, 'ɹ', '', 2, 1, 2602, 'order', 'fa-solid:border-all', 'erp/purchase/order/index', 'ErpPurchaseOrder', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 08:51:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2667, 'ɹѯ', 'erp:purchase-order:query', 3, 1, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2668, 'ɹ', 'erp:purchase-order:create', 3, 2, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2669, 'ɹ', 'erp:purchase-order:update', 3, 3, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2670, 'ɹɾ', 'erp:purchase-order:delete', 3, 4, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2671, 'ɹ', 'erp:purchase-order:export', 3, 5, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2672, 'ɹ', 'erp:purchase-order:update-status', 3, 6, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2673, 'ɹ', '', 2, 2, 2602, 'in', 'fa-solid:gopuram', 'erp/purchase/in/index', 'ErpPurchaseIn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 11:19:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2674, 'ɹѯ', 'erp:purchase-in:query', 3, 1, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2675, 'ɹⴴ', 'erp:purchase-in:create', 3, 2, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2676, 'ɹ', 'erp:purchase-in:update', 3, 3, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2677, 'ɹɾ', 'erp:purchase-in:delete', 3, 4, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2678, 'ɹ⵼', 'erp:purchase-in:export', 3, 5, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2679, 'ɹ', 'erp:purchase-in:update-status', 3, 6, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2680, 'ɹ˻', '', 2, 3, 2602, 'return', 'ep:minus', 'erp/purchase/return/index', 'ErpPurchaseReturn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 20:51:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2681, 'ɹ˻ѯ', 'erp:purchase-return:query', 3, 1, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2682, 'ɹ˻', 'erp:purchase-return:create', 3, 2, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2683, 'ɹ˻', 'erp:purchase-return:update', 3, 3, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2684, 'ɹ˻ɾ', 'erp:purchase-return:delete', 3, 4, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2685, 'ɹ˻', 'erp:purchase-return:export', 3, 5, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2686, 'ɹ˻', 'erp:purchase-return:update-status', 3, 6, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2687, '', '', 2, 1, 2645, 'payment', 'ep:caret-right', 'erp/finance/payment/index', 'ErpFinancePayment', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-14 08:24:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2688, 'ѯ', 'erp:finance-payment:query', 3, 1, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2689, '', 'erp:finance-payment:create', 3, 2, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2690, '', 'erp:finance-payment:update', 3, 3, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2691, 'ɾ', 'erp:finance-payment:delete', 3, 4, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2692, '', 'erp:finance-payment:export', 3, 5, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2693, '', 'erp:finance-payment:update-status', 3, 6, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2694, 'տ', '', 2, 2, 2645, 'receipt', 'ep:expand', 'erp/finance/receipt/index', 'ErpFinanceReceipt', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-15 19:35:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2695, 'տѯ', 'erp:finance-receipt:query', 3, 1, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2696, 'տ', 'erp:finance-receipt:create', 3, 2, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2697, 'տ', 'erp:finance-receipt:update', 3, 3, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2698, 'տɾ', 'erp:finance-receipt:delete', 3, 4, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2699, 'տ', 'erp:finance-receipt:export', 3, 5, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2700, 'տ', 'erp:finance-receipt:update-status', 3, 6, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2701, '', '', 2, 0, 2397, 'backlog', 'fa-solid:tasks', 'crm/backlog/index', 'CrmBacklog', 0, '1', '1', '1', '1', '2024-02-17 17:17:11', '1', '2024-02-17 17:17:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2702, 'ERP ҳ', 'erp:statistics:query', 2, 0, 2563, 'home', 'ep:home-filled', 'erp/home/index.vue', 'ErpHome', 0, '1', '1', '1', '1', '2024-02-18 16:49:40', '1', '2024-02-26 21:12:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2703, '̻״̬', '', 2, 4, 2524, 'business-status', 'fa-solid:charging-station', 'crm/business/status/index', 'CrmBusinessStatus', 0, '1', '1', '1', '1', '2024-02-21 20:15:17', '1', '2024-02-21 20:15:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2704, '̻״̬ѯ', 'crm:business-status:query', 3, 1, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:35:36', '1', '2024-02-21 20:36:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2705, '̻״̬', 'crm:business-status:create', 3, 2, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:35:57', '1', '2024-02-21 20:35:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2706, '̻״̬', 'crm:business-status:update', 3, 3, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:36:21', '1', '2024-02-21 20:36:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2707, '̻״̬ɾ', 'crm:business-status:delete', 3, 4, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:36:36', '1', '2024-02-21 20:36:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2708, 'ͬ', '', 2, 5, 2524, 'contract-config', 'ep:connection', 'crm/contract/config/index', 'CrmContractConfig', 0, '1', '1', '1', '1', '2024-02-24 16:44:40', '1', '2024-02-24 16:44:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2709, 'ͻòѯ', 'crm:customer-pool-config:query', 3, 2, 2516, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:45:19', '1', '2024-02-24 16:45:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2710, 'ͬø', 'crm:contract-config:update', 3, 1, 2708, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:45:56', '1', '2024-02-24 16:45:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2711, 'ͬòѯ', 'crm:contract-config:query', 3, 2, 2708, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:46:16', '1', '2024-02-24 16:46:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2712, 'ͻ', 'crm:statistics-customer:query', 2, 0, 2560, 'customer', 'ep:avatar', 'views/crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, '1', '1', '1', '1', '2024-03-09 16:43:56', '1', '2024-04-24 19:42:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2713, 'ҵ', 'bpm:process-instance-cc:query', 2, 30, 1200, 'copy', 'ep:copy-document', 'bpm/task/copy/index', 'BpmProcessInstanceCopy', 0, '1', '1', '1', '1', '2024-03-17 21:50:23', '1', '2024-04-24 19:55:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2714, '̷', '', 2, 3, 1186, 'category', 'fa:object-ungroup', 'bpm/category/index', 'BpmCategory', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-21 23:51:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2715, 'ѯ', 'bpm:category:query', 3, 1, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2716, 'ഴ', 'bpm:category:create', 3, 2, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2717, '', 'bpm:category:update', 3, 3, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2718, 'ɾ', 'bpm:category:delete', 3, 4, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2720, '', '', 2, 0, 1200, 'create', 'fa-solid:grin-stars', 'bpm/processInstance/create/index', 'BpmProcessInstanceCreate', 0, '1', '0', '1', '1', '2024-03-19 19:46:05', '1', '2024-03-23 19:03:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2721, 'ʵ', '', 2, 10, 1186, 'process-instance/manager', 'fa:square', 'bpm/processInstance/manager/index', 'BpmProcessInstanceManager', 0, '1', '1', '1', '1', '2024-03-21 23:57:30', '1', '2024-03-21 23:57:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2722, 'ʵIJѯԱ', 'bpm:process-instance:manager-query', 3, 1, 2721, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:18:27', '1', '2024-03-22 08:19:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2723, 'ʵȡԱ', 'bpm:process-instance:cancel-by-admin', 3, 2, 2721, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:19:25', '1', '2024-03-22 08:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2724, '', '', 2, 11, 1186, 'process-tasnk', 'ep:collection-tag', 'bpm/task/manager/index', 'BpmManagerTask', 0, '1', '1', '1', '1', '2024-03-22 08:43:22', '1', '2024-03-22 08:43:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2725, 'IJѯԱ', 'bpm:task:mananger-query', 3, 1, 2724, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:43:49', '1', '2024-03-22 08:43:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2726, '̼', '', 2, 5, 1186, 'process-listener', 'fa:assistive-listening-systems', 'bpm/processListener/index', 'BpmProcessListener', 0, '1', '1', '1', '', '2024-03-09 16:05:34', '1', '2024-03-23 13:13:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2727, '̼ѯ', 'bpm:process-listener:query', 3, 1, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2728, '̼', 'bpm:process-listener:create', 3, 2, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2729, '̼', 'bpm:process-listener:update', 3, 3, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2730, '̼ɾ', 'bpm:process-listener:delete', 3, 4, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2731, '̱ʽ', '', 2, 6, 1186, 'process-expression', 'fa:wpexplorer', 'bpm/processExpression/index', 'BpmProcessExpression', 0, '1', '1', '1', '', '2024-03-09 22:35:08', '1', '2024-03-23 19:43:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2732, '̱ʽѯ', 'bpm:process-expression:query', 3, 1, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2733, '̱ʽ', 'bpm:process-expression:create', 3, 2, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2734, '̱ʽ', 'bpm:process-expression:update', 3, 3, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2735, '̱ʽɾ', 'bpm:process-expression:delete', 3, 4, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2736, 'Աҵ', 'crm:statistics-performance:query', 2, 3, 2560, 'performance', 'ep:dish-dot', 'crm/statistics/performance/index', 'CrmStatisticsPerformance', 0, '1', '1', '1', '1', '2024-04-05 13:49:20', '1', '2024-04-24 19:42:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2737, 'ͻ', 'crm:statistics-portrait:query', 2, 4, 2560, 'portrait', 'ep:picture', 'crm/statistics/portrait/index', 'CrmStatisticsPortrait', 0, '1', '1', '1', '1', '2024-04-05 13:57:40', '1', '2024-04-24 19:42:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2738, '©', 'crm:statistics-funnel:query', 2, 5, 2560, 'funnel', 'ep:grape', 'crm/statistics/funnel/index', 'CrmStatisticsFunnel', 0, '1', '1', '1', '1', '2024-04-13 10:53:26', '1', '2024-04-24 19:39:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2739, 'Ϣ', '', 1, 7, 1, 'messages', 'ep:chat-dot-round', '', '', 0, '1', '1', '1', '1', '2024-04-22 23:54:30', '1', '2024-04-23 09:36:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2740, '', '', 1, 10, 2, 'monitors', 'ep:monitor', '', '', 0, '1', '1', '1', '1', '2024-04-23 00:04:44', '1', '2024-04-23 00:04:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2741, 'ȡͻ', 'crm:customer:receive', 3, 1, 2546, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:47:45', '1', '2024-04-24 19:47:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2742, '乫ͻ', 'crm:customer:distribute', 3, 2, 2546, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:48:05', '1', '2024-04-24 19:48:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2743, 'ƷͳƲѯ', 'statistics:product:query', 3, 1, 2545, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:50:05', '1', '2024-04-24 19:50:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2744, 'ƷͳƵ', 'statistics:product:export', 3, 2, 2545, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:50:26', '1', '2024-04-24 19:50:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2745, '֧ѯ', 'pay:channel:query', 3, 10, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:01', '1', '2024-04-24 19:53:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2746, '֧', 'pay:channel:create', 3, 11, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:18', '1', '2024-04-24 19:53:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2747, '֧', 'pay:channel:update', 3, 12, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:32', '1', '2024-04-24 19:53:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2748, '֧ɾ', 'pay:channel:delete', 3, 13, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:54:34', '1', '2024-04-24 19:54:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2749, 'Ʒղزѯ', 'product:favorite:query', 3, 10, 2014, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:55:47', '1', '2024-04-24 19:55:47', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2750, 'Ʒѯ', 'product:browse-history:query', 3, 20, 2014, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:57:43', '1', '2024-04-24 19:57:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2751, 'ۺͬ', 'trade:after-sale:agree', 3, 2, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:58:40', '1', '2024-04-24 19:58:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2752, 'ۺͬ', 'trade:after-sale:disagree', 3, 3, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:59:03', '1', '2024-04-24 19:59:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2753, 'ۺȷ˻', 'trade:after-sale:receive', 3, 4, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:00:07', '1', '2024-04-24 20:00:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2754, 'ۺȷ˿', 'trade:after-sale:refund', 3, 5, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:00:24', '1', '2024-04-24 20:00:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2755, 'ɾĿ', 'report:go-view-project:delete', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:01:37', '1', '2024-04-24 20:01:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2756, 'Աȼ¼ѯ', 'member:level-record:query', 3, 10, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:32', '1', '2024-04-24 20:02:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2757, 'Ա¼ѯ', 'member:experience-record:query', 3, 11, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:51', '1', '2024-04-24 20:02:51', '0'); +COMMIT; +SET IDENTITY_INSERT system_menu OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_notice +-- ---------------------------- +CREATE TABLE system_notice ( - "ID" BIGINT IDENTITY(22,1) NOT NULL, - "CODE" VARCHAR(32) NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "FEE_RATE" NUMBER(22,0) DEFAULT 0 - NOT NULL, - "MERCHANT_ID" BIGINT NOT NULL, - "APP_ID" BIGINT NOT NULL, - "CONFIG" VARCHAR(4096) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + title varchar(50) NOT NULL, + content text NOT NULL, + type smallint NOT NULL, + status smallint DEFAULT 0 NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" + +COMMENT ON COLUMN system_notice.id IS 'ID'; +COMMENT ON COLUMN system_notice.title IS ''; +COMMENT ON COLUMN system_notice.content IS ''; +COMMENT ON COLUMN system_notice.type IS 'ͣ1֪ͨ 2棩'; +COMMENT ON COLUMN system_notice.status IS '״̬0 1رգ'; +COMMENT ON COLUMN system_notice.creator IS ''; +COMMENT ON COLUMN system_notice.create_time IS 'ʱ'; +COMMENT ON COLUMN system_notice.updater IS ''; +COMMENT ON COLUMN system_notice.update_time IS 'ʱ'; +COMMENT ON COLUMN system_notice.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_notice.tenant_id IS '⻧'; +COMMENT ON TABLE system_notice IS '֪ͨ'; + +-- ---------------------------- +-- Records of system_notice +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_notice ON; +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'Ĺ', '

°汾133

', 1, 0, 'admin', '2021-01-05 17:03:48', '1', '2022-05-04 21:00:20', '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'ά֪ͨ2018-07-01 ϵͳ賿ά', '

11112222

', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 20:07:26', '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'DzԱ', '

123

', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', '0', 121); +COMMIT; +SET IDENTITY_INSERT system_notice OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_notify_message +-- ---------------------------- +CREATE TABLE system_notify_message ( - "ID" BIGINT IDENTITY(72,1) NOT NULL, - "USER_ID" DECIMAL(20,0) NOT NULL, - "SPU_ID" BIGINT NOT NULL, - "SPU_NAME" VARCHAR(255) NOT NULL, - "PRICE" INT NOT NULL, - "PAYED" BIT DEFAULT '0' - NOT NULL, - "PAY_ORDER_ID" BIGINT NULL, - "PAY_CHANNEL_CODE" VARCHAR(16) NULL, - "PAY_TIME" TIMESTAMP(0) NULL, - "PAY_REFUND_ID" BIGINT NULL, - "REFUND_PRICE" INT DEFAULT 0 - NOT NULL, - "REFUND_TIME" TIMESTAMP(0) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type smallint NOT NULL, + template_id bigint NOT NULL, + template_code varchar(64) NOT NULL, + template_nickname varchar(63) NOT NULL, + template_content varchar(1024) NOT NULL, + template_type int NOT NULL, + template_params varchar(255) NOT NULL, + read_status bit NOT NULL, + read_time datetime DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_MERCHANT" + +COMMENT ON COLUMN system_notify_message.id IS 'ûID'; +COMMENT ON COLUMN system_notify_message.user_id IS 'ûid'; +COMMENT ON COLUMN system_notify_message.user_type IS 'û'; +COMMENT ON COLUMN system_notify_message.template_id IS 'ģ'; +COMMENT ON COLUMN system_notify_message.template_code IS 'ģ'; +COMMENT ON COLUMN system_notify_message.template_nickname IS 'ģ淢'; +COMMENT ON COLUMN system_notify_message.template_content IS 'ģ'; +COMMENT ON COLUMN system_notify_message.template_type IS 'ģ'; +COMMENT ON COLUMN system_notify_message.template_params IS 'ģ'; +COMMENT ON COLUMN system_notify_message.read_status IS 'ǷѶ'; +COMMENT ON COLUMN system_notify_message.read_time IS 'Ķʱ'; +COMMENT ON COLUMN system_notify_message.creator IS ''; +COMMENT ON COLUMN system_notify_message.create_time IS 'ʱ'; +COMMENT ON COLUMN system_notify_message.updater IS ''; +COMMENT ON COLUMN system_notify_message.update_time IS 'ʱ'; +COMMENT ON COLUMN system_notify_message.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_notify_message.tenant_id IS '⻧'; +COMMENT ON TABLE system_notify_message IS 'վϢ'; + +-- ---------------------------- +-- Records of system_notify_message +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_notify_message ON; +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, 'test', '123', ' 1ҿʼ 2 ', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:44:08', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, 'test', '123', ' 1ҿʼ 2 ', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:45:04', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 103, 2, 2, 'register', 'ϵͳϢ', 'ãӭ ͥ', 2, '{"name":""}', '0', NULL, '1', '2023-01-28 21:02:20', '1', '2023-01-28 21:02:20', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 1, 2, 1, 'test', '123', ' ܵҿʼ д ', 1, '{"name":"ܵ","what":"д"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 22:21:42', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 1, 2, 1, 'test', '123', ' ܵҿʼ д ', 1, '{"name":"ܵ","what":"д"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 22:22:07', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 1, 2, 1, 'test', '123', ' 2ҿʼ 3 ', 1, '{"name":"2","what":"3"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 23:45:21', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 1, 2, 2, 'register', 'ϵͳϢ', 'ãӭ 123 ͥ', 2, '{"name":"123"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 23:50:21', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '2023-09-28 08:35:46֣0.09Ԫͨ', 2, '{"reason":null,"createTime":"2023-09-28 08:35:46","price":"0.09"}', '0', NULL, '1', '2023-09-28 16:36:22', '1', '2023-09-28 16:36:22', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '2023-09-30 20:59:40֣1.00Ԫͨ', 2, '{"reason":null,"createTime":"2023-09-30 20:59:40","price":"1.00"}', '0', NULL, '1', '2023-10-03 12:11:34', '1', '2023-10-03 12:11:34', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_notify_message OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_notify_template +-- ---------------------------- +CREATE TABLE system_notify_template ( - "ID" BIGINT IDENTITY(6,1) NOT NULL, - "NO" VARCHAR(32) NOT NULL, - "NAME" VARCHAR(64) NOT NULL, - "SHORT_NAME" VARCHAR(64) NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(63) NOT NULL, + code varchar(64) NOT NULL, + nickname varchar(255) NOT NULL, + content varchar(1024) NOT NULL, + type smallint NOT NULL, + params varchar(255) DEFAULT NULL NULL, + status smallint NOT NULL, + remark varchar(255) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG" + +COMMENT ON COLUMN system_notify_template.id IS ''; +COMMENT ON COLUMN system_notify_template.name IS 'ģ'; +COMMENT ON COLUMN system_notify_template.code IS 'ģ'; +COMMENT ON COLUMN system_notify_template.nickname IS ''; +COMMENT ON COLUMN system_notify_template.content IS 'ģ'; +COMMENT ON COLUMN system_notify_template.type IS ''; +COMMENT ON COLUMN system_notify_template.params IS ''; +COMMENT ON COLUMN system_notify_template.status IS '״̬'; +COMMENT ON COLUMN system_notify_template.remark IS 'ע'; +COMMENT ON COLUMN system_notify_template.creator IS ''; +COMMENT ON COLUMN system_notify_template.create_time IS 'ʱ'; +COMMENT ON COLUMN system_notify_template.updater IS ''; +COMMENT ON COLUMN system_notify_template.update_time IS 'ʱ'; +COMMENT ON COLUMN system_notify_template.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_notify_template IS 'վģ'; + +-- ---------------------------- +-- Table structure for system_oauth2_access_token +-- ---------------------------- +CREATE TABLE system_oauth2_access_token ( - "ID" BIGINT IDENTITY(371964,1) NOT NULL, - "TASK_ID" BIGINT NOT NULL, - "NOTIFY_TIMES" TINYINT NOT NULL, - "RESPONSE" VARCHAR(2048) NOT NULL, - "STATUS" TINYINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type smallint NOT NULL, + user_info varchar(512) NOT NULL, + access_token varchar(255) NOT NULL, + refresh_token varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) DEFAULT NULL NULL, + expires_time datetime NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK" + +CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token); +CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token); + +COMMENT ON COLUMN system_oauth2_access_token.id IS ''; +COMMENT ON COLUMN system_oauth2_access_token.user_id IS 'û'; +COMMENT ON COLUMN system_oauth2_access_token.user_type IS 'û'; +COMMENT ON COLUMN system_oauth2_access_token.user_info IS 'ûϢ'; +COMMENT ON COLUMN system_oauth2_access_token.access_token IS ''; +COMMENT ON COLUMN system_oauth2_access_token.refresh_token IS 'ˢ'; +COMMENT ON COLUMN system_oauth2_access_token.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_oauth2_access_token.scopes IS 'ȨΧ'; +COMMENT ON COLUMN system_oauth2_access_token.expires_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_access_token.creator IS ''; +COMMENT ON COLUMN system_oauth2_access_token.create_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_access_token.updater IS ''; +COMMENT ON COLUMN system_oauth2_access_token.update_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_access_token.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '⻧'; +COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 '; + +-- ---------------------------- +-- Table structure for system_oauth2_approve +-- ---------------------------- +CREATE TABLE system_oauth2_approve ( - "ID" BIGINT IDENTITY(151,1) NOT NULL, - "MERCHANT_ID" BIGINT NOT NULL, - "APP_ID" BIGINT NOT NULL, - "TYPE" TINYINT NOT NULL, - "DATA_ID" BIGINT NOT NULL, - "STATUS" TINYINT NOT NULL, - "MERCHANT_ORDER_ID" VARCHAR(64) NOT NULL, - "NEXT_NOTIFY_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "LAST_EXECUTE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "NOTIFY_TIMES" TINYINT NOT NULL, - "MAX_NOTIFY_TIMES" TINYINT NOT NULL, - "NOTIFY_URL" VARCHAR(1024) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type smallint NOT NULL, + client_id varchar(255) NOT NULL, + scope varchar(255) DEFAULT '' NULL, + approved bit DEFAULT '0' NOT NULL, + expires_time datetime NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_ORDER" + +COMMENT ON COLUMN system_oauth2_approve.id IS ''; +COMMENT ON COLUMN system_oauth2_approve.user_id IS 'û'; +COMMENT ON COLUMN system_oauth2_approve.user_type IS 'û'; +COMMENT ON COLUMN system_oauth2_approve.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_oauth2_approve.scope IS 'ȨΧ'; +COMMENT ON COLUMN system_oauth2_approve.approved IS 'Ƿ'; +COMMENT ON COLUMN system_oauth2_approve.expires_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_approve.creator IS ''; +COMMENT ON COLUMN system_oauth2_approve.create_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_approve.updater IS ''; +COMMENT ON COLUMN system_oauth2_approve.update_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_approve.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '⻧'; +COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 ׼'; + +-- ---------------------------- +-- Table structure for system_oauth2_client +-- ---------------------------- +CREATE TABLE system_oauth2_client ( - "ID" BIGINT IDENTITY(171,1) NOT NULL, - "MERCHANT_ID" BIGINT NOT NULL, - "APP_ID" BIGINT NOT NULL, - "CHANNEL_ID" BIGINT NULL, - "CHANNEL_CODE" VARCHAR(32) NULL, - "MERCHANT_ORDER_ID" VARCHAR(64) NOT NULL, - "SUBJECT" VARCHAR(32) NOT NULL, - "BODY" VARCHAR(128) NOT NULL, - "NOTIFY_URL" VARCHAR(1024) NOT NULL, - "NOTIFY_STATUS" TINYINT NOT NULL, - "AMOUNT" BIGINT NOT NULL, - "CHANNEL_FEE_RATE" NUMBER(22,0) DEFAULT 0 - NULL, - "CHANNEL_FEE_AMOUNT" BIGINT DEFAULT 0 - NULL, - "STATUS" TINYINT NOT NULL, - "USER_IP" VARCHAR(50) NOT NULL, - "EXPIRE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "SUCCESS_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NULL, - "NOTIFY_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NULL, - "SUCCESS_EXTENSION_ID" BIGINT NULL, - "REFUND_STATUS" TINYINT NOT NULL, - "REFUND_TIMES" TINYINT NOT NULL, - "REFUND_AMOUNT" BIGINT NOT NULL, - "CHANNEL_USER_ID" VARCHAR(255) NULL, - "CHANNEL_ORDER_NO" VARCHAR(64) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + client_id varchar(255) NOT NULL, + secret varchar(255) NOT NULL, + name varchar(255) NOT NULL, + logo varchar(255) NOT NULL, + description varchar(255) DEFAULT NULL NULL, + status smallint NOT NULL, + access_token_validity_seconds int NOT NULL, + refresh_token_validity_seconds int NOT NULL, + redirect_uris varchar(255) NOT NULL, + authorized_grant_types varchar(255) NOT NULL, + scopes varchar(255) DEFAULT NULL NULL, + auto_approve_scopes varchar(255) DEFAULT NULL NULL, + authorities varchar(255) DEFAULT NULL NULL, + resource_ids varchar(255) DEFAULT NULL NULL, + additional_information varchar(4096) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION" + +COMMENT ON COLUMN system_oauth2_client.id IS ''; +COMMENT ON COLUMN system_oauth2_client.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_oauth2_client.secret IS 'ͻԿ'; +COMMENT ON COLUMN system_oauth2_client.name IS 'Ӧ'; +COMMENT ON COLUMN system_oauth2_client.logo IS 'Ӧͼ'; +COMMENT ON COLUMN system_oauth2_client.description IS 'Ӧ'; +COMMENT ON COLUMN system_oauth2_client.status IS '״̬'; +COMMENT ON COLUMN system_oauth2_client.access_token_validity_seconds IS 'ƵЧ'; +COMMENT ON COLUMN system_oauth2_client.refresh_token_validity_seconds IS 'ˢƵЧ'; +COMMENT ON COLUMN system_oauth2_client.redirect_uris IS 'ض URI ַ'; +COMMENT ON COLUMN system_oauth2_client.authorized_grant_types IS 'Ȩ'; +COMMENT ON COLUMN system_oauth2_client.scopes IS 'ȨΧ'; +COMMENT ON COLUMN system_oauth2_client.auto_approve_scopes IS 'ԶͨȨΧ'; +COMMENT ON COLUMN system_oauth2_client.authorities IS 'Ȩ'; +COMMENT ON COLUMN system_oauth2_client.resource_ids IS 'Դ'; +COMMENT ON COLUMN system_oauth2_client.additional_information IS 'Ϣ'; +COMMENT ON COLUMN system_oauth2_client.creator IS ''; +COMMENT ON COLUMN system_oauth2_client.create_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_client.updater IS ''; +COMMENT ON COLUMN system_oauth2_client.update_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_client.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_oauth2_client IS 'OAuth2 ͻ˱'; + +-- ---------------------------- +-- Records of system_oauth2_client +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_oauth2_client ON; +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, 'default', 'admin123', 'Դ', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '', 0, 1800, 2592000, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2024-02-22 16:31:52', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', '', 0, 1800, 43200, '["https://www.iocoder.cn"]', '["password","authorization_code","implicit"]', '["user_info","projects"]', '["user_info"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2023-12-02 21:01:01', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (41, 'yudao-sso-demo-by-code', 'test', 'Ȩģʽʵ SSO ¼', 'http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["authorization_code","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2022-09-29 13:28:31', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (42, 'yudao-sso-demo-by-password', 'test', 'ģʽʵ SSO ¼', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["password","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2022-10-04 20:31:21', '0'); +COMMIT; +SET IDENTITY_INSERT system_oauth2_client OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_oauth2_code +-- ---------------------------- +CREATE TABLE system_oauth2_code ( - "ID" BIGINT IDENTITY(383,1) NOT NULL, - "NO" VARCHAR(64) NOT NULL, - "ORDER_ID" BIGINT NOT NULL, - "CHANNEL_ID" BIGINT NOT NULL, - "CHANNEL_CODE" VARCHAR(32) NOT NULL, - "USER_IP" VARCHAR(50) NOT NULL, - "STATUS" TINYINT NOT NULL, - "CHANNEL_EXTRAS" VARCHAR(256) NULL, - "CHANNEL_NOTIFY_DATA" VARCHAR(4096) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type smallint NOT NULL, + code varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) DEFAULT '' NULL, + expires_time datetime NOT NULL, + redirect_uri varchar(255) DEFAULT NULL NULL, + state varchar(255) DEFAULT '' NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."PAY_REFUND" + +COMMENT ON COLUMN system_oauth2_code.id IS ''; +COMMENT ON COLUMN system_oauth2_code.user_id IS 'û'; +COMMENT ON COLUMN system_oauth2_code.user_type IS 'û'; +COMMENT ON COLUMN system_oauth2_code.code IS 'Ȩ'; +COMMENT ON COLUMN system_oauth2_code.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_oauth2_code.scopes IS 'ȨΧ'; +COMMENT ON COLUMN system_oauth2_code.expires_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_code.redirect_uri IS 'ض URI ַ'; +COMMENT ON COLUMN system_oauth2_code.state IS '״̬'; +COMMENT ON COLUMN system_oauth2_code.creator IS ''; +COMMENT ON COLUMN system_oauth2_code.create_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_code.updater IS ''; +COMMENT ON COLUMN system_oauth2_code.update_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_code.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_oauth2_code.tenant_id IS '⻧'; +COMMENT ON TABLE system_oauth2_code IS 'OAuth2 Ȩ'; + +-- ---------------------------- +-- Table structure for system_oauth2_refresh_token +-- ---------------------------- +CREATE TABLE system_oauth2_refresh_token ( - "ID" BIGINT IDENTITY(26,1) NOT NULL, - "MERCHANT_ID" BIGINT NOT NULL, - "APP_ID" BIGINT NOT NULL, - "CHANNEL_ID" BIGINT NOT NULL, - "CHANNEL_CODE" VARCHAR(32) NOT NULL, - "ORDER_ID" BIGINT NOT NULL, - "TRADE_NO" VARCHAR(64) NOT NULL, - "MERCHANT_ORDER_ID" VARCHAR(64) NOT NULL, - "MERCHANT_REFUND_NO" VARCHAR(64) NOT NULL, - "NOTIFY_URL" VARCHAR(1024) NOT NULL, - "NOTIFY_STATUS" TINYINT NOT NULL, - "STATUS" TINYINT NOT NULL, - "TYPE" TINYINT NOT NULL, - "PAY_AMOUNT" BIGINT NOT NULL, - "REFUND_AMOUNT" BIGINT NOT NULL, - "REASON" VARCHAR(256) NOT NULL, - "USER_IP" VARCHAR(50) NULL, - "CHANNEL_ORDER_NO" VARCHAR(64) NOT NULL, - "CHANNEL_REFUND_NO" VARCHAR(64) NULL, - "CHANNEL_ERROR_CODE" VARCHAR(128) NULL, - "CHANNEL_ERROR_MSG" VARCHAR(256) NULL, - "CHANNEL_EXTRAS" VARCHAR(1024) NULL, - "EXPIRE_TIME" TIMESTAMP(0) NULL, - "SUCCESS_TIME" TIMESTAMP(0) NULL, - "NOTIFY_TIME" TIMESTAMP(0) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + refresh_token varchar(32) NOT NULL, + user_type smallint NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) DEFAULT NULL NULL, + expires_time datetime NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_BLOB_TRIGGERS" + +COMMENT ON COLUMN system_oauth2_refresh_token.id IS ''; +COMMENT ON COLUMN system_oauth2_refresh_token.user_id IS 'û'; +COMMENT ON COLUMN system_oauth2_refresh_token.refresh_token IS 'ˢ'; +COMMENT ON COLUMN system_oauth2_refresh_token.user_type IS 'û'; +COMMENT ON COLUMN system_oauth2_refresh_token.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_oauth2_refresh_token.scopes IS 'ȨΧ'; +COMMENT ON COLUMN system_oauth2_refresh_token.expires_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_refresh_token.creator IS ''; +COMMENT ON COLUMN system_oauth2_refresh_token.create_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_refresh_token.updater IS ''; +COMMENT ON COLUMN system_oauth2_refresh_token.update_time IS 'ʱ'; +COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '⻧'; +COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 ˢ'; + +-- ---------------------------- +-- Table structure for system_operate_log +-- ---------------------------- +CREATE TABLE system_operate_log ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "BLOB_DATA" BLOB NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + trace_id varchar(64) DEFAULT '' NULL, + user_id bigint NOT NULL, + user_type smallint DEFAULT 0 NOT NULL, + type varchar(50) NOT NULL, + sub_type varchar(50) NOT NULL, + biz_id bigint NOT NULL, + action varchar(2000) DEFAULT '' NULL, + extra varchar(2000) DEFAULT '' NULL, + request_method varchar(16) DEFAULT '' NULL, + request_url varchar(255) DEFAULT '' NULL, + user_ip varchar(50) DEFAULT NULL NULL, + user_agent varchar(200) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_CALENDARS" + +COMMENT ON COLUMN system_operate_log.id IS '־'; +COMMENT ON COLUMN system_operate_log.trace_id IS '·׷ٱ'; +COMMENT ON COLUMN system_operate_log.user_id IS 'û'; +COMMENT ON COLUMN system_operate_log.user_type IS 'û'; +COMMENT ON COLUMN system_operate_log.type IS 'ģ'; +COMMENT ON COLUMN system_operate_log.sub_type IS ''; +COMMENT ON COLUMN system_operate_log.biz_id IS 'ģ'; +COMMENT ON COLUMN system_operate_log.action IS ''; +COMMENT ON COLUMN system_operate_log.extra IS 'չֶ'; +COMMENT ON COLUMN system_operate_log.request_method IS '󷽷'; +COMMENT ON COLUMN system_operate_log.request_url IS 'ַ'; +COMMENT ON COLUMN system_operate_log.user_ip IS 'û IP'; +COMMENT ON COLUMN system_operate_log.user_agent IS ' UA'; +COMMENT ON COLUMN system_operate_log.creator IS ''; +COMMENT ON COLUMN system_operate_log.create_time IS 'ʱ'; +COMMENT ON COLUMN system_operate_log.updater IS ''; +COMMENT ON COLUMN system_operate_log.update_time IS 'ʱ'; +COMMENT ON COLUMN system_operate_log.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_operate_log.tenant_id IS '⻧'; +COMMENT ON TABLE system_operate_log IS '־¼ V2 汾'; + +-- ---------------------------- +-- Table structure for system_post +-- ---------------------------- +CREATE TABLE system_post ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "CALENDAR_NAME" VARCHAR(190) NOT NULL, - "CALENDAR" BLOB NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + code varchar(64) NOT NULL, + name varchar(50) NOT NULL, + sort int NOT NULL, + status smallint NOT NULL, + remark varchar(500) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_CRON_TRIGGERS" + +COMMENT ON COLUMN system_post.id IS 'λID'; +COMMENT ON COLUMN system_post.code IS 'λ'; +COMMENT ON COLUMN system_post.name IS 'λ'; +COMMENT ON COLUMN system_post.sort IS 'ʾ˳'; +COMMENT ON COLUMN system_post.status IS '״̬0 1ͣã'; +COMMENT ON COLUMN system_post.remark IS 'ע'; +COMMENT ON COLUMN system_post.creator IS ''; +COMMENT ON COLUMN system_post.create_time IS 'ʱ'; +COMMENT ON COLUMN system_post.updater IS ''; +COMMENT ON COLUMN system_post.update_time IS 'ʱ'; +COMMENT ON COLUMN system_post.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_post.tenant_id IS '⻧'; +COMMENT ON TABLE system_post IS 'λϢ'; + +-- ---------------------------- +-- Records of system_post +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_post ON; +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'ceo', '³', 1, 0, '', 'admin', '2021-01-06 17:03:48', '1', '2023-02-11 15:19:04', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'se', 'Ŀ', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 09:18:20', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'user', 'ͨԱ', 4, 0, '111', 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 10:04:37', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 'HR', 'Դ', 5, 0, '', '1', '2024-03-24 20:45:40', '1', '2024-03-24 20:45:40', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_post OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_role +-- ---------------------------- +CREATE TABLE system_role ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "CRON_EXPRESSION" VARCHAR(120) NOT NULL, - "TIME_ZONE_ID" VARCHAR(80) NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(30) NOT NULL, + code varchar(100) NOT NULL, + sort int NOT NULL, + data_scope smallint DEFAULT 1 NOT NULL, + data_scope_dept_ids varchar(500) DEFAULT '' NULL, + status smallint NOT NULL, + type smallint NOT NULL, + remark varchar(500) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS" + +COMMENT ON COLUMN system_role.id IS 'ɫID'; +COMMENT ON COLUMN system_role.name IS 'ɫ'; +COMMENT ON COLUMN system_role.code IS 'ɫȨַ'; +COMMENT ON COLUMN system_role.sort IS 'ʾ˳'; +COMMENT ON COLUMN system_role.data_scope IS 'ݷΧ1ȫȨ 2ԶȨ 3Ȩ 4żȨޣ'; +COMMENT ON COLUMN system_role.data_scope_dept_ids IS 'ݷΧ(ָ)'; +COMMENT ON COLUMN system_role.status IS 'ɫ״̬0 1ͣã'; +COMMENT ON COLUMN system_role.type IS 'ɫ'; +COMMENT ON COLUMN system_role.remark IS 'ע'; +COMMENT ON COLUMN system_role.creator IS ''; +COMMENT ON COLUMN system_role.create_time IS 'ʱ'; +COMMENT ON COLUMN system_role.updater IS ''; +COMMENT ON COLUMN system_role.update_time IS 'ʱ'; +COMMENT ON COLUMN system_role.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_role.tenant_id IS '⻧'; +COMMENT ON TABLE system_role IS 'ɫϢ'; + +-- ---------------------------- +-- Records of system_role +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_role ON; +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'Ա', 'super_admin', 1, 1, '', 0, 1, 'Ա', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:21', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'ͨɫ', 'common', 2, 2, '', 0, 1, 'ͨɫ', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:20', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'CRM Ա', 'crm_admin', 2, 1, '', 0, 1, 'CRM רɫ', '1', '2024-02-24 10:51:13', '1', '2024-02-24 02:51:32', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '˺', 'test', 0, 1, '[]', 0, 2, '', '', '2021-01-06 13:49:35', '1', '2024-03-24 22:22:45', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '⻧Ա', 'tenant_admin', 0, 1, '', 0, 1, 'ϵͳԶ', '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '⻧Ա', 'tenant_admin', 0, 1, '', 0, 1, 'ϵͳԶ', '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +COMMIT; +SET IDENTITY_INSERT system_role OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_role_menu +-- ---------------------------- +CREATE TABLE system_role_menu ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "ENTRY_ID" VARCHAR(95) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "INSTANCE_NAME" VARCHAR(190) NOT NULL, - "FIRED_TIME" BIGINT NOT NULL, - "SCHED_TIME" BIGINT NOT NULL, - "PRIORITY" INT NOT NULL, - "STATE" VARCHAR(16) NOT NULL, - "JOB_NAME" VARCHAR(190) NULL, - "JOB_GROUP" VARCHAR(190) NULL, - "IS_NONCONCURRENT" VARCHAR(1) NULL, - "REQUESTS_RECOVERY" VARCHAR(1) NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + role_id bigint NOT NULL, + menu_id bigint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_JOB_DETAILS" + +COMMENT ON COLUMN system_role_menu.id IS ''; +COMMENT ON COLUMN system_role_menu.role_id IS 'ɫID'; +COMMENT ON COLUMN system_role_menu.menu_id IS '˵ID'; +COMMENT ON COLUMN system_role_menu.creator IS ''; +COMMENT ON COLUMN system_role_menu.create_time IS 'ʱ'; +COMMENT ON COLUMN system_role_menu.updater IS ''; +COMMENT ON COLUMN system_role_menu.update_time IS 'ʱ'; +COMMENT ON COLUMN system_role_menu.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_role_menu.tenant_id IS '⻧'; +COMMENT ON TABLE system_role_menu IS 'ɫͲ˵'; + +-- ---------------------------- +-- Records of system_role_menu +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_role_menu ON; +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (454, 2, 1093, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (455, 2, 1094, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (460, 2, 1100, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (467, 2, 1107, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (476, 2, 1117, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (477, 2, 100, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (478, 2, 101, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (479, 2, 102, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (480, 2, 1126, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (481, 2, 103, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (483, 2, 104, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (485, 2, 105, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (488, 2, 107, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (490, 2, 108, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (492, 2, 109, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (498, 2, 1138, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (523, 2, 1224, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (524, 2, 1225, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (541, 2, 500, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (543, 2, 501, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (675, 2, 2, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (689, 2, 1077, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (690, 2, 1078, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (692, 2, 1083, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (693, 2, 1084, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (699, 2, 1090, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (703, 2, 106, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (704, 2, 110, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (705, 2, 111, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', '2022-02-23 00:23:55', '110', '2022-02-23 00:23:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1606, 101, 1218, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1607, 101, 1219, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1608, 101, 1220, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1609, 101, 1221, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1610, 101, 5, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1611, 101, 1222, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1612, 101, 1118, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1613, 101, 1119, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1614, 101, 1120, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1615, 101, 1185, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1616, 101, 1186, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1617, 101, 1187, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1618, 101, 1188, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1619, 101, 1189, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1620, 101, 1190, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1621, 101, 1191, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1622, 101, 1192, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1623, 101, 1193, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1624, 101, 1194, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1625, 101, 1195, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1626, 101, 1196, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1627, 101, 1197, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1628, 101, 1198, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1629, 101, 1199, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1630, 101, 1200, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1631, 101, 1201, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1632, 101, 1202, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1633, 101, 1207, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1634, 101, 1208, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1635, 101, 1209, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1636, 101, 1210, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1637, 101, 1211, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1638, 101, 1212, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1639, 101, 1213, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1640, 101, 1215, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1641, 101, 2, '1', '2022-04-01 22:21:24', '1', '2022-04-01 22:21:24', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1642, 101, 1031, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1643, 101, 1032, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1644, 101, 1033, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1645, 101, 1034, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1646, 101, 1035, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1647, 101, 1050, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1648, 101, 1051, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1649, 101, 1052, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1650, 101, 1053, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1651, 101, 1054, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1652, 101, 1056, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1653, 101, 1057, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1654, 101, 1058, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1655, 101, 1059, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1656, 101, 1060, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1657, 101, 1066, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1658, 101, 1067, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1659, 101, 1070, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1664, 101, 1075, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1666, 101, 1077, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1667, 101, 1078, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1668, 101, 1082, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1669, 101, 1083, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1670, 101, 1084, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1671, 101, 1085, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1672, 101, 1086, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1673, 101, 1087, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1674, 101, 1088, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1675, 101, 1089, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1679, 101, 1237, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1680, 101, 1238, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1681, 101, 1239, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1682, 101, 1240, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1683, 101, 1241, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1684, 101, 1242, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1685, 101, 1243, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1687, 101, 106, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1688, 101, 110, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1689, 101, 111, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1690, 101, 112, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1691, 101, 113, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1732, 109, 1064, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1733, 109, 1001, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1734, 109, 1065, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1735, 109, 1002, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1736, 109, 1003, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1737, 109, 1004, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1738, 109, 1005, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1739, 109, 1006, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1740, 109, 1007, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1741, 109, 1008, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1742, 109, 1009, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1743, 109, 1010, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1744, 109, 1011, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1745, 109, 1012, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1746, 111, 100, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1747, 111, 101, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1748, 111, 1063, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1749, 111, 1064, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1750, 111, 1001, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1751, 111, 1065, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1752, 111, 1002, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1753, 111, 1003, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1754, 111, 1004, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1755, 111, 1005, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1756, 111, 1006, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1757, 111, 1007, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1758, 111, 1008, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1759, 111, 1009, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1760, 111, 1010, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1761, 111, 1011, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1762, 111, 1012, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1763, 109, 100, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1764, 109, 101, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1765, 109, 1063, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1766, 109, 1064, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1767, 109, 1001, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1768, 109, 1065, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1769, 109, 1002, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1770, 109, 1003, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1771, 109, 1004, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1772, 109, 1005, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1773, 109, 1006, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1774, 109, 1007, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1775, 109, 1008, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1776, 109, 1009, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1777, 109, 1010, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1778, 109, 1011, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1779, 109, 1012, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1780, 111, 100, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1781, 111, 101, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1782, 111, 1063, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1783, 111, 1064, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1784, 111, 1001, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1785, 111, 1065, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1786, 111, 1002, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1787, 111, 1003, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1788, 111, 1004, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1789, 111, 1005, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1790, 111, 1006, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1791, 111, 1007, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1792, 111, 1008, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1793, 111, 1009, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1794, 111, 1010, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1795, 111, 1011, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1796, 111, 1012, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1797, 109, 100, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1798, 109, 101, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1799, 109, 1063, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1800, 109, 1064, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1801, 109, 1001, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1802, 109, 1065, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1803, 109, 1002, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1804, 109, 1003, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1805, 109, 1004, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1806, 109, 1005, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1807, 109, 1006, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1808, 109, 1007, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1809, 109, 1008, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1810, 109, 1009, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1811, 109, 1010, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1812, 109, 1011, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1813, 109, 1012, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1814, 111, 100, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1815, 111, 101, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1816, 111, 1063, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1817, 111, 1064, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1818, 111, 1001, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1819, 111, 1065, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1820, 111, 1002, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1821, 111, 1003, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1822, 111, 1004, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1823, 111, 1005, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1824, 111, 1006, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1825, 111, 1007, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1826, 111, 1008, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1827, 111, 1009, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1828, 111, 1010, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1829, 111, 1011, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1830, 111, 1012, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1831, 109, 103, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1832, 109, 1017, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1833, 109, 1018, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1834, 109, 1019, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1835, 109, 1020, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1836, 111, 103, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1837, 111, 1017, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1838, 111, 1018, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1839, 111, 1019, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1840, 111, 1020, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1841, 109, 1036, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1842, 109, 1037, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1843, 109, 1038, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1844, 109, 1039, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1845, 109, 107, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1846, 111, 1036, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1847, 111, 1037, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1994, 2, 1027, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1995, 2, 1028, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1996, 2, 1029, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1997, 2, 1030, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1998, 2, 1031, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1999, 2, 1032, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2000, 2, 1033, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2001, 2, 1034, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2002, 2, 1035, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2003, 2, 1036, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2004, 2, 1037, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2005, 2, 1038, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2006, 2, 1039, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2007, 2, 1040, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2008, 2, 1042, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2009, 2, 1043, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2010, 2, 1045, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2011, 2, 1046, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2012, 2, 1048, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2013, 2, 1050, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2014, 2, 1051, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2015, 2, 1052, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2016, 2, 1053, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2017, 2, 1054, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2018, 2, 1056, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2019, 2, 1057, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2020, 2, 1058, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2021, 2, 2083, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2022, 2, 1059, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2023, 2, 1060, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2024, 2, 1063, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2025, 2, 1064, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2026, 2, 1065, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2027, 2, 1066, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2028, 2, 1067, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2029, 2, 1070, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2034, 2, 1075, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2036, 2, 1082, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2037, 2, 1085, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2038, 2, 1086, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2039, 2, 1087, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2040, 2, 1088, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2041, 2, 1089, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2042, 2, 1091, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2043, 2, 1092, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2044, 2, 1095, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2045, 2, 1096, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2046, 2, 1097, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2047, 2, 1098, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2048, 2, 1101, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2049, 2, 1102, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2050, 2, 1103, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2051, 2, 1104, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2052, 2, 1105, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2053, 2, 1106, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2054, 2, 1108, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2055, 2, 1109, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2061, 2, 1127, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2062, 2, 1128, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2063, 2, 1129, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2064, 2, 1130, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2066, 2, 1132, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2067, 2, 1133, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2068, 2, 1134, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2069, 2, 1135, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2070, 2, 1136, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2071, 2, 1137, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2072, 2, 114, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2073, 2, 1139, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2074, 2, 115, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2075, 2, 1140, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2076, 2, 116, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2077, 2, 1141, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2078, 2, 1142, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2079, 2, 1143, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2080, 2, 1150, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2081, 2, 1161, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2082, 2, 1162, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2083, 2, 1163, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2084, 2, 1164, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2085, 2, 1165, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2086, 2, 1166, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2087, 2, 1173, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2088, 2, 1174, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2089, 2, 1175, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2090, 2, 1176, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2091, 2, 1177, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2092, 2, 1178, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2099, 2, 1226, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2100, 2, 1227, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2101, 2, 1228, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2102, 2, 1229, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2103, 2, 1237, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2104, 2, 1238, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2105, 2, 1239, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2106, 2, 1240, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2107, 2, 1241, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2108, 2, 1242, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2109, 2, 1243, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2116, 2, 1254, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2117, 2, 1255, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2118, 2, 1256, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2119, 2, 1257, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2120, 2, 1258, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2121, 2, 1259, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2122, 2, 1260, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2123, 2, 1261, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2124, 2, 1263, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2125, 2, 1264, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2126, 2, 1265, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2127, 2, 1266, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2128, 2, 1267, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2129, 2, 1001, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2130, 2, 1002, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2131, 2, 1003, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2132, 2, 1004, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2133, 2, 1005, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2134, 2, 1006, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2135, 2, 1007, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2136, 2, 1008, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2137, 2, 1009, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2138, 2, 1010, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2139, 2, 1011, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2140, 2, 1012, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2141, 2, 1013, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2142, 2, 1014, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2143, 2, 1015, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2144, 2, 1016, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2145, 2, 1017, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2146, 2, 1018, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2147, 2, 1019, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2148, 2, 1020, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2149, 2, 1021, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2150, 2, 1022, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2151, 2, 1023, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2152, 2, 1281, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2153, 2, 1282, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2154, 2, 2000, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2155, 2, 2002, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2156, 2, 2003, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2157, 2, 2004, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2158, 2, 2005, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2159, 2, 2006, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2160, 2, 2008, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2161, 2, 2009, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2162, 2, 2010, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2163, 2, 2011, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2164, 2, 2012, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2170, 2, 2019, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2171, 2, 2020, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2172, 2, 2021, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2173, 2, 2022, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2174, 2, 2023, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2175, 2, 2025, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2177, 2, 2027, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2178, 2, 2028, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2179, 2, 2029, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2180, 2, 2014, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2181, 2, 2015, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2182, 2, 2016, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2183, 2, 2017, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2184, 2, 2018, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2188, 101, 1024, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2189, 101, 1, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2190, 101, 1025, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2191, 101, 1026, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2192, 101, 1027, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2193, 101, 1028, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2194, 101, 1029, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2195, 101, 1030, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2196, 101, 1036, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2197, 101, 1037, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2198, 101, 1038, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2199, 101, 1039, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2200, 101, 1040, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2201, 101, 1042, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2202, 101, 1043, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2203, 101, 1045, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2204, 101, 1046, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2205, 101, 1048, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2206, 101, 2083, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2207, 101, 1063, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2208, 101, 1064, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2209, 101, 1065, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2210, 101, 1093, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2211, 101, 1094, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2212, 101, 1095, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2213, 101, 1096, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2214, 101, 1097, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2215, 101, 1098, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2216, 101, 1100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2217, 101, 1101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2218, 101, 1102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2219, 101, 1103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2220, 101, 1104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2221, 101, 1105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2222, 101, 1106, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2223, 101, 2130, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2224, 101, 1107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2225, 101, 2131, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2226, 101, 1108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2227, 101, 2132, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2228, 101, 1109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2229, 101, 2133, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2230, 101, 2134, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2232, 101, 2135, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2234, 101, 2136, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2236, 101, 2137, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2238, 101, 2138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2240, 101, 2139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2242, 101, 2140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2243, 101, 2141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2244, 101, 2142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2245, 101, 2143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2246, 101, 2144, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2247, 101, 2145, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2248, 101, 2146, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2249, 101, 2147, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2250, 101, 100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2251, 101, 2148, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2252, 101, 101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2253, 101, 2149, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2254, 101, 102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2255, 101, 2150, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2256, 101, 103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2257, 101, 2151, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2258, 101, 104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2259, 101, 2152, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2260, 101, 105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2261, 101, 107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2262, 101, 108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2263, 101, 109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2264, 101, 1138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2265, 101, 1139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2266, 101, 1140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2267, 101, 1141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2268, 101, 1142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2269, 101, 1143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2270, 101, 1224, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2271, 101, 1225, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2272, 101, 1226, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2273, 101, 1227, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2274, 101, 1228, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2275, 101, 1229, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2282, 101, 1261, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2283, 101, 1263, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2284, 101, 1264, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2285, 101, 1265, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2286, 101, 1266, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2287, 101, 1267, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2288, 101, 1001, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2289, 101, 1002, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2290, 101, 1003, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2291, 101, 1004, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2292, 101, 1005, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2293, 101, 1006, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2294, 101, 1007, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2295, 101, 1008, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2296, 101, 1009, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2297, 101, 1010, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2298, 101, 1011, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2299, 101, 1012, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2300, 101, 500, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2301, 101, 1013, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2302, 101, 501, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2303, 101, 1014, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2304, 101, 1015, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2305, 101, 1016, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2306, 101, 1017, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2307, 101, 1018, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2308, 101, 1019, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2309, 101, 1020, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2932, 109, 1227, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2933, 109, 1228, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2934, 109, 1229, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2935, 109, 1138, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2936, 109, 1139, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2937, 109, 1140, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2938, 109, 1141, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2939, 109, 1142, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2940, 109, 1143, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2941, 111, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2942, 111, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2943, 111, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2944, 111, 1227, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2945, 111, 1228, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2946, 111, 1229, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2947, 111, 1138, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2948, 111, 1139, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2949, 111, 1140, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2996, 109, 1033, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2997, 109, 1034, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2998, 109, 1035, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2999, 109, 1050, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3000, 109, 1051, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3001, 109, 1052, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3002, 109, 1053, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3003, 109, 1054, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3004, 109, 1056, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3005, 109, 1057, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3006, 109, 1058, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3007, 109, 1059, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3008, 109, 1060, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3009, 109, 1066, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3010, 109, 1067, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3011, 109, 1070, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3012, 109, 1075, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3013, 109, 1076, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3014, 109, 1077, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3015, 109, 1078, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3016, 109, 1082, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3017, 109, 1083, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3018, 109, 1084, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3019, 109, 1085, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3020, 109, 1086, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3021, 109, 1087, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3022, 109, 1088, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3023, 109, 1089, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3024, 109, 1090, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3025, 109, 1091, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3026, 109, 1092, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3027, 109, 106, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3028, 109, 110, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3029, 109, 111, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3030, 109, 112, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3031, 109, 113, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3032, 109, 114, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3033, 109, 115, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3034, 109, 116, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3035, 109, 2472, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3036, 109, 2478, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3037, 109, 2479, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3038, 109, 2480, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3039, 109, 2481, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3040, 109, 2482, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3041, 109, 2483, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3042, 109, 2484, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3043, 109, 2485, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3044, 109, 2486, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3045, 109, 2487, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3046, 109, 2488, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3047, 109, 2489, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3048, 109, 2490, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3049, 109, 2491, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3050, 109, 2492, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3051, 109, 2493, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3052, 109, 2494, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3053, 109, 2495, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3054, 109, 2497, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3055, 109, 1237, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3056, 109, 1238, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3057, 109, 1239, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3058, 109, 1240, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3059, 109, 1241, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3060, 109, 1242, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3061, 109, 1243, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3062, 109, 2525, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3063, 109, 1255, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3064, 109, 1256, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3065, 109, 1257, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3066, 109, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3067, 109, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3068, 109, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3069, 111, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3070, 111, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3071, 111, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3072, 111, 1033, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3073, 111, 1034, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3074, 111, 1035, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3075, 111, 1050, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3076, 111, 1051, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3077, 111, 1052, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3078, 111, 1053, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3079, 111, 1054, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3080, 111, 1056, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3081, 111, 1057, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3082, 111, 1058, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3083, 111, 1059, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3084, 111, 1060, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3085, 111, 1066, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3086, 111, 1067, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3087, 111, 1070, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3088, 111, 1075, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3089, 111, 1076, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3090, 111, 1077, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3091, 111, 1078, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3092, 111, 1082, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3093, 111, 1083, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3094, 111, 1084, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3095, 111, 1085, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3096, 111, 1086, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3097, 111, 1087, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3098, 111, 1088, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3099, 111, 1089, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3100, 111, 1090, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3101, 111, 1091, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3102, 111, 1092, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3103, 111, 106, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3104, 111, 110, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3105, 111, 111, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3106, 111, 112, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3107, 111, 113, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3108, 111, 114, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3109, 111, 115, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3110, 111, 116, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3111, 111, 2472, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3112, 111, 2478, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3113, 111, 2479, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3114, 111, 2480, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3115, 111, 2481, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3116, 111, 2482, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3117, 111, 2483, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3118, 111, 2484, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3119, 111, 2485, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3120, 111, 2486, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3121, 111, 2487, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3122, 111, 2488, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3123, 111, 2489, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3124, 111, 2490, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3125, 111, 2491, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3126, 111, 2492, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3127, 111, 2493, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3128, 111, 2494, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3129, 111, 2495, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3130, 111, 2497, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3131, 111, 1237, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3132, 111, 1238, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3133, 111, 1239, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3134, 111, 1240, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3135, 111, 1241, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3136, 111, 1242, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3137, 111, 1243, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3138, 111, 2525, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3139, 111, 1255, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3140, 111, 1256, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3141, 111, 1257, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3224, 109, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3225, 109, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3226, 111, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3227, 111, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4166, 109, 1120, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4167, 109, 2713, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4168, 109, 2714, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4169, 109, 2715, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4170, 109, 2716, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4171, 109, 2717, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4172, 109, 2718, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4173, 109, 2720, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4174, 109, 1185, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4175, 109, 2721, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4176, 109, 1186, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4177, 109, 2722, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4178, 109, 1187, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4179, 109, 2723, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4180, 109, 1188, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4181, 109, 2724, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4182, 109, 1189, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4183, 109, 2725, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4184, 109, 1190, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4185, 109, 2726, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4186, 109, 1191, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4187, 109, 2727, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4188, 109, 1192, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4189, 109, 2728, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4190, 109, 1193, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4191, 109, 2729, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4192, 109, 1194, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4193, 109, 2730, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4194, 109, 1195, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4195, 109, 2731, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4196, 109, 1196, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4197, 109, 2732, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4198, 109, 1197, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4199, 109, 2733, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4200, 109, 1198, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4201, 109, 2734, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4202, 109, 1199, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4203, 109, 2735, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4204, 109, 1200, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4205, 109, 1201, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4206, 109, 1202, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4207, 109, 1207, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4208, 109, 1208, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4209, 109, 1209, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4210, 109, 1210, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4211, 109, 1211, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4212, 109, 1212, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4213, 109, 1213, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4214, 109, 1215, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4215, 109, 1216, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4216, 109, 1217, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4217, 109, 1218, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4218, 109, 1219, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4219, 109, 1220, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4220, 109, 1221, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4221, 109, 1222, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4222, 111, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4223, 111, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4224, 111, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4225, 111, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4226, 111, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4227, 111, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4228, 111, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4229, 111, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4230, 111, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4231, 111, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4232, 111, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4233, 111, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4234, 111, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4235, 111, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4236, 111, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4237, 111, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4238, 111, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4239, 111, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4240, 111, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4241, 111, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4242, 111, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4243, 111, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4244, 111, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4245, 111, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4246, 111, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4247, 111, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4248, 111, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4249, 111, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4250, 111, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4251, 111, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4252, 111, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4253, 111, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4254, 111, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4255, 111, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4256, 111, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4257, 111, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4258, 111, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4259, 111, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4260, 111, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4261, 111, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4262, 111, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4263, 111, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4264, 111, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4265, 111, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4266, 111, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4267, 111, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4268, 111, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4269, 111, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4270, 111, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4271, 111, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4272, 111, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4273, 111, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4274, 111, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4275, 111, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4276, 111, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4277, 111, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_role_menu OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_sms_channel +-- ---------------------------- +CREATE TABLE system_sms_channel ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "JOB_NAME" VARCHAR(190) NOT NULL, - "JOB_GROUP" VARCHAR(190) NOT NULL, - "DESCRIPTION" VARCHAR(250) NULL, - "JOB_CLASS_NAME" VARCHAR(250) NOT NULL, - "IS_DURABLE" VARCHAR(1) NOT NULL, - "IS_NONCONCURRENT" VARCHAR(1) NOT NULL, - "IS_UPDATE_DATA" VARCHAR(1) NOT NULL, - "REQUESTS_RECOVERY" VARCHAR(1) NOT NULL, - "JOB_DATA" BLOB NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + signature varchar(12) NOT NULL, + code varchar(63) NOT NULL, + status smallint NOT NULL, + remark varchar(255) DEFAULT NULL NULL, + api_key varchar(128) NOT NULL, + api_secret varchar(128) DEFAULT NULL NULL, + callback_url varchar(255) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_LOCKS" + +COMMENT ON COLUMN system_sms_channel.id IS ''; +COMMENT ON COLUMN system_sms_channel.signature IS 'ǩ'; +COMMENT ON COLUMN system_sms_channel.code IS ''; +COMMENT ON COLUMN system_sms_channel.status IS '״̬'; +COMMENT ON COLUMN system_sms_channel.remark IS 'ע'; +COMMENT ON COLUMN system_sms_channel.api_key IS ' API ˺'; +COMMENT ON COLUMN system_sms_channel.api_secret IS ' API Կ'; +COMMENT ON COLUMN system_sms_channel.callback_url IS 'ŷͻص URL'; +COMMENT ON COLUMN system_sms_channel.creator IS ''; +COMMENT ON COLUMN system_sms_channel.create_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_channel.updater IS ''; +COMMENT ON COLUMN system_sms_channel.update_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_channel.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_sms_channel IS ''; + +-- ---------------------------- +-- Records of system_sms_channel +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_sms_channel ON; +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, 'Ballcat', 'ALIYUN', 0, 'ҪŶֻҿã', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, '', '2021-03-31 11:53:10', '1', '2023-12-02 22:10:17', '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, '', 'DEBUG_DING_TALK', 0, '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2021-04-13 00:23:14', '1', '2022-03-27 20:29:49', '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (6, 'ʾ', 'DEBUG_DING_TALK', 0, '', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2022-04-10 23:07:59', '1', '2023-12-02 22:10:08', '0'); +COMMIT; +SET IDENTITY_INSERT system_sms_channel OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_sms_code +-- ---------------------------- +CREATE TABLE system_sms_code ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "LOCK_NAME" VARCHAR(40) NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + mobile varchar(11) NOT NULL, + code varchar(6) NOT NULL, + create_ip varchar(15) NOT NULL, + scene smallint NOT NULL, + today_index smallint NOT NULL, + used smallint NOT NULL, + used_time datetime DEFAULT NULL NULL, + used_ip varchar(255) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_PAUSED_TRIGGER_GRPS" + +CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile); + +COMMENT ON COLUMN system_sms_code.id IS ''; +COMMENT ON COLUMN system_sms_code.mobile IS 'ֻ'; +COMMENT ON COLUMN system_sms_code.code IS '֤'; +COMMENT ON COLUMN system_sms_code.create_ip IS ' IP'; +COMMENT ON COLUMN system_sms_code.scene IS 'ͳ'; +COMMENT ON COLUMN system_sms_code.today_index IS 'շ͵ĵڼ'; +COMMENT ON COLUMN system_sms_code.used IS 'Ƿʹ'; +COMMENT ON COLUMN system_sms_code.used_time IS 'ʹʱ'; +COMMENT ON COLUMN system_sms_code.used_ip IS 'ʹ IP'; +COMMENT ON COLUMN system_sms_code.creator IS ''; +COMMENT ON COLUMN system_sms_code.create_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_code.updater IS ''; +COMMENT ON COLUMN system_sms_code.update_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_code.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_sms_code.tenant_id IS '⻧'; +COMMENT ON TABLE system_sms_code IS 'ֻ֤'; + +-- ---------------------------- +-- Table structure for system_sms_log +-- ---------------------------- +CREATE TABLE system_sms_log ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + channel_id bigint NOT NULL, + channel_code varchar(63) NOT NULL, + template_id bigint NOT NULL, + template_code varchar(63) NOT NULL, + template_type smallint NOT NULL, + template_content varchar(255) NOT NULL, + template_params varchar(255) NOT NULL, + api_template_id varchar(63) NOT NULL, + mobile varchar(11) NOT NULL, + user_id bigint DEFAULT NULL NULL, + user_type smallint DEFAULT NULL NULL, + send_status smallint DEFAULT 0 NOT NULL, + send_time datetime DEFAULT NULL NULL, + api_send_code varchar(63) DEFAULT NULL NULL, + api_send_msg varchar(255) DEFAULT NULL NULL, + api_request_id varchar(255) DEFAULT NULL NULL, + api_serial_no varchar(255) DEFAULT NULL NULL, + receive_status smallint DEFAULT 0 NOT NULL, + receive_time datetime DEFAULT NULL NULL, + api_receive_code varchar(63) DEFAULT NULL NULL, + api_receive_msg varchar(255) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_SCHEDULER_STATE" + +COMMENT ON COLUMN system_sms_log.id IS ''; +COMMENT ON COLUMN system_sms_log.channel_id IS ''; +COMMENT ON COLUMN system_sms_log.channel_code IS ''; +COMMENT ON COLUMN system_sms_log.template_id IS 'ģ'; +COMMENT ON COLUMN system_sms_log.template_code IS 'ģ'; +COMMENT ON COLUMN system_sms_log.template_type IS ''; +COMMENT ON COLUMN system_sms_log.template_content IS ''; +COMMENT ON COLUMN system_sms_log.template_params IS 'Ų'; +COMMENT ON COLUMN system_sms_log.api_template_id IS ' API ģ'; +COMMENT ON COLUMN system_sms_log.mobile IS 'ֻ'; +COMMENT ON COLUMN system_sms_log.user_id IS 'û'; +COMMENT ON COLUMN system_sms_log.user_type IS 'û'; +COMMENT ON COLUMN system_sms_log.send_status IS '״̬'; +COMMENT ON COLUMN system_sms_log.send_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_log.api_send_code IS ' API ͽı'; +COMMENT ON COLUMN system_sms_log.api_send_msg IS ' API ʧܵʾ'; +COMMENT ON COLUMN system_sms_log.api_request_id IS ' API ͷصΨһ ID'; +COMMENT ON COLUMN system_sms_log.api_serial_no IS ' API ͷص'; +COMMENT ON COLUMN system_sms_log.receive_status IS '״̬'; +COMMENT ON COLUMN system_sms_log.receive_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_log.api_receive_code IS 'API սı'; +COMMENT ON COLUMN system_sms_log.api_receive_msg IS 'API ս˵'; +COMMENT ON COLUMN system_sms_log.creator IS ''; +COMMENT ON COLUMN system_sms_log.create_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_log.updater IS ''; +COMMENT ON COLUMN system_sms_log.update_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_log.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_sms_log IS '־'; + +-- ---------------------------- +-- Table structure for system_sms_template +-- ---------------------------- +CREATE TABLE system_sms_template ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "INSTANCE_NAME" VARCHAR(190) NOT NULL, - "LAST_CHECKIN_TIME" BIGINT NOT NULL, - "CHECKIN_INTERVAL" BIGINT NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + type smallint NOT NULL, + status smallint NOT NULL, + code varchar(63) NOT NULL, + name varchar(63) NOT NULL, + content varchar(255) NOT NULL, + params varchar(255) NOT NULL, + remark varchar(255) DEFAULT NULL NULL, + api_template_id varchar(63) NOT NULL, + channel_id bigint NOT NULL, + channel_code varchar(63) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_SIMPLE_TRIGGERS" + +COMMENT ON COLUMN system_sms_template.id IS ''; +COMMENT ON COLUMN system_sms_template.type IS 'ģ'; +COMMENT ON COLUMN system_sms_template.status IS '״̬'; +COMMENT ON COLUMN system_sms_template.code IS 'ģ'; +COMMENT ON COLUMN system_sms_template.name IS 'ģ'; +COMMENT ON COLUMN system_sms_template.content IS 'ģ'; +COMMENT ON COLUMN system_sms_template.params IS ''; +COMMENT ON COLUMN system_sms_template.remark IS 'ע'; +COMMENT ON COLUMN system_sms_template.api_template_id IS ' API ģ'; +COMMENT ON COLUMN system_sms_template.channel_id IS ''; +COMMENT ON COLUMN system_sms_template.channel_code IS ''; +COMMENT ON COLUMN system_sms_template.creator IS ''; +COMMENT ON COLUMN system_sms_template.create_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_template.updater IS ''; +COMMENT ON COLUMN system_sms_template.update_time IS 'ʱ'; +COMMENT ON COLUMN system_sms_template.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_sms_template IS 'ģ'; + +-- ---------------------------- +-- Records of system_sms_template +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_sms_template ON; +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, 'test_01', '֤', 'ڽе¼{operation}֤{code}', '["operation","code"]', 'Աע', '4383920', 6, 'DEBUG_DING_TALK', '', '2021-03-31 10:49:38', '1', '2023-12-02 22:32:47', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, 'test_02', '֪ͨ', '֤{code}֤5Чй©ˣ', '["code"]', NULL, 'SMS_207945135', 2, 'ALIYUN', '', '2021-03-31 11:56:30', '1', '2021-04-10 01:22:02', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (6, 3, 0, 'test-01', 'ģ', ' {name}', '["name"]', 'f', '4383920', 6, 'DEBUG_DING_TALK', '1', '2021-04-10 01:07:21', '1', '2022-12-10 21:26:09', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (7, 3, 0, 'test-04', '', 'ϼ{name}ţ{code}', '["name","code"]', '', 'suibian', 4, 'DEBUG_DING_TALK', '1', '2021-04-13 00:29:53', '1', '2023-12-02 22:35:34', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (8, 1, 0, 'user-sms-login', 'ǰ̨ûŵ¼', '֤{code}', '["code"]', NULL, '4372216', 6, 'DEBUG_DING_TALK', '1', '2021-10-11 08:10:00', '1', '2022-12-10 21:25:59', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (9, 2, 0, 'bpm_task_assigned', '񱻷', 'յһµĴ{processInstanceName}-{taskName}ˣ{startUserNickname}ӣ{detailUrl}', '["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-21 22:31:19', '1', '2022-01-22 00:03:36', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (10, 2, 0, 'bpm_process_instance_reject', '̱ͨ', '̱ͨ{processInstanceName}ԭ{reason}鿴ӣ{detailUrl}', '["processInstanceName","reason","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-22 00:03:31', '1', '2022-05-01 12:33:14', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (11, 2, 0, 'bpm_process_instance_approve', '̱ͨ', '̱ͨ{processInstanceName}鿴ӣ{detailUrl}', '["processInstanceName","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-22 00:04:31', '1', '2022-03-27 20:32:21', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (12, 2, 0, 'demo', 'ʾģ', 'ҾDzһ', '[]', NULL, 'biubiubiu', 6, 'DEBUG_DING_TALK', '1', '2022-04-10 23:22:49', '1', '2023-03-24 23:45:07', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (14, 1, 0, 'user-update-mobile', 'Աû - ޸ֻ', '֤{code}֤ 5 Чй©ˣ', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:04', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (15, 1, 0, 'user-update-password', 'Աû - ޸', '֤{code}֤ 5 Чй©ˣ', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:18', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (16, 1, 0, 'user-reset-password', 'Աû - ', '֤{code}֤ 5 Чй©ˣ', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-12-02 22:35:27', '0'); +COMMIT; +SET IDENTITY_INSERT system_sms_template OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_social_client +-- ---------------------------- +CREATE TABLE system_social_client ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "REPEAT_COUNT" BIGINT NOT NULL, - "REPEAT_INTERVAL" BIGINT NOT NULL, - "TIMES_TRIGGERED" BIGINT NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(255) NOT NULL, + social_type smallint NOT NULL, + user_type smallint NOT NULL, + client_id varchar(255) NOT NULL, + client_secret varchar(255) NOT NULL, + agent_id varchar(255) DEFAULT NULL NULL, + status smallint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_SIMPROP_TRIGGERS" + +COMMENT ON COLUMN system_social_client.id IS ''; +COMMENT ON COLUMN system_social_client.name IS 'Ӧ'; +COMMENT ON COLUMN system_social_client.social_type IS '罻ƽ̨'; +COMMENT ON COLUMN system_social_client.user_type IS 'û'; +COMMENT ON COLUMN system_social_client.client_id IS 'ͻ˱'; +COMMENT ON COLUMN system_social_client.client_secret IS 'ͻԿ'; +COMMENT ON COLUMN system_social_client.agent_id IS ''; +COMMENT ON COLUMN system_social_client.status IS '״̬'; +COMMENT ON COLUMN system_social_client.creator IS ''; +COMMENT ON COLUMN system_social_client.create_time IS 'ʱ'; +COMMENT ON COLUMN system_social_client.updater IS ''; +COMMENT ON COLUMN system_social_client.update_time IS 'ʱ'; +COMMENT ON COLUMN system_social_client.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_social_client.tenant_id IS '⻧'; +COMMENT ON TABLE system_social_client IS '罻ͻ˱'; + +-- ---------------------------- +-- Records of system_social_client +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_social_client ON; +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '', 20, 2, 'dingvrnreaje3yqvzhxg', 'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, '', '2023-10-18 11:21:18', '1', '2023-12-20 21:28:26', '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '', 20, 2, 'dingtsu9hpepjkbmthhw', 'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, '', '2023-10-18 11:21:18', '', '2023-12-20 21:28:26', '1', 121); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '΢Źں', 31, 1, 'wx5b23ba7a5589ecbb', '2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, '', '2023-10-18 16:07:46', '1', '2023-12-20 21:28:23', '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (43, '΢С', 34, 1, 'wx63c280fe3248a3e7', '6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, '', '2023-10-19 13:37:41', '1', '2023-12-20 21:28:25', '1', 1); +COMMIT; +SET IDENTITY_INSERT system_social_client OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_social_user +-- ---------------------------- +CREATE TABLE system_social_user ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "STR_PROP_1" VARCHAR(512) NULL, - "STR_PROP_2" VARCHAR(512) NULL, - "STR_PROP_3" VARCHAR(512) NULL, - "INT_PROP_1" INT NULL, - "INT_PROP_2" INT NULL, - "LONG_PROP_1" BIGINT NULL, - "LONG_PROP_2" BIGINT NULL, - "DEC_PROP_1" DEC(13,4) NULL, - "DEC_PROP_2" DEC(13,4) NULL, - "BOOL_PROP_1" VARCHAR(1) NULL, - "BOOL_PROP_2" VARCHAR(1) NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + type smallint NOT NULL, + openid varchar(32) NOT NULL, + token varchar(256) DEFAULT NULL NULL, + raw_token_info varchar(1024) NOT NULL, + nickname varchar(32) NOT NULL, + avatar varchar(255) DEFAULT NULL NULL, + raw_user_info varchar(1024) NOT NULL, + code varchar(256) NOT NULL, + state varchar(256) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."QRTZ_TRIGGERS" + +COMMENT ON COLUMN system_social_user.id IS '()'; +COMMENT ON COLUMN system_social_user.type IS '罻ƽ̨'; +COMMENT ON COLUMN system_social_user.openid IS '罻 openid'; +COMMENT ON COLUMN system_social_user.token IS '罻 token'; +COMMENT ON COLUMN system_social_user.raw_token_info IS 'ԭʼ Token ݣһ JSON ʽ'; +COMMENT ON COLUMN system_social_user.nickname IS 'ûdz'; +COMMENT ON COLUMN system_social_user.avatar IS 'ûͷ'; +COMMENT ON COLUMN system_social_user.raw_user_info IS 'ԭʼûݣһ JSON ʽ'; +COMMENT ON COLUMN system_social_user.code IS 'һε֤ code'; +COMMENT ON COLUMN system_social_user.state IS 'һε֤ state'; +COMMENT ON COLUMN system_social_user.creator IS ''; +COMMENT ON COLUMN system_social_user.create_time IS 'ʱ'; +COMMENT ON COLUMN system_social_user.updater IS ''; +COMMENT ON COLUMN system_social_user.update_time IS 'ʱ'; +COMMENT ON COLUMN system_social_user.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_social_user.tenant_id IS '⻧'; +COMMENT ON TABLE system_social_user IS '罻û'; + +-- ---------------------------- +-- Table structure for system_social_user_bind +-- ---------------------------- +CREATE TABLE system_social_user_bind ( - "SCHED_NAME" VARCHAR(120) NOT NULL, - "TRIGGER_NAME" VARCHAR(190) NOT NULL, - "TRIGGER_GROUP" VARCHAR(190) NOT NULL, - "JOB_NAME" VARCHAR(190) NOT NULL, - "JOB_GROUP" VARCHAR(190) NOT NULL, - "DESCRIPTION" VARCHAR(250) NULL, - "NEXT_FIRE_TIME" BIGINT NULL, - "PREV_FIRE_TIME" BIGINT NULL, - "PRIORITY" INT NULL, - "TRIGGER_STATE" VARCHAR(16) NOT NULL, - "TRIGGER_TYPE" VARCHAR(8) NOT NULL, - "START_TIME" BIGINT NOT NULL, - "END_TIME" BIGINT NULL, - "CALENDAR_NAME" VARCHAR(190) NULL, - "MISFIRE_INSTR" SMALLINT NULL, - "JOB_DATA" BLOB NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + user_type smallint NOT NULL, + social_type smallint NOT NULL, + social_user_id bigint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_DEPT" + +COMMENT ON COLUMN system_social_user_bind.id IS '()'; +COMMENT ON COLUMN system_social_user_bind.user_id IS 'û'; +COMMENT ON COLUMN system_social_user_bind.user_type IS 'û'; +COMMENT ON COLUMN system_social_user_bind.social_type IS '罻ƽ̨'; +COMMENT ON COLUMN system_social_user_bind.social_user_id IS '罻ûı'; +COMMENT ON COLUMN system_social_user_bind.creator IS ''; +COMMENT ON COLUMN system_social_user_bind.create_time IS 'ʱ'; +COMMENT ON COLUMN system_social_user_bind.updater IS ''; +COMMENT ON COLUMN system_social_user_bind.update_time IS 'ʱ'; +COMMENT ON COLUMN system_social_user_bind.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_social_user_bind.tenant_id IS '⻧'; +COMMENT ON TABLE system_social_user_bind IS '罻󶨱'; + +-- ---------------------------- +-- Table structure for system_tenant +-- ---------------------------- +CREATE TABLE system_tenant ( - "ID" BIGINT IDENTITY(112,1) NOT NULL, - "NAME" VARCHAR(30) DEFAULT '' - NOT NULL, - "PARENT_ID" BIGINT DEFAULT 0 - NOT NULL, - "SORT" INT DEFAULT 0 - NOT NULL, - "LEADER_USER_ID" BIGINT NULL, - "PHONE" VARCHAR(11) NULL, - "EMAIL" VARCHAR(50) NULL, - "STATUS" TINYINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(30) NOT NULL, + contact_user_id bigint DEFAULT NULL NULL, + contact_name varchar(30) NOT NULL, + contact_mobile varchar(500) DEFAULT NULL NULL, + status smallint DEFAULT 0 NOT NULL, + website varchar(256) DEFAULT '' NULL, + package_id bigint NOT NULL, + expire_time datetime NOT NULL, + account_count int NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA" + +COMMENT ON COLUMN system_tenant.id IS '⻧'; +COMMENT ON COLUMN system_tenant.name IS '⻧'; +COMMENT ON COLUMN system_tenant.contact_user_id IS 'ϵ˵û'; +COMMENT ON COLUMN system_tenant.contact_name IS 'ϵ'; +COMMENT ON COLUMN system_tenant.contact_mobile IS 'ϵֻ'; +COMMENT ON COLUMN system_tenant.status IS '⻧״̬0 1ͣã'; +COMMENT ON COLUMN system_tenant.website IS ''; +COMMENT ON COLUMN system_tenant.package_id IS '⻧ײͱ'; +COMMENT ON COLUMN system_tenant.expire_time IS 'ʱ'; +COMMENT ON COLUMN system_tenant.account_count IS '˺'; +COMMENT ON COLUMN system_tenant.creator IS ''; +COMMENT ON COLUMN system_tenant.create_time IS 'ʱ'; +COMMENT ON COLUMN system_tenant.updater IS ''; +COMMENT ON COLUMN system_tenant.update_time IS 'ʱ'; +COMMENT ON COLUMN system_tenant.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_tenant IS '⻧'; + +-- ---------------------------- +-- Records of system_tenant +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_tenant ON; +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, 'Դ', NULL, 'ܵ', '17321315478', 0, 'www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2023-11-06 11:41:41', '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, 'С⻧', 110, 'С2', '15601691300', 0, 'zsxq.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-11-06 11:41:47', '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, '⻧', 113, '', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-11-06 11:41:53', '0'); +COMMIT; +SET IDENTITY_INSERT system_tenant OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_tenant_package +-- ---------------------------- +CREATE TABLE system_tenant_package ( - "ID" BIGINT IDENTITY(1235,1) NOT NULL, - "SORT" INT DEFAULT 0 - NOT NULL, - "LABEL" VARCHAR(100) DEFAULT '' - NOT NULL, - "VALUE" VARCHAR(100) DEFAULT '' - NOT NULL, - "DICT_TYPE" VARCHAR(100) DEFAULT '' - NOT NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "COLOR_TYPE" VARCHAR(100) DEFAULT '' - NULL, - "CSS_CLASS" VARCHAR(100) DEFAULT '' - NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(30) NOT NULL, + status smallint DEFAULT 0 NOT NULL, + remark varchar(256) DEFAULT '' NULL, + menu_ids varchar(4096) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" + +COMMENT ON COLUMN system_tenant_package.id IS 'ײͱ'; +COMMENT ON COLUMN system_tenant_package.name IS 'ײ'; +COMMENT ON COLUMN system_tenant_package.status IS '⻧״̬0 1ͣã'; +COMMENT ON COLUMN system_tenant_package.remark IS 'ע'; +COMMENT ON COLUMN system_tenant_package.menu_ids IS 'IJ˵'; +COMMENT ON COLUMN system_tenant_package.creator IS ''; +COMMENT ON COLUMN system_tenant_package.create_time IS 'ʱ'; +COMMENT ON COLUMN system_tenant_package.updater IS ''; +COMMENT ON COLUMN system_tenant_package.update_time IS 'ʱ'; +COMMENT ON COLUMN system_tenant_package.deleted IS 'Ƿɾ'; +COMMENT ON TABLE system_tenant_package IS '⻧ײͱ'; + +-- ---------------------------- +-- Records of system_tenant_package +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_tenant_package ON; +INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, 'ͨײ', 0, 'С', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2024-03-30 17:53:17', '0'); +COMMIT; +SET IDENTITY_INSERT system_tenant_package OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_user_post +-- ---------------------------- +CREATE TABLE system_user_post ( - "ID" BIGINT IDENTITY(169,1) NOT NULL, - "NAME" VARCHAR(100) DEFAULT '' - NOT NULL, - "TYPE" VARCHAR(100) DEFAULT '' - NOT NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "DELETED_TIME" TIMESTAMP(0) NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint DEFAULT 0 NOT NULL, + post_id bigint DEFAULT 0 NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE" + +COMMENT ON COLUMN system_user_post.id IS 'id'; +COMMENT ON COLUMN system_user_post.user_id IS 'ûID'; +COMMENT ON COLUMN system_user_post.post_id IS 'λID'; +COMMENT ON COLUMN system_user_post.creator IS ''; +COMMENT ON COLUMN system_user_post.create_time IS 'ʱ'; +COMMENT ON COLUMN system_user_post.updater IS ''; +COMMENT ON COLUMN system_user_post.update_time IS 'ʱ'; +COMMENT ON COLUMN system_user_post.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_user_post.tenant_id IS '⻧'; +COMMENT ON TABLE system_user_post IS 'ûλ'; + +-- ---------------------------- +-- Records of system_user_post +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_user_post ON; +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 104, 1, '1', '2022-05-16 19:36:28', '1', '2022-05-16 19:36:28', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, 117, 2, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 118, 1, '1', '2022-07-09 17:44:44', '1', '2022-07-09 17:44:44', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (119, 114, 5, '1', '2024-03-24 20:45:51', '1', '2024-03-24 20:45:51', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (123, 115, 1, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (124, 115, 2, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_user_post OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_user_role +-- ---------------------------- +CREATE TABLE system_user_role ( - "ID" BIGINT IDENTITY(5832,1) NOT NULL, - "TYPE" TINYINT DEFAULT 0 - NOT NULL, - "APPLICATION_NAME" VARCHAR(50) NOT NULL, - "CODE" INT DEFAULT 0 - NOT NULL, - "MESSAGE" VARCHAR(512) DEFAULT '' - NOT NULL, - "MEMO" VARCHAR(512) DEFAULT '' - NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + user_id bigint NOT NULL, + role_id bigint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NULL, + deleted bit DEFAULT '0' NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG" + +COMMENT ON COLUMN system_user_role.id IS ''; +COMMENT ON COLUMN system_user_role.user_id IS 'ûID'; +COMMENT ON COLUMN system_user_role.role_id IS 'ɫID'; +COMMENT ON COLUMN system_user_role.creator IS ''; +COMMENT ON COLUMN system_user_role.create_time IS 'ʱ'; +COMMENT ON COLUMN system_user_role.updater IS ''; +COMMENT ON COLUMN system_user_role.update_time IS 'ʱ'; +COMMENT ON COLUMN system_user_role.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_user_role.tenant_id IS '⻧'; +COMMENT ON TABLE system_user_role IS 'ûͽɫ'; + +-- ---------------------------- +-- Records of system_user_role +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_user_role ON; +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:17', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:12', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:11', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', '2022-01-11 13:19:45', '1', '2022-01-11 13:19:45', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, '110', '2022-02-23 13:14:38', '110', '2022-02-23 13:14:38', '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, '1', '2022-05-12 20:39:29', '1', '2022-05-12 20:39:29', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, '1', '2022-05-28 15:43:57', '1', '2022-05-28 15:43:57', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', '2022-07-21 22:08:30', '1', '2022-07-21 22:08:30', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', '2024-03-24 22:23:03', '1', '2024-03-24 22:23:03', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_user_role OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for system_users +-- ---------------------------- +CREATE TABLE system_users ( - "ID" BIGINT IDENTITY(2163,1) NOT NULL, - "LOG_TYPE" BIGINT NOT NULL, - "TRACE_ID" VARCHAR(64) DEFAULT '' - NOT NULL, - "USER_ID" BIGINT DEFAULT 0 - NOT NULL, - "USER_TYPE" TINYINT DEFAULT 0 - NOT NULL, - "USERNAME" VARCHAR(50) DEFAULT '' - NOT NULL, - "RESULT" TINYINT NOT NULL, - "USER_IP" VARCHAR(50) NOT NULL, - "USER_AGENT" VARCHAR(512) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + username varchar(30) NOT NULL, + password varchar(100) DEFAULT '' NULL, + nickname varchar(30) NOT NULL, + remark varchar(500) DEFAULT NULL NULL, + dept_id bigint DEFAULT NULL NULL, + post_ids varchar(255) DEFAULT NULL NULL, + email varchar(50) DEFAULT '' NULL, + mobile varchar(11) DEFAULT '' NULL, + sex smallint DEFAULT 0 NULL, + avatar varchar(512) DEFAULT '' NULL, + status smallint DEFAULT 0 NOT NULL, + login_ip varchar(50) DEFAULT '' NULL, + login_date datetime DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT" + +COMMENT ON COLUMN system_users.id IS 'ûID'; +COMMENT ON COLUMN system_users.username IS 'û˺'; +COMMENT ON COLUMN system_users.password IS ''; +COMMENT ON COLUMN system_users.nickname IS 'ûdz'; +COMMENT ON COLUMN system_users.remark IS 'ע'; +COMMENT ON COLUMN system_users.dept_id IS 'ID'; +COMMENT ON COLUMN system_users.post_ids IS 'λ'; +COMMENT ON COLUMN system_users.email IS 'û'; +COMMENT ON COLUMN system_users.mobile IS 'ֻ'; +COMMENT ON COLUMN system_users.sex IS 'ûԱ'; +COMMENT ON COLUMN system_users.avatar IS 'ͷַ'; +COMMENT ON COLUMN system_users.status IS 'ʺ״̬0 1ͣã'; +COMMENT ON COLUMN system_users.login_ip IS '¼IP'; +COMMENT ON COLUMN system_users.login_date IS '¼ʱ'; +COMMENT ON COLUMN system_users.creator IS ''; +COMMENT ON COLUMN system_users.create_time IS 'ʱ'; +COMMENT ON COLUMN system_users.updater IS ''; +COMMENT ON COLUMN system_users.update_time IS 'ʱ'; +COMMENT ON COLUMN system_users.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN system_users.tenant_id IS '⻧'; +COMMENT ON TABLE system_users IS 'ûϢ'; + +-- ---------------------------- +-- Records of system_users +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT system_users ON; +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', 'Դ', 'Ա', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-29 21:50:32', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-29 21:50:32', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '', 'Ҫ', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', 'Դ', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', 'Ժ', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', 'ܵ', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', '0', 118); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', 'ܵ', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', '0', 119); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', 'ܵ', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', '0', 120); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, 'admin110', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', 'С', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-09-25 22:47:33', '1', '2022-02-22 00:56:14', NULL, '2022-09-25 22:47:33', '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, 'test', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', 'û', NULL, NULL, '[]', '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:42:17', '110', '2022-02-23 13:14:33', NULL, '2023-12-30 11:42:17', '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 'newobject', '$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', '¶', NULL, 100, '[]', '', '15601691235', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-16 23:11:38', '1', '2022-02-23 19:08:03', NULL, '2024-03-16 23:11:38', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', NULL, '2022-03-19 18:38:51', '0', 122); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr С', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-24 22:21:05', '1', '2022-03-19 21:50:58', NULL, '2024-03-24 22:21:05', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-04-04 09:37:14', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', 'Ժ', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', '1', '2024-04-04 09:48:05', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, 'hh', '$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', 'Ǻ', NULL, 100, '[]', '777@qq.com', '15601882312', 1, '', 0, '', NULL, '1', '2024-04-27 08:45:56', '1', '2024-04-27 08:45:56', '0', 1); +COMMIT; +SET IDENTITY_INSERT system_users OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for yudao_demo01_contact +-- ---------------------------- +CREATE TABLE yudao_demo01_contact ( - "ID" BIGINT IDENTITY(5,1) NOT NULL, - "MAIL" VARCHAR(255) NOT NULL, - "USERNAME" VARCHAR(255) NOT NULL, - "PASSWORD" VARCHAR(255) NOT NULL, - "HOST" VARCHAR(255) NOT NULL, - "PORT" INT NOT NULL, - "SSL_ENABLE" BIT DEFAULT '0' - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday datetime NOT NULL, + description varchar(255) NOT NULL, + avatar varchar(512) DEFAULT NULL NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG" + +COMMENT ON COLUMN yudao_demo01_contact.id IS ''; +COMMENT ON COLUMN yudao_demo01_contact.name IS ''; +COMMENT ON COLUMN yudao_demo01_contact.sex IS 'Ա'; +COMMENT ON COLUMN yudao_demo01_contact.birthday IS ''; +COMMENT ON COLUMN yudao_demo01_contact.description IS ''; +COMMENT ON COLUMN yudao_demo01_contact.avatar IS 'ͷ'; +COMMENT ON COLUMN yudao_demo01_contact.creator IS ''; +COMMENT ON COLUMN yudao_demo01_contact.create_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo01_contact.updater IS ''; +COMMENT ON COLUMN yudao_demo01_contact.update_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo01_contact.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN yudao_demo01_contact.tenant_id IS '⻧'; +COMMENT ON TABLE yudao_demo01_contact IS 'ʾϵ˱'; + +-- ---------------------------- +-- Records of yudao_demo01_contact +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT yudao_demo01_contact ON; +INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '', 2, '2023-11-07 00:00:00', '

ѽ

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', '0', 1); +COMMIT; +SET IDENTITY_INSERT yudao_demo01_contact OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for yudao_demo02_category +-- ---------------------------- +CREATE TABLE yudao_demo02_category ( - "ID" BIGINT IDENTITY(354,1) NOT NULL, - "USER_ID" BIGINT NULL, - "USER_TYPE" TINYINT NULL, - "TO_MAIL" VARCHAR(255) NOT NULL, - "ACCOUNT_ID" BIGINT NOT NULL, - "FROM_MAIL" VARCHAR(255) NOT NULL, - "TEMPLATE_ID" BIGINT NOT NULL, - "TEMPLATE_CODE" VARCHAR(63) NOT NULL, - "TEMPLATE_NICKNAME" VARCHAR(255) NULL, - "TEMPLATE_TITLE" VARCHAR(255) NOT NULL, - "TEMPLATE_CONTENT" VARCHAR(10240) NOT NULL, - "TEMPLATE_PARAMS" VARCHAR(255) NOT NULL, - "SEND_STATUS" TINYINT DEFAULT 0 - NOT NULL, - "SEND_TIME" TIMESTAMP(0) NULL, - "SEND_MESSAGE_ID" VARCHAR(255) NULL, - "SEND_EXCEPTION" VARCHAR(4096) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(100) DEFAULT '' NULL, + parent_id bigint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE" + +COMMENT ON COLUMN yudao_demo02_category.id IS ''; +COMMENT ON COLUMN yudao_demo02_category.name IS ''; +COMMENT ON COLUMN yudao_demo02_category.parent_id IS ''; +COMMENT ON COLUMN yudao_demo02_category.creator IS ''; +COMMENT ON COLUMN yudao_demo02_category.create_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo02_category.updater IS ''; +COMMENT ON COLUMN yudao_demo02_category.update_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo02_category.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN yudao_demo02_category.tenant_id IS '⻧'; +COMMENT ON TABLE yudao_demo02_category IS 'ʾ'; + +-- ---------------------------- +-- Records of yudao_demo02_category +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT yudao_demo02_category ON; +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'ֹ', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'С', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', '0', 1); +COMMIT; +SET IDENTITY_INSERT yudao_demo02_category OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for yudao_demo03_course +-- ---------------------------- +CREATE TABLE yudao_demo03_course ( - "ID" BIGINT IDENTITY(16,1) NOT NULL, - "NAME" VARCHAR(63) NOT NULL, - "CODE" VARCHAR(63) NOT NULL, - "ACCOUNT_ID" BIGINT NOT NULL, - "NICKNAME" VARCHAR(255) NULL, - "TITLE" VARCHAR(255) NOT NULL, - "CONTENT" VARCHAR(10240) NOT NULL, - "PARAMS" VARCHAR(255) NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + student_id bigint NOT NULL, + name varchar(100) DEFAULT '' NULL, + score smallint NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_MENU" + +COMMENT ON COLUMN yudao_demo03_course.id IS ''; +COMMENT ON COLUMN yudao_demo03_course.student_id IS 'ѧ'; +COMMENT ON COLUMN yudao_demo03_course.name IS ''; +COMMENT ON COLUMN yudao_demo03_course.score IS ''; +COMMENT ON COLUMN yudao_demo03_course.creator IS ''; +COMMENT ON COLUMN yudao_demo03_course.create_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_course.updater IS ''; +COMMENT ON COLUMN yudao_demo03_course.update_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_course.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN yudao_demo03_course.tenant_id IS '⻧'; +COMMENT ON TABLE yudao_demo03_course IS 'ѧγ̱'; + +-- ---------------------------- +-- Records of yudao_demo03_course +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT yudao_demo03_course ON; +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '', 66, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, 'ѧ', 22, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, 'ѩ', 12, '1', '2023-11-17 13:13:20', '1', '2023-11-17 13:13:20', '0', 1); +COMMIT; +SET IDENTITY_INSERT yudao_demo03_course OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for yudao_demo03_grade +-- ---------------------------- +CREATE TABLE yudao_demo03_grade ( - "ID" BIGINT IDENTITY(2162,1) NOT NULL, - "NAME" VARCHAR(50) NOT NULL, - "PERMISSION" VARCHAR(100) DEFAULT '' - NOT NULL, - "TYPE" TINYINT NOT NULL, - "SORT" INT DEFAULT 0 - NOT NULL, - "PARENT_ID" BIGINT DEFAULT 0 - NOT NULL, - "PATH" VARCHAR(200) DEFAULT '' - NULL, - "ICON" VARCHAR(100) DEFAULT '#' - NULL, - "COMPONENT" VARCHAR(255) NULL, - "COMPONENT_NAME" VARCHAR(255) NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "VISIBLE" BIT DEFAULT '1' - NOT NULL, - "KEEP_ALIVE" BIT DEFAULT '1' - NOT NULL, - "ALWAYS_SHOW" BIT DEFAULT '1' - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + student_id bigint NOT NULL, + name varchar(100) DEFAULT '' NULL, + teacher varchar(255) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTICE" + +COMMENT ON COLUMN yudao_demo03_grade.id IS ''; +COMMENT ON COLUMN yudao_demo03_grade.student_id IS 'ѧ'; +COMMENT ON COLUMN yudao_demo03_grade.name IS ''; +COMMENT ON COLUMN yudao_demo03_grade.teacher IS ''; +COMMENT ON COLUMN yudao_demo03_grade.creator IS ''; +COMMENT ON COLUMN yudao_demo03_grade.create_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_grade.updater IS ''; +COMMENT ON COLUMN yudao_demo03_grade.update_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_grade.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN yudao_demo03_grade.tenant_id IS '⻧'; +COMMENT ON TABLE yudao_demo03_grade IS 'ѧ༶'; + +-- ---------------------------- +-- Records of yudao_demo03_grade +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT yudao_demo03_grade ON; +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, ' 2 ', 'ܽ', '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, 'Ϊ', 'ңң', '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, 'Сͼ', 'С111', '1', '2023-11-17 13:10:23', '1', '2023-11-17 13:10:23', '0', 1); +COMMIT; +SET IDENTITY_INSERT yudao_demo03_grade OFF; +-- @formatter:on + +-- ---------------------------- +-- Table structure for yudao_demo03_student +-- ---------------------------- +CREATE TABLE yudao_demo03_student ( - "ID" BIGINT IDENTITY(5,1) NOT NULL, - "TITLE" VARCHAR(50) NOT NULL, - "CONTENT" TEXT NOT NULL, - "TYPE" TINYINT NOT NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL + id bigint NOT NULL PRIMARY KEY IDENTITY, + name varchar(100) DEFAULT '' NULL, + sex smallint NOT NULL, + birthday datetime NOT NULL, + description varchar(255) NOT NULL, + creator varchar(64) DEFAULT '' NULL, + create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + updater varchar(64) DEFAULT '' NULL, + update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + deleted bit DEFAULT '0' NOT NULL, + tenant_id bigint DEFAULT 0 NOT NULL ); -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_FORM" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_FORM" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_OA_LEAVE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_OA_LEAVE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_TASK_EXT" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_TASK_EXT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_USER_GROUP" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."BPM_USER_GROUP" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CONFIG" ON; -INSERT INTO "RUOYI_VUE_PRO"."INFRA_CONFIG"("ID","CATEGORY","TYPE","NAME","CONFIG_KEY","VALUE","VISIBLE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,'biz',1,'用户管理-账号初始密码','sys.user.init-password','123456',0,'初始化密码 123456','admin','2021-01-05 17:03:48','1','2022-03-20 02:25:51',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_CONFIG"("ID","CATEGORY","TYPE","NAME","CONFIG_KEY","VALUE","VISIBLE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(7,'url',2,'MySQL 监控的地址','url.druid','',1,'','1','2023-04-07 13:41:16','1','2023-04-07 14:33:38',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_CONFIG"("ID","CATEGORY","TYPE","NAME","CONFIG_KEY","VALUE","VISIBLE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(8,'url',2,'SkyWalking 监控的地址','url.skywalking','',1,'','1','2023-04-07 13:41:16','1','2023-04-07 14:57:03',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_CONFIG"("ID","CATEGORY","TYPE","NAME","CONFIG_KEY","VALUE","VISIBLE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(9,'url',2,'Spring Boot Admin 监控的地址','url.spring-boot-admin','',1,'','1','2023-04-07 13:41:16','1','2023-04-07 14:52:07',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_CONFIG"("ID","CATEGORY","TYPE","NAME","CONFIG_KEY","VALUE","VISIBLE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(10,'url',2,'Swagger 接口文档的地址','url.swagger','',1,'','1','2023-04-07 13:41:16','1','2023-04-07 14:59:00',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_CONFIG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG" ON; -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(4,'数据库',1,'我是数据库',1,'{"@class":"cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}','1','2022-03-15 23:56:24','1','2023-04-08 09:44:47',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(5,'本地磁盘',10,'测试下本地存储',0,'{"@class":"cn.iocoder.yudao.framework.file.core.client.local.LocalFileClientConfig","basePath":"/Users/yunai/file_test","domain":"http://127.0.0.1:48080"}','1','2022-03-15 23:57:00','1','2023-04-08 09:44:47',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(11,'S3 - 七牛云',20,null,0,'{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}','1','2022-03-19 18:00:03','1','2023-04-08 09:44:47',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(15,'S3 - 七牛云',20,'',0,'{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}','1','2022-06-10 20:50:41','1','2023-04-08 09:44:47',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(16,'S3 - 七牛云',20,'',0,'{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}','1','2022-06-11 20:32:08','1','2023-04-08 09:44:47',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"("ID","NAME","STORAGE","REMARK","MASTER","CONFIG","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(17,'S3 - 七牛云',20,'',0,'{"@class":"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3-cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8","accessSecret":"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP"}','1','2022-06-11 20:32:47','1','2023-04-08 09:44:47',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_JOB" ON; -INSERT INTO "RUOYI_VUE_PRO"."INFRA_JOB"("ID","NAME","STATUS","HANDLER_NAME","HANDLER_PARAM","CRON_EXPRESSION","RETRY_COUNT","RETRY_INTERVAL","MONITOR_TIMEOUT","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(5,'支付通知 Job',1,'payNotifyJob',null,'* * * * * ?',0,0,0,'1','2021-10-27 08:34:42','1','2022-11-24 23:01:35',0); -INSERT INTO "RUOYI_VUE_PRO"."INFRA_JOB"("ID","NAME","STATUS","HANDLER_NAME","HANDLER_PARAM","CRON_EXPRESSION","RETRY_COUNT","RETRY_INTERVAL","MONITOR_TIMEOUT","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(16,'Job 示例',1,'demoJob',null,'* * * L * ?',1,1,0,'1','2022-09-24 22:31:41','1','2022-09-24 22:31:42',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_JOB" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_JOB_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_JOB_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_TEST_DEMO" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."INFRA_TEST_DEMO" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."MEMBER_USER" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."MEMBER_USER" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_APP" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_APP" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_CHANNEL" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_CHANNEL" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_MERCHANT" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_MERCHANT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_ORDER" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_ORDER" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_REFUND" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."PAY_REFUND" OFF; -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_CRON_TRIGGERS"("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP","CRON_EXPRESSION","TIME_ZONE_ID") VALUES('schedulerName','payNotifyJob','DEFAULT','* * * * * ?','Asia/Shanghai'); - -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_JOB_DETAILS"("SCHED_NAME","JOB_NAME","JOB_GROUP","DESCRIPTION","JOB_CLASS_NAME","IS_DURABLE","IS_NONCONCURRENT","IS_UPDATE_DATA","REQUESTS_RECOVERY","JOB_DATA") VALUES('schedulerName','payNotifyJob','DEFAULT',null,'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker','0','1','1','0',0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); - -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_LOCKS"("SCHED_NAME","LOCK_NAME") VALUES('schedulerName','STATE_ACCESS'); -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_LOCKS"("SCHED_NAME","LOCK_NAME") VALUES('schedulerName','TRIGGER_ACCESS'); - -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_SCHEDULER_STATE"("SCHED_NAME","INSTANCE_NAME","LAST_CHECKIN_TIME","CHECKIN_INTERVAL") VALUES('schedulerName','Yunai1677076619095',1677076631456,15000); - -INSERT INTO "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP","JOB_NAME","JOB_GROUP","DESCRIPTION","NEXT_FIRE_TIME","PREV_FIRE_TIME","PRIORITY","TRIGGER_STATE","TRIGGER_TYPE","START_TIME","END_TIME","CALENDAR_NAME","MISFIRE_INSTR","JOB_DATA") VALUES('schedulerName','payNotifyJob','DEFAULT','payNotifyJob','DEFAULT',null,1677076638000,1677076637000,5,'WAITING','CRON',1635294882000,0,null,0,0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DEPT" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(100,'芋道源码',0,0,1,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','1','2022-06-19 00:29:10',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(101,'深圳总公司',100,1,104,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','1','2022-05-16 20:25:23',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(102,'长沙分公司',100,2,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','','2021-12-15 05:01:40',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(103,'研发部门',101,1,104,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','103','2022-01-14 01:04:14',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(104,'市场部门',101,2,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','','2021-12-15 05:01:38',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(105,'测试部门',101,3,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','1','2022-05-16 20:25:15',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(106,'财务部门',101,4,103,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','103','2022-01-15 21:32:22',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(107,'运维部门',101,5,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','','2021-12-15 05:01:33',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(108,'市场部门',102,1,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','1','2022-02-16 08:35:45',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(109,'财务部门',102,2,null,'15888888888','ry@qq.com',0,'admin','2021-01-05 17:03:47','','2021-12-15 05:01:29',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(110,'新部门',0,1,null,null,null,0,'110','2022-02-23 20:46:30','110','2022-02-23 20:46:30',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DEPT"("ID","NAME","PARENT_ID","SORT","LEADER_USER_ID","PHONE","EMAIL","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(111,'顶级部门',0,1,null,null,null,0,'113','2022-03-07 21:44:50','113','2022-03-07 21:44:50',0,122); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DEPT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1,1,'男','1','system_user_sex',0,'default','A','性别男','admin','2021-01-05 17:03:48','1','2022-03-29 00:14:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,2,'女','2','system_user_sex',1,'success','','性别女','admin','2021-01-05 17:03:48','1','2022-02-16 01:30:51',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(8,1,'正常','1','infra_job_status',0,'success','','正常状态','admin','2021-01-05 17:03:48','1','2022-02-16 19:33:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(9,2,'暂停','2','infra_job_status',0,'danger','','停用状态','admin','2021-01-05 17:03:48','1','2022-02-16 19:33:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(12,1,'系统内置','1','infra_config_type',0,'danger','','参数类型 - 系统内置','admin','2021-01-05 17:03:48','1','2022-02-16 19:06:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(13,2,'自定义','2','infra_config_type',0,'primary','','参数类型 - 自定义','admin','2021-01-05 17:03:48','1','2022-02-16 19:06:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(14,1,'通知','1','system_notice_type',0,'success','','通知','admin','2021-01-05 17:03:48','1','2022-02-16 13:05:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(15,2,'公告','2','system_notice_type',0,'info','','公告','admin','2021-01-05 17:03:48','1','2022-02-16 13:06:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(16,0,'其它','0','system_operate_type',0,'default','','其它操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:32:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(17,1,'查询','1','system_operate_type',0,'info','','查询操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:16',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(18,2,'新增','2','system_operate_type',0,'primary','','新增操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:13',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(19,3,'修改','3','system_operate_type',0,'warning','','修改操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(20,4,'删除','4','system_operate_type',0,'danger','','删除操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:27',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(22,5,'导出','5','system_operate_type',0,'default','','导出操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(23,6,'导入','6','system_operate_type',0,'default','','导入操作','admin','2021-01-05 17:03:48','1','2022-02-16 09:33:35',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(27,1,'开启','0','common_status',0,'primary','','开启状态','admin','2021-01-05 17:03:48','1','2022-02-16 08:00:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(28,2,'关闭','1','common_status',0,'info','','关闭状态','admin','2021-01-05 17:03:48','1','2022-02-16 08:00:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(29,1,'目录','1','system_menu_type',0,'','','目录','admin','2021-01-05 17:03:48','','2022-02-01 16:43:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(30,2,'菜单','2','system_menu_type',0,'','','菜单','admin','2021-01-05 17:03:48','','2022-02-01 16:43:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(31,3,'按钮','3','system_menu_type',0,'','','按钮','admin','2021-01-05 17:03:48','','2022-02-01 16:43:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(32,1,'内置','1','system_role_type',0,'danger','','内置角色','admin','2021-01-05 17:03:48','1','2022-02-16 13:02:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(33,2,'自定义','2','system_role_type',0,'primary','','自定义角色','admin','2021-01-05 17:03:48','1','2022-02-16 13:02:12',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(34,1,'全部数据权限','1','system_data_scope',0,'','','全部数据权限','admin','2021-01-05 17:03:48','','2022-02-01 16:47:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(35,2,'指定部门数据权限','2','system_data_scope',0,'','','指定部门数据权限','admin','2021-01-05 17:03:48','','2022-02-01 16:47:18',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(36,3,'本部门数据权限','3','system_data_scope',0,'','','本部门数据权限','admin','2021-01-05 17:03:48','','2022-02-01 16:47:16',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(37,4,'本部门及以下数据权限','4','system_data_scope',0,'','','本部门及以下数据权限','admin','2021-01-05 17:03:48','','2022-02-01 16:47:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(38,5,'仅本人数据权限','5','system_data_scope',0,'','','仅本人数据权限','admin','2021-01-05 17:03:48','','2022-02-01 16:47:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(39,0,'成功','0','system_login_result',0,'success','','登陆结果 - 成功','','2021-01-18 06:17:36','1','2022-02-16 13:23:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(40,10,'账号或密码不正确','10','system_login_result',0,'primary','','登陆结果 - 账号或密码不正确','','2021-01-18 06:17:54','1','2022-02-16 13:24:27',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(41,20,'用户被禁用','20','system_login_result',0,'warning','','登陆结果 - 用户被禁用','','2021-01-18 06:17:54','1','2022-02-16 13:23:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(42,30,'验证码不存在','30','system_login_result',0,'info','','登陆结果 - 验证码不存在','','2021-01-18 06:17:54','1','2022-02-16 13:24:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(43,31,'验证码不正确','31','system_login_result',0,'info','','登陆结果 - 验证码不正确','','2021-01-18 06:17:54','1','2022-02-16 13:24:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(44,100,'未知异常','100','system_login_result',0,'danger','','登陆结果 - 未知异常','','2021-01-18 06:17:54','1','2022-02-16 13:24:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(45,1,'是','true','infra_boolean_string',0,'danger','','Boolean 是否类型 - 是','','2021-01-19 03:20:55','1','2022-03-15 23:01:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(46,1,'否','false','infra_boolean_string',0,'info','','Boolean 是否类型 - 否','','2021-01-19 03:20:55','1','2022-03-15 23:09:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(47,1,'永不超时','1','infra_redis_timeout_type',0,'primary','','Redis 未设置超时的情况','','2021-01-26 00:53:17','1','2022-02-16 19:03:35',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(48,1,'动态超时','2','infra_redis_timeout_type',0,'info','','程序里动态传入超时时间,无法固定','','2021-01-26 00:55:00','1','2022-02-16 19:03:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(49,3,'固定超时','3','infra_redis_timeout_type',0,'success','','Redis 设置了过期时间','','2021-01-26 00:55:26','1','2022-02-16 19:03:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(50,1,'单表(增删改查)','1','infra_codegen_template_type',0,'','',null,'','2021-02-05 07:09:06','','2022-03-10 16:33:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(51,2,'树表(增删改查)','2','infra_codegen_template_type',0,'','',null,'','2021-02-05 07:14:46','','2022-03-10 16:33:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(53,0,'初始化中','0','infra_job_status',0,'primary','',null,'','2021-02-07 07:46:49','1','2022-02-16 19:33:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(57,0,'运行中','0','infra_job_log_status',0,'primary','','RUNNING','','2021-02-08 10:04:24','1','2022-02-16 19:07:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(58,1,'成功','1','infra_job_log_status',0,'success','',null,'','2021-02-08 10:06:57','1','2022-02-16 19:07:52',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(59,2,'失败','2','infra_job_log_status',0,'warning','','失败','','2021-02-08 10:07:38','1','2022-02-16 19:07:56',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(60,1,'会员','1','user_type',0,'primary','',null,'','2021-02-26 00:16:27','1','2022-02-16 10:22:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(61,2,'管理员','2','user_type',0,'success','',null,'','2021-02-26 00:16:34','1','2022-02-16 10:22:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(62,0,'未处理','0','infra_api_error_log_process_status',0,'primary','',null,'','2021-02-26 07:07:19','1','2022-02-16 20:14:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(63,1,'已处理','1','infra_api_error_log_process_status',0,'success','',null,'','2021-02-26 07:07:26','1','2022-02-16 20:14:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(64,2,'已忽略','2','infra_api_error_log_process_status',0,'danger','',null,'','2021-02-26 07:07:34','1','2022-02-16 20:14:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(66,2,'阿里云','ALIYUN','system_sms_channel_code',0,'primary','',null,'1','2021-04-05 01:05:26','1','2022-02-16 10:09:52',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(67,1,'验证码','1','system_sms_template_type',0,'warning','',null,'1','2021-04-05 21:50:57','1','2022-02-16 12:48:30',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(68,2,'通知','2','system_sms_template_type',0,'primary','',null,'1','2021-04-05 21:51:08','1','2022-02-16 12:48:27',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(69,0,'营销','3','system_sms_template_type',0,'danger','',null,'1','2021-04-05 21:51:15','1','2022-02-16 12:48:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(70,0,'初始化','0','system_sms_send_status',0,'primary','',null,'1','2021-04-11 20:18:33','1','2022-02-16 10:26:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(71,1,'发送成功','10','system_sms_send_status',0,'success','',null,'1','2021-04-11 20:18:43','1','2022-02-16 10:25:56',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(72,2,'发送失败','20','system_sms_send_status',0,'danger','',null,'1','2021-04-11 20:18:49','1','2022-02-16 10:26:03',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(73,3,'不发送','30','system_sms_send_status',0,'info','',null,'1','2021-04-11 20:19:44','1','2022-02-16 10:26:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(74,0,'等待结果','0','system_sms_receive_status',0,'primary','',null,'1','2021-04-11 20:27:43','1','2022-02-16 10:28:24',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(75,1,'接收成功','10','system_sms_receive_status',0,'success','',null,'1','2021-04-11 20:29:25','1','2022-02-16 10:28:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(76,2,'接收失败','20','system_sms_receive_status',0,'danger','',null,'1','2021-04-11 20:29:31','1','2022-02-16 10:28:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(77,0,'调试(钉钉)','DEBUG_DING_TALK','system_sms_channel_code',0,'info','',null,'1','2021-04-13 00:20:37','1','2022-02-16 10:10:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(78,1,'自动生成','1','system_error_code_type',0,'warning','',null,'1','2021-04-21 00:06:48','1','2022-02-16 13:57:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(79,2,'手动编辑','2','system_error_code_type',0,'primary','',null,'1','2021-04-21 00:07:14','1','2022-02-16 13:57:24',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(80,100,'账号登录','100','system_login_type',0,'primary','','账号登录','1','2021-10-06 00:52:02','1','2022-02-16 13:11:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(81,101,'社交登录','101','system_login_type',0,'info','','社交登录','1','2021-10-06 00:52:17','1','2022-02-16 13:11:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(83,200,'主动登出','200','system_login_type',0,'primary','','主动登出','1','2021-10-06 00:52:58','1','2022-02-16 13:11:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(85,202,'强制登出','202','system_login_type',0,'danger','','强制退出','1','2021-10-06 00:53:41','1','2022-02-16 13:11:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(86,0,'病假','1','bpm_oa_leave_type',0,'primary','',null,'1','2021-09-21 22:35:28','1','2022-02-16 10:00:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(87,1,'事假','2','bpm_oa_leave_type',0,'info','',null,'1','2021-09-21 22:36:11','1','2022-02-16 10:00:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(88,2,'婚假','3','bpm_oa_leave_type',0,'warning','',null,'1','2021-09-21 22:36:38','1','2022-02-16 10:00:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(98,1,'v2','v2','pay_channel_wechat_version',0,'','','v2版本','1','2021-11-08 17:00:58','1','2021-11-08 17:00:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(99,2,'v3','v3','pay_channel_wechat_version',0,'','','v3版本','1','2021-11-08 17:01:07','1','2021-11-08 17:01:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(108,1,'RSA2','RSA2','pay_channel_alipay_sign_type',0,'','','RSA2','1','2021-11-18 15:39:29','1','2021-11-18 15:39:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(109,1,'公钥模式','1','pay_channel_alipay_mode',0,'','','公钥模式:privateKey + alipayPublicKey','1','2021-11-18 15:45:23','1','2021-11-18 15:45:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(110,2,'证书模式','2','pay_channel_alipay_mode',0,'','','证书模式:appCertContent + alipayPublicCertContent + rootCertContent','1','2021-11-18 15:45:40','1','2021-11-18 15:45:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(111,1,'线上','https://openapi.alipay.com/gateway.do','pay_channel_alipay_server_type',0,'','','网关地址 - 线上','1','2021-11-18 16:59:32','1','2021-11-21 17:37:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(112,2,'沙箱','https://openapi.alipaydev.com/gateway.do','pay_channel_alipay_server_type',0,'','','网关地址 - 沙箱','1','2021-11-18 16:59:48','1','2021-11-21 17:37:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(113,1,'微信 JSAPI 支付','wx_pub','pay_channel_code_type',0,'','','微信 JSAPI(公众号) 支付','1','2021-12-03 10:40:24','1','2021-12-04 16:41:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(114,2,'微信小程序支付','wx_lite','pay_channel_code_type',0,'','','微信小程序支付','1','2021-12-03 10:41:06','1','2021-12-03 10:41:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(115,3,'微信 App 支付','wx_app','pay_channel_code_type',0,'','','微信 App 支付','1','2021-12-03 10:41:20','1','2021-12-03 10:41:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(116,4,'支付宝 PC 网站支付','alipay_pc','pay_channel_code_type',0,'','','支付宝 PC 网站支付','1','2021-12-03 10:42:09','1','2021-12-03 10:42:09',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(117,5,'支付宝 Wap 网站支付','alipay_wap','pay_channel_code_type',0,'','','支付宝 Wap 网站支付','1','2021-12-03 10:42:26','1','2021-12-03 10:42:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(118,6,'支付宝App 支付','alipay_app','pay_channel_code_type',0,'','','支付宝App 支付','1','2021-12-03 10:42:55','1','2021-12-03 10:42:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(119,7,'支付宝扫码支付','alipay_qr','pay_channel_code_type',0,'','','支付宝扫码支付','1','2021-12-03 10:43:10','1','2021-12-03 10:43:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(120,1,'通知成功','10','pay_order_notify_status',0,'success','','通知成功','1','2021-12-03 11:02:41','1','2022-02-16 13:59:13',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(121,2,'通知失败','20','pay_order_notify_status',0,'danger','','通知失败','1','2021-12-03 11:02:59','1','2022-02-16 13:59:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(122,3,'未通知','0','pay_order_notify_status',0,'info','','未通知','1','2021-12-03 11:03:10','1','2022-02-16 13:59:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(123,1,'支付成功','10','pay_order_status',0,'success','','支付成功','1','2021-12-03 11:18:29','1','2022-02-16 15:24:25',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(124,2,'支付关闭','20','pay_order_status',0,'danger','','支付关闭','1','2021-12-03 11:18:42','1','2022-02-16 15:24:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(125,3,'未支付','0','pay_order_status',0,'info','','未支付','1','2021-12-03 11:18:18','1','2022-02-16 15:24:35',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(126,1,'未退款','0','pay_order_refund_status',0,'','','未退款','1','2021-12-03 11:30:35','1','2021-12-03 11:34:05',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(127,2,'部分退款','10','pay_order_refund_status',0,'','','部分退款','1','2021-12-03 11:30:44','1','2021-12-03 11:34:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(128,3,'全部退款','20','pay_order_refund_status',0,'','','全部退款','1','2021-12-03 11:30:52','1','2021-12-03 11:34:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1117,1,'退款订单生成','0','pay_refund_order_status',0,'primary','','退款订单生成','1','2021-12-10 16:44:44','1','2022-02-16 14:05:24',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1118,2,'退款成功','1','pay_refund_order_status',0,'success','','退款成功','1','2021-12-10 16:44:59','1','2022-02-16 14:05:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1119,3,'退款失败','2','pay_refund_order_status',0,'danger','','退款失败','1','2021-12-10 16:45:10','1','2022-02-16 14:05:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1124,8,'退款关闭','99','pay_refund_order_status',0,'info','','退款关闭','1','2021-12-10 16:46:26','1','2022-02-16 14:05:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1125,0,'默认','1','bpm_model_category',0,'primary','','流程分类 - 默认','1','2022-01-02 08:41:11','1','2022-02-16 20:01:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1126,0,'OA','2','bpm_model_category',0,'success','','流程分类 - OA','1','2022-01-02 08:41:22','1','2022-02-16 20:01:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1127,0,'进行中','1','bpm_process_instance_status',0,'primary','','流程实例的状态 - 进行中','1','2022-01-07 23:47:22','1','2022-02-16 20:07:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1128,2,'已完成','2','bpm_process_instance_status',0,'success','','流程实例的状态 - 已完成','1','2022-01-07 23:47:49','1','2022-02-16 20:07:54',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1129,1,'处理中','1','bpm_process_instance_result',0,'primary','','流程实例的结果 - 处理中','1','2022-01-07 23:48:32','1','2022-02-16 09:53:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1130,2,'通过','2','bpm_process_instance_result',0,'success','','流程实例的结果 - 通过','1','2022-01-07 23:48:45','1','2022-02-16 09:53:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1131,3,'不通过','3','bpm_process_instance_result',0,'danger','','流程实例的结果 - 不通过','1','2022-01-07 23:48:55','1','2022-02-16 09:53:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1132,4,'已取消','4','bpm_process_instance_result',0,'info','','流程实例的结果 - 撤销','1','2022-01-07 23:49:06','1','2022-02-16 09:53:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1133,10,'流程表单','10','bpm_model_form_type',0,'','','流程的表单类型 - 流程表单','103','2022-01-11 23:51:30','103','2022-01-11 23:51:30',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1134,20,'业务表单','20','bpm_model_form_type',0,'','','流程的表单类型 - 业务表单','103','2022-01-11 23:51:47','103','2022-01-11 23:51:47',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1135,10,'角色','10','bpm_task_assign_rule_type',0,'info','','任务分配规则的类型 - 角色','103','2022-01-12 23:21:22','1','2022-02-16 20:06:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1136,20,'部门的成员','20','bpm_task_assign_rule_type',0,'primary','','任务分配规则的类型 - 部门的成员','103','2022-01-12 23:21:47','1','2022-02-16 20:05:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1137,21,'部门的负责人','21','bpm_task_assign_rule_type',0,'primary','','任务分配规则的类型 - 部门的负责人','103','2022-01-12 23:33:36','1','2022-02-16 20:05:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1138,30,'用户','30','bpm_task_assign_rule_type',0,'info','','任务分配规则的类型 - 用户','103','2022-01-12 23:34:02','1','2022-02-16 20:05:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1139,40,'用户组','40','bpm_task_assign_rule_type',0,'warning','','任务分配规则的类型 - 用户组','103','2022-01-12 23:34:21','1','2022-02-16 20:05:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1140,50,'自定义脚本','50','bpm_task_assign_rule_type',0,'danger','','任务分配规则的类型 - 自定义脚本','103','2022-01-12 23:34:43','1','2022-02-16 20:06:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1141,22,'岗位','22','bpm_task_assign_rule_type',0,'success','','任务分配规则的类型 - 岗位','103','2022-01-14 18:41:55','1','2022-02-16 20:05:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1142,10,'流程发起人','10','bpm_task_assign_script',0,'','','任务分配自定义脚本 - 流程发起人','103','2022-01-15 00:10:57','103','2022-01-15 21:24:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1143,20,'流程发起人的一级领导','20','bpm_task_assign_script',0,'','','任务分配自定义脚本 - 流程发起人的一级领导','103','2022-01-15 21:24:31','103','2022-01-15 21:24:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1144,21,'流程发起人的二级领导','21','bpm_task_assign_script',0,'','','任务分配自定义脚本 - 流程发起人的二级领导','103','2022-01-15 21:24:46','103','2022-01-15 21:24:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1145,1,'管理后台','1','infra_codegen_scene',0,'','','代码生成的场景枚举 - 管理后台','1','2022-02-02 13:15:06','1','2022-03-10 16:32:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1146,2,'用户 APP','2','infra_codegen_scene',0,'','','代码生成的场景枚举 - 用户 APP','1','2022-02-02 13:15:19','1','2022-03-10 16:33:03',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1147,0,'未退款','0','pay_refund_order_type',0,'info','','退款类型 - 未退款','1','2022-02-16 14:09:01','1','2022-02-16 14:09:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1148,10,'部分退款','10','pay_refund_order_type',0,'success','','退款类型 - 部分退款','1','2022-02-16 14:09:25','1','2022-02-16 14:11:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1149,20,'全部退款','20','pay_refund_order_type',0,'warning','','退款类型 - 全部退款','1','2022-02-16 14:11:33','1','2022-02-16 14:11:33',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1150,1,'数据库','1','infra_file_storage',0,'default','',null,'1','2022-03-15 00:25:28','1','2022-03-15 00:25:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1151,10,'本地磁盘','10','infra_file_storage',0,'default','',null,'1','2022-03-15 00:25:41','1','2022-03-15 00:25:56',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1152,11,'FTP 服务器','11','infra_file_storage',0,'default','',null,'1','2022-03-15 00:26:06','1','2022-03-15 00:26:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1153,12,'SFTP 服务器','12','infra_file_storage',0,'default','',null,'1','2022-03-15 00:26:22','1','2022-03-15 00:26:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1154,20,'S3 对象存储','20','infra_file_storage',0,'default','',null,'1','2022-03-15 00:26:31','1','2022-03-15 00:26:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1155,103,'短信登录','103','system_login_type',0,'default','',null,'1','2022-05-09 23:57:58','1','2022-05-09 23:58:09',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1156,1,'password','password','system_oauth2_grant_type',0,'default','','密码模式','1','2022-05-12 00:22:05','1','2022-05-11 16:26:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1157,2,'authorization_code','authorization_code','system_oauth2_grant_type',0,'primary','','授权码模式','1','2022-05-12 00:22:59','1','2022-05-11 16:26:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1158,3,'implicit','implicit','system_oauth2_grant_type',0,'success','','简化模式','1','2022-05-12 00:23:40','1','2022-05-11 16:26:05',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1159,4,'client_credentials','client_credentials','system_oauth2_grant_type',0,'default','','客户端模式','1','2022-05-12 00:23:51','1','2022-05-11 16:26:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1160,5,'refresh_token','refresh_token','system_oauth2_grant_type',0,'info','','刷新模式','1','2022-05-12 00:24:02','1','2022-05-11 16:26:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1162,1,'销售中','1','product_spu_status',0,'success','','商品 SPU 状态 - 销售中','1','2022-10-24 21:19:47','1','2022-10-24 21:20:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1163,0,'仓库中','0','product_spu_status',0,'info','','商品 SPU 状态 - 仓库中','1','2022-10-24 21:20:54','1','2022-10-24 21:21:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1164,0,'回收站','-1','product_spu_status',0,'default','','商品 SPU 状态 - 回收站','1','2022-10-24 21:21:11','1','2022-10-24 21:21:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1165,1,'满减','1','promotion_discount_type',0,'success','','优惠类型 - 满减','1','2022-11-01 12:46:41','1','2022-11-01 12:50:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1166,2,'折扣','2','promotion_discount_type',0,'primary','','优惠类型 - 折扣','1','2022-11-01 12:46:51','1','2022-11-01 12:50:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1167,1,'固定日期','1','promotion_coupon_template_validity_type',0,'default','','优惠劵模板的有限期类型 - 固定日期','1','2022-11-02 00:07:34','1','2022-11-04 00:07:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1168,2,'领取之后','2','promotion_coupon_template_validity_type',0,'default','','优惠劵模板的有限期类型 - 领取之后','1','2022-11-02 00:07:54','1','2022-11-04 00:07:52',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1169,1,'全部商品参与','1','promotion_product_scope',0,'default','','营销的商品范围 - 全部商品参与','1','2022-11-02 00:28:22','1','2022-11-02 00:28:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1170,2,'指定商品参与','2','promotion_product_scope',0,'default','','营销的商品范围 - 指定商品参与','1','2022-11-02 00:28:34','1','2022-11-02 00:28:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1171,1,'已领取','1','promotion_coupon_status',0,'primary','','优惠劵的状态 - 已领取','1','2022-11-04 00:15:08','1','2022-11-04 19:16:04',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1172,2,'已使用','2','promotion_coupon_status',0,'success','','优惠劵的状态 - 已使用','1','2022-11-04 00:15:21','1','2022-11-04 19:16:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1173,3,'已过期','3','promotion_coupon_status',0,'info','','优惠劵的状态 - 已过期','1','2022-11-04 00:15:43','1','2022-11-04 19:16:12',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1174,1,'直接领取','1','promotion_coupon_take_type',0,'primary','','优惠劵的领取方式 - 直接领取','1','2022-11-04 19:13:00','1','2022-11-04 19:13:25',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1175,2,'指定发放','2','promotion_coupon_take_type',0,'success','','优惠劵的领取方式 - 指定发放','1','2022-11-04 19:13:13','1','2022-11-04 19:14:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1176,10,'未开始','10','promotion_activity_status',0,'primary','','促销活动的状态枚举 - 未开始','1','2022-11-04 22:54:49','1','2022-11-04 22:55:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1177,20,'进行中','20','promotion_activity_status',0,'success','','促销活动的状态枚举 - 进行中','1','2022-11-04 22:55:06','1','2022-11-04 22:55:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1178,30,'已结束','30','promotion_activity_status',0,'info','','促销活动的状态枚举 - 已结束','1','2022-11-04 22:55:41','1','2022-11-04 22:55:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1179,40,'已关闭','40','promotion_activity_status',0,'warning','','促销活动的状态枚举 - 已关闭','1','2022-11-04 22:56:10','1','2022-11-04 22:56:18',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1180,10,'满 N 元','10','promotion_condition_type',0,'primary','','营销的条件类型 - 满 N 元','1','2022-11-04 22:59:45','1','2022-11-04 22:59:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1181,20,'满 N 件','20','promotion_condition_type',0,'success','','营销的条件类型 - 满 N 件','1','2022-11-04 23:00:02','1','2022-11-04 23:00:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1182,10,'申请售后','10','trade_after_sale_status',0,'primary','','交易售后状态 - 申请售后','1','2022-11-19 20:53:33','1','2022-11-19 20:54:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1183,20,'商品待退货','20','trade_after_sale_status',0,'primary','','交易售后状态 - 商品待退货','1','2022-11-19 20:54:36','1','2022-11-19 20:58:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1184,30,'商家待收货','30','trade_after_sale_status',0,'primary','','交易售后状态 - 商家待收货','1','2022-11-19 20:56:56','1','2022-11-19 20:59:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1185,40,'等待退款','40','trade_after_sale_status',0,'primary','','交易售后状态 - 等待退款','1','2022-11-19 20:59:54','1','2022-11-19 21:00:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1186,50,'退款成功','50','trade_after_sale_status',0,'default','','交易售后状态 - 退款成功','1','2022-11-19 21:00:33','1','2022-11-19 21:00:33',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1187,61,'买家取消','61','trade_after_sale_status',0,'info','','交易售后状态 - 买家取消','1','2022-11-19 21:01:29','1','2022-11-19 21:01:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1188,62,'商家拒绝','62','trade_after_sale_status',0,'info','','交易售后状态 - 商家拒绝','1','2022-11-19 21:02:17','1','2022-11-19 21:02:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1189,63,'商家拒收货','63','trade_after_sale_status',0,'info','','交易售后状态 - 商家拒收货','1','2022-11-19 21:02:37','1','2022-11-19 21:03:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1190,10,'售中退款','10','trade_after_sale_type',0,'success','','交易售后的类型 - 售中退款','1','2022-11-19 21:05:05','1','2022-11-19 21:38:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1191,20,'售后退款','20','trade_after_sale_type',0,'primary','','交易售后的类型 - 售后退款','1','2022-11-19 21:05:32','1','2022-11-19 21:38:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1192,10,'仅退款','10','trade_after_sale_way',0,'primary','','交易售后的方式 - 仅退款','1','2022-11-19 21:39:19','1','2022-11-19 21:39:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1193,20,'退货退款','20','trade_after_sale_way',0,'success','','交易售后的方式 - 退货退款','1','2022-11-19 21:39:38','1','2022-11-19 21:39:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1194,10,'微信小程序','10','terminal',0,'default','','终端 - 微信小程序','1','2022-12-10 10:51:11','1','2022-12-10 10:51:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1195,20,'H5 网页','20','terminal',0,'default','','终端 - H5 网页','1','2022-12-10 10:51:30','1','2022-12-10 10:51:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1196,11,'微信公众号','11','terminal',0,'default','','终端 - 微信公众号','1','2022-12-10 10:54:16','1','2022-12-10 10:52:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1197,31,'苹果 App','31','terminal',0,'default','','终端 - 苹果 App','1','2022-12-10 10:54:42','1','2022-12-10 10:52:18',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1198,32,'安卓 App','32','terminal',0,'default','','终端 - 安卓 App','1','2022-12-10 10:55:02','1','2022-12-10 10:59:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1199,0,'普通订单','0','trade_order_type',0,'default','','交易订单的类型 - 普通订单','1','2022-12-10 16:34:14','1','2022-12-10 16:34:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1200,1,'秒杀订单','1','trade_order_type',0,'default','','交易订单的类型 - 秒杀订单','1','2022-12-10 16:34:26','1','2022-12-10 16:34:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1201,2,'拼团订单','2','trade_order_type',0,'default','','交易订单的类型 - 拼团订单','1','2022-12-10 16:34:36','1','2022-12-10 16:34:36',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1202,3,'砍价订单','3','trade_order_type',0,'default','','交易订单的类型 - 砍价订单','1','2022-12-10 16:34:48','1','2022-12-10 16:34:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1203,0,'待支付','0','trade_order_status',0,'default','','交易订单状态 - 待支付','1','2022-12-10 16:49:29','1','2022-12-10 16:49:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1204,10,'待发货','10','trade_order_status',0,'primary','','交易订单状态 - 待发货','1','2022-12-10 16:49:53','1','2022-12-10 16:51:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1205,20,'已发货','20','trade_order_status',0,'primary','','交易订单状态 - 已发货','1','2022-12-10 16:50:13','1','2022-12-10 16:51:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1206,30,'已完成','30','trade_order_status',0,'success','','交易订单状态 - 已完成','1','2022-12-10 16:50:30','1','2022-12-10 16:51:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1207,40,'已取消','40','trade_order_status',0,'danger','','交易订单状态 - 已取消','1','2022-12-10 16:50:50','1','2022-12-10 16:51:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1208,0,'未售后','0','trade_order_item_after_sale_status',0,'info','','交易订单项的售后状态 - 未售后','1','2022-12-10 20:58:42','1','2022-12-10 20:59:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1209,1,'售后中','1','trade_order_item_after_sale_status',0,'primary','','交易订单项的售后状态 - 售后中','1','2022-12-10 20:59:21','1','2022-12-10 20:59:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1210,2,'已退款','2','trade_order_item_after_sale_status',0,'success','','交易订单项的售后状态 - 已退款','1','2022-12-10 20:59:46','1','2022-12-10 20:59:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1211,1,'完全匹配','1','mp_auto_reply_request_match',0,'primary','','公众号自动回复的请求关键字匹配模式 - 完全匹配','1','2023-01-16 23:30:39','1','2023-01-16 23:31:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1212,2,'半匹配','2','mp_auto_reply_request_match',0,'success','','公众号自动回复的请求关键字匹配模式 - 半匹配','1','2023-01-16 23:30:55','1','2023-01-16 23:31:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1213,1,'文本','text','mp_message_type',0,'default','','公众号的消息类型 - 文本','1','2023-01-17 22:17:32','1','2023-01-17 22:17:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1214,2,'图片','image','mp_message_type',0,'default','','公众号的消息类型 - 图片','1','2023-01-17 22:17:32','1','2023-01-17 14:19:47',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1215,3,'语音','voice','mp_message_type',0,'default','','公众号的消息类型 - 语音','1','2023-01-17 22:17:32','1','2023-01-17 14:20:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1216,4,'视频','video','mp_message_type',0,'default','','公众号的消息类型 - 视频','1','2023-01-17 22:17:32','1','2023-01-17 14:21:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1217,5,'小视频','shortvideo','mp_message_type',0,'default','','公众号的消息类型 - 小视频','1','2023-01-17 22:17:32','1','2023-01-17 14:19:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1218,6,'图文','news','mp_message_type',0,'default','','公众号的消息类型 - 图文','1','2023-01-17 22:17:32','1','2023-01-17 14:22:54',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1219,7,'音乐','music','mp_message_type',0,'default','','公众号的消息类型 - 音乐','1','2023-01-17 22:17:32','1','2023-01-17 14:22:54',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1220,8,'地理位置','location','mp_message_type',0,'default','','公众号的消息类型 - 地理位置','1','2023-01-17 22:17:32','1','2023-01-17 14:23:51',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1221,9,'链接','link','mp_message_type',0,'default','','公众号的消息类型 - 链接','1','2023-01-17 22:17:32','1','2023-01-17 14:24:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1222,10,'事件','event','mp_message_type',0,'default','','公众号的消息类型 - 事件','1','2023-01-17 22:17:32','1','2023-01-17 14:24:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1223,0,'初始化','0','system_mail_send_status',0,'primary','','邮件发送状态 - 初始化 -','1','2023-01-26 09:53:49','1','2023-01-26 16:36:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1224,10,'发送成功','10','system_mail_send_status',0,'success','','邮件发送状态 - 发送成功','1','2023-01-26 09:54:28','1','2023-01-26 16:36:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1225,20,'发送失败','20','system_mail_send_status',0,'danger','','邮件发送状态 - 发送失败','1','2023-01-26 09:54:50','1','2023-01-26 16:36:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1226,30,'不发送','30','system_mail_send_status',0,'info','','邮件发送状态 - 不发送','1','2023-01-26 09:55:06','1','2023-01-26 16:36:36',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1227,1,'通知公告','1','system_notify_template_type',0,'primary','','站内信模版的类型 - 通知公告','1','2023-01-28 10:35:59','1','2023-01-28 10:35:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1228,2,'系统消息','2','system_notify_template_type',0,'success','','站内信模版的类型 - 系统消息','1','2023-01-28 10:36:20','1','2023-01-28 10:36:25',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1229,0,'模拟支付','mock','pay_channel_code_type',0,'default','',null,'1','2023-02-12 21:50:22','1','2023-02-12 21:50:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1230,8,'支付宝条码支付','alipay_bar','pay_channel_code_type',0,'default','',null,'1','2023-02-18 23:32:24','1','2023-02-18 23:32:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1231,10,'Vue2 Element UI 标准模版','10','infra_codegen_front_type',0,'','','','1','2023-04-13 00:03:55','1','2023-04-13 00:03:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1232,20,'Vue3 Element Plus 标准模版','20','infra_codegen_front_type',0,'','','','1','2023-04-13 00:04:08','1','2023-04-13 00:04:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1233,21,'Vue3 Element Plus Schema 模版','21','infra_codegen_front_type',0,'','','','1','2023-04-13 00:04:26','1','2023-04-13 00:04:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"("ID","SORT","LABEL","VALUE","DICT_TYPE","STATUS","COLOR_TYPE","CSS_CLASS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1234,30,'Vue3 vben 模版','30','infra_codegen_front_type',0,'','','','1','2023-04-13 00:04:26','1','2023-04-13 00:04:26',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(1,'用户性别','system_user_sex',0,null,'admin','2021-01-05 17:03:48','1','2022-05-16 20:29:32',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(6,'参数类型','infra_config_type',0,null,'admin','2021-01-05 17:03:48','','2022-02-01 16:36:54',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(7,'通知类型','system_notice_type',0,null,'admin','2021-01-05 17:03:48','','2022-02-01 16:35:26',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(9,'操作类型','system_operate_type',0,null,'admin','2021-01-05 17:03:48','1','2022-02-16 09:32:21',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(10,'系统状态','common_status',0,null,'admin','2021-01-05 17:03:48','','2022-02-01 16:21:28',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(11,'Boolean 是否类型','infra_boolean_string',0,'boolean 转是否','','2021-01-19 03:20:08','','2022-02-01 16:37:10',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(104,'登陆结果','system_login_result',0,'登陆结果','','2021-01-18 06:17:11','','2022-02-01 16:36:00',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(105,'Redis 超时类型','infra_redis_timeout_type',0,'RedisKeyDefine.TimeoutTypeEnum','','2021-01-26 00:52:50','','2022-02-01 16:50:29',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(106,'代码生成模板类型','infra_codegen_template_type',0,null,'','2021-02-05 07:08:06','1','2022-05-16 20:26:50',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(107,'定时任务状态','infra_job_status',0,null,'','2021-02-07 07:44:16','','2022-02-01 16:51:11',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(108,'定时任务日志状态','infra_job_log_status',0,null,'','2021-02-08 10:03:51','','2022-02-01 16:50:43',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(109,'用户类型','user_type',0,null,'','2021-02-26 00:15:51','','2021-02-26 00:15:51',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(110,'API 异常数据的处理状态','infra_api_error_log_process_status',0,null,'','2021-02-26 07:07:01','','2022-02-01 16:50:53',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(111,'短信渠道编码','system_sms_channel_code',0,null,'1','2021-04-05 01:04:50','1','2022-02-16 02:09:08',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(112,'短信模板的类型','system_sms_template_type',0,null,'1','2021-04-05 21:50:43','1','2022-02-01 16:35:06',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(113,'短信发送状态','system_sms_send_status',0,null,'1','2021-04-11 20:18:03','1','2022-02-01 16:35:09',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(114,'短信接收状态','system_sms_receive_status',0,null,'1','2021-04-11 20:27:14','1','2022-02-01 16:35:14',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(115,'错误码的类型','system_error_code_type',0,null,'1','2021-04-21 00:06:30','1','2022-02-01 16:36:49',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(116,'登陆日志的类型','system_login_type',0,'登陆日志的类型','1','2021-10-06 00:50:46','1','2022-02-01 16:35:56',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(117,'OA 请假类型','bpm_oa_leave_type',0,null,'1','2021-09-21 22:34:33','1','2022-01-22 10:41:37',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(122,'支付渠道微信版本','pay_channel_wechat_version',0,'支付渠道微信版本','1','2021-11-08 17:00:26','1','2021-11-08 17:00:26',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(127,'支付渠道支付宝算法类型','pay_channel_alipay_sign_type',0,'支付渠道支付宝算法类型','1','2021-11-18 15:39:09','1','2021-11-18 15:39:09',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(128,'支付渠道支付宝公钥类型','pay_channel_alipay_mode',0,'支付渠道支付宝公钥类型','1','2021-11-18 15:44:28','1','2021-11-18 15:44:28',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(129,'支付宝网关地址','pay_channel_alipay_server_type',0,'支付宝网关地址','1','2021-11-18 16:58:55','1','2021-11-18 17:01:34',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(130,'支付渠道编码类型','pay_channel_code_type',0,'支付渠道的编码','1','2021-12-03 10:35:08','1','2021-12-03 10:35:08',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(131,'支付订单回调状态','pay_order_notify_status',0,'支付订单回调状态','1','2021-12-03 10:53:29','1','2021-12-03 10:53:29',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(132,'支付订单状态','pay_order_status',0,'支付订单状态','1','2021-12-03 11:17:50','1','2021-12-03 11:17:50',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(133,'支付订单退款状态','pay_order_refund_status',0,'支付订单退款状态','1','2021-12-03 11:27:31','1','2021-12-03 11:27:31',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(134,'退款订单状态','pay_refund_order_status',0,'退款订单状态','1','2021-12-10 16:42:50','1','2021-12-10 16:42:50',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(135,'退款订单类别','pay_refund_order_type',0,'退款订单类别','1','2021-12-10 17:14:53','1','2021-12-10 17:14:53',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(138,'流程分类','bpm_model_category',0,'流程分类','1','2022-01-02 08:40:45','1','2022-01-02 08:40:45',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(139,'流程实例的状态','bpm_process_instance_status',0,'流程实例的状态','1','2022-01-07 23:46:42','1','2022-01-07 23:46:42',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(140,'流程实例的结果','bpm_process_instance_result',0,'流程实例的结果','1','2022-01-07 23:48:10','1','2022-01-07 23:48:10',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(141,'流程的表单类型','bpm_model_form_type',0,'流程的表单类型','103','2022-01-11 23:50:45','103','2022-01-11 23:50:45',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(142,'任务分配规则的类型','bpm_task_assign_rule_type',0,'任务分配规则的类型','103','2022-01-12 23:21:04','103','2022-01-12 15:46:10',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(143,'任务分配自定义脚本','bpm_task_assign_script',0,'任务分配自定义脚本','103','2022-01-15 00:10:35','103','2022-01-15 00:10:35',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(144,'代码生成的场景枚举','infra_codegen_scene',0,'代码生成的场景枚举','1','2022-02-02 13:14:45','1','2022-03-10 16:33:46',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(145,'角色类型','system_role_type',0,'角色类型','1','2022-02-16 13:01:46','1','2022-02-16 13:01:46',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(146,'文件存储器','infra_file_storage',0,'文件存储器','1','2022-03-15 00:24:38','1','2022-03-15 00:24:38',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(147,'OAuth 2.0 授权类型','system_oauth2_grant_type',0,'OAuth 2.0 授权类型(模式)','1','2022-05-12 00:20:52','1','2022-05-11 16:25:49',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(149,'商品 SPU 状态','product_spu_status',0,'商品 SPU 状态','1','2022-10-24 21:19:04','1','2022-10-24 21:19:08',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(150,'优惠类型','promotion_discount_type',0,'优惠类型','1','2022-11-01 12:46:06','1','2022-11-01 12:46:06',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(151,'优惠劵模板的有限期类型','promotion_coupon_template_validity_type',0,'优惠劵模板的有限期类型','1','2022-11-02 00:06:20','1','2022-11-04 00:08:26',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(152,'营销的商品范围','promotion_product_scope',0,'营销的商品范围','1','2022-11-02 00:28:01','1','2022-11-02 00:28:01',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(153,'优惠劵的状态','promotion_coupon_status',0,'优惠劵的状态','1','2022-11-04 00:14:49','1','2022-11-04 00:14:49',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(154,'优惠劵的领取方式','promotion_coupon_take_type',0,'优惠劵的领取方式','1','2022-11-04 19:12:27','1','2022-11-04 19:12:27',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(155,'促销活动的状态','promotion_activity_status',0,'促销活动的状态','1','2022-11-04 22:54:23','1','2022-11-04 22:54:23',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(156,'营销的条件类型','promotion_condition_type',0,'营销的条件类型','1','2022-11-04 22:59:23','1','2022-11-04 22:59:23',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(157,'交易售后状态','trade_after_sale_status',0,'交易售后状态','1','2022-11-19 20:52:56','1','2022-11-19 20:52:56',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(158,'交易售后的类型','trade_after_sale_type',0,'交易售后的类型','1','2022-11-19 21:04:09','1','2022-11-19 21:04:09',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(159,'交易售后的方式','trade_after_sale_way',0,'交易售后的方式','1','2022-11-19 21:39:04','1','2022-11-19 21:39:04',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(160,'终端','terminal',0,'终端','1','2022-12-10 10:50:50','1','2022-12-10 10:53:11',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(161,'交易订单的类型','trade_order_type',0,'交易订单的类型','1','2022-12-10 16:33:54','1','2022-12-10 16:33:54',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(162,'交易订单的状态','trade_order_status',0,'交易订单的状态','1','2022-12-10 16:48:44','1','2022-12-10 16:48:44',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(163,'交易订单项的售后状态','trade_order_item_after_sale_status',0,'交易订单项的售后状态','1','2022-12-10 20:58:08','1','2022-12-10 20:58:08',0,null); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(164,'公众号自动回复的请求关键字匹配模式','mp_auto_reply_request_match',0,'公众号自动回复的请求关键字匹配模式','1','2023-01-16 23:29:56','1','2023-01-16 23:29:56',0,'1970-01-01 00:00:00'); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(165,'公众号的消息类型','mp_message_type',0,'公众号的消息类型','1','2023-01-17 22:17:09','1','2023-01-17 22:17:09',0,'1970-01-01 00:00:00'); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(166,'邮件发送状态','system_mail_send_status',0,'邮件发送状态','1','2023-01-26 09:53:13','1','2023-01-26 09:53:13',0,'1970-01-01 00:00:00'); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(167,'站内信模版的类型','system_notify_template_type',0,'站内信模版的类型','1','2023-01-28 10:35:10','1','2023-01-28 10:35:10',0,'1970-01-01 00:00:00'); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"("ID","NAME","TYPE","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","DELETED_TIME") VALUES(168,'代码生成的前端类型','infra_codegen_front_type',0,'','1','2023-04-12 23:57:52','1','2023-04-12 23:57:52',0,'1970-01-01 00:00:00'); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"("ID","MAIL","USERNAME","PASSWORD","HOST","PORT","SSL_ENABLE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1,'7684413@qq.com','7684413@qq.com','123457','127.0.0.1',8080,0,'1','2023-01-25 17:39:52','1','2023-04-12 23:04:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"("ID","MAIL","USERNAME","PASSWORD","HOST","PORT","SSL_ENABLE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,'ydym_test@163.com','ydym_test@163.com','WBZTEINMIFVRYSOE','smtp.163.com',465,1,'1','2023-01-26 01:26:03','1','2023-04-12 22:39:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"("ID","MAIL","USERNAME","PASSWORD","HOST","PORT","SSL_ENABLE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(3,'76854114@qq.com','3335','11234','yunai1.cn',466,0,'1','2023-01-27 15:06:38','1','2023-01-27 07:08:36',1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"("ID","MAIL","USERNAME","PASSWORD","HOST","PORT","SSL_ENABLE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(4,'7685413x@qq.com','2','3','4',5,1,'1','2023-04-12 23:05:06','1','2023-04-12 15:05:11',1); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"("ID","NAME","CODE","ACCOUNT_ID","NICKNAME","TITLE","CONTENT","PARAMS","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(13,'后台用户短信登录','admin-sms-login',1,'奥特曼','你猜我猜','

您的验证码是{code},名字是{name}

','["code","name"]',0,'3','1','2021-10-11 08:10:00','1','2023-01-26 23:22:05',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"("ID","NAME","CODE","ACCOUNT_ID","NICKNAME","TITLE","CONTENT","PARAMS","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(14,'测试模版','test_01',2,'芋艿','一个标题','

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

','["key01","key02"]',0,null,'1','2023-01-26 01:27:40','1','2023-01-27 10:32:16',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"("ID","NAME","CODE","ACCOUNT_ID","NICKNAME","TITLE","CONTENT","PARAMS","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(15,'3','2',2,'7','4','

45

','[]',1,'80','1','2023-01-27 15:50:35','1','2023-01-27 16:34:49',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MENU" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1,'系统管理','',1,10,0,'/system','system',null,null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,'基础设施','',1,20,0,'/infra','monitor',null,null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(5,'OA 示例','',1,40,1185,'oa','people',null,null,0,1,1,1,'admin','2021-09-20 16:26:19','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(100,'用户管理','system:user:list',2,1,1,'user','user','system/user/index','SystemUser',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:31:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(101,'角色管理','',2,2,1,'role','peoples','system/role/index','SystemRole',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:33:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(102,'菜单管理','',2,3,1,'menu','tree-table','system/menu/index','SystemMenu',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:34:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(103,'部门管理','',2,4,1,'dept','tree','system/dept/index','SystemDept',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:35:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(104,'岗位管理','',2,5,1,'post','post','system/post/index','SystemPost',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:36:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(105,'字典管理','',2,6,1,'dict','dict','system/dict/index','SystemDictType',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:36:45',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(106,'配置管理','',2,6,2,'config','edit','infra/config/index','InfraConfig',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 10:31:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(107,'通知公告','',2,8,1,'notice','message','system/notice/index','SystemNotice',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:45:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(108,'审计日志','',1,9,1,'log','log','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(109,'令牌管理','',2,2,1261,'token','online','system/oauth2/token/index','SystemTokenClient',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:47:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(110,'定时任务','',2,12,2,'job','job','infra/job/index','InfraJob',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 10:36:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(111,'MySQL 监控','',2,9,2,'druid','druid','infra/druid/index','InfraDruid',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 09:09:30',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(112,'Java 监控','',2,11,2,'admin-server','server','infra/server/index','InfraAdminServer',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 10:34:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(113,'Redis 监控','',2,10,2,'redis','redis','infra/redis/index','InfraRedis',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 10:33:30',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(114,'表单构建','infra:build:list',2,2,2,'build','build','infra/build/index','InfraBuild',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 09:06:12',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(115,'代码生成','infra:codegen:query',2,1,2,'codegen','code','infra/codegen/index','InfraCodegen',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 09:02:24',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(116,'系统接口','infra:swagger:list',2,3,2,'swagger','swagger','infra/swagger/index','InfraSwagger',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 09:11:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(500,'操作日志','',2,1,108,'operate-log','form','system/operatelog/index','SystemOperateLog',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:47:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(501,'登录日志','',2,2,108,'login-log','logininfor','system/loginlog/index','SystemLoginLog',0,1,1,1,'admin','2021-01-05 17:03:48','1','2023-04-08 08:46:18',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1001,'用户查询','system:user:query',3,1,100,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1002,'用户新增','system:user:create',3,2,100,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1003,'用户修改','system:user:update',3,3,100,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1004,'用户删除','system:user:delete',3,4,100,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1005,'用户导出','system:user:export',3,5,100,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1006,'用户导入','system:user:import',3,6,100,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1007,'重置密码','system:user:update-password',3,7,100,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1008,'角色查询','system:role:query',3,1,101,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1009,'角色新增','system:role:create',3,2,101,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1010,'角色修改','system:role:update',3,3,101,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1011,'角色删除','system:role:delete',3,4,101,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1012,'角色导出','system:role:export',3,5,101,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1013,'菜单查询','system:menu:query',3,1,102,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1014,'菜单新增','system:menu:create',3,2,102,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1015,'菜单修改','system:menu:update',3,3,102,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1016,'菜单删除','system:menu:delete',3,4,102,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1017,'部门查询','system:dept:query',3,1,103,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1018,'部门新增','system:dept:create',3,2,103,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1019,'部门修改','system:dept:update',3,3,103,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1020,'部门删除','system:dept:delete',3,4,103,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1021,'岗位查询','system:post:query',3,1,104,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1022,'岗位新增','system:post:create',3,2,104,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1023,'岗位修改','system:post:update',3,3,104,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1024,'岗位删除','system:post:delete',3,4,104,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1025,'岗位导出','system:post:export',3,5,104,'','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1026,'字典查询','system:dict:query',3,1,105,'#','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1027,'字典新增','system:dict:create',3,2,105,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1028,'字典修改','system:dict:update',3,3,105,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1029,'字典删除','system:dict:delete',3,4,105,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1030,'字典导出','system:dict:export',3,5,105,'#','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1031,'配置查询','infra:config:query',3,1,106,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1032,'配置新增','infra:config:create',3,2,106,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1033,'配置修改','infra:config:update',3,3,106,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1034,'配置删除','infra:config:delete',3,4,106,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1035,'配置导出','infra:config:export',3,5,106,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1036,'公告查询','system:notice:query',3,1,107,'#','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1037,'公告新增','system:notice:create',3,2,107,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1038,'公告修改','system:notice:update',3,3,107,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1039,'公告删除','system:notice:delete',3,4,107,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1040,'操作查询','system:operate-log:query',3,1,500,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1042,'日志导出','system:operate-log:export',3,2,500,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1043,'登录查询','system:login-log:query',3,1,501,'#','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1045,'日志导出','system:login-log:export',3,3,501,'#','#','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1046,'令牌列表','system:oauth2-token:page',3,1,109,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-05-09 23:54:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1048,'令牌删除','system:oauth2-token:delete',3,2,109,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-05-09 23:54:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1050,'任务新增','infra:job:create',3,2,110,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1051,'任务修改','infra:job:update',3,3,110,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1052,'任务删除','infra:job:delete',3,4,110,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1053,'状态修改','infra:job:update',3,5,110,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1054,'任务导出','infra:job:export',3,7,110,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1056,'生成修改','infra:codegen:update',3,2,115,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1057,'生成删除','infra:codegen:delete',3,3,115,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1058,'导入代码','infra:codegen:create',3,2,115,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1059,'预览代码','infra:codegen:preview',3,4,115,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1060,'生成代码','infra:codegen:download',3,5,115,'','','',null,0,1,1,1,'admin','2021-01-05 17:03:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1063,'设置角色菜单权限','system:permission:assign-role-menu',3,6,101,'','','',null,0,1,1,1,'','2021-01-06 17:53:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1064,'设置角色数据权限','system:permission:assign-role-data-scope',3,7,101,'','','',null,0,1,1,1,'','2021-01-06 17:56:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1065,'设置用户角色','system:permission:assign-user-role',3,8,101,'','','',null,0,1,1,1,'','2021-01-07 10:23:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1066,'获得 Redis 监控信息','infra:redis:get-monitor-info',3,1,113,'','','',null,0,1,1,1,'','2021-01-26 01:02:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1067,'获得 Redis Key 列表','infra:redis:get-key-list',3,2,113,'','','',null,0,1,1,1,'','2021-01-26 01:02:52','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1070,'代码生成示例','infra:test-demo:query',2,1,2,'test-demo','validCode','infra/testDemo/index',null,0,1,1,1,'','2021-02-06 12:42:49','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1071,'测试示例表创建','infra:test-demo:create',3,1,1070,'','','',null,0,1,1,1,'','2021-02-06 12:42:49','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1072,'测试示例表更新','infra:test-demo:update',3,2,1070,'','','',null,0,1,1,1,'','2021-02-06 12:42:49','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1073,'测试示例表删除','infra:test-demo:delete',3,3,1070,'','','',null,0,1,1,1,'','2021-02-06 12:42:49','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1074,'测试示例表导出','infra:test-demo:export',3,4,1070,'','','',null,0,1,1,1,'','2021-02-06 12:42:49','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1075,'任务触发','infra:job:trigger',3,8,110,'','','',null,0,1,1,1,'','2021-02-07 13:03:10','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1076,'数据库文档','',2,4,2,'db-doc','table','infra/dbDoc/index','InfraDBDoc',0,1,1,1,'','2021-02-08 01:41:47','1','2023-04-08 09:13:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1077,'监控平台','',2,13,2,'skywalking','eye-open','infra/skywalking/index','InfraSkyWalking',0,1,1,1,'','2021-02-08 20:41:31','1','2023-04-08 10:39:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1078,'访问日志','',2,1,1083,'api-access-log','log','infra/apiAccessLog/index','InfraApiAccessLog',0,1,1,1,'','2021-02-26 01:32:59','1','2023-04-08 10:31:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1082,'日志导出','infra:api-access-log:export',3,2,1078,'','','',null,0,1,1,1,'','2021-02-26 01:32:59','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1083,'API 日志','',2,8,2,'log','log',null,null,0,1,1,1,'','2021-02-26 02:18:24','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1084,'错误日志','infra:api-error-log:query',2,2,1083,'api-error-log','log','infra/apiErrorLog/index','InfraApiErrorLog',0,1,1,1,'','2021-02-26 07:53:20','1','2023-04-08 10:32:25',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1085,'日志处理','infra:api-error-log:update-status',3,2,1084,'','','',null,0,1,1,1,'','2021-02-26 07:53:20','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1086,'日志导出','infra:api-error-log:export',3,3,1084,'','','',null,0,1,1,1,'','2021-02-26 07:53:20','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1087,'任务查询','infra:job:query',3,1,110,'','','',null,0,1,1,1,'1','2021-03-10 01:26:19','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1088,'日志查询','infra:api-access-log:query',3,1,1078,'','','',null,0,1,1,1,'1','2021-03-10 01:28:04','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1089,'日志查询','infra:api-error-log:query',3,1,1084,'','','',null,0,1,1,1,'1','2021-03-10 01:29:09','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1090,'文件列表','',2,5,1243,'file','upload','infra/file/index','InfraFile',0,1,1,1,'','2021-03-12 20:16:20','1','2023-04-08 09:21:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1091,'文件查询','infra:file:query',3,1,1090,'','','',null,0,1,1,1,'','2021-03-12 20:16:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1092,'文件删除','infra:file:delete',3,4,1090,'','','',null,0,1,1,1,'','2021-03-12 20:16:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1093,'短信管理','',1,11,1,'sms','validCode',null,null,0,1,1,1,'1','2021-04-05 01:10:16','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1094,'短信渠道','',2,0,1093,'sms-channel','phone','system/sms/channel/index','SystemSmsChannel',0,1,1,1,'','2021-04-01 11:07:15','1','2023-04-08 08:50:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1095,'短信渠道查询','system:sms-channel:query',3,1,1094,'','','',null,0,1,1,1,'','2021-04-01 11:07:15','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1096,'短信渠道创建','system:sms-channel:create',3,2,1094,'','','',null,0,1,1,1,'','2021-04-01 11:07:15','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1097,'短信渠道更新','system:sms-channel:update',3,3,1094,'','','',null,0,1,1,1,'','2021-04-01 11:07:15','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1098,'短信渠道删除','system:sms-channel:delete',3,4,1094,'','','',null,0,1,1,1,'','2021-04-01 11:07:15','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1100,'短信模板','',2,1,1093,'sms-template','phone','system/sms/template/index','SystemSmsTemplate',0,1,1,1,'','2021-04-01 17:35:17','1','2023-04-08 08:50:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1101,'短信模板查询','system:sms-template:query',3,1,1100,'','','',null,0,1,1,1,'','2021-04-01 17:35:17','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1102,'短信模板创建','system:sms-template:create',3,2,1100,'','','',null,0,1,1,1,'','2021-04-01 17:35:17','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1103,'短信模板更新','system:sms-template:update',3,3,1100,'','','',null,0,1,1,1,'','2021-04-01 17:35:17','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1104,'短信模板删除','system:sms-template:delete',3,4,1100,'','','',null,0,1,1,1,'','2021-04-01 17:35:17','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1105,'短信模板导出','system:sms-template:export',3,5,1100,'','','',null,0,1,1,1,'','2021-04-01 17:35:17','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1106,'发送测试短信','system:sms-template:send-sms',3,6,1100,'','','',null,0,1,1,1,'1','2021-04-11 00:26:40','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1107,'短信日志','',2,2,1093,'sms-log','phone','system/sms/log/index','SystemSmsLog',0,1,1,1,'','2021-04-11 08:37:05','1','2023-04-08 08:50:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1108,'短信日志查询','system:sms-log:query',3,1,1107,'','','',null,0,1,1,1,'','2021-04-11 08:37:05','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1109,'短信日志导出','system:sms-log:export',3,5,1107,'','','',null,0,1,1,1,'','2021-04-11 08:37:05','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1110,'错误码管理','',2,12,1,'error-code','code','system/errorCode/index','SystemErrorCode',0,1,1,1,'','2021-04-13 21:46:42','1','2023-04-08 09:01:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1111,'错误码查询','system:error-code:query',3,1,1110,'','','',null,0,1,1,1,'','2021-04-13 21:46:42','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1112,'错误码创建','system:error-code:create',3,2,1110,'','','',null,0,1,1,1,'','2021-04-13 21:46:42','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1113,'错误码更新','system:error-code:update',3,3,1110,'','','',null,0,1,1,1,'','2021-04-13 21:46:42','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1114,'错误码删除','system:error-code:delete',3,4,1110,'','','',null,0,1,1,1,'','2021-04-13 21:46:42','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1115,'错误码导出','system:error-code:export',3,5,1110,'','','',null,0,1,1,1,'','2021-04-13 21:46:42','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1117,'支付管理','',1,30,0,'/pay','money',null,null,0,1,1,1,'1','2021-12-25 16:43:41','1','2022-12-10 16:33:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1118,'请假查询','',2,0,5,'leave','user','bpm/oa/leave/index','BpmOALeave',0,1,1,1,'','2021-09-20 08:51:03','1','2023-04-08 11:30:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1119,'请假申请查询','bpm:oa-leave:query',3,1,1118,'','','',null,0,1,1,1,'','2021-09-20 08:51:03','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1120,'请假申请创建','bpm:oa-leave:create',3,2,1118,'','','',null,0,1,1,1,'','2021-09-20 08:51:03','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1126,'应用信息','',2,1,1117,'app','table','pay/app/index','PayMerchant',0,1,1,1,'','2021-11-10 01:13:30','1','2023-04-08 10:43:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1127,'支付应用信息查询','pay:app:query',3,1,1126,'','','',null,0,1,1,1,'','2021-11-10 01:13:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1128,'支付应用信息创建','pay:app:create',3,2,1126,'','','',null,0,1,1,1,'','2021-11-10 01:13:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1129,'支付应用信息更新','pay:app:update',3,3,1126,'','','',null,0,1,1,1,'','2021-11-10 01:13:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1130,'支付应用信息删除','pay:app:delete',3,4,1126,'','','',null,0,1,1,1,'','2021-11-10 01:13:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1131,'支付应用信息导出','pay:app:export',3,5,1126,'','','',null,0,1,1,1,'','2021-11-10 01:13:31','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1132,'秘钥解析','pay:channel:parsing',3,6,1129,'','','',null,0,1,1,1,'1','2021-11-08 15:15:47','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1133,'支付商户信息查询','pay:merchant:query',3,1,1132,'','','',null,0,1,1,1,'','2021-11-10 01:13:41','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1134,'支付商户信息创建','pay:merchant:create',3,2,1132,'','','',null,0,1,1,1,'','2021-11-10 01:13:41','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1135,'支付商户信息更新','pay:merchant:update',3,3,1132,'','','',null,0,1,1,1,'','2021-11-10 01:13:41','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1136,'支付商户信息删除','pay:merchant:delete',3,4,1132,'','','',null,0,1,1,1,'','2021-11-10 01:13:41','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1137,'支付商户信息导出','pay:merchant:export',3,5,1132,'','','',null,0,1,1,1,'','2021-11-10 01:13:41','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1138,'租户列表','',2,0,1224,'list','peoples','system/tenant/index','SystemTenant',0,1,1,1,'','2021-12-14 12:31:43','1','2023-04-08 08:29:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1139,'租户查询','system:tenant:query',3,1,1138,'','','',null,0,1,1,1,'','2021-12-14 12:31:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1140,'租户创建','system:tenant:create',3,2,1138,'','','',null,0,1,1,1,'','2021-12-14 12:31:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1141,'租户更新','system:tenant:update',3,3,1138,'','','',null,0,1,1,1,'','2021-12-14 12:31:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1142,'租户删除','system:tenant:delete',3,4,1138,'','','',null,0,1,1,1,'','2021-12-14 12:31:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1143,'租户导出','system:tenant:export',3,5,1138,'','','',null,0,1,1,1,'','2021-12-14 12:31:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1150,'秘钥解析','',3,6,1129,'','','',null,0,1,1,1,'1','2021-11-08 15:15:47','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1161,'退款订单','',2,3,1117,'refund','order','pay/refund/index','PayRefund',0,1,1,1,'','2021-12-25 08:29:07','1','2023-04-08 10:46:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1162,'退款订单查询','pay:refund:query',3,1,1161,'','','',null,0,1,1,1,'','2021-12-25 08:29:07','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1163,'退款订单创建','pay:refund:create',3,2,1161,'','','',null,0,1,1,1,'','2021-12-25 08:29:07','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1164,'退款订单更新','pay:refund:update',3,3,1161,'','','',null,0,1,1,1,'','2021-12-25 08:29:07','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1165,'退款订单删除','pay:refund:delete',3,4,1161,'','','',null,0,1,1,1,'','2021-12-25 08:29:07','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1166,'退款订单导出','pay:refund:export',3,5,1161,'','','',null,0,1,1,1,'','2021-12-25 08:29:07','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1173,'支付订单','',2,2,1117,'order','pay','pay/order/index','PayOrder',0,1,1,1,'','2021-12-25 08:49:43','1','2023-04-08 10:43:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1174,'支付订单查询','pay:order:query',3,1,1173,'','','',null,0,1,1,1,'','2021-12-25 08:49:43','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1175,'支付订单创建','pay:order:create',3,2,1173,'','','',null,0,1,1,1,'','2021-12-25 08:49:43','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1176,'支付订单更新','pay:order:update',3,3,1173,'','','',null,0,1,1,1,'','2021-12-25 08:49:43','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1177,'支付订单删除','pay:order:delete',3,4,1173,'','','',null,0,1,1,1,'','2021-12-25 08:49:43','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1178,'支付订单导出','pay:order:export',3,5,1173,'','','',null,0,1,1,1,'','2021-12-25 08:49:43','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1179,'商户信息','',2,0,1117,'merchant','merchant','pay/merchant/index','PayApp',0,1,1,1,'','2021-12-25 09:01:44','1','2023-04-08 10:42:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1180,'支付商户信息查询','pay:merchant:query',3,1,1179,'','','',null,0,1,1,1,'','2021-12-25 09:01:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1181,'支付商户信息创建','pay:merchant:create',3,2,1179,'','','',null,0,1,1,1,'','2021-12-25 09:01:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1182,'支付商户信息更新','pay:merchant:update',3,3,1179,'','','',null,0,1,1,1,'','2021-12-25 09:01:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1183,'支付商户信息删除','',3,4,1179,'','','',null,0,1,1,1,'','2021-12-25 09:01:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1184,'支付商户信息导出','pay:merchant:export',3,5,1179,'','','',null,0,1,1,1,'','2021-12-25 09:01:44','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1185,'工作流程','',1,50,0,'/bpm','tool',null,null,0,1,1,1,'1','2021-12-30 20:26:36','103','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1186,'流程管理','',1,10,1185,'manager','nested',null,null,0,1,1,1,'1','2021-12-30 20:28:30','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1187,'流程表单','',2,0,1186,'form','form','bpm/form/index','BpmForm',0,1,1,1,'','2021-12-30 12:38:22','1','2023-04-08 10:50:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1188,'表单查询','bpm:form:query',3,1,1187,'','','',null,0,1,1,1,'','2021-12-30 12:38:22','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1189,'表单创建','bpm:form:create',3,2,1187,'','','',null,0,1,1,1,'','2021-12-30 12:38:22','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1190,'表单更新','bpm:form:update',3,3,1187,'','','',null,0,1,1,1,'','2021-12-30 12:38:22','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1191,'表单删除','bpm:form:delete',3,4,1187,'','','',null,0,1,1,1,'','2021-12-30 12:38:22','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1192,'表单导出','bpm:form:export',3,5,1187,'','','',null,0,1,1,1,'','2021-12-30 12:38:22','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1193,'流程模型','',2,5,1186,'model','guide','bpm/model/index','BpmModel',0,1,1,1,'1','2021-12-31 23:24:58','1','2023-04-08 10:53:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1194,'模型查询','bpm:model:query',3,1,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:01:10','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1195,'模型创建','bpm:model:create',3,2,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:01:24','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1196,'模型导入','bpm:model:import',3,3,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:01:35','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1197,'模型更新','bpm:model:update',3,4,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:02:28','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1198,'模型删除','bpm:model:delete',3,5,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:02:43','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1199,'模型发布','bpm:model:deploy',3,6,1193,'','','',null,0,1,1,1,'1','2022-01-03 19:03:24','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1200,'任务管理','',1,20,1185,'task','cascader',null,null,0,1,1,1,'1','2022-01-07 23:51:48','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1201,'我的流程','',2,0,1200,'my','people','bpm/processInstance/index','BpmProcessInstance',0,1,1,1,'','2022-01-07 15:53:44','1','2023-04-08 11:16:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1202,'流程实例的查询','bpm:process-instance:query',3,1,1201,'','','',null,0,1,1,1,'','2022-01-07 15:53:44','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1207,'待办任务','',2,10,1200,'todo','eye-open','bpm/task/todo/index','BpmTodoTask',0,1,1,1,'1','2022-01-08 10:33:37','1','2023-04-08 11:29:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1208,'已办任务','',2,20,1200,'done','eye','bpm/task/done/index','BpmDoneTask',0,1,1,1,'1','2022-01-08 10:34:13','1','2023-04-08 11:29:00',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1209,'用户分组','',2,2,1186,'user-group','people','bpm/group/index','BpmUserGroup',0,1,1,1,'','2022-01-14 02:14:20','1','2023-04-08 10:51:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1210,'用户组查询','bpm:user-group:query',3,1,1209,'','','',null,0,1,1,1,'','2022-01-14 02:14:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1211,'用户组创建','bpm:user-group:create',3,2,1209,'','','',null,0,1,1,1,'','2022-01-14 02:14:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1212,'用户组更新','bpm:user-group:update',3,3,1209,'','','',null,0,1,1,1,'','2022-01-14 02:14:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1213,'用户组删除','bpm:user-group:delete',3,4,1209,'','','',null,0,1,1,1,'','2022-01-14 02:14:20','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1215,'流程定义查询','bpm:process-definition:query',3,10,1193,'','','',null,0,1,1,1,'1','2022-01-23 00:21:43','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1216,'流程任务分配规则查询','bpm:task-assign-rule:query',3,20,1193,'','','',null,0,1,1,1,'1','2022-01-23 00:26:53','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1217,'流程任务分配规则创建','bpm:task-assign-rule:create',3,21,1193,'','','',null,0,1,1,1,'1','2022-01-23 00:28:15','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1218,'流程任务分配规则更新','bpm:task-assign-rule:update',3,22,1193,'','','',null,0,1,1,1,'1','2022-01-23 00:28:41','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1219,'流程实例的创建','bpm:process-instance:create',3,2,1201,'','','',null,0,1,1,1,'1','2022-01-23 00:36:15','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1220,'流程实例的取消','bpm:process-instance:cancel',3,3,1201,'','','',null,0,1,1,1,'1','2022-01-23 00:36:33','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1221,'流程任务的查询','bpm:task:query',3,1,1207,'','','',null,0,1,1,1,'1','2022-01-23 00:38:52','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1222,'流程任务的更新','bpm:task:update',3,2,1207,'','','',null,0,1,1,1,'1','2022-01-23 00:39:24','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1224,'租户管理','',2,0,1,'tenant','peoples',null,null,0,1,1,1,'1','2022-02-20 01:41:13','1','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1225,'租户套餐','',2,0,1224,'package','eye','system/tenantPackage/index','SystemTenantPackage',0,1,1,1,'','2022-02-19 17:44:06','1','2023-04-08 08:17:08',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1226,'租户套餐查询','system:tenant-package:query',3,1,1225,'','','',null,0,1,1,1,'','2022-02-19 17:44:06','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1227,'租户套餐创建','system:tenant-package:create',3,2,1225,'','','',null,0,1,1,1,'','2022-02-19 17:44:06','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1228,'租户套餐更新','system:tenant-package:update',3,3,1225,'','','',null,0,1,1,1,'','2022-02-19 17:44:06','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1229,'租户套餐删除','system:tenant-package:delete',3,4,1225,'','','',null,0,1,1,1,'','2022-02-19 17:44:06','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1237,'文件配置','',2,0,1243,'file-config','config','infra/fileConfig/index','InfraFileConfig',0,1,1,1,'','2022-03-15 14:35:28','1','2023-04-08 09:16:05',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1238,'文件配置查询','infra:file-config:query',3,1,1237,'','','',null,0,1,1,1,'','2022-03-15 14:35:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1239,'文件配置创建','infra:file-config:create',3,2,1237,'','','',null,0,1,1,1,'','2022-03-15 14:35:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1240,'文件配置更新','infra:file-config:update',3,3,1237,'','','',null,0,1,1,1,'','2022-03-15 14:35:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1241,'文件配置删除','infra:file-config:delete',3,4,1237,'','','',null,0,1,1,1,'','2022-03-15 14:35:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1242,'文件配置导出','infra:file-config:export',3,5,1237,'','','',null,0,1,1,1,'','2022-03-15 14:35:28','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1243,'文件管理','',2,5,2,'file','download',null,'',0,1,1,1,'1','2022-03-16 23:47:40','1','2023-02-10 13:47:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1247,'敏感词管理','',2,13,1,'sensitive-word','education','system/sensitiveWord/index','SystemSensitiveWord',0,1,1,1,'','2022-04-07 16:55:03','1','2023-04-08 09:00:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1248,'敏感词查询','system:sensitive-word:query',3,1,1247,'','','',null,0,1,1,1,'','2022-04-07 16:55:03','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1249,'敏感词创建','system:sensitive-word:create',3,2,1247,'','','',null,0,1,1,1,'','2022-04-07 16:55:03','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1250,'敏感词更新','system:sensitive-word:update',3,3,1247,'','','',null,0,1,1,1,'','2022-04-07 16:55:03','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1251,'敏感词删除','system:sensitive-word:delete',3,4,1247,'','','',null,0,1,1,1,'','2022-04-07 16:55:03','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1252,'敏感词导出','system:sensitive-word:export',3,5,1247,'','','',null,0,1,1,1,'','2022-04-07 16:55:03','','2022-04-20 17:03:10',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1254,'作者动态','',1,0,0,'https://www.iocoder.cn','people',null,null,0,1,1,1,'1','2022-04-23 01:03:15','1','2023-02-10 00:06:52',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1255,'数据源配置','',2,1,2,'data-source-config','rate','infra/dataSourceConfig/index','InfraDataSourceConfig',0,1,1,1,'','2022-04-27 14:37:32','1','2023-04-08 09:05:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1256,'数据源配置查询','infra:data-source-config:query',3,1,1255,'','','',null,0,1,1,1,'','2022-04-27 14:37:32','','2022-04-27 14:37:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1257,'数据源配置创建','infra:data-source-config:create',3,2,1255,'','','',null,0,1,1,1,'','2022-04-27 14:37:32','','2022-04-27 14:37:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1258,'数据源配置更新','infra:data-source-config:update',3,3,1255,'','','',null,0,1,1,1,'','2022-04-27 14:37:32','','2022-04-27 14:37:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1259,'数据源配置删除','infra:data-source-config:delete',3,4,1255,'','','',null,0,1,1,1,'','2022-04-27 14:37:32','','2022-04-27 14:37:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1260,'数据源配置导出','infra:data-source-config:export',3,5,1255,'','','',null,0,1,1,1,'','2022-04-27 14:37:32','','2022-04-27 14:37:32',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1261,'OAuth 2.0','',1,10,1,'oauth2','people',null,null,0,1,1,1,'1','2022-05-09 23:38:17','1','2022-05-11 23:51:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1263,'应用管理','',2,0,1261,'oauth2/application','tool','system/oauth2/client/index','SystemOAuth2Client',0,1,1,1,'','2022-05-10 16:26:33','1','2023-04-08 08:47:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1264,'客户端查询','system:oauth2-client:query',3,1,1263,'','','',null,0,1,1,1,'','2022-05-10 16:26:33','1','2022-05-11 00:31:06',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1265,'客户端创建','system:oauth2-client:create',3,2,1263,'','','',null,0,1,1,1,'','2022-05-10 16:26:33','1','2022-05-11 00:31:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1266,'客户端更新','system:oauth2-client:update',3,3,1263,'','','',null,0,1,1,1,'','2022-05-10 16:26:33','1','2022-05-11 00:31:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1267,'客户端删除','system:oauth2-client:delete',3,4,1263,'','','',null,0,1,1,1,'','2022-05-10 16:26:33','1','2022-05-11 00:31:33',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1281,'报表管理','',1,40,0,'/report','chart',null,null,0,1,1,1,'1','2022-07-10 20:22:15','1','2023-02-07 17:16:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1282,'报表设计器','',2,1,1281,'jimu-report','example','report/jmreport/index','GoView',0,1,1,1,'1','2022-07-10 20:26:36','1','2023-04-08 10:47:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2000,'商品中心','',1,60,0,'/product','merchant',null,null,0,1,1,1,'','2022-07-29 15:53:53','1','2022-07-30 22:26:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2002,'商品分类','',2,2,2000,'category','dict','mall/product/category/index','ProductCategory',0,1,1,1,'','2022-07-29 15:53:53','1','2023-04-08 11:34:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2003,'分类查询','product:category:query',3,1,2002,'','','',null,0,1,1,1,'','2022-07-29 15:53:53','','2022-07-29 15:53:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2004,'分类创建','product:category:create',3,2,2002,'','','',null,0,1,1,1,'','2022-07-29 15:53:53','','2022-07-29 15:53:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2005,'分类更新','product:category:update',3,3,2002,'','','',null,0,1,1,1,'','2022-07-29 15:53:53','','2022-07-29 15:53:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2006,'分类删除','product:category:delete',3,4,2002,'','','',null,0,1,1,1,'','2022-07-29 15:53:53','','2022-07-29 15:53:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2008,'商品品牌','',2,3,2000,'brand','dashboard','mall/product/brand/index','ProductBrand',0,1,1,1,'','2022-07-30 13:52:44','1','2023-04-08 11:35:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2009,'品牌查询','product:brand:query',3,1,2008,'','','',null,0,1,1,1,'','2022-07-30 13:52:44','','2022-07-30 13:52:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2010,'品牌创建','product:brand:create',3,2,2008,'','','',null,0,1,1,1,'','2022-07-30 13:52:44','','2022-07-30 13:52:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2011,'品牌更新','product:brand:update',3,3,2008,'','','',null,0,1,1,1,'','2022-07-30 13:52:44','','2022-07-30 13:52:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2012,'品牌删除','product:brand:delete',3,4,2008,'','','',null,0,1,1,1,'','2022-07-30 13:52:44','','2022-07-30 13:52:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2014,'商品列表','',2,1,2000,'spu','list','mall/product/spu/index','ProductSpu',0,1,1,1,'','2022-07-30 14:22:58','1','2023-04-08 11:34:47',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2015,'商品查询','product:spu:query',3,1,2014,'','','',null,0,1,1,1,'','2022-07-30 14:22:58','','2022-07-30 14:22:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2016,'商品创建','product:spu:create',3,2,2014,'','','',null,0,1,1,1,'','2022-07-30 14:22:58','','2022-07-30 14:22:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2017,'商品更新','product:spu:update',3,3,2014,'','','',null,0,1,1,1,'','2022-07-30 14:22:58','','2022-07-30 14:22:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2018,'商品删除','product:spu:delete',3,4,2014,'','','',null,0,1,1,1,'','2022-07-30 14:22:58','','2022-07-30 14:22:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2019,'商品属性','',2,3,2000,'property','eye','mall/product/property/index','ProductProperty',0,1,1,1,'','2022-08-01 14:55:35','1','2023-04-08 11:35:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2020,'规格查询','product:property:query',3,1,2019,'','','',null,0,1,1,1,'','2022-08-01 14:55:35','','2022-12-12 20:26:24',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2021,'规格创建','product:property:create',3,2,2019,'','','',null,0,1,1,1,'','2022-08-01 14:55:35','','2022-12-12 20:26:30',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2022,'规格更新','product:property:update',3,3,2019,'','','',null,0,1,1,1,'','2022-08-01 14:55:35','','2022-12-12 20:26:33',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2023,'规格删除','product:property:delete',3,4,2019,'','','',null,0,1,1,1,'','2022-08-01 14:55:35','','2022-12-12 20:26:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2025,'Banner管理','',2,100,2000,'banner','','mall/market/banner/index',null,0,1,1,1,'','2022-08-01 14:56:14','1','2022-10-24 22:29:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2026,'Banner查询','market:banner:query',3,1,2025,'','','',null,0,1,1,1,'','2022-08-01 14:56:14','','2022-08-01 14:56:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2027,'Banner创建','market:banner:create',3,2,2025,'','','',null,0,1,1,1,'','2022-08-01 14:56:14','','2022-08-01 14:56:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2028,'Banner更新','market:banner:update',3,3,2025,'','','',null,0,1,1,1,'','2022-08-01 14:56:14','','2022-08-01 14:56:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2029,'Banner删除','market:banner:delete',3,4,2025,'','','',null,0,1,1,1,'','2022-08-01 14:56:14','','2022-08-01 14:56:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2030,'营销中心','',1,70,0,'/promotion','rate',null,null,0,1,1,1,'1','2022-10-31 21:25:09','1','2022-10-31 21:25:09',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2032,'优惠劵','',2,2,2030,'coupon-template','textarea','mall/promotion/couponTemplate/index','PromotionCouponTemplate',0,1,1,1,'','2022-10-31 22:27:14','1','2023-04-08 11:44:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2033,'优惠劵模板查询','promotion:coupon-template:query',3,1,2032,'','','',null,0,1,1,1,'','2022-10-31 22:27:14','','2022-10-31 22:27:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2034,'优惠劵模板创建','promotion:coupon-template:create',3,2,2032,'','','',null,0,1,1,1,'','2022-10-31 22:27:14','','2022-10-31 22:27:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2035,'优惠劵模板更新','promotion:coupon-template:update',3,3,2032,'','','',null,0,1,1,1,'','2022-10-31 22:27:14','','2022-10-31 22:27:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2036,'优惠劵模板删除','promotion:coupon-template:delete',3,4,2032,'','','',null,0,1,1,1,'','2022-10-31 22:27:14','','2022-10-31 22:27:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2038,'会员优惠劵','',2,2,2030,'coupon','','mall/promotion/coupon/index','PromotionCoupon',0,0,1,1,'','2022-11-03 23:21:31','1','2023-04-08 11:44:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2039,'优惠劵查询','promotion:coupon:query',3,1,2038,'','','',null,0,1,1,1,'','2022-11-03 23:21:31','','2022-11-03 23:21:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2040,'优惠劵删除','promotion:coupon:delete',3,4,2038,'','','',null,0,1,1,1,'','2022-11-03 23:21:31','','2022-11-03 23:21:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2041,'满减送活动','',2,10,2030,'reward-activity','radio','mall/promotion/rewardActivity/index','PromotionRewardActivity',0,1,1,1,'','2022-11-04 23:47:49','1','2023-04-08 11:45:35',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2042,'满减送活动查询','promotion:reward-activity:query',3,1,2041,'','','',null,0,1,1,1,'','2022-11-04 23:47:49','','2022-11-04 23:47:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2043,'满减送活动创建','promotion:reward-activity:create',3,2,2041,'','','',null,0,1,1,1,'','2022-11-04 23:47:49','','2022-11-04 23:47:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2044,'满减送活动更新','promotion:reward-activity:update',3,3,2041,'','','',null,0,1,1,1,'','2022-11-04 23:47:50','','2022-11-04 23:47:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2045,'满减送活动删除','promotion:reward-activity:delete',3,4,2041,'','','',null,0,1,1,1,'','2022-11-04 23:47:50','','2022-11-04 23:47:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2046,'满减送活动关闭','promotion:reward-activity:close',3,5,2041,'','','',null,0,1,1,1,'1','2022-11-05 10:42:53','1','2022-11-05 10:42:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2047,'限时折扣活动','',2,7,2030,'discount-activity','time','mall/promotion/discountActivity/index','PromotionDiscountActivity',0,1,1,1,'','2022-11-05 17:12:15','1','2023-04-08 11:45:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2048,'限时折扣活动查询','promotion:discount-activity:query',3,1,2047,'','','',null,0,1,1,1,'','2022-11-05 17:12:15','','2022-11-05 17:12:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2049, '限时折扣活动创建', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2050, '限时折扣活动更新', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2051, '限时折扣活动删除', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2052, '限时折扣活动关闭', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2059, '秒杀活动管理', '', 2, 0, 2030, 'seckill-activity', 'time-range', - 'mall/promotion/seckill/seckillActivity/index', 'PromotionSeckillActivity', 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '1', '2023-04-08 11:46:02', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2060, '秒杀活动查询', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2061, '秒杀活动创建', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2062, '秒杀活动更新', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2063, '秒杀活动删除', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2064, '秒杀活动导出', 'promotion:seckill-activity:export', 3, 5, 2059, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2066, '秒杀时段管理', '', 2, 0, 2030, 'seckill-time', '', 'mall/promotion/seckill/SeckillConfig/index', - 'PromotionSeckillConfig', 0, 0, 1, 1, '', '2022-11-15 19:46:50', '1', '2023-04-08 11:46:17', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2067, '秒杀时段查询', 'promotion:seckill-time:query', 3, 1, 2066, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2068, '秒杀时段创建', 'promotion:seckill-time:create', 3, 2, 2066, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2069, '秒杀时段更新', 'promotion:seckill-time:update', 3, 3, 2066, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2070, '秒杀时段删除', 'promotion:seckill-time:delete', 3, 4, 2066, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2071, '秒杀时段导出', 'promotion:seckill-time:export', 3, 5, 2066, '', '', '', null, 0, 1, 1, 1, '', - '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2072, '订单中心', '', 1, 65, 0, '/trade', 'order', null, null, 0, 1, 1, 1, '1', '2022-11-19 18:57:19', '1', - '2022-12-10 16:32:57', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2073, '售后退款', '', 2, 1, 2072, 'trade/after-sale', 'education', 'mall/trade/afterSale/index', - 'TradeAfterSale', 0, 1, 1, 1, '', '2022-11-19 20:15:32', '1', '2023-04-08 11:43:19', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2074, '售后查询', 'trade:after-sale:query', 3, 1, 2073, '', '', '', null, 0, 1, 1, 1, '', '2022-11-19 20:15:33', - '1', '2022-12-10 21:04:29', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2075, '秒杀活动关闭', 'promotion:sekill-activity:close', 3, 6, 2059, '', '', '', null, 0, 1, 1, 1, '1', - '2022-11-28 20:20:15', '1', '2022-11-28 20:20:15', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID", "NAME", "PERMISSION", "TYPE", "SORT", "PARENT_ID", "PATH", "ICON", - "COMPONENT", "COMPONENT_NAME", "STATUS", "VISIBLE", "KEEP_ALIVE", - "ALWAYS_SHOW", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") -VALUES (2076, '订单列表', '', 2, 0, 2072, 'trade/order', 'list', 'mall/trade/order/index', 'TradeOrder', 0, 1, 1, 1, - '1', '2022-12-10 21:05:44', '1', '2023-04-08 11:42:23', 0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2077,'物流公司管理管理','',2,0,2072,'express-company','','mall/trade/expressCompany/index',null,0,1,1,1,'','2022-12-20 23:27:55','1','2022-12-20 23:36:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2078,'物流公司管理查询','trade:express-company:query',3,1,2077,'','','',null,0,1,1,1,'','2022-12-20 23:27:55','','2022-12-20 23:27:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2079,'物流公司管理创建','trade:express-company:create',3,2,2077,'','','',null,0,1,1,1,'','2022-12-20 23:27:55','','2022-12-20 23:27:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2080,'物流公司管理更新','trade:express-company:update',3,3,2077,'','','',null,0,1,1,1,'','2022-12-20 23:27:55','','2022-12-20 23:27:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2081,'物流公司管理删除','trade:express-company:delete',3,4,2077,'','','',null,0,1,1,1,'','2022-12-20 23:27:55','','2022-12-20 23:27:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2082,'物流公司管理导出','trade:express-company:export',3,5,2077,'','','',null,0,1,1,1,'','2022-12-20 23:27:55','','2022-12-20 23:27:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2083,'地区管理','',2,14,1,'area','row','system/area/index','SystemArea',0,1,1,1,'1','2022-12-23 17:35:05','1','2023-04-08 09:01:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2084,'公众号管理','',1,100,0,'/mp','wechat',null,null,0,1,1,1,'1','2023-01-01 20:11:04','1','2023-01-15 11:28:57',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2085,'账号管理','',2,1,2084,'account','phone','mp/account/index','MpAccount',0,1,1,1,'1','2023-01-01 20:13:31','1','2023-02-09 23:56:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2086,'新增账号','mp:account:create',3,1,2085,'','','',null,0,1,1,1,'1','2023-01-01 20:21:40','1','2023-01-07 17:32:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2087,'修改账号','mp:account:update',3,2,2085,'','','',null,0,1,1,1,'1','2023-01-07 17:32:46','1','2023-01-07 17:32:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2088,'查询账号','mp:account:query',3,0,2085,'','','',null,0,1,1,1,'1','2023-01-07 17:33:07','1','2023-01-07 17:33:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2089,'删除账号','mp:account:delete',3,3,2085,'','','',null,0,1,1,1,'1','2023-01-07 17:33:21','1','2023-01-07 17:33:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2090,'生成二维码','mp:account:qr-code',3,4,2085,'','','',null,0,1,1,1,'1','2023-01-07 17:33:58','1','2023-01-07 17:33:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2091,'清空 API 配额','mp:account:clear-quota',3,5,2085,'','','',null,0,1,1,1,'1','2023-01-07 18:20:32','1','2023-01-07 18:20:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2092,'数据统计','mp:statistics:query',2,2,2084,'statistics','chart','mp/statistics/index','MpStatistics',0,1,1,1,'1','2023-01-07 20:17:36','1','2023-02-09 23:58:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2093,'标签管理','',2,3,2084,'tag','rate','mp/tag/index','MpTag',0,1,1,1,'1','2023-01-08 11:37:32','1','2023-02-09 23:58:47',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2094,'查询标签','mp:tag:query',3,0,2093,'','','',null,0,1,1,1,'1','2023-01-08 11:59:03','1','2023-01-08 11:59:03',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2095,'新增标签','mp:tag:create',3,1,2093,'','','',null,0,1,1,1,'1','2023-01-08 11:59:23','1','2023-01-08 11:59:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2096,'修改标签','mp:tag:update',3,2,2093,'','','',null,0,1,1,1,'1','2023-01-08 11:59:41','1','2023-01-08 11:59:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2097,'删除标签','mp:tag:delete',3,3,2093,'','','',null,0,1,1,1,'1','2023-01-08 12:00:04','1','2023-01-08 12:00:13',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2098,'同步标签','mp:tag:sync',3,4,2093,'','','',null,0,1,1,1,'1','2023-01-08 12:00:29','1','2023-01-08 12:00:29',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2099,'粉丝管理','',2,4,2084,'user','people','mp/user/index','MpUser',0,1,1,1,'1','2023-01-08 16:51:20','1','2023-02-09 23:58:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2100,'查询粉丝','mp:user:query',3,0,2099,'','','',null,0,1,1,1,'1','2023-01-08 17:16:59','1','2023-01-08 17:17:23',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2101,'修改粉丝','mp:user:update',3,1,2099,'','','',null,0,1,1,1,'1','2023-01-08 17:17:11','1','2023-01-08 17:17:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2102,'同步粉丝','mp:user:sync',3,2,2099,'','','',null,0,1,1,1,'1','2023-01-08 17:17:40','1','2023-01-08 17:17:40',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2103,'消息管理','',2,5,2084,'message','email','mp/message/index','MpMessage',0,1,1,1,'1','2023-01-08 18:44:19','1','2023-02-09 23:58:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2104,'图文发表记录','',2,10,2084,'free-publish','education','mp/freePublish/index','MpFreePublish',0,1,1,1,'1','2023-01-13 00:30:50','1','2023-02-09 23:57:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2105,'查询发布列表','mp:free-publish:query',3,1,2104,'','','',null,0,1,1,1,'1','2023-01-13 07:19:17','1','2023-01-13 07:19:17',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2106,'发布草稿','mp:free-publish:submit',3,2,2104,'','','',null,0,1,1,1,'1','2023-01-13 07:19:46','1','2023-01-13 07:19:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2107,'删除发布记录','mp:free-publish:delete',3,3,2104,'','','',null,0,1,1,1,'1','2023-01-13 07:20:01','1','2023-01-13 07:20:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2108,'图文草稿箱','',2,9,2084,'draft','edit','mp/draft/index','MpDraft',0,1,1,1,'1','2023-01-13 07:40:21','1','2023-02-09 23:56:58',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2109,'新建草稿','mp:draft:create',3,1,2108,'','','',null,0,1,1,1,'1','2023-01-13 23:15:30','1','2023-01-13 23:15:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2110,'修改草稿','mp:draft:update',3,2,2108,'','','',null,0,1,1,1,'1','2023-01-14 10:08:47','1','2023-01-14 10:08:47',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2111,'查询草稿','mp:draft:query',3,0,2108,'','','',null,0,1,1,1,'1','2023-01-14 10:09:01','1','2023-01-14 10:09:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2112,'删除草稿','mp:draft:delete',3,3,2108,'','','',null,0,1,1,1,'1','2023-01-14 10:09:19','1','2023-01-14 10:09:19',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2113,'素材管理','',2,8,2084,'material','skill','mp/material/index','MpMaterial',0,1,1,1,'1','2023-01-14 14:12:07','1','2023-02-09 23:57:36',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2114,'上传临时素材','mp:material:upload-temporary',3,1,2113,'','','',null,0,1,1,1,'1','2023-01-14 15:33:55','1','2023-01-14 15:33:55',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2115,'上传永久素材','mp:material:upload-permanent',3,2,2113,'','','',null,0,1,1,1,'1','2023-01-14 15:34:14','1','2023-01-14 15:34:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2116,'删除素材','mp:material:delete',3,3,2113,'','','',null,0,1,1,1,'1','2023-01-14 15:35:37','1','2023-01-14 15:35:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2117,'上传图文图片','mp:material:upload-news-image',3,4,2113,'','','',null,0,1,1,1,'1','2023-01-14 15:36:31','1','2023-01-14 15:36:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2118,'查询素材','mp:material:query',3,5,2113,'','','',null,0,1,1,1,'1','2023-01-14 15:39:22','1','2023-01-14 15:39:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2119,'菜单管理','',2,6,2084,'menu','button','mp/menu/index','MpMenu',0,1,1,1,'1','2023-01-14 17:43:54','1','2023-02-09 23:57:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2120,'自动回复','',2,7,2084,'auto-reply','eye','mp/autoReply/index','MpAutoReply',0,1,1,1,'1','2023-01-15 22:13:09','1','2023-02-09 23:56:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2121,'查询回复','mp:auto-reply:query',3,0,2120,'','','',null,0,1,1,1,'1','2023-01-16 22:28:41','1','2023-01-16 22:28:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2122,'新增回复','mp:auto-reply:create',3,1,2120,'','','',null,0,1,1,1,'1','2023-01-16 22:28:54','1','2023-01-16 22:28:54',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2123,'修改回复','mp:auto-reply:update',3,2,2120,'','','',null,0,1,1,1,'1','2023-01-16 22:29:05','1','2023-01-16 22:29:05',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2124,'删除回复','mp:auto-reply:delete',3,3,2120,'','','',null,0,1,1,1,'1','2023-01-16 22:29:34','1','2023-01-16 22:29:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2125,'查询菜单','mp:menu:query',3,0,2119,'','','',null,0,1,1,1,'1','2023-01-17 23:05:41','1','2023-01-17 23:05:41',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2126,'保存菜单','mp:menu:save',3,1,2119,'','','',null,0,1,1,1,'1','2023-01-17 23:06:01','1','2023-01-17 23:06:01',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2127,'删除菜单','mp:menu:delete',3,2,2119,'','','',null,0,1,1,1,'1','2023-01-17 23:06:16','1','2023-01-17 23:06:16',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2128,'查询消息','mp:message:query',3,0,2103,'','','',null,0,1,1,1,'1','2023-01-17 23:07:14','1','2023-01-17 23:07:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2129,'发送消息','mp:message:send',3,1,2103,'','','',null,0,1,1,1,'1','2023-01-17 23:07:26','1','2023-01-17 23:07:26',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2130,'邮箱管理','',2,11,1,'mail','email',null,null,0,1,1,1,'1','2023-01-25 17:27:44','1','2023-01-25 17:27:44',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2131,'邮箱账号','',2,0,2130,'mail-account','user','system/mail/account/index','SystemMailAccount',0,1,1,1,'','2023-01-25 09:33:48','1','2023-04-08 08:53:43',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2132,'账号查询','system:mail-account:query',3,1,2131,'','','',null,0,1,1,1,'','2023-01-25 09:33:48','','2023-01-25 09:33:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2133,'账号创建','system:mail-account:create',3,2,2131,'','','',null,0,1,1,1,'','2023-01-25 09:33:48','','2023-01-25 09:33:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2134,'账号更新','system:mail-account:update',3,3,2131,'','','',null,0,1,1,1,'','2023-01-25 09:33:48','','2023-01-25 09:33:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2135,'账号删除','system:mail-account:delete',3,4,2131,'','','',null,0,1,1,1,'','2023-01-25 09:33:48','','2023-01-25 09:33:48',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2136,'邮件模版','',2,0,2130,'mail-template','education','system/mail/template/index','SystemMailTemplate',0,1,1,1,'','2023-01-25 12:05:31','1','2023-04-08 08:53:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2137,'模版查询','system:mail-template:query',3,1,2136,'','','',null,0,1,1,1,'','2023-01-25 12:05:31','','2023-01-25 12:05:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2138,'模版创建','system:mail-template:create',3,2,2136,'','','',null,0,1,1,1,'','2023-01-25 12:05:31','','2023-01-25 12:05:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2139,'模版更新','system:mail-template:update',3,3,2136,'','','',null,0,1,1,1,'','2023-01-25 12:05:31','','2023-01-25 12:05:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2140,'模版删除','system:mail-template:delete',3,4,2136,'','','',null,0,1,1,1,'','2023-01-25 12:05:31','','2023-01-25 12:05:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2141,'邮件记录','',2,0,2130,'mail-log','log','system/mail/log/index','SystemMailLog',0,1,1,1,'','2023-01-26 02:16:50','1','2023-04-08 08:53:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2142,'日志查询','system:mail-log:query',3,1,2141,'','','',null,0,1,1,1,'','2023-01-26 02:16:50','','2023-01-26 02:16:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2143,'发送测试邮件','system:mail-template:send-mail',3,5,2136,'','','',null,0,1,1,1,'1','2023-01-26 23:29:15','1','2023-01-26 23:29:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2144,'站内信管理','',1,11,1,'notify','message',null,null,0,1,1,1,'1','2023-01-28 10:25:18','1','2023-01-28 10:25:46',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2145,'模板管理','',2,0,2144,'notify-template','education','system/notify/template/index','SystemNotifyTemplate',0,1,1,1,'','2023-01-28 02:26:42','1','2023-04-08 08:54:39',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2146,'站内信模板查询','system:notify-template:query',3,1,2145,'','','',null,0,1,1,1,'','2023-01-28 02:26:42','','2023-01-28 02:26:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2147,'站内信模板创建','system:notify-template:create',3,2,2145,'','','',null,0,1,1,1,'','2023-01-28 02:26:42','','2023-01-28 02:26:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2148,'站内信模板更新','system:notify-template:update',3,3,2145,'','','',null,0,1,1,1,'','2023-01-28 02:26:42','','2023-01-28 02:26:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2149,'站内信模板删除','system:notify-template:delete',3,4,2145,'','','',null,0,1,1,1,'','2023-01-28 02:26:42','','2023-01-28 02:26:42',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2150,'发送测试站内信','system:notify-template:send-notify',3,5,2145,'','','',null,0,1,1,1,'1','2023-01-28 10:54:43','1','2023-01-28 10:54:43',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2151,'消息记录','',2,0,2144,'notify-message','edit','system/notify/message/index','SystemNotifyMessage',0,1,1,1,'','2023-01-28 04:28:22','1','2023-04-08 08:54:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2152,'站内信消息查询','system:notify-message:query',3,1,2151,'','','',null,0,1,1,1,'','2023-01-28 04:28:22','','2023-01-28 04:28:22',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2153,'大屏设计器','',2,2,1281,'go-view','dashboard','report/goview/index','JimuReport',0,1,1,1,'1','2023-02-07 00:03:19','1','2023-04-08 10:48:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2154,'创建项目','report:go-view-project:create',3,1,2153,'','','',null,0,1,1,1,'1','2023-02-07 19:25:14','1','2023-02-07 19:25:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2155,'更新项目','report:go-view-project:delete',3,2,2153,'','','',null,0,1,1,1,'1','2023-02-07 19:25:34','1','2023-02-07 19:25:34',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2156,'查询项目','report:go-view-project:query',3,0,2153,'','','',null,0,1,1,1,'1','2023-02-07 19:25:53','1','2023-02-07 19:25:53',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2157,'使用 SQL 查询数据','report:go-view-data:get-by-sql',3,3,2153,'','','',null,0,1,1,1,'1','2023-02-07 19:26:15','1','2023-02-07 19:26:15',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2158,'使用 HTTP 查询数据','report:go-view-data:get-by-http',3,4,2153,'','','',null,0,1,1,1,'1','2023-02-07 19:26:35','1','2023-02-07 19:26:35',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2159,'Boot 开发文档','',1,1,0,'https://doc.iocoder.cn/','education',null,null,0,1,1,1,'1','2023-02-10 22:46:28','1','2023-02-10 22:46:28',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2160,'Cloud 开发文档','',1,2,0,'https://cloud.iocoder.cn','documentation',null,null,0,1,1,1,'1','2023-02-10 22:47:07','1','2023-02-10 22:47:07',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_MENU"("ID","NAME","PERMISSION","TYPE","SORT","PARENT_ID","PATH","ICON","COMPONENT","COMPONENT_NAME","STATUS","VISIBLE","KEEP_ALIVE","ALWAYS_SHOW","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2161,'接入示例','',2,99,1117,'demo-order','drag','pay/demo/index',null,0,1,1,1,'','2023-02-11 14:21:42','1','2023-02-11 22:26:35',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_MENU" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTICE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTICE"("ID","TITLE","CONTENT","TYPE","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1,'芋道的公众','

新版本内容133

',1,0,'admin','2021-01-05 17:03:48','1','2022-05-04 21:00:20',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTICE"("ID","TITLE","CONTENT","TYPE","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2,'维护通知:2018-07-01 若依系统凌晨维护','

维护内容

',2,1,'admin','2021-01-05 17:03:48','1','2022-05-11 12:34:24',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTICE"("ID","TITLE","CONTENT","TYPE","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(4,'我是测试标题','

哈哈哈哈123

',1,0,'110','2022-02-22 01:01:25','110','2022-02-22 01:01:46',0,121); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTICE" OFF; -ALTER TABLE "RUOYI_VUE_PRO"."BPM_FORM" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_OA_LEAVE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_TASK_EXT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."BPM_USER_GROUP" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_CONFIG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_FILE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_JOB" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_JOB_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."INFRA_TEST_DEMO" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."MEMBER_USER" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_APP" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_CHANNEL" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_MERCHANT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_ORDER" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_REFUND" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_BLOB_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_CALENDARS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","CALENDAR_NAME") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_CRON_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","ENTRY_ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_JOB_DETAILS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","JOB_NAME","JOB_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_LOCKS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","LOCK_NAME") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_PAUSED_TRIGGER_GRPS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_SCHEDULER_STATE" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","INSTANCE_NAME") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_SIMPLE_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_SIMPROP_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."QRTZ_TRIGGERS" ADD CONSTRAINT PRIMARY KEY("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_DEPT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_MENU" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTICE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -CREATE INDEX "SCHED_NAME" -ON "RUOYI_VUE_PRO"."QRTZ_BLOB_TRIGGERS"("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP"); - -CREATE INDEX "IDX_QRTZ_FT_INST_JOB_REQ_RCVRY" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","INSTANCE_NAME","REQUESTS_RECOVERY"); - -CREATE INDEX "IDX_QRTZ_FT_JG" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","JOB_GROUP"); - -CREATE INDEX "IDX_QRTZ_FT_J_G" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","JOB_NAME","JOB_GROUP"); - -CREATE INDEX "IDX_QRTZ_FT_TG" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","TRIGGER_GROUP"); - -CREATE INDEX "IDX_QRTZ_FT_TRIG_INST_NAME" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","INSTANCE_NAME"); - -CREATE INDEX "IDX_QRTZ_FT_T_G" -ON "RUOYI_VUE_PRO"."QRTZ_FIRED_TRIGGERS"("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP"); - -CREATE INDEX "IDX_QRTZ_J_GRP" -ON "RUOYI_VUE_PRO"."QRTZ_JOB_DETAILS"("SCHED_NAME","JOB_GROUP"); - -CREATE INDEX "IDX_QRTZ_J_REQ_RECOVERY" -ON "RUOYI_VUE_PRO"."QRTZ_JOB_DETAILS"("SCHED_NAME","REQUESTS_RECOVERY"); - -CREATE INDEX "IDX_QRTZ_T_C" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","CALENDAR_NAME"); - -CREATE INDEX "IDX_QRTZ_T_G" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_GROUP"); - -CREATE INDEX "IDX_QRTZ_T_J" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","JOB_NAME","JOB_GROUP"); - -CREATE INDEX "IDX_QRTZ_T_JG" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","JOB_GROUP"); - -CREATE INDEX "IDX_QRTZ_T_NEXT_FIRE_TIME" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","NEXT_FIRE_TIME"); - -CREATE INDEX "IDX_QRTZ_T_NFT_MISFIRE" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","MISFIRE_INSTR","NEXT_FIRE_TIME"); - -CREATE INDEX "IDX_QRTZ_T_NFT_ST" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_STATE","NEXT_FIRE_TIME"); - -CREATE INDEX "IDX_QRTZ_T_NFT_ST_MISFIRE" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","MISFIRE_INSTR","NEXT_FIRE_TIME","TRIGGER_STATE"); - -CREATE INDEX "IDX_QRTZ_T_NFT_ST_MISFIRE_GRP" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","MISFIRE_INSTR","NEXT_FIRE_TIME","TRIGGER_GROUP","TRIGGER_STATE"); - -CREATE INDEX "IDX_QRTZ_T_N_G_STATE" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_GROUP","TRIGGER_STATE"); - -CREATE INDEX "IDX_QRTZ_T_N_STATE" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_NAME","TRIGGER_GROUP","TRIGGER_STATE"); - -CREATE INDEX "IDX_QRTZ_T_STATE" -ON "RUOYI_VUE_PRO"."QRTZ_TRIGGERS"("SCHED_NAME","TRIGGER_STATE"); - -ALTER TABLE "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" ADD CHECK("USER_ID" >= 0) ENABLE ; - -ALTER TABLE "RUOYI_VUE_PRO"."MEMBER_USER" ADD CONSTRAINT "UK_MOBILE" UNIQUE("MOBILE") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" ADD CONSTRAINT "DICT_TYPE" UNIQUE("TYPE") ; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_FORM" IS '工作流的表单定义'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."NAME" IS '表单名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."CONF" IS '表单的配置'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."FIELDS" IS '表单项的数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_FORM"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_OA_LEAVE" IS 'OA 请假申请表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."ID" IS '请假表单主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."USER_ID" IS '申请人的用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."TYPE" IS '请假类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."REASON" IS '请假原因'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."START_TIME" IS '开始时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."END_TIME" IS '结束时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."DAY" IS '请假天数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."RESULT" IS '请假结果'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_OA_LEAVE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT" IS 'Bpm 流程定义的拓展表 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."MODEL_ID" IS '流程模型的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."DESCRIPTION" IS '描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_TYPE" IS '表单类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_ID" IS '表单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_CONF" IS '表单的配置'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_FIELDS" IS '表单项的数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_CUSTOM_CREATE_PATH" IS '自定义表单的提交路径'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."FORM_CUSTOM_VIEW_PATH" IS '自定义表单的查看路径'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_DEFINITION_EXT"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT" IS '工作流的流程实例的拓展'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."START_USER_ID" IS '发起流程的用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."NAME" IS '流程实例的名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."CATEGORY" IS '流程分类'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."STATUS" IS '流程实例的状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."RESULT" IS '流程实例的结果'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."END_TIME" IS '结束时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."FORM_VARIABLES" IS '表单值'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_PROCESS_INSTANCE_EXT"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE" IS 'Bpm 任务规则表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."MODEL_ID" IS '流程模型的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."TASK_DEFINITION_KEY" IS '流程任务定义的 key'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."TYPE" IS '规则类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."OPTIONS" IS '规则值,JSON 数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_ASSIGN_RULE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_TASK_EXT" IS '工作流的流程任务的拓展表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."ASSIGNEE_USER_ID" IS '任务的审批人'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."NAME" IS '任务的名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."TASK_ID" IS '任务的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."RESULT" IS '任务的结果'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."REASON" IS '审批建议'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."END_TIME" IS '任务的结束时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."PROCESS_INSTANCE_ID" IS '流程实例的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."PROCESS_DEFINITION_ID" IS '流程定义的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_TASK_EXT"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."BPM_USER_GROUP" IS '用户组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."NAME" IS '组名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."DESCRIPTION" IS '描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."MEMBER_USER_IDS" IS '成员编号数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."STATUS" IS '状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."BPM_USER_GROUP"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG" IS 'API 访问日志表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."ID" IS '日志主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."TRACE_ID" IS '链路追踪编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."APPLICATION_NAME" IS '应用名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."REQUEST_METHOD" IS '请求方法名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."REQUEST_URL" IS '请求地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."REQUEST_PARAMS" IS '请求参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."USER_AGENT" IS '浏览器 UA'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."BEGIN_TIME" IS '开始请求时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."END_TIME" IS '结束请求时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."DURATION" IS '执行时长'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."RESULT_CODE" IS '结果码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."RESULT_MSG" IS '结果提示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ACCESS_LOG"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG" IS '系统异常日志'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."TRACE_ID" IS '链路追踪编号 - * - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."APPLICATION_NAME" IS '应用名 - * - * 目前读取 spring.application.name'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."REQUEST_METHOD" IS '请求方法名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."REQUEST_URL" IS '请求地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."REQUEST_PARAMS" IS '请求参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."USER_AGENT" IS '浏览器 UA'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_TIME" IS '异常发生时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_NAME" IS '异常名 - * - * {@link Throwable#getClass()} 的类全名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_MESSAGE" IS '异常导致的消息 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_ROOT_CAUSE_MESSAGE" IS '异常导致的根消息 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_STACK_TRACE" IS '异常的栈轨迹 - * - * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_CLASS_NAME" IS '异常发生的类全名 - * - * {@link StackTraceElement#getClassName()}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_FILE_NAME" IS '异常发生的类文件 - * - * {@link StackTraceElement#getFileName()}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_METHOD_NAME" IS '异常发生的方法名 - * - * {@link StackTraceElement#getMethodName()}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."EXCEPTION_LINE_NUMBER" IS '异常发生的方法所在行 - * - * {@link StackTraceElement#getLineNumber()}'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."PROCESS_STATUS" IS '处理状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."PROCESS_TIME" IS '处理时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."PROCESS_USER_ID" IS '处理用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_API_ERROR_LOG"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" IS '代码生成表字段定义'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."TABLE_ID" IS '表编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."COLUMN_NAME" IS '字段名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."DATA_TYPE" IS '字段类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."COLUMN_COMMENT" IS '字段描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."NULLABLE" IS '是否允许为空'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."PRIMARY_KEY" IS '是否主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."ORDINAL_POSITION" IS '排序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."JAVA_TYPE" IS 'Java 属性类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."JAVA_FIELD" IS 'Java 属性名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."DICT_TYPE" IS '字典类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."EXAMPLE" IS '数据示例'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."CREATE_OPERATION" IS '是否为 Create 创建操作的字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."UPDATE_OPERATION" IS '是否为 Update 更新操作的字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."LIST_OPERATION" IS '是否为 List 查询操作的字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."LIST_OPERATION_CONDITION" IS 'List 查询操作的条件类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."LIST_OPERATION_RESULT" IS '是否为 List 查询操作的返回字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."HTML_TYPE" IS '显示类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE" IS '代码生成表定义'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."DATA_SOURCE_CONFIG_ID" IS '数据源配置的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."SCENE" IS '生成场景'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."TABLE_NAME" IS '表名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."TABLE_COMMENT" IS '表描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."MODULE_NAME" IS '模块名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."BUSINESS_NAME" IS '业务名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."CLASS_NAME" IS '类名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."CLASS_COMMENT" IS '类描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."AUTHOR" IS '作者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."TEMPLATE_TYPE" IS '模板类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."FRONT_TYPE" IS '前端类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."PARENT_MENU_ID" IS '父菜单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_TABLE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_CONFIG" IS '参数配置表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."ID" IS '参数主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."CATEGORY" IS '参数分组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."TYPE" IS '参数类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."NAME" IS '参数名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."CONFIG_KEY" IS '参数键名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."VALUE" IS '参数键值'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."VISIBLE" IS '是否可见'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CONFIG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG" IS '数据源配置表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."ID" IS '主键编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."NAME" IS '参数名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."URL" IS '数据源连接'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."USERNAME" IS '用户名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."PASSWORD" IS '密码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_DATA_SOURCE_CONFIG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_FILE" IS '文件表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."ID" IS '文件编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."CONFIG_ID" IS '配置编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."NAME" IS '文件名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."PATH" IS '文件路径'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."URL" IS '文件 URL'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."TYPE" IS '文件类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."SIZE" IS '文件大小'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG" IS '文件配置表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."NAME" IS '配置名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."STORAGE" IS '存储器'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."MASTER" IS '是否为主配置'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."CONFIG" IS '存储配置'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONFIG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT" IS '文件表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."CONFIG_ID" IS '配置编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."PATH" IS '文件路径'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."CONTENT" IS '文件内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_FILE_CONTENT"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_JOB" IS '定时任务表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."ID" IS '任务编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."NAME" IS '任务名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."STATUS" IS '任务状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."HANDLER_NAME" IS '处理器的名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."HANDLER_PARAM" IS '处理器的参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."CRON_EXPRESSION" IS 'CRON 表达式'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."RETRY_COUNT" IS '重试次数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."RETRY_INTERVAL" IS '重试间隔'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."MONITOR_TIMEOUT" IS '监控超时时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_JOB_LOG" IS '定时任务日志表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."ID" IS '日志编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."JOB_ID" IS '任务编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."HANDLER_NAME" IS '处理器的名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."HANDLER_PARAM" IS '处理器的参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."EXECUTE_INDEX" IS '第几次执行'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."BEGIN_TIME" IS '开始执行时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."END_TIME" IS '结束执行时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."DURATION" IS '执行时长'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."STATUS" IS '任务状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."RESULT" IS '结果数据'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_JOB_LOG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."INFRA_TEST_DEMO" IS '字典类型表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."NAME" IS '名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."STATUS" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."TYPE" IS '类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."CATEGORY" IS '分类'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_TEST_DEMO"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."MEMBER_USER" IS '用户'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."NICKNAME" IS '用户昵称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."AVATAR" IS '头像'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."STATUS" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."MOBILE" IS '手机号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."PASSWORD" IS '密码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."REGISTER_IP" IS '注册 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."LOGIN_IP" IS '最后登录IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."LOGIN_DATE" IS '最后登录时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."MEMBER_USER"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_APP" IS '支付应用信息'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."ID" IS '应用编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."NAME" IS '应用名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."PAY_NOTIFY_URL" IS '支付结果的回调地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."REFUND_NOTIFY_URL" IS '退款结果的回调地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."MERCHANT_ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_APP"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_CHANNEL" IS '支付渠道 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."CODE" IS '渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."FEE_RATE" IS '渠道费率,单位:百分比'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."MERCHANT_ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."APP_ID" IS '应用编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."CONFIG" IS '支付渠道配置'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_CHANNEL"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_DEMO_ORDER" IS '示例订单 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."ID" IS '订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."SPU_ID" IS '商品编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."SPU_NAME" IS '商品名字'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PRICE" IS '价格,单位:分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PAYED" IS '是否已支付:[0:未支付 1:已经支付过]'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PAY_ORDER_ID" IS '支付订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PAY_CHANNEL_CODE" IS '支付成功的支付渠道'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PAY_TIME" IS '订单支付时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."PAY_REFUND_ID" IS '退款订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."REFUND_PRICE" IS '退款金额,单位:分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."REFUND_TIME" IS '退款时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_DEMO_ORDER"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_MERCHANT" IS '支付商户信息'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."NO" IS '商户号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."NAME" IS '商户全称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."SHORT_NAME" IS '商户简称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_MERCHANT"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG" IS '支付通知 App 的日志'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."ID" IS '日志编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."TASK_ID" IS '通知任务编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."NOTIFY_TIMES" IS '第几次被通知'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."RESPONSE" IS '请求参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."STATUS" IS '通知状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_LOG"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK" IS '商户支付、退款等的通知 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."ID" IS '任务编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."MERCHANT_ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."APP_ID" IS '应用编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."TYPE" IS '通知类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."DATA_ID" IS '数据编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."STATUS" IS '通知状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."MERCHANT_ORDER_ID" IS '商户订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."NEXT_NOTIFY_TIME" IS '下一次通知时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."LAST_EXECUTE_TIME" IS '最后一次执行时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."NOTIFY_TIMES" IS '当前通知次数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."MAX_NOTIFY_TIMES" IS '最大可通知次数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."NOTIFY_URL" IS '异步通知地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_NOTIFY_TASK"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_ORDER" IS '支付订单 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."ID" IS '支付订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."MERCHANT_ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."APP_ID" IS '应用编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_ID" IS '渠道编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_CODE" IS '渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."MERCHANT_ORDER_ID" IS '商户订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."SUBJECT" IS '商品标题'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."BODY" IS '商品描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."NOTIFY_URL" IS '异步通知地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."NOTIFY_STATUS" IS '通知商户支付结果的回调状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."AMOUNT" IS '支付金额,单位:分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_FEE_RATE" IS '渠道手续费,单位:百分比'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_FEE_AMOUNT" IS '渠道手续金额,单位:分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."STATUS" IS '支付状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."EXPIRE_TIME" IS '订单失效时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."SUCCESS_TIME" IS '订单支付成功时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."NOTIFY_TIME" IS '订单支付通知时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."SUCCESS_EXTENSION_ID" IS '支付成功的订单拓展单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."REFUND_STATUS" IS '退款状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."REFUND_TIMES" IS '退款次数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."REFUND_AMOUNT" IS '退款总金额,单位:分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_USER_ID" IS '渠道用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CHANNEL_ORDER_NO" IS '渠道订单号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION" IS '支付订单 -'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."ID" IS '支付订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."NO" IS '支付订单号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."ORDER_ID" IS '支付订单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CHANNEL_ID" IS '渠道编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CHANNEL_CODE" IS '渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."STATUS" IS '支付状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CHANNEL_EXTRAS" IS '支付渠道的额外参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CHANNEL_NOTIFY_DATA" IS '支付渠道异步通知的内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_ORDER_EXTENSION"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."PAY_REFUND" IS '退款订单'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."ID" IS '支付退款编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."MERCHANT_ID" IS '商户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."APP_ID" IS '应用编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_ID" IS '渠道编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_CODE" IS '渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."ORDER_ID" IS '支付订单编号 pay_order 表id'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."TRADE_NO" IS '交易订单号 pay_extension 表no 字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."MERCHANT_ORDER_ID" IS '商户订单编号(商户系统生成)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."MERCHANT_REFUND_NO" IS '商户退款订单号(商户系统生成)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."NOTIFY_URL" IS '异步通知商户地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."NOTIFY_STATUS" IS '通知商户退款结果的回调状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."STATUS" IS '退款状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."TYPE" IS '退款类型(部分退款,全部退款)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."PAY_AMOUNT" IS '支付金额,单位分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."REFUND_AMOUNT" IS '退款金额,单位分'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."REASON" IS '退款原因'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_ORDER_NO" IS '渠道订单号,pay_order 中的channel_order_no 对应'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_REFUND_NO" IS '渠道退款单号,渠道返回'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_ERROR_CODE" IS '渠道调用报错时,错误码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_ERROR_MSG" IS '渠道调用报错时,错误信息'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CHANNEL_EXTRAS" IS '支付渠道的额外参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."EXPIRE_TIME" IS '退款失效时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."SUCCESS_TIME" IS '退款成功时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."NOTIFY_TIME" IS '退款通知时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."PAY_REFUND"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_DEPT" IS '部门表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."ID" IS '部门id'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."NAME" IS '部门名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."PARENT_ID" IS '父部门id'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."SORT" IS '显示顺序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."LEADER_USER_ID" IS '负责人'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."PHONE" IS '联系电话'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."EMAIL" IS '邮箱'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."STATUS" IS '部门状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DEPT"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA" IS '字典数据表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."ID" IS '字典编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."SORT" IS '字典排序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."LABEL" IS '字典标签'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."VALUE" IS '字典键值'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."DICT_TYPE" IS '字典类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."STATUS" IS '状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."COLOR_TYPE" IS '颜色类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."CSS_CLASS" IS 'css 样式'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_DATA"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE" IS '字典类型表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."ID" IS '字典主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."NAME" IS '字典名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."TYPE" IS '字典类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."STATUS" IS '状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_DICT_TYPE"."DELETED_TIME" IS '删除时间'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE" IS '错误码表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."ID" IS '错误码编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."TYPE" IS '错误码类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."APPLICATION_NAME" IS '应用名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."CODE" IS '错误码编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."MESSAGE" IS '错误码错误提示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."MEMO" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ERROR_CODE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG" IS '系统访问记录'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."ID" IS '访问ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."LOG_TYPE" IS '日志类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."TRACE_ID" IS '链路追踪编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."USERNAME" IS '用户账号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."RESULT" IS '登陆结果'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."USER_AGENT" IS '浏览器 UA'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_LOGIN_LOG"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT" IS '邮箱账号表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."ID" IS '主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."MAIL" IS '邮箱'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."USERNAME" IS '用户名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."PASSWORD" IS '密码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."HOST" IS 'SMTP 服务器域名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."PORT" IS 'SMTP 服务器端口'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."SSL_ENABLE" IS '是否开启 SSL'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_ACCOUNT"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG" IS '邮件日志表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TO_MAIL" IS '接收邮箱地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."ACCOUNT_ID" IS '邮箱账号编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."FROM_MAIL" IS '发送邮箱地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_ID" IS '模板编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_CODE" IS '模板编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_NICKNAME" IS '模版发送人名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_TITLE" IS '邮件标题'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_CONTENT" IS '邮件内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."TEMPLATE_PARAMS" IS '邮件参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."SEND_STATUS" IS '发送状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."SEND_TIME" IS '发送时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."SEND_MESSAGE_ID" IS '发送返回的消息 ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."SEND_EXCEPTION" IS '发送异常'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_LOG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE" IS '邮件模版表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."NAME" IS '模板名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."CODE" IS '模板编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."ACCOUNT_ID" IS '发送的邮箱账号编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."NICKNAME" IS '发送人名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."TITLE" IS '模板标题'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."CONTENT" IS '模板内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."PARAMS" IS '参数数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MAIL_TEMPLATE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_MENU" IS '菜单权限表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."ID" IS '菜单ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."NAME" IS '菜单名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."PERMISSION" IS '权限标识'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."TYPE" IS '菜单类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."SORT" IS '显示顺序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."PARENT_ID" IS '父菜单ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."PATH" IS '路由地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."ICON" IS '菜单图标'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."COMPONENT" IS '组件路径'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."COMPONENT_NAME" IS '组件名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."STATUS" IS '菜单状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."VISIBLE" IS '是否可见'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."KEEP_ALIVE" IS '是否缓存'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."ALWAYS_SHOW" IS '是否总是显示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_MENU"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTICE" IS '通知公告表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."ID" IS '公告ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."TITLE" IS '公告标题'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."CONTENT" IS '公告内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."TYPE" IS '公告类型(1通知 2公告)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."STATUS" IS '公告状态(0正常 1关闭)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTICE"."TENANT_ID" IS '租户编号'; - -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE" -( - "ID" BIGINT IDENTITY(9,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "TEMPLATE_ID" BIGINT NOT NULL, - "TEMPLATE_CODE" VARCHAR(64) NOT NULL, - "TEMPLATE_NICKNAME" VARCHAR(63) NOT NULL, - "TEMPLATE_CONTENT" VARCHAR(1024) NOT NULL, - "TEMPLATE_TYPE" INT NOT NULL, - "TEMPLATE_PARAMS" VARCHAR(255) NOT NULL, - "READ_STATUS" BIT NOT NULL, - "READ_TIME" TIMESTAMP(0) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE" -( - "ID" BIGINT IDENTITY(4,1) NOT NULL, - "NAME" VARCHAR(63) NOT NULL, - "CODE" VARCHAR(64) NOT NULL, - "NICKNAME" VARCHAR(255) NOT NULL, - "CONTENT" VARCHAR(1024) NOT NULL, - "TYPE" TINYINT NOT NULL, - "PARAMS" VARCHAR(255) NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN" -( - "ID" BIGINT IDENTITY(1785,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "ACCESS_TOKEN" VARCHAR(255) NOT NULL, - "REFRESH_TOKEN" VARCHAR(32) NOT NULL, - "CLIENT_ID" VARCHAR(255) NOT NULL, - "SCOPES" VARCHAR(255) NULL, - "EXPIRES_TIME" TIMESTAMP(0) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE" -( - "ID" BIGINT IDENTITY(82,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "CLIENT_ID" VARCHAR(255) NOT NULL, - "SCOPE" VARCHAR(255) DEFAULT '' - NOT NULL, - "APPROVED" BIT DEFAULT '0' - NOT NULL, - "EXPIRES_TIME" TIMESTAMP(0) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT" -( - "ID" BIGINT IDENTITY(43,1) NOT NULL, - "CLIENT_ID" VARCHAR(255) NOT NULL, - "SECRET" VARCHAR(255) NOT NULL, - "NAME" VARCHAR(255) NOT NULL, - "LOGO" VARCHAR(255) NOT NULL, - "DESCRIPTION" VARCHAR(255) NULL, - "STATUS" TINYINT NOT NULL, - "ACCESS_TOKEN_VALIDITY_SECONDS" INT NOT NULL, - "REFRESH_TOKEN_VALIDITY_SECONDS" INT NOT NULL, - "REDIRECT_URIS" VARCHAR(255) NOT NULL, - "AUTHORIZED_GRANT_TYPES" VARCHAR(255) NOT NULL, - "SCOPES" VARCHAR(255) NULL, - "AUTO_APPROVE_SCOPES" VARCHAR(255) NULL, - "AUTHORITIES" VARCHAR(255) NULL, - "RESOURCE_IDS" VARCHAR(255) NULL, - "ADDITIONAL_INFORMATION" VARCHAR(4096) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE" -( - "ID" BIGINT IDENTITY(147,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "CODE" VARCHAR(32) NOT NULL, - "CLIENT_ID" VARCHAR(255) NOT NULL, - "SCOPES" VARCHAR(255) DEFAULT '' - NULL, - "EXPIRES_TIME" TIMESTAMP(0) NOT NULL, - "REDIRECT_URI" VARCHAR(255) NULL, - "STATE" VARCHAR(255) DEFAULT '' - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN" -( - "ID" BIGINT IDENTITY(738,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "REFRESH_TOKEN" VARCHAR(32) NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "CLIENT_ID" VARCHAR(255) NOT NULL, - "SCOPES" VARCHAR(255) NULL, - "EXPIRES_TIME" TIMESTAMP(0) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG" -( - "ID" BIGINT IDENTITY(6440,1) NOT NULL, - "TRACE_ID" VARCHAR(64) DEFAULT '' - NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT DEFAULT 0 - NOT NULL, - "MODULE" VARCHAR(50) NOT NULL, - "NAME" VARCHAR(50) NOT NULL, - "TYPE" BIGINT DEFAULT 0 - NOT NULL, - "CONTENT" VARCHAR(2000) DEFAULT '' - NOT NULL, - "EXTS" VARCHAR(512) DEFAULT '' - NOT NULL, - "REQUEST_METHOD" VARCHAR(16) DEFAULT '' - NULL, - "REQUEST_URL" VARCHAR(255) DEFAULT '' - NULL, - "USER_IP" VARCHAR(50) NULL, - "USER_AGENT" VARCHAR(200) NULL, - "JAVA_METHOD" VARCHAR(512) DEFAULT '' - NOT NULL, - "JAVA_METHOD_ARGS" VARCHAR(8000) DEFAULT '' - NULL, - "START_TIME" TIMESTAMP(0) NOT NULL, - "DURATION" INT NOT NULL, - "RESULT_CODE" INT DEFAULT 0 - NOT NULL, - "RESULT_MSG" VARCHAR(512) DEFAULT '' - NULL, - "RESULT_DATA" VARCHAR(4000) DEFAULT '' - NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_POST" -( - "ID" BIGINT IDENTITY(5,1) NOT NULL, - "CODE" VARCHAR(64) NOT NULL, - "NAME" VARCHAR(50) NOT NULL, - "SORT" INT NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE" -( - "ID" BIGINT IDENTITY(139,1) NOT NULL, - "NAME" VARCHAR(30) NOT NULL, - "CODE" VARCHAR(100) NOT NULL, - "SORT" INT NOT NULL, - "DATA_SCOPE" TINYINT DEFAULT 1 - NOT NULL, - "DATA_SCOPE_DEPT_IDS" VARCHAR(500) DEFAULT '' - NOT NULL, - "STATUS" TINYINT NOT NULL, - "TYPE" TINYINT NOT NULL, - "REMARK" VARCHAR(500) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU" -( - "ID" BIGINT IDENTITY(2873,1) NOT NULL, - "ROLE_ID" BIGINT NOT NULL, - "MENU_ID" BIGINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD" -( - "ID" BIGINT IDENTITY(6,1) NOT NULL, - "NAME" VARCHAR(255) NOT NULL, - "DESCRIPTION" VARCHAR(512) NULL, - "TAGS" VARCHAR(255) NULL, - "STATUS" TINYINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL" -( - "ID" BIGINT IDENTITY(7,1) NOT NULL, - "SIGNATURE" VARCHAR(12) NOT NULL, - "CODE" VARCHAR(63) NOT NULL, - "STATUS" TINYINT NOT NULL, - "REMARK" VARCHAR(255) NULL, - "API_KEY" VARCHAR(128) NOT NULL, - "API_SECRET" VARCHAR(128) NULL, - "CALLBACK_URL" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE" -( - "ID" BIGINT IDENTITY(484,1) NOT NULL, - "MOBILE" VARCHAR(11) NOT NULL, - "CODE" VARCHAR(6) NOT NULL, - "CREATE_IP" VARCHAR(15) NOT NULL, - "SCENE" TINYINT NOT NULL, - "TODAY_INDEX" TINYINT NOT NULL, - "USED" TINYINT NOT NULL, - "USED_TIME" TIMESTAMP(0) NULL, - "USED_IP" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG" -( - "ID" BIGINT IDENTITY(349,1) NOT NULL, - "CHANNEL_ID" BIGINT NOT NULL, - "CHANNEL_CODE" VARCHAR(63) NOT NULL, - "TEMPLATE_ID" BIGINT NOT NULL, - "TEMPLATE_CODE" VARCHAR(63) NOT NULL, - "TEMPLATE_TYPE" TINYINT NOT NULL, - "TEMPLATE_CONTENT" VARCHAR(255) NOT NULL, - "TEMPLATE_PARAMS" VARCHAR(255) NOT NULL, - "API_TEMPLATE_ID" VARCHAR(63) NOT NULL, - "MOBILE" VARCHAR(11) NOT NULL, - "USER_ID" BIGINT NULL, - "USER_TYPE" TINYINT NULL, - "SEND_STATUS" TINYINT DEFAULT 0 - NOT NULL, - "SEND_TIME" TIMESTAMP(0) NULL, - "SEND_CODE" INT NULL, - "SEND_MSG" VARCHAR(255) NULL, - "API_SEND_CODE" VARCHAR(63) NULL, - "API_SEND_MSG" VARCHAR(255) NULL, - "API_REQUEST_ID" VARCHAR(255) NULL, - "API_SERIAL_NO" VARCHAR(255) NULL, - "RECEIVE_STATUS" TINYINT DEFAULT 0 - NOT NULL, - "RECEIVE_TIME" TIMESTAMP(0) NULL, - "API_RECEIVE_CODE" VARCHAR(63) NULL, - "API_RECEIVE_MSG" VARCHAR(255) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE" -( - "ID" BIGINT IDENTITY(14,1) NOT NULL, - "TYPE" TINYINT NOT NULL, - "STATUS" TINYINT NOT NULL, - "CODE" VARCHAR(63) NOT NULL, - "NAME" VARCHAR(63) NOT NULL, - "CONTENT" VARCHAR(255) NOT NULL, - "PARAMS" VARCHAR(255) NOT NULL, - "REMARK" VARCHAR(255) NULL, - "API_TEMPLATE_ID" VARCHAR(63) NOT NULL, - "CHANNEL_ID" BIGINT NOT NULL, - "CHANNEL_CODE" VARCHAR(63) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER" -( - "ID" BIGINT IDENTITY(20,1) NOT NULL, - "TYPE" TINYINT NOT NULL, - "OPENID" VARCHAR(32) NOT NULL, - "TOKEN" VARCHAR(256) NULL, - "RAW_TOKEN_INFO" VARCHAR(1024) NOT NULL, - "NICKNAME" VARCHAR(32) NOT NULL, - "AVATAR" VARCHAR(255) NULL, - "RAW_USER_INFO" VARCHAR(1024) NOT NULL, - "CODE" VARCHAR(256) NOT NULL, - "STATE" VARCHAR(256) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND" -( - "ID" BIGINT IDENTITY(39,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "USER_TYPE" TINYINT NOT NULL, - "SOCIAL_TYPE" TINYINT NOT NULL, - "SOCIAL_USER_ID" BIGINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT" -( - "ID" BIGINT IDENTITY(150,1) NOT NULL, - "NAME" VARCHAR(30) NOT NULL, - "CONTACT_USER_ID" BIGINT NULL, - "CONTACT_NAME" VARCHAR(30) NOT NULL, - "CONTACT_MOBILE" VARCHAR(500) NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "WEBSITE" VARCHAR(256) DEFAULT '' - NULL, - "PACKAGE_ID" BIGINT NOT NULL, - "EXPIRE_TIME" TIMESTAMP(0) NOT NULL, - "ACCOUNT_COUNT" INT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NOT NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE" -( - "ID" BIGINT IDENTITY(112,1) NOT NULL, - "NAME" VARCHAR(30) NOT NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "REMARK" VARCHAR(256) DEFAULT '' - NULL, - "MENU_IDS" VARCHAR(2048) NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NOT NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_USERS" -( - "ID" BIGINT IDENTITY(126,1) NOT NULL, - "USERNAME" VARCHAR(30) NOT NULL, - "PASSWORD" VARCHAR(100) DEFAULT '' - NOT NULL, - "NICKNAME" VARCHAR(30) NOT NULL, - "REMARK" VARCHAR(500) NULL, - "DEPT_ID" BIGINT NULL, - "POST_IDS" VARCHAR(255) NULL, - "EMAIL" VARCHAR(50) DEFAULT '' - NULL, - "MOBILE" VARCHAR(11) DEFAULT '' - NULL, - "SEX" TINYINT DEFAULT 0 - NULL, - "AVATAR" VARCHAR(512) DEFAULT '' - NULL, - "STATUS" TINYINT DEFAULT 0 - NOT NULL, - "LOGIN_IP" VARCHAR(50) DEFAULT '' - NULL, - "LOGIN_DATE" TIMESTAMP(0) NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_POST" -( - "ID" BIGINT IDENTITY(118,1) NOT NULL, - "USER_ID" BIGINT DEFAULT 0 - NOT NULL, - "POST_ID" BIGINT DEFAULT 0 - NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NOT NULL, - "DELETED" BIT DEFAULT '0' - NOT NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -CREATE TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE" -( - "ID" BIGINT IDENTITY(31,1) NOT NULL, - "USER_ID" BIGINT NOT NULL, - "ROLE_ID" BIGINT NOT NULL, - "CREATOR" VARCHAR(64) DEFAULT '' - NULL, - "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NULL, - "UPDATER" VARCHAR(64) DEFAULT '' - NULL, - "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() - NULL, - "DELETED" BIT DEFAULT '0' - NULL, - "TENANT_ID" BIGINT DEFAULT 0 - NOT NULL -); -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2,1,2,1,'test','123','我是 1,我开始 2 了',1,'{"name":"1","what":"2"}',1,'2023-02-10 00:47:04','1','2023-01-28 11:44:08','1','2023-02-10 00:47:04',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(3,1,2,1,'test','123','我是 1,我开始 2 了',1,'{"name":"1","what":"2"}',1,'2023-02-10 00:47:04','1','2023-01-28 11:45:04','1','2023-02-10 00:47:04',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(4,103,2,2,'register','系统消息','你好,欢迎 哈哈 加入大家庭!',2,'{"name":"哈哈"}',0,null,'1','2023-01-28 21:02:20','1','2023-01-28 21:02:20',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(5,1,2,1,'test','123','我是 芋艿,我开始 写代码 了',1,'{"name":"芋艿","what":"写代码"}',1,'2023-02-10 00:47:04','1','2023-01-28 22:21:42','1','2023-02-10 00:47:04',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(6,1,2,1,'test','123','我是 芋艿,我开始 写代码 了',1,'{"name":"芋艿","what":"写代码"}',1,'2023-01-29 10:52:06','1','2023-01-28 22:22:07','1','2023-01-29 10:52:06',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(7,1,2,1,'test','123','我是 2,我开始 3 了',1,'{"name":"2","what":"3"}',1,'2023-01-29 10:52:06','1','2023-01-28 23:45:21','1','2023-01-29 10:52:06',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"("ID","USER_ID","USER_TYPE","TEMPLATE_ID","TEMPLATE_CODE","TEMPLATE_NICKNAME","TEMPLATE_CONTENT","TEMPLATE_TYPE","TEMPLATE_PARAMS","READ_STATUS","READ_TIME","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(8,1,2,2,'register','系统消息','你好,欢迎 123 加入大家庭!',2,'{"name":"123"}',1,'2023-01-29 10:52:06','1','2023-01-28 23:50:21','1','2023-01-29 10:52:06',0,1); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"("ID","CLIENT_ID","SECRET","NAME","LOGO","DESCRIPTION","STATUS","ACCESS_TOKEN_VALIDITY_SECONDS","REFRESH_TOKEN_VALIDITY_SECONDS","REDIRECT_URIS","AUTHORIZED_GRANT_TYPES","SCOPES","AUTO_APPROVE_SCOPES","AUTHORITIES","RESOURCE_IDS","ADDITIONAL_INFORMATION","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1,'default','admin123','芋道源码','http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png','我是描述',0,1800,43200,'["https://www.iocoder.cn","https://doc.iocoder.cn"]','["password","authorization_code","implicit","refresh_token"]','["user.read","user.write"]','[]','["user.read","user.write"]','[]','{}','1','2022-05-11 21:47:12','1','2022-07-05 16:23:52',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"("ID","CLIENT_ID","SECRET","NAME","LOGO","DESCRIPTION","STATUS","ACCESS_TOKEN_VALIDITY_SECONDS","REFRESH_TOKEN_VALIDITY_SECONDS","REDIRECT_URIS","AUTHORIZED_GRANT_TYPES","SCOPES","AUTO_APPROVE_SCOPES","AUTHORITIES","RESOURCE_IDS","ADDITIONAL_INFORMATION","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(40,'test','test2','biubiu','http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png',null,0,1800,43200,'["https://www.iocoder.cn"]','["password","authorization_code","implicit"]','["user_info","projects"]','["user_info"]','[]','[]','{}','1','2022-05-12 00:28:20','1','2022-06-19 00:26:13',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"("ID","CLIENT_ID","SECRET","NAME","LOGO","DESCRIPTION","STATUS","ACCESS_TOKEN_VALIDITY_SECONDS","REFRESH_TOKEN_VALIDITY_SECONDS","REDIRECT_URIS","AUTHORIZED_GRANT_TYPES","SCOPES","AUTO_APPROVE_SCOPES","AUTHORITIES","RESOURCE_IDS","ADDITIONAL_INFORMATION","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(41,'yudao-sso-demo-by-code','test','基于授权码模式,如何实现 SSO 单点登录?','http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png',null,0,1800,43200,'["http://127.0.0.1:18080"]','["authorization_code","refresh_token"]','["user.read","user.write"]','[]','[]','[]',null,'1','2022-09-29 13:28:31','1','2022-09-29 13:28:31',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"("ID","CLIENT_ID","SECRET","NAME","LOGO","DESCRIPTION","STATUS","ACCESS_TOKEN_VALIDITY_SECONDS","REFRESH_TOKEN_VALIDITY_SECONDS","REDIRECT_URIS","AUTHORIZED_GRANT_TYPES","SCOPES","AUTO_APPROVE_SCOPES","AUTHORITIES","RESOURCE_IDS","ADDITIONAL_INFORMATION","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(42,'yudao-sso-demo-by-password','test','基于密码模式,如何实现 SSO 单点登录?','http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg',null,0,1800,43200,'["http://127.0.0.1:18080"]','["password","refresh_token"]','["user.read","user.write"]','[]','[]','[]',null,'1','2022-10-04 17:40:16','1','2022-10-04 20:31:21',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_POST" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_POST"("ID","CODE","NAME","SORT","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1,'ceo','董事长',1,0,'','admin','2021-01-06 17:03:48','1','2023-02-11 15:19:04',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_POST"("ID","CODE","NAME","SORT","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2,'se','项目经理',2,0,'','admin','2021-01-05 17:03:48','1','2021-12-12 10:47:47',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_POST"("ID","CODE","NAME","SORT","STATUS","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(4,'user','普通员工',4,0,'111','admin','2021-01-05 17:03:48','1','2023-02-11 15:19:00',0,1); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_POST" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ROLE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1,'超级管理员','super_admin',1,1,'',0,1,'超级管理员','admin','2021-01-05 17:03:48','','2022-02-22 05:08:21',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2,'普通角色','common',2,2,'',0,1,'普通角色','admin','2021-01-05 17:03:48','','2022-02-22 05:08:20',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(101,'测试账号','test',0,1,'[]',0,2,'132','','2021-01-06 13:49:35','1','2022-09-25 12:09:38',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(109,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-02-22 00:56:14','1','2022-02-22 00:56:14',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(110,'测试角色','test',0,1,'[]',0,2,'嘿嘿','110','2022-02-23 00:14:34','110','2022-02-23 13:14:58',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(111,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-03-07 21:37:58','1','2022-03-07 21:37:58',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(113,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(114,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(115,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(116,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(118,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(136,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(137,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE"("ID","NAME","CODE","SORT","DATA_SCOPE","DATA_SCOPE_DEPT_IDS","STATUS","TYPE","REMARK","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(138,'租户管理员','tenant_admin',0,1,'',0,1,'系统自动生成','1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ROLE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(263,109,1,'1','2022-02-22 00:56:14','1','2022-02-22 00:56:14',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(434,2,1,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(454,2,1093,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(455,2,1094,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(460,2,1100,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(467,2,1107,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(470,2,1110,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(476,2,1117,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(477,2,100,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(478,2,101,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(479,2,102,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(480,2,1126,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(481,2,103,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(483,2,104,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(485,2,105,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(488,2,107,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(490,2,108,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(492,2,109,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(498,2,1138,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(523,2,1224,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(524,2,1225,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(541,2,500,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(543,2,501,'1','2022-02-22 13:09:12','1','2022-02-22 13:09:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(675,2,2,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(689,2,1077,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(690,2,1078,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(692,2,1083,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(693,2,1084,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(699,2,1090,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(703,2,106,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(704,2,110,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(705,2,111,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(706,2,112,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(707,2,113,'1','2022-02-22 13:16:57','1','2022-02-22 13:16:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1296,110,1,'110','2022-02-23 00:23:55','110','2022-02-23 00:23:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1489,1,1,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1490,1,2,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1494,1,1077,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1495,1,1078,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1496,1,1083,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1497,1,1084,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1498,1,1090,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1499,1,1093,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1500,1,1094,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1501,1,1100,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1502,1,1107,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1503,1,1110,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1505,1,1117,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1506,1,100,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1507,1,101,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1508,1,102,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1509,1,1126,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1510,1,103,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1511,1,104,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1512,1,105,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1513,1,106,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1514,1,107,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1515,1,108,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1516,1,109,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1517,1,110,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1518,1,111,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1519,1,112,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1520,1,113,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1522,1,1138,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1525,1,1224,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1526,1,1225,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1527,1,500,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1528,1,501,'1','2022-02-23 20:03:57','1','2022-02-23 20:03:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1578,111,1,'1','2022-03-07 21:37:58','1','2022-03-07 21:37:58',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1604,101,1216,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1605,101,1217,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1606,101,1218,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1607,101,1219,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1608,101,1220,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1609,101,1221,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1610,101,5,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1611,101,1222,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1612,101,1118,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1613,101,1119,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1614,101,1120,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1615,101,1185,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1616,101,1186,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1617,101,1187,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1618,101,1188,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1619,101,1189,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1620,101,1190,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1621,101,1191,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1622,101,1192,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1623,101,1193,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1624,101,1194,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1625,101,1195,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1626,101,1196,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1627,101,1197,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1628,101,1198,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1629,101,1199,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1630,101,1200,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1631,101,1201,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1632,101,1202,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1633,101,1207,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1634,101,1208,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1635,101,1209,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1636,101,1210,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1637,101,1211,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1638,101,1212,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1639,101,1213,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1640,101,1215,'1','2022-03-19 21:45:52','1','2022-03-19 21:45:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1641,101,2,'1','2022-04-01 22:21:24','1','2022-04-01 22:21:24',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1642,101,1031,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1643,101,1032,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1644,101,1033,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1645,101,1034,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1646,101,1035,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1647,101,1050,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1648,101,1051,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1649,101,1052,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1650,101,1053,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1651,101,1054,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1652,101,1056,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1653,101,1057,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1654,101,1058,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1655,101,1059,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1656,101,1060,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1657,101,1066,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1658,101,1067,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1659,101,1070,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1660,101,1071,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1661,101,1072,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1662,101,1073,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1663,101,1074,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1664,101,1075,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1665,101,1076,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1666,101,1077,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1667,101,1078,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1668,101,1082,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1669,101,1083,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1670,101,1084,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1671,101,1085,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1672,101,1086,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1673,101,1087,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1674,101,1088,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1675,101,1089,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1679,101,1237,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1680,101,1238,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1681,101,1239,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1682,101,1240,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1683,101,1241,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1684,101,1242,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1685,101,1243,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1687,101,106,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1688,101,110,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1689,101,111,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1690,101,112,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1691,101,113,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1692,101,114,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1693,101,115,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1694,101,116,'1','2022-04-01 22:21:37','1','2022-04-01 22:21:37',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1712,113,1024,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1713,113,1025,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1714,113,1,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1715,113,102,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1716,113,103,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1717,113,104,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1718,113,1013,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1719,113,1014,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1720,113,1015,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1721,113,1016,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1722,113,1017,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1723,113,1018,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1724,113,1019,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1725,113,1020,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1726,113,1021,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1727,113,1022,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1728,113,1023,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1729,109,100,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1730,109,101,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1731,109,1063,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1732,109,1064,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1733,109,1001,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1734,109,1065,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1735,109,1002,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1736,109,1003,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1737,109,1004,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1738,109,1005,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1739,109,1006,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1740,109,1007,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1741,109,1008,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1742,109,1009,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1743,109,1010,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1744,109,1011,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1745,109,1012,'1','2022-09-21 22:08:51','1','2022-09-21 22:08:51',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1746,111,100,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1747,111,101,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1748,111,1063,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1749,111,1064,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1750,111,1001,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1751,111,1065,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1752,111,1002,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1753,111,1003,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1754,111,1004,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1755,111,1005,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1756,111,1006,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1757,111,1007,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1758,111,1008,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1759,111,1009,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1760,111,1010,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1761,111,1011,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1762,111,1012,'1','2022-09-21 22:08:52','1','2022-09-21 22:08:52',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1763,109,100,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1764,109,101,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1765,109,1063,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1766,109,1064,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1767,109,1001,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1768,109,1065,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1769,109,1002,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1770,109,1003,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1771,109,1004,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1772,109,1005,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1773,109,1006,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1774,109,1007,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1775,109,1008,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1776,109,1009,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1777,109,1010,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1778,109,1011,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1779,109,1012,'1','2022-09-21 22:08:53','1','2022-09-21 22:08:53',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1780,111,100,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1781,111,101,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1782,111,1063,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1783,111,1064,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1784,111,1001,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1785,111,1065,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1786,111,1002,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1787,111,1003,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1788,111,1004,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1789,111,1005,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1790,111,1006,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1791,111,1007,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1792,111,1008,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1793,111,1009,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1794,111,1010,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1795,111,1011,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1796,111,1012,'1','2022-09-21 22:08:54','1','2022-09-21 22:08:54',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1797,109,100,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1798,109,101,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1799,109,1063,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1800,109,1064,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1801,109,1001,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1802,109,1065,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1803,109,1002,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1804,109,1003,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1805,109,1004,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1806,109,1005,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1807,109,1006,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1808,109,1007,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1809,109,1008,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1810,109,1009,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1811,109,1010,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1812,109,1011,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1813,109,1012,'1','2022-09-21 22:08:55','1','2022-09-21 22:08:55',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1814,111,100,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1815,111,101,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1816,111,1063,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1817,111,1064,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1818,111,1001,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1819,111,1065,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1820,111,1002,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1821,111,1003,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1822,111,1004,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1823,111,1005,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1824,111,1006,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1825,111,1007,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1826,111,1008,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1827,111,1009,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1828,111,1010,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1829,111,1011,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1830,111,1012,'1','2022-09-21 22:08:56','1','2022-09-21 22:08:56',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1831,109,103,'1','2022-09-21 22:43:23','1','2022-09-21 22:43:23',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1832,109,1017,'1','2022-09-21 22:43:23','1','2022-09-21 22:43:23',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1833,109,1018,'1','2022-09-21 22:43:23','1','2022-09-21 22:43:23',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1834,109,1019,'1','2022-09-21 22:43:23','1','2022-09-21 22:43:23',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1835,109,1020,'1','2022-09-21 22:43:23','1','2022-09-21 22:43:23',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1836,111,103,'1','2022-09-21 22:43:24','1','2022-09-21 22:43:24',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1837,111,1017,'1','2022-09-21 22:43:24','1','2022-09-21 22:43:24',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1838,111,1018,'1','2022-09-21 22:43:24','1','2022-09-21 22:43:24',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1839,111,1019,'1','2022-09-21 22:43:24','1','2022-09-21 22:43:24',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1840,111,1020,'1','2022-09-21 22:43:24','1','2022-09-21 22:43:24',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1841,109,1036,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1842,109,1037,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1843,109,1038,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1844,109,1039,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1845,109,107,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1846,111,1036,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1847,111,1037,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1848,111,1038,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1849,111,1039,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1850,111,107,'1','2022-09-21 22:48:13','1','2022-09-21 22:48:13',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1851,114,1,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1852,114,1036,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1853,114,1037,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1854,114,1038,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1855,114,1039,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1856,114,100,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1857,114,101,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1858,114,1063,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1859,114,103,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1860,114,1064,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1861,114,1001,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1862,114,1065,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1863,114,1002,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1864,114,1003,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1865,114,107,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1866,114,1004,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1867,114,1005,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1868,114,1006,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1869,114,1007,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1870,114,1008,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1871,114,1009,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1872,114,1010,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1873,114,1011,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1874,114,1012,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1875,114,1017,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1876,114,1018,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1877,114,1019,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1878,114,1020,'1','2022-12-30 11:32:03','1','2022-12-30 11:32:03',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1879,115,1,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1880,115,1036,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1881,115,1037,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1882,115,1038,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1883,115,1039,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1884,115,100,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1885,115,101,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1886,115,1063,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1887,115,103,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1888,115,1064,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1889,115,1001,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1890,115,1065,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1891,115,1002,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1892,115,1003,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1893,115,107,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1894,115,1004,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1895,115,1005,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1896,115,1006,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1897,115,1007,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1898,115,1008,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1899,115,1009,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1900,115,1010,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1901,115,1011,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1902,115,1012,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1903,115,1017,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1904,115,1018,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1905,115,1019,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1906,115,1020,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1907,116,1,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1908,116,1036,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1909,116,1037,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1910,116,1038,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1911,116,1039,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1912,116,100,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1913,116,101,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1914,116,1063,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1915,116,103,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1916,116,1064,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1917,116,1001,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1918,116,1065,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1919,116,1002,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1920,116,1003,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1921,116,107,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1922,116,1004,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1923,116,1005,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1924,116,1006,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1925,116,1007,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1926,116,1008,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1927,116,1009,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1928,116,1010,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1929,116,1011,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1930,116,1012,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1931,116,1017,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1932,116,1018,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1933,116,1019,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1934,116,1020,'1','2022-12-30 11:33:48','1','2022-12-30 11:33:48',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1963,118,1,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1964,118,1036,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1965,118,1037,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1966,118,1038,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1967,118,1039,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1968,118,100,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1969,118,101,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1970,118,1063,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1971,118,103,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1972,118,1064,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1973,118,1001,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1974,118,1065,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1975,118,1002,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1976,118,1003,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1977,118,107,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1978,118,1004,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1979,118,1005,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1980,118,1006,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1981,118,1007,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1982,118,1008,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1983,118,1009,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1984,118,1010,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1985,118,1011,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1986,118,1012,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1987,118,1017,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1988,118,1018,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1989,118,1019,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1990,118,1020,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1991,2,1024,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1992,2,1025,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1993,2,1026,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1994,2,1027,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1995,2,1028,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1996,2,1029,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1997,2,1030,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1998,2,1031,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1999,2,1032,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2000,2,1033,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2001,2,1034,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2002,2,1035,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2003,2,1036,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2004,2,1037,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2005,2,1038,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2006,2,1039,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2007,2,1040,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2008,2,1042,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2009,2,1043,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2010,2,1045,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2011,2,1046,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2012,2,1048,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2013,2,1050,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2014,2,1051,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2015,2,1052,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2016,2,1053,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2017,2,1054,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2018,2,1056,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2019,2,1057,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2020,2,1058,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2021,2,2083,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2022,2,1059,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2023,2,1060,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2024,2,1063,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2025,2,1064,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2026,2,1065,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2027,2,1066,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2028,2,1067,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2029,2,1070,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2030,2,1071,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2031,2,1072,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2032,2,1073,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2033,2,1074,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2034,2,1075,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2035,2,1076,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2036,2,1082,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2037,2,1085,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2038,2,1086,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2039,2,1087,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2040,2,1088,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2041,2,1089,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2042,2,1091,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2043,2,1092,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2044,2,1095,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2045,2,1096,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2046,2,1097,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2047,2,1098,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2048,2,1101,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2049,2,1102,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2050,2,1103,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2051,2,1104,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2052,2,1105,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2053,2,1106,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2054,2,1108,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2055,2,1109,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2056,2,1111,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2057,2,1112,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2058,2,1113,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2059,2,1114,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2060,2,1115,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2061,2,1127,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2062,2,1128,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2063,2,1129,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2064,2,1130,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2065,2,1131,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2066,2,1132,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2067,2,1133,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2068,2,1134,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2069,2,1135,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2070,2,1136,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2071,2,1137,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2072,2,114,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2073,2,1139,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2074,2,115,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2075,2,1140,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2076,2,116,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2077,2,1141,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2078,2,1142,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2079,2,1143,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2080,2,1150,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2081,2,1161,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2082,2,1162,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2083,2,1163,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2084,2,1164,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2085,2,1165,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2086,2,1166,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2087,2,1173,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2088,2,1174,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2089,2,1175,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2090,2,1176,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2091,2,1177,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2092,2,1178,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2093,2,1179,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2094,2,1180,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2095,2,1181,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2096,2,1182,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2097,2,1183,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2098,2,1184,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2099,2,1226,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2100,2,1227,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2101,2,1228,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2102,2,1229,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2103,2,1237,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2104,2,1238,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2105,2,1239,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2106,2,1240,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2107,2,1241,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2108,2,1242,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2109,2,1243,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2110,2,1247,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2111,2,1248,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2112,2,1249,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2113,2,1250,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2114,2,1251,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2115,2,1252,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2116,2,1254,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2117,2,1255,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2118,2,1256,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2119,2,1257,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2120,2,1258,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2121,2,1259,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2122,2,1260,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2123,2,1261,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2124,2,1263,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2125,2,1264,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2126,2,1265,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2127,2,1266,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2128,2,1267,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2129,2,1001,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2130,2,1002,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2131,2,1003,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2132,2,1004,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2133,2,1005,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2134,2,1006,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2135,2,1007,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2136,2,1008,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2137,2,1009,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2138,2,1010,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2139,2,1011,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2140,2,1012,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2141,2,1013,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2142,2,1014,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2143,2,1015,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2144,2,1016,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2145,2,1017,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2146,2,1018,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2147,2,1019,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2148,2,1020,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2149,2,1021,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2150,2,1022,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2151,2,1023,'1','2023-01-25 08:42:52','1','2023-01-25 08:42:52',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2152,2,1281,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2153,2,1282,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2154,2,2000,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2155,2,2002,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2156,2,2003,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2157,2,2004,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2158,2,2005,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2159,2,2006,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2160,2,2008,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2161,2,2009,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2162,2,2010,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2163,2,2011,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2164,2,2012,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2170,2,2019,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2171,2,2020,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2172,2,2021,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2173,2,2022,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2174,2,2023,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2175,2,2025,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2177,2,2027,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2178,2,2028,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2179,2,2029,'1','2023-01-25 08:42:58','1','2023-01-25 08:42:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2180,2,2014,'1','2023-01-25 08:43:12','1','2023-01-25 08:43:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2181,2,2015,'1','2023-01-25 08:43:12','1','2023-01-25 08:43:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2182,2,2016,'1','2023-01-25 08:43:12','1','2023-01-25 08:43:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2183,2,2017,'1','2023-01-25 08:43:12','1','2023-01-25 08:43:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2184,2,2018,'1','2023-01-25 08:43:12','1','2023-01-25 08:43:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2188,101,1024,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2189,101,1,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2190,101,1025,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2191,101,1026,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2192,101,1027,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2193,101,1028,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2194,101,1029,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2195,101,1030,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2196,101,1036,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2197,101,1037,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2198,101,1038,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2199,101,1039,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2200,101,1040,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2201,101,1042,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2202,101,1043,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2203,101,1045,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2204,101,1046,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2205,101,1048,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2206,101,2083,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2207,101,1063,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2208,101,1064,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2209,101,1065,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2210,101,1093,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2211,101,1094,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2212,101,1095,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2213,101,1096,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2214,101,1097,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2215,101,1098,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2216,101,1100,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2217,101,1101,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2218,101,1102,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2219,101,1103,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2220,101,1104,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2221,101,1105,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2222,101,1106,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2223,101,2130,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2224,101,1107,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2225,101,2131,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2226,101,1108,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2227,101,2132,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2228,101,1109,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2229,101,2133,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2230,101,2134,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2231,101,1110,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2232,101,2135,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2233,101,1111,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2234,101,2136,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2235,101,1112,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2236,101,2137,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2237,101,1113,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2238,101,2138,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2239,101,1114,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2240,101,2139,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2241,101,1115,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2242,101,2140,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2243,101,2141,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2244,101,2142,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2245,101,2143,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2246,101,2144,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2247,101,2145,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2248,101,2146,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2249,101,2147,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2250,101,100,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2251,101,2148,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2252,101,101,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2253,101,2149,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2254,101,102,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2255,101,2150,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2256,101,103,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2257,101,2151,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2258,101,104,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2259,101,2152,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2260,101,105,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2261,101,107,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2262,101,108,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2263,101,109,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2264,101,1138,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2265,101,1139,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2266,101,1140,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2267,101,1141,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2268,101,1142,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2269,101,1143,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2270,101,1224,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2271,101,1225,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2272,101,1226,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2273,101,1227,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2274,101,1228,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2275,101,1229,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2276,101,1247,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2277,101,1248,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2278,101,1249,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2279,101,1250,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2280,101,1251,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2281,101,1252,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2282,101,1261,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2283,101,1263,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2284,101,1264,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2285,101,1265,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2286,101,1266,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2287,101,1267,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2288,101,1001,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2289,101,1002,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2290,101,1003,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2291,101,1004,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2292,101,1005,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2293,101,1006,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2294,101,1007,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2295,101,1008,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2296,101,1009,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2297,101,1010,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2298,101,1011,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2299,101,1012,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2300,101,500,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2301,101,1013,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2302,101,501,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2303,101,1014,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2304,101,1015,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2305,101,1016,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2306,101,1017,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2307,101,1018,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2308,101,1019,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2309,101,1020,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2310,101,1021,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2311,101,1022,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2312,101,1023,'1','2023-02-09 23:49:46','1','2023-02-09 23:49:46',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2789,136,1,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2790,136,1036,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2791,136,1037,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2792,136,1038,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2793,136,1039,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2794,136,100,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2795,136,101,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2796,136,1063,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2797,136,103,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2798,136,1064,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2799,136,1001,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2800,136,1065,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2801,136,1002,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2802,136,1003,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2803,136,107,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2804,136,1004,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2805,136,1005,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2806,136,1006,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2807,136,1007,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2808,136,1008,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2809,136,1009,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2810,136,1010,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2811,136,1011,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2812,136,1012,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2813,136,1017,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2814,136,1018,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2815,136,1019,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2816,136,1020,'1','2023-03-05 21:23:32','1','2023-03-05 21:23:32',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2817,137,1,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2818,137,1036,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2819,137,1037,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2820,137,1038,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2821,137,1039,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2822,137,100,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2823,137,101,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2824,137,1063,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2825,137,103,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2826,137,1064,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2827,137,1001,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2828,137,1065,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2829,137,1002,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2830,137,1003,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2831,137,107,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2832,137,1004,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2833,137,1005,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2834,137,1006,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2835,137,1007,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2836,137,1008,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2837,137,1009,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2838,137,1010,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2839,137,1011,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2840,137,1012,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2841,137,1017,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2842,137,1018,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2843,137,1019,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2844,137,1020,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2845,138,1,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2846,138,1036,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2847,138,1037,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2848,138,1038,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2849,138,1039,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2850,138,100,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2851,138,101,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2852,138,1063,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2853,138,103,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2854,138,1064,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2855,138,1001,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2856,138,1065,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2857,138,1002,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2858,138,1003,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2859,138,107,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2860,138,1004,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2861,138,1005,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2862,138,1006,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2863,138,1007,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2864,138,1008,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2865,138,1009,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2866,138,1010,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2867,138,1011,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2868,138,1012,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2869,138,1017,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2870,138,1018,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2871,138,1019,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"("ID","ROLE_ID","MENU_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2872,138,1020,'1','2023-03-05 21:59:02','1','2023-03-05 21:59:02',0,149); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"("ID","NAME","DESCRIPTION","TAGS","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(3,'土豆','好呀','蔬菜,短信',0,'1','2022-04-08 21:07:12','1','2022-04-09 10:28:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"("ID","NAME","DESCRIPTION","TAGS","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(4,'XXX',null,'短信',0,'1','2022-04-08 21:27:49','1','2022-06-19 00:36:50',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"("ID","NAME","DESCRIPTION","TAGS","STATUS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(5,'白痴',null,'测试',0,'1','2022-12-31 19:08:25','1','2022-12-31 19:08:25',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"("ID","SIGNATURE","CODE","STATUS","REMARK","API_KEY","API_SECRET","CALLBACK_URL","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,'Ballcat','ALIYUN',0,'啦啦啦','LTAI5tCnKso2uG3kJ5gRav88','fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C',null,'','2021-03-31 11:53:10','1','2021-04-14 00:08:37',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"("ID","SIGNATURE","CODE","STATUS","REMARK","API_KEY","API_SECRET","CALLBACK_URL","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(4,'测试渠道','DEBUG_DING_TALK',0,'123','696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859','SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67',null,'1','2021-04-13 00:23:14','1','2022-03-27 20:29:49',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"("ID","SIGNATURE","CODE","STATUS","REMARK","API_KEY","API_SECRET","CALLBACK_URL","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(6,'测试演示','DEBUG_DING_TALK',0,null,'696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859','SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67',null,'1','2022-04-10 23:07:59','1','2022-06-19 00:33:54',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(2,1,0,'test_01','测试验证码短信','正在进行登录操作{operation},您的验证码是{code}','["operation","code"]',null,'4383920',6,'DEBUG_DING_TALK','','2021-03-31 10:49:38','1','2022-12-10 21:26:20',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(3,1,0,'test_02','公告通知','您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!','["code"]',null,'SMS_207945135',2,'ALIYUN','','2021-03-31 11:56:30','1','2021-04-10 01:22:02',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(6,3,0,'test-01','测试模板','哈哈哈 {name}','["name"]','f哈哈哈','4383920',6,'DEBUG_DING_TALK','1','2021-04-10 01:07:21','1','2022-12-10 21:26:09',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(7,3,0,'test-04','测试下','老鸡{name},牛逼{code}','["name","code"]',null,'suibian',4,'DEBUG_DING_TALK','1','2021-04-13 00:29:53','1','2021-04-14 00:30:38',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(8,1,0,'user-sms-login','前台用户短信登录','您的验证码是{code}','["code"]',null,'4372216',6,'DEBUG_DING_TALK','1','2021-10-11 08:10:00','1','2022-12-10 21:25:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(9,2,0,'bpm_task_assigned','【工作流】任务被分配','您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}','["processInstanceName","taskName","startUserNickname","detailUrl"]',null,'suibian',4,'DEBUG_DING_TALK','1','2022-01-21 22:31:19','1','2022-01-22 00:03:36',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(10,2,0,'bpm_process_instance_reject','【工作流】流程被不通过','您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}','["processInstanceName","reason","detailUrl"]',null,'suibian',4,'DEBUG_DING_TALK','1','2022-01-22 00:03:31','1','2022-05-01 12:33:14',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(11,2,0,'bpm_process_instance_approve','【工作流】流程被通过','您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}','["processInstanceName","detailUrl"]',null,'suibian',4,'DEBUG_DING_TALK','1','2022-01-22 00:04:31','1','2022-03-27 20:32:21',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"("ID","TYPE","STATUS","CODE","NAME","CONTENT","PARAMS","REMARK","API_TEMPLATE_ID","CHANNEL_ID","CHANNEL_CODE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(12,2,0,'demo','演示模板','我就是测试一下下','[]',null,'biubiubiu',6,'DEBUG_DING_TALK','1','2022-04-10 23:22:49','1','2023-03-24 23:45:07',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND" ON; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_TENANT" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_TENANT"("ID","NAME","CONTACT_USER_ID","CONTACT_NAME","CONTACT_MOBILE","STATUS","WEBSITE","PACKAGE_ID","EXPIRE_TIME","ACCOUNT_COUNT","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(1,'芋道源码',null,'芋艿','17321315478',0,'https://www.iocoder.cn',0,'2099-02-19 17:14:16',9999,'1','2021-01-05 17:03:47','1','2022-02-23 12:15:11',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_TENANT"("ID","NAME","CONTACT_USER_ID","CONTACT_NAME","CONTACT_MOBILE","STATUS","WEBSITE","PACKAGE_ID","EXPIRE_TIME","ACCOUNT_COUNT","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(121,'小租户',110,'小王2','15601691300',0,'http://www.iocoder.cn',111,'2024-03-11 00:00:00',20,'1','2022-02-22 00:56:14','1','2022-05-17 10:03:59',0); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_TENANT"("ID","NAME","CONTACT_USER_ID","CONTACT_NAME","CONTACT_MOBILE","STATUS","WEBSITE","PACKAGE_ID","EXPIRE_TIME","ACCOUNT_COUNT","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(122,'测试租户',113,'芋道','15601691300',0,'https://www.iocoder.cn',111,'2022-04-30 00:00:00',50,'1','2022-03-07 21:37:58','1','2022-03-07 21:37:58',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_TENANT" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"("ID","NAME","STATUS","REMARK","MENU_IDS","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED") VALUES(111,'普通套餐',0,'小功能','[1,1036,1037,1038,1039,100,101,1063,103,1064,1001,1065,1002,1003,107,1004,1005,1006,1007,1008,1009,1010,1011,1012,1017,1018,1019,1020]','1','2022-02-22 00:54:00','1','2022-09-21 22:48:12',0); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USERS" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1,'admin','$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm','芋道源码','管理员',103,'[1]','aoteman@126.com','15612345678',1,'http://test.yudao.iocoder.cn/e1fdd7271685ec143a0900681606406621717a666ad0b2798b096df41422b32f.png',0,'0:0:0:0:0:0:0:1','2023-04-13 23:09:16','admin','2021-01-05 17:03:47',null,'2023-04-13 23:09:16',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(100,'yudao','$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a','芋道','不要吓我',104,'[1]','yudao@iocoder.cn','15601691300',1,'',1,'127.0.0.1','2022-07-09 23:03:33','','2021-01-07 09:07:17',null,'2022-07-09 23:03:33',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(103,'yuanma','$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6','源码',null,106,null,'yuanma@iocoder.cn','15601701300',0,'',0,'127.0.0.1','2022-07-08 01:26:27','','2021-01-13 23:50:35',null,'2022-07-08 01:26:27',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(104,'test','$2a$10$GP8zvqHB//TekuzYZSBYAuBQJiNq1.fxQVDYJ.uBCOnWCtDVKE4H6','测试号',null,107,'[1,2]','111@qq.com','15601691200',1,'',0,'127.0.0.1','2022-05-28 15:43:17','','2021-01-21 02:13:53',null,'2022-07-09 09:00:33',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(107,'admin107','$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm','芋艿',null,null,null,'','15601691300',0,'',0,'',null,'1','2022-02-20 22:59:33','1','2022-02-27 08:26:51',0,118); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(108,'admin108','$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu','芋艿',null,null,null,'','15601691300',0,'',0,'',null,'1','2022-02-20 23:00:50','1','2022-02-27 08:26:53',0,119); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(109,'admin109','$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK','芋艿',null,null,null,'','15601691300',0,'',0,'',null,'1','2022-02-20 23:11:50','1','2022-02-27 08:26:56',0,120); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(110,'admin110','$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm','小王',null,null,null,'','15601691300',0,'',0,'127.0.0.1','2022-09-25 22:47:33','1','2022-02-22 00:56:14',null,'2022-09-25 22:47:33',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(111,'test','$2a$10$mExveopHUx9Q4QiLtAzhDeH3n4/QlNLzEsM4AqgxKrU.ciUZDXZCy','测试用户',null,null,'[]','','',0,'',0,'',null,'110','2022-02-23 13:14:33','110','2022-02-23 13:14:33',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(112,'newobject','$2a$10$3alwklxqfq8/hKoW6oUV0OJp0IdQpBDauLy4633SpUjrRsStl6kMa','新对象',null,100,'[]','','',1,'',0,'0:0:0:0:0:0:0:1','2023-02-10 13:48:13','1','2022-02-23 19:08:03',null,'2023-02-10 13:48:13',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(113,'aoteman','$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO','芋道',null,null,null,'','15601691300',0,'',0,'127.0.0.1','2022-03-19 18:38:51','1','2022-03-07 21:37:58',null,'2022-03-19 18:38:51',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(114,'hrmgr','$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu','hr 小姐姐',null,null,'[3]','','',0,'',0,'127.0.0.1','2022-03-19 22:15:43','1','2022-03-19 21:50:58',null,'2022-03-19 22:15:43',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(115,'aotemane','$2a$10$/WCwGHu1eq0wOVDd/u8HweJ0gJCHyLS6T7ndCqI8UXZAQom1etk2e','1','11',101,'[]','','',1,'',0,'',null,'1','2022-04-30 02:55:43','1','2022-06-22 13:34:58',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(116,'15601691302','$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6','小豆',null,null,null,'','',0,'',0,'',null,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(117,'admin123','$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC','测试号','1111',100,'[2]','','15601691234',1,'',0,'',null,'1','2022-07-09 17:40:26','1','2022-07-09 17:40:26',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(118,'goudan','$2a$10$Lrb71muL.s5/AFjQ2IHkzOFlAFwUToH.zQL7bnghvTDt/QptjGgF6','狗蛋',null,103,'[1]','','',2,'',0,'',null,'1','2022-07-09 17:44:43','1','2022-12-31 17:29:13',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(119,'admin','$2a$10$AheSOpxeWQYhEO/gGZhDz.oifdX5zt.kprWNHptPiiStUx4mXmHb.','12',null,null,null,'','',0,'',0,'',null,'1','2022-12-30 11:32:04','1','2022-12-30 11:32:04',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(120,'admin','$2a$10$D.xFtcgma/NJ3SyYlUj3bORcs0mwOD6Zu.4I7GCI/8/25/QSn4qJC','12',null,null,null,'','',0,'',0,'',null,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(121,'admin','$2a$10$R2guBf7TyERjjW9lm0Pd0Osut6vt7NuH2Vx6fkOI5.VgSvJK2Xb82','12',null,null,null,'','',0,'',0,'',null,'1','2022-12-30 11:33:49','1','2022-12-30 11:33:49',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(122,'admin','$2a$10$pwxqUUza61HBgx3FTjp2d.Mc2UKalikXxP91wUdP4bFe7Hl.lfmeq','12',null,null,null,'','',0,'',0,'',null,'1','2022-12-30 11:47:52','1','2022-12-30 11:47:52',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(123,'tudou','$2a$10$m33ROHSPa9lshwQIaiVlFeoG1TZjCoQmfvExn4QWS8r5X59AEsTz2','15601691234',null,null,null,'','',0,'',0,'',null,'1','2023-03-05 21:23:35','1','2023-03-05 21:23:35',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(124,'tudou','$2a$10$1pzAJAEIRf/vYyMy8FTFiOzX40Q/NnozXixun/ExPZwv8A/CQkR4q','15601691234',null,null,null,'','',0,'',0,'',null,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USERS"("ID","USERNAME","PASSWORD","NICKNAME","REMARK","DEPT_ID","POST_IDS","EMAIL","MOBILE","SEX","AVATAR","STATUS","LOGIN_IP","LOGIN_DATE","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(125,'admin','$2a$10$E49momkI6Uf9v6pkfjoRP.dHzK4RjDIK39AWHz9eXRmqUR5sbJpoy','秃头',null,null,null,'','',0,'',0,'',null,'1','2023-03-05 21:59:03','1','2023-03-05 21:59:03',0,149); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USERS" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USER_POST" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(112,1,1,'admin','2022-05-02 07:25:24','admin','2022-05-02 07:25:24',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(113,100,1,'admin','2022-05-02 07:25:24','admin','2022-05-02 07:25:24',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(114,114,3,'admin','2022-05-02 07:25:24','admin','2022-05-02 07:25:24',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(115,104,1,'1','2022-05-16 19:36:28','1','2022-05-16 19:36:28',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(116,117,2,'1','2022-07-09 17:40:26','1','2022-07-09 17:40:26',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_POST"("ID","USER_ID","POST_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(117,118,1,'1','2022-07-09 17:44:44','1','2022-07-09 17:44:44',0,1); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USER_POST" OFF; -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE" ON; -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(1,1,1,'','2022-01-11 13:19:45','','2022-05-12 12:35:17',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(2,2,2,'','2022-01-11 13:19:45','','2022-05-12 12:35:13',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(4,100,101,'','2022-01-11 13:19:45','','2022-05-12 12:35:13',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(5,100,1,'','2022-01-11 13:19:45','','2022-05-12 12:35:12',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(6,100,2,'','2022-01-11 13:19:45','','2022-05-12 12:35:11',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(10,103,1,'1','2022-01-11 13:19:45','1','2022-01-11 13:19:45',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(11,107,106,'1','2022-02-20 22:59:33','1','2022-02-20 22:59:33',0,118); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(12,108,107,'1','2022-02-20 23:00:50','1','2022-02-20 23:00:50',0,119); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(13,109,108,'1','2022-02-20 23:11:50','1','2022-02-20 23:11:50',0,120); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(14,110,109,'1','2022-02-22 00:56:14','1','2022-02-22 00:56:14',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(15,111,110,'110','2022-02-23 13:14:38','110','2022-02-23 13:14:38',0,121); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(16,113,111,'1','2022-03-07 21:37:58','1','2022-03-07 21:37:58',0,122); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(17,114,101,'1','2022-03-19 21:51:13','1','2022-03-19 21:51:13',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(18,1,2,'1','2022-05-12 20:39:29','1','2022-05-12 20:39:29',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(19,116,113,'1','2022-05-17 10:07:10','1','2022-05-17 10:07:10',0,124); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(20,104,101,'1','2022-05-28 15:43:57','1','2022-05-28 15:43:57',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(22,115,2,'1','2022-07-21 22:08:30','1','2022-07-21 22:08:30',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(23,119,114,'1','2022-12-30 11:32:04','1','2022-12-30 11:32:04',0,125); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(24,120,115,'1','2022-12-30 11:33:42','1','2022-12-30 11:33:42',0,126); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(25,121,116,'1','2022-12-30 11:33:49','1','2022-12-30 11:33:49',0,127); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(26,122,118,'1','2022-12-30 11:47:53','1','2022-12-30 11:47:53',0,129); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(27,112,101,'1','2023-02-09 23:18:51','1','2023-02-09 23:18:51',0,1); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(28,123,136,'1','2023-03-05 21:23:35','1','2023-03-05 21:23:35',0,147); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(29,124,137,'1','2023-03-05 21:42:27','1','2023-03-05 21:42:27',0,148); -INSERT INTO "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"("ID","USER_ID","ROLE_ID","CREATOR","CREATE_TIME","UPDATER","UPDATE_TIME","DELETED","TENANT_ID") VALUES(30,125,138,'1','2023-03-05 21:59:03','1','2023-03-05 21:59:03',0,149); - -SET IDENTITY_INSERT "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE" OFF; -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_POST" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_USERS" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_POST" ADD CONSTRAINT PRIMARY KEY("ID") ; - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE" ADD CONSTRAINT PRIMARY KEY("ID") ; - -CREATE INDEX "IDX_MOBILE" -ON "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"("MOBILE"); - -ALTER TABLE "RUOYI_VUE_PRO"."SYSTEM_USERS" ADD CONSTRAINT "IDX_USERNAME" UNIQUE("USERNAME","UPDATE_TIME","TENANT_ID") ; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE" IS '站内信消息表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."ID" IS '用户ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."USER_ID" IS '用户id'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_ID" IS '模版编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_CODE" IS '模板编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_NICKNAME" IS '模版发送人名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_CONTENT" IS '模版内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_TYPE" IS '模版类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TEMPLATE_PARAMS" IS '模版参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."READ_STATUS" IS '是否已读'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."READ_TIME" IS '阅读时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_MESSAGE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE" IS '站内信模板表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."ID" IS '主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."NAME" IS '模板名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."CODE" IS '模版编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."NICKNAME" IS '发送人名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."CONTENT" IS '模版内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."TYPE" IS '类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."PARAMS" IS '参数数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."STATUS" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_NOTIFY_TEMPLATE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN" IS 'OAuth2 访问令牌'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."ACCESS_TOKEN" IS '访问令牌'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."REFRESH_TOKEN" IS '刷新令牌'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."CLIENT_ID" IS '客户端编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."SCOPES" IS '授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."EXPIRES_TIME" IS '过期时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_ACCESS_TOKEN"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE" IS 'OAuth2 批准表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."CLIENT_ID" IS '客户端编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."SCOPE" IS '授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."APPROVED" IS '是否接受'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."EXPIRES_TIME" IS '过期时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_APPROVE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT" IS 'OAuth2 客户端表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."CLIENT_ID" IS '客户端编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."SECRET" IS '客户端密钥'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."NAME" IS '应用名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."LOGO" IS '应用图标'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."DESCRIPTION" IS '应用描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."STATUS" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."ACCESS_TOKEN_VALIDITY_SECONDS" IS '访问令牌的有效期'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."REFRESH_TOKEN_VALIDITY_SECONDS" IS '刷新令牌的有效期'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."REDIRECT_URIS" IS '可重定向的 URI 地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."AUTHORIZED_GRANT_TYPES" IS '授权类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."SCOPES" IS '授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."AUTO_APPROVE_SCOPES" IS '自动通过的授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."AUTHORITIES" IS '权限'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."RESOURCE_IDS" IS '资源'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."ADDITIONAL_INFORMATION" IS '附加信息'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CLIENT"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE" IS 'OAuth2 授权码表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."CODE" IS '授权码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."CLIENT_ID" IS '客户端编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."SCOPES" IS '授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."EXPIRES_TIME" IS '过期时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."REDIRECT_URI" IS '可重定向的 URI 地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."STATE" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_CODE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN" IS 'OAuth2 刷新令牌'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."REFRESH_TOKEN" IS '刷新令牌'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."CLIENT_ID" IS '客户端编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."SCOPES" IS '授权范围'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."EXPIRES_TIME" IS '过期时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OAUTH2_REFRESH_TOKEN"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG" IS '操作日志记录'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."ID" IS '日志主键'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."TRACE_ID" IS '链路追踪编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."MODULE" IS '模块标题'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."NAME" IS '操作名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."TYPE" IS '操作分类'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."CONTENT" IS '操作内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."EXTS" IS '拓展字段'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."REQUEST_METHOD" IS '请求方法名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."REQUEST_URL" IS '请求地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."USER_IP" IS '用户 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."USER_AGENT" IS '浏览器 UA'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."JAVA_METHOD" IS 'Java 方法名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."JAVA_METHOD_ARGS" IS 'Java 方法的参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."START_TIME" IS '操作时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."DURATION" IS '执行时长'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."RESULT_CODE" IS '结果码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."RESULT_MSG" IS '结果提示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."RESULT_DATA" IS '结果数据'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_OPERATE_LOG"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_POST" IS '岗位信息表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."ID" IS '岗位ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."CODE" IS '岗位编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."NAME" IS '岗位名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."SORT" IS '显示顺序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."STATUS" IS '状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_POST"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE" IS '角色信息表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."ID" IS '角色ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."NAME" IS '角色名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."CODE" IS '角色权限字符串'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."SORT" IS '显示顺序'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."DATA_SCOPE" IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."DATA_SCOPE_DEPT_IDS" IS '数据范围(指定部门数组)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."STATUS" IS '角色状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."TYPE" IS '角色类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU" IS '角色和菜单关联表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."ID" IS '自增编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."ROLE_ID" IS '角色ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."MENU_ID" IS '菜单ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_ROLE_MENU"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD" IS '敏感词'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."NAME" IS '敏感词'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."DESCRIPTION" IS '描述'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."TAGS" IS '标签数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."STATUS" IS '状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SENSITIVE_WORD"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL" IS '短信渠道'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."SIGNATURE" IS '短信签名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."CODE" IS '渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."API_KEY" IS '短信 API 的账号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."API_SECRET" IS '短信 API 的秘钥'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."CALLBACK_URL" IS '短信发送回调 URL'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CHANNEL"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE" IS '手机验证码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."MOBILE" IS '手机号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."CODE" IS '验证码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."CREATE_IP" IS '创建 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."SCENE" IS '发送场景'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."TODAY_INDEX" IS '今日发送的第几条'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."USED" IS '是否使用'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."USED_TIME" IS '使用时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."USED_IP" IS '使用 IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_CODE"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG" IS '短信日志'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."CHANNEL_ID" IS '短信渠道编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."CHANNEL_CODE" IS '短信渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."TEMPLATE_ID" IS '模板编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."TEMPLATE_CODE" IS '模板编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."TEMPLATE_TYPE" IS '短信类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."TEMPLATE_CONTENT" IS '短信内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."TEMPLATE_PARAMS" IS '短信参数'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_TEMPLATE_ID" IS '短信 API 的模板编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."MOBILE" IS '手机号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."SEND_STATUS" IS '发送状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."SEND_TIME" IS '发送时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."SEND_CODE" IS '发送结果的编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."SEND_MSG" IS '发送结果的提示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_SEND_CODE" IS '短信 API 发送结果的编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_SEND_MSG" IS '短信 API 发送失败的提示'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_REQUEST_ID" IS '短信 API 发送返回的唯一请求 ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_SERIAL_NO" IS '短信 API 发送返回的序号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."RECEIVE_STATUS" IS '接收状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."RECEIVE_TIME" IS '接收时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_RECEIVE_CODE" IS 'API 接收结果的编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."API_RECEIVE_MSG" IS 'API 接收结果的说明'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_LOG"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE" IS '短信模板'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."ID" IS '编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."TYPE" IS '短信签名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."STATUS" IS '开启状态'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CODE" IS '模板编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."NAME" IS '模板名称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CONTENT" IS '模板内容'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."PARAMS" IS '参数数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."API_TEMPLATE_ID" IS '短信 API 的模板编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CHANNEL_ID" IS '短信渠道编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CHANNEL_CODE" IS '短信渠道编码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SMS_TEMPLATE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER" IS '社交用户表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."ID" IS '主键(自增策略)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."TYPE" IS '社交平台的类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."OPENID" IS '社交 openid'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."TOKEN" IS '社交 token'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."RAW_TOKEN_INFO" IS '原始 Token 数据,一般是 JSON 格式'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."NICKNAME" IS '用户昵称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."AVATAR" IS '用户头像'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."RAW_USER_INFO" IS '原始用户数据,一般是 JSON 格式'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."CODE" IS '最后一次的认证 code'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."STATE" IS '最后一次的认证 state'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND" IS '社交绑定表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."ID" IS '主键(自增策略)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."USER_ID" IS '用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."USER_TYPE" IS '用户类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."SOCIAL_TYPE" IS '社交平台的类型'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."SOCIAL_USER_ID" IS '社交用户的编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_SOCIAL_USER_BIND"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT" IS '租户表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."ID" IS '租户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."NAME" IS '租户名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."CONTACT_USER_ID" IS '联系人的用户编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."CONTACT_NAME" IS '联系人'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."CONTACT_MOBILE" IS '联系手机'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."STATUS" IS '租户状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."WEBSITE" IS '绑定域名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."PACKAGE_ID" IS '租户套餐编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."EXPIRE_TIME" IS '过期时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."ACCOUNT_COUNT" IS '账号数量'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE" IS '租户套餐表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."ID" IS '套餐编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."NAME" IS '套餐名'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."STATUS" IS '租户状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."MENU_IDS" IS '关联的菜单编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_TENANT_PACKAGE"."DELETED" IS '是否删除'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_USERS" IS '用户信息表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."ID" IS '用户ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."USERNAME" IS '用户账号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."PASSWORD" IS '密码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."NICKNAME" IS '用户昵称'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."REMARK" IS '备注'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."DEPT_ID" IS '部门ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."POST_IDS" IS '岗位编号数组'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."EMAIL" IS '用户邮箱'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."MOBILE" IS '手机号码'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."SEX" IS '用户性别'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."AVATAR" IS '头像地址'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."STATUS" IS '帐号状态(0正常 1停用)'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."LOGIN_IP" IS '最后登录IP'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."LOGIN_DATE" IS '最后登录时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USERS"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_POST" IS '用户岗位表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."ID" IS 'id'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."USER_ID" IS '用户ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."POST_ID" IS '岗位ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."DELETED" IS '是否删除'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_POST"."TENANT_ID" IS '租户编号'; - -COMMENT ON TABLE "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE" IS '用户和角色关联表'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."ID" IS '自增编号'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."USER_ID" IS '用户ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."ROLE_ID" IS '角色ID'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."CREATOR" IS '创建者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."CREATE_TIME" IS '创建时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."UPDATER" IS '更新者'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."UPDATE_TIME" IS '更新时间'; - -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."DELETED" IS '是否删除'; -COMMENT ON COLUMN "RUOYI_VUE_PRO"."SYSTEM_USER_ROLE"."TENANT_ID" IS '租户编号'; +COMMENT ON COLUMN yudao_demo03_student.id IS ''; +COMMENT ON COLUMN yudao_demo03_student.name IS ''; +COMMENT ON COLUMN yudao_demo03_student.sex IS 'Ա'; +COMMENT ON COLUMN yudao_demo03_student.birthday IS ''; +COMMENT ON COLUMN yudao_demo03_student.description IS ''; +COMMENT ON COLUMN yudao_demo03_student.creator IS ''; +COMMENT ON COLUMN yudao_demo03_student.create_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_student.updater IS ''; +COMMENT ON COLUMN yudao_demo03_student.update_time IS 'ʱ'; +COMMENT ON COLUMN yudao_demo03_student.deleted IS 'Ƿɾ'; +COMMENT ON COLUMN yudao_demo03_student.tenant_id IS '⻧'; +COMMENT ON TABLE yudao_demo03_student IS 'ѧ'; + +-- ---------------------------- +-- Records of yudao_demo03_student +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT yudao_demo03_student ON; +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'С', 1, '2023-11-16 00:00:00', '

', '1', '2023-11-16 23:21:49', '1', '2023-11-17 16:49:06', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '', 2, '2023-11-13 00:00:00', '

ڽ?

', '1', '2023-11-16 23:22:46', '1', '2023-11-17 16:49:07', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 'С', 1, '2023-11-07 00:00:00', '

', '1', '2023-11-17 00:04:47', '1', '2023-11-17 16:49:08', '0', 1); +COMMIT; +SET IDENTITY_INSERT yudao_demo03_student OFF; +-- @formatter:on diff --git a/sql/tools/README.md b/sql/tools/README.md index 887cc87a14..7ee9aa312b 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -42,7 +42,24 @@ docker compose exec sqlserver bash /tmp/create_schema.sh ### 1.5 DM 达梦 -TODO 暂未支持 +下载达梦docker镜像 https://download.dameng.com/eco/dm8/dm8_20230808_rev197096_x86_rh6_64_single.tar + +加载镜像文件,在镜像tar文件所在目录运行: + +```Bash +docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar +```` +在项目`sql/tools`目录下运行: + +```Bash +docker compose up -d dm8 +# 注意:启动完 sqlserver 后,需要手动再执行如下命令,因为 SQL Server 不支持初始化脚本 +docker compose exec -i dm8 /bin/bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" +``` + +**注意**: `sql/dm/ruoyi-vue-pro-dm8.sql`文件编码必须为`GBK`或者`GBK`超集 + +暂不支持 MacBook Apple Silicon,因为 达梦 官方没有提供 Apple Silicon 版本的 Docker 镜像。 ## 2. MySQL 转换其它数据库 diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index 9f9cd955c2..f46889eedc 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -571,7 +571,7 @@ GO return "\n".join(f"{script}\nGO" for script in self.index(ddl)) def gen_insert(self, table_name: str) -> str: - """生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence""" + """生成 insert 语句""" # 收集 `table_name` 对应的 insert 语句 inserts = [] @@ -606,13 +606,117 @@ GO return script +class DM8Convertor(Convertor): + def __init__(self, src): + super().__init__(src, "DM8") + + def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]): + """类型转换""" + type = type.lower() + + if type == "varchar": + return f"varchar({size})" + if type == "int": + return "int" + if type == "bigint" or type == "bigint unsigned": + return "bigint" + if type == "datetime": + return "datetime" + if type == "bit": + return "bit" + if type in ("tinyint", "smallint"): + return "smallint" + if type == "text": + return "text" + if type == "blob": + return "blob" + if type == "mediumblob": + return "varchar(10240)" + if type == "decimal": + return ( + f"decimal({','.join(str(s) for s in size)})" if len(size) else "decimal" + ) + + def gen_create(self, ddl) -> str: + """生成 CREATE 语句""" + + def generate_column(col): + name = col["name"].lower() + if name == "id": + return "id bigint NOT NULL PRIMARY KEY IDENTITY" + + type = col["type"].lower() + full_type = self.translate_type(type, col["size"]) + nullable = "NULL" if col["nullable"] else "NOT NULL" + default = f"DEFAULT {col['default']}" if col["default"] is not None else "" + return f"{name} {full_type} {default} {nullable}" + + table_name = ddl["table_name"].lower() + columns = [f"{generate_column(col).strip()}" for col in ddl["columns"]] + field_def_list = ",\n ".join(columns) + script = f"""-- ---------------------------- +-- Table structure for {table_name} +-- ---------------------------- +CREATE TABLE {table_name} ( + {field_def_list} +);""" + + # oracle INSERT '' 不能通过 NOT NULL 校验 + script = script.replace("DEFAULT '' NOT NULL", "DEFAULT '' NULL") + + return script + + def gen_index(self, ddl: Dict) -> str: + return "\n".join(f"{script};" for script in self.index(ddl)) + + def gen_comment(self, table_sql: str, table_name: str) -> str: + script = "" + for field, comment_string in self.filed_comments(table_sql): + script += ( + f"COMMENT ON COLUMN {table_name}.{field} IS '{comment_string}';" + "\n" + ) + + table_comment = self.table_comment(table_sql) + if table_comment: + script += f"COMMENT ON TABLE {table_name} IS '{table_comment}';\n" + + return script + + def gen_pk(self, table_name: str) -> str: + """生成主键定义""" + return "" + + def gen_index(self, ddl: Dict) -> str: + return "\n".join(f"{script};" for script in self.index(ddl)) + + def gen_insert(self, table_name: str) -> str: + """拷贝 INSERT 语句""" + inserts = list(Convertor.inserts(table_name, self.content)) + + ## 生成 insert 脚本 + script = "" + if inserts: + inserts_lines = "\n".join(inserts) + script += f"""\n\n-- ---------------------------- +-- Records of {table_name.lower()} +-- ---------------------------- +-- @formatter:off +SET IDENTITY_INSERT {table_name.lower()} ON; +{inserts_lines} +COMMIT; +SET IDENTITY_INSERT {table_name.lower()} OFF; +-- @formatter:on""" + + return script + + def main(): parser = argparse.ArgumentParser(description="芋道系统数据库转换工具") parser.add_argument( "type", type=str, help="目标数据库类型", - choices=["postgres", "oracle", "sqlserver"], + choices=["postgres", "oracle", "sqlserver", "dm8"], ) args = parser.parse_args() @@ -624,6 +728,8 @@ def main(): convertor = OracleConvertor(sql_file) elif args.type == "sqlserver": convertor = SQLServerConvertor(sql_file) + elif args.type == "dm8": + convertor = DM8Convertor(sql_file) else: raise NotImplementedError(f"不支持目标数据库类型: {args.type}") diff --git a/sql/tools/docker-compose.yaml b/sql/tools/docker-compose.yaml index 0ac421c391..6da62aa1ce 100644 --- a/sql/tools/docker-compose.yaml +++ b/sql/tools/docker-compose.yaml @@ -4,6 +4,7 @@ volumes: mysql: { } postgres: { } sqlserver: { } + dm8: { } services: mysql: @@ -69,3 +70,25 @@ services: - ../sqlserver/ruoyi-vue-pro.sql:/tmp/schema.sql:ro # docker compose exec sqlserver bash /tmp/create_schema.sh - ./sqlserver/create_schema.sh:/tmp/create_schema.sh:ro + + + dm8: + # wget https://download.dameng.com/eco/dm8/dm8_20230808_rev197096_x86_rh6_64_single.tar + # docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar + image: dm8_single:dm8_20230808_rev197096_x86_rh6_64 + restart: unless-stopped + environment: + PAGE_SIZE: 16 + LD_LIBRARY_PATH: /opt/dmdbms/bin + EXTENT_SIZE: 32 + BLANK_PAD_MODE: 1 + LOG_SIZE: 1024 + UNICODE_FLAG: 1 + LENGTH_IN_CHAR: 1 + INSTANCE_NAME: dm8_test + ports: + - "5236:5236" + volumes: + - dm8:/opt/dmdbms/data + - ../dm/ruoyi-vue-pro-dm8.sql:/tmp/schema.sql:ro + # docker compose exec -i dm8 /bin/bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index f71a1fd33a..7ab4207130 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -50,14 +50,14 @@ spring: # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@//127.0.0.1:1521/XEPDB1 # Oracle 连接的示例 - url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 -# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 +# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 + url: jdbc:dm://localhost:5236 # DM 连接的示例 # username: root # password: 123456 - username: sa # SQLServer 连接的示例 - password: Yudao@2024 # SQLServer 连接的示例 -# username: SYSDBA # DM 连接的示例 -# password: SYSDBA # DM 连接的示例 +# username: sa # SQLServer 连接的示例 +# password: Yudao@2024 # SQLServer 连接的示例 + username: SYSDBA # DM 连接的示例 + password: SYSDBA001 # DM 连接的示例 slave: # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 -- Gitee From 65651fb1ede4731a15cc496e2ec7deb37647fae0 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sat, 4 May 2024 00:05:42 +0800 Subject: [PATCH 0453/1557] =?UTF-8?q?feat:=20=E5=88=9B=E5=BB=BA=E8=99=9A?= =?UTF-8?q?=E6=8B=9Fdual=E8=A1=A8=EF=BC=8C=E8=BE=BE=E6=A2=A6=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 13 ++++++++-- sql/sqlserver/ruoyi-vue-pro.sql | 21 +++++++++++++++- sql/tools/README.md | 3 ++- sql/tools/convertor.py | 41 ++++++++++++++++++++++++++++++++ sql/tools/docker-compose.yaml | 2 +- 5 files changed, 75 insertions(+), 5 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index e468024552..980cd790a9 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -5,10 +5,19 @@ Target Server Type : PostgreSQL - Date: 2024-05-01 23:25:45 + Date: 2024-05-03 23:36:19 */ +-- ---------------------------- +-- Table structure for dual +-- ---------------------------- +DROP TABLE IF EXISTS dual; +CREATE TABLE dual +( +); + + -- ---------------------------- -- Table structure for infra_api_access_log -- ---------------------------- @@ -3866,7 +3875,6 @@ COMMENT ON COLUMN system_sms_code.updater IS '更新者'; COMMENT ON COLUMN system_sms_code.update_time IS '更新时间'; COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; -COMMENT ON COLUMN system_sms_code.idx_mobile IS '手机号'; COMMENT ON TABLE system_sms_code IS '手机验证码'; DROP SEQUENCE IF EXISTS system_sms_code_seq; @@ -4703,3 +4711,4 @@ COMMIT; DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; CREATE SEQUENCE yudao_demo03_student_seq START 10; + diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index 7e8b29df15..26e674498d 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -5,10 +5,29 @@ Target Server Type : Microsoft SQL Server - Date: 2024-05-02 15:29:31 + Date: 2024-05-03 23:36:38 */ +-- ---------------------------- +-- Table structure for dual +-- ---------------------------- +DROP TABLE IF EXISTS dual +GO + +CREATE TABLE dual +( + id int NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'数据库连接的表', + 'SCHEMA', N'dbo', + 'TABLE', N'dual' +GO + + -- ---------------------------- -- Table structure for infra_api_access_log -- ---------------------------- diff --git a/sql/tools/README.md b/sql/tools/README.md index 7ee9aa312b..ecbb0ddc72 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -54,7 +54,8 @@ docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar ```Bash docker compose up -d dm8 # 注意:启动完 sqlserver 后,需要手动再执行如下命令,因为 SQL Server 不支持初始化脚本 -docker compose exec -i dm8 /bin/bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" +docker compose exec dm8 bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" +exit ``` **注意**: `sql/dm/ruoyi-vue-pro-dm8.sql`文件编码必须为`GBK`或者`GBK`超集 diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index f46889eedc..fe12caed11 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -134,6 +134,14 @@ class Convertor(ABC): """ pass + def gen_dual(self) -> str: + """生成虚拟 dual 表 + + Returns: + str: 生成脚本, 默认返回空脚本, 表示当前数据库无需手工创建 + """ + return "" + @staticmethod def inserts(table_name: str, script_content: str) -> Generator: PREFIX = f"INSERT INTO `{table_name}`" @@ -192,6 +200,17 @@ class Convertor(ABC): ) ) + dual = self.gen_dual() + if dual: + print( + f"""-- ---------------------------- +-- Table structure for dual +-- ---------------------------- +{dual} + +""" + ) + error_scripts = [] for table_sql in self.table_script_list: ddl = DDLParser(table_sql.replace("`", "")).run() @@ -348,6 +367,12 @@ CREATE SEQUENCE {table_name}_seq return script + def gen_dual(self) -> str: + return """DROP TABLE IF EXISTS dual; +CREATE TABLE dual +( +);""" + class OracleConvertor(Convertor): def __init__(self, src): @@ -605,6 +630,22 @@ GO return script + def gen_dual(self) -> str: + return """DROP TABLE IF EXISTS dual +GO + +CREATE TABLE dual +( + id int NULL +) +GO + +EXEC sp_addextendedproperty + 'MS_Description', N'数据库连接的表', + 'SCHEMA', N'dbo', + 'TABLE', N'dual' +GO""" + class DM8Convertor(Convertor): def __init__(self, src): diff --git a/sql/tools/docker-compose.yaml b/sql/tools/docker-compose.yaml index 6da62aa1ce..6be209e058 100644 --- a/sql/tools/docker-compose.yaml +++ b/sql/tools/docker-compose.yaml @@ -91,4 +91,4 @@ services: volumes: - dm8:/opt/dmdbms/data - ../dm/ruoyi-vue-pro-dm8.sql:/tmp/schema.sql:ro - # docker compose exec -i dm8 /bin/bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" + # docker compose exec dm8 bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" -- Gitee From c24fb2031128373a390bd4a65045a6bbf10a7ed1 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sat, 4 May 2024 00:20:23 +0800 Subject: [PATCH 0454/1557] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93docker=E5=AE=B9=E5=99=A8=E7=9A=84=E9=94=80?= =?UTF-8?q?=E6=AF=81=E9=87=8D=E5=BB=BA=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tools/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sql/tools/README.md b/sql/tools/README.md index ecbb0ddc72..5a8bbe91c0 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -62,7 +62,16 @@ exit 暂不支持 MacBook Apple Silicon,因为 达梦 官方没有提供 Apple Silicon 版本的 Docker 镜像。 -## 2. MySQL 转换其它数据库 +## 2. 测试数据库docker容器的销毁重建 + +开发测试过程中,有时候需要创建全新干净的数据库。由于测试数据docker容器采用数据卷(volume)挂载数据库实例的数据目录,因此销毁数据需要停止容器后,删除数据卷,然后再重新创建容器。以postgres为例,操作如下: + +```Bash +docker compose down postgres +docker volume rm ruoyi-vue-pro_postgres +``` + +## 3. MySQL 转换其它数据库 实现原理:通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server 等数据库的脚本。 -- Gitee From 3eaa6287a0466c3dd91ab0acd8d81dae97e407b1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 May 2024 09:19:32 +0800 Subject: [PATCH 0455/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A=E5=AE=8C=E5=96=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BD=AC=E5=8C=96=E7=9A=84=20README.md=EF=BC=8C?= =?UTF-8?q?=E6=B8=85=E7=90=86=20quartz=20=E8=84=9A=E6=9C=AC=E9=87=8C?= =?UTF-8?q?=E7=9A=84=E6=97=A0=E7=94=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/oracle/quartz.sql | 6 ------ sql/postgresql/quartz.sql | 39 --------------------------------------- sql/sqlserver/quartz.sql | 14 -------------- sql/tools/README.md | 21 ++++++++++++--------- 4 files changed, 12 insertions(+), 68 deletions(-) diff --git a/sql/oracle/quartz.sql b/sql/oracle/quartz.sql index fd01dcbfb2..c3ed17521f 100644 --- a/sql/oracle/quartz.sql +++ b/sql/oracle/quartz.sql @@ -103,7 +103,6 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of QRTZ_CRON_TRIGGERS -- ---------------------------- -INSERT INTO "QRTZ_CRON_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "CRON_EXPRESSION", "TIME_ZONE_ID") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', '0 * * * * ? *', 'Asia/Shanghai'); COMMIT; COMMIT; @@ -187,7 +186,6 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of QRTZ_JOB_DETAILS -- ---------------------------- -INSERT INTO "QRTZ_JOB_DETAILS" ("SCHED_NAME", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "JOB_CLASS_NAME", "IS_DURABLE", "IS_NONCONCURRENT", "IS_UPDATE_DATA", "REQUESTS_RECOVERY", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000007400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800')); COMMIT; COMMIT; @@ -220,8 +218,6 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of QRTZ_LOCKS -- ---------------------------- -INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'STATE_ACCESS'); -INSERT INTO "QRTZ_LOCKS" ("SCHED_NAME", "LOCK_NAME") VALUES ('schedulerName', 'TRIGGER_ACCESS'); COMMIT; COMMIT; @@ -288,7 +284,6 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of QRTZ_SCHEDULER_STATE -- ---------------------------- -INSERT INTO "QRTZ_SCHEDULER_STATE" ("SCHED_NAME", "INSTANCE_NAME", "LAST_CHECKIN_TIME", "CHECKIN_INTERVAL") VALUES ('schedulerName', 'Yunai.local1651409076356', '1651409097967', '15000'); COMMIT; COMMIT; @@ -415,7 +410,6 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of QRTZ_TRIGGERS -- ---------------------------- -INSERT INTO "QRTZ_TRIGGERS" ("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP", "JOB_NAME", "JOB_GROUP", "DESCRIPTION", "NEXT_FIRE_TIME", "PREV_FIRE_TIME", "PRIORITY", "TRIGGER_STATE", "TRIGGER_TYPE", "START_TIME", "END_TIME", "CALENDAR_NAME", "MISFIRE_INSTR", "JOB_DATA") VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', 'userSessionTimeoutJob', 'DEFAULT', NULL, '1651409160000', '1651409100000', '5', 'WAITING', 'CRON', '1651409043000', '0', NULL, '0', HEXTORAW('ACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000007D074000F4A4F425F52455452595F434F554E547371007E0009000000037800')); COMMIT; COMMIT; diff --git a/sql/postgresql/quartz.sql b/sql/postgresql/quartz.sql index d0b8eab21d..4ec390c527 100644 --- a/sql/postgresql/quartz.sql +++ b/sql/postgresql/quartz.sql @@ -39,18 +39,6 @@ CREATE TABLE qrtz_cron_triggers -- @formatter:off BEGIN; -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'demoJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO qrtz_cron_triggers (sched_name, trigger_name, trigger_group, cron_expression, time_zone_id) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); COMMIT; -- @formatter:on @@ -105,18 +93,6 @@ CREATE INDEX idx_qrtz_j_grp ON qrtz_job_details (sched_name, job_group); -- @formatter:off BEGIN; -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\031t\\000\\020JOB_HANDLER_NAMEt\\000\\021accessLogCleanJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\030t\\000\\020JOB_HANDLER_NAMEt\\000\\032brokerageRecordUnfreezeJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'demoJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\024t\\000\\020JOB_HANDLER_NAMEt\\000\\007demoJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\032t\\000\\020JOB_HANDLER_NAMEt\\000\\020errorLogCleanJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\033t\\000\\020JOB_HANDLER_NAMEt\\000\\016jobLogCleanJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\005t\\000\\020JOB_HANDLER_NAMEt\\000\\014payNotifyJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\022t\\000\\020JOB_HANDLER_NAMEt\\000\\021payOrderExpireJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\021t\\000\\020JOB_HANDLER_NAMEt\\000\\017payOrderSyncJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\023t\\000\\020JOB_HANDLER_NAMEt\\000\\020payRefundSyncJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\025t\\000\\020JOB_HANDLER_NAMEt\\000\\027tradeOrderAutoCancelJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\027t\\000\\020JOB_HANDLER_NAMEt\\000\\030tradeOrderAutoCommentJobx\\000'); -INSERT INTO "qrtz_job_details" ("sched_name", "job_name", "job_group", "description", "job_class_name", "is_durable", "is_nonconcurrent", "is_update_data", "requests_recovery", "job_data") VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\002t\\000\\006JOB_IDsr\\000\\016java.lang.Long;\\213\\344\\220\\314\\217#\\337\\002\\000\\001J\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000\\000\\000\\000\\026t\\000\\020JOB_HANDLER_NAMEt\\000\\030tradeOrderAutoReceiveJobx\\000'); COMMIT; -- @formatter:on @@ -132,8 +108,6 @@ CREATE TABLE qrtz_locks -- @formatter:off BEGIN; -INSERT INTO qrtz_locks (sched_name, lock_name) VALUES ('schedulerName', 'STATE_ACCESS'); -INSERT INTO qrtz_locks (sched_name, lock_name) VALUES ('schedulerName', 'TRIGGER_ACCESS'); COMMIT; -- @formatter:on @@ -161,7 +135,6 @@ CREATE TABLE qrtz_scheduler_state -- @formatter:off BEGIN; -INSERT INTO qrtz_scheduler_state (sched_name, instance_name, last_checkin_time, checkin_interval) VALUES ('schedulerName', 'MacBook-Pro.local1701948801197', 1701948848400, 15000); COMMIT; -- @formatter:on @@ -241,18 +214,6 @@ CREATE INDEX idx_qrtz_t_nft_st_misfire_grp ON qrtz_triggers (sched_name, misfire -- @formatter:off BEGIN; -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', 'accessLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696301981000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 1695909720000, -1, 5, 'PAUSED', 'CRON', 1695909706000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'demoJob', 'DEFAULT', 'demoJob', 'DEFAULT', NULL, 1701964800000, 1701948834291, 5, 'PAUSED', 'CRON', 1694844083000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\012t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\001x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', 'errorLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302043000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', 'jobLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302092000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMpt\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTq\\000~\\000\\013x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMpt\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTq\\000~\\000\\013x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMpt\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTq\\000~\\000\\013x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', 'payRefundSyncJob', 'DEFAULT', NULL, 1690117560000, 1690117500000, 5, 'PAUSED', 'CRON', 1690117424000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMpt\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTq\\000~\\000\\013x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 1695727440000, 1695727380000, 5, 'PAUSED', 'CRON', 1695656605000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 1695783840000, 1695783780000, 5, 'PAUSED', 'CRON', 1695742709000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); -INSERT INTO qrtz_triggers (sched_name, trigger_name, trigger_group, job_name, job_group, description, next_fire_time, prev_fire_time, priority, trigger_state, trigger_type, start_time, end_time, calendar_name, misfire_instr, job_data) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 1695742740000, 1695742680000, 5, 'PAUSED', 'CRON', 1695727433000, 0, NULL, 0, E'\\254\\355\\000\\005sr\\000\\025org.quartz.JobDataMap\\237\\260\\203\\350\\277\\251\\260\\313\\002\\000\\000xr\\000&org.quartz.utils.StringKeyDirtyFlagMap\\202\\010\\350\\303\\373\\305](\\002\\000\\001Z\\000\\023allowsTransientDataxr\\000\\035org.quartz.utils.DirtyFlagMap\\023\\346.\\255(v\\012\\316\\002\\000\\002Z\\000\\005dirtyL\\000\\003mapt\\000\\017Ljava/util/Map;xp\\001sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\003t\\000\\021JOB_HANDLER_PARAMt\\000\\000t\\000\\022JOB_RETRY_INTERVALsr\\000\\021java.lang.Integer\\022\\342\\240\\244\\367\\201\\2078\\002\\000\\001I\\000\\005valuexr\\000\\020java.lang.Number\\206\\254\\225\\035\\013\\224\\340\\213\\002\\000\\000xp\\000\\000\\000\\000t\\000\\017JOB_RETRY_COUNTsq\\000~\\000\\012\\000\\000\\000\\003x\\000'); COMMIT; -- @formatter:on diff --git a/sql/sqlserver/quartz.sql b/sql/sqlserver/quartz.sql index e78044364c..7fd2417603 100644 --- a/sql/sqlserver/quartz.sql +++ b/sql/sqlserver/quartz.sql @@ -87,7 +87,6 @@ ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] SET (LOCK_ESCALATION = TABLE) BEGIN TRANSACTION GO -INSERT INTO [dbo].[QRTZ_CRON_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [CRON_EXPRESSION], [TIME_ZONE_ID]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'0 * * * * ? *', N'Asia/Shanghai') GO COMMIT @@ -163,7 +162,6 @@ ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] SET (LOCK_ESCALATION = TABLE) BEGIN TRANSACTION GO -INSERT INTO [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [JOB_CLASS_NAME], [IS_DURABLE], [IS_NONCONCURRENT], [IS_UPDATE_DATA], [REQUESTS_RECOVERY], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', N'0', N'1', N'1', N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000107400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800) GO COMMIT @@ -193,12 +191,6 @@ ALTER TABLE [dbo].[QRTZ_LOCKS] SET (LOCK_ESCALATION = TABLE) BEGIN TRANSACTION GO -INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'STATE_ACCESS') -GO - -INSERT INTO [dbo].[QRTZ_LOCKS] ([SCHED_NAME], [LOCK_NAME]) VALUES (N'schedulerName', N'TRIGGER_ACCESS') -GO - COMMIT GO @@ -255,9 +247,6 @@ ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] SET (LOCK_ESCALATION = TABLE) BEGIN TRANSACTION GO -INSERT INTO [dbo].[QRTZ_SCHEDULER_STATE] ([SCHED_NAME], [INSTANCE_NAME], [LAST_CHECKIN_TIME], [CHECKIN_INTERVAL]) VALUES (N'schedulerName', N'Yunai1651483828928', N'1651484588813', N'15000') -GO - COMMIT GO @@ -369,9 +358,6 @@ ALTER TABLE [dbo].[QRTZ_TRIGGERS] SET (LOCK_ESCALATION = TABLE) BEGIN TRANSACTION GO -INSERT INTO [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP], [JOB_NAME], [JOB_GROUP], [DESCRIPTION], [NEXT_FIRE_TIME], [PREV_FIRE_TIME], [PRIORITY], [TRIGGER_STATE], [TRIGGER_TYPE], [START_TIME], [END_TIME], [CALENDAR_NAME], [MISFIRE_INSTR], [JOB_DATA]) VALUES (N'schedulerName', N'userSessionTimeoutJob', N'DEFAULT', N'userSessionTimeoutJob', N'DEFAULT', NULL, N'1651484640000', N'1651484580000', N'5', N'WAITING', N'CRON', N'1651483728000', N'0', NULL, N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000374000F4A4F425F52455452595F434F554E547371007E0009000007D07800) -GO - COMMIT GO diff --git a/sql/tools/README.md b/sql/tools/README.md index 45497fb8bf..852ebaf736 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -42,36 +42,39 @@ docker compose exec sqlserver bash /tmp/create_schema.sh ### 1.5 DM 达梦 -下载达梦docker镜像 https://download.dameng.com/eco/dm8/dm8_20230808_rev197096_x86_rh6_64_single.tar +① 下载达梦 Docker 镜像:https://download.dameng.com/eco/dm8/dm8_20230808_rev197096_x86_rh6_64_single.tar -加载镜像文件,在镜像tar文件所在目录运行: +② 加载镜像文件,在镜像 tar 文件所在目录运行: ```Bash docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar ```` -在项目`sql/tools`目录下运行: + +③ 在项目 `sql/tools` 目录下运行: ```Bash docker compose up -d dm8 -# 注意:启动完 sqlserver 后,需要手动再执行如下命令,因为 SQL Server 不支持初始化脚本 +# 注意:启动完 dm 后,需要手动再执行如下命令,因为 dm 不支持初始化脚本 docker compose exec dm8 bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" exit ``` -**注意**: `sql/dm/ruoyi-vue-pro-dm8.sql`文件编码必须为`GBK`或者`GBK`超集 +**注意**: `sql/dm/ruoyi-vue-pro-dm8.sql` 文件编码必须为 `GBK` 或者 `GBK` 超集,否则会出现中文乱码。 暂不支持 MacBook Apple Silicon,因为 达梦 官方没有提供 Apple Silicon 版本的 Docker 镜像。 -## 2. 测试数据库docker容器的销毁重建 +## 1.X 容器的销毁重建 + +开发测试过程中,有时候需要创建全新干净的数据库。由于测试数据 Docker 容器采用数据卷 Volume 挂载数据库实例的数据目录,因此销毁数据需要停止容器后,删除数据卷,然后再重新创建容器。 -开发测试过程中,有时候需要创建全新干净的数据库。由于测试数据docker容器采用数据卷(volume)挂载数据库实例的数据目录,因此销毁数据需要停止容器后,删除数据卷,然后再重新创建容器。以postgres为例,操作如下: +以 postgres 为例,操作如下: ```Bash docker compose down postgres docker volume rm ruoyi-vue-pro_postgres ``` -## 3. MySQL 转换其它数据库 +## 2. MySQL 转换其它数据库 ### 2.1 实现原理 @@ -86,7 +89,7 @@ pip install simple-ddl-parser # pip3 install simple-ddl-parser ``` -② 执行如下命令打印生成 postgres 的脚本内容,其他可选参数有:`oracle`、`sqlserver` +② 执行如下命令打印生成 postgres 的脚本内容,其他可选参数有:`oracle`、`sqlserver`、`dm8`: ```Bash python3 convertor.py postgres -- Gitee From ebd5ba02d2dd48b9e6316d64fa91551f763a07b3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 May 2024 09:36:15 +0800 Subject: [PATCH 0456/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91C?= =?UTF-8?q?RM=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=AF=B9=20JDK8=20=E7=9A=84?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=EF=BC=8C=E4=BD=BF=E7=94=A8=20ListUt?= =?UTF-8?q?il=20=E6=9B=BF=E4=BB=A3=20List=20of?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/statistics/CrmStatisticsCustomerServiceImpl.java | 3 ++- .../crm/service/statistics/CrmStatisticsFunnelServiceImpl.java | 3 ++- .../statistics/CrmStatisticsPerformanceServiceImpl.java | 3 ++- .../service/statistics/CrmStatisticsPortraitServiceImpl.java | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index b7b9a08d17..1df4d5a60e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; @@ -354,7 +355,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe private List getUserIds(CrmStatisticsCustomerReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java index 635f577d16..f4a04ed3fa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; @@ -140,7 +141,7 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic private List getUserIds(CrmStatisticsFunnelReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index fcd7267a8b..b24728ddc7 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; @@ -161,7 +162,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform private List getUserIds(CrmStatisticsPerformanceReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java index 83cbb53e7a..913ffb08cc 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; @@ -117,7 +118,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe private List getUserIds(CrmStatisticsPortraitReqVO reqVO) { // 情况一:选中某个用户 if (ObjUtil.isNotNull(reqVO.getUserId())) { - return List.of(reqVO.getUserId()); + return ListUtil.of(reqVO.getUserId()); } // 情况二:选中某个部门 // 2.1 获得部门列表 -- Gitee From c52ec92b050f955dfba5f04e26da900a32aa0248 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 May 2024 09:38:21 +0800 Subject: [PATCH 0457/1557] =?UTF-8?q?=E3=80=90=E5=8F=91=E7=89=88=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A2.1.0=20=E5=8F=91=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f337c4a483..e770c0359e 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-snapshot + 2.1.0-snapshot 17 ${java.version} diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 7d8c900e69..0b90ada758 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -14,7 +14,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-snapshot + 2.1.0-snapshot 1.5.0 3.2.2 -- Gitee From cec5c287f902046e1228335acb7a76aa57e15261 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 May 2024 09:42:16 +0800 Subject: [PATCH 0458/1557] =?UTF-8?q?=E3=80=90=E5=90=8C=E6=AD=A5=E3=80=91J?= =?UTF-8?q?DK17=20=E5=92=8C=20JDK8=20=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/core/handler/GlobalExceptionHandler.java | 8 ++++---- .../bpm/service/task/BpmProcessInstanceServiceImpl.java | 2 +- .../admin/statistics/CrmStatisticsFunnelController.java | 4 ++-- .../statistics/vo/funnel/CrmStatisticsFunnelReqVO.java | 4 ++-- .../vo/portrait/CrmStatisticsPortraitReqVO.java | 4 ++-- .../statistics/CrmStatisticsFunnelServiceImpl.java | 2 +- .../statistics/CrmStatisticsPerformanceServiceImpl.java | 7 ++++--- .../module/infra/service/db/DatabaseTableServiceImpl.java | 2 +- .../yudao/module/infra/service/job/JobServiceImpl.java | 2 +- .../jmreport/core/service/JmReportTokenServiceImpl.java | 2 +- .../module/system/service/permission/MenuServiceImpl.java | 2 +- 11 files changed, 20 insertions(+), 19 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index d86f353bcc..a997630bb6 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -12,10 +12,6 @@ import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.ValidationException; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -31,6 +27,10 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; import org.springframework.web.servlet.NoHandlerFoundException; +import javax.servlet.http.HttpServletRequest; +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.validation.ValidationException; import java.time.LocalDateTime; import java.util.Map; import java.util.Set; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index f7bc24223b..a95e6fd7b5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -1 +1 @@ -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .processInstanceTenantId(FlowableUtils.getTenantId()) .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 if (variables == null) { variables = new HashMap<>(); } FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } \ No newline at end of file +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import javax.validation.Valid; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. * * HistoricProcessInstance & ProcessInstance 的关系: * 1. * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List getProcessInstances(Set ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List getHistoricProcessInstances(Set ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .processInstanceTenantId(FlowableUtils.getTenantId()) .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map variables, String businessKey, Map> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 if (variables == null) { variables = new HashMap<>(); } FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } \ No newline at end of file diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java index 85e0c3d4e3..17451e768c 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsFunnelController.java @@ -10,14 +10,14 @@ import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsFunnelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; +import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java index dac3406017..85ba52e170 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/funnel/CrmStatisticsFunnelReqVO.java @@ -4,11 +4,11 @@ import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java index d16415138a..eb65cb3c90 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/portrait/CrmStatisticsPortraitReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.portrait; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.time.LocalDateTime; import java.util.List; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java index f4a04ed3fa..fa12817416 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java @@ -14,9 +14,9 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Collections; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index b24728ddc7..41555422e5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -14,10 +14,11 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; - +import javax.annotation.Resource; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.function.Function; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java index 6d38822082..deb4aab3dd 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java @@ -13,9 +13,9 @@ import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import com.baomidou.mybatisplus.generator.config.rules.DateType; import com.baomidou.mybatisplus.generator.query.SQLQuery; -import jakarta.annotation.Resource; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.Comparator; import java.util.List; import java.util.Objects; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java index cfc52d29d9..abdb613482 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java @@ -11,13 +11,13 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.dal.mysql.job.JobMapper; import cn.iocoder.yudao.module.infra.enums.job.JobStatusEnum; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.quartz.SchedulerException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.util.List; import java.util.Objects; diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java index 6d3225164b..8bd4eaa291 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java @@ -13,11 +13,11 @@ import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespDTO; import cn.iocoder.yudao.module.system.api.permission.PermissionApi; import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; -import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; import org.springframework.http.HttpHeaders; +import javax.servlet.http.HttpServletRequest; import java.util.Objects; /** diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index beee296d11..e20bd70af4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -11,7 +11,6 @@ import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; import cn.iocoder.yudao.module.system.service.tenant.TenantService; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -19,6 +18,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.Collection; import java.util.List; -- Gitee From 8428cc5b9922080661626d241d1e745117ff9491 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 May 2024 09:44:20 +0800 Subject: [PATCH 0459/1557] =?UTF-8?q?=E3=80=90=E5=8F=91=E7=89=88=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A2.1.0=20=E5=8F=91=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7d6ffee520..3f19cfe42a 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-jdk8-snapshot + 2.1.0-jdk8-snapshot 1.8 ${java.version} diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 60328db597..3d8d75d713 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -14,7 +14,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 2.0.1-jdk8-snapshot + 2.1.0-jdk8-snapshot 1.5.0 2.7.18 -- Gitee From 3afd2cba0cd5e46e04a0dc9f20449f1adbaa83e0 Mon Sep 17 00:00:00 2001 From: scholar <1145227973@qq.com> Date: Sat, 4 May 2024 22:24:23 +0800 Subject: [PATCH 0460/1557] =?UTF-8?q?=E5=AE=8C=E6=88=90todo=E9=83=A8?= =?UTF-8?q?=E5=88=86=EF=BC=8C=E4=BC=98=E5=8C=96=E7=8E=AF=E6=AF=94=E5=90=8C?= =?UTF-8?q?=E6=AF=94=E6=95=B0=E6=8D=AE=E7=9A=84=E8=AE=A1=E7=AE=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceServiceImpl.java | 121 +++++++++--------- 1 file changed, 58 insertions(+), 63 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index c93951f81f..b8fa94c7aa 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -55,16 +55,15 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform } /** - * 获得员工业绩数据 - * + * 获得员工业绩数据,并通过如下方法拿到对应的lastYearCount,lastMonthCount + * 比如说,构造2024 年的CrmStatisticsPerformanceRespVO,获得 2023-01 到 2024-12的月统计数据即可 + * 可以数据 group by 年-月,2023-01 到 2024-12的,然后聚合出 CrmStatisticsPerformanceRespVO * @param performanceReqVO 参数 * @param performanceFunction 员工业绩统计方法 * @return 员工业绩数据 */ - private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, Function> performanceFunction) { - - List performanceRespVOList; + private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, + Function> performanceFunction) { // 1. 获得用户编号数组 final List userIds = getUserIds(performanceReqVO); @@ -72,75 +71,71 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform return Collections.emptyList(); } performanceReqVO.setUserIds(userIds); + // 2. 获得业绩数据 - List performance = performanceFunction.apply(performanceReqVO); + List performanceList = performanceFunction.apply(performanceReqVO); // 获取查询的年份 String currentYear = LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"); + Map currentYearMap = new TreeMap<>();//查询当年的map数据 + Map lastYearMap = new TreeMap<>();//前一年的map数据 - // 构造查询当年和前一年,每年12个月的年月组合 - List allMonths = new ArrayList<>(); - for (int year = Integer.parseInt(currentYear)-1; year <= Integer.parseInt(currentYear); year++) { - for (int month = 1; month <= 12; month++) { - allMonths.add(String.format("%d%02d", year, month)); - } - } + for (int month = 1; month <= 12; month++) { + //根据数据库的月销售数据查询结果,构造查询当年的map数据 + String currentYearKey = String.format("%d%02d", Integer.parseInt(currentYear), month); + buildYearMapData(performanceList, currentYearMap, currentYearKey); - List computedList = new ArrayList<>(); - List respVOList = new ArrayList<>(); - - // 生成computedList基础数据 - // 构造完整的2*12个月的数据,如果某月数据缺失,需要补上0,一年12个月不能有缺失 - for (String month : allMonths) { - CrmStatisticsPerformanceRespVO foundData = performance.stream() - .filter(data -> data.getTime().equals(month)) - .findFirst() - .orElse(null); - - if (foundData != null) { - computedList.add(foundData); - } else { - CrmStatisticsPerformanceRespVO missingData = new CrmStatisticsPerformanceRespVO(); - missingData.setTime(month); - missingData.setCurrentMonthCount(BigDecimal.ZERO); - missingData.setLastMonthCount(BigDecimal.ZERO); - missingData.setLastYearCount(BigDecimal.ZERO); - computedList.add(missingData); - } + //根据数据库的月销售数据查询结果,构造查询前一年的map数据 + String lastYearKey = String.format("%d%02d", Integer.parseInt(currentYear)-1, month); + buildYearMapData(performanceList, lastYearMap, lastYearKey); } - //根据查询年份和前一年的数据,计算查询年份的同比环比数据 - for (CrmStatisticsPerformanceRespVO currentData : computedList) { - String currentMonth = currentData.getTime(); - - // 根据当年和前一年的月销售数据,计算currentYear的完整数据 - if (currentMonth.startsWith(currentYear)) { - // 计算 LastMonthCount - int currentIndex = computedList.indexOf(currentData); - if (currentIndex > 0) { - CrmStatisticsPerformanceRespVO lastMonthData = computedList.get(currentIndex - 1); - currentData.setLastMonthCount(lastMonthData.getCurrentMonthCount()); - } else { - currentData.setLastMonthCount(BigDecimal.ZERO); // 第一个月的 LastMonthCount 设为0 - } - - // 计算 LastYearCount - String lastYearMonth = String.valueOf(Integer.parseInt(currentMonth) - 100); - CrmStatisticsPerformanceRespVO lastYearData = computedList.stream() - .filter(data -> data.getTime().equals(lastYearMonth)) - .findFirst() - .orElse(null); - - if (lastYearData != null) { - currentData.setLastYearCount(lastYearData.getCurrentMonthCount()); - } else { - currentData.setLastYearCount(BigDecimal.ZERO); // 如果去年同月数据不存在,设为0 - } - respVOList.add(currentData);//给前端只需要返回查询当年的数据,不需要前一年数据 + //根据构造好的map数据,计算查询当年的环比和同比数据,并构造好返回的respVOList + List respVOList = new ArrayList<>(); + for (int key : currentYearMap.keySet()) { + BigDecimal lastYearCount = lastYearMap.get(key-100).getCurrentMonthCount(); + BigDecimal lastMonthCount; + if (key % 100 > 1) {//2-12月份的前一个月数据 + lastMonthCount = currentYearMap.get(key-1).getCurrentMonthCount(); + } else {//1月份的前一个月数据 + lastMonthCount = lastYearMap.get(key-89).getCurrentMonthCount(); } + + currentYearMap.get(key).setLastYearCount(lastYearCount); + currentYearMap.get(key).setLastMonthCount(lastMonthCount); + + respVOList.add(currentYearMap.get(key)); } + return respVOList; } + /** + * 根据mapKey,添加当年和前一年的月销售记录到对应的map结构中 + * @param performanceList 数据库中查询到的月销售记录 + * @param YearDataMap 将查询到的月销售记录put到对应的map中,如果月销售记录为null,置为0 + * @param mapKey 对应的mapKey + */ + private void buildYearMapData(List performanceList, + Map YearDataMap, + String mapKey) + { + CrmStatisticsPerformanceRespVO currentYearData = performanceList.stream() + .filter(data -> data.getTime().equals(mapKey)) + .findFirst() + .orElse(null); + + if(currentYearData != null) { + YearDataMap.put(Integer.parseInt(mapKey), currentYearData); + } else { + CrmStatisticsPerformanceRespVO defaultVO = new CrmStatisticsPerformanceRespVO(); + defaultVO.setTime(mapKey); + defaultVO.setCurrentMonthCount(BigDecimal.ZERO); + defaultVO.setLastMonthCount(BigDecimal.ZERO); + defaultVO.setLastYearCount(BigDecimal.ZERO); + YearDataMap.put(Integer.parseInt(mapKey), defaultVO); + } + } + /** * 获取用户编号数组。如果用户编号为空, 则获得部门下的用户编号数组,包括子部门的所有用户编号 * -- Gitee From 0c0ac0b02abea90a949f78b2c5a26b51bed62723 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 11:38:20 +0800 Subject: [PATCH 0461/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20open=20ai=20image=20=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/imageopenai/OpenAiImageOptions.java | 2 ++ .../ai/imageopenai/{ => enums}/OpenAiImageModelEnum.java | 2 +- .../ai/imageopenai/{ => enums}/OpenAiImageStyleEnum.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/{ => enums}/OpenAiImageModelEnum.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/{ => enums}/OpenAiImageStyleEnum.java (94%) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java index fd06fbe76a..c2fa74890a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.framework.ai.imageopenai; import cn.iocoder.yudao.framework.ai.image.ImageOptions; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.Getter; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageModelEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageModelEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java index 919dd11d62..08cd2ae95e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageModelEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai; +package cn.iocoder.yudao.framework.ai.imageopenai.enums; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageStyleEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageStyleEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java index e586420a5d..63feb85d33 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageStyleEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai; +package cn.iocoder.yudao.framework.ai.imageopenai.enums; import lombok.AllArgsConstructor; import lombok.Getter; -- Gitee From 118158424b7cd152a2752468533af212854c3207 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 15:55:43 +0800 Subject: [PATCH 0462/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=80=83=E8=99=91=E5=88=B0=E5=89=8D=E7=AB=AF=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E7=9A=84json=E9=85=8D=E7=BD=AE=E4=B8=8D=E7=A1=AE=E5=AE=9A?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E4=B8=8D=E8=BD=AC=E5=8C=96config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/convert/AiChatModalConvert.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index cb3f644c0d..c8b7f0405e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -4,12 +4,14 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import java.util.List; /** - * 聊天 对话 convert + * 聊天 modal * * @author fansili * @time 2024/4/18 16:39 @@ -29,10 +31,13 @@ public interface AiChatModalConvert { List convertAiChatModalListRes(List list); /** - * 转换 - AiChatModalDO + * 转换 - AiChatModalDO * * @param req * @return */ + @Mappings({ + @Mapping(target = "config", ignore = true) + }) AiChatModalDO convertAiChatModalDO(AiChatModalAddReq req); } -- Gitee From c21b5f76790e9cc05bfa0dd2545be057e96e1f94 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 16:32:47 +0800 Subject: [PATCH 0463/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=8E=A5=E5=8F=A3=E8=AE=BE=E8=AE=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8Cai=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 25 +++--- .../module/ai/enums/AiChatModalTypeEnum.java | 11 +++ .../ai/controller/AiChatModalController.java | 2 +- .../ai/dal/dataobject/AiChatModalDO.java | 20 ++--- .../ai/dal/vo/AiChatModalChatConfigVO.java | 35 ++++++++ .../module/ai/dal/vo/AiChatModalConfigVO.java | 28 +++++++ .../ai/dal/vo/AiChatModalDallConfigVO.java | 41 ++++++++++ .../dal/vo/AiChatModalMidjourneyConfigVO.java | 16 ++++ .../AiChatModelConfigTypeHandler.java | 75 +++++++++++++++++ .../service/impl/AiChatModalServiceImpl.java | 80 ++++++++++++++++++- .../ai/service/impl/AiImageServiceImpl.java | 5 +- .../yudao/module/ai/vo/AiChatModalAddReq.java | 22 +++-- .../module/ai/vo/AiChatModalListRes.java | 42 +++++----- .../src/main/resources/http/chat-modal.http | 34 ++++++-- .../yudao/framework/ai/AiPlatformEnum.java | 18 +++++ .../ai/config/YudaoAiProperties.java | 4 +- 16 files changed, 392 insertions(+), 66 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 5839f11f10..12652cb0bf 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -11,24 +11,27 @@ public interface ErrorCodeConstants { // ========== 模块 ai 错误码区间 [1-022-000-000 ~ 1-023-000-000) ========== - // TODO @fansili:1)类注释不太对;2)中英文之间,有个空格;例如说 AI 模型 - ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI模型暂不支持!"); + // chat + ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI 模型暂不支持!"); ErrorCode AI_CHAT_ROLE_NOT_EXISTENT = new ErrorCode(1_022_000_001, "AI Role 不存在!");; + ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话 id 不能为空!");; + ErrorCode AI_CHAT_CONTINUE_NOT_EXIST = new ErrorCode(1_022_000_020, "chat 对话不存在!"); + ErrorCode AI_CHAT_CONVERSATION_NOT_YOURS = new ErrorCode(1_022_000_021, "这条 chat 对话不是你的!"); - - ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话id不能为空!");; - - - - ErrorCode AI_CHAT_CONTINUE_NOT_EXIST = new ErrorCode(1_022_000_020, "chat对话不存在!"); - ErrorCode AI_CHAT_CONVERSATION_NOT_YOURS = new ErrorCode(1_022_000_021, "这条chat对话不是你的!"); + // midjourney ErrorCode AI_MIDJOURNEY_IMAGINE_FAIL = new ErrorCode(1_022_000_040, "midjourney imagine 操作失败!"); - ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "chatRole不存在!"); + // role + + ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "chatRole 不存在!"); - ErrorCode AI_MODAL_NOT_EXIST = new ErrorCode(1_022_000_080, "ai模型不存在!"); + // modal + ErrorCode AI_MODAL_NOT_EXIST = new ErrorCode(1_022_000_080, "AI 模型不存在!"); + ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); + ErrorCode AI_MODAL_NOT_SUPPORTED_MODAL = new ErrorCode(1_022_000_082, "AI 模型不支持的 modal! {} "); + ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java new file mode 100644 index 0000000000..0cf6c6ab1a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.ai.enums; + +/** + * 枚举 + * + * @author fansili + * @time 2024/5/6 11:48 + * @since 1.0 + */ +public enum AiChatModalTypeEnum { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java index 9530f23b9f..cbbb23049b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java @@ -30,7 +30,7 @@ public class AiChatModalController { private final AiChatModalService aiChatModalService; - @Operation(summary = "ai模型 - 模型照片上传") + @Operation(summary = "ai模型 - 模型列表") @GetMapping("/modal/list") public PageResult list(@ModelAttribute AiChatModalListReq req) { return aiChatModalService.list(req); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java index c417e5a449..43175d3495 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java @@ -22,27 +22,23 @@ public class AiChatModalDO extends BaseDO { */ private Long id; /** - * 模型key + * 名字 */ - private String modelKey; + private String name; /** - * 模型类型 参考:{@link cn.iocoder.yudao.framework.ai.AiPlatformEnum} - */ - private String modelPlatform; - /** - * 模型类型 + * 类型 * {@link cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel} * {@link cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel} */ - private String modelType; + private String modal; /** - * 模型名字 + * 平台 参考:{@link cn.iocoder.yudao.framework.ai.AiPlatformEnum} */ - private String modelName; + private String platform; /** - * 模型照片 + * 图片地址 */ - private String modalImage; + private String imageUrl; /** * 禁用 0、正常 1、禁用 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java new file mode 100644 index 0000000000..79cce7ad46 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.ai.dal.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat config + * + * @author fansili + * @time 2024/5/6 15:06 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalChatConfigVO extends AiChatModalConfigVO { + + @NotNull + @Schema(description = "在生成消息时采用的Top-K采样大小") + private Double topK; + + @NotNull + @Schema(description = "Top-P核采样方法的概率阈值") + private Double topP; + + @NotNull + @Schema(description = "温度参数,用于调整生成回复的随机性和多样性程度") + private Double temperature; + + @NotNull + @Schema(description = "最大 tokens") + private Integer maxTokens; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java new file mode 100644 index 0000000000..1b6e957d03 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.ai.dal.vo; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * modal config + * + * @author fansili + * @time 2024/5/6 15:06 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalConfigVO { + + /** + * 模型平台 (冗余,方便类型转换) + * 参考:{@link cn.iocoder.yudao.framework.ai.AiPlatformEnum} + */ + private String platform; + /** + * 模型类型(冗余,方便类型转换) + * {@link cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel} + * {@link cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel} + */ + private String type; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java new file mode 100644 index 0000000000..c7dce40e60 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.ai.dal.vo; + +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * dall + * + * @author fansili + * @time 2024/5/6 15:06 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalDallConfigVO extends AiChatModalConfigVO { + // 可选字段,默认为1 + // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 + private Integer n = 1; + + // 可选字段,默认为standard + // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 + private String quality = "standard"; + + // 可选字段,默认为url + // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 + private String responseFormat = "url"; + + // 可选字段,默认为1024x1024 + // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 + private String size = "1024x1024"; + + // 可选字段,默认为vivid + // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 + private OpenAiImageStyleEnum style = OpenAiImageStyleEnum.VIVID; + + // 可选字段 + // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 + private String endUserId = "UID123456"; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java new file mode 100644 index 0000000000..543c58705c --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.ai.dal.vo; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * Midjourney Config + * + * @author fansili + * @time 2024/5/6 15:07 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalMidjourneyConfigVO extends AiChatModalConfigVO { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java new file mode 100644 index 0000000000..b1f54eaacf --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java @@ -0,0 +1,75 @@ +//package cn.iocoder.yudao.module.ai.mapper.typeHandler; +// +//import cn.hutool.core.util.StrUtil; +//import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +//import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +//import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; +//import org.apache.ibatis.type.BaseTypeHandler; +//import org.apache.ibatis.type.JdbcType; +//import org.apache.ibatis.type.MappedTypes; +// +//import java.sql.CallableStatement; +//import java.sql.PreparedStatement; +//import java.sql.ResultSet; +//import java.sql.SQLException; +// +///** +// * chat modal config +// * +// * @author fansili +// * @time 2024/5/6 11:18 +// * @since 1.0 +// */ +//@MappedTypes(value = AiChatModalDO.Config.class) +//public class AiChatModelConfigTypeHandler extends BaseTypeHandler { +// +// @Override +// public void setNonNullParameter(PreparedStatement ps, int i, AiChatModalDO.Config parameter, JdbcType jdbcType) throws SQLException { +// // 将 MyCustomType 转换为数据库类型并设置到 PreparedStatement 中 +// if (parameter == null) { +// ps.setString(i, ""); +// } else { +// ps.setString(i, JsonUtils.toJsonString(parameter)); +// } +// } +// +// @Override +// public AiChatModalDO.Config getNullableResult(ResultSet rs, String columnName) throws SQLException { +// // 从 ResultSet 中获取数据库类型并转换为 MyCustomType +// String str = rs.getString(columnName); +// if (StrUtil.isBlank(str)) { +// return null; +// } +// AiChatModalDO.Config config = JsonUtils.parseObject(str, AiChatModalDO.Config.class); +// // 获取平台 +// AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(config.getModelPlatform()); +// if (AiPlatformEnum.CHAT_PLATFORM_LIST.contains(platformEnum)) { +// return JsonUtils.parseObject(str, AiChatModalDO.ChatConfig.class); +// } else if (AiPlatformEnum.OPEN_AI_DALL == platformEnum) { +// return JsonUtils.parseObject(str, AiChatModalDO.OpenAiImageConfig.class); +// } else if (AiPlatformEnum.MIDJOURNEY == platformEnum) { +// return JsonUtils.parseObject(str, AiChatModalDO.MidjourneyConfig.class); +// } +// throw new IllegalArgumentException("ai模型中config不能转换! json: " + str); +// } +// +// @Override +// public AiChatModalDO.Config getNullableResult(ResultSet rs, int columnIndex) throws SQLException { +// // 从 ResultSet 中获取数据库类型并转换为 MyCustomType +// String str = rs.getString(columnIndex); +// if (StrUtil.isBlank(str)) { +// return null; +// } +// return JsonUtils.parseObject(str, AiChatModalDO.Config.class); +// } +// +// @Override +// public AiChatModalDO.Config getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { +// // 从 CallableStatement 中获取数据库类型并转换为 MyCustomType +// String str = cs.getString(columnIndex); +// if (StrUtil.isBlank(str)) { +// return null; +// } +// return JsonUtils.parseObject(str, AiChatModalDO.Config.class); +// } +//} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 9e4b6e41de..cc7f505b1e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -1,23 +1,34 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.validation.ValidationUtil; +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalChatConfigVO; +import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; +import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalDallConfigVO; import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatModalMapper; import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; +import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Set; /** * ai 模型 @@ -40,7 +51,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { queryWrapperX.eq(AiChatModalDO::getDisable, AiChatModalDisableEnum.NO.getValue()); // search if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.like(AiChatModalDO::getModelName, req.getSearch().trim()); + queryWrapperX.like(AiChatModalDO::getName, req.getSearch().trim()); } // 默认排序 queryWrapperX.orderByDesc(AiChatModalDO::getId); @@ -53,21 +64,38 @@ public class AiChatModalServiceImpl implements AiChatModalService { @Override public void add(AiChatModalAddReq req) { + // 校验 platform、type + validatePlatform(req.getPlatform()); + validateModal(req.getPlatform(), req.getModal()); + // 转换config + AiChatModalConfigVO aiChatModalConfigVO = convertConfig(req); + // 校验 modal config + validateModalConfig(aiChatModalConfigVO); // 转换 do AiChatModalDO insertChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); - // + // 设置默认属性 insertChatModalDO.setDisable(AiChatModalDisableEnum.NO.getValue()); + insertChatModalDO.setConfig(JsonUtils.toJsonString(aiChatModalConfigVO)); // 保存数据库 aiChatModalMapper.insert(insertChatModalDO); } @Override public void update(Long id, AiChatModalAddReq req) { + // 校验 platform、type + validatePlatform(req.getPlatform()); + validateModal(req.getPlatform(), req.getModal()); + // 转换config + AiChatModalConfigVO aiChatModalConfigVO = convertConfig(req); + // 校验 modal config + validateModalConfig(aiChatModalConfigVO); + // 校验模型是否存在 validateChatModalExists(id); // 转换 updateChatModalDO AiChatModalDO updateChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); updateChatModalDO.setId(id); + updateChatModalDO.setConfig(JsonUtils.toJsonString(aiChatModalConfigVO)); // 更新数据库 aiChatModalMapper.updateById(updateChatModalDO); } @@ -86,4 +114,52 @@ public class AiChatModalServiceImpl implements AiChatModalService { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); } } + + private void validateModal(String platform, String modal) { + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(platform); + try { + if (AiPlatformEnum.QIAN_WEN == platformEnum) { + QianWenChatModal.valueOfModel(modal); + } else if (AiPlatformEnum.XING_HUO == platformEnum) { + XingHuoChatModel.valueOfModel(modal); + } else if (AiPlatformEnum.YI_YAN == platformEnum) { + YiYanChatModel.valueOfModel(modal); + } else { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_SUPPORTED_MODAL, platform); + } + } catch (IllegalArgumentException e) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, e.getMessage()); + } + } + + private void validatePlatform(String platform) { + try { + AiPlatformEnum.valueOfPlatform(platform); + } catch (IllegalArgumentException e) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_PLATFORM_PARAMS_INCORRECT, e.getMessage()); + } + } + + private void validateModalConfig(AiChatModalConfigVO aiChatModalConfigVO) { + Set> validate = ValidationUtil.validate(aiChatModalConfigVO); + for (ConstraintViolation constraintViolation : validate) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, constraintViolation.getMessage()); + } + } + + private static AiChatModalConfigVO convertConfig(AiChatModalAddReq req) { + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getPlatform()); + AiChatModalConfigVO resVo = null; + if (AiPlatformEnum.CHAT_PLATFORM_LIST.contains(platformEnum)) { + resVo = JsonUtils.parseObject(JsonUtils.toJsonString(req.getConfig()), AiChatModalChatConfigVO.class); + } else if (AiPlatformEnum.OPEN_AI_DALL == platformEnum) { + resVo = JsonUtils.parseObject(JsonUtils.toJsonString(req.getConfig()), AiChatModalDallConfigVO.class); + } + if (resVo == null) { + throw new IllegalArgumentException("ai模型中config不能转换! json: " + req.getConfig()); + } + resVo.setType(req.getModal()); + resVo.setPlatform(req.getPlatform()); + return resVo; + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 73e97c9c5e..fb5ebf6908 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -5,9 +5,9 @@ import cn.iocoder.yudao.framework.ai.image.ImageGeneration; import cn.iocoder.yudao.framework.ai.image.ImagePrompt; import cn.iocoder.yudao.framework.ai.image.ImageResponse; import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageModelEnum; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; @@ -21,7 +21,6 @@ import cn.iocoder.yudao.module.ai.mapper.AiImageMapper; import cn.iocoder.yudao.module.ai.service.AiImageService; import cn.iocoder.yudao.module.ai.vo.AiImageDallDrawingReq; import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyReq; -import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyRes; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java index b20c92d5be..4145e2cd40 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java @@ -6,6 +6,8 @@ import jakarta.validation.constraints.Size; import lombok.Data; import lombok.experimental.Accessors; +import java.util.Map; + /** * ai chat modal * @@ -19,18 +21,24 @@ public class AiChatModalAddReq { @NotNull @Schema(description = "模型名字") - @Size(max = 60, message = "模型名字最大60") - private String modelName; + @Size(max = 60, message = "模型名字最大60个字符") + private String name; + + @NotNull + @Size(max = 32, message = "模型平台最大32个字符") + @Schema(description = "模型平台 参考 AiPlatformEnum") + private String platform; @NotNull @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - @Size(max = 32, message = "模型类型最大32") - private String modelType; + @Size(max = 32, message = "模型类型最大32个字符") + private String modal; @Schema(description = "模型照片") - private String modalImage; + @Size(max = 256, message = "模型照片地址最大256个字符") + private String imageUrl; @Schema(description = "模型配置JSON") - private String modelConfig; - +// @Size(max = 1024, message = "模型配置最大1024个字符") + private Map config; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java index 3d1701560e..d05ed7d0d2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.ai.vo; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -13,29 +15,25 @@ import lombok.experimental.Accessors; @Data @Accessors(chain = true) public class AiChatModalListRes { - /** - * 编号 - */ + + @Schema(description = "id") private Long id; - /** - * 模型名字 - */ - private String modelName; - /** - * 模型类型(qianwen、yiyan、xinghuo、openai) - */ - private String modelType; - /** - * 模型照片 - */ - private String modalImage; - /** - * 模型配置JSON - */ - private String modelConfig; - /** - * 禁用 0、正常 1、禁用 - */ + + @Schema(description = "模型平台 参考 AiPlatformEnum") + private String platform; + + @Schema(description = "模型类型 参考 YiYanChatModel、XingHuoChatModel") + private String modal; + + @Schema(description = "模型名字") + private String name; + + @Schema(description = "模型照片") + private String image; + + @Schema(description = "禁用 0、正常 1、禁用") private Integer disable; + @Schema(description = "modal 配置") + private String config; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http index aa29499203..50c89908c2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http @@ -1,19 +1,41 @@ - ### chat call GET {{baseUrl}}/ai/chat/modal/list Authorization: {{token}} - ### chat call PUT {{baseUrl}}/ai/chat/modal Content-Type: application/json Authorization: {{token}} { - "modelName": "小红书Ai写作大模型", - "modelType": "yiyan", - "modalImage": "", - "modelConfig": "" + "name": "小红书Ai写作大模型-plus", + "modal": "ERNIE-3.5-8K", + "platform": "yiyan", + "imageUrl": "", + "config": { + "topK": 0.6, + "topP": 0.6, + "temperature": 0.86, + "maxTokens": 2048 + } +} + +### chat call +POST {{baseUrl}}/ai/chat/modal/7 +Content-Type: application/json +Authorization: {{token}} + +{ + "name": "小红书Ai写作大模型-plus", + "modal": "ERNIE-3.5-8K", + "platform": "yiyan", + "imageUrl": "", + "config": { + "topK": 0.6, + "topP": 0.6, + "temperature": 0.86, + "maxTokens": 2048 + } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java index 717ced538e..752cb042dd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java @@ -1,8 +1,11 @@ package cn.iocoder.yudao.framework.ai; +import com.google.common.collect.Lists; import lombok.AllArgsConstructor; import lombok.Getter; +import java.util.List; + /** * ai 模型平台 * @@ -17,12 +20,27 @@ public enum AiPlatformEnum { YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), + OPEN_AI("openai", "openAi"), + OPEN_AI_DALL("dall", "dall"), + MIDJOURNEY("midjourney", "midjourney"), ; private String platform; private String name; + public static List CHAT_PLATFORM_LIST = Lists.newArrayList( + AiPlatformEnum.YI_YAN, + AiPlatformEnum.QIAN_WEN, + AiPlatformEnum.XING_HUO, + AiPlatformEnum.OPEN_AI + ); + + public static List IMAGE_PLATFORM_LIST = Lists.newArrayList( + AiPlatformEnum.OPEN_AI_DALL, + AiPlatformEnum.MIDJOURNEY + ); + public static AiPlatformEnum valueOfPlatform(String platform) { for (AiPlatformEnum itemEnum : AiPlatformEnum.values()) { if (itemEnum.getPlatform().equals(platform)) { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index f9dcae04a8..57ef69ef6a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; -- Gitee From 3d7c994bf96ae01fdd8a810a835ed0b9254115f7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 16:38:33 +0800 Subject: [PATCH 0464/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91a?= =?UTF-8?q?i=E6=A8=A1=E5=9E=8B=EF=BC=8C=E5=A2=9E=E5=8A=A0sort=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/dal/dataobject/AiChatModalDO.java | 5 +++++ .../module/ai/service/impl/AiChatModalServiceImpl.java | 2 +- .../iocoder/yudao/module/ai/vo/AiChatModalAddReq.java | 10 +++++++--- .../iocoder/yudao/module/ai/vo/AiChatModalListRes.java | 3 +++ .../src/main/resources/http/chat-modal.http | 6 ++++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java index 43175d3495..cb045c549d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java @@ -43,8 +43,13 @@ public class AiChatModalDO extends BaseDO { * 禁用 0、正常 1、禁用 */ private Integer disable; + /** + * 排序 + */ + private Integer sort; /** * modal 配置(json) */ private String config; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index cc7f505b1e..b8030cc9f4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -54,7 +54,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { queryWrapperX.like(AiChatModalDO::getName, req.getSearch().trim()); } // 默认排序 - queryWrapperX.orderByDesc(AiChatModalDO::getId); + queryWrapperX.orderByAsc(AiChatModalDO::getSort); // 查询 PageResult aiChatModalDOPageResult = aiChatModalMapper.selectPage(req, queryWrapperX); // 转换 res diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java index 4145e2cd40..6a2b143ddd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java @@ -19,25 +19,29 @@ import java.util.Map; @Accessors(chain = true) public class AiChatModalAddReq { - @NotNull @Schema(description = "模型名字") @Size(max = 60, message = "模型名字最大60个字符") + @NotNull(message = "模型名字不能为空!") private String name; - @NotNull @Size(max = 32, message = "模型平台最大32个字符") @Schema(description = "模型平台 参考 AiPlatformEnum") + @NotNull(message = "平台不能为空!") private String platform; - @NotNull @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") @Size(max = 32, message = "模型类型最大32个字符") + @NotNull(message = "modal模型不能为空!") private String modal; @Schema(description = "模型照片") @Size(max = 256, message = "模型照片地址最大256个字符") private String imageUrl; + @Schema(description = "排序") + @NotNull(message = "sort排序不能为空!") + private Integer sort; + @Schema(description = "模型配置JSON") // @Size(max = 1024, message = "模型配置最大1024个字符") private Map config; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java index d05ed7d0d2..ce99e39db3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java @@ -34,6 +34,9 @@ public class AiChatModalListRes { @Schema(description = "禁用 0、正常 1、禁用") private Integer disable; + @Schema(description = "排序 asc 排序") + private Integer sort; + @Schema(description = "modal 配置") private String config; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http index 50c89908c2..ab8aa85c69 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http @@ -10,10 +10,11 @@ Content-Type: application/json Authorization: {{token}} { - "name": "小红书Ai写作大模型-plus", - "modal": "ERNIE-3.5-8K", + "name": "小红书Ai写作大模型4.0", + "modal": "ERNIE 4.0", "platform": "yiyan", "imageUrl": "", + "sort": 100, "config": { "topK": 0.6, "topP": 0.6, @@ -32,6 +33,7 @@ Authorization: {{token}} "modal": "ERNIE-3.5-8K", "platform": "yiyan", "imageUrl": "", + "sort": 1, "config": { "topK": 0.6, "topP": 0.6, -- Gitee From 2b7e7763bfea8083320425e82fe807949e67356f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 17:11:30 +0800 Subject: [PATCH 0465/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEapi=E8=B0=83=E6=95=B4ai=E8=A7=92=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E5=AF=B9modal=E5=85=B3=E8=81=94=20?= =?UTF-8?q?=E5=92=8C=20modal=20topK=20=E7=9B=B8=E5=85=B3=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E3=80=82=E7=AE=80=E5=8D=95=E6=94=B9=E4=B8=BA=E5=8F=AA=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E8=A7=92=E8=89=B2=E7=9A=84=E9=A2=84=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ityEnum.java => AiChatRoleEnableEnum.java} | 10 +++--- .../module/ai/enums/AiChatRoleSourceEnum.java | 36 ------------------- .../ai/controller/AiChatRoleController.java | 8 ++--- .../ai/dal/dataobject/AiChatRoleDO.java | 33 +++-------------- .../module/ai/service/AiChatRoleService.java | 2 +- .../impl/AiChatConversationServiceImpl.java | 2 +- .../service/impl/AiChatRoleServiceImpl.java | 17 ++++----- .../yudao/module/ai/vo/AiChatRoleAddReq.java | 28 +++------------ .../yudao/module/ai/vo/AiChatRoleListRes.java | 23 +++--------- .../module/ai/vo/AiChatRoleUpdateReq.java | 28 +++------------ .../ai/vo/AiChatRoleUpdateVisibilityReq.java | 4 +-- .../src/main/resources/http/chat-role.http | 26 +++++--------- 12 files changed, 45 insertions(+), 172 deletions(-) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{AiChatRoleVisibilityEnum.java => AiChatRoleEnableEnum.java} (64%) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleSourceEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleVisibilityEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java similarity index 64% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleVisibilityEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java index ec7a19a2c8..81b29c0e55 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleVisibilityEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java @@ -12,10 +12,10 @@ import lombok.Getter; */ @AllArgsConstructor @Getter -public enum AiChatRoleVisibilityEnum { +public enum AiChatRoleEnableEnum { - PUBLIC("public", "公开"), - PRIVATE("private", "私有的"), + OPEN("open", "公开"), + CLOSE("close", "关闭"), ; @@ -24,8 +24,8 @@ public enum AiChatRoleVisibilityEnum { private String name; - public static AiChatRoleVisibilityEnum valueOfType(String type) { - for (AiChatRoleVisibilityEnum itemEnum : AiChatRoleVisibilityEnum.values()) { + public static AiChatRoleEnableEnum valueOfType(String type) { + for (AiChatRoleEnableEnum itemEnum : AiChatRoleEnableEnum.values()) { if (itemEnum.getType().equals(type)) { return itemEnum; } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleSourceEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleSourceEnum.java deleted file mode 100644 index 94b004456c..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleSourceEnum.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * chat角色 source - * - * @author fansili - * @time 2024/4/24 16:37 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatRoleSourceEnum { - - SYSTEM("system", "系统"), - CUSTOMER("customer", "用户自定义"), - - - ; - - private String type; - - private String name; - - - public static AiChatRoleSourceEnum valueOfType(String type) { - for (AiChatRoleSourceEnum itemEnum : AiChatRoleSourceEnum.values()) { - if (itemEnum.getType().equals(type)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + type); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java index 137b8bfa48..2b459cdcbd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java @@ -48,10 +48,10 @@ public class AiChatRoleController { } @Operation(summary = "chat角色 - 修改可见性") - @PostMapping("/role/{id}/update-visibility") - public CommonResult updateVisibility(@PathVariable("id") Long id, - @Validated @RequestBody AiChatRoleUpdateVisibilityReq req) { - chatRoleService.updateVisibility(id, req); + @PostMapping("/role/{id}/update-enable") + public CommonResult updateEnable(@PathVariable("id") Long id, + @Validated @RequestBody AiChatRoleUpdateVisibilityReq req) { + chatRoleService.updateEnable(id, req); return CommonResult.success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java index 4683a81faa..8ceb886e4a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java @@ -28,25 +28,15 @@ public class AiChatRoleDO extends BaseDO { */ private Long userId; - /** - * 模型编号,关联到角色使用的特定模型 - */ - private String modelId; - /** * 角色名,角色的显示名称 */ - private String roleName; + private String name; /** * 角色介绍,详细描述角色的功能或用途 */ - private String roleIntroduce; - - /** - * 角色来源,如 system(系统预置)、customer(用户自定义) - */ - private String roleSource; + private String introduce; /** * 分类,角色所属的类别,如娱乐、创作等 @@ -54,24 +44,9 @@ public class AiChatRoleDO extends BaseDO { private String classify; /** - * 发布状态,private 表示仅自己可见,public表示公开,disable表示禁用 - */ - private String visibility; - - /** - * 生成时的Top-K采样候选集大小 - */ - private Double topK; - - /** - * 生成时使用的核采样方法的概率阈值 - */ - private Double topP; - - /** - * 用于控制随机性和多样性的温度参数 + * 是否开启 open、close */ - private Double temperature; + private String enable; /** * 角色的使用次数统计 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index d3bd201e96..f0bab1a16f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -42,7 +42,7 @@ public interface AiChatRoleService { * @param id * @param req */ - void updateVisibility(Long id, AiChatRoleUpdateVisibilityReq req); + void updateEnable(Long id, AiChatRoleUpdateVisibilityReq req); /** * chat角色 - 删除 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 8e6a520c72..bc657b8554 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -65,7 +65,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(req.getChatRoleId()); // 创建新的 Conversation AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, - req.getChatRoleId(), aiChatRoleDO.getRoleName(), AiChatConversationTypeEnum.ROLE_CHAT); + req.getChatRoleId(), aiChatRoleDO.getName(), AiChatConversationTypeEnum.ROLE_CHAT); // 转换 res return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index 870168e2af..3ca9375b34 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -9,8 +9,7 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiChatRoleClassifyEnum; -import cn.iocoder.yudao.module.ai.enums.AiChatRoleSourceEnum; -import cn.iocoder.yudao.module.ai.enums.AiChatRoleVisibilityEnum; +import cn.iocoder.yudao.module.ai.enums.AiChatRoleEnableEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.vo.*; @@ -39,7 +38,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // search 查询 if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.eq(AiChatRoleDO::getRoleName, req.getSearch()); + queryWrapperX.eq(AiChatRoleDO::getName, req.getSearch()); } // 默认排序id desc queryWrapperX.orderByDesc(AiChatRoleDO::getId); @@ -56,8 +55,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { public void add(AiChatRoleAddReq req) { // 转换enum,并校验enum AiChatRoleClassifyEnum.valueOfClassify(req.getClassify()); - AiChatRoleVisibilityEnum.valueOfType(req.getVisibility()); - AiChatRoleSourceEnum.valueOfType(req.getRoleSource()); + AiChatRoleEnableEnum.valueOfType(req.getEnable()); // 转换do AiChatRoleDO insertAiChatRoleDO = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); insertAiChatRoleDO.setUserId(SecurityFrameworkUtils.getLoginUserId()); @@ -70,8 +68,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { public void update(Long id, AiChatRoleUpdateReq req) { // 转换enum,并校验enum AiChatRoleClassifyEnum.valueOfClassify(req.getClassify()); - AiChatRoleVisibilityEnum.valueOfType(req.getVisibility()); - AiChatRoleSourceEnum.valueOfType(req.getRoleSource()); + AiChatRoleEnableEnum.valueOfType(req.getEnable()); // 检查角色是否存在 validateChatRoleExists(id); // 转换do @@ -82,15 +79,15 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override - public void updateVisibility(Long id, AiChatRoleUpdateVisibilityReq req) { + public void updateEnable(Long id, AiChatRoleUpdateVisibilityReq req) { // 转换enum,并校验enum - AiChatRoleVisibilityEnum.valueOfType(req.getVisibility()); + AiChatRoleEnableEnum.valueOfType(req.getEnable()); // 检查角色是否存在 validateChatRoleExists(id); // 更新 aiChatRoleMapper.updateById(new AiChatRoleDO() .setId(id) - .setVisibility(req.getVisibility()) + .setEnable(req.getEnable()) ); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java index 63342c61bc..15a8034581 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java @@ -16,39 +16,19 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiChatRoleAddReq extends PageParam { - @NotNull - @Schema(description = "模型编号,关联到角色使用的特定模型") - private String modelId; - @NotNull @Schema(description = "角色名,角色的显示名称") - private String roleName; + private String name; @NotNull @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String roleIntroduce; - - @NotNull - @Schema(description = "角色来源,如 system(系统预置)、customer(用户自定义)") - private String roleSource; + private String introduce; @NotNull @Schema(description = "分类,角色所属的类别,如娱乐、创作等") private String classify; @NotNull - @Schema(description = "发布状态,private 表示仅自己可见,public表示公开,disable表示禁用\n") - private String visibility; - - @NotNull - @Schema(description = "生成时的Top-K采样候选集大小") - private Double topK; - - @NotNull - @Schema(description = "生成时使用的核采样方法的概率阈值") - private Double topP; - - @NotNull - @Schema(description = "用于控制随机性和多样性的温度参数") - private Double temperature; + @Schema(description = "开启状态 open、close") + private String enable; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java index 8f582cc58a..e018c43a2e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java @@ -20,32 +20,17 @@ public class AiChatRoleListRes { @Schema(description = "用户id") private Long userId; - @Schema(description = "模型id") - private String modelId; - @Schema(description = "角色名字") - private String roleName; + private String name; @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String roleIntroduce; - - @Schema(description = "角色来源,如 system(系统预置)、customer(用户自定义)") - private String roleSource; + private String introduce; @Schema(description = "分类,角色所属的类别,如娱乐、创作等") private String classify; - @Schema(description = "发布状态,0表示仅自己可见,1表示公开,2表示禁用") - private String visibility; - - @Schema(description = "生成时的Top-K采样候选集大小") - private Double topK; - - @Schema(description = "生成时使用的核采样方法的概率阈值") - private Double topP; - - @Schema(description = "用于控制随机性和多样性的温度参数") - private Double temperature; + @Schema(description = "状态 open、close") + private String enable; @Schema(description = "角色的使用次数统计") private Integer useCount; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java index c6197f8d49..707c015f60 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java @@ -16,39 +16,19 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiChatRoleUpdateReq extends PageParam { - @NotNull - @Schema(description = "模型编号,关联到角色使用的特定模型") - private String modelId; - @NotNull @Schema(description = "角色名,角色的显示名称") - private String roleName; + private String name; @NotNull @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String roleIntroduce; - - @NotNull - @Schema(description = "角色来源,如 system(系统预置)、customer(用户自定义)") - private String roleSource; + private String introduce; @NotNull @Schema(description = "分类,角色所属的类别,如娱乐、创作等") private String classify; @NotNull - @Schema(description = "发布状态,0表示仅自己可见,1表示公开,2表示禁用") - private String visibility; - - @NotNull - @Schema(description = "生成时的Top-K采样候选集大小") - private Double topK; - - @NotNull - @Schema(description = "生成时使用的核采样方法的概率阈值") - private Double topP; - - @NotNull - @Schema(description = "用于控制随机性和多样性的温度参数") - private Double temperature; + @Schema(description = "开启状态 open、close") + private String enable; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java index d0d216b24c..52685eb66b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java @@ -17,6 +17,6 @@ import lombok.experimental.Accessors; public class AiChatRoleUpdateVisibilityReq extends PageParam { @NotNull - @Schema(description = "发布状态,0表示仅自己可见,1表示公开,2表示禁用") - private String visibility; + @Schema(description = "开启状态 open、close") + private String enable; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http index ae7e42c8fb..8cbf517ba2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http @@ -11,41 +11,33 @@ Authorization: {{token}} { "modelId": 1, - "roleName": "小红书写作v1", - "roleIntroduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", - "roleSource": "system", + "name": "小红书写作v1", + "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", "classify": "writing", - "visibility": "public", - "topK": 0.2, - "topP": 0.4, - "temperature": 0.7 + "enable": "open" } ### chat update -POST {{baseUrl}}/ai/chat/role/1 +POST {{baseUrl}}/ai/chat/role/6 Content-Type: application/json Authorization: {{token}} { "modelId": 1, - "roleName": "小红书写作v1---hh😄", - "roleIntroduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", - "roleSource": "system", + "name": "小红书写作v1---hh😄", + "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", "classify": "writing", - "visibility": "public", - "topK": 0.2, - "topP": 0.4, - "temperature": 0.7 + "enable": "close" } ### chat update -POST {{baseUrl}}/ai/chat/role/1/update-visibility +POST {{baseUrl}}/ai/chat/role/6/update-visibility Content-Type: application/json Authorization: {{token}} { - "visibility": "private" + "enable": "open" } -- Gitee From c0470dcabb7ec3cd25dc0eabde7774081f73cac3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 6 May 2024 18:21:17 +0800 Subject: [PATCH 0466/1557] =?UTF-8?q?=20=E3=80=90=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E3=80=91=E6=A0=B9=E6=8D=AEapi=E8=AE=BE=E8=AE=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=92=8C?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 1 + .../AiChatConversationController.java | 12 ++- .../module/ai/convert/AiChatModalConvert.java | 11 +++ .../module/ai/convert/AiChatRoleConvert.java | 9 +++ .../dal/dataobject/AiChatConversationDO.java | 12 ++- .../module/ai/mapper/AiChatModalMapper.java | 22 ++++++ .../ai/service/AiChatConversationService.java | 9 +++ .../module/ai/service/AiChatModalService.java | 8 ++ .../module/ai/service/AiChatRoleService.java | 7 ++ .../impl/AiChatConversationServiceImpl.java | 76 ++++++++++++++----- .../service/impl/AiChatModalServiceImpl.java | 11 ++- .../service/impl/AiChatRoleServiceImpl.java | 7 ++ .../vo/AiChatConversationCreateRoleReq.java | 2 +- .../vo/AiChatConversationCreateUserReq.java | 1 + .../module/ai/vo/AiChatConversationRes.java | 11 ++- .../yudao/module/ai/vo/AiChatModalRes.java | 41 ++++++++++ .../yudao/module/ai/vo/AiChatRoleRes.java | 37 +++++++++ .../resources/http/chat-conversation.http | 16 +++- .../src/main/resources/http/chat-role.http | 6 +- 19 files changed, 266 insertions(+), 33 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 12652cb0bf..25b3b71094 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -33,5 +33,6 @@ public interface ErrorCodeConstants { ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); ErrorCode AI_MODAL_NOT_SUPPORTED_MODAL = new ErrorCode(1_022_000_082, "AI 模型不支持的 modal! {} "); ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); + ErrorCode AI_MODAL_DISABLE_NOT_USED = new ErrorCode(1_022_000_084, "AI 模型禁用不能使用!"); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java index e0f9420429..6d5cb31549 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java @@ -32,13 +32,13 @@ public class AiChatConversationController { private final AiChatConversationService chatConversationService; @Operation(summary = "创建 - 对话普通对话") - @PostMapping("/createConversation") + @PutMapping("/createConversation") public CommonResult createConversation(@RequestBody @Validated AiChatConversationCreateUserReq req) { return CommonResult.success(chatConversationService.createConversation(req)); } @Operation(summary = "创建 - 对话角色对话") - @PostMapping("/createRoleConversation") + @PutMapping("/createRoleConversation") public CommonResult createRoleConversation(@RequestBody @Validated AiChatConversationCreateRoleReq req) { return CommonResult.success(chatConversationService.createRoleConversation(req)); } @@ -55,6 +55,14 @@ public class AiChatConversationController { return CommonResult.success(chatConversationService.listConversation(req)); } + @Operation(summary = "更新 - 更新模型") + @PostMapping("/{id}/modal") + public CommonResult updateModal(@PathVariable("id") Long id, + @RequestParam("modalId") Long modalId) { + chatConversationService.updateModal(id, modalId); + return CommonResult.success(null); + } + @Operation(summary = "删除") @DeleteMapping("/{id}") public CommonResult delete(@PathVariable("id") Long id) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index c8b7f0405e..52e47e05b0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; @@ -40,4 +41,14 @@ public interface AiChatModalConvert { @Mapping(target = "config", ignore = true) }) AiChatModalDO convertAiChatModalDO(AiChatModalAddReq req); + + + /** + * 转换 - AiChatModalRes + * + * @param aiChatModalDO + * @return + */ + AiChatModalRes convertAiChatModalRes(AiChatModalDO aiChatModalDO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java index 80977c4421..bb936b998e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.vo.AiChatRoleAddReq; +import cn.iocoder.yudao.module.ai.vo.AiChatRoleRes; import cn.iocoder.yudao.module.ai.vo.AiChatRoleUpdateReq; import cn.iocoder.yudao.module.ai.vo.AiChatRoleListRes; import org.mapstruct.Mapper; @@ -44,4 +45,12 @@ public interface AiChatRoleConvert { * @return */ AiChatRoleDO convertAiChatRoleDO(AiChatRoleUpdateReq req); + + /** + * 转换 - AiChatRoleRes + * + * @param aiChatRoleDO + * @return + */ + AiChatRoleRes convertAiChatRoleRes(AiChatRoleDO aiChatRoleDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java index 7f5a142b3f..1344d9956d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java @@ -25,12 +25,18 @@ public class AiChatConversationDO extends BaseDO { private Long userId; @Schema(description = "chat角色Id") - private Long chatRoleId; + private Long roleId; @Schema(description = "chat角色名称") - private String chatRoleName; + private String roleName; - @Schema(description = "标题(有程序自动生成)") + @Schema(description = "模型id") + private Long modalId; + + @Schema(description = "使用的模型") + private String modal; + + @Schema(description = "标题") private String title; @Schema(description = "对话类型(roleChat、userChat)") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java index 118cda294b..450791f41c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java @@ -1,6 +1,10 @@ package cn.iocoder.yudao.module.ai.mapper; +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -15,4 +19,22 @@ import org.springframework.stereotype.Repository; @Repository @Mapper public interface AiChatModalMapper extends BaseMapperX { + + /** + * 查询 - 第一个modal + * + * @return + */ + default AiChatModalDO selectFirstModal() { + PageResult pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), + new LambdaQueryWrapperX() + .orderByAsc(AiChatModalDO::getSort) + ); + if (CollUtil.isEmpty(pageResult.getList())) { + return null; + } + return pageResult.getList().get(0); + } + + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java index fbae7c8c46..1a4c767a13 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java @@ -48,6 +48,15 @@ public interface AiChatConversationService { */ List listConversation(AiChatConversationListReq req); + /** + * 更新 - 更新模型 + * + * @param id + * @param modalId + * @return + */ + void updateModal(Long id, Long modalId); + /** * 删除 - 根据id * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index 5681c1ba01..b1bf4a7d6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; /** * ai modal @@ -44,4 +45,11 @@ public interface AiChatModalService { */ void delete(Long id); + /** + * 获取 - 获取 modal + * + * @param modalId + * @return + */ + AiChatModalRes getChatModal(Long modalId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index f0bab1a16f..5c756075ca 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -51,4 +51,11 @@ public interface AiChatRoleService { */ void delete(Long chatRoleId); + /** + * 获取角色 + * + * @param roleId + * @return + */ + AiChatRoleRes getChatRole(Long roleId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index bc657b8554..5906138b8b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -5,15 +5,16 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import cn.iocoder.yudao.module.ai.enums.AiChatConversationTypeEnum; +import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.mapper.AiChatModalMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateRoleReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateUserReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; +import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatRoleService; +import cn.iocoder.yudao.module.ai.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; @@ -33,7 +34,10 @@ import java.util.List; public class AiChatConversationServiceImpl implements AiChatConversationService { private final AiChatRoleMapper aiChatRoleMapper; + private final AiChatModalMapper aiChatModalMapper; private final AiChatConversationMapper aiChatConversationMapper; + private final AiChatModalService aiChatModalService; + private final AiChatRoleService aiChatRoleService; @Override public AiChatConversationRes createConversation(AiChatConversationCreateUserReq req) { @@ -45,9 +49,12 @@ public class AiChatConversationServiceImpl implements AiChatConversationService if (latestConversation != null && latestConversation.getChatCount() <= 0) { return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); } + // 获取第一个模型 + AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); // 创建新的 Conversation AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, - null, null, AiChatConversationTypeEnum.USER_CHAT); + null, null, AiChatConversationTypeEnum.USER_CHAT, + aiChatModalDO.getId(), aiChatModalDO.getModal()); // 转换 res return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); } @@ -57,43 +64,56 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询最新的对话 - AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); - // 如果有对话没有被使用过,那就返回这个 - if (latestConversation != null && latestConversation.getChatCount() <= 0) { - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); - } - AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(req.getChatRoleId()); +// AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); +// // 如果有对话没有被使用过,那就返回这个 +// if (latestConversation != null && latestConversation.getChatCount() <= 0) { +// return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); +// } + // 查询角色 + AiChatRoleRes chatRoleRes = aiChatRoleService.getChatRole(req.getRoleId()); + // 获取第一个模型 + AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); // 创建新的 Conversation AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, - req.getChatRoleId(), aiChatRoleDO.getName(), AiChatConversationTypeEnum.ROLE_CHAT); + req.getRoleId(), chatRoleRes.getName(), AiChatConversationTypeEnum.ROLE_CHAT, + aiChatModalDO.getId(), aiChatModalDO.getModal()); // 转换 res return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); } private @NotNull AiChatConversationDO saveConversation(String title, Long userId, - Long chatRoleId, - String chatRoleName, - AiChatConversationTypeEnum typeEnum) { + Long roleId, + String roleName, + AiChatConversationTypeEnum typeEnum, + Long modalId, + String modal) { AiChatConversationDO insertConversation = new AiChatConversationDO(); insertConversation.setId(null); insertConversation.setUserId(userId); - insertConversation.setChatRoleId(chatRoleId); - insertConversation.setChatRoleName(chatRoleName); + insertConversation.setRoleId(roleId); + insertConversation.setRoleName(roleName); insertConversation.setTitle(title); insertConversation.setChatCount(0); insertConversation.setType(typeEnum.getType()); + insertConversation.setModalId(modalId); + insertConversation.setModal(modal); aiChatConversationMapper.insert(insertConversation); return insertConversation; } @Override public AiChatConversationRes getConversation(Long id) { + AiChatConversationDO aiChatConversationDO = validateExists(id); + return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); + } + + private @NotNull AiChatConversationDO validateExists(Long id) { AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); if (aiChatConversationDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_CONTINUE_NOT_EXIST); } - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); + return aiChatConversationDO; } @Override @@ -106,6 +126,24 @@ public class AiChatConversationServiceImpl implements AiChatConversationService return AiChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); } + @Override + public void updateModal(Long id, Long modalId) { + // 校验对话是否存在 + validateExists(id); + // 获取模型 + AiChatModalRes chatModal = aiChatModalService.getChatModal(modalId); + // 判断模型是否禁用 + if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); + } + // 更新对话 + aiChatConversationMapper.updateById(new AiChatConversationDO() + .setId(id) + .setModalId(chatModal.getId()) + .setModal(chatModal.getModal()) + ); + } + @Override public void delete(Long id) { aiChatConversationMapper.deleteById(id); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index b8030cc9f4..4fc210bafa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -108,11 +109,19 @@ public class AiChatModalServiceImpl implements AiChatModalService { aiChatModalMapper.deleteById(id); } - private void validateChatModalExists(Long id) { + @Override + public AiChatModalRes getChatModal(Long modalId) { + // 检查 modal 是否存在 + AiChatModalDO aiChatModalDO = validateChatModalExists(modalId); + return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); + } + + private AiChatModalDO validateChatModalExists(Long id) { AiChatModalDO aiChatModalDO = aiChatModalMapper.selectById(id); if (aiChatModalDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); } + return aiChatModalDO; } private void validateModal(String platform, String modal) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index 3ca9375b34..fe36ee43b9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -99,6 +99,13 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { aiChatRoleMapper.deleteById(chatRoleId); } + @Override + public AiChatRoleRes getChatRole(Long roleId) { + // 检查角色是否存在 + AiChatRoleDO aiChatRoleDO = validateChatRoleExists(roleId); + return AiChatRoleConvert.INSTANCE.convertAiChatRoleRes(aiChatRoleDO); + } + private AiChatRoleDO validateChatRoleExists(Long id) { AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(id); if (aiChatRoleDO == null) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java index 95223ce9f4..0dc095bc12 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java @@ -18,7 +18,7 @@ public class AiChatConversationCreateRoleReq { @Schema(description = "chat角色Id") @NotNull(message = "聊天角色id不能为空!") - private Long chatRoleId; + private Long roleId; @Schema(description = "标题(有程序自动生成)") @NotNull(message = "标题不能为空!") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java index c8276ef80b..9e3af32a07 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java @@ -19,4 +19,5 @@ public class AiChatConversationCreateUserReq { @Schema(description = "对话标题") @NotNull(message = "标题不能为空!") private String title; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java index ca8254d5f1..9e181bd01d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java @@ -22,10 +22,16 @@ public class AiChatConversationRes { private Long userId; @Schema(description = "chat角色Id") - private Long chatRoleId; + private Long roleId; @Schema(description = "chat角色名称") - private String chatRoleName; + private String roleName; + + @Schema(description = "模型id") + private Long modalId; + + @Schema(description = "使用的模型") + private String modal; @Schema(description = "标题(有程序自动生成)") private String title; @@ -35,4 +41,5 @@ public class AiChatConversationRes { @Schema(description = "聊天次数(有程序自动生成)") private Integer chatCount; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java new file mode 100644 index 0000000000..351da25385 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.ai.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * modal list + * + * @author fansili + * @time 2024/4/24 19:56 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalRes { + + @Schema(description = "id") + private Long id; + + @Schema(description = "模型平台 参考 AiPlatformEnum") + private String platform; + + @Schema(description = "模型类型 参考 YiYanChatModel、XingHuoChatModel") + private String modal; + + @Schema(description = "模型名字") + private String name; + + @Schema(description = "模型照片") + private String image; + + @Schema(description = "禁用 0、正常 1、禁用") + private Integer disable; + + @Schema(description = "排序 asc 排序") + private Integer sort; + + @Schema(description = "modal 配置") + private String config; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java new file mode 100644 index 0000000000..a6903931c9 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.ai.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * chat 角色 + * + * @fansili + * @since v1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatRoleRes { + + @Schema(description = "id") + private Long id; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "角色名字") + private String name; + + @Schema(description = "角色介绍,详细描述角色的功能或用途") + private String introduce; + + @Schema(description = "分类,角色所属的类别,如娱乐、创作等") + private String classify; + + @Schema(description = "状态 open、close") + private String enable; + + @Schema(description = "角色的使用次数统计") + private Integer useCount; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http index 65230d9e9d..15c441f34c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http @@ -2,15 +2,27 @@ ### 登录 详细使用 https://www.jetbrains.com/help/idea/testing-restful-web-services.html、https://www.cnblogs.com/crazymakercircle/p/14317222.html ### 对话 - 创建对话 -POST {{baseUrl}}/ai/chat/conversation/create +PUT {{baseUrl}}/ai/chat/conversation/createConversation Content-Type: application/json Authorization: {{token}} { - "chatType": "userChat" + "title": "新增对话" } +### 对话 - 创建对话 +PUT {{baseUrl}}/ai/chat/conversation/createRoleConversation +Content-Type: application/json +Authorization: {{token}} + +{ + "roleId": 7, + "title": "新增对话" +} + + + ### 对话 - id获取 GET {{baseUrl}}/ai/chat/conversation/1781604279872581644 Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http index 8cbf517ba2..b459a5a952 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http @@ -19,14 +19,14 @@ Authorization: {{token}} ### chat update -POST {{baseUrl}}/ai/chat/role/6 +POST {{baseUrl}}/ai/chat/role/7 Content-Type: application/json Authorization: {{token}} { "modelId": 1, - "name": "小红书写作v1---hh😄", - "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", + "name": "小红书写作v1---hh😄❀", + "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。0----", "classify": "writing", "enable": "close" } -- Gitee From e9cbee9d7ee593ad793b2a77a688616c61c7907b Mon Sep 17 00:00:00 2001 From: "zhijiantianya@gmail.com" Date: Mon, 6 May 2024 19:17:05 +0800 Subject: [PATCH 0467/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E8=B0=83=E6=95=B4=E8=A1=A8?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/enums/AiOpenAiModelEnum.java | 15 +-- .../chat/AiChatConversationControllerV2.java | 17 +++ .../admin/chat/vo/package-info.java | 1 + .../ai/controller/admin/package-info.java | 4 + .../ai/controller/app/package-info.java | 4 + .../module/ai/controller/package-info.java | 6 + .../ai/convert/AiChatConversationConvert.java | 2 +- .../ai/convert/AiChatMessageConvert.java | 2 +- .../module/ai/convert/AiChatModalConvert.java | 2 +- .../module/ai/convert/AiChatRoleConvert.java | 2 +- .../dal/dataobject/AiChatConversationDO.java | 47 -------- .../ai/dal/dataobject/AiChatMessageDO.java | 62 ---------- .../dataobject/chat/AiChatConversationDO.java | 86 ++++++++++++++ .../dal/dataobject/chat/AiChatMessageDO.java | 109 ++++++++++++++++++ .../dal/dataobject/{ => image}/AiImageDO.java | 2 +- .../ai/dal/dataobject/model/AiApiKeyDO.java | 59 ++++++++++ .../dataobject/{ => model}/AiChatModalDO.java | 52 ++++++--- .../dataobject/{ => model}/AiChatRoleDO.java | 60 +++++++--- .../ai/mapper/AiChatConversationMapper.java | 2 +- .../module/ai/mapper/AiChatMessageMapper.java | 4 +- .../module/ai/mapper/AiChatModalMapper.java | 1 - .../module/ai/mapper/AiChatRoleMapper.java | 2 +- .../yudao/module/ai/mapper/AiImageMapper.java | 2 +- .../impl/AiChatConversationServiceImpl.java | 2 - .../impl/AiChatMessageServiceImpl.java | 6 +- .../service/impl/AiChatModalServiceImpl.java | 1 - .../service/impl/AiChatRoleServiceImpl.java | 2 +- .../ai/service/impl/AiChatServiceImpl.java | 6 +- .../ai/service/impl/AiImageServiceImpl.java | 2 +- .../YuDaoMidjourneyMessageHandler.java | 2 +- .../module/ai/vo/AiChatModalListRes.java | 1 - 31 files changed, 389 insertions(+), 176 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/{ => image}/AiImageDO.java (95%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/{ => model}/AiChatModalDO.java (35%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/{ => model}/AiChatRoleDO.java (40%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java index d87c980baf..993cabdcd2 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java @@ -4,6 +4,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; // TODO done @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 +// TODO @fan: AiModelEnum 是不是可以缩写成这个哈;所有的模型,都写在这里枚举; /** * @author: fansili * @time: 2024/3/4 12:36 @@ -12,24 +13,18 @@ import lombok.Getter; @AllArgsConstructor public enum AiOpenAiModelEnum { - /** - * open ai 3.5模型 - */ + OPEN_AI_GPT_3_5("gpt-3.5-turbo", "GPT3.5"), - /** - * open ai 4.0 收费模型 - */ OPEN_AI_GPT_4("gpt-4-turbo", "GPT4") - ; /** - * 模型 - 用于参数传递 + * 模型标志 - 用于参数传递 */ - private String model; + private final String model; /** * 模型名字 - 用于展示 */ - private String name; + private final String name; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java new file mode 100644 index 0000000000..6dfd0de125 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Tag(name = "管理后台 - 聊天会话") +@RestController +@RequestMapping("/ai/chat/conversation") +@Slf4j +public class AiChatConversationControllerV2 { + + public CommonResult> + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java new file mode 100644 index 0000000000..0e2d34fb4e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java new file mode 100644 index 0000000000..f28cc7058d --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java @@ -0,0 +1,4 @@ +/** + * TODO 芋艿:站位,无特殊作用 + */ +package cn.iocoder.yudao.module.ai.controller.admin; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java new file mode 100644 index 0000000000..05b1ce233c --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/app/package-info.java @@ -0,0 +1,4 @@ +/** + * TODO 芋艿:站位,无特殊作用 + */ +package cn.iocoder.yudao.module.ai.controller.app; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java new file mode 100644 index 0000000000..68dfddfa3e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/package-info.java @@ -0,0 +1,6 @@ +/** + * 提供 RESTful API 给前端: + * 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目 + * 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分 + */ +package cn.iocoder.yudao.module.ai.controller; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java index d6c93a1a50..0122119260 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index 3a920a4663..14f410a1eb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.vo.AiChatMessageListRes; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index 52e47e05b0..cd6714fdff 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java index bb936b998e..b056a6d064 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.vo.AiChatRoleAddReq; import cn.iocoder.yudao.module.ai.vo.AiChatRoleRes; import cn.iocoder.yudao.module.ai.vo.AiChatRoleUpdateReq; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java deleted file mode 100644 index 1344d9956d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatConversationDO.java +++ /dev/null @@ -1,47 +0,0 @@ -package cn.iocoder.yudao.module.ai.dal.dataobject; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 交谈 - * - * @author fansili - * @time 2024/4/14 17:35 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -@TableName("ai_chat_conversation") -public class AiChatConversationDO extends BaseDO { - - @Schema(description = "id") - private Long id; - - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "chat角色Id") - private Long roleId; - - @Schema(description = "chat角色名称") - private String roleName; - - @Schema(description = "模型id") - private Long modalId; - - @Schema(description = "使用的模型") - private String modal; - - @Schema(description = "标题") - private String title; - - @Schema(description = "对话类型(roleChat、userChat)") - private String type; - - @Schema(description = "聊天次数(有程序自动生成)") - private Integer chatCount; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java deleted file mode 100644 index 5ed372ab48..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatMessageDO.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.iocoder.yudao.module.ai.dal.dataobject; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * ai 聊天 message - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -@TableName("ai_chat_message") -public class AiChatMessageDO extends BaseDO { - - /** - * 编号,作为每条聊天记录的唯一标识符 - */ - private Long id; - - /** - * 聊天ID,关联到特定的会话或对话 - */ - private Long chatConversationId; - - /** - * 角色ID,用于标识发送消息的用户或系统的身份 - */ - private Long userId; - - /** - * 消息具体内容,存储用户的发言或者系统响应的文字信息 - */ - private String message; - - /** - * 消息类型,枚举值可能包括'system'(系统消息)、'user'(用户消息)和'assistant'(助手消息) - */ - private String messageType; - - /** - * 在生成消息时采用的Top-K采样大小, - * 表示模型生成回复时考虑的候选项集合的大小 - */ - private Double topK; - - /** - * Top-P核采样方法的概率阈值, - * 在语言模型生成过程中控制采样的过滤标准 - */ - private Double topP; - - /** - * 温度参数,用于调整生成回复的随机性和多样性程度, - * 较低的温度值会使输出更收敛于高频词汇,较高的则增加多样性 - */ - private Double temperature; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java new file mode 100644 index 0000000000..4ac9770116 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -0,0 +1,86 @@ +package cn.iocoder.yudao.module.ai.dal.dataobject.chat; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.enums.AiOpenAiModelEnum; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * AI Chat 会话 DO + * + * 用户每次发起 Chat 聊天时,会创建一个 {@link AiChatConversationDO} 对象,将它的消息关联在一起 + * + * @author fansili + * @since 2024/4/14 17:35 + */ +@TableName("ai_chat_conversation") +@KeySequence("ai_chat_conversation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AiChatConversationDO extends BaseDO { + + /** + * ID 编号,自增 + */ + @TableId + private Long id; + + /** + * 用户编号 + * + * 关联 AdminUserDO 的 userId 字段 + */ + private Long userId; + + /** + * 标题 + * + * 默认由系统自动生成,可用户手动修改 + */ + private String title; + + /** + * 角色编号 + * + * 关联 {@link AiChatRoleDO#getId()} + */ + private Long roleId; + /** + * 模型标志 + * + * 枚举 {@link AiOpenAiModelEnum} + */ + private String model; + + /** + * 模型编号 + * + * 关联 {@link AiChatModalDO#getId()} 字段 + */ + private Long modelId; + + // ========== 会话配置 ========== + + /** + * 温度参数 + * + * 用于调整生成回复的随机性和多样性程度:较低的温度值会使输出更收敛于高频词汇,较高的则增加多样性 + */ + private Double temperature; + /** + * 上下文数量 + */ + private Integer contextCount; + /** + * 单条回复的 Token 数量 + */ + private Integer maxTokens; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java new file mode 100644 index 0000000000..096fff4290 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -0,0 +1,109 @@ +package cn.iocoder.yudao.module.ai.dal.dataobject.chat; + +import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.enums.AiOpenAiModelEnum; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * AI Chat 消息 DO + * + * @since 2024/4/14 17:35 + * @since 2024/4/14 17:35 + */ +@TableName("ai_chat_message") +@KeySequence("ai_chat_conversation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AiChatMessageDO extends BaseDO { + + /** + * 编号,作为每条聊天记录的唯一标识符 + */ + private Long id; + + /** + * 会话编号 + * + * 关联 {@link AiChatConversationDO#getId()} + */ + private Long conversationId; + + /** + * 消息类型 + * + * 也等价于 OpenAPI 的 role 字段 + * + * 枚举 {@link MessageType} + */ + private String type; + /** + * 用户编号 + * + * 仅当 user 发送时非空 + * + * 关联 AdminUserDO 的 userId 字段 + */ + private Long userId; + /** + * 角色编号 + * + * 仅当 assistant 回复时非空 + * + * 关联 {@link AiChatRoleDO#getId()} 字段 + */ + private Long roleId; + + /** + * 模型标志 + * + * 枚举 {@link AiOpenAiModelEnum} + */ + private String model; + /** + * 模型编号 + * + * 关联 {@link AiChatModalDO#getId()} 字段 + */ + private Long modelId; + + /** + * 聊天内容 + */ + private String content; + /** + * 消耗 Token 数量 + */ + private Integer usedTokens; + + // TODO 芋艿:是否作为上下文语料?use_context,待定 + + // ========== 会话配置 ========== + + /** + * 上下文数量 + * + * 冗余 {@link AiChatConversationDO#getContextCount()} + */ + private Integer contextCount; + /** + * 温度参数 + * + * 冗余 {@link AiChatConversationDO#getTemperature()} + */ + private Double temperature; + /** + * 单条回复的 Token 数量 + * + * 冗余 {@link AiChatConversationDO#getMaxTokens()} + */ + private Integer maxTokens; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiImageDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index cba6e2800e..1908100955 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject.image; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java new file mode 100644 index 0000000000..9512f4c5e3 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.ai.dal.dataobject.model; + +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * AI API 秘钥 DO + * + * @author 芋道源码 + */ +@TableName("ai_api_key") +@KeySequence("ai_chat_conversation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AiApiKeyDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + /** + * 名称 + */ + private String name; + /** + * 平台 + * + * 枚举 {@link AiPlatformEnum} + */ + private String platform; + /** + * 用途 + * + * TODO 芋艿:枚举;chat、image + */ + private Integer type; + /** + * API 地址 + */ + private String url; + /** + * 状态 + * + * 枚举 {@link CommonStatusEnum} + */ + private Integer status; + + // TODO 芋艿:proxyUrl 代理地址 + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java similarity index 35% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java index cb045c549d..71bc7fefa8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatModalDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java @@ -1,12 +1,15 @@ -package cn.iocoder.yudao.module.ai.dal.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject.model; +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.experimental.Accessors; /** - * ai 模型 + * AI 聊天模型 DO * * @author fansili * @time 2024/4/24 19:39 @@ -20,36 +23,53 @@ public class AiChatModalDO extends BaseDO { /** * 编号 */ + @TableId private Long id; /** - * 名字 + * API 秘钥编号 + * + * 关联 {@link AiApiKeyDO#getId()} + */ + private Long key_id; + /** + * 模型名称 */ private String name; /** - * 类型 - * {@link cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel} - * {@link cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel} + * 模型标志 */ - private String modal; + private String model; /** - * 平台 参考:{@link cn.iocoder.yudao.framework.ai.AiPlatformEnum} + * 平台 + * + * 枚举 {@link AiPlatformEnum} */ private String platform; + /** - * 图片地址 + * 排序值 */ - private String imageUrl; + private Integer sort; /** - * 禁用 0、正常 1、禁用 + * 状态 + * + * 枚举 {@link CommonStatusEnum} */ - private Integer disable; + private Integer status; + + // ========== 会话配置 ========== + /** - * 排序 + * 温度参数 + * + * 用于调整生成回复的随机性和多样性程度:较低的温度值会使输出更收敛于高频词汇,较高的则增加多样性 */ - private Integer sort; + private Double temperature; /** - * modal 配置(json) + * 单条回复的 Token 数量 */ - private String config; + private Integer maxTokens; + + // TODO 芋艿:到底使用 max_context、还是 contextCount,待定!一个是轮次,一个是长度数量;貌似轮次更常用一点; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java similarity index 40% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java index 8ceb886e4a..c098e42e06 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java @@ -1,5 +1,6 @@ -package cn.iocoder.yudao.module.ai.dal.dataobject; +package cn.iocoder.yudao.module.ai.dal.dataobject.model; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; @@ -17,40 +18,65 @@ import lombok.experimental.Accessors; @Accessors(chain = true) @TableName("ai_chat_role") public class AiChatRoleDO extends BaseDO { + /** - * 编号,表示聊天角色在数据库中的唯一标识符 + * 编号 */ - @TableId(type = IdType.AUTO) + @TableId private Long id; - /** - * 用户ID,关联到使用该聊天角色的用户 + * 角色名称 */ - private Long userId; - + private String name; /** - * 角色名,角色的显示名称 + * 角色头像 */ - private String name; + private String avatar; + /** + * 角色分类 + */ + private String category; + /** + * 角色描述 + */ + private String description; + /** + * 角色欢迎语 + */ + private String welcomeMessage; /** - * 角色介绍,详细描述角色的功能或用途 + * 用户编号 + * + * 关联 AdminUserDO 的 userId 字段 */ - private String introduce; + private Long userId; /** - * 分类,角色所属的类别,如娱乐、创作等 + * 模型编号 + * + * 关联 {@link AiChatModalDO#getId()} 字段 */ - private String classify; + private String modelId; /** - * 是否开启 open、close + * 是否公开 + * + * true - 公开;false - 私有 */ - private String enable; + private Boolean publicStatus; /** - * 角色的使用次数统计 + * 排序值 + */ + private Integer sort; + /** + * 状态 + * + * 枚举 {@link CommonStatusEnum} */ - private Integer useCount; + private Integer status; + + // TODO 芋艿:要不要加一个 context,内置的上下文 } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java index 6da3fdc5b3..1d10db144f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java index cdac20ad66..7227d6fc56 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -24,7 +24,7 @@ public interface AiChatMessageMapper extends BaseMapperX { */ default int deleteByConversationAndId(Long chatConversationId, Long id) { return this.delete(new LambdaQueryWrapperX() - .eq(AiChatMessageDO::getChatConversationId, chatConversationId) + .eq(AiChatMessageDO::getConversationId, chatConversationId) .eq(AiChatMessageDO::getId, id) ); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java index 450791f41c..7eb5f218e1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java @@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java index 9f415cadfb..e96c608105 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java index 42cde4c58f..dfad53d628 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.mapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiImageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 5906138b8b..160f8b7b17 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -4,8 +4,6 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import cn.iocoder.yudao.module.ai.enums.AiChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java index 576fff3f5c..ae691daee8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java @@ -6,8 +6,8 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatMessageService; @@ -38,7 +38,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { public PageResult list(AiChatMessageReq req) { // 查询 LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); - queryWrapperX.eq(AiChatMessageDO::getChatConversationId, req.getChatConversationId()); + queryWrapperX.eq(AiChatMessageDO::getConversationId, req.getChatConversationId()); // 默认排序 queryWrapperX.orderByDesc(AiChatMessageDO::getId); PageResult pageResult = aiChatMessageMapper.selectPage(req, queryWrapperX); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 4fc210bafa..59de1b6e90 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -12,7 +12,6 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalChatConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalDallConfigVO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index fe36ee43b9..5ca5af4faa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiChatRoleClassifyEnum; import cn.iocoder.yudao.module.ai.enums.AiChatRoleEnableEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index ed2f02697b..d6159b89f4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -10,7 +10,7 @@ import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; @@ -89,7 +89,7 @@ public class AiChatServiceImpl implements AiChatService { aiChatMessageMapper.insert( new AiChatMessageDO() .setId(null) - .setChatConversationId(chatConversationId) + .setConversationId(chatConversationId) .setUserId(loginUserId) .setMessage(req.getPrompt()) .setMessageType(MessageType.USER.getValue()) @@ -107,7 +107,7 @@ public class AiChatServiceImpl implements AiChatService { aiChatMessageMapper.insert( new AiChatMessageDO() .setId(null) - .setChatConversationId(chatConversationId) + .setConversationId(chatConversationId) .setUserId(loginUserId) .setMessage(systemPrompts) .setMessageType(MessageType.SYSTEM.getValue()) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index fb5ebf6908..ca23eb7861 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -15,7 +15,7 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiImageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; import cn.iocoder.yudao.module.ai.mapper.AiImageMapper; import cn.iocoder.yudao.module.ai.service.AiImageService; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index a5d9fa80a5..68f6397654 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiImageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; import cn.iocoder.yudao.module.ai.mapper.AiImageMapper; import com.alibaba.fastjson2.JSON; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java index ce99e39db3..31d5e86f1e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.ai.vo; -import cn.iocoder.yudao.module.ai.dal.dataobject.AiChatModalDO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -- Gitee From 2df0babc36cad69f579e9dcefa0d938f855ad3d5 Mon Sep 17 00:00:00 2001 From: "zhijiantianya@gmail.com" Date: Mon, 6 May 2024 21:47:29 +0800 Subject: [PATCH 0468/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E8=B0=83=E6=95=B4=20conversation?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AiChatConversationController.java | 72 ------------------- .../chat/AiChatConversationController.java | 64 +++++++++++++++++ .../chat/AiChatConversationControllerV2.java | 17 ----- .../AiChatConversationCreateReqVO.java} | 20 ++---- .../AiChatConversationRespVO.java | 39 ++++++++++ .../AiChatConversationUpdateReqVO.java | 33 +++++++++ .../admin/chat/vo/message/package-info.java | 1 + .../admin/chat/vo/package-info.java | 1 - .../admin/{ => image}/package-info.java | 2 +- .../ai/convert/AiChatConversationConvert.java | 6 +- .../dataobject/chat/AiChatConversationDO.java | 26 ++++--- .../dal/dataobject/chat/AiChatMessageDO.java | 14 ++-- .../dal/dataobject/model/AiChatModalDO.java | 24 ++++--- .../ai/dal/dataobject/model/AiChatRoleDO.java | 32 ++++++--- .../ai/service/AiChatConversationService.java | 14 ++-- .../impl/AiChatConversationServiceImpl.java | 10 +-- .../ai/service/impl/AiChatServiceImpl.java | 10 +-- .../vo/AiChatConversationCreateRoleReq.java | 26 ------- .../ai/vo/AiChatConversationListReq.java | 20 ------ .../module/ai/vo/AiChatConversationRes.java | 45 ------------ 20 files changed, 223 insertions(+), 253 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo/AiChatConversationCreateUserReq.java => controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java} (33%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/{ => image}/package-info.java (46%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationListReq.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java deleted file mode 100644 index 6d5cb31549..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatConversationController.java +++ /dev/null @@ -1,72 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateRoleReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateUserReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * ia 模块 - * - * @author fansili - * @time 2024/4/13 17:44 - * @since 1.0 - */ -@Tag(name = "A2-聊天-对话") -@RestController -@RequestMapping("/ai/chat/conversation") -@Slf4j -@AllArgsConstructor -public class AiChatConversationController { - - private final AiChatConversationService chatConversationService; - - @Operation(summary = "创建 - 对话普通对话") - @PutMapping("/createConversation") - public CommonResult createConversation(@RequestBody @Validated AiChatConversationCreateUserReq req) { - return CommonResult.success(chatConversationService.createConversation(req)); - } - - @Operation(summary = "创建 - 对话角色对话") - @PutMapping("/createRoleConversation") - public CommonResult createRoleConversation(@RequestBody @Validated AiChatConversationCreateRoleReq req) { - return CommonResult.success(chatConversationService.createRoleConversation(req)); - } - - @Operation(summary = "获取 - 获取对话") - @GetMapping("/{id}") - public CommonResult getConversation(@PathVariable("id") Long id) { - return CommonResult.success(chatConversationService.getConversation(id)); - } - - @Operation(summary = "获取 - 获取对话list") - @GetMapping("/list") - public CommonResult> listConversation(@ModelAttribute @Validated AiChatConversationListReq req) { - return CommonResult.success(chatConversationService.listConversation(req)); - } - - @Operation(summary = "更新 - 更新模型") - @PostMapping("/{id}/modal") - public CommonResult updateModal(@PathVariable("id") Long id, - @RequestParam("modalId") Long modalId) { - chatConversationService.updateModal(id, modalId); - return CommonResult.success(null); - } - - @Operation(summary = "删除") - @DeleteMapping("/{id}") - public CommonResult delete(@PathVariable("id") Long id) { - chatConversationService.delete(id); - return CommonResult.success(null); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java new file mode 100644 index 0000000000..f8a7d8d1b4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 聊天会话") +@RestController +@RequestMapping("/ai/chat/conversation") +@Slf4j +public class AiChatConversationController { + + // TODO @fan:实现一下 + @PostMapping("/create") + @Operation(summary = "创建聊天会话") + @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") + public CommonResult createConversation(@RequestBody @Valid AiChatConversationCreateReqVO createReqVO) { + return success(1L); + } + + // TODO @fan:实现一下 + @PutMapping("/update") + @Operation(summary = "更新聊天会话") + @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") + public CommonResult updateConversation(@RequestBody @Valid AiChatConversationUpdateReqVO updateReqVO) { + return success(true); + } + + // TODO @fan:实现一下 + @GetMapping("/list") + @Operation(summary = "获得聊天会话列表") + public CommonResult> getConversationList() { + return success(null); + } + + // TODO @fan:实现一下 + @GetMapping("/get") + @Operation(summary = "获得聊天会话") + @Parameter(name = "id", required = true, description = "会话编号", example = "1024") + public CommonResult getConversation(@RequestParam("id") Long id) { + return success(null); + } + + // TODO @fan:实现一下 + @DeleteMapping("/delete") + @Operation(summary = "删除聊天会话") + @Parameter(name = "id", required = true, description = "会话编号", example = "1024") + public CommonResult deleteConversation(@RequestParam("id") Long id) { + return success(null); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java deleted file mode 100644 index 6dfd0de125..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationControllerV2.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Tag(name = "管理后台 - 聊天会话") -@RestController -@RequestMapping("/ai/chat/conversation") -@Slf4j -public class AiChatConversationControllerV2 { - - public CommonResult> - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java similarity index 33% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java index 9e3af32a07..b1e1196592 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateUserReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java @@ -1,23 +1,17 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; import lombok.experimental.Accessors; -/** - * 聊天对话 - * - * @author fansili - * @time 2024/4/18 16:24 - * @since 1.0 - */ +@Schema(description = "管理后台 - AI 聊天会话创建 Request VO") @Data -@Accessors(chain = true) -public class AiChatConversationCreateUserReq { +public class AiChatConversationCreateReqVO { - @Schema(description = "对话标题") - @NotNull(message = "标题不能为空!") - private String title; + @Schema(description = "角色编号", example = "666") + private Long roleId; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java new file mode 100644 index 0000000000..720736f217 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +@Schema(description = "管理后台 - AI 聊天会话 Response VO") +@Data +public class AiChatConversationRespVO { + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private Long id; + + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") + private Long userId; + + @Schema(description = "会话标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个标题") + private String title; + + @Schema(description = "是否置顶", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean pinned; + + @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long modelId; + + @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "ERNIE-Bot-turbo-0922") + private String model; + + @Schema(description = "温度参数", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.8") + private Double temperature; + + @Schema(description = "单条回复的最大 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer maxContexts; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java new file mode 100644 index 0000000000..e8bdabb19b --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - AI 聊天会话更新 Request VO") +@Data +public class AiChatConversationUpdateReqVO { + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "会话编号不能为空") + private Long id; + + @Schema(description = "会话标题", example = "我是一个标题") + private String title; + + @Schema(description = "是否置顶", example = "true") + private Boolean pinned; + + @Schema(description = "模型编号", example = "1") + private Long modelId; + + @Schema(description = "温度参数", example = "0.8") + private Double temperature; + + @Schema(description = "单条回复的最大 Token 数量", example = "4096") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量", example = "10") + private Integer maxContexts; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java new file mode 100644 index 0000000000..5fee7106db --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java deleted file mode 100644 index 0e2d34fb4e..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java similarity index 46% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java index f28cc7058d..9bc6965a12 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/package-info.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java @@ -1,4 +1,4 @@ /** * TODO 芋艿:站位,无特殊作用 */ -package cn.iocoder.yudao.module.ai.controller.admin; \ No newline at end of file +package cn.iocoder.yudao.module.ai.controller.admin.image; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java index 0122119260..af1a0bb21b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -25,7 +25,7 @@ public interface AiChatConversationConvert { * @param top100Conversation * @return */ - List covnertChatConversationResList(List top100Conversation); + List covnertChatConversationResList(List top100Conversation); /** * 转换 - 单个 ChatConversationRes @@ -33,5 +33,5 @@ public interface AiChatConversationConvert { * @param aiChatConversationDO * @return */ - AiChatConversationRes covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); + AiChatConversationRespVO covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index 4ac9770116..9a436b9882 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -40,11 +40,15 @@ public class AiChatConversationDO extends BaseDO { private Long userId; /** - * 标题 + * 会话标题 * * 默认由系统自动生成,可用户手动修改 */ private String title; + /** + * 是否置顶 + */ + private Boolean pinned; /** * 角色编号 @@ -52,12 +56,6 @@ public class AiChatConversationDO extends BaseDO { * 关联 {@link AiChatRoleDO#getId()} */ private Long roleId; - /** - * 模型标志 - * - * 枚举 {@link AiOpenAiModelEnum} - */ - private String model; /** * 模型编号 @@ -65,6 +63,12 @@ public class AiChatConversationDO extends BaseDO { * 关联 {@link AiChatModalDO#getId()} 字段 */ private Long modelId; + /** + * 模型标志 + * + * 枚举 {@link AiOpenAiModelEnum} + */ + private String model; // ========== 会话配置 ========== @@ -75,12 +79,12 @@ public class AiChatConversationDO extends BaseDO { */ private Double temperature; /** - * 上下文数量 + * 单条回复的最大 Token 数量 */ - private Integer contextCount; + private Integer maxTokens; /** - * 单条回复的 Token 数量 + * 上下文的最大 Message 数量 */ - private Integer maxTokens; + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 096fff4290..4d44e82a09 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -87,12 +87,6 @@ public class AiChatMessageDO extends BaseDO { // ========== 会话配置 ========== - /** - * 上下文数量 - * - * 冗余 {@link AiChatConversationDO#getContextCount()} - */ - private Integer contextCount; /** * 温度参数 * @@ -100,10 +94,16 @@ public class AiChatMessageDO extends BaseDO { */ private Double temperature; /** - * 单条回复的 Token 数量 + * 单条回复的最大 Token 数量 * * 冗余 {@link AiChatConversationDO#getMaxTokens()} */ private Integer maxTokens; + /** + * 上下文的最大 Message 数量 + * + * 冗余 {@link AiChatConversationDO#getMaxContexts()} + */ + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java index 71bc7fefa8..a35fa0e69a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java @@ -3,21 +3,25 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.model; import cn.iocoder.yudao.framework.ai.AiPlatformEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; +import lombok.*; import lombok.experimental.Accessors; /** * AI 聊天模型 DO * * @author fansili - * @time 2024/4/24 19:39 - * @since 1.0 + * @since 2024/4/24 19:39 */ +@TableName("ai_chat_model") +@KeySequence("ai_chat_model_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -@Accessors(chain = true) -@TableName("ai_chat_modal") +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor public class AiChatModalDO extends BaseDO { /** @@ -30,7 +34,7 @@ public class AiChatModalDO extends BaseDO { * * 关联 {@link AiApiKeyDO#getId()} */ - private Long key_id; + private Long keyId; /** * 模型名称 */ @@ -66,10 +70,12 @@ public class AiChatModalDO extends BaseDO { */ private Double temperature; /** - * 单条回复的 Token 数量 + * 单条回复的最大 Token 数量 */ private Integer maxTokens; - - // TODO 芋艿:到底使用 max_context、还是 contextCount,待定!一个是轮次,一个是长度数量;貌似轮次更常用一点; + /** + * 上下文的最大 Message 数量 + */ + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java index c098e42e06..bb48f524d7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java @@ -1,22 +1,30 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.model; +import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; +import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler; +import lombok.*; import lombok.experimental.Accessors; +import java.io.Serializable; +import java.util.List; + /** - * ai 聊天角色 + * AI 聊天角色 DO * - * @fansili - * @since v1.0 + * @author fansili + * @since 2024/4/24 19:39 */ +@TableName(value = "ai_chat_role", autoResultMap = true) +@KeySequence("ai_chat_role_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -@Accessors(chain = true) -@TableName("ai_chat_role") +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor public class AiChatRoleDO extends BaseDO { /** @@ -44,6 +52,10 @@ public class AiChatRoleDO extends BaseDO { * 角色欢迎语 */ private String welcomeMessage; + /** + * 角色设定(消息) + */ + private String systemMessage; /** * 用户编号 @@ -77,6 +89,4 @@ public class AiChatRoleDO extends BaseDO { */ private Integer status; - // TODO 芋艿:要不要加一个 context,内置的上下文 - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java index 1a4c767a13..86592e5e85 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java @@ -1,9 +1,7 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateRoleReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationCreateUserReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import java.util.List; @@ -21,7 +19,7 @@ public interface AiChatConversationService { * @param req * @return */ - AiChatConversationRes createConversation(AiChatConversationCreateUserReq req); + AiChatConversationRespVO createConversation(AiChatConversationCreateUserReq req); /** * 对话 - 创建role对话 @@ -29,7 +27,7 @@ public interface AiChatConversationService { * @param req * @return */ - AiChatConversationRes createRoleConversation(AiChatConversationCreateRoleReq req); + AiChatConversationRespVO createRoleConversation(AiChatConversationCreateReqVO req); /** @@ -38,7 +36,7 @@ public interface AiChatConversationService { * @param id * @return */ - AiChatConversationRes getConversation(Long id); + AiChatConversationRespVO getConversation(Long id); /** * 获取 - 对话列表 @@ -46,7 +44,7 @@ public interface AiChatConversationService { * @param req * @return */ - List listConversation(AiChatConversationListReq req); + List listConversation(AiChatConversationListReq req); /** * 更新 - 更新模型 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 160f8b7b17..1a8425cc53 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.enums.AiChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; @@ -38,7 +40,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService private final AiChatRoleService aiChatRoleService; @Override - public AiChatConversationRes createConversation(AiChatConversationCreateUserReq req) { + public AiChatConversationRespVO createConversation(AiChatConversationCreateUserReq req) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询最新的对话 @@ -58,7 +60,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public AiChatConversationRes createRoleConversation(AiChatConversationCreateRoleReq req) { + public AiChatConversationRespVO createRoleConversation(AiChatConversationCreateReqVO req) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询最新的对话 @@ -101,7 +103,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public AiChatConversationRes getConversation(Long id) { + public AiChatConversationRespVO getConversation(Long id) { AiChatConversationDO aiChatConversationDO = validateExists(id); return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); } @@ -115,7 +117,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public List listConversation(AiChatConversationListReq req) { + public List listConversation(AiChatConversationListReq req) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询前100对话 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index d6159b89f4..c70b56aa09 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -16,7 +16,7 @@ import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatService; -import cn.iocoder.yudao.module.ai.vo.AiChatConversationRes; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.vo.AiChatReq; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -58,7 +58,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); // 获取对话信息 - AiChatConversationRes conversationRes = chatConversationService.getConversation(req.getConversationId()); + AiChatConversationRespVO conversationRes = chatConversationService.getConversation(req.getConversationId()); // 保存 chat message saveChatMessage(req, conversationRes, loginUserId); String content = null; @@ -83,7 +83,7 @@ public class AiChatServiceImpl implements AiChatService { return content; } - private void saveChatMessage(AiChatReq req, AiChatConversationRes conversationRes, Long loginUserId) { + private void saveChatMessage(AiChatReq req, AiChatConversationRespVO conversationRes, Long loginUserId) { Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( @@ -101,7 +101,7 @@ public class AiChatServiceImpl implements AiChatService { aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - public void saveSystemChatMessage(AiChatReq req, AiChatConversationRes conversationRes, Long loginUserId, String systemPrompts) { + public void saveSystemChatMessage(AiChatReq req, AiChatConversationRespVO conversationRes, Long loginUserId, String systemPrompts) { Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( @@ -133,7 +133,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); // 获取对话信息 - AiChatConversationRes conversationRes = chatConversationService.getConversation(req.getConversationId()); + AiChatConversationRespVO conversationRes = chatConversationService.getConversation(req.getConversationId()); // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getPrompt()); req.setTopK(req.getTopK()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java deleted file mode 100644 index 0dc095bc12..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationCreateRoleReq.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * 聊天对话 - * - * @author fansili - * @time 2024/4/18 16:24 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatConversationCreateRoleReq { - - @Schema(description = "chat角色Id") - @NotNull(message = "聊天角色id不能为空!") - private Long roleId; - - @Schema(description = "标题(有程序自动生成)") - @NotNull(message = "标题不能为空!") - private String title; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationListReq.java deleted file mode 100644 index 208bf67a2d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationListReq.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * 聊天对话 list req - * - * @author fansili - * @time 2024/4/18 16:24 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatConversationListReq { - - @Schema(description = "查询根据title") - private String search; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java deleted file mode 100644 index 9e181bd01d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatConversationRes.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * 聊天对话 res - * - * @author fansili - * @time 2024/4/18 16:24 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatConversationRes { - - @Schema(description = "id") - private Long id; - - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "chat角色Id") - private Long roleId; - - @Schema(description = "chat角色名称") - private String roleName; - - @Schema(description = "模型id") - private Long modalId; - - @Schema(description = "使用的模型") - private String modal; - - @Schema(description = "标题(有程序自动生成)") - private String title; - - @Schema(description = "对话类型(roleChat、userChat)") - private String type; - - @Schema(description = "聊天次数(有程序自动生成)") - private Integer chatCount; - -} -- Gitee From aea7cc000b4ca9d1c40fb58b45df91ad73e53260 Mon Sep 17 00:00:00 2001 From: "zhijiantianya@gmail.com" Date: Mon, 6 May 2024 22:28:56 +0800 Subject: [PATCH 0469/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E8=B0=83=E6=95=B4=20message=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/AiChatController.java | 50 --------------- .../controller/AiChatMessageController.java | 44 ------------- .../admin/chat/AiChatMessageController.java | 62 +++++++++++++++++++ .../chat/vo/message/AiChatMessageRespVO.java | 37 +++++++++++ .../vo/message/AiChatMessageSendReqVO.java | 22 +++++++ .../admin/chat/vo/message/package-info.java | 1 - .../ai/convert/AiChatMessageConvert.java | 4 +- .../dal/dataobject/chat/AiChatMessageDO.java | 2 +- .../iocoder/yudao/module/ai/dal/pageinfo.java | 7 --- .../ai/service/AiChatMessageService.java | 5 +- .../module/ai/service/AiChatService.java | 6 +- .../impl/AiChatMessageServiceImpl.java | 7 +-- .../ai/service/impl/AiChatServiceImpl.java | 10 +-- .../module/ai/vo/AiChatMessageDeleteReq.java | 28 --------- .../module/ai/vo/AiChatMessageListRes.java | 42 ------------- .../yudao/module/ai/vo/AiChatMessageReq.java | 24 ------- .../iocoder/yudao/module/ai/vo/AiChatReq.java | 48 -------------- .../yudao/module/ai/vo/AiChatReqVO.java | 21 ------- 18 files changed, 137 insertions(+), 283 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatController.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatMessageController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/pageinfo.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageDeleteReq.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageListRes.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageReq.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReq.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatController.java deleted file mode 100644 index 09b83fcad8..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatController.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.service.AiChatService; -import cn.iocoder.yudao.module.ai.vo.AiChatReq; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -/** - * ia 模块 - * - * @author fansili - * @time 2024/4/13 17:44 - * @since 1.0 - */ -@Tag(name = "A1-AI聊天") -@RestController -@RequestMapping("/ai") -@Slf4j -@AllArgsConstructor -public class AiChatController { - - @Autowired - private final AiChatService chatService; - - @Operation(summary = "聊天-chat", description = "这个一般等待时间比较久,需要全部完成才会返回!") - @GetMapping("/chat") - public CommonResult chat(@Validated @ModelAttribute AiChatReq req) { - return CommonResult.success(chatService.chat(req)); - } - - // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed. - @Operation(summary = "聊天-stream", description = "这里跟通义千问一样采用的是 Server-Sent Events (SSE) 通讯模式") - @GetMapping(value = "/chatStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) - public SseEmitter chatStream(@Validated @ModelAttribute AiChatReq req) { - Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - chatService.chatStream(req, sseEmitter); - return sseEmitter; - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatMessageController.java deleted file mode 100644 index ecfb6c865d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatMessageController.java +++ /dev/null @@ -1,44 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.service.AiChatMessageService; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageReq; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * chat message - * - * @author fansili - * @time 2024/4/24 17:22 - * @since 1.0 - */ -@Tag(name = "A3-聊天-对话") -@RestController -@RequestMapping("/ai/chat/message") -@Slf4j -@AllArgsConstructor -public class AiChatMessageController { - - private final AiChatMessageService chatMessageService; - - @Operation(summary = "聊天记录", description = "查询个人的聊天记录") - @GetMapping("/list") - public PageResult list(@Validated @ModelAttribute AiChatMessageReq req) { - return chatMessageService.list(req); - } - - @Operation(summary = "聊天记录 - 删除", description = "删除记录") - @DeleteMapping("/{chatConversationId}/{id}") - public CommonResult delete(@PathVariable("chatConversationId") Long chatConversationId, - @PathVariable("id") Long id) { - chatMessageService.delete(chatConversationId, id); - return CommonResult.success(null); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java new file mode 100644 index 0000000000..473f1c8567 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; +import cn.iocoder.yudao.module.ai.service.AiChatService; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.MediaType; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +// TODO @芋艿:权限标识; +@Tag(name = "管理后台 - 聊天消息") +@RestController +@RequestMapping("/ai/chat/message") +@Slf4j +public class AiChatMessageController { + @Resource + private AiChatService chatService; + + @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") + @PostMapping("/send") + public CommonResult sendMessage(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { + // TODO @fan:使用 static import;这样就 success 就行了; + return success(null); + } + + // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed.;可以再试试 + // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux + @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") + @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) + public SseEmitter sendMessageStream(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { + Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); + chatService.chatStream(sendReqVO, sseEmitter); + return sseEmitter; + } + + @Operation(summary = "获得指定会话的消息列表") + @GetMapping("/list-by-conversation-id") + @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") + public CommonResult> getMessageListByConversationId(@RequestParam("conversationId") Long conversationId) { + return success(null); + } + + @Operation(summary = "删除消息") + @DeleteMapping("/delete") + @Parameter(name = "id", required = true, description = "消息编号", example = "1024") + public CommonResult delete(@RequestParam("id") Long id) { + return success(null); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java new file mode 100644 index 0000000000..d5f830d171 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - AI 聊天消息 Response VO") +@Data +public class AiChatMessageRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private Long id; + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") + private Long conversationId; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "role") + private String type; // 参见 MessageType 枚举类 + + @Schema(description = "用户编号", example = "4096") + private Long userId; // 仅当 user 发送时非空 + + @Schema(description = "角色编号", example = "888") + private Long roleId; // 仅当 assistant 回复时非空 + + @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "gpt-3.5-turbo") + private String model; // 参见 AiOpenAiModelEnum 枚举类 + + @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123") + private Long modelId; + + @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") + private String content; + + @Schema(description = "消耗 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "80") + private Integer tokens; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java new file mode 100644 index 0000000000..9592da3475 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.experimental.Accessors; + +@Schema(description = "管理后台 - AI 聊天消息发送 Request VO") +@Data +public class AiChatMessageSendReqVO { + + @Schema(description = "聊天对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "聊天对话编号不能为空") + private Long conversationId; + + @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "帮我写个 Java 算法") + @NotEmpty(message = "聊天内容不能为空") + private String content; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java deleted file mode 100644 index 5fee7106db..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index 14f410a1eb..c84ecb404a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageListRes; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -25,5 +25,5 @@ public interface AiChatMessageConvert { * @param list * @return */ - List convert(List list); + List convert(List list); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 4d44e82a09..f5a5296a74 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -81,7 +81,7 @@ public class AiChatMessageDO extends BaseDO { /** * 消耗 Token 数量 */ - private Integer usedTokens; + private Integer tokens; // TODO 芋艿:是否作为上下文语料?use_context,待定 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/pageinfo.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/pageinfo.java deleted file mode 100644 index ce40011125..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/pageinfo.java +++ /dev/null @@ -1,7 +0,0 @@ -package cn.iocoder.yudao.module.ai.dal; - -/** - * @author fansili - * @time 2024/4/25 15:36 - * @since 1.0 - */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java index ef1cfa4689..77450c63ba 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageReq; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; /** * chat message @@ -19,7 +18,7 @@ public interface AiChatMessageService { * @param req * @return */ - PageResult list(AiChatMessageReq req); + PageResult list(AiChatMessageReq req); /** * message - 删除 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index b3596e9cf3..c054e41faa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.vo.AiChatReq; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; /** * 聊天 chat @@ -18,7 +18,7 @@ public interface AiChatService { * @param req * @return */ - String chat(AiChatReq req); + String chat(AiChatMessageSendReqVO req); /** * chat stream @@ -27,5 +27,5 @@ public interface AiChatService { * @param sseEmitter * @return */ - void chatStream(AiChatReq req, Utf8SseEmitter sseEmitter); + void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java index ae691daee8..ae5a594cb0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java @@ -11,8 +11,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatMessageService; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatMessageReq; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -35,7 +34,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { private final AiChatConversationMapper aiChatConversationMapper; @Override - public PageResult list(AiChatMessageReq req) { + public PageResult list(AiChatMessageReq req) { // 查询 LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); queryWrapperX.eq(AiChatMessageDO::getConversationId, req.getChatConversationId()); @@ -43,7 +42,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { queryWrapperX.orderByDesc(AiChatMessageDO::getId); PageResult pageResult = aiChatMessageMapper.selectPage(req, queryWrapperX); // 转换 res - List messageListResList = AiChatMessageConvert.INSTANCE.convert(pageResult.getList()); + List messageListResList = AiChatMessageConvert.INSTANCE.convert(pageResult.getList()); return new PageResult(messageListResList, pageResult.getTotal()); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c70b56aa09..50f4ac0cb3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -17,7 +17,7 @@ import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.vo.AiChatReq; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; @@ -53,7 +53,7 @@ public class AiChatServiceImpl implements AiChatService { * @return */ @Transactional(rollbackFor = Exception.class) - public String chat(AiChatReq req) { + public String chat(AiChatMessageSendReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); @@ -83,7 +83,7 @@ public class AiChatServiceImpl implements AiChatService { return content; } - private void saveChatMessage(AiChatReq req, AiChatConversationRespVO conversationRes, Long loginUserId) { + private void saveChatMessage(AiChatMessageSendReqVO req, AiChatConversationRespVO conversationRes, Long loginUserId) { Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( @@ -101,7 +101,7 @@ public class AiChatServiceImpl implements AiChatService { aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - public void saveSystemChatMessage(AiChatReq req, AiChatConversationRespVO conversationRes, Long loginUserId, String systemPrompts) { + public void saveSystemChatMessage(AiChatMessageSendReqVO req, AiChatConversationRespVO conversationRes, Long loginUserId, String systemPrompts) { Long chatConversationId = conversationRes.getId(); // 增加 chat message 记录 aiChatMessageMapper.insert( @@ -128,7 +128,7 @@ public class AiChatServiceImpl implements AiChatService { * @return */ @Override - public void chatStream(AiChatReq req, Utf8SseEmitter sseEmitter) { + public void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageDeleteReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageDeleteReq.java deleted file mode 100644 index dafd7d84f9..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageDeleteReq.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat message list req - * - * @author fansili - * @time 2024/4/14 16:12 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatMessageDeleteReq extends PageParam { - - @Schema(description = "id") - @NotNull - private Long id; - - @Schema(description = "聊天ID,关联到特定的会话或对话") - @NotNull - private Long chatConversationId; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageListRes.java deleted file mode 100644 index ecfbc009c3..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageListRes.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * 看板 message list req - * - * @author fansili - * @time 2024/4/24 17:28 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatMessageListRes { - - @Schema(description = "编号") - private Long id; - - @Schema(description = "聊天ID,关联到特定的会话或对话") - private Long chatConversationId; - - @Schema(description = "角色ID,用于标识发送消息的用户或系统的身份") - private Long userId; - - @Schema(description = "消息具体内容,存储用户的发言或者系统响应的文字信息") - private String message; - - @Schema(description = "消息类型,枚举值可能包括'system'(系统消息)、'user'(用户消息)和'assistant'(助手消息)") - private String messageType; - - @Schema(description = "在生成消息时采用的Top-K采样大小") - private Double topK; - - @Schema(description = "Top-P核采样方法的概率阈值") - private Double topP; - - @Schema(description = "温度参数,用于调整生成回复的随机性和多样性程度,") - private Double temperature; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageReq.java deleted file mode 100644 index 60b7e91ee7..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatMessageReq.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat message list req - * - * @author fansili - * @time 2024/4/14 16:12 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatMessageReq extends PageParam { - - @Schema(description = "聊天ID,关联到特定的会话或对话") - @NotNull - private Long chatConversationId; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReq.java deleted file mode 100644 index 0597f8990d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReq.java +++ /dev/null @@ -1,48 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat req - * - * @author fansili - * @time 2024/4/14 16:12 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatReq { - - @Schema(description = "ai模型(查看 AiClientNameEnum)") - @NotNull(message = "模型不能为空!") - @Size(max = 30, message = "模型字符最大 30个字符!") - private String modal; - - @Schema(description = "对话Id") - @NotNull(message = "对话id不能为空") - private Long conversationId; - - @Schema(description = "chat角色模板") - private Long chatRoleId; - - @NotNull(message = "提示词不能为空!") - @Size(max = 5000, message = "提示词最大5000个字符!") - @Schema(description = "填入固定值,1 issues, 2 pr") - private String prompt; - - @Schema(description = "用于控制随机性和多样性的温度参数") - private Double temperature; - - @Schema(description = "生成时,核采样方法的概率阈值。例如,取值为0.8时,仅保留累计概率之和大于等于0.8的概率分布中的token,\n" + - " * 作为随机采样的候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的随机性越低。\n" + - " * 默认值为0.8。注意,取值不要大于等于1\n") - private Double topP; - - @Schema(description = "在生成消息时采用的Top-K采样大小,表示模型生成回复时考虑的候选项集合的大小") - private Double topK; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java deleted file mode 100644 index f4bca2fd64..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatReqVO.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.ai.vo; - -import cn.iocoder.yudao.module.ai.enums.AiOpenAiModelEnum; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -// TODO done @fansili 1)swagger 注释不太对;2)有了 swagger 注释,就不用类注释了 -@Data -@Schema(description = "用户 App - 上传文件 Request VO") -public class AiChatReqVO { - - @Schema(description = "提示词", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "提示词不能为空!") - private String prompt; - - @Schema(description = "AI模型", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "AI模型不能为空") - private AiOpenAiModelEnum aiModel; - -} -- Gitee From f9854273cc9b9d1e84729646ce5a6d71cf8bf5c1 Mon Sep 17 00:00:00 2001 From: "zhijiantianya@gmail.com" Date: Mon, 6 May 2024 22:34:49 +0800 Subject: [PATCH 0470/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E8=B0=83=E6=95=B4=20model=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => admin/image}/AiImageController.java | 8 +++++--- .../module/ai/controller/admin/image/package-info.java | 4 ---- .../admin/image}/vo/AiImageDallDrawingReq.java | 2 +- .../admin/image}/vo/AiImageMidjourneyReq.java | 2 +- .../admin/image}/vo/AiImageMidjourneyRes.java | 2 +- .../{ => admin/model}/AiChatModalController.java | 9 +++++---- .../{ => admin/model}/AiChatRoleController.java | 5 +++-- .../admin/model/vo/model}/AiChatModalAddReq.java | 2 +- .../admin/model/vo/model}/AiChatModalListReq.java | 2 +- .../admin/model/vo/model}/AiChatModalListRes.java | 2 +- .../admin/model/vo/model}/AiChatModalRes.java | 2 +- .../ai/controller/admin/model/vo/package-info.java | 1 + .../admin/model/vo/role}/AiChatRoleAddReq.java | 2 +- .../admin/model/vo/role}/AiChatRoleListReq.java | 2 +- .../admin/model/vo/role}/AiChatRoleListRes.java | 2 +- .../admin/model/vo/role}/AiChatRoleRes.java | 2 +- .../admin/model/vo/role}/AiChatRoleUpdateReq.java | 2 +- .../model/vo/role}/AiChatRoleUpdateVisibilityReq.java | 2 +- .../yudao/module/ai/convert/AiChatModalConvert.java | 6 +++--- .../yudao/module/ai/convert/AiChatRoleConvert.java | 8 ++++---- .../mysql}/AiChatConversationMapper.java | 2 +- .../ai/{mapper => dal/mysql}/AiChatMessageMapper.java | 2 +- .../ai/{mapper => dal/mysql}/AiChatModalMapper.java | 2 +- .../ai/{mapper => dal/mysql}/AiChatRoleMapper.java | 2 +- .../module/ai/{mapper => dal/mysql}/AiImageMapper.java | 2 +- .../vo}/typeHandler/AiChatModelConfigTypeHandler.java | 0 .../yudao/module/ai/service/AiChatModalService.java | 8 ++++---- .../yudao/module/ai/service/AiChatRoleService.java | 2 +- .../yudao/module/ai/service/AiImageService.java | 5 ++--- .../ai/service/impl/AiChatConversationServiceImpl.java | 9 +++++---- .../ai/service/impl/AiChatMessageServiceImpl.java | 4 ++-- .../module/ai/service/impl/AiChatModalServiceImpl.java | 10 +++++----- .../module/ai/service/impl/AiChatRoleServiceImpl.java | 4 ++-- .../module/ai/service/impl/AiChatServiceImpl.java | 6 +++--- .../module/ai/service/impl/AiImageServiceImpl.java | 6 +++--- .../YuDaoMidjourneyMessageHandler.java | 2 +- 36 files changed, 67 insertions(+), 66 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{ => admin/image}/AiImageController.java (83%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => controller/admin/image}/vo/AiImageDallDrawingReq.java (94%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => controller/admin/image}/vo/AiImageMidjourneyReq.java (84%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{ => controller/admin/image}/vo/AiImageMidjourneyRes.java (77%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{ => admin/model}/AiChatModalController.java (84%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/{ => admin/model}/AiChatRoleController.java (91%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/model}/AiChatModalAddReq.java (95%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/model}/AiChatModalListReq.java (85%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/model}/AiChatModalListRes.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/model}/AiChatModalRes.java (92%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleAddReq.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleListReq.java (84%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleListRes.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleRes.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleUpdateReq.java (92%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{vo => controller/admin/model/vo/role}/AiChatRoleUpdateVisibilityReq.java (87%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/mysql}/AiChatConversationMapper.java (97%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/mysql}/AiChatMessageMapper.java (94%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/mysql}/AiChatModalMapper.java (95%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/mysql}/AiChatRoleMapper.java (89%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/mysql}/AiImageMapper.java (89%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{mapper => dal/vo}/typeHandler/AiChatModelConfigTypeHandler.java (100%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java similarity index 83% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiImageController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 622778861d..43e05dc836 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -1,9 +1,10 @@ -package cn.iocoder.yudao.module.ai.controller; +package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.service.AiImageService; -import cn.iocoder.yudao.module.ai.vo.AiImageDallDrawingReq; -import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; +// TODO @芋艿:整理接口定义 /** * ai作图 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java deleted file mode 100644 index 9bc6965a12..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * TODO 芋艿:站位,无特殊作用 - */ -package cn.iocoder.yudao.module.ai.controller.admin.image; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageDallDrawingReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java similarity index 94% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageDallDrawingReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java index fb62f20822..42887b7d37 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageDallDrawingReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java similarity index 84% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java index 279541377c..a4bb622ac4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java similarity index 77% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java index 569047cd8d..8d1a52e8c4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiImageMidjourneyRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java similarity index 84% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java index cbbb23049b..e90de159e4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.module.ai.controller; +package cn.iocoder.yudao.module.ai.controller.admin.model; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.service.AiChatModalService; -import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -14,6 +14,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +// TODO @fan:调整下接口;相关 vo 的命名等等;modal => model /** * ai 模型 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java similarity index 91% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index 2b459cdcbd..e0b07e0e2f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.module.ai.controller; +package cn.iocoder.yudao.module.ai.controller.admin.model; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; -import cn.iocoder.yudao.module.ai.vo.*; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +// TODO @fan:调整下接口;相关 vo 的命名等等;modal => model /** * ai chat 角色 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java index 6a2b143ddd..d750f922a4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java similarity index 85% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java index 2aa6b931f9..7a73a0c992 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java index 31d5e86f1e..75e71df99f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java index 351da25385..15879a603a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatModalRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java new file mode 100644 index 0000000000..7fb31bb997 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java index 15a8034581..f412b3e7ec 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java similarity index 84% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java index 1dd5e54cee..5662398a78 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java index e018c43a2e..5aee6a3d2e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java index a6903931c9..6b4ec9d225 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java index 707c015f60..3a0f925ed7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java similarity index 87% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java index 52685eb66b..9e0c0c4bad 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/AiChatRoleUpdateVisibilityReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.vo; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index cd6714fdff..d2d6763f9f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; -import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java index b056a6d064..84c7aae81c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.vo.AiChatRoleAddReq; -import cn.iocoder.yudao.module.ai.vo.AiChatRoleRes; -import cn.iocoder.yudao.module.ai.vo.AiChatRoleUpdateReq; -import cn.iocoder.yudao.module.ai.vo.AiChatRoleListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleUpdateReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleListRes; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java similarity index 97% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java index 1d10db144f..0333be30d1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.mapper; +package cn.iocoder.yudao.module.ai.dal.mysql; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java similarity index 94% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java index 7227d6fc56..515e343338 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.mapper; +package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java index 7eb5f218e1..cc5074376c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatModalMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.mapper; +package cn.iocoder.yudao.module.ai.dal.mysql; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageParam; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java similarity index 89% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index e96c608105..1ab7117b72 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.mapper; +package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java similarity index 89% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java index dfad53d628..ef2b6a596b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.mapper; +package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/typeHandler/AiChatModelConfigTypeHandler.java similarity index 100% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/mapper/typeHandler/AiChatModelConfigTypeHandler.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/typeHandler/AiChatModelConfigTypeHandler.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index b1bf4a7d6b..524859737e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; /** * ai modal diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index 5c756075ca..96da840f88 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.vo.*; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; /** * chat 角色 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index 997c9a6d7d..00b5ded444 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.vo.AiImageDallDrawingReq; -import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyReq; -import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyRes; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; /** * ai 作图 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 1a8425cc53..97221228ef 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -5,16 +5,17 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.enums.AiChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; -import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.mapper.AiChatModalMapper; -import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; -import cn.iocoder.yudao.module.ai.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java index ae5a594cb0..2c86aa8a18 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java @@ -8,8 +8,8 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatMessageService; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import lombok.AllArgsConstructor; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 59de1b6e90..ebe16383f6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -16,12 +16,12 @@ import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalChatConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalDallConfigVO; import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; -import cn.iocoder.yudao.module.ai.mapper.AiChatModalMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; import cn.iocoder.yudao.module.ai.service.AiChatModalService; -import cn.iocoder.yudao.module.ai.vo.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListReq; -import cn.iocoder.yudao.module.ai.vo.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.vo.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index 5ca5af4faa..fc882e0204 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -6,13 +6,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiChatRoleClassifyEnum; import cn.iocoder.yudao.module.ai.enums.AiChatRoleEnableEnum; -import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; -import cn.iocoder.yudao.module.ai.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 50f4ac0cb3..c7f6cf37af 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -11,9 +11,9 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.mapper.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index ca23eb7861..16a4146811 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -17,10 +17,10 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; -import cn.iocoder.yudao.module.ai.mapper.AiImageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; import cn.iocoder.yudao.module.ai.service.AiImageService; -import cn.iocoder.yudao.module.ai.vo.AiImageDallDrawingReq; -import cn.iocoder.yudao.module.ai.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 68f6397654..0910b29461 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateSta import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; -import cn.iocoder.yudao.module.ai.mapper.AiImageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; import com.alibaba.fastjson2.JSON; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -- Gitee From f86e24bb865ca55d0b0712beb9e318b056a32c78 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 10:04:49 +0800 Subject: [PATCH 0471/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4AI=E5=AF=B9=E8=AF=9D=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/AiCommonConstants.java | 16 +++ .../yudao/module/ai/ErrorCodeConstants.java | 4 + .../chat/AiChatConversationController.java | 26 ++-- .../AiChatConversationListReqVO.java | 13 ++ .../ai/convert/AiChatConversationConvert.java | 8 ++ .../ai/dal/mysql/AiChatModalMapper.java | 1 + .../ai/service/AiChatConversationService.java | 30 ++-- .../module/ai/service/AiChatModalService.java | 2 +- .../impl/AiChatConversationServiceImpl.java | 133 ++++++++---------- .../service/impl/AiChatModalServiceImpl.java | 3 +- .../ai/service/impl/AiChatServiceImpl.java | 4 +- 11 files changed, 130 insertions(+), 110 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java new file mode 100644 index 0000000000..2bd71376b2 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.ai; + +/** + * ai 常用的常量 + * + * @author fansili + * @time 2024/5/7 09:29 + * @since 1.0 + */ +public class AiCommonConstants { + + /** + * 对话 - 默认 title + */ + public static final String CONVERSATION_DEFAULT_TITLE = "新增对话"; +} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 25b3b71094..c954a16676 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -15,6 +15,10 @@ public interface ErrorCodeConstants { ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI 模型暂不支持!"); ErrorCode AI_CHAT_ROLE_NOT_EXISTENT = new ErrorCode(1_022_000_001, "AI Role 不存在!");; + + // conversation + + ErrorCode AI_CONVERSATION_NOT_EXISTS = new ErrorCode(1_022_000_002, "AI 对话不存在!");; ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话 id 不能为空!");; ErrorCode AI_CHAT_CONTINUE_NOT_EXIST = new ErrorCode(1_022_000_020, "chat 对话不存在!"); ErrorCode AI_CHAT_CONVERSATION_NOT_YOURS = new ErrorCode(1_022_000_021, "这条 chat 对话不是你的!"); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index f8a7d8d1b4..988490a6fe 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -2,12 +2,15 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; +import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -16,33 +19,36 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +@Slf4j @Tag(name = "管理后台 - 聊天会话") @RestController @RequestMapping("/ai/chat/conversation") -@Slf4j +@AllArgsConstructor public class AiChatConversationController { - // TODO @fan:实现一下 + private final AiChatConversationService aiChatConversationService; + + // TODO done @fan:实现一下 @PostMapping("/create") @Operation(summary = "创建聊天会话") @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") public CommonResult createConversation(@RequestBody @Valid AiChatConversationCreateReqVO createReqVO) { - return success(1L); + return success(aiChatConversationService.createConversation(createReqVO)); } - // TODO @fan:实现一下 + // TODO done @fan:实现一下 @PutMapping("/update") @Operation(summary = "更新聊天会话") @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") public CommonResult updateConversation(@RequestBody @Valid AiChatConversationUpdateReqVO updateReqVO) { - return success(true); + return success(aiChatConversationService.updateConversation(updateReqVO)); } - // TODO @fan:实现一下 + // TODO done @fan:实现一下 @GetMapping("/list") @Operation(summary = "获得聊天会话列表") - public CommonResult> getConversationList() { - return success(null); + public CommonResult> getConversationList(@ModelAttribute AiChatConversationListReqVO listReqVO) { + return success(aiChatConversationService.listConversation(listReqVO)); } // TODO @fan:实现一下 @@ -50,7 +56,7 @@ public class AiChatConversationController { @Operation(summary = "获得聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") public CommonResult getConversation(@RequestParam("id") Long id) { - return success(null); + return success(aiChatConversationService.getConversationOfValidate(id)); } // TODO @fan:实现一下 @@ -58,7 +64,7 @@ public class AiChatConversationController { @Operation(summary = "删除聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") public CommonResult deleteConversation(@RequestParam("id") Long id) { - return success(null); + return success(aiChatConversationService.deleteConversation(id)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java new file mode 100644 index 0000000000..571cf0e389 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - AI 聊天会话 Response VO") +@Data +public class AiChatConversationListReqVO { + + @Schema(description = "会话标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个标题") + private String title; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java index af1a0bb21b..50c4b64d6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import org.mapstruct.Mapper; @@ -34,4 +35,11 @@ public interface AiChatConversationConvert { * @return */ AiChatConversationRespVO covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); + + /** + * 转换 - AiChatConversationDO + * + * @param updateReqVO + */ + AiChatConversationDO convertAiChatConversationDO(AiChatConversationUpdateReqVO updateReqVO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java index cc5074376c..d460710da8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java index 86592e5e85..663cde77af 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; import java.util.List; @@ -14,29 +16,20 @@ import java.util.List; public interface AiChatConversationService { /** - * 对话 - 创建普通对话 + * 对话 - 创建对话 * * @param req * @return */ - AiChatConversationRespVO createConversation(AiChatConversationCreateUserReq req); + Long createConversation(AiChatConversationCreateReqVO req); /** - * 对话 - 创建role对话 + * 对话 - 更新对话 * - * @param req - * @return - */ - AiChatConversationRespVO createRoleConversation(AiChatConversationCreateReqVO req); - - - /** - * 获取 - 对话 - * - * @param id + * @param updateReqVO * @return */ - AiChatConversationRespVO getConversation(Long id); + Boolean updateConversation(AiChatConversationUpdateReqVO updateReqVO); /** * 获取 - 对话列表 @@ -44,22 +37,21 @@ public interface AiChatConversationService { * @param req * @return */ - List listConversation(AiChatConversationListReq req); + List listConversation(AiChatConversationListReqVO req); /** - * 更新 - 更新模型 + * 获取 - 对话 * * @param id - * @param modalId * @return */ - void updateModal(Long id, Long modalId); + AiChatConversationRespVO getConversationOfValidate(Long id); /** * 删除 - 根据id * * @param id */ - void delete(Long id); + Boolean deleteConversation(Long id); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index 524859737e..60511c8a6e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -51,5 +51,5 @@ public interface AiChatModalService { * @param modalId * @return */ - AiChatModalRes getChatModal(Long modalId); + AiChatModalRes getChatModalOfValidate(Long modalId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 97221228ef..4f6a2cc52f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -2,17 +2,20 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; -import cn.iocoder.yudao.module.ai.enums.AiChatConversationTypeEnum; -import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; @@ -34,119 +37,95 @@ import java.util.List; @AllArgsConstructor public class AiChatConversationServiceImpl implements AiChatConversationService { - private final AiChatRoleMapper aiChatRoleMapper; private final AiChatModalMapper aiChatModalMapper; - private final AiChatConversationMapper aiChatConversationMapper; private final AiChatModalService aiChatModalService; private final AiChatRoleService aiChatRoleService; + private final AiChatConversationMapper aiChatConversationMapper; @Override - public AiChatConversationRespVO createConversation(AiChatConversationCreateUserReq req) { + public Long createConversation(AiChatConversationCreateReqVO req) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询最新的对话 - AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); - // 如果有对话没有被使用过,那就返回这个 - if (latestConversation != null && latestConversation.getChatCount() <= 0) { - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); - } - // 获取第一个模型 + // 默认使用 sort 排序第一个模型 AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); - // 创建新的 Conversation - AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, - null, null, AiChatConversationTypeEnum.USER_CHAT, - aiChatModalDO.getId(), aiChatModalDO.getModal()); - // 转换 res - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); - } - - @Override - public AiChatConversationRespVO createRoleConversation(AiChatConversationCreateReqVO req) { - // 获取用户id - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询最新的对话 -// AiChatConversationDO latestConversation = aiChatConversationMapper.selectLatestConversation(loginUserId); -// // 如果有对话没有被使用过,那就返回这个 -// if (latestConversation != null && latestConversation.getChatCount() <= 0) { -// return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(latestConversation); -// } // 查询角色 - AiChatRoleRes chatRoleRes = aiChatRoleService.getChatRole(req.getRoleId()); - // 获取第一个模型 - AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); + AiChatRoleRes chatRoleRes = null; + if (req.getRoleId() != null) { + chatRoleRes = aiChatRoleService.getChatRole(req.getRoleId()); + } + Long chatRoleId = chatRoleRes != null ? chatRoleRes.getId() : null; // 创建新的 Conversation - AiChatConversationDO insertConversation = saveConversation(req.getTitle(), loginUserId, - req.getRoleId(), chatRoleRes.getName(), AiChatConversationTypeEnum.ROLE_CHAT, - aiChatModalDO.getId(), aiChatModalDO.getModal()); - // 转换 res - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(insertConversation); + AiChatConversationDO insertConversation = saveConversation(AiCommonConstants.CONVERSATION_DEFAULT_TITLE, + loginUserId, chatRoleId, aiChatModalDO.getId(), aiChatModalDO.getModel() + ); + // 返回对话id + return insertConversation.getId(); } private @NotNull AiChatConversationDO saveConversation(String title, Long userId, Long roleId, - String roleName, - AiChatConversationTypeEnum typeEnum, Long modalId, - String modal) { + String model) { AiChatConversationDO insertConversation = new AiChatConversationDO(); insertConversation.setId(null); insertConversation.setUserId(userId); - insertConversation.setRoleId(roleId); - insertConversation.setRoleName(roleName); insertConversation.setTitle(title); - insertConversation.setChatCount(0); - insertConversation.setType(typeEnum.getType()); - insertConversation.setModalId(modalId); - insertConversation.setModal(modal); + insertConversation.setPinned(false); + + insertConversation.setRoleId(roleId); + insertConversation.setModelId(modalId); + insertConversation.setModel(model); + + insertConversation.setTemperature(null); + insertConversation.setMaxTokens(null); + insertConversation.setMaxContexts(null); aiChatConversationMapper.insert(insertConversation); return insertConversation; } @Override - public AiChatConversationRespVO getConversation(Long id) { - AiChatConversationDO aiChatConversationDO = validateExists(id); - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); - } - - private @NotNull AiChatConversationDO validateExists(Long id) { - AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); - if (aiChatConversationDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_CONTINUE_NOT_EXIST); + public Boolean updateConversation(AiChatConversationUpdateReqVO updateReqVO) { + // 校验对话是否存在 + validateExists(updateReqVO.getId()); + // 获取模型信息并验证 + AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(updateReqVO.getModelId()); + // 校验modal是否可用 + if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); } - return aiChatConversationDO; + // 更新对话信息 + AiChatConversationDO updateAiChatConversationDO + = AiChatConversationConvert.INSTANCE.convertAiChatConversationDO(updateReqVO); + return aiChatConversationMapper.updateById(updateAiChatConversationDO) > 0; } @Override - public List listConversation(AiChatConversationListReq req) { + public List listConversation(AiChatConversationListReqVO listReqVO) { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询前100对话 List top100Conversation - = aiChatConversationMapper.selectTop100Conversation(loginUserId, req.getSearch()); + = aiChatConversationMapper.selectTop100Conversation(loginUserId, listReqVO.getTitle()); return AiChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); } @Override - public void updateModal(Long id, Long modalId) { - // 校验对话是否存在 - validateExists(id); - // 获取模型 - AiChatModalRes chatModal = aiChatModalService.getChatModal(modalId); - // 判断模型是否禁用 - if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); - } - // 更新对话 - aiChatConversationMapper.updateById(new AiChatConversationDO() - .setId(id) - .setModalId(chatModal.getId()) - .setModal(chatModal.getModal()) - ); + public AiChatConversationRespVO getConversationOfValidate(Long id) { + AiChatConversationDO aiChatConversationDO = validateExists(id); + return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); } @Override - public void delete(Long id) { - aiChatConversationMapper.deleteById(id); + public Boolean deleteConversation(Long id) { + return aiChatConversationMapper.deleteById(id) > 0; + } + + private @NotNull AiChatConversationDO validateExists(Long id) { + AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); + if (aiChatConversationDO == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CONVERSATION_NOT_EXISTS); + } + return aiChatConversationDO; } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index ebe16383f6..67013bddac 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -12,6 +12,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalChatConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalDallConfigVO; @@ -109,7 +110,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { } @Override - public AiChatModalRes getChatModal(Long modalId) { + public AiChatModalRes getChatModalOfValidate(Long modalId) { // 检查 modal 是否存在 AiChatModalDO aiChatModalDO = validateChatModalExists(modalId); return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c7f6cf37af..f833f60d9f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -58,7 +58,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); // 获取对话信息 - AiChatConversationRespVO conversationRes = chatConversationService.getConversation(req.getConversationId()); + AiChatConversationRespVO conversationRes = chatConversationService.getConversationOfValidate(req.getConversationId()); // 保存 chat message saveChatMessage(req, conversationRes, loginUserId); String content = null; @@ -133,7 +133,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); // 获取对话信息 - AiChatConversationRespVO conversationRes = chatConversationService.getConversation(req.getConversationId()); + AiChatConversationRespVO conversationRes = chatConversationService.getConversationOfValidate(req.getConversationId()); // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getPrompt()); req.setTopK(req.getTopK()); -- Gitee From 424210066ff3ce6f5a37d4d6da939d31cdd3eb52 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 10:45:37 +0800 Subject: [PATCH 0472/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4AI=E8=81=8A=E5=A4=A9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 1 + .../admin/chat/AiChatMessageController.java | 2 +- .../AiChatConversationRespVO.java | 3 + .../module/ai/service/AiChatModalService.java | 7 + .../module/ai/service/AiChatRoleService.java | 16 ++ .../module/ai/service/AiChatService.java | 5 +- .../impl/AiChatConversationServiceImpl.java | 5 +- .../service/impl/AiChatModalServiceImpl.java | 8 + .../service/impl/AiChatRoleServiceImpl.java | 20 ++- .../ai/service/impl/AiChatServiceImpl.java | 151 ++++++++++-------- 10 files changed, 138 insertions(+), 80 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index c954a16676..cf5d6e76e1 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -30,6 +30,7 @@ public interface ErrorCodeConstants { // role ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "chatRole 不存在!"); + ErrorCode AI_CHAT_ROLE_NOT_PUBLIC = new ErrorCode(1_022_000_060, "AI 角色未公开!"); // modal diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 473f1c8567..63e947e591 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -32,7 +32,7 @@ public class AiChatMessageController { @PostMapping("/send") public CommonResult sendMessage(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { // TODO @fan:使用 static import;这样就 success 就行了; - return success(null); + return success(chatService.chat(sendReqVO)); } // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed.;可以再试试 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 720736f217..70ff21fc59 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -21,6 +21,9 @@ public class AiChatConversationRespVO { @Schema(description = "是否置顶", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean pinned; + @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + private Long roleId; + @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long modelId; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index 60511c8a6e..5740328be7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -52,4 +52,11 @@ public interface AiChatModalService { * @return */ AiChatModalRes getChatModalOfValidate(Long modalId); + + /** + * 校验 - 校验是否可用 + * + * @param chatModal + */ + void validateAvailable(AiChatModalRes chatModal); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index 96da840f88..5f11e4ffca 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; /** * chat 角色 @@ -58,4 +59,19 @@ public interface AiChatRoleService { * @return */ AiChatRoleRes getChatRole(Long roleId); + + /** + * 校验 - 角色是否存在 + * + * @param id + * @return + */ + AiChatRoleDO validateExists(Long id); + + /** + * 校验 - 角色是否公开 + * + * @param aiChatRoleDO + */ + void validateIsPublic(AiChatRoleDO aiChatRoleDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index c054e41faa..e25062e789 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; /** @@ -15,10 +16,10 @@ public interface AiChatService { /** * chat * - * @param req + * @param sendReqVO * @return */ - String chat(AiChatMessageSendReqVO req); + AiChatMessageRespVO chat(AiChatMessageSendReqVO sendReqVO); /** * chat stream diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 4f6a2cc52f..6fbafc6591 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -15,7 +15,6 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; -import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; @@ -91,9 +90,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 获取模型信息并验证 AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(updateReqVO.getModelId()); // 校验modal是否可用 - if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); - } + aiChatModalService.validateAvailable(chatModal); // 更新对话信息 AiChatConversationDO updateAiChatConversationDO = AiChatConversationConvert.INSTANCE.convertAiChatConversationDO(updateReqVO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 67013bddac..89c85f8eef 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -116,6 +116,14 @@ public class AiChatModalServiceImpl implements AiChatModalService { return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); } + @Override + public void validateAvailable(AiChatModalRes chatModal) { + // 对话模型是否可用 + if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); + } + } + private AiChatModalDO validateChatModalExists(Long id) { AiChatModalDO aiChatModalDO = aiChatModalMapper.selectById(id); if (aiChatModalDO == null) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index fc882e0204..95ed678617 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -70,7 +70,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { AiChatRoleClassifyEnum.valueOfClassify(req.getClassify()); AiChatRoleEnableEnum.valueOfType(req.getEnable()); // 检查角色是否存在 - validateChatRoleExists(id); + validateExists(id); // 转换do AiChatRoleDO updateChatRole = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); updateChatRole.setId(id); @@ -83,7 +83,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { // 转换enum,并校验enum AiChatRoleEnableEnum.valueOfType(req.getEnable()); // 检查角色是否存在 - validateChatRoleExists(id); + validateExists(id); // 更新 aiChatRoleMapper.updateById(new AiChatRoleDO() .setId(id) @@ -94,7 +94,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public void delete(Long chatRoleId) { // 检查角色是否存在 - validateChatRoleExists(chatRoleId); + validateExists(chatRoleId); // 删除 aiChatRoleMapper.deleteById(chatRoleId); } @@ -102,15 +102,25 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public AiChatRoleRes getChatRole(Long roleId) { // 检查角色是否存在 - AiChatRoleDO aiChatRoleDO = validateChatRoleExists(roleId); + AiChatRoleDO aiChatRoleDO = validateExists(roleId); return AiChatRoleConvert.INSTANCE.convertAiChatRoleRes(aiChatRoleDO); } - private AiChatRoleDO validateChatRoleExists(Long id) { + public AiChatRoleDO validateExists(Long id) { AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(id); if (aiChatRoleDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_ROLE_NOT_EXIST); } return aiChatRoleDO; } + + public void validateIsPublic(AiChatRoleDO aiChatRoleDO) { + if (aiChatRoleDO == null) { + return; + } + if (!aiChatRoleDO.getPublicStatus()) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_ROLE_NOT_PUBLIC); + } + } } + diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index f833f60d9f..b5e2634de3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -10,14 +10,19 @@ import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; +import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; @@ -45,29 +50,39 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationMapper aiChatConversationMapper; private final AiChatConversationService chatConversationService; + private final AiChatModalService aiChatModalService; + private final AiChatRoleService aiChatRoleService; - /** - * chat - * - * @param req - * @return - */ @Transactional(rollbackFor = Exception.class) - public String chat(AiChatMessageSendReqVO req) { + public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询对话 + AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + // 获取对话模型 + AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); + // 对话模型是否可用 + aiChatModalService.validateAvailable(chatModal); + // 获取角色信息 + AiChatRoleDO aiChatRoleDO = null; + if (conversation.getRoleId() != null) { + aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); + } + // 校验角色是否公开 + aiChatRoleService.validateIsPublic(aiChatRoleDO); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); - // 获取对话信息 - AiChatConversationRespVO conversationRes = chatConversationService.getConversationOfValidate(req.getConversationId()); + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModal()); // 保存 chat message - saveChatMessage(req, conversationRes, loginUserId); + insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), + chatModal.getModal(), chatModal.getId(), req.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); String content = null; try { // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(req.getPrompt()); - req.setTopK(req.getTopK()); - req.setTopP(req.getTopP()); - req.setTemperature(req.getTemperature()); + Prompt prompt = new Prompt(req.getContent()); + // TODO @芋艿 @范 看要不要支持这些 +// req.setTopK(req.getTopK()); +// req.setTopP(req.getTopP()); +// req.setTemperature(req.getTemperature()); // 发送 call 调用 ChatClient chatClient = aiChatClientFactory.getChatClient(platformEnum); ChatResponse call = chatClient.call(prompt); @@ -78,69 +93,66 @@ public class AiChatServiceImpl implements AiChatService { content = ExceptionUtil.getMessage(e); } finally { // 保存 chat message - saveSystemChatMessage(req, conversationRes, loginUserId, content); + insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), + chatModal.getModal(), chatModal.getId(), req.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } - return content; + return new AiChatMessageRespVO().setContent(content); } - private void saveChatMessage(AiChatMessageSendReqVO req, AiChatConversationRespVO conversationRes, Long loginUserId) { - Long chatConversationId = conversationRes.getId(); - // 增加 chat message 记录 - aiChatMessageMapper.insert( - new AiChatMessageDO() - .setId(null) - .setConversationId(chatConversationId) - .setUserId(loginUserId) - .setMessage(req.getPrompt()) - .setMessageType(MessageType.USER.getValue()) - .setTopK(req.getTopK()) - .setTopP(req.getTopP()) - .setTemperature(req.getTemperature()) - ); - // chat count 先+1 - aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); - } + private AiChatMessageDO insertChatMessage(Long conversationId, MessageType messageType, Long loginUserId, Long roleId, + String model, Long modelId, String content, Integer tokens, Double temperature, + Integer maxTokens, Integer maxContexts) { + AiChatMessageDO insertChatMessageDO = new AiChatMessageDO() + .setId(null) + .setConversationId(conversationId) + .setType(messageType.getValue()) + .setUserId(loginUserId) + .setRoleId(roleId) + .setModel(model) + .setModelId(modelId) + .setContent(content) + .setTokens(tokens) - public void saveSystemChatMessage(AiChatMessageSendReqVO req, AiChatConversationRespVO conversationRes, Long loginUserId, String systemPrompts) { - Long chatConversationId = conversationRes.getId(); + .setTemperature(temperature) + .setMaxTokens(maxTokens) + .setMaxContexts(maxContexts); // 增加 chat message 记录 - aiChatMessageMapper.insert( - new AiChatMessageDO() - .setId(null) - .setConversationId(chatConversationId) - .setUserId(loginUserId) - .setMessage(systemPrompts) - .setMessageType(MessageType.SYSTEM.getValue()) - .setTopK(req.getTopK()) - .setTopP(req.getTopP()) - .setTemperature(req.getTemperature()) - ); - + aiChatMessageMapper.insert(insertChatMessageDO); // chat count 先+1 - aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); + aiChatConversationMapper.updateIncrChatCount(conversationId); + return insertChatMessageDO; } - /** - * chat stream - * - * @param req - * @param sseEmitter - * @return - */ @Override public void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getModal()); - // 获取对话信息 - AiChatConversationRespVO conversationRes = chatConversationService.getConversationOfValidate(req.getConversationId()); + // 查询对话 + AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + // 获取对话模型 + AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); + // 对话模型是否可用 + aiChatModalService.validateAvailable(chatModal); + // 获取角色信息 + AiChatRoleDO aiChatRoleDO = null; + if (conversation.getRoleId() != null) { + aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); + } + // 校验角色是否公开 + aiChatRoleService.validateIsPublic(aiChatRoleDO); // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(req.getPrompt()); - req.setTopK(req.getTopK()); - req.setTopP(req.getTopP()); - req.setTemperature(req.getTemperature()); + Prompt prompt = new Prompt(req.getContent()); +// req.setTopK(req.getTopK()); +// req.setTopP(req.getTopP()); +// req.setTemperature(req.getTemperature()); // 保存 chat message - saveChatMessage(req, conversationRes, loginUserId); + // 保存 chat message + insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), + chatModal.getModal(), chatModal.getId(), req.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + + // 获取 client 类型 + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModal()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); Flux streamResponse = streamingChatClient.stream(prompt); @@ -168,7 +180,10 @@ public class AiChatServiceImpl implements AiChatService { log.info("发送完成!"); sseEmitter.complete(); // 保存 chat message - saveSystemChatMessage(req, conversationRes, loginUserId, contentBuffer.toString()); + insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), + chatModal.getModal(), chatModal.getId(), req.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + } ); } -- Gitee From 8de98a15bb9314ada5ea1e47fbd2ddcce7a06baf Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 10:54:56 +0800 Subject: [PATCH 0473/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4AI=E8=81=8A=E5=A4=A9=EF=BC=8Cmessage=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E5=88=A0=E9=99=A4message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/AiChatConversationController.java | 5 ++--- .../admin/chat/AiChatMessageController.java | 8 ++++---- .../ai/convert/AiChatMessageConvert.java | 10 +++++++++- .../ai/dal/mysql/AiChatMessageMapper.java | 10 ++++++++++ .../ai/service/AiChatConversationService.java | 12 ++++++++++-- .../module/ai/service/AiChatService.java | 19 +++++++++++++++++++ .../impl/AiChatConversationServiceImpl.java | 6 +++--- .../ai/service/impl/AiChatServiceImpl.java | 17 +++++++++++++++++ 8 files changed, 74 insertions(+), 13 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index 988490a6fe..7bd3c5a140 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; @@ -47,8 +46,8 @@ public class AiChatConversationController { // TODO done @fan:实现一下 @GetMapping("/list") @Operation(summary = "获得聊天会话列表") - public CommonResult> getConversationList(@ModelAttribute AiChatConversationListReqVO listReqVO) { - return success(aiChatConversationService.listConversation(listReqVO)); + public CommonResult> getConversationList() { + return success(aiChatConversationService.listConversation()); } // TODO @fan:实现一下 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 63e947e591..285611cbed 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -31,7 +31,7 @@ public class AiChatMessageController { @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") @PostMapping("/send") public CommonResult sendMessage(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { - // TODO @fan:使用 static import;这样就 success 就行了; + // TODO done @fan:使用 static import;这样就 success 就行了; return success(chatService.chat(sendReqVO)); } @@ -49,14 +49,14 @@ public class AiChatMessageController { @GetMapping("/list-by-conversation-id") @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") public CommonResult> getMessageListByConversationId(@RequestParam("conversationId") Long conversationId) { - return success(null); + return success(chatService.getMessageListByConversationId(conversationId)); } @Operation(summary = "删除消息") @DeleteMapping("/delete") @Parameter(name = "id", required = true, description = "消息编号", example = "1024") - public CommonResult delete(@RequestParam("id") Long id) { - return success(null); + public CommonResult deleteMessage(@RequestParam("id") Long id) { + return success(chatService.deleteMessage(id)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index c84ecb404a..d067a26f31 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -20,10 +20,18 @@ public interface AiChatMessageConvert { AiChatMessageConvert INSTANCE = Mappers.getMapper(AiChatMessageConvert.class); /** - * 转换 ChatMessageListRes + * 转换 ChatMessageListRes * * @param list * @return */ List convert(List list); + + /** + * 转换 AiChatMessageRespVO + * + * @param aiChatMessageDOList + * @return + */ + List convertAiChatMessageRespVOList(List aiChatMessageDOList); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java index 515e343338..4e2100aff5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; +import java.util.List; + /** * message mapper * @@ -29,4 +31,12 @@ public interface AiChatMessageMapper extends BaseMapperX { ); } + /** + * 查询 - 根据 对话id查询 + * + * @param conversationId + */ + default List selectByConversationId(Long conversationId) { + return selectList() + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java index 663cde77af..1abf2476f4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatCo import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import org.jetbrains.annotations.NotNull; import java.util.List; @@ -34,10 +36,9 @@ public interface AiChatConversationService { /** * 获取 - 对话列表 * - * @param req * @return */ - List listConversation(AiChatConversationListReqVO req); + List listConversation(); /** * 获取 - 对话 @@ -54,4 +55,11 @@ public interface AiChatConversationService { */ Boolean deleteConversation(Long id); + /** + * 校验 - 是否存在 + * + * @param id + * @return + */ + AiChatConversationDO validateExists(Long id); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index e25062e789..27ece6b14a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import java.util.List; + /** * 聊天 chat * @@ -29,4 +31,21 @@ public interface AiChatService { * @return */ void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter); + + /** + * 获取 - 获取对话 message list + * + * @param conversationId + * @return + */ + List getMessageListByConversationId(Long conversationId); + + /** + * 删除 - 删除message + * + * @param id + * @return + */ + Boolean deleteMessage(Long id); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 6fbafc6591..5f45f27b60 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -98,12 +98,12 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public List listConversation(AiChatConversationListReqVO listReqVO) { + public List listConversation() { // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询前100对话 List top100Conversation - = aiChatConversationMapper.selectTop100Conversation(loginUserId, listReqVO.getTitle()); + = aiChatConversationMapper.selectTop100Conversation(loginUserId, null); return AiChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); } @@ -118,7 +118,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService return aiChatConversationMapper.deleteById(id) > 0; } - private @NotNull AiChatConversationDO validateExists(Long id) { + public @NotNull AiChatConversationDO validateExists(Long id) { AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); if (aiChatConversationDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CONVERSATION_NOT_EXISTS); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index b5e2634de3..63ef59aa5d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatCo import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; @@ -31,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; import java.io.IOException; +import java.util.List; import java.util.function.Consumer; /** @@ -187,4 +189,19 @@ public class AiChatServiceImpl implements AiChatService { } ); } + + @Override + public List getMessageListByConversationId(Long conversationId) { + // 校验对话是否存在 + chatConversationService.validateExists(conversationId); + // 获取对话所有 message + List aiChatMessageDOList = aiChatMessageMapper.selectByConversationId(conversationId); + // 转换 AiChatMessageRespVO + return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); + } + + @Override + public Boolean deleteMessage(Long id) { + return aiChatMessageMapper.deleteById(id) > 0; + } } -- Gitee From 7fae5c0a7d5f8d04bd05db9c98d2d402865a22a3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:00:49 +0800 Subject: [PATCH 0474/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8=E7=9A=84=20chat=20message?= =?UTF-8?q?=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/AiChatMessageService.java | 30 -------- .../impl/AiChatMessageServiceImpl.java | 69 ------------------- 2 files changed, 99 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java deleted file mode 100644 index 77450c63ba..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatMessageService.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.ai.service; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; - -/** - * chat message - * - * @author fansili - * @time 2024/4/24 17:25 - * @since 1.0 - */ -public interface AiChatMessageService { - - /** - * message - 列表 - * - * @param req - * @return - */ - PageResult list(AiChatMessageReq req); - - /** - * message - 删除 - * - * @param chatConversationId - * @param id - */ - void delete(Long chatConversationId, Long id); -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java deleted file mode 100644 index 2c86aa8a18..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatMessageServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.impl; - -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.service.AiChatMessageService; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * chat message - * - * @author fansili - * @time 2024/4/24 17:25 - * @since 1.0 - */ -@AllArgsConstructor -@Service -@Slf4j -public class AiChatMessageServiceImpl implements AiChatMessageService { - - private final AiChatMessageMapper aiChatMessageMapper; - private final AiChatConversationMapper aiChatConversationMapper; - - @Override - public PageResult list(AiChatMessageReq req) { - // 查询 - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); - queryWrapperX.eq(AiChatMessageDO::getConversationId, req.getChatConversationId()); - // 默认排序 - queryWrapperX.orderByDesc(AiChatMessageDO::getId); - PageResult pageResult = aiChatMessageMapper.selectPage(req, queryWrapperX); - // 转换 res - List messageListResList = AiChatMessageConvert.INSTANCE.convert(pageResult.getList()); - return new PageResult(messageListResList, pageResult.getTotal()); - } - - @Override - public void delete(Long chatConversationId, Long id) { - // 获取登录用户 - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 校验 ChatConversation - validateChatConversation(chatConversationId, loginUserId); - // 删除 - aiChatMessageMapper.deleteByConversationAndId(chatConversationId, id); - } - - private AiChatConversationDO validateChatConversation(Long chatConversationId, Long loginUserId) { - AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(chatConversationId); - if (aiChatConversationDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_CONTINUE_NOT_EXIST); - } - if (!aiChatConversationDO.getUserId().equals(loginUserId)) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_CONVERSATION_NOT_YOURS); - } - return aiChatConversationDO; - } -} -- Gitee From c124681c3affd61bf9839a266b6bfc7c19cd2d6f Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:01:20 +0800 Subject: [PATCH 0475/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AF=B9=E8=AF=9D=20message=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/mysql/AiChatMessageMapper.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java index 4e2100aff5..5f6083fdbc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java @@ -18,25 +18,16 @@ import java.util.List; @Mapper public interface AiChatMessageMapper extends BaseMapperX { - /** - * 删除 - 根据 Conversation 和 id - * - * @param chatConversationId - * @param id - */ - default int deleteByConversationAndId(Long chatConversationId, Long id) { - return this.delete(new LambdaQueryWrapperX() - .eq(AiChatMessageDO::getConversationId, chatConversationId) - .eq(AiChatMessageDO::getId, id) - ); - } - /** * 查询 - 根据 对话id查询 * * @param conversationId */ default List selectByConversationId(Long conversationId) { - return selectList() + return this.selectList( + new LambdaQueryWrapperX() + .eq(AiChatMessageDO::getConversationId, conversationId) + .orderByAsc(AiChatMessageDO::getId) + ); } } -- Gitee From f0a1666e84609aeec284427cbec33042e97aee35 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:34:20 +0800 Subject: [PATCH 0476/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4AI=E8=A7=92=E8=89=B2=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...yEnum.java => AiChatRoleCategoryEnum.java} | 12 +++--- .../module/ai/enums/AiChatRoleEnableEnum.java | 36 ---------------- .../admin/model/AiChatRoleController.java | 26 ++++++------ ...oleAddReq.java => AiChatRoleAddReqVO.java} | 32 +++++++++++---- ...=> AiChatRoleUpdatePublicStatusReqVO.java} | 11 +++-- ...ateReq.java => AiChatRoleUpdateReqVO.java} | 40 +++++++++++++++--- .../module/ai/convert/AiChatRoleConvert.java | 8 ++-- .../module/ai/service/AiChatRoleService.java | 8 ++-- .../service/impl/AiChatRoleServiceImpl.java | 41 ++++++++++--------- 9 files changed, 114 insertions(+), 100 deletions(-) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{AiChatRoleClassifyEnum.java => AiChatRoleCategoryEnum.java} (62%) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleAddReq.java => AiChatRoleAddReqVO.java} (50%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleUpdateVisibilityReq.java => AiChatRoleUpdatePublicStatusReqVO.java} (62%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleUpdateReq.java => AiChatRoleUpdateReqVO.java} (45%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleClassifyEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java similarity index 62% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleClassifyEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java index 2221ef7379..3ca923de97 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleClassifyEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java @@ -12,7 +12,7 @@ import lombok.Getter; */ @AllArgsConstructor @Getter -public enum AiChatRoleClassifyEnum { +public enum AiChatRoleCategoryEnum { WRITING("writing", "写作"), @@ -21,17 +21,17 @@ public enum AiChatRoleClassifyEnum { ; - private String classify; + private String category; private String name; - public static AiChatRoleClassifyEnum valueOfClassify(String classify) { - for (AiChatRoleClassifyEnum itemEnum : AiChatRoleClassifyEnum.values()) { - if (itemEnum.getClassify().equals(classify)) { + public static AiChatRoleCategoryEnum valueOfCategory(String category) { + for (AiChatRoleCategoryEnum itemEnum : AiChatRoleCategoryEnum.values()) { + if (itemEnum.getCategory().equals(category)) { return itemEnum; } } - throw new IllegalArgumentException("Invalid MessageType value: " + classify); + throw new IllegalArgumentException("Invalid MessageType value: " + category); } } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java deleted file mode 100644 index 81b29c0e55..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleEnableEnum.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * chat角色 可见范围 - * - * @author fansili - * @time 2024/4/24 16:44 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatRoleEnableEnum { - - OPEN("open", "公开"), - CLOSE("close", "关闭"), - - ; - - private String type; - - private String name; - - - public static AiChatRoleEnableEnum valueOfType(String type) { - for (AiChatRoleEnableEnum itemEnum : AiChatRoleEnableEnum.values()) { - if (itemEnum.getType().equals(type)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + type); - } - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index e0b07e0e2f..64a06632ab 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*; */ @Tag(name = "A4-chat角色") @RestController -@RequestMapping("/ai/chat") +@RequestMapping("/ai/chat/role") @Slf4j @AllArgsConstructor public class AiChatRoleController { @@ -28,37 +28,35 @@ public class AiChatRoleController { private final AiChatRoleService chatRoleService; @Operation(summary = "chat角色 - 角色列表") - @GetMapping("/role/list") + @GetMapping("/list") public PageResult list(@Validated @ModelAttribute AiChatRoleListReq req) { return chatRoleService.list(req); } @Operation(summary = "chat角色 - 添加") - @PutMapping("/role") - public CommonResult add(@Validated @RequestBody AiChatRoleAddReq req) { + @PutMapping("/add") + public CommonResult add(@Validated @RequestBody AiChatRoleAddReqVO req) { chatRoleService.add(req); return CommonResult.success(null); } @Operation(summary = "chat角色 - 修改") - @PostMapping("/role/{id}") - public CommonResult update(@PathVariable("id") Long id, - @Validated @RequestBody AiChatRoleUpdateReq req) { - chatRoleService.update(id, req); + @PostMapping("/update") + public CommonResult update(@Validated @RequestBody AiChatRoleUpdateReqVO req) { + chatRoleService.update(req); return CommonResult.success(null); } @Operation(summary = "chat角色 - 修改可见性") - @PostMapping("/role/{id}/update-enable") - public CommonResult updateEnable(@PathVariable("id") Long id, - @Validated @RequestBody AiChatRoleUpdateVisibilityReq req) { - chatRoleService.updateEnable(id, req); + @PostMapping("/update-public-status") + public CommonResult updatePublicStatus(@Validated @RequestBody AiChatRoleUpdatePublicStatusReqVO req) { + chatRoleService.updatePublicStatus(req); return CommonResult.success(null); } @Operation(summary = "chat角色 - 删除") - @DeleteMapping("/role/{id}") - public CommonResult delete(@PathVariable("id") Long id) { + @DeleteMapping("/delete") + public CommonResult delete(@RequestParam("id") Long id) { chatRoleService.delete(id); return CommonResult.success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java similarity index 50% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java index f412b3e7ec..f03137df85 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -14,21 +13,40 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleAddReq extends PageParam { +public class AiChatRoleAddReqVO { @NotNull @Schema(description = "角色名,角色的显示名称") private String name; - @NotNull - @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String introduce; + @Schema(description = "头像") + private String avatar; @NotNull @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String classify; + private String category; + + @NotNull + @Schema(description = "角色描述") + private String description; + + @Schema(description = "角色欢迎语") + private String welcomeMessage; + + @NotNull + @Schema(description = "角色设定(消息)") + private String systemMessage; + + @NotNull + @Schema(description = "模型编号") + private Long modelId; @NotNull @Schema(description = "开启状态 open、close") - private String enable; + private Boolean publicStatus; + + @NotNull + @Schema(description = "排序") + private Integer sort; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java similarity index 62% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java index 9e0c0c4bad..c61b6d9640 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateVisibilityReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java @@ -14,9 +14,14 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleUpdateVisibilityReq extends PageParam { +public class AiChatRoleUpdatePublicStatusReqVO extends PageParam { - @NotNull + + @NotNull(message = "角色编号不能为空") + @Schema(description = "角色编号") + private Long id; + + @NotNull(message = "开启状态不能为空") @Schema(description = "开启状态 open、close") - private String enable; + private Boolean publicStatus; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java similarity index 45% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java index 3a0f925ed7..d578b2f74c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java @@ -14,21 +14,49 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleUpdateReq extends PageParam { +public class AiChatRoleUpdateReqVO extends PageParam { + + + @NotNull(message = "角色编号不能为空") + @Schema(description = "角色编号") + private Long id; @NotNull @Schema(description = "角色名,角色的显示名称") private String name; - @NotNull - @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String introduce; + @Schema(description = "头像") + private String avatar; @NotNull @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String classify; + private String category; + + @NotNull + @Schema(description = "角色描述") + private String description; + + @Schema(description = "角色欢迎语") + private String welcomeMessage; + + @NotNull + @Schema(description = "角色设定(消息)") + private String systemMessage; + + @NotNull + @Schema(description = "模型编号") + private Long modelId; @NotNull @Schema(description = "开启状态 open、close") - private String enable; + private Boolean publicStatus; + + @NotNull + @Schema(description = "排序") + private Integer sort; + + @NotNull + @Schema(description = "状态") + private Integer status; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java index 84c7aae81c..86ed30e220 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleUpdateReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleUpdateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleListRes; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -36,7 +36,7 @@ public interface AiChatRoleConvert { * @param req * @return */ - AiChatRoleDO convertAiChatRoleDO(AiChatRoleAddReq req); + AiChatRoleDO convertAiChatRoleDO(AiChatRoleAddReqVO req); /** * 转换 - AiChatRoleDO @@ -44,7 +44,7 @@ public interface AiChatRoleConvert { * @param req * @return */ - AiChatRoleDO convertAiChatRoleDO(AiChatRoleUpdateReq req); + AiChatRoleDO convertAiChatRoleDO(AiChatRoleUpdateReqVO req); /** * 转换 - AiChatRoleRes diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index 5f11e4ffca..2ad696fb0f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -26,24 +26,22 @@ public interface AiChatRoleService { * @param req * @return */ - void add(AiChatRoleAddReq req); + void add(AiChatRoleAddReqVO req); /** * chat角色 - 修改 * - * @param id * @param req */ - void update(Long id, AiChatRoleUpdateReq req); + void update(AiChatRoleUpdateReqVO req); /** * chat角色 - 修改可见性 * - * @param id * @param req */ - void updateEnable(Long id, AiChatRoleUpdateVisibilityReq req); + void updatePublicStatus(AiChatRoleUpdatePublicStatusReqVO req); /** * chat角色 - 删除 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index 95ed678617..b3e645e372 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -9,9 +10,9 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.enums.AiChatRoleClassifyEnum; -import cn.iocoder.yudao.module.ai.enums.AiChatRoleEnableEnum; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.enums.AiChatRoleCategoryEnum; +import cn.iocoder.yudao.module.ai.service.AiChatModalService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -31,6 +32,7 @@ import java.util.List; public class AiChatRoleServiceImpl implements AiChatRoleService { private final AiChatRoleMapper aiChatRoleMapper; + private final AiChatModalService aiChatModalService; @Override public PageResult list(AiChatRoleListReq req) { @@ -52,42 +54,43 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { } @Override - public void add(AiChatRoleAddReq req) { + public void add(AiChatRoleAddReqVO req) { // 转换enum,并校验enum - AiChatRoleClassifyEnum.valueOfClassify(req.getClassify()); - AiChatRoleEnableEnum.valueOfType(req.getEnable()); + AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); + // 校验模型是否存在 + aiChatModalService.validateExists(req.getModelId()); // 转换do AiChatRoleDO insertAiChatRoleDO = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); insertAiChatRoleDO.setUserId(SecurityFrameworkUtils.getLoginUserId()); - insertAiChatRoleDO.setUseCount(0); + insertAiChatRoleDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 保存 aiChatRoleMapper.insert(insertAiChatRoleDO); } @Override - public void update(Long id, AiChatRoleUpdateReq req) { - // 转换enum,并校验enum - AiChatRoleClassifyEnum.valueOfClassify(req.getClassify()); - AiChatRoleEnableEnum.valueOfType(req.getEnable()); + public void update(AiChatRoleUpdateReqVO req) { // 检查角色是否存在 - validateExists(id); + validateExists(req.getId()); + // 转换enum,并校验enum + AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); + // 校验模型是否存在 + aiChatModalService.validateExists(req.getModelId()); // 转换do AiChatRoleDO updateChatRole = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); - updateChatRole.setId(id); + updateChatRole.setId(req.getId()); aiChatRoleMapper.updateById(updateChatRole); } @Override - public void updateEnable(Long id, AiChatRoleUpdateVisibilityReq req) { - // 转换enum,并校验enum - AiChatRoleEnableEnum.valueOfType(req.getEnable()); + public void updatePublicStatus(AiChatRoleUpdatePublicStatusReqVO req) { // 检查角色是否存在 - validateExists(id); + validateExists(req.getId()); // 更新 - aiChatRoleMapper.updateById(new AiChatRoleDO() - .setId(id) - .setEnable(req.getEnable()) + aiChatRoleMapper.updateById( + new AiChatRoleDO() + .setId(req.getId()) + .setPublicStatus(req.getPublicStatus()) ); } -- Gitee From 929f3597fdfb00da67dfbf821379267e27fd9859 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:47:58 +0800 Subject: [PATCH 0477/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4Ai=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/enums/AiChatModalDisableEnum.java | 26 ------ .../admin/model/AiChatModalController.java | 36 +++----- ...alAddReq.java => AiChatModalAddReqVO.java} | 36 ++++---- ...ListReq.java => AiChatModalListReqVO.java} | 2 +- .../admin/model/vo/model/AiChatModalRes.java | 35 +++++--- .../vo/model/AiChatModalUpdateReqVO.java | 63 ++++++++++++++ .../module/ai/convert/AiChatModalConvert.java | 11 +-- .../module/ai/service/AiChatModalService.java | 19 ++-- .../service/impl/AiChatModalServiceImpl.java | 86 ++++--------------- .../ai/service/impl/AiChatServiceImpl.java | 12 +-- 10 files changed, 161 insertions(+), 165 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalDisableEnum.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalAddReq.java => AiChatModalAddReqVO.java} (62%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalListReq.java => AiChatModalListReqVO.java} (88%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalDisableEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalDisableEnum.java deleted file mode 100644 index 5b780ec6e1..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalDisableEnum.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * ai modal disable - * - * @author fansili - * @time 2024/4/24 20:15 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatModalDisableEnum { - - NO(0, "未禁用"), - YES(1, "禁用"), - - - ; - - private Integer value; - - private String name; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java index e90de159e4..5b96aeec93 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java @@ -2,19 +2,19 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.service.AiChatModalService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; // TODO @fan:调整下接口;相关 vo 的命名等等;modal => model + /** * ai 模型 * @@ -24,7 +24,7 @@ import org.springframework.web.multipart.MultipartFile; */ @Tag(name = "A6-AI模型") @RestController -@RequestMapping("/ai/chat") +@RequestMapping("/ai/chat/modal") @Slf4j @AllArgsConstructor public class AiChatModalController { @@ -32,37 +32,29 @@ public class AiChatModalController { private final AiChatModalService aiChatModalService; @Operation(summary = "ai模型 - 模型列表") - @GetMapping("/modal/list") - public PageResult list(@ModelAttribute AiChatModalListReq req) { + @GetMapping("/list") + public PageResult list(@ModelAttribute AiChatModalListReqVO req) { return aiChatModalService.list(req); } @Operation(summary = "ai模型 - 添加") - @PutMapping("/modal") - public CommonResult add(@RequestBody @Validated AiChatModalAddReq req) { + @PutMapping("/add") + public CommonResult add(@RequestBody @Validated AiChatModalAddReqVO req) { aiChatModalService.add(req); return CommonResult.success(null); } - @Operation(summary = "ai模型 - 模型照片上传") - @PostMapping("/modal/{id}/updateImage") - public CommonResult updateImage(@PathVariable("id") Long id, - MultipartFile file) { - // todo yunai 文件上传这里放哪里 - return CommonResult.success(null); - } - @Operation(summary = "ai模型 - 修改") - @PostMapping("/modal/{id}") - public CommonResult update(@PathVariable Long id, - @RequestBody @Validated AiChatModalAddReq req) { + @PostMapping("/update") + public CommonResult update(@RequestParam("id") Long id, + @RequestBody @Validated AiChatModalAddReqVO req) { aiChatModalService.update(id, req); return CommonResult.success(null); } @Operation(summary = "ai模型 - 删除") - @DeleteMapping("/modal/{id}") - public CommonResult delete(@PathVariable Long id) { + @DeleteMapping("/delete") + public CommonResult delete(@RequestParam("id") Long id) { aiChatModalService.delete(id); return CommonResult.success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java similarity index 62% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java index d750f922a4..e9bc9242e0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java @@ -6,8 +6,6 @@ import jakarta.validation.constraints.Size; import lombok.Data; import lombok.experimental.Accessors; -import java.util.Map; - /** * ai chat modal * @@ -17,32 +15,40 @@ import java.util.Map; */ @Data @Accessors(chain = true) -public class AiChatModalAddReq { +public class AiChatModalAddReqVO { + + @Schema(description = "API 秘钥编号") + @Size(max = 32, message = "API 秘钥编号最大32个字符") + @NotNull(message = "API 秘钥编号不能为空!") + private Long keyId; @Schema(description = "模型名字") @Size(max = 60, message = "模型名字最大60个字符") @NotNull(message = "模型名字不能为空!") private String name; + @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") + @Size(max = 32, message = "模型类型最大32个字符") + @NotNull(message = "model模型不能为空!") + private String model; + @Size(max = 32, message = "模型平台最大32个字符") @Schema(description = "模型平台 参考 AiPlatformEnum") @NotNull(message = "平台不能为空!") private String platform; - @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - @Size(max = 32, message = "模型类型最大32个字符") - @NotNull(message = "modal模型不能为空!") - private String modal; - - @Schema(description = "模型照片") - @Size(max = 256, message = "模型照片地址最大256个字符") - private String imageUrl; - @Schema(description = "排序") @NotNull(message = "sort排序不能为空!") private Integer sort; - @Schema(description = "模型配置JSON") -// @Size(max = 1024, message = "模型配置最大1024个字符") - private Map config; + // ========== 会话配置 ========== + + @Schema(description = "温度参数") + private Integer temperature; + + @Schema(description = "单条回复的最大 Token 数量") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量") + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java index 7a73a0c992..a589db4b50 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalListReq extends PageParam { +public class AiChatModalListReqVO extends PageParam { @Schema(description = "名字搜搜") private String search; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java index 15879a603a..61ed35abd3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.Size; import lombok.Data; import lombok.experimental.Accessors; @@ -15,27 +16,35 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiChatModalRes { - @Schema(description = "id") + @Schema(description = "编号") private Long id; - @Schema(description = "模型平台 参考 AiPlatformEnum") - private String platform; - - @Schema(description = "模型类型 参考 YiYanChatModel、XingHuoChatModel") - private String modal; + @Schema(description = "API 秘钥编号") + private Long keyId; @Schema(description = "模型名字") private String name; - @Schema(description = "模型照片") - private String image; + @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") + private String model; - @Schema(description = "禁用 0、正常 1、禁用") - private Integer disable; + @Size(max = 32, message = "模型平台最大32个字符") + private String platform; - @Schema(description = "排序 asc 排序") + @Schema(description = "排序") private Integer sort; - @Schema(description = "modal 配置") - private String config; + @Schema(description = "状态") + private Integer status; + + // ========== 会话配置 ========== + + @Schema(description = "温度参数") + private Integer temperature; + + @Schema(description = "单条回复的最大 Token 数量") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量") + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java new file mode 100644 index 0000000000..4e9fd898c8 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * ai chat modal + * + * @author fansili + * @time 2024/4/24 19:47 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModalUpdateReqVO { + + @Schema(description = "编号") + @Size(max = 32, message = "编号最大32个字符") + @NotNull(message = "编号不能为空") + private Long id; + + @Schema(description = "API 秘钥编号") + @Size(max = 32, message = "API 秘钥编号最大32个字符") + @NotNull(message = "API 秘钥编号不能为空!") + private Long keyId; + + @Schema(description = "模型名字") + @Size(max = 60, message = "模型名字最大60个字符") + @NotNull(message = "模型名字不能为空!") + private String name; + + @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") + @Size(max = 32, message = "模型类型最大32个字符") + @NotNull(message = "model模型不能为空!") + private String model; + + @Size(max = 32, message = "模型平台最大32个字符") + @Schema(description = "模型平台 参考 AiPlatformEnum") + @NotNull(message = "平台不能为空!") + private String platform; + + @Schema(description = "排序") + @NotNull(message = "sort排序不能为空!") + private Integer sort; + + @Schema(description = "状态") + @NotNull(message = "状态不能为空!") + private Integer status; + + // ========== 会话配置 ========== + + @Schema(description = "温度参数") + private Integer temperature; + + @Schema(description = "单条回复的最大 Token 数量") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量") + private Integer maxContexts; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index d2d6763f9f..04a9352aba 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -1,12 +1,10 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import java.util.List; @@ -37,10 +35,7 @@ public interface AiChatModalConvert { * @param req * @return */ - @Mappings({ - @Mapping(target = "config", ignore = true) - }) - AiChatModalDO convertAiChatModalDO(AiChatModalAddReq req); + AiChatModalDO convertAiChatModalDO(AiChatModalAddReqVO req); /** diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index 5740328be7..2f52b8ab1d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; /** * ai modal @@ -21,14 +22,14 @@ public interface AiChatModalService { * @param req * @return */ - PageResult list(AiChatModalListReq req); + PageResult list(AiChatModalListReqVO req); /** * ai modal - 添加 * * @param req */ - void add(AiChatModalAddReq req); + void add(AiChatModalAddReqVO req); /** * ai modal - 更新 @@ -36,7 +37,7 @@ public interface AiChatModalService { * @param id * @param req */ - void update(Long id, AiChatModalAddReq req); + void update(Long id, AiChatModalAddReqVO req); /** * ai modal - 删除 @@ -53,6 +54,14 @@ public interface AiChatModalService { */ AiChatModalRes getChatModalOfValidate(Long modalId); + /** + * 校验 - 是否存在 + * + * @param id + * @return + */ + AiChatModalDO validateExists(Long id); + /** * 校验 - 校验是否可用 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 89c85f8eef..1702df4a63 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -3,26 +3,20 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.validation.ValidationUtil; import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatModal; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; -import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalChatConfigVO; -import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; -import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalDallConfigVO; -import cn.iocoder.yudao.module.ai.enums.AiChatModalDisableEnum; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; +import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; import cn.iocoder.yudao.module.ai.service.AiChatModalService; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReq; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReq; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -46,10 +40,10 @@ public class AiChatModalServiceImpl implements AiChatModalService { private final AiChatModalMapper aiChatModalMapper; @Override - public PageResult list(AiChatModalListReq req) { + public PageResult list(AiChatModalListReqVO req) { LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // 查询的都是未禁用的模型 - queryWrapperX.eq(AiChatModalDO::getDisable, AiChatModalDisableEnum.NO.getValue()); + queryWrapperX.eq(AiChatModalDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); // search if (!StrUtil.isBlank(req.getSearch())) { queryWrapperX.like(AiChatModalDO::getName, req.getSearch().trim()); @@ -64,39 +58,26 @@ public class AiChatModalServiceImpl implements AiChatModalService { } @Override - public void add(AiChatModalAddReq req) { + public void add(AiChatModalAddReqVO req) { // 校验 platform、type validatePlatform(req.getPlatform()); - validateModal(req.getPlatform(), req.getModal()); - // 转换config - AiChatModalConfigVO aiChatModalConfigVO = convertConfig(req); - // 校验 modal config - validateModalConfig(aiChatModalConfigVO); // 转换 do AiChatModalDO insertChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); // 设置默认属性 - insertChatModalDO.setDisable(AiChatModalDisableEnum.NO.getValue()); - insertChatModalDO.setConfig(JsonUtils.toJsonString(aiChatModalConfigVO)); + insertChatModalDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 保存数据库 aiChatModalMapper.insert(insertChatModalDO); } @Override - public void update(Long id, AiChatModalAddReq req) { - // 校验 platform、type + public void update(Long id, AiChatModalAddReqVO req) { + // 校验 platform validatePlatform(req.getPlatform()); - validateModal(req.getPlatform(), req.getModal()); - // 转换config - AiChatModalConfigVO aiChatModalConfigVO = convertConfig(req); - // 校验 modal config - validateModalConfig(aiChatModalConfigVO); - // 校验模型是否存在 - validateChatModalExists(id); + validateExists(id); // 转换 updateChatModalDO AiChatModalDO updateChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); updateChatModalDO.setId(id); - updateChatModalDO.setConfig(JsonUtils.toJsonString(aiChatModalConfigVO)); // 更新数据库 aiChatModalMapper.updateById(updateChatModalDO); } @@ -104,7 +85,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { @Override public void delete(Long id) { // 检查 modal 是否存在 - validateChatModalExists(id); + validateExists(id); // 删除 delete aiChatModalMapper.deleteById(id); } @@ -112,19 +93,19 @@ public class AiChatModalServiceImpl implements AiChatModalService { @Override public AiChatModalRes getChatModalOfValidate(Long modalId) { // 检查 modal 是否存在 - AiChatModalDO aiChatModalDO = validateChatModalExists(modalId); + AiChatModalDO aiChatModalDO = validateExists(modalId); return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); } @Override public void validateAvailable(AiChatModalRes chatModal) { // 对话模型是否可用 - if (AiChatModalDisableEnum.YES.getValue().equals(chatModal.getDisable())) { + if (CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); } } - private AiChatModalDO validateChatModalExists(Long id) { + public AiChatModalDO validateExists(Long id) { AiChatModalDO aiChatModalDO = aiChatModalMapper.selectById(id); if (aiChatModalDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); @@ -132,23 +113,6 @@ public class AiChatModalServiceImpl implements AiChatModalService { return aiChatModalDO; } - private void validateModal(String platform, String modal) { - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(platform); - try { - if (AiPlatformEnum.QIAN_WEN == platformEnum) { - QianWenChatModal.valueOfModel(modal); - } else if (AiPlatformEnum.XING_HUO == platformEnum) { - XingHuoChatModel.valueOfModel(modal); - } else if (AiPlatformEnum.YI_YAN == platformEnum) { - YiYanChatModel.valueOfModel(modal); - } else { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_SUPPORTED_MODAL, platform); - } - } catch (IllegalArgumentException e) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, e.getMessage()); - } - } - private void validatePlatform(String platform) { try { AiPlatformEnum.valueOfPlatform(platform); @@ -163,20 +127,4 @@ public class AiChatModalServiceImpl implements AiChatModalService { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, constraintViolation.getMessage()); } } - - private static AiChatModalConfigVO convertConfig(AiChatModalAddReq req) { - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(req.getPlatform()); - AiChatModalConfigVO resVo = null; - if (AiPlatformEnum.CHAT_PLATFORM_LIST.contains(platformEnum)) { - resVo = JsonUtils.parseObject(JsonUtils.toJsonString(req.getConfig()), AiChatModalChatConfigVO.class); - } else if (AiPlatformEnum.OPEN_AI_DALL == platformEnum) { - resVo = JsonUtils.parseObject(JsonUtils.toJsonString(req.getConfig()), AiChatModalDallConfigVO.class); - } - if (resVo == null) { - throw new IllegalArgumentException("ai模型中config不能转换! json: " + req.getConfig()); - } - resVo.setType(req.getModal()); - resVo.setPlatform(req.getPlatform()); - return resVo; - } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 63ef59aa5d..575e7889b8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -72,10 +72,10 @@ public class AiChatServiceImpl implements AiChatService { // 校验角色是否公开 aiChatRoleService.validateIsPublic(aiChatRoleDO); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModal()); + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModel()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModal.getModal(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); String content = null; try { @@ -96,7 +96,7 @@ public class AiChatServiceImpl implements AiChatService { } finally { // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModal(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } return new AiChatMessageRespVO().setContent(content); @@ -150,11 +150,11 @@ public class AiChatServiceImpl implements AiChatService { // 保存 chat message // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModal.getModal(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModal()); + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModel()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); Flux streamResponse = streamingChatClient.stream(prompt); @@ -183,7 +183,7 @@ public class AiChatServiceImpl implements AiChatService { sseEmitter.complete(); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModal(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } -- Gitee From 53f4ad43d83baab204bb361288c7d9261842be05 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:49:15 +0800 Subject: [PATCH 0478/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20modal=20req=20=E5=92=8Cres?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0vo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/model/AiChatModalController.java | 4 ++-- ...tModalListRes.java => AiChatModalListRespVO.java} | 2 +- .../{AiChatModalRes.java => AiChatModalRespVO.java} | 2 +- .../yudao/module/ai/convert/AiChatModalConvert.java | 8 ++++---- .../yudao/module/ai/service/AiChatModalService.java | 10 +++++----- .../service/impl/AiChatConversationServiceImpl.java | 5 ++--- .../ai/service/impl/AiChatModalServiceImpl.java | 12 ++++++------ .../module/ai/service/impl/AiChatServiceImpl.java | 6 +++--- 8 files changed, 24 insertions(+), 25 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalListRes.java => AiChatModalListRespVO.java} (96%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalRes.java => AiChatModalRespVO.java} (97%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java index 5b96aeec93..929a9e3439 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; import cn.iocoder.yudao.module.ai.service.AiChatModalService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -33,7 +33,7 @@ public class AiChatModalController { @Operation(summary = "ai模型 - 模型列表") @GetMapping("/list") - public PageResult list(@ModelAttribute AiChatModalListReqVO req) { + public PageResult list(@ModelAttribute AiChatModalListReqVO req) { return aiChatModalService.list(req); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java similarity index 96% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java index 75e71df99f..2249a2c00d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java @@ -13,7 +13,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalListRes { +public class AiChatModalListRespVO { @Schema(description = "id") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java similarity index 97% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java index 61ed35abd3..28a439733e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalRes { +public class AiChatModalRespVO { @Schema(description = "编号") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java index 04a9352aba..a0604f1d6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -27,7 +27,7 @@ public interface AiChatModalConvert { * @param list * @return */ - List convertAiChatModalListRes(List list); + List convertAiChatModalListRes(List list); /** * 转换 - AiChatModalDO @@ -44,6 +44,6 @@ public interface AiChatModalConvert { * @param aiChatModalDO * @return */ - AiChatModalRes convertAiChatModalRes(AiChatModalDO aiChatModalDO); + AiChatModalRespVO convertAiChatModalRes(AiChatModalDO aiChatModalDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java index 2f52b8ab1d..ba16b8e170 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; /** @@ -22,7 +22,7 @@ public interface AiChatModalService { * @param req * @return */ - PageResult list(AiChatModalListReqVO req); + PageResult list(AiChatModalListReqVO req); /** * ai modal - 添加 @@ -52,7 +52,7 @@ public interface AiChatModalService { * @param modalId * @return */ - AiChatModalRes getChatModalOfValidate(Long modalId); + AiChatModalRespVO getChatModalOfValidate(Long modalId); /** * 校验 - 是否存在 @@ -67,5 +67,5 @@ public interface AiChatModalService { * * @param chatModal */ - void validateAvailable(AiChatModalRes chatModal); + void validateAvailable(AiChatModalRespVO chatModal); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 5f45f27b60..34332959f1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -5,10 +5,9 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; @@ -88,7 +87,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 校验对话是否存在 validateExists(updateReqVO.getId()); // 获取模型信息并验证 - AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(updateReqVO.getModelId()); + AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(updateReqVO.getModelId()); // 校验modal是否可用 aiChatModalService.validateAvailable(chatModal); // 更新对话信息 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 1702df4a63..2e1c375031 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -10,8 +10,8 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRes; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; @@ -40,7 +40,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { private final AiChatModalMapper aiChatModalMapper; @Override - public PageResult list(AiChatModalListReqVO req) { + public PageResult list(AiChatModalListReqVO req) { LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // 查询的都是未禁用的模型 queryWrapperX.eq(AiChatModalDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); @@ -53,7 +53,7 @@ public class AiChatModalServiceImpl implements AiChatModalService { // 查询 PageResult aiChatModalDOPageResult = aiChatModalMapper.selectPage(req, queryWrapperX); // 转换 res - List resList = AiChatModalConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); + List resList = AiChatModalConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); return new PageResult<>(resList, aiChatModalDOPageResult.getTotal()); } @@ -91,14 +91,14 @@ public class AiChatModalServiceImpl implements AiChatModalService { } @Override - public AiChatModalRes getChatModalOfValidate(Long modalId) { + public AiChatModalRespVO getChatModalOfValidate(Long modalId) { // 检查 modal 是否存在 AiChatModalDO aiChatModalDO = validateExists(modalId); return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); } @Override - public void validateAvailable(AiChatModalRes chatModal) { + public void validateAvailable(AiChatModalRespVO chatModal) { // 对话模型是否可用 if (CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 575e7889b8..7fc13cac6a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -13,7 +13,7 @@ import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; @@ -61,7 +61,7 @@ public class AiChatServiceImpl implements AiChatService { // 查询对话 AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); // 获取对话模型 - AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); + AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); // 对话模型是否可用 aiChatModalService.validateAvailable(chatModal); // 获取角色信息 @@ -132,7 +132,7 @@ public class AiChatServiceImpl implements AiChatService { // 查询对话 AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); // 获取对话模型 - AiChatModalRes chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); + AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); // 对话模型是否可用 aiChatModalService.validateAvailable(chatModal); // 获取角色信息 -- Gitee From f438e68dc9659bf1253a39fd2b9b052c3a997dd1 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:49:49 +0800 Subject: [PATCH 0479/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20role=20req=20=E5=92=8Cres?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0vo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/model/AiChatRoleController.java | 2 +- .../{AiChatRoleListReq.java => AiChatRoleListReqVO.java} | 2 +- .../{AiChatRoleListRes.java => AiChatRoleListRespVO.java} | 2 +- .../vo/role/{AiChatRoleRes.java => AiChatRoleRespVO.java} | 2 +- .../yudao/module/ai/convert/AiChatRoleConvert.java | 8 ++++---- .../yudao/module/ai/service/AiChatRoleService.java | 4 ++-- .../ai/service/impl/AiChatConversationServiceImpl.java | 4 ++-- .../module/ai/service/impl/AiChatRoleServiceImpl.java | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleListReq.java => AiChatRoleListReqVO.java} (88%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleListRes.java => AiChatRoleListRespVO.java} (95%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/{AiChatRoleRes.java => AiChatRoleRespVO.java} (96%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index 64a06632ab..1aab426002 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -29,7 +29,7 @@ public class AiChatRoleController { @Operation(summary = "chat角色 - 角色列表") @GetMapping("/list") - public PageResult list(@Validated @ModelAttribute AiChatRoleListReq req) { + public PageResult list(@Validated @ModelAttribute AiChatRoleListReqVO req) { return chatRoleService.list(req); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java index 5662398a78..247154a4cd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java @@ -13,7 +13,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleListReq extends PageParam { +public class AiChatRoleListReqVO extends PageParam { @Schema(description = "查询") private String search; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java index 5aee6a3d2e..f66d5a6ea5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleListRes { +public class AiChatRoleListRespVO { @Schema(description = "id") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java similarity index 96% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java index 6b4ec9d225..a28dd4f4cf 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRes.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatRoleRes { +public class AiChatRoleRespVO { @Schema(description = "id") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java index 86ed30e220..269b4a6ee9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleUpdateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleListRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleListRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -28,7 +28,7 @@ public interface AiChatRoleConvert { * @param roleList * @return */ - List convertChatRoleListRes(List roleList); + List convertChatRoleListRes(List roleList); /** * 转换 - AiChatRoleDO @@ -52,5 +52,5 @@ public interface AiChatRoleConvert { * @param aiChatRoleDO * @return */ - AiChatRoleRes convertAiChatRoleRes(AiChatRoleDO aiChatRoleDO); + AiChatRoleRespVO convertAiChatRoleRes(AiChatRoleDO aiChatRoleDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index 2ad696fb0f..96d7221002 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -18,7 +18,7 @@ public interface AiChatRoleService { * @param req * @return */ - PageResult list(AiChatRoleListReq req); + PageResult list(AiChatRoleListReqVO req); /** * chat角色 - 添加 @@ -56,7 +56,7 @@ public interface AiChatRoleService { * @param roleId * @return */ - AiChatRoleRes getChatRole(Long roleId); + AiChatRoleRespVO getChatRole(Long roleId); /** * 校验 - 角色是否存在 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 34332959f1..228ab75e16 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatCo import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRes; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; @@ -47,7 +47,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 默认使用 sort 排序第一个模型 AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); // 查询角色 - AiChatRoleRes chatRoleRes = null; + AiChatRoleRespVO chatRoleRes = null; if (req.getRoleId() != null) { chatRoleRes = aiChatRoleService.getChatRole(req.getRoleId()); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index b3e645e372..5264ea2a23 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -35,7 +35,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { private final AiChatModalService aiChatModalService; @Override - public PageResult list(AiChatRoleListReq req) { + public PageResult list(AiChatRoleListReqVO req) { // 查询条件 LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // search 查询 @@ -49,7 +49,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { Long total = aiChatRoleDOPageResult.getTotal(); List roleList = aiChatRoleDOPageResult.getList(); // 换货res - List chatRoleListResList = AiChatRoleConvert.INSTANCE.convertChatRoleListRes(roleList); + List chatRoleListResList = AiChatRoleConvert.INSTANCE.convertChatRoleListRes(roleList); return new PageResult<>(chatRoleListResList, total); } @@ -103,7 +103,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { } @Override - public AiChatRoleRes getChatRole(Long roleId) { + public AiChatRoleRespVO getChatRole(Long roleId) { // 检查角色是否存在 AiChatRoleDO aiChatRoleDO = validateExists(roleId); return AiChatRoleConvert.INSTANCE.convertAiChatRoleRes(aiChatRoleDO); -- Gitee From 4ccaad792122d376419c751881892ace8023369c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:50:39 +0800 Subject: [PATCH 0480/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E5=88=A0=E9=99=A4=20package-info=20=E5=8D=A0=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/controller/admin/model/vo/package-info.java | 1 - 1 file changed, 1 deletion(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java deleted file mode 100644 index 7fb31bb997..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo; \ No newline at end of file -- Gitee From fb82dd2ffd7be5525185b1b1ead0235f1be9b584 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 11:59:17 +0800 Subject: [PATCH 0481/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8=E7=9A=84=20enum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/enums/AiChatModalTypeEnum.java | 11 ------ .../yudao/module/ai/enums/AiChatTypeEnum.java | 34 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatTypeEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java deleted file mode 100644 index 0cf6c6ab1a..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatModalTypeEnum.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -/** - * 枚举 - * - * @author fansili - * @time 2024/5/6 11:48 - * @since 1.0 - */ -public enum AiChatModalTypeEnum { -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatTypeEnum.java deleted file mode 100644 index 6ee7fabf62..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatTypeEnum.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 聊天类型 - * - * @author fansili - * @time 2024/4/14 17:58 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatTypeEnum { - - ROLE_CHAT("roleChat", "角色模板聊天"), - USER_CHAT("userChat", "用户普通聊天"), - - ; - - private String type; - - private String name; - - public static AiChatTypeEnum valueOfType(String type) { - for (AiChatTypeEnum itemEnum : AiChatTypeEnum.values()) { - if (itemEnum.getType().equals(type)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + type); - } -} -- Gitee From 794d4c3195434a530230c56a14d7755cefd2c175 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 12:06:20 +0800 Subject: [PATCH 0482/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E5=90=88=E5=B9=B6=20AI=20=E6=A8=A1=E5=9E=8B=E5=88=B0=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=20enums=E9=87=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/enums/AiModelEnum.java | 67 +++++++++++++++++++ .../module/ai/enums/AiOpenAiModelEnum.java | 30 --------- 2 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java new file mode 100644 index 0000000000..3d30d27cb4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +// TODO done @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 +// TODO @fan: AiModelEnum 是不是可以缩写成这个哈;所有的模型,都写在这里枚举; +/** + * @author: fansili + * @time: 2024/3/4 12:36 + */ +@Getter +@AllArgsConstructor +public enum AiModelEnum { + + // open ai + OPEN_AI_GPT_3_5( "GPT3.5", "gpt-3.5-turbo",null), + OPEN_AI_GPT_4("GPT4", "gpt-4-turbo",null), + + // 千问付费模型 + QWEN_TURBO("通义千问超大规模语言模型", "qwen-turbo", null), + QWEN_PLUS("通义千问超大规模语言模型增强版", "qwen-plus", null), + QWEN_MAX("通义千问千亿级别超大规模语言模型", "qwen-max", null), + QWEN_MAX_0403("通义千问千亿级别超大规模语言模型-0403", "qwen-max-0403", null), + QWEN_MAX_0107("通义千问千亿级别超大规模语言模型-0107", "qwen-max-0107", null), + QWEN_MAX_1201("通义千问千亿级别超大规模语言模型-1201", "qwen-max-1201", null), + QWEN_MAX_LONGCONTEXT("通义千问千亿级别超大规模语言模型-28k tokens", "qwen-max-longcontext", null), + + // 千问开源模型 + // https://help.aliyun.com/document_detail/2666503.html?spm=a2c4g.2701795.0.0.26eb34dfKzcWN4 + QWEN_72B_CHAT("通义千问1.5对外开源的72B规模参数量的经过人类指令对齐的chat模型", "qwen-72b-chat", null), + + // 一言模型 + ERNIE4_0("ERNIE 4.0", "ERNIE 4.0", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro"), + ERNIE4_3_5_8K("ERNIE-3.5-8K", "ERNIE-3.5-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions"), + ERNIE4_3_5_8K_0205("ERNIE-3.5-8K-0205", "ERNIE-3.5-8K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-0205"), + + ERNIE4_3_5_8K_1222("ERNIE-3.5-8K-1222", "ERNIE-3.5-8K-1222", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-1222"), + ERNIE4_BOT_8K("ERNIE-Bot-8K", "ERNIE-Bot-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie_bot_8k"), + ERNIE4_3_5_4K_0205("ERNIE-3.5-4K-0205", "ERNIE-3.5-4K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-4k-0205"), + +// 文档地址:https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E +// general指向V1.5版本; +// generalv2指向V2版本; +// generalv3指向V3版本; +// generalv3.5指向V3.5版本; + + XING_HUO_1_5("星火大模型1.5", "general", "/v1.1/chat"), + XING_HUO_2_0("星火大模型2.0", "generalv2", "/v2.1/chat"), + XING_HUO_3_0("星火大模型3.0", "generalv3", "/v3.1/chat"), + XING_HUO_3_5("星火大模型3.5", "generalv3.5", "/v3.5/chat"), + ; + + /** + * 模型名字 - 用于展示 + */ + private final String name; + /** + * 模型标志 - 用于参数传递 + */ + private final String model; + /** + * uri地址 + */ + private final String uri; + +} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java deleted file mode 100644 index 993cabdcd2..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiOpenAiModelEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -// TODO done @fansili:1)类注释要加下;2)author 和 time 用 javadoc,@author 和 @since;3)@AllArgsConstructor 使用这个注解,去掉构造方法;4)value 改成 model 字段,然后注释都写下哈;5)message 改成 name,然后注释都写下哈 -// TODO @fan: AiModelEnum 是不是可以缩写成这个哈;所有的模型,都写在这里枚举; -/** - * @author: fansili - * @time: 2024/3/4 12:36 - */ -@Getter -@AllArgsConstructor -public enum AiOpenAiModelEnum { - - - OPEN_AI_GPT_3_5("gpt-3.5-turbo", "GPT3.5"), - OPEN_AI_GPT_4("gpt-4-turbo", "GPT4") - ; - - /** - * 模型标志 - 用于参数传递 - */ - private final String model; - /** - * 模型名字 - 用于展示 - */ - private final String name; - -} -- Gitee From 893d394a0af3f81526224aef6f36f78b6967849c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 12:06:55 +0800 Subject: [PATCH 0483/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BA=20AiModelEnum=20=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E6=88=90=E4=B8=80=E4=B8=AA=20ai=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/dal/dataobject/chat/AiChatConversationDO.java | 4 ++-- .../yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index 9a436b9882..21bc0c0bf2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.enums.AiOpenAiModelEnum; +import cn.iocoder.yudao.module.ai.enums.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -66,7 +66,7 @@ public class AiChatConversationDO extends BaseDO { /** * 模型标志 * - * 枚举 {@link AiOpenAiModelEnum} + * 枚举 {@link AiModelEnum} */ private String model; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index f5a5296a74..33489ae673 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.enums.AiOpenAiModelEnum; +import cn.iocoder.yudao.module.ai.enums.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -64,7 +64,7 @@ public class AiChatMessageDO extends BaseDO { /** * 模型标志 * - * 枚举 {@link AiOpenAiModelEnum} + * 枚举 {@link AiModelEnum} */ private String model; /** -- Gitee From 46b5f17bbc3830cdf67d6e0159b2a9af72e53a7d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 14:43:07 +0800 Subject: [PATCH 0484/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91m?= =?UTF-8?q?odal=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...roller.java => AiChatModelController.java} | 28 +++++----- ...AddReqVO.java => AiChatModelAddReqVO.java} | 3 +- ...stReqVO.java => AiChatModelListReqVO.java} | 2 +- ...RespVO.java => AiChatModelListRespVO.java} | 2 +- ...alConvert.java => AiChatModelConvert.java} | 16 +++--- ...{AiChatModalDO.java => AiChatModelDO.java} | 5 +- ...odalMapper.java => AiChatModelMapper.java} | 12 ++--- ...alService.java => AiChatModelService.java} | 18 +++---- .../service/impl/AiChatModalServiceImpl.java | 54 +++++++++---------- 9 files changed, 69 insertions(+), 71 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/{AiChatModalController.java => AiChatModelController.java} (73%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalAddReqVO.java => AiChatModelAddReqVO.java} (93%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalListReqVO.java => AiChatModelListReqVO.java} (88%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/{AiChatModalListRespVO.java => AiChatModelListRespVO.java} (96%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/{AiChatModalConvert.java => AiChatModelConvert.java} (68%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/{AiChatModalDO.java => AiChatModelDO.java} (93%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/{AiChatModalMapper.java => AiChatModelMapper.java} (74%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{AiChatModalService.java => AiChatModelService.java} (79%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java similarity index 73% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 929a9e3439..16da3a7ace 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModalController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; +import cn.iocoder.yudao.module.ai.service.AiChatModelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -24,38 +24,38 @@ import org.springframework.web.bind.annotation.*; */ @Tag(name = "A6-AI模型") @RestController -@RequestMapping("/ai/chat/modal") +@RequestMapping("/ai/chat/model") @Slf4j @AllArgsConstructor -public class AiChatModalController { +public class AiChatModelController { - private final AiChatModalService aiChatModalService; + private final AiChatModelService aiChatModelService; @Operation(summary = "ai模型 - 模型列表") @GetMapping("/list") - public PageResult list(@ModelAttribute AiChatModalListReqVO req) { - return aiChatModalService.list(req); + public PageResult list(@ModelAttribute AiChatModelListReqVO req) { + return aiChatModelService.list(req); } @Operation(summary = "ai模型 - 添加") @PutMapping("/add") - public CommonResult add(@RequestBody @Validated AiChatModalAddReqVO req) { - aiChatModalService.add(req); + public CommonResult add(@RequestBody @Validated AiChatModelAddReqVO req) { + aiChatModelService.add(req); return CommonResult.success(null); } @Operation(summary = "ai模型 - 修改") @PostMapping("/update") public CommonResult update(@RequestParam("id") Long id, - @RequestBody @Validated AiChatModalAddReqVO req) { - aiChatModalService.update(id, req); + @RequestBody @Validated AiChatModelAddReqVO req) { + aiChatModelService.update(id, req); return CommonResult.success(null); } @Operation(summary = "ai模型 - 删除") @DeleteMapping("/delete") public CommonResult delete(@RequestParam("id") Long id) { - aiChatModalService.delete(id); + aiChatModelService.delete(id); return CommonResult.success(null); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java index e9bc9242e0..569760fab2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalAddReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java @@ -15,10 +15,9 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalAddReqVO { +public class AiChatModelAddReqVO { @Schema(description = "API 秘钥编号") - @Size(max = 32, message = "API 秘钥编号最大32个字符") @NotNull(message = "API 秘钥编号不能为空!") private Long keyId; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java index a589db4b50..7e3cfff138 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalListReqVO extends PageParam { +public class AiChatModelListReqVO extends PageParam { @Schema(description = "名字搜搜") private String search; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java similarity index 96% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java index 2249a2c00d..8a2bc5bc39 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java @@ -13,7 +13,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiChatModalListRespVO { +public class AiChatModelListRespVO { @Schema(description = "id") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java similarity index 68% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java index a0604f1d6b..666f7a23b7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModalConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -17,9 +17,9 @@ import java.util.List; * @since 1.0 */ @Mapper -public interface AiChatModalConvert { +public interface AiChatModelConvert { - AiChatModalConvert INSTANCE = Mappers.getMapper(AiChatModalConvert.class); + AiChatModelConvert INSTANCE = Mappers.getMapper(AiChatModelConvert.class); /** * 转换 - AiChatModalListRes @@ -27,7 +27,7 @@ public interface AiChatModalConvert { * @param list * @return */ - List convertAiChatModalListRes(List list); + List convertAiChatModalListRes(List list); /** * 转换 - AiChatModalDO @@ -35,7 +35,7 @@ public interface AiChatModalConvert { * @param req * @return */ - AiChatModalDO convertAiChatModalDO(AiChatModalAddReqVO req); + AiChatModelDO convertAiChatModalDO(AiChatModelAddReqVO req); /** @@ -44,6 +44,6 @@ public interface AiChatModalConvert { * @param aiChatModalDO * @return */ - AiChatModalRespVO convertAiChatModalRes(AiChatModalDO aiChatModalDO); + AiChatModalRespVO convertAiChatModalRes(AiChatModelDO aiChatModalDO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java index a35fa0e69a..420de6fe13 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModalDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; -import lombok.experimental.Accessors; /** * AI 聊天模型 DO @@ -22,7 +21,7 @@ import lombok.experimental.Accessors; @Builder @NoArgsConstructor @AllArgsConstructor -public class AiChatModalDO extends BaseDO { +public class AiChatModelDO extends BaseDO { /** * 编号 @@ -76,6 +75,6 @@ public class AiChatModalDO extends BaseDO { /** * 上下文的最大 Message 数量 */ - private Integer maxContexts; + private Integer i; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java similarity index 74% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index d460710da8..46d66ff5f5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModalMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -18,17 +18,17 @@ import org.springframework.stereotype.Repository; */ @Repository @Mapper -public interface AiChatModalMapper extends BaseMapperX { +public interface AiChatModelMapper extends BaseMapperX { /** * 查询 - 第一个modal * * @return */ - default AiChatModalDO selectFirstModal() { - PageResult pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), - new LambdaQueryWrapperX() - .orderByAsc(AiChatModalDO::getSort) + default AiChatModelDO selectFirstModal() { + PageResult pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), + new LambdaQueryWrapperX() + .orderByAsc(AiChatModelDO::getSort) ); if (CollUtil.isEmpty(pageResult.getList())) { return null; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java similarity index 79% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java index ba16b8e170..b685d26943 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModalService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; /** * ai modal @@ -14,7 +14,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; * @time 2024/4/24 19:42 * @since 1.0 */ -public interface AiChatModalService { +public interface AiChatModelService { /** * ai modal - 列表 @@ -22,14 +22,14 @@ public interface AiChatModalService { * @param req * @return */ - PageResult list(AiChatModalListReqVO req); + PageResult list(AiChatModelListReqVO req); /** * ai modal - 添加 * * @param req */ - void add(AiChatModalAddReqVO req); + void add(AiChatModelAddReqVO req); /** * ai modal - 更新 @@ -37,7 +37,7 @@ public interface AiChatModalService { * @param id * @param req */ - void update(Long id, AiChatModalAddReqVO req); + void update(Long id, AiChatModelAddReqVO req); /** * ai modal - 删除 @@ -60,7 +60,7 @@ public interface AiChatModalService { * @param id * @return */ - AiChatModalDO validateExists(Long id); + AiChatModelDO validateExists(Long id); /** * 校验 - 校验是否可用 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 2e1c375031..7a40846a4e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -8,15 +8,15 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; -import cn.iocoder.yudao.module.ai.convert.AiChatModalConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; +import cn.iocoder.yudao.module.ai.convert.AiChatModelConvert; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatModelService; import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -35,51 +35,51 @@ import java.util.Set; @AllArgsConstructor @Service @Slf4j -public class AiChatModalServiceImpl implements AiChatModalService { +public class AiChatModalServiceImpl implements AiChatModelService { - private final AiChatModalMapper aiChatModalMapper; + private final AiChatModelMapper aiChatModelMapper; @Override - public PageResult list(AiChatModalListReqVO req) { - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); + public PageResult list(AiChatModelListReqVO req) { + LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // 查询的都是未禁用的模型 - queryWrapperX.eq(AiChatModalDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); + queryWrapperX.eq(AiChatModelDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); // search if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.like(AiChatModalDO::getName, req.getSearch().trim()); + queryWrapperX.like(AiChatModelDO::getName, req.getSearch().trim()); } // 默认排序 - queryWrapperX.orderByAsc(AiChatModalDO::getSort); + queryWrapperX.orderByAsc(AiChatModelDO::getSort); // 查询 - PageResult aiChatModalDOPageResult = aiChatModalMapper.selectPage(req, queryWrapperX); + PageResult aiChatModalDOPageResult = aiChatModelMapper.selectPage(req, queryWrapperX); // 转换 res - List resList = AiChatModalConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); + List resList = AiChatModelConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); return new PageResult<>(resList, aiChatModalDOPageResult.getTotal()); } @Override - public void add(AiChatModalAddReqVO req) { + public void add(AiChatModelAddReqVO req) { // 校验 platform、type validatePlatform(req.getPlatform()); // 转换 do - AiChatModalDO insertChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); + AiChatModelDO insertChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); // 设置默认属性 insertChatModalDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 保存数据库 - aiChatModalMapper.insert(insertChatModalDO); + aiChatModelMapper.insert(insertChatModalDO); } @Override - public void update(Long id, AiChatModalAddReqVO req) { + public void update(Long id, AiChatModelAddReqVO req) { // 校验 platform validatePlatform(req.getPlatform()); // 校验模型是否存在 validateExists(id); // 转换 updateChatModalDO - AiChatModalDO updateChatModalDO = AiChatModalConvert.INSTANCE.convertAiChatModalDO(req); + AiChatModelDO updateChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); updateChatModalDO.setId(id); // 更新数据库 - aiChatModalMapper.updateById(updateChatModalDO); + aiChatModelMapper.updateById(updateChatModalDO); } @Override @@ -87,14 +87,14 @@ public class AiChatModalServiceImpl implements AiChatModalService { // 检查 modal 是否存在 validateExists(id); // 删除 delete - aiChatModalMapper.deleteById(id); + aiChatModelMapper.deleteById(id); } @Override public AiChatModalRespVO getChatModalOfValidate(Long modalId) { // 检查 modal 是否存在 - AiChatModalDO aiChatModalDO = validateExists(modalId); - return AiChatModalConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); + AiChatModelDO aiChatModalDO = validateExists(modalId); + return AiChatModelConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); } @Override @@ -105,8 +105,8 @@ public class AiChatModalServiceImpl implements AiChatModalService { } } - public AiChatModalDO validateExists(Long id) { - AiChatModalDO aiChatModalDO = aiChatModalMapper.selectById(id); + public AiChatModelDO validateExists(Long id) { + AiChatModelDO aiChatModalDO = aiChatModelMapper.selectById(id); if (aiChatModalDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); } -- Gitee From 0c99c1698992d455a3f3db5798001a8e00a11573 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Tue, 7 May 2024 14:58:12 +0800 Subject: [PATCH 0485/1557] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=80=A7?= =?UTF-8?q?=E5=88=AB=E6=9C=AA=E5=AE=9A=E4=B9=89=E6=97=B6=E7=9A=84=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/system/enums/common/SexEnum.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java index f6120c4187..91f05c0596 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java @@ -11,7 +11,8 @@ import lombok.Getter; @Getter @AllArgsConstructor public enum SexEnum { - + /** 未定义 */ + UNSPECIFIED(0), /** 男 */ MALE(1), /** 女 */ -- Gitee From 546821d9491039e99f9fd9a71a79057210444867 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Tue, 7 May 2024 15:09:15 +0800 Subject: [PATCH 0486/1557] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20MemberUse?= =?UTF-8?q?rBaseVO.sex=20=E4=B8=8E=20SexEnum.value=20=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/admin/user/vo/MemberUserBaseVO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java index db8c809d08..b240602617 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java @@ -38,7 +38,7 @@ public class MemberUserBaseVO { private String name; @Schema(description = "用户性别", example = "1") - private Byte sex; + private Integer sex; @Schema(description = "所在地编号", example = "4371") private Long areaId; -- Gitee From a0e06cc0b7aa97cf869409d1ae513b5143766759 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 15:24:18 +0800 Subject: [PATCH 0487/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4modal=20list=20=E8=BF=94=E5=9B=9E=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E5=92=8Cupdate=20req?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/model/AiChatModelController.java | 6 +- .../model/vo/model/AiChatModelListRespVO.java | 41 ++++++++----- .../vo/model/AiChatModelUpdateReqVO.java | 57 +++++++++++++++++++ .../module/ai/convert/AiChatModelConvert.java | 10 +++- .../dal/dataobject/model/AiChatModelDO.java | 2 +- .../module/ai/service/AiChatModelService.java | 8 +-- .../service/impl/AiChatModalServiceImpl.java | 11 ++-- 7 files changed, 103 insertions(+), 32 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 16da3a7ace..010d143ccc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelUpdateReqVO; import cn.iocoder.yudao.module.ai.service.AiChatModelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -46,9 +47,8 @@ public class AiChatModelController { @Operation(summary = "ai模型 - 修改") @PostMapping("/update") - public CommonResult update(@RequestParam("id") Long id, - @RequestBody @Validated AiChatModelAddReqVO req) { - aiChatModelService.update(id, req); + public CommonResult update(@RequestBody @Validated AiChatModelUpdateReqVO req) { + aiChatModelService.update(req); return CommonResult.success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java index 8a2bc5bc39..59a8900a65 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java @@ -1,5 +1,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -15,27 +19,36 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiChatModelListRespVO { - @Schema(description = "id") + @Schema(description = "编号") private Long id; - @Schema(description = "模型平台 参考 AiPlatformEnum") - private String platform; - - @Schema(description = "模型类型 参考 YiYanChatModel、XingHuoChatModel") - private String modal; + @Schema(description = "API 秘钥编号") + private Long keyId; - @Schema(description = "模型名字") + @Schema(description = "模型名称") private String name; - @Schema(description = "模型照片") - private String image; + @Schema(description = "模型标志") + private String model; - @Schema(description = "禁用 0、正常 1、禁用") - private Integer disable; + @Schema(description = "平台") + private String platform; - @Schema(description = "排序 asc 排序") + @Schema(description = "排序值") private Integer sort; - @Schema(description = "modal 配置") - private String config; + @Schema(description = "状态") + private Integer status; + + // ========== 会话配置 ========== + + @Schema(description = "温度参数") + private Double temperature; + + @Schema(description = "单条回复的最大 Token 数量") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量") + private Integer maxContexts; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java new file mode 100644 index 0000000000..577e998e9d --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * ai chat modal + * + * @author fansili + * @time 2024/4/24 19:47 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiChatModelUpdateReqVO { + + @Schema(description = "编号") + @NotNull(message = "编号不能为空") + private Long id; + + @Schema(description = "API 秘钥编号") + @NotNull(message = "API 秘钥编号不能为空!") + private Long keyId; + + @Schema(description = "模型名字") + @Size(max = 60, message = "模型名字最大60个字符") + @NotNull(message = "模型名字不能为空!") + private String name; + + @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") + @Size(max = 32, message = "模型类型最大32个字符") + @NotNull(message = "model模型不能为空!") + private String model; + + @Size(max = 32, message = "模型平台最大32个字符") + @Schema(description = "模型平台 参考 AiPlatformEnum") + @NotNull(message = "平台不能为空!") + private String platform; + + @Schema(description = "排序") + @NotNull(message = "sort排序不能为空!") + private Integer sort; + + // ========== 会话配置 ========== + + @Schema(description = "温度参数") + private Integer temperature; + + @Schema(description = "单条回复的最大 Token 数量") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量") + private Integer maxContexts; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java index 666f7a23b7..d6d57b5ef6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.module.ai.convert; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelUpdateReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -37,6 +38,13 @@ public interface AiChatModelConvert { */ AiChatModelDO convertAiChatModalDO(AiChatModelAddReqVO req); + /** + * 转换 - AiChatModalDO + * + * @param req + * @return + */ + AiChatModelDO convertAiChatModalDO(AiChatModelUpdateReqVO req); /** * 转换 - AiChatModalRes diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java index 420de6fe13..8c86127c34 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java @@ -75,6 +75,6 @@ public class AiChatModelDO extends BaseDO { /** * 上下文的最大 Message 数量 */ - private Integer i; + private Integer maxContexts; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java index b685d26943..07a902dd8d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java @@ -1,10 +1,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; /** @@ -34,10 +31,9 @@ public interface AiChatModelService { /** * ai modal - 更新 * - * @param id * @param req */ - void update(Long id, AiChatModelAddReqVO req); + void update(AiChatModelUpdateReqVO req); /** * ai modal - 删除 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 7a40846a4e..c831ab7231 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -8,10 +8,7 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; import cn.iocoder.yudao.module.ai.convert.AiChatModelConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; @@ -70,14 +67,14 @@ public class AiChatModalServiceImpl implements AiChatModelService { } @Override - public void update(Long id, AiChatModelAddReqVO req) { + public void update(AiChatModelUpdateReqVO req) { // 校验 platform validatePlatform(req.getPlatform()); // 校验模型是否存在 - validateExists(id); + validateExists(req.getId()); // 转换 updateChatModalDO AiChatModelDO updateChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); - updateChatModalDO.setId(id); + updateChatModalDO.setId(req.getId()); // 更新数据库 aiChatModelMapper.updateById(updateChatModalDO); } -- Gitee From 3e91032eaffac2d708ac6ec3458bdfee63a038c4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 15:25:34 +0800 Subject: [PATCH 0488/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91A?= =?UTF-8?q?I=20=E5=AF=B9=E8=AF=9D=E5=BC=95=E5=85=A5=E7=9A=84=20modal=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/dataobject/chat/AiChatConversationDO.java | 4 ++-- .../service/impl/AiChatConversationServiceImpl.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index 21bc0c0bf2..a4651323c7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; @@ -60,7 +60,7 @@ public class AiChatConversationDO extends BaseDO { /** * 模型编号 * - * 关联 {@link AiChatModalDO#getId()} 字段 + * 关联 {@link AiChatModelDO#getId()} 字段 */ private Long modelId; /** diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 228ab75e16..dc5205011d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -11,11 +11,11 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRes import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModalMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -35,8 +35,8 @@ import java.util.List; @AllArgsConstructor public class AiChatConversationServiceImpl implements AiChatConversationService { - private final AiChatModalMapper aiChatModalMapper; - private final AiChatModalService aiChatModalService; + private final AiChatModelMapper aiChatModalMapper; + private final AiChatModelService aiChatModalService; private final AiChatRoleService aiChatRoleService; private final AiChatConversationMapper aiChatConversationMapper; @@ -45,7 +45,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 获取用户id Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 默认使用 sort 排序第一个模型 - AiChatModalDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); + AiChatModelDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); // 查询角色 AiChatRoleRespVO chatRoleRes = null; if (req.getRoleId() != null) { -- Gitee From b091498040b989ebc5a2afb72539ee47d2430220 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 15:38:01 +0800 Subject: [PATCH 0489/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96AI=20=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF=20=E5=92=8C=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=A8=A1=E5=9E=8Bid=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/vo/role/AiChatRoleAddReqVO.java | 2 +- .../model/vo/role/AiChatRoleListRespVO.java | 41 +++++++++++++------ .../ai/dal/dataobject/model/AiChatRoleDO.java | 13 ++---- .../service/impl/AiChatRoleServiceImpl.java | 4 +- 4 files changed, 34 insertions(+), 26 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java index f03137df85..f069caf972 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java @@ -42,7 +42,7 @@ public class AiChatRoleAddReqVO { private Long modelId; @NotNull - @Schema(description = "开启状态 open、close") + @Schema(description = "开启状态 0、open 1、close") private Boolean publicStatus; @NotNull diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java index f66d5a6ea5..3eee736bed 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java @@ -14,24 +14,39 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiChatRoleListRespVO { - @Schema(description = "id") + @Schema(description = "编号", example = "1") private Long id; - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "角色名字") + @Schema(description = "角色名称", example = "小红书写作") private String name; - @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String introduce; + @Schema(description = "角色头像", example = "http://...") + private String avatar; + + @Schema(description = "角色分类", example = "writing") + private String category; + + @Schema(description = "角色描述", example = "角色描述") + private String description; + + @Schema(description = "角色欢迎语", example = "欢迎...") + private String welcomeMessage; + + @Schema(description = "角色设定(消息)", example = "你是拥有丰富的小红书写作经验作者xxxx") + private String systemMessage; + + @Schema(description = "用户编号", example = "1") + private Long userId; + + @Schema(description = "模型编号", example = "1") + private Long modelId; - @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String classify; + @Schema(description = "是否公开 true - 公开;false - 私有", example = "true") + private Boolean publicStatus; - @Schema(description = "状态 open、close") - private String enable; + @Schema(description = "排序值 asc", example = "1") + private Integer sort; - @Schema(description = "角色的使用次数统计") - private Integer useCount; + @Schema(description = "状态 0、开启 1、关闭", example = "1") + private Integer status; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java index bb48f524d7..51cf67c867 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java @@ -1,16 +1,9 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.model; -import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.*; -import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler; import lombok.*; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.List; /** * AI 聊天角色 DO @@ -67,12 +60,12 @@ public class AiChatRoleDO extends BaseDO { /** * 模型编号 * - * 关联 {@link AiChatModalDO#getId()} 字段 + * 关联 {@link AiChatModelDO#getId()} 字段 */ - private String modelId; + private Long modelId; /** - * 是否公开 + * 是否公开 true - 公开;false - 私有 * * true - 公开;false - 私有 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index 5264ea2a23..cc432fe418 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -12,7 +12,7 @@ import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.enums.AiChatRoleCategoryEnum; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -32,7 +32,7 @@ import java.util.List; public class AiChatRoleServiceImpl implements AiChatRoleService { private final AiChatRoleMapper aiChatRoleMapper; - private final AiChatModalService aiChatModalService; + private final AiChatModelService aiChatModalService; @Override public PageResult list(AiChatRoleListReqVO req) { -- Gitee From fd6ce5a627c885f3fd0be4f11db5840d34a24919 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 15:38:47 +0800 Subject: [PATCH 0490/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9http=20=E8=AF=B7=E6=B1=82=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=92=8C=E8=AF=B7=E6=B1=82=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/http/chat-modal.http | 33 +++++--------- .../src/main/resources/http/chat-role.http | 44 +++++++++++-------- 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http index ab8aa85c69..8a58fa990e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-modal.http @@ -1,43 +1,32 @@ ### chat call -GET {{baseUrl}}/ai/chat/modal/list +GET {{baseUrl}}/admin-api/ai/chat/model/list Authorization: {{token}} ### chat call -PUT {{baseUrl}}/ai/chat/modal +PUT {{baseUrl}}/admin-api/ai/chat/model/add Content-Type: application/json Authorization: {{token}} { + "keyId": "1", "name": "小红书Ai写作大模型4.0", - "modal": "ERNIE 4.0", + "model": "ERNIE 4.0", "platform": "yiyan", - "imageUrl": "", - "sort": 100, - "config": { - "topK": 0.6, - "topP": 0.6, - "temperature": 0.86, - "maxTokens": 2048 - } + "sort": 100 } ### chat call -POST {{baseUrl}}/ai/chat/modal/7 +POST {{baseUrl}}/admin-api/ai/chat/model/update Content-Type: application/json Authorization: {{token}} { - "name": "小红书Ai写作大模型-plus", - "modal": "ERNIE-3.5-8K", + "id": 9, + "keyId": "1", + "name": "小红书Ai写作大模型3.5 8k", + "model": "ERNIE-3.5-8K", "platform": "yiyan", - "imageUrl": "", - "sort": 1, - "config": { - "topK": 0.6, - "topP": 0.6, - "temperature": 0.86, - "maxTokens": 2048 - } + "sort": 100 } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http index b459a5a952..87502e3135 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http @@ -1,50 +1,58 @@ ### chat角色 - list -GET {{baseUrl}}/ai/chat/role/list?pageNo=1&pageSize=20&search= +GET {{baseUrl}}/admin-api/ai/chat/role/list?pageNo=1&pageSize=20&search= Authorization: {{token}} - ### chat add -PUT {{baseUrl}}/ai/chat/role +PUT {{baseUrl}}/admin-api/ai/chat/role/add Content-Type: application/json Authorization: {{token}} { - "modelId": 1, + "modelId": 9, "name": "小红书写作v1", - "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。", - "classify": "writing", - "enable": "open" + "avatar": "http://baidu.com", + "category": "writing", + "description": "采用gpt3.5模型,拥有小红书优质作者写作经验。", + "welcomeMessage": "欢迎使用小红书写作模型!", + "systemMessage": "你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。", + "publicStatus": 0, + "sort": 0 } ### chat update -POST {{baseUrl}}/ai/chat/role/7 +POST {{baseUrl}}/admin-api/ai/chat/role/update Content-Type: application/json Authorization: {{token}} { - "modelId": 1, - "name": "小红书写作v1---hh😄❀", - "introduce": "采用gpt3.5模型,拥有小红书优质作者写作经验。0----", - "classify": "writing", - "enable": "close" + "id": 8, + "modelId": 9, + "name": "小红书写作v2", + "avatar": "http://baidu.com", + "category": "writing", + "description": "采用gpt3.5模型,拥有小红书优质作者写作经验。", + "welcomeMessage": "欢迎使用小红书写作模型!", + "systemMessage": "你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。", + "publicStatus": 0, + "sort": 0, + "status": 0 } ### chat update -POST {{baseUrl}}/ai/chat/role/6/update-visibility +POST {{baseUrl}}/admin-api/ai/chat/role/update-public-status Content-Type: application/json Authorization: {{token}} { - "enable": "open" + "id": "8", + "publicStatus": true } - ### chat update -DELETE {{baseUrl}}/ai/chat/role/1 -Content-Type: application/json +DELETE {{baseUrl}}/admin-api/ai/chat/role/delete?id=8 Authorization: {{token}} -- Gitee From 9ad977bdb9c7b72250c4d47b100d60ef5afc9a9a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 15:39:13 +0800 Subject: [PATCH 0491/1557] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91m?= =?UTF-8?q?essage=20=E4=BF=AE=E6=94=B9=E5=BC=95=E5=85=A5=E7=9A=84modal?= =?UTF-8?q?=E6=94=B9=E4=B8=BAmodel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java | 4 ++-- .../yudao/module/ai/service/impl/AiChatServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 33489ae673..7e57f7ea08 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModalDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; @@ -70,7 +70,7 @@ public class AiChatMessageDO extends BaseDO { /** * 模型编号 * - * 关联 {@link AiChatModalDO#getId()} 字段 + * 关联 {@link AiChatModelDO#getId()} 字段 */ private Long modelId; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 7fc13cac6a..3241a144db 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -21,7 +21,7 @@ import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatModalService; +import cn.iocoder.yudao.module.ai.service.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; import lombok.AllArgsConstructor; @@ -52,7 +52,7 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationMapper aiChatConversationMapper; private final AiChatConversationService chatConversationService; - private final AiChatModalService aiChatModalService; + private final AiChatModelService aiChatModalService; private final AiChatRoleService aiChatRoleService; @Transactional(rollbackFor = Exception.class) -- Gitee From bd3e65898befa518d825c5d74757e90a457425a1 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 16:22:58 +0800 Subject: [PATCH 0492/1557] =?UTF-8?q?=E3=80=90=E6=B5=8B=E8=AF=95=E3=80=91A?= =?UTF-8?q?I=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/http/chat-conversation.http | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http index 15c441f34c..275ed56c3c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-conversation.http @@ -1,39 +1,27 @@ ### 登录 详细使用 https://www.jetbrains.com/help/idea/testing-restful-web-services.html、https://www.cnblogs.com/crazymakercircle/p/14317222.html -### 对话 - 创建对话 -PUT {{baseUrl}}/ai/chat/conversation/createConversation -Content-Type: application/json -Authorization: {{token}} -{ - "title": "新增对话" -} +### 对话 - list +GET {{baseUrl}}/admin-api/ai/chat/conversation/list +Authorization: {{token}} ### 对话 - 创建对话 -PUT {{baseUrl}}/ai/chat/conversation/createRoleConversation +POST {{baseUrl}}/admin-api/ai/chat/conversation/create Content-Type: application/json Authorization: {{token}} { - "roleId": 7, - "title": "新增对话" + "roleId": "9" } - - ### 对话 - id获取 -GET {{baseUrl}}/ai/chat/conversation/1781604279872581644 -Authorization: {{token}} - - -### 对话 - list -GET {{baseUrl}}/ai/chat/conversation/list +GET {{baseUrl}}/admin-api/ai/chat/conversation/get?id=1781604279872581647 Authorization: {{token}} ### 对话 - 删除 -DELETE {{baseUrl}}/ai/chat/conversation/1781604279872581644 +DELETE {{baseUrl}}/admin-api/ai/chat/conversation/delete?id=1781604279872581647 Authorization: {{token}} -- Gitee From 708d66e8cf0647cb4c7afa2743794a478c8b9bce Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 16:47:25 +0800 Subject: [PATCH 0493/1557] =?UTF-8?q?=E3=80=90=E6=B5=8B=E8=AF=95=E3=80=91c?= =?UTF-8?q?hat=20=E8=81=8A=E5=A4=A9(send=E3=80=81send-stream)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.java | 4 +-- .../service/impl/AiChatModalServiceImpl.java | 2 +- .../ai/service/impl/AiChatServiceImpl.java | 13 ++++---- .../src/main/resources/http/chat-message.http | 25 ++++++++++++++-- .../src/main/resources/http/chat.http | 30 ------------------- 5 files changed, 31 insertions(+), 43 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 285611cbed..a36f871a6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -30,7 +30,7 @@ public class AiChatMessageController { @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") @PostMapping("/send") - public CommonResult sendMessage(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { + public CommonResult sendMessage(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { // TODO done @fan:使用 static import;这样就 success 就行了; return success(chatService.chat(sendReqVO)); } @@ -39,7 +39,7 @@ public class AiChatMessageController { // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) - public SseEmitter sendMessageStream(@Validated @ModelAttribute AiChatMessageSendReqVO sendReqVO) { + public SseEmitter sendMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); chatService.chatStream(sendReqVO, sseEmitter); return sseEmitter; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index c831ab7231..0aec7a94c8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -97,7 +97,7 @@ public class AiChatModalServiceImpl implements AiChatModelService { @Override public void validateAvailable(AiChatModalRespVO chatModal) { // 对话模型是否可用 - if (CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { + if (!CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 3241a144db..ba1b4b6797 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -19,7 +19,6 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; @@ -48,7 +47,6 @@ import java.util.function.Consumer; public class AiChatServiceImpl implements AiChatService { private final AiChatClientFactory aiChatClientFactory; - private final AiChatRoleMapper aiChatRoleMapper; private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationMapper aiChatConversationMapper; private final AiChatConversationService chatConversationService; @@ -72,7 +70,7 @@ public class AiChatServiceImpl implements AiChatService { // 校验角色是否公开 aiChatRoleService.validateIsPublic(aiChatRoleDO); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModel()); + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getPlatform()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), chatModal.getModel(), chatModal.getId(), req.getContent(), @@ -90,13 +88,12 @@ public class AiChatServiceImpl implements AiChatService { ChatResponse call = chatClient.call(prompt); content = call.getResult().getOutput().getContent(); // 更新 conversation - } catch (Exception e) { content = ExceptionUtil.getMessage(e); } finally { // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), content, null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } return new AiChatMessageRespVO().setContent(content); @@ -154,7 +151,7 @@ public class AiChatServiceImpl implements AiChatService { null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getModel()); + AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getPlatform()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); Flux streamResponse = streamingChatClient.stream(prompt); @@ -166,7 +163,7 @@ public class AiChatServiceImpl implements AiChatService { String content = chatResponse.getResults().get(0).getOutput().getContent(); try { contentBuffer.append(content); - sseEmitter.send(content, MediaType.APPLICATION_JSON); + sseEmitter.send(new AiChatMessageRespVO().setContent(content), MediaType.APPLICATION_JSON); } catch (IOException e) { log.error("发送异常{}", ExceptionUtil.getMessage(e)); // 如果不是因为关闭而抛出异常,则重新连接 @@ -183,7 +180,7 @@ public class AiChatServiceImpl implements AiChatService { sseEmitter.complete(); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), req.getContent(), + chatModal.getModel(), chatModal.getId(), contentBuffer.toString(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http index b39eda5ffc..b357ab66eb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http @@ -1,10 +1,31 @@ +### chat call +POST {{baseUrl}}/admin-api/ai/chat/message/send +Content-Type: application/json +Authorization: {{token}} + +{ + "conversationId": "1781604279872581649", + "content": "中国好看吗?" +} + + +### chat call +POST {{baseUrl}}/admin-api/ai/chat/message/send-stream +Content-Type: application/json +Authorization: {{token}} + +{ + "conversationId": "1781604279872581649", + "content": "苹果是什么颜色?" +} + ### message list -GET {{baseUrl}}/ai/chat/message/list?chatConversationId=1781604279872581644 +GET {{baseUrl}}/admin-api/ai/chat/message/list-by-conversation-id?conversationId=1781604279872581649 Authorization: {{token}} ### message delete -DELETE {{baseUrl}}/ai/chat/message/1781604279872581644/8 +DELETE {{baseUrl}}/admin-api/ai/chat/message/delete?id=50 Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http deleted file mode 100644 index 829b74f454..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat.http +++ /dev/null @@ -1,30 +0,0 @@ - - -### 登录 - -POST {{baseUrl}}/admin-api/system/auth/login -Content-Type: application/json -tenant-id: 1 - -{ - "username": "admin", - "password": "123456", - "captchaVerification": "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", - "socialCode": "1024", - "socialState": "9b2ffbc1-7425-4155-9894-9d5c08541d62", - "socialCodeValid": true -} - -### chat call -GET {{baseUrl}}/ai/chat?modal=qianwen&conversationId=1781604279872581644&prompt=中国好看吗? -Authorization: {{token}} - - - -### chat call -GET {{baseUrl}}/ai/chatStream?conversationId=1781604279872581644&prompt=苹果是什么颜色?&modal=yiYan3_5_8k -Authorization: {{token}} - - - - -- Gitee From 5579620140c7036c35bf270b2ca40ba98a7de7b7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 17:22:23 +0800 Subject: [PATCH 0494/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=20event=20stream=20=E6=94=B9=E4=B8=BA=20flex?= =?UTF-8?q?=20=E8=BF=94=E5=9B=9E=E6=9B=B4=E5=8A=A0=E7=9A=84=E4=BC=98?= =?UTF-8?q?=E9=9B=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/Utf8SseEmitter.java | 26 ------- .../admin/chat/AiChatMessageController.java | 11 ++- .../admin/image/AiImageController.java | 13 ++-- .../module/ai/service/AiChatService.java | 7 +- .../module/ai/service/AiImageService.java | 4 +- .../ai/service/impl/AiChatServiceImpl.java | 71 +++++++++---------- .../ai/service/impl/AiImageServiceImpl.java | 38 +++++----- .../src/main/resources/application-local.yaml | 8 ++- 8 files changed, 70 insertions(+), 108 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java deleted file mode 100644 index d23f4e9b15..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/Utf8SseEmitter.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller; - -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.server.ServerHttpResponse; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.nio.charset.StandardCharsets; - -/** - * 解决中文乱码 - * - * @author fansili - * @time 2024/4/14 15:13 - * @since 1.0 - */ -public class Utf8SseEmitter extends SseEmitter { - - @Override - protected void extendResponse(ServerHttpResponse outputMessage) { - super.extendResponse(outputMessage); - - HttpHeaders headers = outputMessage.getHeaders(); - headers.setContentType(new MediaType(MediaType.TEXT_EVENT_STREAM, StandardCharsets.UTF_8)); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index a36f871a6b..82392ed272 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; -import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.service.AiChatService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -13,7 +12,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; +import reactor.core.publisher.Flux; import java.util.List; @@ -39,10 +38,8 @@ public class AiChatMessageController { // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) - public SseEmitter sendMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { - Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - chatService.chatStream(sendReqVO, sseEmitter); - return sseEmitter; + public Flux sendMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { + return chatService.chatStream(sendReqVO); } @Operation(summary = "获得指定会话的消息列表") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 43e05dc836..2743917770 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; -import cn.iocoder.yudao.module.ai.service.AiImageService; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.service.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; @@ -14,7 +13,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; // TODO @芋艿:整理接口定义 /** @@ -35,10 +33,11 @@ public class AiImageController { @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dallDrawing") - public SseEmitter dallDrawing(@Validated @RequestBody AiImageDallDrawingReq req) { - Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); - aiImageService.dallDrawing(req, sseEmitter); - return sseEmitter; + public void dallDrawing(@Validated @RequestBody AiImageDallDrawingReq req) { +// Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); +// aiImageService.dallDrawing(req, sseEmitter); +// return sseEmitter; + } @Operation(summary = "midjourney", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index 27ece6b14a..a5e97ce5f1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import reactor.core.publisher.Flux; import java.util.List; @@ -26,11 +26,10 @@ public interface AiChatService { /** * chat stream * - * @param req - * @param sseEmitter + * @param sendReqVO * @return */ - void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter); + Flux chatStream(AiChatMessageSendReqVO sendReqVO); /** * 获取 - 获取对话 message list diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index 00b5ded444..cf95483d23 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; @@ -17,9 +16,8 @@ public interface AiImageService { * ai绘画 - dall2/dall3 绘画 * * @param req - * @param sseEmitter */ - void dallDrawing(AiImageDallDrawingReq req, Utf8SseEmitter sseEmitter); + void dallDrawing(AiImageDallDrawingReq req); /** * midjourney 图片生成 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index ba1b4b6797..90649f417d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -9,7 +9,6 @@ import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; @@ -25,13 +24,12 @@ import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; -import java.io.IOException; import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; /** @@ -76,6 +74,7 @@ public class AiChatServiceImpl implements AiChatService { chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); String content = null; + int tokens = 0; try { // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(req.getContent()); @@ -87,6 +86,7 @@ public class AiChatServiceImpl implements AiChatService { ChatClient chatClient = aiChatClientFactory.getChatClient(platformEnum); ChatResponse call = chatClient.call(prompt); content = call.getResult().getOutput().getContent(); + tokens = call.getResults().size(); // 更新 conversation } catch (Exception e) { content = ExceptionUtil.getMessage(e); @@ -94,7 +94,7 @@ public class AiChatServiceImpl implements AiChatService { // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), chatModal.getModel(), chatModal.getId(), content, - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + tokens, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } return new AiChatMessageRespVO().setContent(content); } @@ -123,8 +123,7 @@ public class AiChatServiceImpl implements AiChatService { return insertChatMessageDO; } - @Override - public void chatStream(AiChatMessageSendReqVO req, Utf8SseEmitter sseEmitter) { + public Flux chatStream(AiChatMessageSendReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询对话 AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); @@ -144,47 +143,43 @@ public class AiChatServiceImpl implements AiChatService { // req.setTopK(req.getTopK()); // req.setTopP(req.getTopP()); // req.setTemperature(req.getTemperature()); - // 保存 chat message // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), chatModal.getModel(), chatModal.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); - // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getPlatform()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); Flux streamResponse = streamingChatClient.stream(prompt); - + // 转换 flex AiChatMessageRespVO StringBuffer contentBuffer = new StringBuffer(); - streamResponse.subscribe( - new Consumer() { - @Override - public void accept(ChatResponse chatResponse) { - String content = chatResponse.getResults().get(0).getOutput().getContent(); - try { - contentBuffer.append(content); - sseEmitter.send(new AiChatMessageRespVO().setContent(content), MediaType.APPLICATION_JSON); - } catch (IOException e) { - log.error("发送异常{}", ExceptionUtil.getMessage(e)); - // 如果不是因为关闭而抛出异常,则重新连接 - sseEmitter.completeWithError(e); - } - } - }, - error -> { - // - log.error("subscribe错误 {}", ExceptionUtil.getMessage(error)); - }, - () -> { - log.info("发送完成!"); - sseEmitter.complete(); - // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), contentBuffer.toString(), - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); - + AtomicInteger tokens = new AtomicInteger(0); + return streamResponse.map(res -> { + AiChatMessageRespVO aiChatMessageRespVO = new AiChatMessageRespVO(); + aiChatMessageRespVO.setContent(res.getResult().getOutput().getContent()); + contentBuffer.append(res.getResult().getOutput().getContent()); + tokens.incrementAndGet(); + return aiChatMessageRespVO; } - ); + ).doOnComplete(new Runnable() { + @Override + public void run() { + log.info("发送完成!"); + // 保存 chat message + insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), + chatModal.getModel(), chatModal.getId(), contentBuffer.toString(), + tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + } + }).doOnError(new Consumer() { + @Override + public void accept(Throwable throwable) { + log.error("发送错误 {}!", throwable.getMessage()); + // 保存 chat message + insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), + chatModal.getModel(), chatModal.getId(), throwable.getMessage(), + tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + } + }); } @Override @@ -194,7 +189,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取对话所有 message List aiChatMessageDOList = aiChatMessageMapper.selectByConversationId(conversationId); // 转换 AiChatMessageRespVO - return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); + return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 16a4146811..5bacf9da5f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -5,8 +5,8 @@ import cn.iocoder.yudao.framework.ai.image.ImageGeneration; import cn.iocoder.yudao.framework.ai.image.ImagePrompt; import cn.iocoder.yudao.framework.ai.image.ImageResponse; import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; +import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; @@ -14,22 +14,18 @@ import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.Utf8SseEmitter; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; +import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; import cn.iocoder.yudao.module.ai.service.AiImageService; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.io.IOException; - /** * ai 作图 * @@ -64,7 +60,7 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public void dallDrawing(AiImageDallDrawingReq req, Utf8SseEmitter sseEmitter) { + public void dallDrawing(AiImageDallDrawingReq req) { // 获取 model OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModal()); OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); @@ -79,7 +75,7 @@ public class AiImageServiceImpl implements AiImageService { // 发送 ImageGeneration imageGeneration = imageResponse.getResult(); // 发送信息 - sendSseEmitter(sseEmitter, imageGeneration); +// sendSseEmitter(sseEmitter, imageGeneration); // 保存数据库 doSave(req.getPrompt(), req.getSize(), req.getModal(), imageGeneration.getOutput().getUrl(), AiChatDrawingStatusEnum.COMPLETE, null); @@ -88,7 +84,7 @@ public class AiImageServiceImpl implements AiImageService { doSave(req.getPrompt(), req.getSize(), req.getModal(), null, AiChatDrawingStatusEnum.FAIL, aiException.getMessage()); // 发送错误信息 - sendSseEmitter(sseEmitter, aiException.getMessage()); +// sendSseEmitter(sseEmitter, aiException.getMessage()); } } @@ -105,16 +101,16 @@ public class AiImageServiceImpl implements AiImageService { } } - private static void sendSseEmitter(Utf8SseEmitter sseEmitter, Object object) { - try { - sseEmitter.send(object, MediaType.APPLICATION_JSON); - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - // 发送 complete - sseEmitter.complete(); - } - } +// private static void sendSseEmitter(Utf8SseEmitter sseEmitter, Object object) { +// try { +// sseEmitter.send(object, MediaType.APPLICATION_JSON); +// } catch (IOException e) { +// throw new RuntimeException(e); +// } finally { +// // 发送 complete +// sseEmitter.complete(); +// } +// } private AiImageDO doSave(String prompt, String size, diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index dd191ce9a4..135b3df812 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -2,7 +2,6 @@ server: port: 48080 --- #################### 数据库相关配置 #################### - spring: # 数据源配置项 autoconfigure: @@ -79,7 +78,12 @@ spring: port: 6379 # 端口 database: 0 # 数据库索引 # password: dev # 密码,建议生产环境开启 - +server: + servlet: + encoding: + enabled: true + charset: UTF-8 + force: true --- #################### 定时任务相关配置 #################### # Quartz 配置项,对应 QuartzProperties 配置类 -- Gitee From 6e3f34b0dbfc57d448c535d05fb12857e94dcc74 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 18:00:30 +0800 Subject: [PATCH 0495/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E9=80=82=E9=85=8D=20dall2=E5=92=8Cdall3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 14 +++--- ...gReq.java => AiImageDallDrawingReqVO.java} | 4 +- .../image/vo/AiImageDallDrawingRespVO.java | 45 +++++++++++++++++++ .../module/ai/convert/AiImageConvert.java | 27 +++++++++++ .../module/ai/service/AiImageService.java | 5 ++- .../ai/service/impl/AiImageServiceImpl.java | 30 ++++++++----- .../src/main/resources/http/image.http | 2 +- 7 files changed, 104 insertions(+), 23 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageDallDrawingReq.java => AiImageDallDrawingReqVO.java} (88%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 2743917770..982d43080c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -1,7 +1,8 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; import cn.iocoder.yudao.module.ai.service.AiImageService; import io.swagger.v3.oas.annotations.Operation; @@ -14,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + // TODO @芋艿:整理接口定义 /** * ai作图 @@ -33,17 +36,14 @@ public class AiImageController { @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dallDrawing") - public void dallDrawing(@Validated @RequestBody AiImageDallDrawingReq req) { -// Utf8SseEmitter sseEmitter = new Utf8SseEmitter(); -// aiImageService.dallDrawing(req, sseEmitter); -// return sseEmitter; - + public AiImageDallDrawingRespVO dallDrawing(@Validated @RequestBody AiImageDallDrawingReqVO req) { + return aiImageService.dallDrawing(req); } @Operation(summary = "midjourney", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") @PostMapping("/midjourney") public CommonResult midjourney(@Validated @RequestBody AiImageMidjourneyReq req) { aiImageService.midjourney(req); - return CommonResult.success(null); + return success(null); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java index 42887b7d37..3973eb2e99 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Data; import lombok.experimental.Accessors; @@ -14,10 +15,11 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageDallDrawingReq { +public class AiImageDallDrawingReqVO { @Schema(description = "提示词") @NotNull(message = "提示词不能为空!") + @Size(max = 1200, message = "提示词最大1200") private String prompt; @Schema(description = "模型") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java new file mode 100644 index 0000000000..7e480a8f00 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * dall2/dall2 绘画 + * + * @author fansili + * @time 2024/4/25 16:24 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiImageDallDrawingRespVO { + + + @Schema(description = "提示词") + @NotNull(message = "提示词不能为空!") + @Size(max = 1200, message = "提示词最大1200") + private String prompt; + + @Schema(description = "模型") + @NotNull(message = "模型不能为空") + private String modal; + + @Schema(description = "风格") + private String style; + + @Schema(description = "图片size 1024x1024 ...") + private String size; + + @Schema(description = "可以访问图像的URL。") + private String url; + + @Schema(description = "图片base64。") + private String base64; + + @Schema(description = "错误信息。") + private String errorMessage; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java new file mode 100644 index 0000000000..5f2d18564a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.ai.convert; + +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +/** + * ai image convert + * + * @author fansili + * @time 2024/4/18 16:39 + * @since 1.0 + */ +@Mapper +public interface AiImageConvert { + + AiImageConvert INSTANCE = Mappers.getMapper(AiImageConvert.class); + + /** + * 转换 - AiImageDallDrawingRespVO + * + * @param req + * @return + */ + AiImageDallDrawingRespVO convertAiImageDallDrawingRespVO(AiImageDallDrawingReqVO req); +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index cf95483d23..04768757a3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; /** @@ -17,7 +18,7 @@ public interface AiImageService { * * @param req */ - void dallDrawing(AiImageDallDrawingReq req); + AiImageDallDrawingRespVO dallDrawing(AiImageDallDrawingReqVO req); /** * midjourney 图片生成 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 5bacf9da5f..90aaf0322d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -14,8 +14,10 @@ import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; @@ -60,31 +62,35 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public void dallDrawing(AiImageDallDrawingReq req) { + public AiImageDallDrawingRespVO dallDrawing(AiImageDallDrawingReqVO req) { // 获取 model OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModal()); OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); - // - OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageModelEnum); - openAiImageOptions.setStyle(openAiImageStyleEnum); - openAiImageOptions.setSize(req.getSize()); - ImageResponse imageResponse; + // 转换 AiImageDallDrawingRespVO + AiImageDallDrawingRespVO respVO = AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(req); try { - imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); + // 转换openai 参数 + OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); + openAiImageOptions.setModel(openAiImageModelEnum); + openAiImageOptions.setStyle(openAiImageStyleEnum); + openAiImageOptions.setSize(req.getSize()); + ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); // 发送 ImageGeneration imageGeneration = imageResponse.getResult(); - // 发送信息 -// sendSseEmitter(sseEmitter, imageGeneration); // 保存数据库 doSave(req.getPrompt(), req.getSize(), req.getModal(), imageGeneration.getOutput().getUrl(), AiChatDrawingStatusEnum.COMPLETE, null); + // 返回 flex + respVO.setUrl(imageGeneration.getOutput().getUrl()); + respVO.setBase64(imageGeneration.getOutput().getB64Json()); + return respVO; } catch (AiException aiException) { // 保存数据库 doSave(req.getPrompt(), req.getSize(), req.getModal(), null, AiChatDrawingStatusEnum.FAIL, aiException.getMessage()); // 发送错误信息 -// sendSseEmitter(sseEmitter, aiException.getMessage()); + respVO.setErrorMessage(aiException.getMessage()); + return respVO; } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http index a5282df16c..dda3f04f93 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http @@ -1,7 +1,7 @@ ### chat dallDrawing -POST {{baseUrl}}/ai/image/dallDrawing +POST {{baseUrl}}/admin-api/ai/image/dallDrawing Content-Type: application/json Authorization: {{token}} -- Gitee From 1a7446b914d6a32dfc241ba641732f35bbe06558 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 7 May 2024 18:17:17 +0800 Subject: [PATCH 0496/1557] =?UTF-8?q?=E3=80=90=E5=AE=9A=E4=B9=89=E3=80=91?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=20midjourney=20=E7=9B=B8=E5=85=B3=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=93=8D=E4=BD=9Capi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 35 +++++++++++++++---- ...q.java => AiImageMidjourneyListReqVO.java} | 6 ++-- .../image/vo/AiImageMidjourneyListRespVO.java | 18 ++++++++++ .../image/vo/AiImageMidjourneyReqVO.java | 29 +++++++++++++++ .../module/ai/service/AiImageService.java | 4 +-- .../ai/service/impl/AiImageServiceImpl.java | 4 +-- 6 files changed, 81 insertions(+), 15 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageMidjourneyReq.java => AiImageMidjourneyListReqVO.java} (71%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 982d43080c..c4d6aa8168 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -3,17 +3,14 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; import cn.iocoder.yudao.module.ai.service.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -40,10 +37,34 @@ public class AiImageController { return aiImageService.dallDrawing(req); } - @Operation(summary = "midjourney", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") + @Operation(summary = "midjourney绘画", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") @PostMapping("/midjourney") - public CommonResult midjourney(@Validated @RequestBody AiImageMidjourneyReq req) { + public CommonResult midjourney(@Validated @RequestBody AiImageMidjourneyReqVO req) { aiImageService.midjourney(req); return success(null); } + + @Operation(summary = "midjourney绘画操作", description = "一般有选择图片、放大、换一批...") + @PostMapping("/midjourney-operate") + public CommonResult midjourneyOperate(@Validated @RequestBody AiImageMidjourneyReqVO req) { + return success(null); + } + + @Operation(summary = "获取midjourney绘画列表", description = "获取 Midjourney 绘画列表") + @GetMapping("/get-midjourney-list") + public CommonResult getMidjourneyList(@Validated @RequestBody AiImageMidjourneyReqVO req) { + return success(null); + } + + @Operation(summary = "取消 midjourney 绘画", description = "取消 midjourney 绘画") + @PostMapping("/cancel-midjourney") + public CommonResult cancelMidjourney(@RequestParam("id") Long id) { + return success(null); + } + + @Operation(summary = "删除绘画记录", description = "") + @DeleteMapping("/delete") + public CommonResult delete(@RequestParam("id") Long id) { + return success(null); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java similarity index 71% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java index a4bb622ac4..6328c46fea 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReq.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -13,9 +14,6 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageMidjourneyReq { - - @Schema(description = "提示词") - private String prompt; +public class AiImageMidjourneyListReqVO extends PageParam { } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java new file mode 100644 index 0000000000..27269a2afb --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * midjourney req + * + * @author fansili + * @time 2024/4/28 17:42 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiImageMidjourneyListRespVO extends PageParam { + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java new file mode 100644 index 0000000000..e6cb0dcecf --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * midjourney req + * + * @author fansili + * @time 2024/4/28 17:42 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiImageMidjourneyReqVO { + + @Schema(description = "提示词") + private String prompt; + + @Schema(description = "绘画比例 1:1、3:4、4:3、9:16、16:9") + private String size; + + @Schema(description = "风格") + private String style; + + @Schema(description = "参考图") + private String referImage; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index 04768757a3..d9ef9758dd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.ai.service; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; /** * ai 作图 @@ -26,5 +26,5 @@ public interface AiImageService { * @param req * @return */ - void midjourney(AiImageMidjourneyReq req); + void midjourney(AiImageMidjourneyReqVO req); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 90aaf0322d..49a2570732 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -16,7 +16,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; @@ -96,7 +96,7 @@ public class AiImageServiceImpl implements AiImageService { @Override @Transactional(rollbackFor = Exception.class) - public void midjourney(AiImageMidjourneyReq req) { + public void midjourney(AiImageMidjourneyReqVO req) { // 保存数据库 AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", null, AiChatDrawingStatusEnum.SUBMIT, null); -- Gitee From 52c86cd290d22bea92dcddf9ea6569b5c6c9d056 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 7 May 2024 23:08:38 +0800 Subject: [PATCH 0497/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91C?= =?UTF-8?q?RM=EF=BC=9A=E5=91=98=E5=B7=A5=E4=B8=9A=E7=BB=A9=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- .../CrmStatisticsPerformanceServiceImpl.java | 91 ++++++------------- yudao-server/pom.xml | 20 ++-- 3 files changed, 38 insertions(+), 77 deletions(-) diff --git a/pom.xml b/pom.xml index e770c0359e..b1bc573e80 100644 --- a/pom.xml +++ b/pom.xml @@ -16,12 +16,12 @@ yudao-module-system yudao-module-infra - + yudao-module-bpm - + yudao-module-crm diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index 6679a45007..77b14a2687 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; -import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; @@ -11,16 +11,19 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; - import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.function.Function; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; /** * CRM 员工业绩分析 Service 实现类 @@ -56,9 +59,11 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform } /** - * 获得员工业绩数据,并通过如下方法拿到对应的lastYearCount,lastMonthCount - * 比如说,构造2024 年的CrmStatisticsPerformanceRespVO,获得 2023-01 到 2024-12的月统计数据即可 - * 可以数据 group by 年-月,2023-01 到 2024-12的,然后聚合出 CrmStatisticsPerformanceRespVO + * 获得员工业绩数据 + * + * 1. 获得今年 + 去年的数据 + * 2. 遍历今年的月份,逐个拼接去年的月份数据 + * * @param performanceReqVO 参数 * @param performanceFunction 员工业绩统计方法 * @return 员工业绩数据 @@ -67,7 +72,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform Function> performanceFunction) { // 1. 获得用户编号数组 - final List userIds = getUserIds(performanceReqVO); + List userIds = getUserIds(performanceReqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } @@ -75,66 +80,22 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform // 2. 获得业绩数据 List performanceList = performanceFunction.apply(performanceReqVO); + Map performanceMap = convertMap(performanceList, CrmStatisticsPerformanceRespVO::getTime, + CrmStatisticsPerformanceRespVO::getCurrentMonthCount); - // 获取查询的年份 - String currentYear = LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"); - Map currentYearMap = new TreeMap<>();//查询当年的map数据 - Map lastYearMap = new TreeMap<>();//前一年的map数据 - + // 3. 组装数据返回 + List result = new ArrayList<>(); + int year = DateUtil.thisYear(); for (int month = 1; month <= 12; month++) { - //根据数据库的月销售数据查询结果,构造查询当年的map数据 - String currentYearKey = String.format("%d%02d", Integer.parseInt(currentYear), month); - buildYearMapData(performanceList, currentYearMap, currentYearKey); - - //根据数据库的月销售数据查询结果,构造查询前一年的map数据 - String lastYearKey = String.format("%d%02d", Integer.parseInt(currentYear)-1, month); - buildYearMapData(performanceList, lastYearMap, lastYearKey); - } - //根据构造好的map数据,计算查询当年的环比和同比数据,并构造好返回的respVOList - List respVOList = new ArrayList<>(); - for (int key : currentYearMap.keySet()) { - BigDecimal lastYearCount = lastYearMap.get(key-100).getCurrentMonthCount(); - BigDecimal lastMonthCount; - if (key % 100 > 1) {//2-12月份的前一个月数据 - lastMonthCount = currentYearMap.get(key-1).getCurrentMonthCount(); - } else {//1月份的前一个月数据 - lastMonthCount = lastYearMap.get(key-89).getCurrentMonthCount(); - } - - currentYearMap.get(key).setLastYearCount(lastYearCount); - currentYearMap.get(key).setLastMonthCount(lastMonthCount); - - respVOList.add(currentYearMap.get(key)); - } - - return respVOList; - } - - /** - * 根据mapKey,添加当年和前一年的月销售记录到对应的map结构中 - * @param performanceList 数据库中查询到的月销售记录 - * @param YearDataMap 将查询到的月销售记录put到对应的map中,如果月销售记录为null,置为0 - * @param mapKey 对应的mapKey - */ - private void buildYearMapData(List performanceList, - Map YearDataMap, - String mapKey) - { - CrmStatisticsPerformanceRespVO currentYearData = performanceList.stream() - .filter(data -> data.getTime().equals(mapKey)) - .findFirst() - .orElse(null); - - if(currentYearData != null) { - YearDataMap.put(Integer.parseInt(mapKey), currentYearData); - } else { - CrmStatisticsPerformanceRespVO defaultVO = new CrmStatisticsPerformanceRespVO(); - defaultVO.setTime(mapKey); - defaultVO.setCurrentMonthCount(BigDecimal.ZERO); - defaultVO.setLastMonthCount(BigDecimal.ZERO); - defaultVO.setLastYearCount(BigDecimal.ZERO); - YearDataMap.put(Integer.parseInt(mapKey), defaultVO); + String currentMonth = String.format("%d%02d", year, month); + String lastMonth = month == 1 ? String.format("%d%02d", year - 1, 12) : String.format("%d%02d", year, month - 1); + String lastYear = String.format("%d%02d", year - 1, month); + result.add(new CrmStatisticsPerformanceRespVO().setTime(currentMonth) + .setCurrentMonthCount(performanceMap.getOrDefault(currentMonth, BigDecimal.ZERO)) + .setLastMonthCount(performanceMap.getOrDefault(lastMonth, BigDecimal.ZERO)) + .setLastYearCount(performanceMap.getOrDefault(lastYear, BigDecimal.ZERO))); } + return result; } /** diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index bc850b5902..ade54c0685 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -46,11 +46,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-bpm-biz + ${revision} + @@ -88,11 +88,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-crm-biz + ${revision} + -- Gitee From 7d9e6f2184ef0cd03c0a50e8fe69a731eaeaa759 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 8 May 2024 00:28:11 +0800 Subject: [PATCH 0498/1557] =?UTF-8?q?fix:=20pg,mssql=20dual=E8=A1=A8?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=B8=80=E6=9D=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 11 ++++++++++- sql/sqlserver/ruoyi-vue-pro.sql | 11 +++++++++-- sql/tools/convertor.py | 25 +++++++++++++++++++++---- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index 980cd790a9..526d5a40df 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -5,7 +5,7 @@ Target Server Type : PostgreSQL - Date: 2024-05-03 23:36:19 + Date: 2024-05-08 00:11:06 */ @@ -15,8 +15,17 @@ DROP TABLE IF EXISTS dual; CREATE TABLE dual ( + id int2 ); +COMMENT ON TABLE dual IS '数据库连接的表'; + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1); +-- @formatter:on -- ---------------------------- -- Table structure for infra_api_access_log diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index 26e674498d..86ff9a37e8 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -5,7 +5,7 @@ Target Server Type : Microsoft SQL Server - Date: 2024-05-03 23:36:38 + Date: 2024-05-08 00:22:09 */ @@ -17,7 +17,7 @@ GO CREATE TABLE dual ( - id int NULL + id int ) GO @@ -27,6 +27,13 @@ EXEC sp_addextendedproperty 'TABLE', N'dual' GO +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1) +GO +-- @formatter:on -- ---------------------------- -- Table structure for infra_api_access_log diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index fe12caed11..1ca5757699 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -207,7 +207,6 @@ class Convertor(ABC): -- Table structure for dual -- ---------------------------- {dual} - """ ) @@ -371,7 +370,17 @@ CREATE SEQUENCE {table_name}_seq return """DROP TABLE IF EXISTS dual; CREATE TABLE dual ( -);""" + id int2 +); + +COMMENT ON TABLE dual IS '数据库连接的表'; + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1); +-- @formatter:on""" class OracleConvertor(Convertor): @@ -636,7 +645,7 @@ GO CREATE TABLE dual ( - id int NULL + id int ) GO @@ -644,7 +653,15 @@ EXEC sp_addextendedproperty 'MS_Description', N'数据库连接的表', 'SCHEMA', N'dbo', 'TABLE', N'dual' -GO""" +GO + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1) +GO +-- @formatter:on""" class DM8Convertor(Convertor): -- Gitee From e8cf40a82a0db2b136fd481971b719415442dfd3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 15:07:49 +0800 Subject: [PATCH 0499/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=911?= =?UTF-8?q?=E3=80=81mj=20components=20=E7=9B=B8=E5=85=B3=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8F=90=E4=BA=A4=202=E3=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0ai=20image=20=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 9 +- ...num.java => AiImageDrawingStatusEnum.java} | 6 +- .../admin/image/AiImageController.java | 20 +-- ...yListRespVO.java => AiImageListReqVO.java} | 2 +- ...yListReqVO.java => AiImageListRespVO.java} | 3 +- .../vo/AiImageMidjourneyOperateReqVO.java | 31 +++++ .../vo/AiImageMidjourneyOperationsVO.java | 30 ++++ .../module/ai/convert/AiImageConvert.java | 12 ++ .../ai/dal/dataobject/image/AiImageDO.java | 23 +++- .../module/ai/service/AiImageService.java | 23 +++- .../ai/service/impl/AiImageServiceImpl.java | 128 ++++++++++++++---- .../YuDaoMidjourneyMessageHandler.java | 10 +- 12 files changed, 240 insertions(+), 57 deletions(-) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{AiChatDrawingStatusEnum.java => AiImageDrawingStatusEnum.java} (76%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageMidjourneyListRespVO.java => AiImageListReqVO.java} (83%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageMidjourneyListReqVO.java => AiImageListRespVO.java} (72%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperationsVO.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index cf5d6e76e1..fde06746e6 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -14,29 +14,26 @@ public interface ErrorCodeConstants { // chat ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI 模型暂不支持!"); - ErrorCode AI_CHAT_ROLE_NOT_EXISTENT = new ErrorCode(1_022_000_001, "AI Role 不存在!");; // conversation ErrorCode AI_CONVERSATION_NOT_EXISTS = new ErrorCode(1_022_000_002, "AI 对话不存在!");; - ErrorCode AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL = new ErrorCode(1_022_000_002, "chat 继续对话,对话 id 不能为空!");; - ErrorCode AI_CHAT_CONTINUE_NOT_EXIST = new ErrorCode(1_022_000_020, "chat 对话不存在!"); - ErrorCode AI_CHAT_CONVERSATION_NOT_YOURS = new ErrorCode(1_022_000_021, "这条 chat 对话不是你的!"); // midjourney ErrorCode AI_MIDJOURNEY_IMAGINE_FAIL = new ErrorCode(1_022_000_040, "midjourney imagine 操作失败!"); + ErrorCode AI_MIDJOURNEY_OPERATION_NOT_EXISTS = new ErrorCode(1_022_000_040, "midjourney 操作不存在!"); + ErrorCode AI_MIDJOURNEY_MESSAGE_ID_INCORRECT = new ErrorCode(1_022_000_040, "midjourney message id 不正确!"); // role - ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "chatRole 不存在!"); + ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "AI 角色不存在!"); ErrorCode AI_CHAT_ROLE_NOT_PUBLIC = new ErrorCode(1_022_000_060, "AI 角色未公开!"); // modal ErrorCode AI_MODAL_NOT_EXIST = new ErrorCode(1_022_000_080, "AI 模型不存在!"); ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); - ErrorCode AI_MODAL_NOT_SUPPORTED_MODAL = new ErrorCode(1_022_000_082, "AI 模型不支持的 modal! {} "); ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); ErrorCode AI_MODAL_DISABLE_NOT_USED = new ErrorCode(1_022_000_084, "AI 模型禁用不能使用!"); diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatDrawingStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java similarity index 76% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatDrawingStatusEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java index 2fcd90ee46..c38b177565 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatDrawingStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java @@ -12,7 +12,7 @@ import lombok.Getter; */ @AllArgsConstructor @Getter -public enum AiChatDrawingStatusEnum { +public enum AiImageDrawingStatusEnum { SUBMIT("submit", "提交任务"), WAITING("waiting", "等待"), @@ -27,8 +27,8 @@ public enum AiChatDrawingStatusEnum { private String name; - public static AiChatDrawingStatusEnum valueOfStatus(String status) { - for (AiChatDrawingStatusEnum itemEnum : AiChatDrawingStatusEnum.values()) { + public static AiImageDrawingStatusEnum valueOfStatus(String status) { + for (AiImageDrawingStatusEnum itemEnum : AiImageDrawingStatusEnum.values()) { if (itemEnum.getStatus().equals(status)) { return itemEnum; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index c4d6aa8168..7f0620ab2e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.service.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -31,6 +30,12 @@ public class AiImageController { private final AiImageService aiImageService; + @Operation(summary = "获取image列表", description = "dall3、midjourney") + @GetMapping("/list") + public PageResult list(@Validated @RequestBody AiImageListReqVO req) { + return aiImageService.list(req); + } + @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dallDrawing") public AiImageDallDrawingRespVO dallDrawing(@Validated @RequestBody AiImageDallDrawingReqVO req) { @@ -46,13 +51,8 @@ public class AiImageController { @Operation(summary = "midjourney绘画操作", description = "一般有选择图片、放大、换一批...") @PostMapping("/midjourney-operate") - public CommonResult midjourneyOperate(@Validated @RequestBody AiImageMidjourneyReqVO req) { - return success(null); - } - - @Operation(summary = "获取midjourney绘画列表", description = "获取 Midjourney 绘画列表") - @GetMapping("/get-midjourney-list") - public CommonResult getMidjourneyList(@Validated @RequestBody AiImageMidjourneyReqVO req) { + public CommonResult midjourneyOperate(@Validated @RequestBody AiImageMidjourneyOperateReqVO req) { + aiImageService.midjourneyOperate(req); return success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java similarity index 83% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java index 27269a2afb..e75ebb4b3b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java @@ -13,6 +13,6 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageMidjourneyListRespVO extends PageParam { +public class AiImageListReqVO extends PageParam { } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java similarity index 72% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java index 6328c46fea..9222a4ec4d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyListReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -14,6 +13,6 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageMidjourneyListReqVO extends PageParam { +public class AiImageListRespVO extends PageParam { } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java new file mode 100644 index 0000000000..b495304250 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * midjourney req + * + * @author fansili + * @time 2024/4/28 17:42 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiImageMidjourneyOperateReqVO { + + + @NotNull(message = "图片编号不能为空") + @Schema(description = "编号") + private String id; + + @NotNull(message = "消息编号不能为空") + @Schema(description = "消息编号") + private String messageId; + + @NotNull(message = "操作编号不能为空") + @Schema(description = "操作编号") + private String operateId; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperationsVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperationsVO.java new file mode 100644 index 0000000000..fe202d83d4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperationsVO.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * mj 保存 components 记录 + * + * "components": [ + * { + * "custom_id": "MJ::JOB::upsample::1::5d32f4e8-8d2f-4bef-82d8-bf517e3c3660", + * "style": 2, + * "label": "U1", + * "type": 2 + * }, + * ] + * + * @author fansili + * @time 2024/5/8 14:44 + * @since 1.0 + */ +@Data +@Accessors(chain = true) +public class AiImageMidjourneyOperationsVO { + + private String custom_id; + private String style; + private String label; + private String type; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index 5f2d18564a..089af76b51 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -2,9 +2,13 @@ package cn.iocoder.yudao.module.ai.convert; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListRespVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; +import java.util.List; + /** * ai image convert * @@ -24,4 +28,12 @@ public interface AiImageConvert { * @return */ AiImageDallDrawingRespVO convertAiImageDallDrawingRespVO(AiImageDallDrawingReqVO req); + + /** + * 转换 - AiImageListRespVO + * + * @param list + * @return + */ + List convertAiImageListRespVO(List list); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 1908100955..ea83d21814 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -29,20 +29,37 @@ public class AiImageDO extends BaseDO { @Schema(description = "提示词") private String prompt; - @Schema(description = "模型") + @Schema(description = "模型 dall2/dall3、MJ、NIJI") private String modal; @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") private String size; + @Schema(description = "图片地址(自己服务器)") + private String imageUrl; + @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") private String drawingStatus; - @Schema(description = "绘画图片地址") + @Schema(description = "绘画图片地址(绘画好的服务器)") private String drawingImageUrl; @Schema(description = "绘画错误信息") - private String drawingError; + private String drawingErrorMessage; + + // ============ mj 需要字段 + + @Schema(description = "用户操作的消息编号(MJ返回)") + private String mjMessageId; + + @Schema(description = "用户操作的操作编号(MJ返回)") + private String mjOperationId; + + @Schema(description = "用户操作的操作名字(MJ返回)") + private String mjOperationName; + + @Schema(description = "mj图片生产成功保存的 components json 数组") + private String mjOperations; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index d9ef9758dd..33c4bf449d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -1,8 +1,9 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; + +import java.util.List; /** * ai 作图 @@ -13,6 +14,14 @@ import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReq */ public interface AiImageService { + /** + * ai绘画 - 列表 + * + * @param req + * @return + */ + PageResult list(AiImageListReqVO req); + /** * ai绘画 - dall2/dall3 绘画 * @@ -27,4 +36,12 @@ public interface AiImageService { * @return */ void midjourney(AiImageMidjourneyReqVO req); + + /** + * midjourney 操作(u1、u2、放大、换一批...) + * + * @param req + */ + void midjourneyOperate(AiImageMidjourneyOperateReqVO req); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 49a2570732..c3fb4454d5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.service.impl; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.exception.AiException; import cn.iocoder.yudao.framework.ai.image.ImageGeneration; import cn.iocoder.yudao.framework.ai.image.ImagePrompt; @@ -9,18 +10,20 @@ import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; +import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; -import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; +import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; import cn.iocoder.yudao.module.ai.service.AiImageService; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; @@ -28,6 +31,9 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Collections; +import java.util.List; + /** * ai 作图 * @@ -61,6 +67,23 @@ public class AiImageServiceImpl implements AiImageService { }); } + @Override + public PageResult list(AiImageListReqVO req) { + // 获取登录用户 + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询当前用户下所有的绘画记录 + PageResult pageResult = aiImageMapper.selectPage(req, + new LambdaQueryWrapperX() + .eq(AiImageDO::getUserId, loginUserId) + .orderByDesc(AiImageDO::getId) + ); + // 转换 PageResult 返回 + PageResult result = new PageResult<>(); + result.setTotal(pageResult.getTotal()); + result.setList(AiImageConvert.INSTANCE.convertAiImageListRespVO(pageResult.getList())); + return result; + } + @Override public AiImageDallDrawingRespVO dallDrawing(AiImageDallDrawingReqVO req) { // 获取 model @@ -79,7 +102,8 @@ public class AiImageServiceImpl implements AiImageService { ImageGeneration imageGeneration = imageResponse.getResult(); // 保存数据库 doSave(req.getPrompt(), req.getSize(), req.getModal(), - imageGeneration.getOutput().getUrl(), AiChatDrawingStatusEnum.COMPLETE, null); + imageGeneration.getOutput().getUrl(), AiImageDrawingStatusEnum.COMPLETE, null, + null, null, null); // 返回 flex respVO.setUrl(imageGeneration.getOutput().getUrl()); respVO.setBase64(imageGeneration.getOutput().getB64Json()); @@ -87,7 +111,8 @@ public class AiImageServiceImpl implements AiImageService { } catch (AiException aiException) { // 保存数据库 doSave(req.getPrompt(), req.getSize(), req.getModal(), - null, AiChatDrawingStatusEnum.FAIL, aiException.getMessage()); + null, AiImageDrawingStatusEnum.FAIL, aiException.getMessage(), + null, null, null); // 发送错误信息 respVO.setErrorMessage(aiException.getMessage()); return respVO; @@ -99,7 +124,8 @@ public class AiImageServiceImpl implements AiImageService { public void midjourney(AiImageMidjourneyReqVO req) { // 保存数据库 AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", - null, AiChatDrawingStatusEnum.SUBMIT, null); + null, AiImageDrawingStatusEnum.SUBMIT, null, + null, null, null); // 提交 midjourney 任务 Boolean imagine = midjourneyInteractionsApi.imagine(aiImageDO.getId(), req.getPrompt()); if (!imagine) { @@ -107,23 +133,71 @@ public class AiImageServiceImpl implements AiImageService { } } -// private static void sendSseEmitter(Utf8SseEmitter sseEmitter, Object object) { -// try { -// sseEmitter.send(object, MediaType.APPLICATION_JSON); -// } catch (IOException e) { -// throw new RuntimeException(e); -// } finally { -// // 发送 complete -// sseEmitter.complete(); -// } -// } + @Transactional(rollbackFor = Exception.class) + @Override + public void midjourneyOperate(AiImageMidjourneyOperateReqVO req) { + // 校验是否存在 + AiImageDO aiImageDO = validateExists(req); + // 获取 midjourneyOperations + List midjourneyOperations = getMidjourneyOperations(aiImageDO); + // 校验 OperateId 是否存在 + AiImageMidjourneyOperationsVO midjourneyOperationsVO = validateMidjourneyOperationsExists(midjourneyOperations, req.getOperateId()); + // 校验 messageId + validateMessageId(aiImageDO.getMjMessageId(), req.getMessageId()); + // 获取 mjOperationName + String mjOperationName = midjourneyOperationsVO.getLabel(); + // 保存一个 image 任务记录 + doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModal(), + null, AiImageDrawingStatusEnum.SUBMIT, null, + req.getMessageId(), req.getOperateId(), mjOperationName); + // 提交操作 + midjourneyInteractionsApi.reRoll( + new ReRollReq() + .setCustomId(req.getOperateId()) + .setMessageId(req.getMessageId()) + ); + } + + private void validateMessageId(String mjMessageId, String messageId) { + if (!mjMessageId.equals(messageId)) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_MESSAGE_ID_INCORRECT); + } + } + + private AiImageMidjourneyOperationsVO validateMidjourneyOperationsExists(List midjourneyOperations, String operateId) { + for (AiImageMidjourneyOperationsVO midjourneyOperation : midjourneyOperations) { + if (midjourneyOperation.getCustom_id().equals(operateId)) { + return midjourneyOperation; + } + } + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_OPERATION_NOT_EXISTS); + } + + + private List getMidjourneyOperations(AiImageDO aiImageDO) { + if (StrUtil.isBlank(aiImageDO.getMjOperations())) { + return Collections.emptyList(); + } + return JsonUtils.parseArray(aiImageDO.getMjOperations(), AiImageMidjourneyOperationsVO.class); + } + + private AiImageDO validateExists(AiImageMidjourneyOperateReqVO req) { + AiImageDO aiImageDO = aiImageMapper.selectById(req.getId()); + if (aiImageDO == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); + } + return aiImageDO; + } private AiImageDO doSave(String prompt, - String size, - String model, - String imageUrl, - AiChatDrawingStatusEnum drawingStatusEnum, - String drawingError) { + String size, + String model, + String drawingImageUrl, + AiImageDrawingStatusEnum drawingStatusEnum, + String drawingErrorMessage, + String mjMessageId, + String mjOperationId, + String mjOperationName) { // 保存数据库 Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); AiImageDO aiImageDO = new AiImageDO(); @@ -132,9 +206,15 @@ public class AiImageServiceImpl implements AiImageService { aiImageDO.setSize(size); aiImageDO.setModal(model); aiImageDO.setUserId(loginUserId); - aiImageDO.setDrawingImageUrl(imageUrl); + // TODO @芋艿 如何上传到自己服务器 + aiImageDO.setImageUrl(null); aiImageDO.setDrawingStatus(drawingStatusEnum.getStatus()); - aiImageDO.setDrawingError(drawingError); + aiImageDO.setDrawingImageUrl(drawingImageUrl); + aiImageDO.setDrawingErrorMessage(drawingErrorMessage); + // + aiImageDO.setMjMessageId(mjMessageId); + aiImageDO.setMjOperationId(mjOperationId); + aiImageDO.setMjOperationName(mjOperationName); aiImageMapper.insert(aiImageDO); return aiImageDO; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 0910b29461..3870ba0dce 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -6,7 +6,7 @@ import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import cn.iocoder.yudao.module.ai.enums.AiChatDrawingStatusEnum; +import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; import com.alibaba.fastjson2.JSON; import lombok.AllArgsConstructor; @@ -53,14 +53,14 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { imageUrl = midjourneyMessage.getAttachments().get(0).getUrl(); } // 转换状态 - AiChatDrawingStatusEnum drawingStatusEnum = null; + AiImageDrawingStatusEnum drawingStatusEnum = null; String generateStatus = midjourneyMessage.getGenerateStatus(); if (MidjourneyGennerateStatusEnum.COMPLETED.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiChatDrawingStatusEnum.COMPLETE; + drawingStatusEnum = AiImageDrawingStatusEnum.COMPLETE; } else if (MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiChatDrawingStatusEnum.IN_PROGRESS; + drawingStatusEnum = AiImageDrawingStatusEnum.IN_PROGRESS; } else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiChatDrawingStatusEnum.WAITING; + drawingStatusEnum = AiImageDrawingStatusEnum.WAITING; } aiImageMapper.updateById( new AiImageDO() -- Gitee From b6096b76d28d2d47596194b85c39835a822e40af Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 15:10:57 +0800 Subject: [PATCH 0500/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91a?= =?UTF-8?q?i=20image=20=E7=94=9F=E6=88=90=E8=AE=B0=E5=BD=95=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/image/AiImageController.java | 2 ++ .../image/vo/AiImageMidjourneyOperateReqVO.java | 2 +- .../yudao/module/ai/service/AiImageService.java | 7 +++++++ .../module/ai/service/impl/AiImageServiceImpl.java | 14 +++++++++++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 7f0620ab2e..7df2592f90 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -59,12 +59,14 @@ public class AiImageController { @Operation(summary = "取消 midjourney 绘画", description = "取消 midjourney 绘画") @PostMapping("/cancel-midjourney") public CommonResult cancelMidjourney(@RequestParam("id") Long id) { + // @范 这里实现mj取消逻辑 return success(null); } @Operation(summary = "删除绘画记录", description = "") @DeleteMapping("/delete") public CommonResult delete(@RequestParam("id") Long id) { + aiImageService.delete(id); return success(null); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java index b495304250..994c1c5f0b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java @@ -19,7 +19,7 @@ public class AiImageMidjourneyOperateReqVO { @NotNull(message = "图片编号不能为空") @Schema(description = "编号") - private String id; + private Long id; @NotNull(message = "消息编号不能为空") @Schema(description = "消息编号") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java index 33c4bf449d..b582010560 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java @@ -44,4 +44,11 @@ public interface AiImageService { */ void midjourneyOperate(AiImageMidjourneyOperateReqVO req); + /** + * 删除 - image 记录 + * + * @param id + */ + void delete(Long id); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index c3fb4454d5..e0d797d180 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -137,7 +137,7 @@ public class AiImageServiceImpl implements AiImageService { @Override public void midjourneyOperate(AiImageMidjourneyOperateReqVO req) { // 校验是否存在 - AiImageDO aiImageDO = validateExists(req); + AiImageDO aiImageDO = validateExists(req.getId()); // 获取 midjourneyOperations List midjourneyOperations = getMidjourneyOperations(aiImageDO); // 校验 OperateId 是否存在 @@ -158,6 +158,14 @@ public class AiImageServiceImpl implements AiImageService { ); } + @Override + public void delete(Long id) { + // 校验记录是否存在 + AiImageDO aiImageDO = validateExists(id); + // 删除记录 + aiImageMapper.deleteById(id); + } + private void validateMessageId(String mjMessageId, String messageId) { if (!mjMessageId.equals(messageId)) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_MESSAGE_ID_INCORRECT); @@ -181,8 +189,8 @@ public class AiImageServiceImpl implements AiImageService { return JsonUtils.parseArray(aiImageDO.getMjOperations(), AiImageMidjourneyOperationsVO.class); } - private AiImageDO validateExists(AiImageMidjourneyOperateReqVO req) { - AiImageDO aiImageDO = aiImageMapper.selectById(req.getId()); + private AiImageDO validateExists(Long id) { + AiImageDO aiImageDO = aiImageMapper.selectById(id); if (aiImageDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); } -- Gitee From 38a9c1a7ee0ddd718b25751fd27b1219d4e6bfd5 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 15:58:03 +0800 Subject: [PATCH 0501/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91m?= =?UTF-8?q?j=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=EF=BC=8C=E5=A2=9E=E5=8A=A0component=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E5=A4=84=E7=90=86error=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/convert/AiImageConvert.java | 10 ++++ .../YuDaoMidjourneyMessageHandler.java | 59 ++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index 089af76b51..27bf11136b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -1,8 +1,10 @@ package cn.iocoder.yudao.module.ai.convert; +import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -36,4 +38,12 @@ public interface AiImageConvert { * @return */ List convertAiImageListRespVO(List list); + + /** + * 转换 - AiImageMidjourneyOperationsVO + * + * @param component + * @return + */ + AiImageMidjourneyOperationsVO convertAiImageMidjourneyOperationsVO(MidjourneyMessage.Component component); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 3870ba0dce..43ca13b6a3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -5,14 +5,21 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; +import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; +import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; import com.alibaba.fastjson2.JSON; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + /** * yudao message handler * @@ -45,6 +52,36 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { if (StrUtil.isBlank(midjourneyMessage.getNonce())) { return; } + // 根据 Embeds 来判断是否异常 + if (CollUtil.isEmpty(midjourneyMessage.getEmbeds())) { + successHandler(midjourneyMessage); + } else { + errorHandler(midjourneyMessage); + } + } + + private void errorHandler(MidjourneyMessage midjourneyMessage) { + // image 编号 + Long aiImageId = Long.valueOf(midjourneyMessage.getNonce()); + // 获取 error message + String errorMessage = getErrorMessage(midjourneyMessage); + aiImageMapper.updateById( + new AiImageDO() + .setId(aiImageId) + .setDrawingErrorMessage(errorMessage) + .setDrawingStatus(AiImageDrawingStatusEnum.FAIL.getStatus()) + ); + } + + private String getErrorMessage(MidjourneyMessage midjourneyMessage) { + StringBuilder errorMessage = new StringBuilder(); + for (MidjourneyMessage.Embed embed : midjourneyMessage.getEmbeds()) { + errorMessage.append(embed.getDescription()); + } + return errorMessage.toString(); + } + + private void successHandler(MidjourneyMessage midjourneyMessage) { // 获取id Long aiImageId = Long.valueOf(midjourneyMessage.getNonce()); // 获取生成 url @@ -59,14 +96,32 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { drawingStatusEnum = AiImageDrawingStatusEnum.COMPLETE; } else if (MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus().equals(generateStatus)) { drawingStatusEnum = AiImageDrawingStatusEnum.IN_PROGRESS; - } else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { + } else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { drawingStatusEnum = AiImageDrawingStatusEnum.WAITING; } + // 获取 midjourneyOperations + List midjourneyOperations = getMidjourneyOperationsList(midjourneyMessage); + // 更新数据库 aiImageMapper.updateById( new AiImageDO() .setId(aiImageId) .setDrawingImageUrl(imageUrl) .setDrawingStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) + .setMjMessageId(midjourneyMessage.getId()) + .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) ); } + + private List getMidjourneyOperationsList(MidjourneyMessage midjourneyMessage) { + // 为空直接返回 + if (CollUtil.isEmpty(midjourneyMessage.getComponents())) { + return Collections.emptyList(); + } + // 将 component 转成 AiImageMidjourneyOperationsVO + return midjourneyMessage.getComponents().stream() + .map(componentType -> componentType.getComponents().stream() + .map(AiImageConvert.INSTANCE::convertAiImageMidjourneyOperationsVO) + .collect(Collectors.toList())) + .toList().stream().flatMap(List::stream).toList(); + } } -- Gitee From b058090a77d16054a947c7ade975da9d6d9d7b3a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 18:11:18 +0800 Subject: [PATCH 0502/1557] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/chat.sql | 159 ++++++++++-------- 1 file changed, 90 insertions(+), 69 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql index 6fd87f4f4c..a845056d76 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql @@ -11,7 +11,7 @@ Target Server Version : 80034 (8.0.34) File Encoding : 65001 - Date: 28/04/2024 11:50:47 + Date: 08/05/2024 18:10:05 */ SET NAMES utf8mb4; @@ -24,24 +24,31 @@ DROP TABLE IF EXISTS `ai_chat_conversation`; CREATE TABLE `ai_chat_conversation` ( `id` bigint NOT NULL AUTO_INCREMENT, `user_id` bigint DEFAULT NULL COMMENT '用户id', - `chat_role_id` bigint DEFAULT NULL COMMENT '聊天角色', - `chat_role_name` varchar(128) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '聊天角色名称', + `role_id` bigint DEFAULT NULL COMMENT '聊天角色', `title` varchar(256) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '标题', `type` varchar(16) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '对话类型', `chat_count` int DEFAULT NULL COMMENT '聊天次数', + `model_id` bigint DEFAULT NULL COMMENT '模型id', + `model` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型', + `pinned` blob COMMENT '是否置顶', + `temperature` double DEFAULT NULL COMMENT '温度参数', + `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', + `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', `creator` bigint DEFAULT NULL COMMENT '创建用户', `updater` bigint DEFAULT NULL COMMENT '更新用户', `deleted` bit(1) DEFAULT b'0' COMMENT '删除', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1781604279872581645 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; +) ENGINE=InnoDB AUTO_INCREMENT=1781604279872581650 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; -- ---------------------------- -- Records of ai_chat_conversation -- ---------------------------- BEGIN; -INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `chat_role_id`, `chat_role_name`, `title`, `type`, `chat_count`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581644, 1, NULL, NULL, '中国好看吗?', 'userChat', 32, '2024-04-20 16:59:32', '2024-04-20 16:59:32', 1, 1, b'0'); +INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581647, 1, NULL, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:20:06', '2024-05-07 16:20:06', 1, 1, b'1'); +INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581648, 1, 9, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:20:35', '2024-05-07 16:20:35', 1, 1, b'0'); +INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581649, 1, NULL, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:22:37', '2024-05-07 16:22:37', 1, 1, b'0'); COMMIT; -- ---------------------------- @@ -50,83 +57,64 @@ COMMIT; DROP TABLE IF EXISTS `ai_chat_message`; CREATE TABLE `ai_chat_message` ( `id` bigint NOT NULL AUTO_INCREMENT, - `chat_conversation_id` bigint DEFAULT NULL COMMENT '对话id', + `conversation_id` bigint DEFAULT NULL COMMENT '对话id', `user_id` bigint DEFAULT NULL COMMENT '用户id', - `message` text COLLATE utf8mb4_0900_bin COMMENT '对话message', - `message_type` varchar(16) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '对话类型system、user、assistant\n', - `top_k` float DEFAULT NULL COMMENT '在生成消息时采用的Top-K采样大小', - `top_p` float DEFAULT NULL COMMENT 'Top-P核采样方法的概率阈值', - `temperature` float DEFAULT NULL COMMENT '用于调整生成回复的随机性和多样性程度', + `role_id` bigint DEFAULT NULL COMMENT '角色id', + `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '类型system、user、assistant\n', + `model` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型', + `model_id` bigint DEFAULT NULL COMMENT '模型id', + `content` varchar(2048) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '内容', + `tokens` int DEFAULT NULL COMMENT '消耗 Token 数量', + `temperature` double DEFAULT NULL COMMENT '用于调整生成回复的随机性和多样性程度', + `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', + `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', `creator` bigint DEFAULT NULL COMMENT '创建用户', `updater` bigint DEFAULT NULL COMMENT '更新用户', `deleted` bit(1) DEFAULT b'0' COMMENT '删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; +) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; -- ---------------------------- -- Records of ai_chat_message -- ---------------------------- BEGIN; -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-20 18:22:41', '2024-04-20 18:22:41', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (2, 1781604279872581644, 1, '作为一个AI助手,我没有个人感受和偏好。但是,中国是一个拥有丰富历史、文化和自然景观的国家,有许多令人惊叹的地方,如长城、故宫、西湖、张家界、九寨沟等著名景点,吸引了无数国内外游客的喜爱。每个人对于\"好看\"的定义可能不同,但中国无疑有着独特的魅力和多样性。', 'system', NULL, NULL, NULL, '2024-04-20 18:22:44', '2024-04-20 18:22:44', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (3, 1781604279872581644, 1, '苹果是什么颜色?', 'user', NULL, NULL, NULL, '2024-04-20 18:23:05', '2024-04-20 18:23:05', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (4, 1781604279872581644, 1, '苹果的颜色可以根据品种的不同而有所差异。常见的苹果颜色有红色、黄色和青绿色。除了这些基本颜色,苹果还可能呈现出淡红色、深红色等不同的红色调。\n\n这些颜色只是影响苹果的外观,对苹果的口感和营养价值没有影响。苹果口感酸甜,营养丰富,深受人们喜爱。', 'system', NULL, NULL, NULL, '2024-04-20 18:23:11', '2024-04-20 18:23:11', NULL, NULL, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (5, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-23 10:46:48', '2024-04-23 10:46:48', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (6, 1781604279872581644, 1, '作为一个AI助手,我没有个人感受和偏好。但是,中国是一个拥有丰富历史、文化和自然景观的国家,有许多令人惊叹的地方,如长城、故宫、西湖、张家界、九寨沟等著名景点,吸引了无数国内外游客的喜爱。每个人对于\"好看\"的定义可能不同,但中国无疑有着独特的魅力和多样性。', 'system', NULL, NULL, NULL, '2024-04-23 10:46:52', '2024-04-23 10:46:52', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (7, 1781604279872581644, 1, '苹果是什么颜色?', 'user', NULL, NULL, NULL, '2024-04-23 10:46:55', '2024-04-23 10:46:55', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (8, 1781604279872581644, 1, '苹果的颜色因品种和成熟度的不同而异。常见的苹果颜色有红色、黄色和青绿色。除此之外,还有一些苹果品种可能呈现出淡红色、深红色等不同的红色调,或者带有条纹或斑点。总的来说,苹果的颜色非常多样化,但最常见的是红色、黄色和青绿色。', 'system', NULL, NULL, NULL, '2024-04-23 10:47:03', '2024-04-23 10:47:03', NULL, NULL, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (9, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-23 13:49:16', '2024-04-23 13:49:16', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (10, 1781604279872581644, 1, '作为一个AI助手,我没有个人感受和偏好。但是,中国是一个拥有丰富历史、文化和自然景观的国家,有许多令人惊叹的地方,如长城、故宫、西湖、张家界、九寨沟等著名景点,吸引了无数国内外游客的喜爱。每个人对于\"好看\"的定义可能不同,但中国无疑有着独特的魅力和多样性。', 'system', NULL, NULL, NULL, '2024-04-23 13:49:19', '2024-04-23 13:49:19', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (11, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-25 17:55:39', '2024-04-25 17:55:39', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (12, 1781604279872581644, 1, 'NoSuchBeanDefinitionException: No qualifying bean of type \'cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient\' available', 'system', NULL, NULL, NULL, '2024-04-25 17:55:39', '2024-04-25 17:55:39', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (13, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-25 17:56:12', '2024-04-25 17:56:12', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (14, 1781604279872581644, 1, 'NoSuchBeanDefinitionException: No qualifying bean of type \'cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient\' available', 'system', NULL, NULL, NULL, '2024-04-25 17:56:12', '2024-04-25 17:56:12', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (15, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-25 17:56:24', '2024-04-25 17:56:24', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (16, 1781604279872581644, 1, 'NoSuchBeanDefinitionException: No qualifying bean of type \'cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient\' available', 'system', NULL, NULL, NULL, '2024-04-25 17:56:24', '2024-04-25 17:56:24', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (17, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-25 17:56:41', '2024-04-25 17:56:41', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (18, 1781604279872581644, 1, 'NoSuchBeanDefinitionException: No qualifying bean of type \'cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient\' available', 'system', NULL, NULL, NULL, '2024-04-25 17:56:59', '2024-04-25 17:56:59', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (19, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-25 17:58:15', '2024-04-25 17:58:15', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (20, 1781604279872581644, 1, '作为一个AI助手,我没有个人感受和偏好。但是,中国是一个拥有丰富历史、文化和自然景观的国家,有许多令人惊叹的地方,如长城、故宫、西湖、张家界、九寨沟等著名景点,吸引了无数国内外游客的喜爱。每个人对于\"好看\"的定义可能不同,但中国无疑有着独特的魅力和多样性。', 'system', NULL, NULL, NULL, '2024-04-25 17:58:19', '2024-04-25 17:58:19', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (21, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-26 18:27:13', '2024-04-26 18:27:13', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (22, 1781604279872581644, 1, 'ClassCastException: class com.alibaba.dashscope.aigc.generation.models.QwenParam cannot be cast to class cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest (com.alibaba.dashscope.aigc.generation.models.QwenParam and cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest are in unnamed module of loader \'app\')', 'system', NULL, NULL, NULL, '2024-04-26 18:27:13', '2024-04-26 18:27:13', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (23, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-26 18:28:12', '2024-04-26 18:28:12', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (24, 1781604279872581644, 1, 'ClassCastException: class com.alibaba.dashscope.aigc.generation.models.QwenParam cannot be cast to class cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest (com.alibaba.dashscope.aigc.generation.models.QwenParam and cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest are in unnamed module of loader \'app\')', 'system', NULL, NULL, NULL, '2024-04-26 18:30:31', '2024-04-26 18:30:31', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (25, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-27 09:39:56', '2024-04-27 09:39:56', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (26, 1781604279872581644, 1, 'ClassCastException: class com.alibaba.dashscope.aigc.generation.models.QwenParam cannot be cast to class cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest (com.alibaba.dashscope.aigc.generation.models.QwenParam and cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenChatCompletionRequest are in unnamed module of loader \'app\')', 'system', NULL, NULL, NULL, '2024-04-27 09:39:56', '2024-04-27 09:39:56', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (27, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-27 09:41:02', '2024-04-27 09:41:02', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (28, 1781604279872581644, 1, 'AiException: 没有找到apiKey!Can not find api-key.', 'system', NULL, NULL, NULL, '2024-04-27 09:41:02', '2024-04-27 09:41:02', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (29, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-27 09:41:58', '2024-04-27 09:41:58', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (30, 1781604279872581644, 1, 'AiException: 没有找到apiKey!Can not find api-key.', 'system', NULL, NULL, NULL, '2024-04-27 09:41:58', '2024-04-27 09:41:58', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (31, 1781604279872581644, 1, '中国好看吗?', 'user', NULL, NULL, NULL, '2024-04-27 09:42:41', '2024-04-27 09:42:41', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `chat_conversation_id`, `user_id`, `message`, `message_type`, `top_k`, `top_p`, `temperature`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (32, 1781604279872581644, 1, 'ApiException: {\"statusCode\":400,\"message\":\"parameter incremental_output only support stream call\",\"code\":\"InvalidParameter\",\"isJson\":true,\"requestId\":\"9edd3968-6eec-901d-8194-15f497ca0d3a\"}', 'system', NULL, NULL, NULL, '2024-04-27 09:42:42', '2024-04-27 09:42:42', 1, 1, b'0'); +INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (61, 1781604279872581649, 1, NULL, 'user', 'ERNIE-3.5-8K', 9, '苹果是什么颜色?', NULL, NULL, NULL, NULL, '2024-05-07 17:18:29', '2024-05-07 17:18:29', 1, 1, b'0'); +INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (62, 1781604279872581649, 1, NULL, 'system', 'ERNIE-3.5-8K', 9, '苹果是一种水果,其颜色可以因品种和成熟度而异。常见的苹果颜色包括:\n\n1. 红色:许多苹果品种,如红富士、红元帅等,在成熟时会呈现出鲜艳的红色。\n2. 绿色:一些苹果品种,如青苹果、青香蕉等,在成熟时保持绿色或带有绿色条纹。\n3. 黄色:金苹果、黄元帅等品种在成熟时呈黄色。\n\n此外,还有一些苹果品种在成熟时会呈现出不同的颜色组合,如红绿相间、红黄相间等。因此,苹果的颜色并不是单一的,而是根据品种和成熟度而有所不同。', 8, NULL, NULL, NULL, '2024-05-07 17:18:38', '2024-05-07 17:18:38', NULL, NULL, b'0'); +INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (63, 1781604279872581649, 1, NULL, 'user', 'ERNIE-3.5-8K', 9, '中国好看吗?', NULL, NULL, NULL, NULL, '2024-05-07 17:18:53', '2024-05-07 17:18:53', 1, 1, b'0'); +INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (64, 1781604279872581649, 1, NULL, 'system', 'ERNIE-3.5-8K', 9, '中国是一个拥有悠久历史、灿烂文化、广袤土地和多元民族的国家,自然景观和人文景观都非常丰富。从雄伟的长城、壮丽的黄山到神秘的西藏,从繁华的上海、历史悠久的北京到充满异域风情的云南,中国各地都有独特的魅力。\n\n此外,中国还拥有丰富多彩的非物质文化遗产,如京剧、川剧、皮影戏等传统艺术形式,以及中秋节、春节等传统节日。这些文化遗产反映了中国人民的智慧和创造力,也是中国文化的重要组成部分。\n\n因此,可以说中国非常美丽,值得人们去探索和发现它的魅力。无论是自然景观还是人文景观,中国都有着独特的魅力和吸引力。', 1, NULL, NULL, NULL, '2024-05-07 17:19:03', '2024-05-07 17:19:03', 1, 1, b'0'); COMMIT; -- ---------------------------- --- Table structure for ai_chat_modal +-- Table structure for ai_chat_model -- ---------------------------- -DROP TABLE IF EXISTS `ai_chat_modal`; -CREATE TABLE `ai_chat_modal` ( +DROP TABLE IF EXISTS `ai_chat_model`; +CREATE TABLE `ai_chat_model` ( `id` bigint NOT NULL AUTO_INCREMENT, - `model_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型名字\n', - `model_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型类型(自己定义qianwen、yiyan、xinghuo、openai)\n', - `modal_image` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型照片\n', - `config` json DEFAULT NULL COMMENT 'Ai配置文件', - `disable` tinyint DEFAULT NULL COMMENT '禁用 0、正常 1、禁用\n', + `key_id` bigint DEFAULT NULL COMMENT 'API 秘钥编号', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型名字\n', + `model` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型类型(自己定义qianwen、yiyan、xinghuo、openai)\n', + `platform` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '平台', + `sort` int DEFAULT NULL COMMENT '排序', + `status` tinyint DEFAULT NULL COMMENT '禁用 0、正常 1、禁用\n', + `temperature` double DEFAULT NULL COMMENT '温度参数', + `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', + `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', `creator` bigint DEFAULT NULL COMMENT '创建用户', `updater` bigint DEFAULT NULL COMMENT '更新用户', `deleted` bit(1) DEFAULT b'0' COMMENT '删除', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; -- ---------------------------- --- Records of ai_chat_modal +-- Records of ai_chat_model -- ---------------------------- BEGIN; -INSERT INTO `ai_chat_modal` (`id`, `model_name`, `model_type`, `modal_image`, `config`, `disable`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1, '小红书Ai写作大模型', 'yiyan', '', NULL, 0, '2024-04-25 18:10:32', '2024-04-25 18:10:32', 1, 1, b'0'); +INSERT INTO `ai_chat_model` (`id`, `key_id`, `name`, `model`, `platform`, `sort`, `status`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (9, 1, '小红书Ai写作大模型3.5 8k', 'ERNIE-3.5-8K', 'yiyan', 100, 0, NULL, NULL, NULL, '2024-05-07 15:08:22', '2024-05-07 15:20:32', 1, 1, b'0'); +INSERT INTO `ai_chat_model` (`id`, `key_id`, `name`, `model`, `platform`, `sort`, `status`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (10, 1, '小红书Ai写作大模型4.0', 'ERNIE 4.0', 'yiyan', 100, 0, NULL, NULL, NULL, '2024-05-07 15:23:33', '2024-05-07 15:23:33', 1, 1, b'0'); COMMIT; -- ---------------------------- @@ -136,31 +124,64 @@ DROP TABLE IF EXISTS `ai_chat_role`; CREATE TABLE `ai_chat_role` ( `id` bigint NOT NULL AUTO_INCREMENT, `user_id` bigint DEFAULT NULL, - `model_id` bigint DEFAULT NULL COMMENT '模型编号,关联到角色使用的特定模型\n', - `role_name` varchar(128) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色名,角色的显示名称\n', - `role_introduce` varchar(256) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色介绍,详细描述角色的功能或用途\n', - `role_source` varchar(16) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色来源,如 system(系统预置)、customer(用户自定义)\n', - `classify` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '分类,角色所属的类别,如娱乐、创作等\n', - `visibility` varchar(16) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '发布状态,private 表示仅自己可见,public表示公开,disable表示禁用\n', - `top_k` float DEFAULT NULL COMMENT '生成时的Top-K采样候选集大小\n', - `top_p` float DEFAULT NULL COMMENT '生成时使用的核采样方法的概率阈值\n', - `temperature` float DEFAULT NULL COMMENT '用于控制随机性和多样性的温度参数\n', - `use_count` int DEFAULT NULL COMMENT '角色的使用次数统计\n', + `model_id` bigint DEFAULT NULL COMMENT '模型编号', + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色名,角色的显示名称\n', + `avatar` varchar(256) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '头像', + `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '分类,角色所属的类别,如娱乐、创作等\n', + `sort` int DEFAULT NULL COMMENT '排序', + `description` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色描述', + `welcome_message` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色欢迎语', + `system_message` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色设定(消息)', + `public_status` blob COMMENT '是否公开 true - 公开;false - 私有', + `status` tinyint DEFAULT NULL COMMENT '状态 0、开启 1、关闭', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', `creator` bigint DEFAULT NULL COMMENT '创建用户', `updater` bigint DEFAULT NULL COMMENT '更新用户', `deleted` bit(1) DEFAULT b'0' COMMENT '删除', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; -- ---------------------------- -- Records of ai_chat_role -- ---------------------------- BEGIN; -INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `role_name`, `role_introduce`, `role_source`, `classify`, `visibility`, `top_k`, `top_p`, `temperature`, `use_count`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1, 1, 1, '小红书写作v1---hh😄', '采用gpt3.5模型,拥有小红书优质作者写作经验。', 'system', 'writing', 'private', 0.2, 0.4, 0.7, 0, '2024-04-24 19:21:42', '2024-04-24 19:37:49', 1, 1, b'1'); -INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `role_name`, `role_introduce`, `role_source`, `classify`, `visibility`, `top_k`, `top_p`, `temperature`, `use_count`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (2, 1, 1, '小红书写作v2', '采用gpt3.5模型,拥有小红书优质作者写作经验。', 'system', 'writing', 'public', 0.2, 0.4, 0.7, 0, '2024-04-24 19:22:05', '2024-04-24 19:22:05', 1, 1, b'0'); -INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `role_name`, `role_introduce`, `role_source`, `classify`, `visibility`, `top_k`, `top_p`, `temperature`, `use_count`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (3, 1, 1, '小红书写作v1---', '采用gpt3.5模型,拥有小红书优质作者写作经验。', 'system', 'writing', 'public', 0.2, 0.4, 0.7, 0, '2024-04-24 19:29:38', '2024-04-24 19:29:38', 1, 1, b'0'); +INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `name`, `avatar`, `category`, `sort`, `description`, `welcome_message`, `system_message`, `public_status`, `status`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (8, 1, 9, '小红书写作v2', 'http://baidu.com', 'writing', 0, '采用gpt3.5模型,拥有小红书优质作者写作经验。', '欢迎使用小红书写作模型!', '你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。', 0x31, 0, '2024-05-07 15:30:30', '2024-05-07 15:35:54', 1, 1, b'1'); +INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `name`, `avatar`, `category`, `sort`, `description`, `welcome_message`, `system_message`, `public_status`, `status`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (9, 1, 9, '小红书写作v1', 'http://baidu.com', 'writing', 0, '采用gpt3.5模型,拥有小红书优质作者写作经验。', '欢迎使用小红书写作模型!', '你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。', 0x30, 0, '2024-05-07 15:36:40', '2024-05-07 15:36:40', 1, 1, b'0'); +COMMIT; + +-- ---------------------------- +-- Table structure for ai_image +-- ---------------------------- +DROP TABLE IF EXISTS `ai_image`; +CREATE TABLE `ai_image` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `user_id` bigint DEFAULT NULL, + `prompt` varchar(2000) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '提示词\n', + `modal` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型\n', + `size` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。\n', + `drawing_status` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画状态:提交、排队、绘画中、绘画完成、绘画失败\n', + `drawing_image_url` varchar(512) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画图片地址\n', + `drawing_error_message` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '错误信息', + `mj_message_id` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的消息编号(MJ返回)\n', + `mj_operation_id` varchar(128) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的操作编号(MJ返回)\n', + `mj_operation_name` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的操作名字(MJ返回)\n', + `mj_operations` json DEFAULT NULL COMMENT 'mj图片生产成功保存的 components json 数组\n', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `creator` bigint DEFAULT NULL COMMENT '创建用户', + `updater` bigint DEFAULT NULL COMMENT '更新用户', + `deleted` bit(1) DEFAULT b'0' COMMENT '删除', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; + +-- ---------------------------- +-- Records of ai_image +-- ---------------------------- +BEGIN; +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (22, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'fail', NULL, 'You have reached the maximum allowed number of concurrent jobs. Don\'t worry, this job will start as soon as another one finishes!', NULL, NULL, NULL, NULL, '2024-05-08 17:26:01', '2024-05-08 17:26:04', 1, NULL, b'0'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (23, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'fail', NULL, 'Your job queue is full. Please wait for a job to finish first, then resubmit this one.', '1788144718477979648', NULL, NULL, NULL, '2024-05-08 17:51:38', '2024-05-08 17:51:39', 1, NULL, b'0'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (24, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'submit', NULL, NULL, '1788145293357699072', NULL, NULL, NULL, '2024-05-08 17:53:55', '2024-05-08 17:53:55', 1, 1, b'0'); COMMIT; SET FOREIGN_KEY_CHECKS = 1; -- Gitee From 84a3cd3a757998cf51bde89dc1d74f91ab2ec4dd Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 18:12:12 +0800 Subject: [PATCH 0503/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=20nonce=20id=20=E5=BF=85=E9=A1=BB=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=95=BF=E6=95=B4=E5=9E=8Bid=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/service/impl/AiImageServiceImpl.java | 6 ++++-- .../ai/midjourney/api/MidjourneyInteractionsApi.java | 3 +-- .../ai/midjourney/MidjourneyInteractionsTests.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index e0d797d180..19281d4df0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.service.impl; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.exception.AiException; import cn.iocoder.yudao.framework.ai.image.ImageGeneration; @@ -123,11 +124,12 @@ public class AiImageServiceImpl implements AiImageService { @Transactional(rollbackFor = Exception.class) public void midjourney(AiImageMidjourneyReqVO req) { // 保存数据库 + String messageId = String.valueOf(IdUtil.getSnowflakeNextId()); AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", null, AiImageDrawingStatusEnum.SUBMIT, null, - null, null, null); + messageId, null, null); // 提交 midjourney 任务 - Boolean imagine = midjourneyInteractionsApi.imagine(aiImageDO.getId(), req.getPrompt()); + Boolean imagine = midjourneyInteractionsApi.imagine(messageId, req.getPrompt()); if (!imagine) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java index 8edeb22dae..7a578c832b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java @@ -38,8 +38,7 @@ public class MidjourneyInteractionsApi extends MidjourneyInteractions { this.url = midjourneyConfig.getServerUrl().concat(midjourneyConfig.getApiInteractions()); } - public Boolean imagine(Long id, String prompt) { - String nonce = String.valueOf(id); + public Boolean imagine(String nonce, String prompt) { // 获取请求模板 String requestTemplate = midjourneyConfig.getRequestTemplates().get("imagine"); // 设置参数 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java index bfc5aaa85f..fda7818f05 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java @@ -40,7 +40,7 @@ public class MidjourneyInteractionsTests { @Test public void mjImageTest() { MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig); - mjImagineInteractions.imagine(IdUtil.getSnowflakeNextId(), "童话里应该是什么样子?"); + mjImagineInteractions.imagine(String.valueOf(IdUtil.getSnowflakeNextId()), "童话里应该是什么样子?"); } -- Gitee From 2734e54b0c0953123472655cfdfeb4ef70d49103 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 8 May 2024 18:12:30 +0800 Subject: [PATCH 0504/1557] =?UTF-8?q?=E3=80=90=E6=B5=8B=E8=AF=95=E3=80=91m?= =?UTF-8?q?j=E7=94=9F=E6=88=90=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-module-ai-biz/src/main/resources/http/image.http | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http index dda3f04f93..3f360aee13 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http @@ -15,10 +15,10 @@ Authorization: {{token}} ### chat midjourney -POST {{baseUrl}}/ai/image/midjourney +POST {{baseUrl}}/admin-api/ai/image/midjourney Content-Type: application/json Authorization: {{token}} { - "prompt": "Mona Lisa, eating on a seat under a tree, wearing white clothes, smiling at the sky" + "prompt": "Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0" } \ No newline at end of file -- Gitee From f9c7795efbc6c98ea1cb79bb03d7d98dcf497100 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Wed, 8 May 2024 20:56:39 +0800 Subject: [PATCH 0505/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E6=8A=84=E9=80=81=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=A2=9E=E5=8A=A0=E8=A1=A8=E5=8D=95=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=89=A9=E5=B1=95=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/framework/flowable/core/util/SimpleModelUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 6e5c042e8f..33d8615581 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -251,7 +251,10 @@ public class SimpleModelUtils { serviceTask.setName(node.getName()); // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners + // 添加抄送候选人元素 addCandidateElements(node, serviceTask); + // 添加表单字段权限属性元素 + addFormFieldsPermission(node, serviceTask); return serviceTask; } -- Gitee From 04cb9bad5b58ee0525bc35afc32c39bea3c7c2e6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 9 May 2024 16:40:28 +0800 Subject: [PATCH 0506/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20imagine=20=E7=89=88=E6=9C=AC=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=EF=BC=8C=E4=B8=8D=E8=83=BD=E6=8F=90=E4=BA=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/http-body/imagine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json index f4554cc502..4182d8bd16 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/http-body/imagine.json @@ -6,7 +6,7 @@ "session_id": "$session_id", "nonce": "$nonce", "data": { - "version": "1166847114203123795", + "version": "1237876415471554623", "id": "938956540159881230", "name": "imagine", "type": 1, -- Gitee From eac9d91a7fe15736332c749d7e9437311b3ce757 Mon Sep 17 00:00:00 2001 From: JJBoy <291077997@qq.com> Date: Thu, 9 May 2024 20:25:58 +0800 Subject: [PATCH 0507/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E9=A6=96=E9=A1=B5=E9=94=80=E5=94=AE=E9=A2=9D?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/dal/mysql/pay/PayWalletStatisticsMapper.java | 2 +- .../statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java | 2 +- .../statistics/service/pay/PayWalletStatisticsServiceImpl.java | 2 +- .../service/trade/TradeOrderStatisticsServiceImpl.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java index b9b38fbbec..f2399f8aac 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java @@ -33,6 +33,6 @@ public interface PayWalletStatisticsMapper extends BaseMapperX { @Param("endTime") LocalDateTime endTime, @Param("payStatus") Boolean payStatus); - Integer selectRechargePriceSummary(@Param("payStatus") Integer payStatus); + Integer selectRechargePriceSummary(@Param("payStatus") Boolean payStatus); } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java index 35e52e031d..86b32df2f0 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java @@ -58,7 +58,7 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX Date: Thu, 9 May 2024 23:03:10 +0800 Subject: [PATCH 0508/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9AAPI=20=E5=AF=86=E9=92=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 8 ++- .../iocoder/yudao/module/ai/package-info.java | 5 -- .../admin/model/AiApiKeyController.java | 72 +++++++++++++++++++ .../model/vo/apikey/AiApiKeyPageReqVO.java | 27 +++++++ .../admin/model/vo/apikey/AiApiKeyRespVO.java | 28 ++++++++ .../model/vo/apikey/AiApiKeySaveReqVO.java | 34 +++++++++ .../model/vo/model/AiChatModelListRespVO.java | 4 -- .../ai/dal/dataobject/model/AiApiKeyDO.java | 12 ++-- .../ai/dal/mysql/model/AiApiKeyMapper.java | 26 +++++++ .../ai/service/model/AiApiKeyService.java | 54 ++++++++++++++ .../ai/service/model/AiApiKeyServiceImpl.java | 70 ++++++++++++++++++ .../yudao/framework/ai/AiPlatformEnum.java | 4 +- 12 files changed, 322 insertions(+), 22 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyPageReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeySaveReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index fde06746e6..302c13a845 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -3,13 +3,14 @@ package cn.iocoder.yudao.module.ai; import cn.iocoder.yudao.framework.common.exception.ErrorCode; /** - * System 错误码枚举类 + * AI 错误码枚举类 * - * system 系统,使用 1-002-000-000 段 + * ai 系统,使用 1-040-000-000 段 */ public interface ErrorCodeConstants { - // ========== 模块 ai 错误码区间 [1-022-000-000 ~ 1-023-000-000) ========== + // ========== API 密钥 1-040-000-000 ========== + ErrorCode API_KEY_NOT_EXISTS = new ErrorCode(1_040_000_000, "AI API 密钥不存在"); // chat @@ -37,4 +38,5 @@ public interface ErrorCodeConstants { ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); ErrorCode AI_MODAL_DISABLE_NOT_USED = new ErrorCode(1_022_000_084, "AI 模型禁用不能使用!"); + } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java deleted file mode 100644 index 6fa1f167a0..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: fansili - * time: 2024/3/3 18:14 - */ -package cn.iocoder.yudao.module.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java new file mode 100644 index 0000000000..7add01901a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - AI API 密钥") +@RestController +@RequestMapping("/ai/api-key") +@Validated +public class AiApiKeyController { + + @Resource + private AiApiKeyService apiKeyService; + + @PostMapping("/create") + @Operation(summary = "创建AI API 密钥") + @PreAuthorize("@ss.hasPermission('ai:api-key:create')") + public CommonResult createApiKey(@Valid @RequestBody AiApiKeySaveReqVO createReqVO) { + return success(apiKeyService.createApiKey(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新AI API 密钥") + @PreAuthorize("@ss.hasPermission('ai:api-key:update')") + public CommonResult updateApiKey(@Valid @RequestBody AiApiKeySaveReqVO updateReqVO) { + apiKeyService.updateApiKey(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除AI API 密钥") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('ai:api-key:delete')") + public CommonResult deleteApiKey(@RequestParam("id") Long id) { + apiKeyService.deleteApiKey(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得AI API 密钥") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('ai:api-key:query')") + public CommonResult getApiKey(@RequestParam("id") Long id) { + AiApiKeyDO apiKey = apiKeyService.getApiKey(id); + return success(BeanUtils.toBean(apiKey, AiApiKeyRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得AI API 密钥分页") + @PreAuthorize("@ss.hasPermission('ai:api-key:query')") + public CommonResult> getApiKeyPage(@Valid AiApiKeyPageReqVO pageReqVO) { + PageResult pageResult = apiKeyService.getApiKeyPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AiApiKeyRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyPageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyPageReqVO.java new file mode 100644 index 0000000000..021e0f80c9 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyPageReqVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - AI API 密钥分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AiApiKeyPageReqVO extends PageParam { + + @Schema(description = "名称", example = "文心一言") + private String name; + + @Schema(description = "平台", example = "OpenAI") + private String platform; + + @Schema(description = "状态", example = "1") + private Integer status; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyRespVO.java new file mode 100644 index 0000000000..55d6d802b5 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeyRespVO.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +@Schema(description = "管理后台 - AI API 密钥 Response VO") +@Data +public class AiApiKeyRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23538") + private Long id; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "文心一言") + private String name; + + @Schema(description = "密钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "ABC") + private String apiKey; + + @Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") + private String platform; + + @Schema(description = "自定义 API 地址", example = "https://aip.baidubce.com") + private String url; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeySaveReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeySaveReqVO.java new file mode 100644 index 0000000000..8fbc8fde78 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/apikey/AiApiKeySaveReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - AI API 密钥新增/修改 Request VO") +@Data +public class AiApiKeySaveReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23538") + private Long id; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "文心一言") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "密钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "ABC") + @NotEmpty(message = "密钥不能为空") + private String apiKey; + + @Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") + @NotEmpty(message = "平台不能为空") + private String platform; + + @Schema(description = "自定义 API 地址", example = "https://aip.baidubce.com") + private String url; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "状态不能为空") + private Integer status; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java index 59a8900a65..916106a23d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java @@ -1,9 +1,5 @@ package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; -import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java index 9512f4c5e3..306c1e086d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java @@ -31,18 +31,16 @@ public class AiApiKeyDO extends BaseDO { * 名称 */ private String name; + /** + * 密钥 + */ + private String apiKey; /** * 平台 * * 枚举 {@link AiPlatformEnum} */ private String platform; - /** - * 用途 - * - * TODO 芋艿:枚举;chat、image - */ - private Integer type; /** * API 地址 */ @@ -54,6 +52,4 @@ public class AiApiKeyDO extends BaseDO { */ private Integer status; - // TODO 芋艿:proxyUrl 代理地址 - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java new file mode 100644 index 0000000000..fef4965b8c --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.ai.dal.mysql.model; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * AI API 密钥 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface AiApiKeyMapper extends BaseMapperX { + + default PageResult selectPage(AiApiKeyPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(AiApiKeyDO::getName, reqVO.getName()) + .eqIfPresent(AiApiKeyDO::getPlatform, reqVO.getPlatform()) + .eqIfPresent(AiApiKeyDO::getStatus, reqVO.getStatus()) + .orderByDesc(AiApiKeyDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java new file mode 100644 index 0000000000..7390bc8e62 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import jakarta.validation.Valid; + +/** + * AI API 密钥 Service 接口 + * + * @author 芋道源码 + */ +public interface AiApiKeyService { + + /** + * 创建AI API 密钥 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createApiKey(@Valid AiApiKeySaveReqVO createReqVO); + + /** + * 更新AI API 密钥 + * + * @param updateReqVO 更新信息 + */ + void updateApiKey(@Valid AiApiKeySaveReqVO updateReqVO); + + /** + * 删除AI API 密钥 + * + * @param id 编号 + */ + void deleteApiKey(Long id); + + /** + * 获得AI API 密钥 + * + * @param id 编号 + * @return AI API 密钥 + */ + AiApiKeyDO getApiKey(Long id); + + /** + * 获得AI API 密钥分页 + * + * @param pageReqVO 分页查询 + * @return AI API 密钥分页 + */ + PageResult getApiKeyPage(AiApiKeyPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java new file mode 100644 index 0000000000..9bafb17d56 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import cn.iocoder.yudao.module.ai.dal.mysql.model.AiApiKeyMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.API_KEY_NOT_EXISTS; + +/** + * AI API 密钥 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class AiApiKeyServiceImpl implements AiApiKeyService { + + @Resource + private AiApiKeyMapper apiKeyMapper; + + @Override + public Long createApiKey(AiApiKeySaveReqVO createReqVO) { + // 插入 + AiApiKeyDO apiKey = BeanUtils.toBean(createReqVO, AiApiKeyDO.class); + apiKeyMapper.insert(apiKey); + // 返回 + return apiKey.getId(); + } + + @Override + public void updateApiKey(AiApiKeySaveReqVO updateReqVO) { + // 校验存在 + validateApiKeyExists(updateReqVO.getId()); + // 更新 + AiApiKeyDO updateObj = BeanUtils.toBean(updateReqVO, AiApiKeyDO.class); + apiKeyMapper.updateById(updateObj); + } + + @Override + public void deleteApiKey(Long id) { + // 校验存在 + validateApiKeyExists(id); + // 删除 + apiKeyMapper.deleteById(id); + } + + private void validateApiKeyExists(Long id) { + if (apiKeyMapper.selectById(id) == null) { + throw exception(API_KEY_NOT_EXISTS); + } + } + + @Override + public AiApiKeyDO getApiKey(Long id) { + return apiKeyMapper.selectById(id); + } + + @Override + public PageResult getApiKeyPage(AiApiKeyPageReqVO pageReqVO) { + return apiKeyMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java index 752cb042dd..427202391c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java @@ -6,6 +6,7 @@ import lombok.Getter; import java.util.List; +// TODO 芋艿:这块,看看要不要调整下; /** * ai 模型平台 * @@ -16,11 +17,10 @@ import java.util.List; @AllArgsConstructor public enum AiPlatformEnum { - YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), - OPEN_AI("openai", "openAi"), + OPEN_AI("openai", "openAi"), // TODO 芋艿:OpenAI OPEN_AI_DALL("dall", "dall"), MIDJOURNEY("midjourney", "midjourney"), -- Gitee From 3da7885514c19aafbd7318fb87cffd3d514fde0b Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Fri, 10 May 2024 09:29:43 +0800 Subject: [PATCH 0509/1557] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=20SexEnum.U?= =?UTF-8?q?NSPECIFIED,=20=E5=B9=B6=E5=B0=86=20UNKNOWN=20=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=BA=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=AD?= =?UTF-8?q?=20member=5Fuser.sex=20=E5=AD=97=E6=AE=B5=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/system/enums/common/SexEnum.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java index 91f05c0596..40ac3cab13 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/common/SexEnum.java @@ -11,14 +11,12 @@ import lombok.Getter; @Getter @AllArgsConstructor public enum SexEnum { - /** 未定义 */ - UNSPECIFIED(0), /** 男 */ MALE(1), /** 女 */ FEMALE(2), /* 未知 */ - UNKNOWN(3); + UNKNOWN(0); /** * 性别 -- Gitee From 8e7fc1ff964325ac5583e268f2c7792a54eed5e5 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 10 May 2024 15:29:11 +0800 Subject: [PATCH 0510/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=A2=9E=E5=8A=A0=20mjNonce=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=8C=E7=94=9F=E6=88=90=E5=A5=BD=E3=80=81?= =?UTF-8?q?=E6=88=96=E5=BC=82=E5=B8=B8=E7=9A=84=E5=9B=BE=E7=89=87=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/dataobject/image/AiImageDO.java | 4 +- .../module/ai/dal/mysql/AiImageMapper.java | 10 ++++ .../ai/service/impl/AiImageServiceImpl.java | 4 +- .../YuDaoMidjourneyMessageHandler.java | 12 ++--- .../src/main/resources/http/image.http | 2 +- .../imageGenerationProcess/test2.json | 54 +++++++++++++++++++ .../src/main/resources/application-local.yaml | 12 +++-- 7 files changed, 81 insertions(+), 17 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/imageGenerationProcess/test2.json diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index ea83d21814..c04fea12f6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -49,8 +49,8 @@ public class AiImageDO extends BaseDO { // ============ mj 需要字段 - @Schema(description = "用户操作的消息编号(MJ返回)") - private String mjMessageId; + @Schema(description = "用户操作的Nonce编号(MJ返回)") + private String mjNonceId; @Schema(description = "用户操作的操作编号(MJ返回)") private String mjOperationId; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java index ef2b6a596b..1ee5b436d4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -17,4 +18,13 @@ import org.springframework.stereotype.Repository; public interface AiImageMapper extends BaseMapperX { + /** + * 更新 - 根据 messageId + * + * @param mjNonceId + * @param aiImageDO + */ + default void updateByMjNonce(Long mjNonceId, AiImageDO aiImageDO) { + this.update(aiImageDO, new LambdaQueryWrapperX().eq(AiImageDO::getMjNonceId, mjNonceId)); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 19281d4df0..d306b4b2fb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -145,7 +145,7 @@ public class AiImageServiceImpl implements AiImageService { // 校验 OperateId 是否存在 AiImageMidjourneyOperationsVO midjourneyOperationsVO = validateMidjourneyOperationsExists(midjourneyOperations, req.getOperateId()); // 校验 messageId - validateMessageId(aiImageDO.getMjMessageId(), req.getMessageId()); + validateMessageId(aiImageDO.getMjNonceId(), req.getMessageId()); // 获取 mjOperationName String mjOperationName = midjourneyOperationsVO.getLabel(); // 保存一个 image 任务记录 @@ -222,7 +222,7 @@ public class AiImageServiceImpl implements AiImageService { aiImageDO.setDrawingImageUrl(drawingImageUrl); aiImageDO.setDrawingErrorMessage(drawingErrorMessage); // - aiImageDO.setMjMessageId(mjMessageId); + aiImageDO.setMjNonceId(mjMessageId); aiImageDO.setMjOperationId(mjOperationId); aiImageDO.setMjOperationName(mjOperationName); aiImageMapper.insert(aiImageDO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 43ca13b6a3..24f70b7827 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -62,12 +62,11 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { private void errorHandler(MidjourneyMessage midjourneyMessage) { // image 编号 - Long aiImageId = Long.valueOf(midjourneyMessage.getNonce()); + Long nonceId = Long.valueOf(midjourneyMessage.getNonce()); // 获取 error message String errorMessage = getErrorMessage(midjourneyMessage); - aiImageMapper.updateById( + aiImageMapper.updateByMjNonce(nonceId, new AiImageDO() - .setId(aiImageId) .setDrawingErrorMessage(errorMessage) .setDrawingStatus(AiImageDrawingStatusEnum.FAIL.getStatus()) ); @@ -83,7 +82,7 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { private void successHandler(MidjourneyMessage midjourneyMessage) { // 获取id - Long aiImageId = Long.valueOf(midjourneyMessage.getNonce()); + Long nonceId = Long.valueOf(midjourneyMessage.getNonce()); // 获取生成 url String imageUrl = null; if (CollUtil.isNotEmpty(midjourneyMessage.getAttachments())) { @@ -102,12 +101,11 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { // 获取 midjourneyOperations List midjourneyOperations = getMidjourneyOperationsList(midjourneyMessage); // 更新数据库 - aiImageMapper.updateById( + aiImageMapper.updateByMjNonce(nonceId, new AiImageDO() - .setId(aiImageId) .setDrawingImageUrl(imageUrl) .setDrawingStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) - .setMjMessageId(midjourneyMessage.getId()) + .setMjNonceId(midjourneyMessage.getId()) .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) ); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http index 3f360aee13..bf1165773d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http @@ -20,5 +20,5 @@ Content-Type: application/json Authorization: {{token}} { - "prompt": "Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0" + "prompt": "Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere." } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/imageGenerationProcess/test2.json b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/imageGenerationProcess/test2.json new file mode 100644 index 0000000000..1721528044 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/resources/requestTestJson/imageGenerationProcess/test2.json @@ -0,0 +1,54 @@ +{ + "type": 2, + "application_id": "936929561302675456", + "guild_id": "1237948819677904956", + "channel_id": "1237948819677904960", + "session_id": "4bdb0c32158f625bbd7f0a54bfbb54aa", + "data": { + "version": "1237876415471554623", + "id": "938956540159881230", + "name": "imagine", + "type": 1, + "options": [ + { + "type": 3, + "name": "prompt", + "value": "哈哈哈" + } + ], + "application_command": { + "id": "938956540159881230", + "type": 1, + "application_id": "936929561302675456", + "version": "1237876415471554623", + "name": "imagine", + "description": "Create images with Midjourney", + "options": [ + { + "type": 3, + "name": "prompt", + "description": "The prompt to imagine", + "required": true, + "description_localized": "The prompt to imagine", + "name_localized": "prompt" + } + ], + "dm_permission": true, + "contexts": [ + 0, + 1, + 2 + ], + "integration_types": [ + 0, + 1 + ], + "global_popularity_rank": 1, + "description_localized": "Create images with Midjourney", + "name_localized": "imagine" + }, + "attachments": [] + }, + "nonce": "1238062212925358080", + "analytics_location": "slash_ui" +} \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 1c16251d75..959988d7d2 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -52,7 +52,7 @@ spring: # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 # url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root - password: 123456 + password: root # username: sa # SQL Server 连接的示例 # password: Yudao@2024 # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 @@ -61,7 +61,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root - password: 123456 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: @@ -248,9 +248,9 @@ yudao: style: vivid midjourney: enable: true - token: OTc1MzcyNDg1OTcxMzEyNzAw.G2iiSo.OqW9vToC5dokiyb1QOWnCwRPsYpOjLyNcf9--M - guild-id: 1234355413420347402 - channel-id: 1234380679576424448 + token: MTE4MjE3MjY2MjkxNTY3ODIzOA.GEV1SG.c49F8lZoGCUHwsj8O0UdodmM6nyQHvuD2fXflw + guild-id: 1237948819677904956 + channel-id: 1237948819677904960 captcha: enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试; security: @@ -267,6 +267,8 @@ yudao: enable: false demo: false # 关闭演示模式 tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc + tenant: + enable: false justauth: enabled: true -- Gitee From c1e2ba9ed4dd069835844d2c71b69795809e985a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 10 May 2024 17:26:10 +0800 Subject: [PATCH 0511/1557] =?UTF-8?q?=E3=80=90todo=E3=80=91mj=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BF=A1=E6=81=AF=20=E5=A2=9E=E5=8A=A0=20todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 24f70b7827..0260a15116 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -83,6 +83,7 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { private void successHandler(MidjourneyMessage midjourneyMessage) { // 获取id Long nonceId = Long.valueOf(midjourneyMessage.getNonce()); + // TODO @芋艿 这个地方有问题,不能根据 nonce来更新,不返回这个信息(别人获取了 image-xxx-xx 后面一段hash,由于没有mj账号测试,暂不清楚。) // 获取生成 url String imageUrl = null; if (CollUtil.isNotEmpty(midjourneyMessage.getAttachments())) { -- Gitee From 9d102a1b72d3fd9e2e07847fdbf9912df5313775 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 10 May 2024 21:51:48 +0800 Subject: [PATCH 0512/1557] =?UTF-8?q?style:=20mysql/quartz.sql=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=B0=8F=E5=86=99,=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/quartz.sql | 484 ++++++++++++++++++++++++------------------- 1 file changed, 271 insertions(+), 213 deletions(-) diff --git a/sql/mysql/quartz.sql b/sql/mysql/quartz.sql index 200860e2f8..b4cfcc07c5 100644 --- a/sql/mysql/quartz.sql +++ b/sql/mysql/quartz.sql @@ -8,298 +8,356 @@ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- --- Table structure for QRTZ_BLOB_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`; -CREATE TABLE `QRTZ_BLOB_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `BLOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - INDEX `SCHED_NAME`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_blob_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_blob_triggers`; +CREATE TABLE `qrtz_blob_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `blob_data` blob NULL, + PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, + INDEX `sched_name` (`sched_name` ASC, `trigger_name` ASC, `trigger_group` ASC) USING BTREE, + CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_BLOB_TRIGGERS +-- Records of qrtz_blob_triggers -- ---------------------------- +-- @format:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- -- Table structure for QRTZ_CALENDARS -- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_CALENDARS`; -CREATE TABLE `QRTZ_CALENDARS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CALENDAR` blob NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +DROP TABLE IF EXISTS `qrtz_calendars`; +CREATE TABLE `qrtz_calendars` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `calendar_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `calendar` blob NOT NULL, + PRIMARY KEY (`sched_name`, `calendar_name`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_CALENDARS +-- Records of qrtz_calendars -- ---------------------------- +-- @format:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_CRON_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`; -CREATE TABLE `QRTZ_CRON_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_cron_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_cron_triggers`; +CREATE TABLE `qrtz_cron_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `cron_expression` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `time_zone_id` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, + CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_CRON_TRIGGERS +-- Records of qrtz_cron_triggers -- ---------------------------- +-- @format:off BEGIN; -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); +INSERT INTO `qrtz_cron_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `cron_expression`, `time_zone_id`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_FIRED_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`; -CREATE TABLE `QRTZ_FIRED_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `FIRED_TIME` bigint NOT NULL, - `SCHED_TIME` bigint NOT NULL, - `PRIORITY` int NOT NULL, - `STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE, - INDEX `IDX_QRTZ_FT_TRIG_INST_NAME`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_J_G`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_T_G`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_TG`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_fired_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_fired_triggers`; +CREATE TABLE `qrtz_fired_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `entry_id` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `instance_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `fired_time` bigint NOT NULL, + `sched_time` bigint NOT NULL, + `priority` int NOT NULL, + `state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `job_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`sched_name`, `entry_id`) USING BTREE, + INDEX `idx_qrtz_ft_trig_inst_name` (`sched_name` ASC, `instance_name` ASC) USING BTREE, + INDEX `idx_qrtz_ft_inst_job_req_rcvry` (`sched_name` ASC, `instance_name` ASC, `requests_recovery` ASC) USING BTREE, + INDEX `idx_qrtz_ft_j_g` (`sched_name` ASC, `job_name` ASC, `job_group` ASC) USING BTREE, + INDEX `idx_qrtz_ft_jg` (`sched_name` ASC, `job_group` ASC) USING BTREE, + INDEX `idx_qrtz_ft_t_g` (`sched_name` ASC, `trigger_name` ASC, `trigger_group` ASC) USING BTREE, + INDEX `idx_qrtz_ft_tg` (`sched_name` ASC, `trigger_group` ASC) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_FIRED_TRIGGERS +-- Records of qrtz_fired_triggers -- ---------------------------- +-- @format:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_JOB_DETAILS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`; -CREATE TABLE `QRTZ_JOB_DETAILS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, - INDEX `IDX_QRTZ_J_REQ_RECOVERY`(`SCHED_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, - INDEX `IDX_QRTZ_J_GRP`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_job_details +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_job_details`; +CREATE TABLE `qrtz_job_details` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `job_class_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `is_durable` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `is_update_data` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_data` blob NULL, + PRIMARY KEY (`sched_name`, `job_name`, `job_group`) USING BTREE, + INDEX `idx_qrtz_j_req_recovery` (`sched_name` ASC, `requests_recovery` ASC) USING BTREE, + INDEX `idx_qrtz_j_grp` (`sched_name` ASC, `job_group` ASC) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_JOB_DETAILS +-- Records of qrtz_job_details -- ---------------------------- +-- @format:off BEGIN; -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000197400104A4F425F48414E444C45525F4E414D457400116163636573734C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000187400104A4F425F48414E444C45525F4E414D4574001A62726F6B65726167655265636F7264556E667265657A654A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001A7400104A4F425F48414E444C45525F4E414D457400106572726F724C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001B7400104A4F425F48414E444C45525F4E414D4574000E6A6F624C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000137400104A4F425F48414E444C45525F4E414D45740010706179526566756E6453796E634A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000157400104A4F425F48414E444C45525F4E414D4574001774726164654F726465724175746F43616E63656C4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000177400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F436F6D6D656E744A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000167400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F526563656976654A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000197400104A4F425F48414E444C45525F4E414D457400116163636573734C6F67436C65616E4A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000187400104A4F425F48414E444C45525F4E414D4574001A62726F6B65726167655265636F7264556E667265657A654A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001A7400104A4F425F48414E444C45525F4E414D457400106572726F724C6F67436C65616E4A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001B7400104A4F425F48414E444C45525F4E414D4574000E6A6F624C6F67436C65616E4A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000137400104A4F425F48414E444C45525F4E414D45740010706179526566756E6453796E634A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000157400104A4F425F48414E444C45525F4E414D4574001774726164654F726465724175746F43616E63656C4A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000177400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F436F6D6D656E744A6F627800); +INSERT INTO `qrtz_job_details` (`sched_name`, `job_name`, `job_group`, `description`, `job_class_name`, `is_durable`, `is_nonconcurrent`, `is_update_data`, `requests_recovery`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000167400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F526563656976654A6F627800); COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_LOCKS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_LOCKS`; -CREATE TABLE `QRTZ_LOCKS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_locks +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_locks`; +CREATE TABLE `qrtz_locks` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `lock_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`sched_name`, `lock_name`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_LOCKS +-- Records of qrtz_locks -- ---------------------------- +-- @format:off BEGIN; -INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'STATE_ACCESS'); -INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'TRIGGER_ACCESS'); +INSERT INTO `qrtz_locks` (`sched_name`, `lock_name`) VALUES ('schedulerName', 'STATE_ACCESS'); +INSERT INTO `qrtz_locks` (`sched_name`, `lock_name`) VALUES ('schedulerName', 'TRIGGER_ACCESS'); COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`; -CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_paused_trigger_grps +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`; +CREATE TABLE `qrtz_paused_trigger_grps` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`sched_name`, `trigger_group`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_PAUSED_TRIGGER_GRPS +-- Records of qrtz_paused_trigger_grps -- ---------------------------- +-- @format:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- -- Table structure for QRTZ_SCHEDULER_STATE -- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`; -CREATE TABLE `QRTZ_SCHEDULER_STATE` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `LAST_CHECKIN_TIME` bigint NOT NULL, - `CHECKIN_INTERVAL` bigint NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +DROP TABLE IF EXISTS `qrtz_scheduler_state`; +CREATE TABLE `qrtz_scheduler_state` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `instance_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `last_checkin_time` bigint NOT NULL, + `checkin_interval` bigint NOT NULL, + PRIMARY KEY (`sched_name`, `instance_name`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_SCHEDULER_STATE +-- Records of qrtz_scheduler_state -- ---------------------------- +-- @format:off BEGIN; -INSERT INTO `QRTZ_SCHEDULER_STATE` (`SCHED_NAME`, `INSTANCE_NAME`, `LAST_CHECKIN_TIME`, `CHECKIN_INTERVAL`) VALUES ('schedulerName', 'MacBook-Pro.local1713489703551', 1713742509534, 15000); +INSERT INTO `qrtz_scheduler_state` (`sched_name`, `instance_name`, `last_checkin_time`, `checkin_interval`) VALUES ('schedulerName', 'MacBook-Pro.local1713489703551', 1713742509534, 15000); COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`; -CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `REPEAT_COUNT` bigint NOT NULL, - `REPEAT_INTERVAL` bigint NOT NULL, - `TIMES_TRIGGERED` bigint NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_simple_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_simple_triggers`; +CREATE TABLE `qrtz_simple_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `repeat_count` bigint NOT NULL, + `repeat_interval` bigint NOT NULL, + `times_triggered` bigint NOT NULL, + PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, + CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- -- Records of QRTZ_SIMPLE_TRIGGERS -- ---------------------------- +-- @format:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`; -CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `INT_PROP_1` int NULL DEFAULT NULL, - `INT_PROP_2` int NULL DEFAULT NULL, - `LONG_PROP_1` bigint NULL DEFAULT NULL, - `LONG_PROP_2` bigint NULL DEFAULT NULL, - `DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL, - `DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL, - `BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_simprop_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_simprop_triggers`; +CREATE TABLE `qrtz_simprop_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `str_prop_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `str_prop_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `str_prop_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `int_prop_1` int NULL DEFAULT NULL, + `int_prop_2` int NULL DEFAULT NULL, + `long_prop_1` bigint NULL DEFAULT NULL, + `long_prop_2` bigint NULL DEFAULT NULL, + `dec_prop_1` decimal(13, 4) NULL DEFAULT NULL, + `dec_prop_2` decimal(13, 4) NULL DEFAULT NULL, + `bool_prop_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `bool_prop_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, + CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_SIMPROP_TRIGGERS +-- Records of qrtz_simprop_triggers -- ---------------------------- +-- @formatter:off BEGIN; COMMIT; +-- @formatter:on -- ---------------------------- --- Table structure for QRTZ_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_TRIGGERS`; -CREATE TABLE `QRTZ_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `NEXT_FIRE_TIME` bigint NULL DEFAULT NULL, - `PREV_FIRE_TIME` bigint NULL DEFAULT NULL, - `PRIORITY` int NULL DEFAULT NULL, - `TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `START_TIME` bigint NOT NULL, - `END_TIME` bigint NULL DEFAULT NULL, - `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `MISFIRE_INSTR` smallint NULL DEFAULT NULL, - `JOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - INDEX `IDX_QRTZ_T_J`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_C`(`SCHED_NAME` ASC, `CALENDAR_NAME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_G`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_STATE`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_N_STATE`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_N_G_STATE`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NEXT_FIRE_TIME`(`SCHED_NAME` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +-- Table structure for qrtz_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_triggers`; +CREATE TABLE `qrtz_triggers` +( + `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `job_group` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `next_fire_time` bigint NULL DEFAULT NULL, + `prev_fire_time` bigint NULL DEFAULT NULL, + `priority` int NULL DEFAULT NULL, + `trigger_state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `trigger_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `start_time` bigint NOT NULL, + `end_time` bigint NULL DEFAULT NULL, + `calendar_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `misfire_instr` smallint NULL DEFAULT NULL, + `job_data` blob NULL, + PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, + INDEX `idx_qrtz_t_j` (`sched_name` ASC, `job_name` ASC, `job_group` ASC) USING BTREE, + INDEX `idx_qrtz_t_jg` (`sched_name` ASC, `job_group` ASC) USING BTREE, + INDEX `idx_qrtz_t_c` (`sched_name` ASC, `calendar_name` ASC) USING BTREE, + INDEX `idx_qrtz_t_g` (`sched_name` ASC, `trigger_group` ASC) USING BTREE, + INDEX `idx_qrtz_t_state` (`sched_name` ASC, `trigger_state` ASC) USING BTREE, + INDEX `idx_qrtz_t_n_state` (`sched_name` ASC, `trigger_name` ASC, `trigger_group` ASC, `trigger_state` + ASC) USING BTREE, + INDEX `idx_qrtz_t_n_g_state` (`sched_name` ASC, `trigger_group` ASC, `trigger_state` ASC) USING BTREE, + INDEX `idx_qrtz_t_next_fire_time` (`sched_name` ASC, `next_fire_time` ASC) USING BTREE, + INDEX `idx_qrtz_t_nft_st` (`sched_name` ASC, `trigger_state` ASC, `next_fire_time` ASC) USING BTREE, + INDEX `idx_qrtz_t_nft_misfire` (`sched_name` ASC, `misfire_instr` ASC, `next_fire_time` ASC) USING BTREE, + INDEX `idx_qrtz_t_nft_st_misfire` (`sched_name` ASC, `misfire_instr` ASC, `next_fire_time` ASC, `trigger_state` + ASC) USING BTREE, + INDEX `idx_qrtz_t_nft_st_misfire_grp` (`sched_name` ASC, `misfire_instr` ASC, `next_fire_time` ASC, `trigger_group` + ASC, `trigger_state` ASC) USING BTREE, + CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_unicode_ci; -- ---------------------------- --- Records of QRTZ_TRIGGERS +-- Records of qrtz_triggers -- ---------------------------- +-- @format:off BEGIN; -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', 'accessLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696301981000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 1695909720000, -1, 5, 'PAUSED', 'CRON', 1695909706000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', 'errorLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302043000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', 'jobLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302092000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', 'payRefundSyncJob', 'DEFAULT', NULL, 1690117560000, 1690117500000, 5, 'PAUSED', 'CRON', 1690117424000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 1695727440000, 1695727380000, 5, 'PAUSED', 'CRON', 1695656605000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 1695783840000, 1695783780000, 5, 'PAUSED', 'CRON', 1695742709000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 1695742740000, 1695742680000, 5, 'PAUSED', 'CRON', 1695727433000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', 'accessLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696301981000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 1695909720000, -1, 5, 'PAUSED', 'CRON', 1695909706000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', 'errorLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302043000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', 'jobLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302092000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', 'payRefundSyncJob', 'DEFAULT', NULL, 1690117560000, 1690117500000, 5, 'PAUSED', 'CRON', 1690117424000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 1695727440000, 1695727380000, 5, 'PAUSED', 'CRON', 1695656605000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 1695783840000, 1695783780000, 5, 'PAUSED', 'CRON', 1695742709000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); +INSERT INTO `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`, `job_name`, `job_group`, `description`, `next_fire_time`, `prev_fire_time`, `priority`, `trigger_state`, `trigger_type`, `start_time`, `end_time`, `calendar_name`, `misfire_instr`, `job_data`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 1695742740000, 1695742680000, 5, 'PAUSED', 'CRON', 1695727433000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); COMMIT; +-- @formatter:on SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file -- Gitee From 0288309e3b14ac1f89b1e58f9e5b190a519a1674 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 10 May 2024 22:12:26 +0800 Subject: [PATCH 0513/1557] =?UTF-8?q?fix:=20sqlserver=20DROP=20TABLE=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8GO=E6=9B=BF=E4=BB=A3=E5=88=86=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/sqlserver/ruoyi-vue-pro.sql | 146 +++++++++++++++++++++----------- sql/tools/convertor.py | 4 +- 2 files changed, 99 insertions(+), 51 deletions(-) diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index 86ff9a37e8..9368057ff4 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -6,6 +6,7 @@ Target Server Type : Microsoft SQL Server Date: 2024-05-08 00:22:09 + Date: 2024-05-10 22:07:48 */ @@ -14,7 +15,6 @@ -- ---------------------------- DROP TABLE IF EXISTS dual GO - CREATE TABLE dual ( id int @@ -38,7 +38,8 @@ GO -- ---------------------------- -- Table structure for infra_api_access_log -- ---------------------------- -DROP TABLE IF EXISTS infra_api_access_log; +DROP TABLE IF EXISTS infra_api_access_log +GO CREATE TABLE infra_api_access_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -256,7 +257,8 @@ GO -- ---------------------------- -- Table structure for infra_api_error_log -- ---------------------------- -DROP TABLE IF EXISTS infra_api_error_log; +DROP TABLE IF EXISTS infra_api_error_log +GO CREATE TABLE infra_api_error_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -515,7 +517,8 @@ GO -- ---------------------------- -- Table structure for infra_codegen_column -- ---------------------------- -DROP TABLE IF EXISTS infra_codegen_column; +DROP TABLE IF EXISTS infra_codegen_column +GO CREATE TABLE infra_codegen_column ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -714,7 +717,8 @@ GO -- ---------------------------- -- Table structure for infra_codegen_table -- ---------------------------- -DROP TABLE IF EXISTS infra_codegen_table; +DROP TABLE IF EXISTS infra_codegen_table +GO CREATE TABLE infra_codegen_table ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -921,7 +925,8 @@ GO -- ---------------------------- -- Table structure for infra_config -- ---------------------------- -DROP TABLE IF EXISTS infra_config; +DROP TABLE IF EXISTS infra_config +GO CREATE TABLE infra_config ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1068,7 +1073,8 @@ GO -- ---------------------------- -- Table structure for infra_data_source_config -- ---------------------------- -DROP TABLE IF EXISTS infra_data_source_config; +DROP TABLE IF EXISTS infra_data_source_config +GO CREATE TABLE infra_data_source_config ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1163,7 +1169,8 @@ GO -- ---------------------------- -- Table structure for infra_file -- ---------------------------- -DROP TABLE IF EXISTS infra_file; +DROP TABLE IF EXISTS infra_file +GO CREATE TABLE infra_file ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1274,7 +1281,8 @@ GO -- ---------------------------- -- Table structure for infra_file_config -- ---------------------------- -DROP TABLE IF EXISTS infra_file_config; +DROP TABLE IF EXISTS infra_file_config +GO CREATE TABLE infra_file_config ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1395,7 +1403,8 @@ GO -- ---------------------------- -- Table structure for infra_file_content -- ---------------------------- -DROP TABLE IF EXISTS infra_file_content; +DROP TABLE IF EXISTS infra_file_content +GO CREATE TABLE infra_file_content ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1482,7 +1491,8 @@ GO -- ---------------------------- -- Table structure for infra_job -- ---------------------------- -DROP TABLE IF EXISTS infra_job; +DROP TABLE IF EXISTS infra_job +GO CREATE TABLE infra_job ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1645,7 +1655,8 @@ GO -- ---------------------------- -- Table structure for infra_job_log -- ---------------------------- -DROP TABLE IF EXISTS infra_job_log; +DROP TABLE IF EXISTS infra_job_log +GO CREATE TABLE infra_job_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1780,7 +1791,8 @@ GO -- ---------------------------- -- Table structure for system_dept -- ---------------------------- -DROP TABLE IF EXISTS system_dept; +DROP TABLE IF EXISTS system_dept +GO CREATE TABLE system_dept ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -1949,7 +1961,8 @@ GO -- ---------------------------- -- Table structure for system_dict_data -- ---------------------------- -DROP TABLE IF EXISTS system_dict_data; +DROP TABLE IF EXISTS system_dict_data +GO CREATE TABLE system_dict_data ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -2820,7 +2833,8 @@ GO -- ---------------------------- -- Table structure for system_dict_type -- ---------------------------- -DROP TABLE IF EXISTS system_dict_type; +DROP TABLE IF EXISTS system_dict_type +GO CREATE TABLE system_dict_type ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -3103,7 +3117,8 @@ GO -- ---------------------------- -- Table structure for system_login_log -- ---------------------------- -DROP TABLE IF EXISTS system_login_log; +DROP TABLE IF EXISTS system_login_log +GO CREATE TABLE system_login_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -3238,7 +3253,8 @@ GO -- ---------------------------- -- Table structure for system_mail_account -- ---------------------------- -DROP TABLE IF EXISTS system_mail_account; +DROP TABLE IF EXISTS system_mail_account +GO CREATE TABLE system_mail_account ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -3379,7 +3395,8 @@ GO -- ---------------------------- -- Table structure for system_mail_log -- ---------------------------- -DROP TABLE IF EXISTS system_mail_log; +DROP TABLE IF EXISTS system_mail_log +GO CREATE TABLE system_mail_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -3562,7 +3579,8 @@ GO -- ---------------------------- -- Table structure for system_mail_template -- ---------------------------- -DROP TABLE IF EXISTS system_mail_template; +DROP TABLE IF EXISTS system_mail_template +GO CREATE TABLE system_mail_template ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -3717,7 +3735,8 @@ GO -- ---------------------------- -- Table structure for system_menu -- ---------------------------- -DROP TABLE IF EXISTS system_menu; +DROP TABLE IF EXISTS system_menu +GO CREATE TABLE system_menu ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -5478,7 +5497,8 @@ GO -- ---------------------------- -- Table structure for system_notice -- ---------------------------- -DROP TABLE IF EXISTS system_notice; +DROP TABLE IF EXISTS system_notice +GO CREATE TABLE system_notice ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -5601,7 +5621,8 @@ GO -- ---------------------------- -- Table structure for system_notify_message -- ---------------------------- -DROP TABLE IF EXISTS system_notify_message; +DROP TABLE IF EXISTS system_notify_message +GO CREATE TABLE system_notify_message ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -5784,7 +5805,8 @@ GO -- ---------------------------- -- Table structure for system_notify_template -- ---------------------------- -DROP TABLE IF EXISTS system_notify_template; +DROP TABLE IF EXISTS system_notify_template +GO CREATE TABLE system_notify_template ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -5911,7 +5933,8 @@ GO -- ---------------------------- -- Table structure for system_oauth2_access_token -- ---------------------------- -DROP TABLE IF EXISTS system_oauth2_access_token; +DROP TABLE IF EXISTS system_oauth2_access_token +GO CREATE TABLE system_oauth2_access_token ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6051,7 +6074,8 @@ GO -- ---------------------------- -- Table structure for system_oauth2_approve -- ---------------------------- -DROP TABLE IF EXISTS system_oauth2_approve; +DROP TABLE IF EXISTS system_oauth2_approve +GO CREATE TABLE system_oauth2_approve ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6170,7 +6194,8 @@ GO -- ---------------------------- -- Table structure for system_oauth2_client -- ---------------------------- -DROP TABLE IF EXISTS system_oauth2_client; +DROP TABLE IF EXISTS system_oauth2_client +GO CREATE TABLE system_oauth2_client ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6375,7 +6400,8 @@ GO -- ---------------------------- -- Table structure for system_oauth2_code -- ---------------------------- -DROP TABLE IF EXISTS system_oauth2_code; +DROP TABLE IF EXISTS system_oauth2_code +GO CREATE TABLE system_oauth2_code ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6510,7 +6536,8 @@ GO -- ---------------------------- -- Table structure for system_oauth2_refresh_token -- ---------------------------- -DROP TABLE IF EXISTS system_oauth2_refresh_token; +DROP TABLE IF EXISTS system_oauth2_refresh_token +GO CREATE TABLE system_oauth2_refresh_token ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6629,7 +6656,8 @@ GO -- ---------------------------- -- Table structure for system_operate_log -- ---------------------------- -DROP TABLE IF EXISTS system_operate_log; +DROP TABLE IF EXISTS system_operate_log +GO CREATE TABLE system_operate_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6796,7 +6824,8 @@ GO -- ---------------------------- -- Table structure for system_post -- ---------------------------- -DROP TABLE IF EXISTS system_post; +DROP TABLE IF EXISTS system_post +GO CREATE TABLE system_post ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -6929,7 +6958,8 @@ GO -- ---------------------------- -- Table structure for system_role -- ---------------------------- -DROP TABLE IF EXISTS system_role; +DROP TABLE IF EXISTS system_role +GO CREATE TABLE system_role ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -7090,7 +7120,8 @@ GO -- ---------------------------- -- Table structure for system_role_menu -- ---------------------------- -DROP TABLE IF EXISTS system_role_menu; +DROP TABLE IF EXISTS system_role_menu +GO CREATE TABLE system_role_menu ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -8837,7 +8868,8 @@ GO -- ---------------------------- -- Table structure for system_sms_channel -- ---------------------------- -DROP TABLE IF EXISTS system_sms_channel; +DROP TABLE IF EXISTS system_sms_channel +GO CREATE TABLE system_sms_channel ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -8976,7 +9008,8 @@ GO -- ---------------------------- -- Table structure for system_sms_code -- ---------------------------- -DROP TABLE IF EXISTS system_sms_code; +DROP TABLE IF EXISTS system_sms_code +GO CREATE TABLE system_sms_code ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9114,7 +9147,8 @@ GO -- ---------------------------- -- Table structure for system_sms_log -- ---------------------------- -DROP TABLE IF EXISTS system_sms_log; +DROP TABLE IF EXISTS system_sms_log +GO CREATE TABLE system_sms_log ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9345,7 +9379,8 @@ GO -- ---------------------------- -- Table structure for system_sms_template -- ---------------------------- -DROP TABLE IF EXISTS system_sms_template; +DROP TABLE IF EXISTS system_sms_template +GO CREATE TABLE system_sms_template ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9526,7 +9561,8 @@ GO -- ---------------------------- -- Table structure for system_social_client -- ---------------------------- -DROP TABLE IF EXISTS system_social_client; +DROP TABLE IF EXISTS system_social_client +GO CREATE TABLE system_social_client ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9675,7 +9711,8 @@ GO -- ---------------------------- -- Table structure for system_social_user -- ---------------------------- -DROP TABLE IF EXISTS system_social_user; +DROP TABLE IF EXISTS system_social_user +GO CREATE TABLE system_social_user ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9818,7 +9855,8 @@ GO -- ---------------------------- -- Table structure for system_social_user_bind -- ---------------------------- -DROP TABLE IF EXISTS system_social_user_bind; +DROP TABLE IF EXISTS system_social_user_bind +GO CREATE TABLE system_social_user_bind ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -9921,7 +9959,8 @@ GO -- ---------------------------- -- Table structure for system_tenant -- ---------------------------- -DROP TABLE IF EXISTS system_tenant; +DROP TABLE IF EXISTS system_tenant +GO CREATE TABLE system_tenant ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10076,7 +10115,8 @@ GO -- ---------------------------- -- Table structure for system_tenant_package -- ---------------------------- -DROP TABLE IF EXISTS system_tenant_package; +DROP TABLE IF EXISTS system_tenant_package +GO CREATE TABLE system_tenant_package ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10187,7 +10227,8 @@ GO -- ---------------------------- -- Table structure for system_user_post -- ---------------------------- -DROP TABLE IF EXISTS system_user_post; +DROP TABLE IF EXISTS system_user_post +GO CREATE TABLE system_user_post ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10304,7 +10345,8 @@ GO -- ---------------------------- -- Table structure for system_user_role -- ---------------------------- -DROP TABLE IF EXISTS system_user_role; +DROP TABLE IF EXISTS system_user_role +GO CREATE TABLE system_user_role ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10435,7 +10477,8 @@ GO -- ---------------------------- -- Table structure for system_users -- ---------------------------- -DROP TABLE IF EXISTS system_users; +DROP TABLE IF EXISTS system_users +GO CREATE TABLE system_users ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10656,7 +10699,8 @@ GO -- ---------------------------- -- Table structure for yudao_demo01_contact -- ---------------------------- -DROP TABLE IF EXISTS yudao_demo01_contact; +DROP TABLE IF EXISTS yudao_demo01_contact +GO CREATE TABLE yudao_demo01_contact ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10783,7 +10827,8 @@ GO -- ---------------------------- -- Table structure for yudao_demo02_category -- ---------------------------- -DROP TABLE IF EXISTS yudao_demo02_category; +DROP TABLE IF EXISTS yudao_demo02_category +GO CREATE TABLE yudao_demo02_category ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -10896,7 +10941,8 @@ GO -- ---------------------------- -- Table structure for yudao_demo03_course -- ---------------------------- -DROP TABLE IF EXISTS yudao_demo03_course; +DROP TABLE IF EXISTS yudao_demo03_course +GO CREATE TABLE yudao_demo03_course ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -11025,7 +11071,8 @@ GO -- ---------------------------- -- Table structure for yudao_demo03_grade -- ---------------------------- -DROP TABLE IF EXISTS yudao_demo03_grade; +DROP TABLE IF EXISTS yudao_demo03_grade +GO CREATE TABLE yudao_demo03_grade ( id bigint NOT NULL PRIMARY KEY IDENTITY, @@ -11140,7 +11187,8 @@ GO -- ---------------------------- -- Table structure for yudao_demo03_student -- ---------------------------- -DROP TABLE IF EXISTS yudao_demo03_student; +DROP TABLE IF EXISTS yudao_demo03_student +GO CREATE TABLE yudao_demo03_student ( id bigint NOT NULL PRIMARY KEY IDENTITY, diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index 1ca5757699..100e656065 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -562,7 +562,8 @@ class SQLServerConvertor(Convertor): script = f"""-- ---------------------------- -- Table structure for {table_name} -- ---------------------------- -DROP TABLE IF EXISTS {table_name}; +DROP TABLE IF EXISTS {table_name} +GO CREATE TABLE {table_name} ( {filed_def_list} ) @@ -642,7 +643,6 @@ GO def gen_dual(self) -> str: return """DROP TABLE IF EXISTS dual GO - CREATE TABLE dual ( id int -- Gitee From b9deba889c64e5e24fa068c8ab70e44beaaa8e7b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 10 May 2024 22:48:49 +0800 Subject: [PATCH 0514/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9AAPI=20=E6=A8=A1=E5=9E=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 16 +-- .../admin/model/AiApiKeyController.java | 10 +- .../admin/model/AiChatModelController.java | 91 +++++++------ .../admin/model/AiChatRoleController.java | 23 ++-- .../vo/chatModel/AiChatModelPageReqVO.java | 22 +++ .../model/vo/chatModel/AiChatModelRespVO.java | 45 +++++++ .../vo/chatModel/AiChatModelSaveReqVO.java | 50 +++++++ .../model/vo/model/AiChatModalRespVO.java | 50 ------- .../vo/model/AiChatModalUpdateReqVO.java | 63 --------- .../model/vo/model/AiChatModelAddReqVO.java | 53 -------- .../model/vo/model/AiChatModelListReqVO.java | 22 --- .../model/vo/model/AiChatModelListRespVO.java | 50 ------- .../vo/model/AiChatModelUpdateReqVO.java | 57 -------- .../ai/convert/AiChatMessageConvert.java | 8 -- .../module/ai/convert/AiChatModelConvert.java | 57 -------- .../ai/dal/mysql/AiChatModelMapper.java | 15 ++- .../module/ai/service/AiChatModelService.java | 67 --------- .../module/ai/service/AiChatRoleService.java | 1 + .../service/impl/AiChatModalServiceImpl.java | 127 ------------------ .../service/impl/AiChatRoleServiceImpl.java | 10 +- .../ai/service/impl/AiChatServiceImpl.java | 26 ++-- .../ai/service/model/AiApiKeyService.java | 22 ++- .../ai/service/model/AiApiKeyServiceImpl.java | 18 ++- .../AiChatConversationServiceImpl.java | 8 +- .../ai/service/model/AiChatModelService.java | 63 +++++++++ .../service/model/AiChatModelServiceImpl.java | 92 +++++++++++++ .../yudao/framework/ai/AiPlatformEnum.java | 2 +- 27 files changed, 406 insertions(+), 662 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelPageReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelSaveReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{impl => model}/AiChatConversationServiceImpl.java (93%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 302c13a845..a3c343e121 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -11,10 +11,15 @@ public interface ErrorCodeConstants { // ========== API 密钥 1-040-000-000 ========== ErrorCode API_KEY_NOT_EXISTS = new ErrorCode(1_040_000_000, "AI API 密钥不存在"); + ErrorCode API_KEY_DISABLE = new ErrorCode(1_040_000_001, "AI API 密钥已禁用!"); - // chat + // ========== API 聊天模型 1-040-001-000 ========== - ErrorCode AI_MODULE_NOT_SUPPORTED = new ErrorCode(1_022_000_000, "AI 模型暂不支持!"); + ErrorCode CHAT_MODAL_NOT_EXIST = new ErrorCode(1_040_001_000, "AI 模型不存在!"); + ErrorCode CHAT_MODAL_DISABLE = new ErrorCode(1_040_001_001, "AI 模型({})已禁用!"); + + // ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); +// ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); // conversation @@ -31,12 +36,5 @@ public interface ErrorCodeConstants { ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "AI 角色不存在!"); ErrorCode AI_CHAT_ROLE_NOT_PUBLIC = new ErrorCode(1_022_000_060, "AI 角色未公开!"); - // modal - - ErrorCode AI_MODAL_NOT_EXIST = new ErrorCode(1_022_000_080, "AI 模型不存在!"); - ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); - ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); - ErrorCode AI_MODAL_DISABLE_NOT_USED = new ErrorCode(1_022_000_084, "AI 模型禁用不能使用!"); - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java index 7add01901a..78b5886471 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java @@ -29,14 +29,14 @@ public class AiApiKeyController { private AiApiKeyService apiKeyService; @PostMapping("/create") - @Operation(summary = "创建AI API 密钥") + @Operation(summary = "创建 API 密钥") @PreAuthorize("@ss.hasPermission('ai:api-key:create')") public CommonResult createApiKey(@Valid @RequestBody AiApiKeySaveReqVO createReqVO) { return success(apiKeyService.createApiKey(createReqVO)); } @PutMapping("/update") - @Operation(summary = "更新AI API 密钥") + @Operation(summary = "更新 API 密钥") @PreAuthorize("@ss.hasPermission('ai:api-key:update')") public CommonResult updateApiKey(@Valid @RequestBody AiApiKeySaveReqVO updateReqVO) { apiKeyService.updateApiKey(updateReqVO); @@ -44,7 +44,7 @@ public class AiApiKeyController { } @DeleteMapping("/delete") - @Operation(summary = "删除AI API 密钥") + @Operation(summary = "删除 API 密钥") @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('ai:api-key:delete')") public CommonResult deleteApiKey(@RequestParam("id") Long id) { @@ -53,7 +53,7 @@ public class AiApiKeyController { } @GetMapping("/get") - @Operation(summary = "获得AI API 密钥") + @Operation(summary = "获得 API 密钥") @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('ai:api-key:query')") public CommonResult getApiKey(@RequestParam("id") Long id) { @@ -62,7 +62,7 @@ public class AiApiKeyController { } @GetMapping("/page") - @Operation(summary = "获得AI API 密钥分页") + @Operation(summary = "获得 API 密钥分页") @PreAuthorize("@ss.hasPermission('ai:api-key:query')") public CommonResult> getApiKeyPage(@Valid AiApiKeyPageReqVO pageReqVO) { PageResult pageResult = apiKeyService.getApiKeyPage(pageReqVO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 010d143ccc..7d73e222a5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -2,60 +2,71 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelUpdateReqVO; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -// TODO @fan:调整下接口;相关 vo 的命名等等;modal => model +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -/** - * ai 模型 - * - * @author fansili - * @time 2024/4/24 19:42 - * @since 1.0 - */ -@Tag(name = "A6-AI模型") +@Tag(name = "管理后台 - AI 聊天模型") @RestController -@RequestMapping("/ai/chat/model") -@Slf4j -@AllArgsConstructor +@RequestMapping("/ai/chat-model") +@Validated public class AiChatModelController { - private final AiChatModelService aiChatModelService; + @Resource + private AiChatModelService chatModelService; - @Operation(summary = "ai模型 - 模型列表") - @GetMapping("/list") - public PageResult list(@ModelAttribute AiChatModelListReqVO req) { - return aiChatModelService.list(req); + @PostMapping("/create") + @Operation(summary = "创建聊天模型") + @PreAuthorize("@ss.hasPermission('ai:chat-model:create')") + public CommonResult createChatModel(@Valid @RequestBody AiChatModelSaveReqVO createReqVO) { + return success(chatModelService.createChatModel(createReqVO)); } - @Operation(summary = "ai模型 - 添加") - @PutMapping("/add") - public CommonResult add(@RequestBody @Validated AiChatModelAddReqVO req) { - aiChatModelService.add(req); - return CommonResult.success(null); + @PutMapping("/update") + @Operation(summary = "更新聊天模型") + @PreAuthorize("@ss.hasPermission('ai:chat-model:update')") + public CommonResult updateChatModel(@Valid @RequestBody AiChatModelSaveReqVO updateReqVO) { + chatModelService.updateChatModel(updateReqVO); + return success(true); } - @Operation(summary = "ai模型 - 修改") - @PostMapping("/update") - public CommonResult update(@RequestBody @Validated AiChatModelUpdateReqVO req) { - aiChatModelService.update(req); - return CommonResult.success(null); + @DeleteMapping("/delete") + @Operation(summary = "删除聊天模型") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('ai:chat-model:delete')") + public CommonResult deleteChatModel(@RequestParam("id") Long id) { + chatModelService.deleteChatModel(id); + return success(true); } - @Operation(summary = "ai模型 - 删除") - @DeleteMapping("/delete") - public CommonResult delete(@RequestParam("id") Long id) { - aiChatModelService.delete(id); - return CommonResult.success(null); + @GetMapping("/get") + @Operation(summary = "获得聊天模型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('ai:chat-model:query')") + public CommonResult getChatModel(@RequestParam("id") Long id) { + AiChatModelDO chatModel = chatModelService.getChatModel(id); + return success(BeanUtils.toBean(chatModel, AiChatModelRespVO.class)); } -} + + @GetMapping("/page") + @Operation(summary = "获得聊天模型分页") + @PreAuthorize("@ss.hasPermission('ai:chat-model:query')") + public CommonResult> getChatModelPage(@Valid AiChatModelPageReqVO pageReqVO) { + PageResult pageResult = chatModelService.getChatModelPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AiChatModelRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index 1aab426002..1de4b39910 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -6,26 +6,20 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -// TODO @fan:调整下接口;相关 vo 的命名等等;modal => model -/** - * ai chat 角色 - * - * @fansili - * @since v1.0 - */ -@Tag(name = "A4-chat角色") +@Tag(name = "管理后台 - AI 聊天角色") @RestController -@RequestMapping("/ai/chat/role") -@Slf4j -@AllArgsConstructor +@RequestMapping("/ai/chat-role") +@Validated public class AiChatRoleController { - private final AiChatRoleService chatRoleService; + @Resource + private AiChatRoleService chatRoleService; @Operation(summary = "chat角色 - 角色列表") @GetMapping("/list") @@ -60,4 +54,9 @@ public class AiChatRoleController { chatRoleService.delete(id); return CommonResult.success(null); } + + // ========== 角色管理 ========== + + + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelPageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelPageReqVO.java new file mode 100644 index 0000000000..0971522eb1 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelPageReqVO.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +@Schema(description = "管理后台 - API 聊天模型分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AiChatModelPageReqVO extends PageParam { + + @Schema(description = "模型名字", example = "张三") + private String name; + + @Schema(description = "模型标识", example = "gpt-3.5-turbo-0125") + private String model; + + @Schema(description = "模型平台", example = "OpenAI") + private String platform; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelRespVO.java new file mode 100644 index 0000000000..681dabe687 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelRespVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - AI 聊天模型 Response VO") +@Data +public class AiChatModelRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2630") + private Long id; + + @Schema(description = "API 秘钥编号", example = "22042") + private Long keyId; + + @Schema(description = "模型名字", example = "张三") + private String name; + + @Schema(description = "模型标识", example = "gpt-3.5-turbo-0125") + private String model; + + @Schema(description = "模型平台", example = "OpenAI") + private String platform; + + @Schema(description = "排序", example = "1") + private Integer sort; + + @Schema(description = "状态", example = "2") + private Integer status; + + @Schema(description = "温度参数", example = "1") + private Double temperature; + + @Schema(description = "单条回复的最大 Token 数量", example = "4096") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量", example = "8192") + private Integer maxContexts; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelSaveReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelSaveReqVO.java new file mode 100644 index 0000000000..4fad5a1fc1 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatModel/AiChatModelSaveReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - API 聊天模型新增/修改 Request VO") +@Data +public class AiChatModelSaveReqVO { + + @Schema(description = "编号", example = "2630") + private Long id; + + @Schema(description = "API 秘钥编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22042") + @NotNull(message = "API 秘钥编号不能为空") + private Long keyId; + + @Schema(description = "模型名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "模型名字不能为空") + private String name; + + @Schema(description = "模型标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "gpt-3.5-turbo-0125") + @NotEmpty(message = "模型标识不能为空") + private String model; + + @Schema(description = "模型平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") + @NotEmpty(message = "模型平台不能为空") + private String platform; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "排序不能为空") + private Integer sort; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @InEnum(CommonStatusEnum.class) + @NotNull(message = "状态不能为空") + private Integer status; + + @Schema(description = "温度参数", example = "1") + private Double temperature; + + @Schema(description = "单条回复的最大 Token 数量", example = "4096") + private Integer maxTokens; + + @Schema(description = "上下文的最大 Message 数量", example = "8192") + private Integer maxContexts; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java deleted file mode 100644 index 28a439733e..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalRespVO.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * modal list - * - * @author fansili - * @time 2024/4/24 19:56 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalRespVO { - - @Schema(description = "编号") - private Long id; - - @Schema(description = "API 秘钥编号") - private Long keyId; - - @Schema(description = "模型名字") - private String name; - - @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - private String model; - - @Size(max = 32, message = "模型平台最大32个字符") - private String platform; - - @Schema(description = "排序") - private Integer sort; - - @Schema(description = "状态") - private Integer status; - - // ========== 会话配置 ========== - - @Schema(description = "温度参数") - private Integer temperature; - - @Schema(description = "单条回复的最大 Token 数量") - private Integer maxTokens; - - @Schema(description = "上下文的最大 Message 数量") - private Integer maxContexts; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java deleted file mode 100644 index 4e9fd898c8..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModalUpdateReqVO.java +++ /dev/null @@ -1,63 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * ai chat modal - * - * @author fansili - * @time 2024/4/24 19:47 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalUpdateReqVO { - - @Schema(description = "编号") - @Size(max = 32, message = "编号最大32个字符") - @NotNull(message = "编号不能为空") - private Long id; - - @Schema(description = "API 秘钥编号") - @Size(max = 32, message = "API 秘钥编号最大32个字符") - @NotNull(message = "API 秘钥编号不能为空!") - private Long keyId; - - @Schema(description = "模型名字") - @Size(max = 60, message = "模型名字最大60个字符") - @NotNull(message = "模型名字不能为空!") - private String name; - - @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - @Size(max = 32, message = "模型类型最大32个字符") - @NotNull(message = "model模型不能为空!") - private String model; - - @Size(max = 32, message = "模型平台最大32个字符") - @Schema(description = "模型平台 参考 AiPlatformEnum") - @NotNull(message = "平台不能为空!") - private String platform; - - @Schema(description = "排序") - @NotNull(message = "sort排序不能为空!") - private Integer sort; - - @Schema(description = "状态") - @NotNull(message = "状态不能为空!") - private Integer status; - - // ========== 会话配置 ========== - - @Schema(description = "温度参数") - private Integer temperature; - - @Schema(description = "单条回复的最大 Token 数量") - private Integer maxTokens; - - @Schema(description = "上下文的最大 Message 数量") - private Integer maxContexts; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java deleted file mode 100644 index 569760fab2..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelAddReqVO.java +++ /dev/null @@ -1,53 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * ai chat modal - * - * @author fansili - * @time 2024/4/24 19:47 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModelAddReqVO { - - @Schema(description = "API 秘钥编号") - @NotNull(message = "API 秘钥编号不能为空!") - private Long keyId; - - @Schema(description = "模型名字") - @Size(max = 60, message = "模型名字最大60个字符") - @NotNull(message = "模型名字不能为空!") - private String name; - - @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - @Size(max = 32, message = "模型类型最大32个字符") - @NotNull(message = "model模型不能为空!") - private String model; - - @Size(max = 32, message = "模型平台最大32个字符") - @Schema(description = "模型平台 参考 AiPlatformEnum") - @NotNull(message = "平台不能为空!") - private String platform; - - @Schema(description = "排序") - @NotNull(message = "sort排序不能为空!") - private Integer sort; - - // ========== 会话配置 ========== - - @Schema(description = "温度参数") - private Integer temperature; - - @Schema(description = "单条回复的最大 Token 数量") - private Integer maxTokens; - - @Schema(description = "上下文的最大 Message 数量") - private Integer maxContexts; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java deleted file mode 100644 index 7e3cfff138..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListReqVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * modal list - * - * @author fansili - * @time 2024/4/24 19:56 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModelListReqVO extends PageParam { - - @Schema(description = "名字搜搜") - private String search; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java deleted file mode 100644 index 916106a23d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelListRespVO.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * modal list - * - * @author fansili - * @time 2024/4/24 19:56 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModelListRespVO { - - @Schema(description = "编号") - private Long id; - - @Schema(description = "API 秘钥编号") - private Long keyId; - - @Schema(description = "模型名称") - private String name; - - @Schema(description = "模型标志") - private String model; - - @Schema(description = "平台") - private String platform; - - @Schema(description = "排序值") - private Integer sort; - - @Schema(description = "状态") - private Integer status; - - // ========== 会话配置 ========== - - @Schema(description = "温度参数") - private Double temperature; - - @Schema(description = "单条回复的最大 Token 数量") - private Integer maxTokens; - - @Schema(description = "上下文的最大 Message 数量") - private Integer maxContexts; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java deleted file mode 100644 index 577e998e9d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/model/AiChatModelUpdateReqVO.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * ai chat modal - * - * @author fansili - * @time 2024/4/24 19:47 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModelUpdateReqVO { - - @Schema(description = "编号") - @NotNull(message = "编号不能为空") - private Long id; - - @Schema(description = "API 秘钥编号") - @NotNull(message = "API 秘钥编号不能为空!") - private Long keyId; - - @Schema(description = "模型名字") - @Size(max = 60, message = "模型名字最大60个字符") - @NotNull(message = "模型名字不能为空!") - private String name; - - @Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)") - @Size(max = 32, message = "模型类型最大32个字符") - @NotNull(message = "model模型不能为空!") - private String model; - - @Size(max = 32, message = "模型平台最大32个字符") - @Schema(description = "模型平台 参考 AiPlatformEnum") - @NotNull(message = "平台不能为空!") - private String platform; - - @Schema(description = "排序") - @NotNull(message = "sort排序不能为空!") - private Integer sort; - - // ========== 会话配置 ========== - - @Schema(description = "温度参数") - private Integer temperature; - - @Schema(description = "单条回复的最大 Token 数量") - private Integer maxTokens; - - @Schema(description = "上下文的最大 Message 数量") - private Integer maxContexts; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index d067a26f31..a5019b2cd8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -19,14 +19,6 @@ public interface AiChatMessageConvert { AiChatMessageConvert INSTANCE = Mappers.getMapper(AiChatMessageConvert.class); - /** - * 转换 ChatMessageListRes - * - * @param list - * @return - */ - List convert(List list); - /** * 转换 AiChatMessageRespVO * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java deleted file mode 100644 index d6d57b5ef6..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatModelConvert.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.iocoder.yudao.module.ai.convert; - -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModelUpdateReqVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 聊天 modal - * - * @author fansili - * @time 2024/4/18 16:39 - * @since 1.0 - */ -@Mapper -public interface AiChatModelConvert { - - AiChatModelConvert INSTANCE = Mappers.getMapper(AiChatModelConvert.class); - - /** - * 转换 - AiChatModalListRes - * - * @param list - * @return - */ - List convertAiChatModalListRes(List list); - - /** - * 转换 - AiChatModalDO - * - * @param req - * @return - */ - AiChatModelDO convertAiChatModalDO(AiChatModelAddReqVO req); - - /** - * 转换 - AiChatModalDO - * - * @param req - * @return - */ - AiChatModelDO convertAiChatModalDO(AiChatModelUpdateReqVO req); - - /** - * 转换 - AiChatModalRes - * - * @param aiChatModalDO - * @return - */ - AiChatModalRespVO convertAiChatModalRes(AiChatModelDO aiChatModalDO); - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index 46d66ff5f5..c2d75a2182 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -5,21 +5,19 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; /** - * chat modal + * API 聊天模型 Mapper * * @author fansili - * @time 2024/4/24 19:41 - * @since 1.0 */ -@Repository @Mapper public interface AiChatModelMapper extends BaseMapperX { + // TODO 芋艿:要搞一下 /** * 查询 - 第一个modal * @@ -36,5 +34,12 @@ public interface AiChatModelMapper extends BaseMapperX { return pageResult.getList().get(0); } + default PageResult selectPage(AiChatModelPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(AiChatModelDO::getName, reqVO.getName()) + .eqIfPresent(AiChatModelDO::getModel, reqVO.getModel()) + .eqIfPresent(AiChatModelDO::getPlatform, reqVO.getPlatform()) + .orderByDesc(AiChatModelDO::getId)); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java deleted file mode 100644 index 07a902dd8d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java +++ /dev/null @@ -1,67 +0,0 @@ -package cn.iocoder.yudao.module.ai.service; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; - -/** - * ai modal - * - * @author fansili - * @time 2024/4/24 19:42 - * @since 1.0 - */ -public interface AiChatModelService { - - /** - * ai modal - 列表 - * - * @param req - * @return - */ - PageResult list(AiChatModelListReqVO req); - - /** - * ai modal - 添加 - * - * @param req - */ - void add(AiChatModelAddReqVO req); - - /** - * ai modal - 更新 - * - * @param req - */ - void update(AiChatModelUpdateReqVO req); - - /** - * ai modal - 删除 - * - * @param id - */ - void delete(Long id); - - /** - * 获取 - 获取 modal - * - * @param modalId - * @return - */ - AiChatModalRespVO getChatModalOfValidate(Long modalId); - - /** - * 校验 - 是否存在 - * - * @param id - * @return - */ - AiChatModelDO validateExists(Long id); - - /** - * 校验 - 校验是否可用 - * - * @param chatModal - */ - void validateAvailable(AiChatModalRespVO chatModal); -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java index 96d7221002..c2f56a240f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java @@ -72,4 +72,5 @@ public interface AiChatRoleService { * @param aiChatRoleDO */ void validateIsPublic(AiChatRoleDO aiChatRoleDO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java deleted file mode 100644 index 0aec7a94c8..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.impl; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.extra.validation.ValidationUtil; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; -import cn.iocoder.yudao.module.ai.convert.AiChatModelConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; -import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; -import jakarta.validation.ConstraintViolation; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.Set; - -/** - * ai 模型 - * - * @author fansili - * @time 2024/4/24 19:42 - * @since 1.0 - */ -@AllArgsConstructor -@Service -@Slf4j -public class AiChatModalServiceImpl implements AiChatModelService { - - private final AiChatModelMapper aiChatModelMapper; - - @Override - public PageResult list(AiChatModelListReqVO req) { - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); - // 查询的都是未禁用的模型 - queryWrapperX.eq(AiChatModelDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); - // search - if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.like(AiChatModelDO::getName, req.getSearch().trim()); - } - // 默认排序 - queryWrapperX.orderByAsc(AiChatModelDO::getSort); - // 查询 - PageResult aiChatModalDOPageResult = aiChatModelMapper.selectPage(req, queryWrapperX); - // 转换 res - List resList = AiChatModelConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); - return new PageResult<>(resList, aiChatModalDOPageResult.getTotal()); - } - - @Override - public void add(AiChatModelAddReqVO req) { - // 校验 platform、type - validatePlatform(req.getPlatform()); - // 转换 do - AiChatModelDO insertChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); - // 设置默认属性 - insertChatModalDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - // 保存数据库 - aiChatModelMapper.insert(insertChatModalDO); - } - - @Override - public void update(AiChatModelUpdateReqVO req) { - // 校验 platform - validatePlatform(req.getPlatform()); - // 校验模型是否存在 - validateExists(req.getId()); - // 转换 updateChatModalDO - AiChatModelDO updateChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); - updateChatModalDO.setId(req.getId()); - // 更新数据库 - aiChatModelMapper.updateById(updateChatModalDO); - } - - @Override - public void delete(Long id) { - // 检查 modal 是否存在 - validateExists(id); - // 删除 delete - aiChatModelMapper.deleteById(id); - } - - @Override - public AiChatModalRespVO getChatModalOfValidate(Long modalId) { - // 检查 modal 是否存在 - AiChatModelDO aiChatModalDO = validateExists(modalId); - return AiChatModelConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); - } - - @Override - public void validateAvailable(AiChatModalRespVO chatModal) { - // 对话模型是否可用 - if (!CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); - } - } - - public AiChatModelDO validateExists(Long id) { - AiChatModelDO aiChatModalDO = aiChatModelMapper.selectById(id); - if (aiChatModalDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); - } - return aiChatModalDO; - } - - private void validatePlatform(String platform) { - try { - AiPlatformEnum.valueOfPlatform(platform); - } catch (IllegalArgumentException e) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_PLATFORM_PARAMS_INCORRECT, e.getMessage()); - } - } - - private void validateModalConfig(AiChatModalConfigVO aiChatModalConfigVO) { - Set> validate = ValidationUtil.validate(aiChatModalConfigVO); - for (ConstraintViolation constraintViolation : validate) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, constraintViolation.getMessage()); - } - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java index cc432fe418..4264814950 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java @@ -12,7 +12,7 @@ import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import cn.iocoder.yudao.module.ai.enums.AiChatRoleCategoryEnum; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; +import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -57,8 +57,8 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { public void add(AiChatRoleAddReqVO req) { // 转换enum,并校验enum AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); - // 校验模型是否存在 - aiChatModalService.validateExists(req.getModelId()); + // 校验模型是否存在 TODO +// aiChatModalService.validateExists(req.getModelId()); // 转换do AiChatRoleDO insertAiChatRoleDO = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); insertAiChatRoleDO.setUserId(SecurityFrameworkUtils.getLoginUserId()); @@ -73,8 +73,8 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { validateExists(req.getId()); // 转换enum,并校验enum AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); - // 校验模型是否存在 - aiChatModalService.validateExists(req.getModelId()); + // 校验模型是否存在 TODO +// aiChatModalService.validateExists(req.getModelId()); // 转换do AiChatRoleDO updateChatRole = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); updateChatRole.setId(req.getId()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 90649f417d..be8f81d724 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -12,14 +12,14 @@ import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; +import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; import lombok.AllArgsConstructor; @@ -57,9 +57,7 @@ public class AiChatServiceImpl implements AiChatService { // 查询对话 AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); // 获取对话模型 - AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); - // 对话模型是否可用 - aiChatModalService.validateAvailable(chatModal); + AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 AiChatRoleDO aiChatRoleDO = null; if (conversation.getRoleId() != null) { @@ -68,10 +66,10 @@ public class AiChatServiceImpl implements AiChatService { // 校验角色是否公开 aiChatRoleService.validateIsPublic(aiChatRoleDO); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getPlatform()); + AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), req.getContent(), + chatModel.getModel(), chatModel.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); String content = null; int tokens = 0; @@ -93,7 +91,7 @@ public class AiChatServiceImpl implements AiChatService { } finally { // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), content, + chatModel.getModel(), chatModel.getId(), content, tokens, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } return new AiChatMessageRespVO().setContent(content); @@ -128,9 +126,7 @@ public class AiChatServiceImpl implements AiChatService { // 查询对话 AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); // 获取对话模型 - AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(conversation.getModelId()); - // 对话模型是否可用 - aiChatModalService.validateAvailable(chatModal); + AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 AiChatRoleDO aiChatRoleDO = null; if (conversation.getRoleId() != null) { @@ -145,10 +141,10 @@ public class AiChatServiceImpl implements AiChatService { // req.setTemperature(req.getTemperature()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), req.getContent(), + chatModel.getModel(), chatModel.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.valueOfPlatform(chatModal.getPlatform()); + AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); Flux streamResponse = streamingChatClient.stream(prompt); // 转换 flex AiChatMessageRespVO @@ -167,7 +163,7 @@ public class AiChatServiceImpl implements AiChatService { log.info("发送完成!"); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), contentBuffer.toString(), + chatModel.getModel(), chatModel.getId(), contentBuffer.toString(), tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } }).doOnError(new Consumer() { @@ -176,7 +172,7 @@ public class AiChatServiceImpl implements AiChatService { log.error("发送错误 {}!", throwable.getMessage()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModal.getModel(), chatModal.getId(), throwable.getMessage(), + chatModel.getModel(), chatModel.getId(), throwable.getMessage(), tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); } }); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java index 7390bc8e62..4da3c3500e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java @@ -14,7 +14,7 @@ import jakarta.validation.Valid; public interface AiApiKeyService { /** - * 创建AI API 密钥 + * 创建 API 密钥 * * @param createReqVO 创建信息 * @return 编号 @@ -22,32 +22,40 @@ public interface AiApiKeyService { Long createApiKey(@Valid AiApiKeySaveReqVO createReqVO); /** - * 更新AI API 密钥 + * 更新 API 密钥 * * @param updateReqVO 更新信息 */ void updateApiKey(@Valid AiApiKeySaveReqVO updateReqVO); /** - * 删除AI API 密钥 + * 删除 API 密钥 * * @param id 编号 */ void deleteApiKey(Long id); /** - * 获得AI API 密钥 + * 获得 API 密钥 * * @param id 编号 - * @return AI API 密钥 + * @return API 密钥 */ AiApiKeyDO getApiKey(Long id); /** - * 获得AI API 密钥分页 + * 校验 API 密钥 + * + * @param id 比那好 + * @return API 密钥 + */ + AiApiKeyDO validateApiKey(Long id); + + /** + * 获得 API 密钥分页 * * @param pageReqVO 分页查询 - * @return AI API 密钥分页 + * @return API 密钥分页 */ PageResult getApiKeyPage(AiApiKeyPageReqVO pageReqVO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java index 9bafb17d56..06e68748f5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.service.model; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.API_KEY_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; /** * AI API 密钥 Service 实现类 @@ -51,10 +52,12 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { apiKeyMapper.deleteById(id); } - private void validateApiKeyExists(Long id) { - if (apiKeyMapper.selectById(id) == null) { + private AiApiKeyDO validateApiKeyExists(Long id) { + AiApiKeyDO apiKey = apiKeyMapper.selectById(id); + if (apiKey == null) { throw exception(API_KEY_NOT_EXISTS); } + return apiKey; } @Override @@ -62,6 +65,15 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { return apiKeyMapper.selectById(id); } + @Override + public AiApiKeyDO validateApiKey(Long id) { + AiApiKeyDO apiKey = validateApiKeyExists(id); + if (CommonStatusEnum.isDisable(apiKey.getStatus())) { + throw exception(API_KEY_DISABLE); + } + return apiKey; + } + @Override public PageResult getApiKeyPage(AiApiKeyPageReqVO pageReqVO) { return apiKeyMapper.selectPage(pageReqVO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java index dc5205011d..5d25f2a114 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service.impl; +package cn.iocoder.yudao.module.ai.service.model; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; @@ -15,7 +14,6 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -87,9 +85,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 校验对话是否存在 validateExists(updateReqVO.getId()); // 获取模型信息并验证 - AiChatModalRespVO chatModal = aiChatModalService.getChatModalOfValidate(updateReqVO.getModelId()); - // 校验modal是否可用 - aiChatModalService.validateAvailable(chatModal); + aiChatModalService.validateChatModel(updateReqVO.getModelId()); // 更新对话信息 AiChatConversationDO updateAiChatConversationDO = AiChatConversationConvert.INSTANCE.convertAiChatConversationDO(updateReqVO); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java new file mode 100644 index 0000000000..d05941989a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import jakarta.validation.Valid; + +/** + * AI 聊天模型 Service 接口 + * + * @author fansili + * @since 2024/4/24 19:42 + */ +public interface AiChatModelService { + + /** + * 创建聊天模型 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createChatModel(@Valid AiChatModelSaveReqVO createReqVO); + + /** + * 更新聊天模型 + * + * @param updateReqVO 更新信息 + */ + void updateChatModel(@Valid AiChatModelSaveReqVO updateReqVO); + + /** + * 删除聊天模型 + * + * @param id 编号 + */ + void deleteChatModel(Long id); + + /** + * 获得聊天模型 + * + * @param id 编号 + * @return API 聊天模型 + */ + AiChatModelDO getChatModel(Long id); + + /** + * 获得聊天模型分页 + * + * @param pageReqVO 分页查询 + * @return API 聊天模型分页 + */ + PageResult getChatModelPage(AiChatModelPageReqVO pageReqVO); + + /** + * 校验聊天模型 + * + * @param id 编号 + * @return 聊天模型 + */ + AiChatModelDO validateChatModel(Long id); + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java new file mode 100644 index 0000000000..0c0386cccc --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -0,0 +1,92 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; + +/** + * AI 聊天模型 Service 实现类 + * + * @author fansili + */ +@Service +@Validated +public class AiChatModelServiceImpl implements AiChatModelService { + + @Resource + private AiApiKeyService apiKeyService; + + @Resource + private AiChatModelMapper chatModelMapper; + + @Override + public Long createChatModel(AiChatModelSaveReqVO createReqVO) { + // 1. 校验 + AiPlatformEnum.validatePlatform(createReqVO.getPlatform()); + apiKeyService.validateApiKey(createReqVO.getKeyId()); + + // 2. 插入 + AiChatModelDO chatModel = BeanUtils.toBean(createReqVO, AiChatModelDO.class); + chatModelMapper.insert(chatModel); + return chatModel.getId(); + } + + @Override + public void updateChatModel(AiChatModelSaveReqVO updateReqVO) { + // 1. 校验 + validateChatModelExists(updateReqVO.getId()); + AiPlatformEnum.validatePlatform(updateReqVO.getPlatform()); + apiKeyService.validateApiKey(updateReqVO.getKeyId()); + + // 2. 更新 + AiChatModelDO updateObj = BeanUtils.toBean(updateReqVO, AiChatModelDO.class); + chatModelMapper.updateById(updateObj); + } + + @Override + public void deleteChatModel(Long id) { + // 校验存在 + validateChatModelExists(id); + // 删除 + chatModelMapper.deleteById(id); + } + + private AiChatModelDO validateChatModelExists(Long id) { + AiChatModelDO model = chatModelMapper.selectById(id); + if (chatModelMapper.selectById(id) == null) { + throw exception(CHAT_MODAL_NOT_EXIST); + } + return model; + } + + @Override + public AiChatModelDO getChatModel(Long id) { + return chatModelMapper.selectById(id); + } + + @Override + public PageResult getChatModelPage(AiChatModelPageReqVO pageReqVO) { + return chatModelMapper.selectPage(pageReqVO); + } + + @Override + public AiChatModelDO validateChatModel(Long id) { + AiChatModelDO model = validateChatModelExists(id); + if (CommonStatusEnum.isDisable(model.getStatus())) { + throw exception(CHAT_MODAL_DISABLE); + } + return model; + } + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java index 427202391c..c774d25153 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java @@ -41,7 +41,7 @@ public enum AiPlatformEnum { AiPlatformEnum.MIDJOURNEY ); - public static AiPlatformEnum valueOfPlatform(String platform) { + public static AiPlatformEnum validatePlatform(String platform) { for (AiPlatformEnum itemEnum : AiPlatformEnum.values()) { if (itemEnum.getPlatform().equals(platform)) { return itemEnum; -- Gitee From 99ab07de69258ee04dee4e84a888f56151d83476 Mon Sep 17 00:00:00 2001 From: scholar <1145227973@qq.com> Date: Sat, 11 May 2024 11:35:27 +0800 Subject: [PATCH 0515/1557] =?UTF-8?q?=E5=AE=8C=E6=88=90todo=20xml=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceServiceImpl.java | 88 ++++++------------- .../CrmStatisticsPerformanceMapper.xml | 48 +++++----- 2 files changed, 50 insertions(+), 86 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index b8fa94c7aa..07734e01da 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -16,10 +16,12 @@ import org.springframework.validation.annotation.Validated; import jakarta.annotation.Resource; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.*; import java.util.function.Function; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; /** * CRM 员工业绩分析 Service 实现类 @@ -55,85 +57,47 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform } /** - * 获得员工业绩数据,并通过如下方法拿到对应的lastYearCount,lastMonthCount - * 比如说,构造2024 年的CrmStatisticsPerformanceRespVO,获得 2023-01 到 2024-12的月统计数据即可 - * 可以数据 group by 年-月,2023-01 到 2024-12的,然后聚合出 CrmStatisticsPerformanceRespVO + * 获得员工业绩数据 + * + * 1. 获得今年 + 去年的数据 + * 2. 遍历今年的月份,逐个拼接去年的月份数据 + * * @param performanceReqVO 参数 * @param performanceFunction 员工业绩统计方法 * @return 员工业绩数据 */ private List getPerformance(CrmStatisticsPerformanceReqVO performanceReqVO, - Function> performanceFunction) { + Function> performanceFunction) { // 1. 获得用户编号数组 - final List userIds = getUserIds(performanceReqVO); + List userIds = getUserIds(performanceReqVO); if (CollUtil.isEmpty(userIds)) { return Collections.emptyList(); } performanceReqVO.setUserIds(userIds); // 2. 获得业绩数据 + int year = Integer.parseInt(LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"));//获取查询的年份 + LocalDateTime[] timesRange = performanceReqVO.getTimes();//以时间段形式去数据库查询,时间段为所查询年份和前一年,两年时间的数据,便于计算同比数据 + timesRange[0] = performanceReqVO.getTimes()[0].minusYears(1);//查询的起始时间往前推一年 + timesRange[1] = performanceReqVO.getTimes()[1];//查询的结束时间 + performanceReqVO.setTimes(timesRange); List performanceList = performanceFunction.apply(performanceReqVO); + Map performanceMap = convertMap(performanceList, CrmStatisticsPerformanceRespVO::getTime, + CrmStatisticsPerformanceRespVO::getCurrentMonthCount); - // 获取查询的年份 - String currentYear = LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"); - Map currentYearMap = new TreeMap<>();//查询当年的map数据 - Map lastYearMap = new TreeMap<>();//前一年的map数据 - + // 3. 组装数据返回 + List result = new ArrayList<>(); for (int month = 1; month <= 12; month++) { - //根据数据库的月销售数据查询结果,构造查询当年的map数据 - String currentYearKey = String.format("%d%02d", Integer.parseInt(currentYear), month); - buildYearMapData(performanceList, currentYearMap, currentYearKey); - - //根据数据库的月销售数据查询结果,构造查询前一年的map数据 - String lastYearKey = String.format("%d%02d", Integer.parseInt(currentYear)-1, month); - buildYearMapData(performanceList, lastYearMap, lastYearKey); - } - //根据构造好的map数据,计算查询当年的环比和同比数据,并构造好返回的respVOList - List respVOList = new ArrayList<>(); - for (int key : currentYearMap.keySet()) { - BigDecimal lastYearCount = lastYearMap.get(key-100).getCurrentMonthCount(); - BigDecimal lastMonthCount; - if (key % 100 > 1) {//2-12月份的前一个月数据 - lastMonthCount = currentYearMap.get(key-1).getCurrentMonthCount(); - } else {//1月份的前一个月数据 - lastMonthCount = lastYearMap.get(key-89).getCurrentMonthCount(); - } - - currentYearMap.get(key).setLastYearCount(lastYearCount); - currentYearMap.get(key).setLastMonthCount(lastMonthCount); - - respVOList.add(currentYearMap.get(key)); - } - - return respVOList; - } - - /** - * 根据mapKey,添加当年和前一年的月销售记录到对应的map结构中 - * @param performanceList 数据库中查询到的月销售记录 - * @param YearDataMap 将查询到的月销售记录put到对应的map中,如果月销售记录为null,置为0 - * @param mapKey 对应的mapKey - */ - private void buildYearMapData(List performanceList, - Map YearDataMap, - String mapKey) - { - CrmStatisticsPerformanceRespVO currentYearData = performanceList.stream() - .filter(data -> data.getTime().equals(mapKey)) - .findFirst() - .orElse(null); - - if(currentYearData != null) { - YearDataMap.put(Integer.parseInt(mapKey), currentYearData); - } else { - CrmStatisticsPerformanceRespVO defaultVO = new CrmStatisticsPerformanceRespVO(); - defaultVO.setTime(mapKey); - defaultVO.setCurrentMonthCount(BigDecimal.ZERO); - defaultVO.setLastMonthCount(BigDecimal.ZERO); - defaultVO.setLastYearCount(BigDecimal.ZERO); - YearDataMap.put(Integer.parseInt(mapKey), defaultVO); + String currentMonth = String.format("%d%02d", year, month); + String lastMonth = month == 1 ? String.format("%d%02d", year - 1, 12) : String.format("%d%02d", year, month - 1); + String lastYear = String.format("%d%02d", year - 1, month); + result.add(new CrmStatisticsPerformanceRespVO().setTime(currentMonth) + .setCurrentMonthCount(performanceMap.getOrDefault(currentMonth, BigDecimal.ZERO)) + .setLastMonthCount(performanceMap.getOrDefault(lastMonth, BigDecimal.ZERO)) + .setLastYearCount(performanceMap.getOrDefault(lastYear, BigDecimal.ZERO))); } + return result; } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml index ee9ec4e445..f22b4fabef 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml @@ -5,51 +5,51 @@ -- Gitee From 73ef9211f92a105290c92cc49114a620fe553b17 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 11 May 2024 17:55:36 +0800 Subject: [PATCH 0516/1557] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 18 ++++- .../app/social/vo/AppSocialWxQrcodeReqVO.java | 65 +++++++++++++++++++ .../system/api/social/SocialUserApi.java | 20 ++++-- .../api/social/dto/SocialWxQrcodeReqDTO.java | 64 ++++++++++++++++++ .../system/enums/ErrorCodeConstants.java | 6 +- .../system/api/social/SocialUserApiImpl.java | 6 ++ .../service/social/SocialClientService.java | 26 +++++--- .../social/SocialClientServiceImpl.java | 24 +++++-- .../service/social/SocialUserService.java | 9 +++ .../service/social/SocialUserServiceImpl.java | 6 ++ 10 files changed, 219 insertions(+), 25 deletions(-) create mode 100644 yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java create mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index fcdd2132da..304bb16904 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -7,18 +7,21 @@ import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserBindReqVO; import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserRespVO; import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserUnbindReqVO; +import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialWxQrcodeReqVO; import cn.iocoder.yudao.module.system.api.social.SocialUserApi; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; +import java.util.Base64; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -60,4 +63,13 @@ public class AppSocialUserController { return success(BeanUtils.toBean(socialUser, AppSocialUserRespVO.class)); } + @PostMapping("/wxacode") + @Operation(summary = "获得微信小程序码") + @PreAuthenticated + public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { + byte[] wxQrcode = socialUserApi.getWxQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class).setUserId(getLoginUserId()) + .setUserType(UserTypeEnum.MEMBER.getValue()).setSocialType(reqVO.getType())); + return success(Base64.getEncoder().encodeToString(wxQrcode)); + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java new file mode 100644 index 0000000000..fd352fb8e1 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.member.controller.app.social.vo; + +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "用户 APP - 获得获取小程序码 Request VO") +@Data +public class AppSocialWxQrcodeReqVO { + + private static String SCENE = "1011"; // 默认场景值 1011 扫描二维码 + private static String ENV_VERSION = "develop"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" + private static Integer WIDTH = 430; // 二维码宽度 + private static Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + private static Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 + private static Boolean IS_HYALINE = true; // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + + /** + * 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~, 其它字符请自行编码为合法字符 + * (因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式) + */ + @Schema(description = "场景值/页面参数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") + private String scene = SCENE; + /** + * 页面路径 + */ + @Schema(description = "页面路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "pages/goods/index") + @NotEmpty(message = "页面路径不能为空") + private String path; + /** + * 要打开的小程序版本。默认是开发版。 + */ + @Schema(description = "小程序版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "develop") + private String envVersion = ENV_VERSION; + /** + * 二维码宽度 + */ + @Schema(description = "二维码宽度", requiredMode = Schema.RequiredMode.REQUIRED, example = "430") + private Integer width = WIDTH; + /** + * 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + */ + @Schema(description = "是/否自动配置线条颜色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean isAutoColor = AUTO_COLOR; + /** + * 默认true 检查 page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错); + * 为 false 时允许小程序未发布或者 page 不存在,但 page 有数量上限(60000个)请勿滥用 + */ + @Schema(description = "是/否检查 page 是否存在", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean isCheckPath = CHECK_PATH; + /** + * 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + */ + @Schema(description = "是/否需要透明底色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean isHyaline = IS_HYALINE; + + @Schema(description = "社交平台的类型,参见 SocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + @InEnum(SocialTypeEnum.class) + @NotNull(message = "社交平台的类型不能为空") + private Integer type; + +} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java index e24f8356d1..3bde3eab92 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO; - +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import jakarta.validation.Valid; /** @@ -32,8 +32,8 @@ public interface SocialUserApi { /** * 获得社交用户,基于 userId * - * @param userType 用户类型 - * @param userId 用户编号 + * @param userType 用户类型 + * @param userId 用户编号 * @param socialType 社交平台的类型 * @return 社交用户 */ @@ -44,12 +44,20 @@ public interface SocialUserApi { * * 在认证信息不正确的情况下,也会抛出 {@link ServiceException} 业务异常 * - * @param userType 用户类型 + * @param userType 用户类型 * @param socialType 社交平台的类型 - * @param code 授权码 - * @param state state + * @param code 授权码 + * @param state state * @return 社交用户 */ SocialUserRespDTO getSocialUserByCode(Integer userType, Integer socialType, String code, String state); + /** + * 获得小程序二维码 + * + * @param reqVO 请求信息 + * @return 小程序二维码 + */ + byte[] getWxQrcode(@Valid SocialWxQrcodeReqDTO reqVO); + } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java new file mode 100644 index 0000000000..00b7ea488f --- /dev/null +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.system.api.social.dto; + +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Data +public class SocialWxQrcodeReqDTO { + + /** + * 用户编号 + */ + @NotNull(message = "用户编号不能为空") + private Long userId; + /** + * 用户类型 + */ + @InEnum(UserTypeEnum.class) + @NotNull(message = "用户类型不能为空") + private Integer userType; + + /** + * 社交平台的类型 + */ + @InEnum(SocialTypeEnum.class) + @NotNull(message = "社交平台的类型不能为空") + private Integer socialType; + + /** + * 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~, 其它字符请自行编码为合法字符 + * (因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式) + */ + private String scene; + /** + * 页面路径 + */ + @NotEmpty(message = "页面路径不能为空") + private String path; + /** + * 要打开的小程序版本。默认是开发版。 + */ + private String envVersion; + /** + * 二维码宽度 + */ + private Integer width; + /** + * 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + */ + private Boolean isAutoColor; + /** + * 默认true 检查 page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错); + * 为 false 时允许小程序未发布或者 page 不存在,但 page 有数量上限(60000个)请勿滥用 + */ + private Boolean isCheckPath; + /** + * 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + */ + private Boolean isHyaline; + +} diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java index 1b4c313c83..412ac413ef 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java @@ -120,8 +120,10 @@ public interface ErrorCodeConstants { ErrorCode SOCIAL_USER_NOT_FOUND = new ErrorCode(1_002_018_001, "社交授权失败,找不到对应的用户"); ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_PHONE_CODE_ERROR = new ErrorCode(1_002_018_200, "获得手机号失败"); - ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_201, "社交客户端不存在"); - ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_202, "社交客户端已存在配置"); + ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_QRCODE_ERROR = new ErrorCode(1_002_018_201, "获得小程序码失败"); + ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_202, "社交客户端不存在"); + ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_203, "社交客户端已存在配置"); + // ========== OAuth2 客户端 1-002-020-000 ========= ErrorCode OAUTH2_CLIENT_NOT_EXISTS = new ErrorCode(1_002_020_000, "OAuth2 客户端不存在"); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java index eb83316184..c5e3e490a6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.api.social; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.service.social.SocialUserService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -42,4 +43,9 @@ public class SocialUserApiImpl implements SocialUserApi { return socialUserService.getSocialUserByCode(userType, socialType, code, state); } + @Override + public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { + return socialUserService.getWxQrcode(reqVO); + } + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java index f41e8d371a..f7d8cd0e2d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java @@ -2,14 +2,14 @@ package cn.iocoder.yudao.module.system.service.social; import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialClientDO; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import com.xingyuv.jushauth.model.AuthUser; -import me.chanjar.weixin.common.bean.WxJsapiSignature; - import jakarta.validation.Valid; +import me.chanjar.weixin.common.bean.WxJsapiSignature; /** * 社交应用 Service 接口 @@ -21,8 +21,8 @@ public interface SocialClientService { /** * 获得社交平台的授权 URL * - * @param socialType 社交平台的类型 {@link SocialTypeEnum} - * @param userType 用户类型 + * @param socialType 社交平台的类型 {@link SocialTypeEnum} + * @param userType 用户类型 * @param redirectUri 重定向 URL * @return 社交平台的授权 URL */ @@ -32,9 +32,9 @@ public interface SocialClientService { * 请求社交平台,获得授权的用户 * * @param socialType 社交平台的类型 - * @param userType 用户类型 - * @param code 授权码 - * @param state 授权 state + * @param userType 用户类型 + * @param code 授权码 + * @param state 授权 state * @return 授权的用户 */ AuthUser getAuthUser(Integer socialType, Integer userType, String code, String state); @@ -45,7 +45,7 @@ public interface SocialClientService { * 创建微信公众号的 JS SDK 初始化所需的签名 * * @param userType 用户类型 - * @param url 访问的 URL 地址 + * @param url 访问的 URL 地址 * @return 签名 */ WxJsapiSignature createWxMpJsapiSignature(Integer userType, String url); @@ -55,12 +55,20 @@ public interface SocialClientService { /** * 获得微信小程序的手机信息 * - * @param userType 用户类型 + * @param userType 用户类型 * @param phoneCode 手机授权码 * @return 手机信息 */ WxMaPhoneNumberInfo getWxMaPhoneNumberInfo(Integer userType, String phoneCode); + /** + * 获得小程序二维码 + * + * @param reqVO 请求信息 + * @return 小程序二维码 + */ + byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO); + // =================== 客户端管理 =================== /** diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index 84da0e5e16..978f6161c8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -13,6 +13,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.cache.CacheUtils; import cn.iocoder.yudao.framework.common.util.http.HttpUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialClientDO; @@ -139,7 +140,7 @@ public class SocialClientServiceImpl implements SocialClientService { * 构建 AuthRequest 对象,支持多租户配置 * * @param socialType 社交类型 - * @param userType 用户类型 + * @param userType 用户类型 * @return AuthRequest 对象 */ @VisibleForTesting @@ -196,7 +197,7 @@ public class SocialClientServiceImpl implements SocialClientService { /** * 创建 clientId + clientSecret 对应的 WxMpService 对象 * - * @param clientId 微信公众号 appId + * @param clientId 微信公众号 appId * @param clientSecret 微信公众号 secret * @return WxMpService 对象 */ @@ -227,6 +228,19 @@ public class SocialClientServiceImpl implements SocialClientService { } } + @Override + public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { + WxMaService service = getWxMaService(reqVO.getUserType()); + try { + return service.getQrcodeService().createWxaCodeUnlimitBytes(reqVO.getScene(), reqVO.getPath(), + reqVO.getIsCheckPath(), reqVO.getEnvVersion(), reqVO.getWidth(), reqVO.getIsAutoColor(), + null, reqVO.getIsHyaline()); + } catch (WxErrorException e) { + log.error("[getWxQrcode][reqVO({})) 获得小程序码失败]", reqVO, e); + throw exception(SOCIAL_CLIENT_WEIXIN_MINI_APP_QRCODE_ERROR); + } + } + /** * 获得 clientId + clientSecret 对应的 WxMpService 对象 * @@ -248,7 +262,7 @@ public class SocialClientServiceImpl implements SocialClientService { /** * 创建 clientId + clientSecret 对应的 WxMaService 对象 * - * @param clientId 微信小程序 appId + * @param clientId 微信小程序 appId * @param clientSecret 微信小程序 secret * @return WxMaService 对象 */ @@ -310,8 +324,8 @@ public class SocialClientServiceImpl implements SocialClientService { * * 原因是,不同端(userType)选择某个社交登录(socialType)时,需要通过 {@link #buildAuthRequest(Integer, Integer)} 构建对应的请求 * - * @param id 编号 - * @param userType 用户类型 + * @param id 编号 + * @param userType 用户类型 * @param socialType 社交类型 */ private void validateSocialClientUnique(Long id, Integer userType, Integer socialType) { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java index 739ff2d946..40ba455424 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; @@ -86,4 +87,12 @@ public interface SocialUserService { */ PageResult getSocialUserPage(SocialUserPageReqVO pageReqVO); + /** + * 获得小程序二维码 + * + * @param reqVO 请求信息 + * @return 小程序二维码 + */ + byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO); + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java index 7f1b271add..5d236e938f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserPageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserBindDO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; @@ -170,4 +171,9 @@ public class SocialUserServiceImpl implements SocialUserService { return socialUserMapper.selectPage(pageReqVO); } + @Override + public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { + return socialClientService.getWxQrcode(reqVO); + } + } -- Gitee From 9fbaada1be2cc0f9045731a29e156465acd63d24 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 19:46:49 +0800 Subject: [PATCH 0517/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9AAPI=20=E6=A8=A1=E5=9E=8B=E7=AE=A1=E7=90=86=EF=BC=88?= =?UTF-8?q?=E5=AE=8C=E5=96=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/model/AiApiKeyController.java | 12 ++++++++++++ .../admin/model/AiChatModelController.java | 12 ++++++++++++ .../module/ai/dal/mysql/AiChatModelMapper.java | 10 +++++++++- .../module/ai/service/model/AiApiKeyService.java | 9 +++++++++ .../ai/service/model/AiApiKeyServiceImpl.java | 7 +++++++ .../ai/service/model/AiChatModelService.java | 14 ++++++++++++-- .../ai/service/model/AiChatModelServiceImpl.java | 8 ++++++++ .../iocoder/yudao/framework/ai/AiPlatformEnum.java | 12 ++++++------ 8 files changed, 75 insertions(+), 9 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java index 78b5886471..2bc190051d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiApiKeyController.java @@ -6,7 +6,9 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyRespVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -17,7 +19,10 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @Tag(name = "管理后台 - AI API 密钥") @RestController @@ -69,4 +74,11 @@ public class AiApiKeyController { return success(BeanUtils.toBean(pageResult, AiApiKeyRespVO.class)); } + @GetMapping("/simple-list") + @Operation(summary = "获得 API 密钥分页列表") + public CommonResult> getApiKeySimpleList() { + List list = apiKeyService.getApiKeyList(); + return success(convertList(list, key -> new AiChatModelRespVO().setId(key.getId()).setName(key.getName()))); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 7d73e222a5..6d568140b9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -17,7 +17,11 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; +import java.util.function.Function; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @Tag(name = "管理后台 - AI 聊天模型") @RestController @@ -69,4 +73,12 @@ public class AiChatModelController { return success(BeanUtils.toBean(pageResult, AiChatModelRespVO.class)); } + @GetMapping("/simple-list") + @Operation(summary = "获得聊天模型列表") + @Parameter(name = "status", description = "状态", required = true, example = "1") + public CommonResult> getChatModelSimpleList(@RequestParam("status") Integer status) { + List list = chatModelService.getChatModelList(status); + return success(convertList(list, model -> new AiChatModelRespVO().setId(model.getId()).setName(model.getName()))); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index c2d75a2182..289730f936 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -9,6 +9,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatMode import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * API 聊天模型 Mapper * @@ -39,7 +41,13 @@ public interface AiChatModelMapper extends BaseMapperX { .likeIfPresent(AiChatModelDO::getName, reqVO.getName()) .eqIfPresent(AiChatModelDO::getModel, reqVO.getModel()) .eqIfPresent(AiChatModelDO::getPlatform, reqVO.getPlatform()) - .orderByDesc(AiChatModelDO::getId)); + .orderByAsc(AiChatModelDO::getSort)); + } + + default List selectList(Integer status) { + return selectList(new LambdaQueryWrapperX() + .eq(AiChatModelDO::getStatus, status) + .orderByAsc(AiChatModelDO::getSort)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java index 4da3c3500e..331dd62e2b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveR import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import jakarta.validation.Valid; +import java.util.List; + /** * AI API 密钥 Service 接口 * @@ -59,4 +61,11 @@ public interface AiApiKeyService { */ PageResult getApiKeyPage(AiApiKeyPageReqVO pageReqVO); + /** + * 获得 API 密钥列表 + * + * @return API 密钥列表 + */ + List getApiKeyList(); + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java index 06e68748f5..f8a83ce57c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -11,6 +11,8 @@ import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.List; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; @@ -79,4 +81,9 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { return apiKeyMapper.selectPage(pageReqVO); } + @Override + public List getApiKeyList() { + return apiKeyMapper.selectList(); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java index d05941989a..72d2233e54 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatMode import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import jakarta.validation.Valid; +import java.util.List; + /** * AI 聊天模型 Service 接口 * @@ -40,7 +42,7 @@ public interface AiChatModelService { * 获得聊天模型 * * @param id 编号 - * @return API 聊天模型 + * @return 聊天模型 */ AiChatModelDO getChatModel(Long id); @@ -48,7 +50,7 @@ public interface AiChatModelService { * 获得聊天模型分页 * * @param pageReqVO 分页查询 - * @return API 聊天模型分页 + * @return 聊天模型分页 */ PageResult getChatModelPage(AiChatModelPageReqVO pageReqVO); @@ -60,4 +62,12 @@ public interface AiChatModelService { */ AiChatModelDO validateChatModel(Long id); + /** + * 获得聊天模型列表 + * + * @param status 状态 + * @return 聊天模型列表 + */ + List getChatModelList(Integer status); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index 0c0386cccc..47c3cad577 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -12,6 +12,8 @@ import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.List; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; @@ -89,4 +91,10 @@ public class AiChatModelServiceImpl implements AiChatModelService { return model; } + @Override + public List getChatModelList(Integer status) { + chatModelMapper.selectList(status); + return null; + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java index c774d25153..3882e1a995 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java @@ -20,7 +20,7 @@ public enum AiPlatformEnum { YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), - OPEN_AI("openai", "openAi"), // TODO 芋艿:OpenAI + OPENAI("OpenAI", "OpenAI"), OPEN_AI_DALL("dall", "dall"), MIDJOURNEY("midjourney", "midjourney"), @@ -33,7 +33,7 @@ public enum AiPlatformEnum { AiPlatformEnum.YI_YAN, AiPlatformEnum.QIAN_WEN, AiPlatformEnum.XING_HUO, - AiPlatformEnum.OPEN_AI + AiPlatformEnum.OPENAI ); public static List IMAGE_PLATFORM_LIST = Lists.newArrayList( @@ -42,12 +42,12 @@ public enum AiPlatformEnum { ); public static AiPlatformEnum validatePlatform(String platform) { - for (AiPlatformEnum itemEnum : AiPlatformEnum.values()) { - if (itemEnum.getPlatform().equals(platform)) { - return itemEnum; + for (AiPlatformEnum platformEnum : AiPlatformEnum.values()) { + if (platformEnum.getPlatform().equals(platform)) { + return platformEnum; } } - throw new IllegalArgumentException("Invalid MessageType value: " + platform); + throw new IllegalArgumentException("非法平台: " + platform); } } -- Gitee From 0641f793a374b8056c97cc226156776858cc3608 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 21:51:59 +0800 Subject: [PATCH 0518/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91=E5=85=A8=E5=B1=80=EF=BC=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 3 +- .../app/social/vo/AppSocialWxQrcodeReqVO.java | 39 +++++++------------ .../api/social/dto/SocialWxQrcodeReqDTO.java | 28 +++++++++---- .../system/api/social/SocialUserApiImpl.java | 1 + 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 304bb16904..f6a351a33d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -63,9 +63,10 @@ public class AppSocialUserController { return success(BeanUtils.toBean(socialUser, AppSocialUserRespVO.class)); } + // TODO @puhui999:是不是 url 叫 wxa-qrcode?然后相关的方法,都做下调整哈;因为是微信小程序的二维码 @PostMapping("/wxacode") @Operation(summary = "获得微信小程序码") - @PreAuthenticated + @PreAuthenticated // TODO @puhui999:可能不需要登录 public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { byte[] wxQrcode = socialUserApi.getWxQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class).setUserId(getLoginUserId()) .setUserType(UserTypeEnum.MEMBER.getValue()).setSocialType(reqVO.getType())); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index fd352fb8e1..15d9e20a13 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -7,53 +7,44 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; +// TODO @芋艿:需要精简下参数; @Schema(description = "用户 APP - 获得获取小程序码 Request VO") @Data public class AppSocialWxQrcodeReqVO { + // TODO @puhui999:这个后续不用前端传递,应该是后端搞的 private static String SCENE = "1011"; // 默认场景值 1011 扫描二维码 + // TODO @puhui999:这个默认是不是 release 哈? private static String ENV_VERSION = "develop"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" + // TODO @puhui999:这个去掉;因为本身就是 430 啦; private static Integer WIDTH = 430; // 二维码宽度 + // TODO @puhui999:这个去掉;因为本身就是 true 啦; private static Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + // TODO @puhui999:这个去掉;因为本身就是 true 啦; private static Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 + // TODO @puhui999:这个去掉;因为本身就是 true 啦; private static Boolean IS_HYALINE = true; // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 - /** - * 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~, 其它字符请自行编码为合法字符 - * (因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式) - */ - @Schema(description = "场景值/页面参数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") + @Schema(description = "场景值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") private String scene = SCENE; - /** - * 页面路径 - */ + @Schema(description = "页面路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "pages/goods/index") @NotEmpty(message = "页面路径不能为空") private String path; - /** - * 要打开的小程序版本。默认是开发版。 - */ + + // TODO @puhui999:这个应该不传递哈 @Schema(description = "小程序版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "develop") private String envVersion = ENV_VERSION; - /** - * 二维码宽度 - */ + @Schema(description = "二维码宽度", requiredMode = Schema.RequiredMode.REQUIRED, example = "430") private Integer width = WIDTH; - /** - * 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 - */ + @Schema(description = "是/否自动配置线条颜色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean isAutoColor = AUTO_COLOR; - /** - * 默认true 检查 page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错); - * 为 false 时允许小程序未发布或者 page 不存在,但 page 有数量上限(60000个)请勿滥用 - */ + @Schema(description = "是/否检查 page 是否存在", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean isCheckPath = CHECK_PATH; - /** - * 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 - */ + @Schema(description = "是/否需要透明底色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean isHyaline = IS_HYALINE; diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java index 00b7ea488f..d5e7f194ff 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java @@ -7,9 +7,17 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; +/** + * 获取小程序码 Request DTO + * + * @see 获取不限制的小程序码 + * + * @author HUIHUI + */ @Data public class SocialWxQrcodeReqDTO { + // TODO @puhui999:userId、userType 应该后续要搞成抽象参数;说白了,就是 path 的参数; socialType 应该去掉,因为就是微信的; /** * 用户编号 */ @@ -30,9 +38,9 @@ public class SocialWxQrcodeReqDTO { private Integer socialType; /** - * 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~, 其它字符请自行编码为合法字符 - * (因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式) + * 场景 */ + @NotEmpty(message = "场景不能为空") private String scene; /** * 页面路径 @@ -40,24 +48,30 @@ public class SocialWxQrcodeReqDTO { @NotEmpty(message = "页面路径不能为空") private String path; /** - * 要打开的小程序版本。默认是开发版。 + * 要打开的小程序版本 */ private String envVersion; /** * 二维码宽度 */ private Integer width; + + // TODO @puhui999:autoColor + /** - * 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + * 是否需要透明底色 */ private Boolean isAutoColor; + + // TODO @puhui999: checkPath /** - * 默认true 检查 page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错); - * 为 false 时允许小程序未发布或者 page 不存在,但 page 有数量上限(60000个)请勿滥用 + * 是否检查 page 是否存在 */ private Boolean isCheckPath; + + // TODO @puhui999: hyaline /** - * 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + * 是否需要透明底色 */ private Boolean isHyaline; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java index c5e3e490a6..ad56c9ee5f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java @@ -43,6 +43,7 @@ public class SocialUserApiImpl implements SocialUserApi { return socialUserService.getSocialUserByCode(userType, socialType, code, state); } + // TODO @puhui999:貌似搞到 SocialClientApiImpl 更合适,二维码和用户关系不大;这样 socialUserService 也不用绕一次了 @Override public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { return socialUserService.getWxQrcode(reqVO); -- Gitee From e1a5302b251a603fd6440632cec176df815248a0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 22:05:41 +0800 Subject: [PATCH 0519/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=EF=BC=9A=E7=A7=92=E6=9D=80=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=AE=B5=E9=85=8D=E7=BD=AE=E7=9A=84=20URL=20`simple-list`=20?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/seckill/SeckillConfigController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/SeckillConfigController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/SeckillConfigController.java index 21b9a14008..093003bacf 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/SeckillConfigController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/SeckillConfigController.java @@ -78,9 +78,9 @@ public class SeckillConfigController { return success(SeckillConfigConvert.INSTANCE.convertList(list)); } - @GetMapping("/list-all-simple") + @GetMapping("/simple-list") @Operation(summary = "获得所有开启状态的秒杀时段精简列表", description = "主要用于前端的下拉选项") - public CommonResult> getListAllSimple() { + public CommonResult> getSeckillConfigSimpleList() { List list = seckillConfigService.getSeckillConfigListByStatus( CommonStatusEnum.ENABLE.getStatus()); return success(SeckillConfigConvert.INSTANCE.convertList1(list)); -- Gitee From 4a0ad205ae13ba7ca104dc5b75723a4d6b1a37f9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 22:30:37 +0800 Subject: [PATCH 0520/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91CRM=EF=BC=9A=E4=BC=98=E5=8C=96=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E4=B8=9A=E7=BB=A9=E7=BB=9F=E8=AE=A1=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmStatisticsPerformanceReqVO.java | 1 - .../CrmStatisticsPerformanceServiceImpl.java | 17 +++++++---------- .../CrmStatisticsPerformanceMapper.xml | 6 +++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java index de76acbb32..bfb5c840f5 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/performance/CrmStatisticsPerformanceReqVO.java @@ -33,7 +33,6 @@ public class CrmStatisticsPerformanceReqVO { @Schema(description = "负责人用户 id 集合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2") private List userIds; - // TODO @scholar:应该传递的是 int year;年份 @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.REQUIRED) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @NotEmpty(message = "时间范围不能为空") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java index 07734e01da..1e7e3bbb2f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.crm.service.statistics; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO; @@ -10,14 +9,16 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; - import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.function.Function; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -40,7 +41,6 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform @Resource private DeptApi deptApi; - @Override public List getContractCountPerformance(CrmStatisticsPerformanceReqVO performanceReqVO) { return getPerformance(performanceReqVO, performanceMapper::selectContractCountPerformance); @@ -77,11 +77,8 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform performanceReqVO.setUserIds(userIds); // 2. 获得业绩数据 - int year = Integer.parseInt(LocalDateTimeUtil.format(performanceReqVO.getTimes()[0],"yyyy"));//获取查询的年份 - LocalDateTime[] timesRange = performanceReqVO.getTimes();//以时间段形式去数据库查询,时间段为所查询年份和前一年,两年时间的数据,便于计算同比数据 - timesRange[0] = performanceReqVO.getTimes()[0].minusYears(1);//查询的起始时间往前推一年 - timesRange[1] = performanceReqVO.getTimes()[1];//查询的结束时间 - performanceReqVO.setTimes(timesRange); + int year = performanceReqVO.getTimes()[0].getYear(); // 获取查询的年份 + performanceReqVO.getTimes()[0] = performanceReqVO.getTimes()[0].minusYears(1); List performanceList = performanceFunction.apply(performanceReqVO); Map performanceMap = convertMap(performanceList, CrmStatisticsPerformanceRespVO::getTime, CrmStatisticsPerformanceRespVO::getCurrentMonthCount); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml index f22b4fabef..81962cdae4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsPerformanceMapper.xml @@ -7,7 +7,7 @@ SELECT DATE_FORMAT(order_date, '%Y%m') AS time, COUNT(1) AS currentMonthCount - FROM crm_contract + FROM crm_contract WHERE deleted = 0 AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in @@ -24,7 +24,7 @@ SELECT DATE_FORMAT(order_date, '%Y%m') AS time, IFNULL(SUM(total_price), 0) AS currentMonthCount - FROM crm_contract + FROM crm_contract WHERE deleted = 0 AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in @@ -41,7 +41,7 @@ SELECT DATE_FORMAT(return_time, '%Y%m') AS time, IFNULL(SUM(price), 0) AS currentMonthCount - FROM crm_receivable + FROM crm_receivable WHERE deleted = 0 AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} AND owner_user_id in -- Gitee From 0ba98742bebedfb6f3d5aa7ff69eb87c7bab5c0d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 23:51:27 +0800 Subject: [PATCH 0521/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91S?= =?UTF-8?q?YSTEM=EF=BC=9A=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E5=89=8D=E7=BD=AE=E8=A1=A5=E9=9B=B6=E5=AF=B9=E5=85=B6endCode?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/system/service/sms/SmsCodeServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java index 5e6637fbd6..6b7727705a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java @@ -67,7 +67,8 @@ public class SmsCodeServiceImpl implements SmsCodeService { } // 创建验证码记录 - String code = String.valueOf(randomInt(smsCodeProperties.getBeginCode(), smsCodeProperties.getEndCode() + 1)); + String code = String.format("%0" + smsCodeProperties.getEndCode().toString().length() + "d", + randomInt(smsCodeProperties.getBeginCode(), smsCodeProperties.getEndCode() + 1)); SmsCodeDO newSmsCode = SmsCodeDO.builder().mobile(mobile).code(code).scene(scene) .todayIndex(lastSmsCode != null && isToday(lastSmsCode.getCreateTime()) ? lastSmsCode.getTodayIndex() + 1 : 1) .createIp(ip).used(false).build(); -- Gitee From d78b6d8b584fdb590f4548bcd13bd02142c2a2e8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 23:52:54 +0800 Subject: [PATCH 0522/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91E?= =?UTF-8?q?RP=EF=BC=9A=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E4=B8=AD=E7=9A=84=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java index bba2b309b3..a2770598e6 100644 --- a/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java +++ b/yudao-module-erp/yudao-module-erp-api/src/main/java/cn/iocoder/yudao/module/erp/enums/common/ErpBizTypeEnum.java @@ -20,7 +20,7 @@ public enum ErpBizTypeEnum implements IntArrayValuable { PURCHASE_RETURN(12, "采购退货"), SALE_ORDER(20, "销售订单"), - SALE_OUT(21, "销售订单"), + SALE_OUT(21, "销售出库"), SALE_RETURN(22, "销售退货"), ; -- Gitee From d46097a65856b8dfebe675870b7e341b3cc6263f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 12 May 2024 10:08:23 +0800 Subject: [PATCH 0523/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91S?= =?UTF-8?q?YSTEM=EF=BC=9A=E6=9B=B4=E6=96=B0=E8=A7=92=E8=89=B2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=AE=B0=E5=BD=95=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/service/permission/RoleServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java index 3f3c17a536..35db067069 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java @@ -18,7 +18,9 @@ import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; import com.google.common.annotations.VisibleForTesting; import com.mzt.logapi.context.LogRecordContext; +import com.mzt.logapi.service.impl.DiffParseFunction; import com.mzt.logapi.starter.annotation.LogRecord; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -26,7 +28,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; -import jakarta.annotation.Resource; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -116,6 +117,7 @@ public class RoleServiceImpl implements RoleService { permissionService.processRoleDeleted(id); // 3. 记录操作日志上下文 + LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(role, RoleSaveReqVO.class)); LogRecordContext.putVariable("role", role); } -- Gitee From 79bd78998d25dda9ab7f308c7ca8e9ee67912eed Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 12 May 2024 14:20:24 +0800 Subject: [PATCH 0524/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/vo/message/AiChatMessageRespVO.java | 10 ++++++++++ .../module/ai/dal/mysql/AiChatModelMapper.java | 12 +++++++++++- .../module/ai/service/AiChatModelService.java | 12 ++++++++++++ .../service/impl/AiChatModalServiceImpl.java | 7 +++++++ .../ai/service/impl/AiChatServiceImpl.java | 18 +++++++++++++++++- 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index d5f830d171..f117c67c6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.time.LocalDateTime; + @Schema(description = "管理后台 - AI 聊天消息 Response VO") @Data public class AiChatMessageRespVO { @@ -19,6 +21,9 @@ public class AiChatMessageRespVO { @Schema(description = "用户编号", example = "4096") private Long userId; // 仅当 user 发送时非空 + @Schema(description = "用户头像", example = "http://xxx") + private Long avatarUrl; // 仅当 user 发送时非空 + @Schema(description = "角色编号", example = "888") private Long roleId; // 仅当 assistant 回复时非空 @@ -28,10 +33,15 @@ public class AiChatMessageRespVO { @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123") private Long modelId; + @Schema(description = "模型图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "123") + private String modelImage; + @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") private String content; @Schema(description = "消耗 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "80") private Integer tokens; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") + private LocalDateTime createTime; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index 46d66ff5f5..418b25975e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -9,6 +9,10 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; +import java.util.Collection; +import java.util.List; +import java.util.Set; + /** * chat modal * @@ -36,5 +40,11 @@ public interface AiChatModelMapper extends BaseMapperX { return pageResult.getList().get(0); } - + /** + * 查询 - 根据 ids + * + * @param modalIds + * @return + */ + List selectByIds(Collection modalIds); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java index 07a902dd8d..d133c729e9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java @@ -4,6 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import java.util.List; +import java.util.Set; + /** * ai modal * @@ -64,4 +67,13 @@ public interface AiChatModelService { * @param chatModal */ void validateAvailable(AiChatModalRespVO chatModal); + + /** + * 获取 - 根据 ids 批量获取 + * + * @param modalIds + * @return + */ + List getModalByIds(Set modalIds); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java index 0aec7a94c8..e25110e1f3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java @@ -17,6 +17,7 @@ import cn.iocoder.yudao.module.ai.service.AiChatModelService; import jakarta.validation.ConstraintViolation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.mybatis.spring.annotation.MapperScannerRegistrar; import org.springframework.stereotype.Service; import java.util.List; @@ -35,6 +36,7 @@ import java.util.Set; public class AiChatModalServiceImpl implements AiChatModelService { private final AiChatModelMapper aiChatModelMapper; + private final MapperScannerRegistrar mapperScannerRegistrar; @Override public PageResult list(AiChatModelListReqVO req) { @@ -102,6 +104,11 @@ public class AiChatModalServiceImpl implements AiChatModelService { } } + @Override + public List getModalByIds(Set modalIds) { + return aiChatModelMapper.selectByIds(modalIds); + } + public AiChatModelDO validateExists(Long id) { AiChatModelDO aiChatModalDO = aiChatModelMapper.selectById(id); if (aiChatModalDO == null) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 90649f417d..de33e65e49 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -15,6 +15,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessage import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.AiChatModalRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; @@ -29,8 +30,11 @@ import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; +import java.util.stream.Collectors; /** * 聊天 service @@ -188,8 +192,20 @@ public class AiChatServiceImpl implements AiChatService { chatConversationService.validateExists(conversationId); // 获取对话所有 message List aiChatMessageDOList = aiChatMessageMapper.selectByConversationId(conversationId); + // 获取模型信息 + Set modalIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getModelId).collect(Collectors.toSet()); + List modalList = aiChatModalService.getModalByIds(modalIds); + Map modalIdMap = modalList.stream().collect(Collectors.toMap(AiChatModelDO::getId, o -> o)); // 转换 AiChatMessageRespVO - return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); + List aiChatMessageRespList = AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); + // 设置用户头像 和 模型头像 todo @芋艿 这里需要转换 用户头像、模型头像 + return aiChatMessageRespList.stream().map(item -> { + if (modalIdMap.containsKey(item.getModelId())) { +// modalIdMap.get(item.getModelId()); +// item.setModelImage() + } + return item; + }).collect(Collectors.toList()); } @Override -- Gitee From 5a4162cdc13bc9cb8939133cb24f1a9a936d3435 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sun, 12 May 2024 19:04:58 +0800 Subject: [PATCH 0525/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20chat=20event=20stream=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=EF=BC=8C=E5=A2=9E=E5=8A=A0=20add=20message?= =?UTF-8?q?=20=E4=BC=98=E5=85=88=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 4 + .../admin/chat/AiChatMessageController.java | 11 +- .../vo/message/AiChatMessageAddReqVO.java | 20 +++ .../vo/message/AiChatMessageAddRespVO.java | 17 +++ .../message/AiChatMessageSendStreamReqVO.java | 16 +++ .../ai/convert/AiChatMessageConvert.java | 9 ++ .../ai/dal/mysql/AiChatModelMapper.java | 1 - .../module/ai/service/AiChatModelService.java | 78 ----------- .../module/ai/service/AiChatService.java | 13 +- .../service/impl/AiChatModalServiceImpl.java | 132 ------------------ .../ai/service/impl/AiChatServiceImpl.java | 69 ++++++--- .../ai/service/model/AiChatModelService.java | 10 ++ .../service/model/AiChatModelServiceImpl.java | 8 ++ 13 files changed, 155 insertions(+), 233 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index a3c343e121..4e101cd7e3 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -36,5 +36,9 @@ public interface ErrorCodeConstants { ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "AI 角色不存在!"); ErrorCode AI_CHAT_ROLE_NOT_PUBLIC = new ErrorCode(1_022_000_060, "AI 角色未公开!"); + // chat + + ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 82392ed272..fb0d9f5ad3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import cn.iocoder.yudao.module.ai.service.AiChatService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -38,10 +37,16 @@ public class AiChatMessageController { // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) - public Flux sendMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { + public Flux sendMessageStream(@Validated @RequestBody AiChatMessageSendStreamReqVO sendReqVO) { return chatService.chatStream(sendReqVO); } + @Operation(summary = "添加/提问", description = "先创建好 message 前端才好渲染") + @PostMapping(value = "/add") + public CommonResult add(@Validated @RequestBody AiChatMessageAddReqVO req) { + return success(chatService.add(req)); + } + @Operation(summary = "获得指定会话的消息列表") @GetMapping("/list-by-conversation-id") @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java new file mode 100644 index 0000000000..994472d031 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - AI 聊天消息发送 Request VO") +@Data +public class AiChatMessageAddReqVO { + + @Schema(description = "聊天对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "聊天对话编号不能为空") + private Long conversationId; + + @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "帮我写个 Java 算法") + @NotEmpty(message = "聊天内容不能为空") + private String content; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java new file mode 100644 index 0000000000..70cfb5b400 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - AI 聊天消息 Add Response VO") +@Data +public class AiChatMessageAddRespVO { + + @Schema(description = "用户信息") + private AiChatMessageRespVO userMessage; + + @Schema(description = "系统信息") + private AiChatMessageRespVO systemMessage; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java new file mode 100644 index 0000000000..cfd67ccba4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - AI 聊天消息发送 Request VO") +@Data +public class AiChatMessageSendStreamReqVO { + + @Schema(description = "提问的 messageId", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "提问的 messageId 不能为空") + private Long id; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index a5019b2cd8..05f7b83b69 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -26,4 +26,13 @@ public interface AiChatMessageConvert { * @return */ List convertAiChatMessageRespVOList(List aiChatMessageDOList); + + /** + * 转换 - aiChatMessageDO + * + * @param aiChatMessageDO + * @return + */ + AiChatMessageRespVO convertAiChatMessageRespVO(AiChatMessageDO aiChatMessageDO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index 8d00cd66ca..7eaef66025 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; -import java.util.Set; /** * API 聊天模型 Mapper diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java deleted file mode 100644 index aeb7bbccba..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatModelService.java +++ /dev/null @@ -1,78 +0,0 @@ -package cn.iocoder.yudao.module.ai.service; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; - -import java.util.List; -import java.util.Set; - -/** - * ai modal - * - * @author fansili - * @time 2024/4/24 19:42 - * @since 1.0 - */ -public interface AiChatModelService { - - /** - * ai modal - 列表 - * - * @param req - * @return - */ - PageResult list(AiChatModelListReqVO req); - - /** - * ai modal - 添加 - * - * @param req - */ - void add(AiChatModelAddReqVO req); - - /** - * ai modal - 更新 - * - * @param req - */ - void update(AiChatModelUpdateReqVO req); - - /** - * ai modal - 删除 - * - * @param id - */ - void delete(Long id); - - /** - * 获取 - 获取 modal - * - * @param modalId - * @return - */ - AiChatModalRespVO getChatModalOfValidate(Long modalId); - - /** - * 校验 - 是否存在 - * - * @param id - * @return - */ - AiChatModelDO validateExists(Long id); - - /** - * 校验 - 校验是否可用 - * - * @param chatModal - */ - void validateAvailable(AiChatModalRespVO chatModal); - - /** - * 获取 - 根据 ids 批量获取 - * - * @param modalIds - * @return - */ - List getModalByIds(Set modalIds); -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index a5e97ce5f1..7be2b8afce 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.ai.service; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import reactor.core.publisher.Flux; import java.util.List; @@ -29,7 +28,15 @@ public interface AiChatService { * @param sendReqVO * @return */ - Flux chatStream(AiChatMessageSendReqVO sendReqVO); + Flux chatStream(AiChatMessageSendStreamReqVO sendReqVO); + + /** + * 添加 - message + * + * @param sendReqVO + * @return + */ + AiChatMessageRespVO add(AiChatMessageAddReqVO sendReqVO); /** * 获取 - 获取对话 message list diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java deleted file mode 100644 index 51a972fa7a..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatModalServiceImpl.java +++ /dev/null @@ -1,132 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.impl; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.extra.validation.ValidationUtil; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.model.*; -import cn.iocoder.yudao.module.ai.convert.AiChatModelConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; -import cn.iocoder.yudao.module.ai.dal.vo.AiChatModalConfigVO; -import cn.iocoder.yudao.module.ai.service.AiChatModelService; -import jakarta.validation.ConstraintViolation; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.Set; - -/** - * ai 模型 - * - * @author fansili - * @time 2024/4/24 19:42 - * @since 1.0 - */ -@AllArgsConstructor -@Service -@Slf4j -public class AiChatModalServiceImpl implements AiChatModelService { - - private final AiChatModelMapper aiChatModelMapper; - - @Override - public PageResult list(AiChatModelListReqVO req) { - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); - // 查询的都是未禁用的模型 - queryWrapperX.eq(AiChatModelDO::getStatus, CommonStatusEnum.ENABLE.getStatus()); - // search - if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.like(AiChatModelDO::getName, req.getSearch().trim()); - } - // 默认排序 - queryWrapperX.orderByAsc(AiChatModelDO::getSort); - // 查询 - PageResult aiChatModalDOPageResult = aiChatModelMapper.selectPage(req, queryWrapperX); - // 转换 res - List resList = AiChatModelConvert.INSTANCE.convertAiChatModalListRes(aiChatModalDOPageResult.getList()); - return new PageResult<>(resList, aiChatModalDOPageResult.getTotal()); - } - - @Override - public void add(AiChatModelAddReqVO req) { - // 校验 platform、type - validatePlatform(req.getPlatform()); - // 转换 do - AiChatModelDO insertChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); - // 设置默认属性 - insertChatModalDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - // 保存数据库 - aiChatModelMapper.insert(insertChatModalDO); - } - - @Override - public void update(AiChatModelUpdateReqVO req) { - // 校验 platform - validatePlatform(req.getPlatform()); - // 校验模型是否存在 - validateExists(req.getId()); - // 转换 updateChatModalDO - AiChatModelDO updateChatModalDO = AiChatModelConvert.INSTANCE.convertAiChatModalDO(req); - updateChatModalDO.setId(req.getId()); - // 更新数据库 - aiChatModelMapper.updateById(updateChatModalDO); - } - - @Override - public void delete(Long id) { - // 检查 modal 是否存在 - validateExists(id); - // 删除 delete - aiChatModelMapper.deleteById(id); - } - - @Override - public AiChatModalRespVO getChatModalOfValidate(Long modalId) { - // 检查 modal 是否存在 - AiChatModelDO aiChatModalDO = validateExists(modalId); - return AiChatModelConvert.INSTANCE.convertAiChatModalRes(aiChatModalDO); - } - - @Override - public void validateAvailable(AiChatModalRespVO chatModal) { - // 对话模型是否可用 - if (!CommonStatusEnum.ENABLE.getStatus().equals(chatModal.getStatus())) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_DISABLE_NOT_USED); - } - } - - @Override - public List getModalByIds(Set modalIds) { - return aiChatModelMapper.selectByIds(modalIds); - } - - public AiChatModelDO validateExists(Long id) { - AiChatModelDO aiChatModalDO = aiChatModelMapper.selectById(id); - if (aiChatModalDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_NOT_EXIST); - } - return aiChatModalDO; - } - - private void validatePlatform(String platform) { - try { - AiPlatformEnum.valueOfPlatform(platform); - } catch (IllegalArgumentException e) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_PLATFORM_PARAMS_INCORRECT, e.getMessage()); - } - } - - private void validateModalConfig(AiChatModalConfigVO aiChatModalConfigVO) { - Set> validate = ValidationUtil.validate(aiChatModalConfigVO); - for (ConstraintViolation constraintViolation : validate) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MODAL_CONFIG_PARAMS_INCORRECT, constraintViolation.getMessage()); - } - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c3842e4096..a7dcd122d2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -7,11 +7,15 @@ import cn.iocoder.yudao.framework.ai.chat.ChatResponse; import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendStreamReqVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; @@ -19,11 +23,12 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; +import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -53,6 +58,7 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatConversationService chatConversationService; private final AiChatModelService aiChatModalService; private final AiChatRoleService aiChatRoleService; + private final HttpMessageConverters messageConverters; @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { @@ -124,10 +130,15 @@ public class AiChatServiceImpl implements AiChatService { return insertChatMessageDO; } - public Flux chatStream(AiChatMessageSendReqVO req) { + public Flux chatStream(AiChatMessageSendStreamReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询提问的 message + AiChatMessageDO aiChatMessageDO = aiChatMessageMapper.selectById(req.getId()); + if (aiChatMessageDO == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST); + } // 查询对话 - AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(aiChatMessageDO.getConversationId()); // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 @@ -138,14 +149,14 @@ public class AiChatServiceImpl implements AiChatService { // 校验角色是否公开 aiChatRoleService.validateIsPublic(aiChatRoleDO); // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(req.getContent()); + Prompt prompt = new Prompt(aiChatMessageDO.getContent()); + // 提前创建一个 system message + AiChatMessageDO systemMessage = insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), + chatModel.getModel(), chatModel.getId(), "", + 0, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); // req.setTopK(req.getTopK()); // req.setTopP(req.getTopP()); // req.setTemperature(req.getTemperature()); - // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), req.getContent(), - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); @@ -154,7 +165,8 @@ public class AiChatServiceImpl implements AiChatService { StringBuffer contentBuffer = new StringBuffer(); AtomicInteger tokens = new AtomicInteger(0); return streamResponse.map(res -> { - AiChatMessageRespVO aiChatMessageRespVO = new AiChatMessageRespVO(); + AiChatMessageRespVO aiChatMessageRespVO = + AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVO(systemMessage); aiChatMessageRespVO.setContent(res.getResult().getOutput().getContent()); contentBuffer.append(res.getResult().getOutput().getContent()); tokens.incrementAndGet(); @@ -165,22 +177,46 @@ public class AiChatServiceImpl implements AiChatService { public void run() { log.info("发送完成!"); // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), contentBuffer.toString(), - tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + aiChatMessageMapper.updateById(new AiChatMessageDO() + .setId(systemMessage.getId()) + .setContent(contentBuffer.toString()) + .setTokens(tokens.get()) + ); } }).doOnError(new Consumer() { @Override public void accept(Throwable throwable) { log.error("发送错误 {}!", throwable.getMessage()); - // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), throwable.getMessage(), - tokens.get(), conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + // 更新错误信息 + aiChatMessageMapper.updateById(new AiChatMessageDO() + .setId(systemMessage.getId()) + .setContent(throwable.getMessage()) + .setTokens(tokens.get()) + ); } }); } + @Override + public AiChatMessageRespVO add(AiChatMessageAddReqVO req) { + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + // 查询对话 + AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + // 获取对话模型 + AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); + // 获取角色信息 + AiChatRoleDO aiChatRoleDO = null; + if (conversation.getRoleId() != null) { + aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); + } + // 校验角色是否公开 + aiChatRoleService.validateIsPublic(aiChatRoleDO); + AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), + chatModel.getModel(), chatModel.getId(), req.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVO(userMessage); + } + @Override public List getMessageListByConversationId(Long conversationId) { // 校验对话是否存在 @@ -207,4 +243,5 @@ public class AiChatServiceImpl implements AiChatService { public Boolean deleteMessage(Long id) { return aiChatMessageMapper.deleteById(id) > 0; } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java index d05941989a..de203661e9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java @@ -6,6 +6,9 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatMode import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import jakarta.validation.Valid; +import java.util.List; +import java.util.Set; + /** * AI 聊天模型 Service 接口 * @@ -60,4 +63,11 @@ public interface AiChatModelService { */ AiChatModelDO validateChatModel(Long id); + /** + * 获取 - 根据多个 ids 获取 + * + * @param modalIds + * @return + */ + List getModalByIds(Set modalIds); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index 0c0386cccc..5e87fd180c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -12,6 +12,9 @@ import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.List; +import java.util.Set; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; @@ -89,4 +92,9 @@ public class AiChatModelServiceImpl implements AiChatModelService { return model; } + @Override + public List getModalByIds(Set modalIds) { + return chatModelMapper.selectByIds(modalIds); + } + } \ No newline at end of file -- Gitee From 56caa3d598d6d639f5fcfabfe78e6fcd72ba16be Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 12 May 2024 19:43:41 +0800 Subject: [PATCH 0526/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=B0=83=E6=95=B4=20ai=20starter=20=E7=9A=84?= =?UTF-8?q?=E5=8C=85=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 12 +++--- .../module/ai/convert/AiImageConvert.java | 2 +- .../dal/dataobject/chat/AiChatMessageDO.java | 2 +- .../ai/dal/dataobject/model/AiApiKeyDO.java | 2 +- .../dal/dataobject/model/AiChatModelDO.java | 2 +- .../module/ai/dal/vo/AiChatModalConfigVO.java | 9 +++-- .../ai/dal/vo/AiChatModalDallConfigVO.java | 2 +- .../ai/service/impl/AiChatServiceImpl.java | 12 +++--- .../ai/service/impl/AiImageServiceImpl.java | 24 ++++++------ .../YuDaoMidjourneyMessageHandler.java | 6 +-- .../service/model/AiChatModelServiceImpl.java | 3 +- .../yudao-spring-boot-starter-ai/pom.xml | 2 + .../ai/config/YudaoAiAutoConfiguration.java | 38 +++++++++---------- .../ai/config/YudaoAiImageProperties.java | 9 ++--- .../ai/config/YudaoAiProperties.java | 10 ++--- .../ai/{ => core/enums}/AiPlatformEnum.java | 2 +- .../ai/{ => core}/exception/AiException.java | 3 +- .../yudao/framework/ai/core/package-info.java | 4 ++ .../yudao/framework/ai/package-info.java | 15 -------- .../springframework}/ai/chat/ChatClient.java | 8 ++-- .../ai/chat/ChatException.java | 2 +- .../ai/chat/ChatResponse.java | 7 ++-- .../springframework}/ai/chat/Generation.java | 8 ++-- .../ai/chat/StreamingChatClient.java | 6 +-- .../ai/chat/messages/AbstractMessage.java | 2 +- .../ai/chat/messages/AssistantMessage.java | 2 +- .../ai/chat/messages/ChatMessage.java | 2 +- .../ai/chat/messages/FunctionMessage.java | 2 +- .../ai/chat/messages/MediaData.java | 2 +- .../ai/chat/messages/Message.java | 2 +- .../ai/chat/messages/MessageType.java | 2 +- .../ai/chat/messages/SystemMessage.java | 2 +- .../ai/chat/messages/UserMessage.java | 2 +- .../chat/metadata/ChatGenerationMetadata.java | 4 +- .../chat/metadata/ChatResponseMetadata.java | 4 +- .../ai/chat/metadata/EmptyRateLimit.java | 2 +- .../ai/chat/metadata/EmptyUsage.java | 2 +- .../ai/chat/metadata/PromptMetadata.java | 2 +- .../ai/chat/metadata/RateLimit.java | 2 +- .../ai/chat/metadata/Usage.java | 2 +- .../ai/chat/package-info.java | 2 +- .../chat/prompt/AssistantPromptTemplate.java | 6 +-- .../ai/chat/prompt/ChatOptions.java | 4 +- .../ai/chat/prompt/ChatOptionsBuilder.java | 2 +- .../ai/chat/prompt/ChatPromptTemplate.java | 4 +- .../chat/prompt/FunctionPromptTemplate.java | 2 +- .../ai/chat/prompt/Prompt.java | 11 +++--- .../ai/chat/prompt/PromptTemplate.java | 8 ++-- .../ai/chat/prompt/PromptTemplateActions.java | 2 +- .../prompt/PromptTemplateChatActions.java | 4 +- .../prompt/PromptTemplateMessageActions.java | 4 +- .../prompt/PromptTemplateStringActions.java | 2 +- .../ai/chat/prompt/SystemPromptTemplate.java | 6 +-- .../ai/chat/prompt/TemplateFormat.java | 2 +- .../springframework}/ai/image/Image.java | 2 +- .../ai/image/ImageClient.java | 4 +- .../ai/image/ImageGeneration.java | 4 +- .../ai/image/ImageGenerationMetadata.java | 4 +- .../ai/image/ImageMessage.java | 2 +- .../ai/image/ImageOptions.java | 4 +- .../ai/image/ImageOptionsBuilder.java | 2 +- .../ai/image/ImagePrompt.java | 4 +- .../ai/image/ImageResponse.java | 4 +- .../ai/image/ImageResponseMetadata.java | 4 +- .../ai/model/ModelClient.java | 2 +- .../ai/model/ModelOptions.java | 2 +- .../ai/model/ModelOptionsUtils.java | 2 +- .../ai/model/ModelRequest.java | 2 +- .../ai/model/ModelResponse.java | 2 +- .../ai/model/ModelResult.java | 2 +- .../ai/model/ResponseMetadata.java | 2 +- .../ai/model/ResultMetadata.java | 2 +- .../ai/model/StreamingModelClient.java | 2 +- .../function/AbstractFunctionCallSupport.java | 2 +- .../function/AbstractFunctionCallback.java | 2 +- .../ai/model/function/FunctionCallback.java | 2 +- .../function/FunctionCallbackContext.java | 2 +- .../function/FunctionCallbackWrapper.java | 4 +- .../function/FunctionCallingOptions.java | 2 +- .../FunctionCallingOptionsBuilder.java | 4 +- .../ai/model/function/TypeResolverHelper.java | 2 +- .../ai/model/package-info.java | 2 +- .../models}/midjourney/MidjourneyConfig.java | 2 +- .../models}/midjourney/MidjourneyMessage.java | 4 +- .../api/MidjourneyInteractions.java | 6 +-- .../api/MidjourneyInteractionsApi.java | 14 +++---- .../midjourney/api/req/AttachmentsReq.java | 2 +- .../midjourney/api/req/DescribeReq.java | 2 +- .../models}/midjourney/api/req/ReRollReq.java | 2 +- .../api/res/UploadAttachmentsRes.java | 2 +- .../constants/MidjourneyConstants.java | 2 +- .../MidjourneyGennerateStatusEnum.java | 2 +- .../constants/MidjourneyInteractionsEnum.java | 2 +- .../constants/MidjourneyMessageTypeEnum.java | 2 +- .../constants/MidjourneyNotifyCode.java | 2 +- .../midjourney/util/MidjourneyUtil.java | 4 +- .../midjourney/webSocket/FailureCallback.java | 2 +- .../webSocket/MidjourneyMessageHandler.java | 4 +- .../webSocket/MidjourneyWebSocketStarter.java | 10 ++--- .../midjourney/webSocket/SuccessCallback.java | 2 +- .../webSocket/WebSocketStarter.java | 2 +- .../midjourney/webSocket/WssNotify.java | 2 +- .../handler/MidjourneyWebSocketHandler.java | 10 ++--- .../listener/MidjourneyMessageListener.java | 16 ++++---- .../ai/models/openai}/OpenAiImageApi.java | 6 +-- .../ai/models/openai}/OpenAiImageClient.java | 14 +++---- .../ai/models/openai}/OpenAiImageOptions.java | 8 ++-- .../openai}/api/OpenAiImageRequest.java | 2 +- .../openai}/api/OpenAiImageResponse.java | 2 +- .../openai}/enums/OpenAiImageModelEnum.java | 2 +- .../openai}/enums/OpenAiImageStyleEnum.java | 2 +- .../ai/models/tongyi}/QianWenChatClient.java | 11 +++--- .../ai/models/tongyi}/QianWenChatModal.java | 2 +- .../ai/models/tongyi}/QianWenOptions.java | 4 +- .../ai/models/tongyi}/api/QianWenApi.java | 8 ++-- .../tongyi}/api/QianWenChatCompletion.java | 2 +- .../api/QianWenChatCompletionMessage.java | 2 +- .../api/QianWenChatCompletionRequest.java | 2 +- .../ai/models/tongyi}/package-info.java | 2 +- .../ai/models/xinghuo}/XingHuoChatClient.java | 13 ++++--- .../ai/models/xinghuo}/XingHuoChatModel.java | 2 +- .../ai/models/xinghuo}/XingHuoOptions.java | 4 +- .../ai/models/xinghuo}/api/XingHuoApi.java | 6 +-- .../xinghuo}/api/XingHuoChatCompletion.java | 2 +- .../api/XingHuoChatCompletionMessage.java | 2 +- .../api/XingHuoChatCompletionRequest.java | 2 +- .../ai/models/yiyan}/YiYanChatClient.java | 19 +++++----- .../ai/models/yiyan}/YiYanChatModel.java | 2 +- .../ai/models/yiyan}/YiYanOptions.java | 6 +-- .../ai/models/yiyan}/api/YiYanApi.java | 9 ++--- .../ai/models/yiyan}/api/YiYanAuthRes.java | 2 +- .../yiyan}/api/YiYanChatCompletion.java | 2 +- .../api/YiYanChatCompletionMessage.java | 2 +- .../api/YiYanChatCompletionRequest.java | 2 +- .../yiyan}/exception/YiYanApiException.java | 2 +- .../org/springframework/ai/package-info.java | 15 ++++++++ ...AbstractConversionServiceOutputParser.java | 2 +- .../AbstractMessageConverterOutputParser.java | 2 +- .../ai/parser/BeanOutputParser.java | 2 +- .../ai/parser/FormatProvider.java | 2 +- .../ai/parser/ListOutputParser.java | 2 +- .../ai/parser/MapOutputParser.java | 2 +- .../ai/parser/OutputParser.java | 2 +- .../springframework}/ai/parser/Parser.java | 2 +- .../springframework}/ai/parser/README.md | 0 .../ai/chat/QianWenChatClientTests.java | 19 +++++----- .../ai/chat/XingHuoChatClientMainTests.java | 4 +- .../ai/chat/XingHuoChatClientTests.java | 17 +++++---- .../framework/ai/chat/XingHuoOkHttpTests.java | 6 +-- .../framework/ai/chat/YiYanChatTests.java | 17 +++++---- .../MidjourneyInteractionsTests.java | 11 +++--- .../ai/midjourney/MidjourneyUtilTests.java | 2 +- .../midjourney/MidjourneyWebSocketTests.java | 7 ++-- .../openAiImage/OpenAiImageClientTests.java | 10 ++--- 154 files changed, 366 insertions(+), 359 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{ => core/enums}/AiPlatformEnum.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/{ => core}/exception/AiException.java (68%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/package-info.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/ChatClient.java (81%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/ChatException.java (82%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/ChatResponse.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/Generation.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/StreamingChatClient.java (83%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/AbstractMessage.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/AssistantMessage.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/ChatMessage.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/FunctionMessage.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/MediaData.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/Message.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/MessageType.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/SystemMessage.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/messages/UserMessage.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/ChatGenerationMetadata.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/ChatResponseMetadata.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/EmptyRateLimit.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/EmptyUsage.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/PromptMetadata.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/RateLimit.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/metadata/Usage.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/package-info.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/AssistantPromptTemplate.java (88%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/ChatOptions.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/ChatOptionsBuilder.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/ChatPromptTemplate.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/FunctionPromptTemplate.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/Prompt.java (87%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/PromptTemplate.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/PromptTemplateActions.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/PromptTemplateChatActions.java (66%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/PromptTemplateMessageActions.java (73%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/PromptTemplateStringActions.java (77%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/SystemPromptTemplate.java (88%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/chat/prompt/TemplateFormat.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/Image.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageClient.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageGeneration.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageGenerationMetadata.java (86%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageMessage.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageOptions.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageOptionsBuilder.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImagePrompt.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageResponse.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/image/ImageResponseMetadata.java (88%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelClient.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelOptions.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelOptionsUtils.java (99%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelRequest.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelResponse.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ModelResult.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ResponseMetadata.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/ResultMetadata.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/StreamingModelClient.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/AbstractFunctionCallSupport.java (99%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/AbstractFunctionCallback.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/FunctionCallback.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/FunctionCallbackContext.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/FunctionCallbackWrapper.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/FunctionCallingOptions.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/FunctionCallingOptionsBuilder.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/function/TypeResolverHelper.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/model/package-info.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/MidjourneyConfig.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/MidjourneyMessage.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/MidjourneyInteractions.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/MidjourneyInteractionsApi.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/req/AttachmentsReq.java (85%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/req/DescribeReq.java (85%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/req/ReRollReq.java (87%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/api/res/UploadAttachmentsRes.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/constants/MidjourneyConstants.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/constants/MidjourneyGennerateStatusEnum.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/constants/MidjourneyInteractionsEnum.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/constants/MidjourneyMessageTypeEnum.java (85%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/constants/MidjourneyNotifyCode.java (73%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/util/MidjourneyUtil.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/FailureCallback.java (57%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/MidjourneyMessageHandler.java (61%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/MidjourneyWebSocketStarter.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/SuccessCallback.java (66%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/WebSocketStarter.java (60%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/WssNotify.java (72%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai => org/springframework/ai/models}/midjourney/webSocket/listener/MidjourneyMessageListener.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/OpenAiImageApi.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/OpenAiImageClient.java (90%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/OpenAiImageOptions.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/api/OpenAiImageRequest.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/api/OpenAiImageResponse.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/enums/OpenAiImageModelEnum.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/imageopenai => org/springframework/ai/models/openai}/enums/OpenAiImageStyleEnum.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/QianWenChatClient.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/QianWenChatModal.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/QianWenOptions.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/api/QianWenApi.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/api/QianWenChatCompletion.java (62%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/api/QianWenChatCompletionMessage.java (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/api/QianWenChatCompletionRequest.java (84%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatqianwen => org/springframework/ai/models/tongyi}/package-info.java (86%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/XingHuoChatClient.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/XingHuoChatModel.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/XingHuoOptions.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/api/XingHuoApi.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/api/XingHuoChatCompletion.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/api/XingHuoChatCompletionMessage.java (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatxinghuo => org/springframework/ai/models/xinghuo}/api/XingHuoChatCompletionRequest.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/YiYanChatClient.java (91%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/YiYanChatModel.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/YiYanOptions.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/api/YiYanApi.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/api/YiYanAuthRes.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/api/YiYanChatCompletion.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/api/YiYanChatCompletionMessage.java (64%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/api/YiYanChatCompletionRequest.java (99%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework/ai/chatyiyan => org/springframework/ai/models/yiyan}/exception/YiYanApiException.java (81%) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/AbstractConversionServiceOutputParser.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/AbstractMessageConverterOutputParser.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/BeanOutputParser.java (99%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/FormatProvider.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/ListOutputParser.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/MapOutputParser.java (97%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/OutputParser.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/Parser.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{cn/iocoder/yudao/framework => org/springframework}/ai/parser/README.md (100%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index 6ee9489940..e15eff5904 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.ai.config; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.chat.ChatClient; -import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import org.springframework.ai.chat.ChatClient; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.models.tongyi.QianWenChatClient; +import org.springframework.ai.models.xinghuo.XingHuoChatClient; +import org.springframework.ai.models.yiyan.YiYanChatClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index 27bf11136b..b0f8abc398 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.MidjourneyMessage; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListRespVO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 7e57f7ea08..831b7622da 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; +import org.springframework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java index 306c1e086d..e251d55c85 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiApiKeyDO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.model; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java index 8c86127c34..7234280098 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.model; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java index 1b6e957d03..ed5ecf2179 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.ai.dal.vo; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import lombok.Data; import lombok.experimental.Accessors; +import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import org.springframework.ai.models.yiyan.YiYanChatModel; /** * modal config @@ -16,13 +19,13 @@ public class AiChatModalConfigVO { /** * 模型平台 (冗余,方便类型转换) - * 参考:{@link cn.iocoder.yudao.framework.ai.AiPlatformEnum} + * 参考:{@link AiPlatformEnum} */ private String platform; /** * 模型类型(冗余,方便类型转换) - * {@link cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel} - * {@link cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel} + * {@link YiYanChatModel} + * {@link XingHuoChatModel} */ private String type; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java index c7dce40e60..d77b4ec870 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.vo; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; +import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index a7dcd122d2..36316dc97e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.exceptions.ExceptionUtil; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.chat.ChatClient; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.StreamingChatClient; -import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import org.springframework.ai.chat.ChatClient; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.messages.MessageType; +import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index d306b4b2fb..4727127c9e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -2,18 +2,18 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.ai.exception.AiException; -import cn.iocoder.yudao.framework.ai.image.ImageGeneration; -import cn.iocoder.yudao.framework.ai.image.ImagePrompt; -import cn.iocoder.yudao.framework.ai.image.ImageResponse; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; -import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; +import cn.iocoder.yudao.framework.ai.core.exception.AiException; +import org.springframework.ai.image.ImageGeneration; +import org.springframework.ai.image.ImagePrompt; +import org.springframework.ai.image.ImageResponse; +import org.springframework.ai.models.openai.OpenAiImageClient; +import org.springframework.ai.models.openai.OpenAiImageOptions; +import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; +import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; +import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; +import org.springframework.ai.models.midjourney.api.req.ReRollReq; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; +import org.springframework.ai.models.midjourney.webSocket.WssNotify; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 0260a15116..d1ccc080e1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.ai.service.midjourneyHandler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; +import org.springframework.ai.models.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index ed6e16cee8..c185ffea58 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.service.model; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -14,7 +14,6 @@ import org.springframework.validation.annotation.Validated; import java.util.List; -import java.util.List; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 3a52489a5d..2195b4bcc8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -10,6 +10,7 @@ yudao-spring-boot-starter-ai + 21 @@ -17,6 +18,7 @@ UTF-8 + org.springframework spring-core diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 6eedb59972..88581f88ab 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.framework.ai.config; import cn.hutool.core.io.IoUtil; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatModal; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenOptions; -import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageApi; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; -import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; +import org.springframework.ai.models.tongyi.QianWenChatClient; +import org.springframework.ai.models.tongyi.QianWenChatModal; +import org.springframework.ai.models.tongyi.QianWenOptions; +import org.springframework.ai.models.tongyi.api.QianWenApi; +import org.springframework.ai.models.xinghuo.XingHuoChatClient; +import org.springframework.ai.models.xinghuo.XingHuoOptions; +import org.springframework.ai.models.xinghuo.api.XingHuoApi; +import org.springframework.ai.models.yiyan.YiYanChatClient; +import org.springframework.ai.models.yiyan.YiYanOptions; +import org.springframework.ai.models.yiyan.api.YiYanApi; +import org.springframework.ai.models.openai.OpenAiImageApi; +import org.springframework.ai.models.openai.OpenAiImageClient; +import org.springframework.ai.models.openai.OpenAiImageOptions; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; +import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; import org.springframework.boot.autoconfigure.AutoConfiguration; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java index 11246df684..1f17a12037 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.framework.ai.config; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import org.springframework.ai.models.xinghuo.XingHuoOptions; +import org.springframework.ai.models.yiyan.YiYanChatModel; import lombok.Data; import lombok.experimental.Accessors; -import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.LinkedHashMap; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 57ef69ef6a..a23b9109c5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.ai.config; -import cn.iocoder.yudao.framework.ai.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import org.springframework.ai.models.yiyan.YiYanChatModel; +import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; +import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index 3882e1a995..590797d175 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai; +package cn.iocoder.yudao.framework.ai.core.enums; import com.google.common.collect.Lists; import lombok.AllArgsConstructor; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/AiException.java similarity index 68% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/AiException.java index d98b7afc23..bad13c6914 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/exception/AiException.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/AiException.java @@ -1,5 +1,6 @@ -package cn.iocoder.yudao.framework.ai.exception; +package cn.iocoder.yudao.framework.ai.core.exception; +// TODO @fan:这个有办法干掉么? /** * ai 异常 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/package-info.java new file mode 100644 index 0000000000..b728517d06 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/package-info.java @@ -0,0 +1,4 @@ +/** + * 芋道 AI Starter,整体参考 spring-ai 拓展 + */ +package cn.iocoder.yudao.framework.ai.core; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java deleted file mode 100644 index ffd2ac9335..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * author: fansili - * time: 2024/3/12 20:29 - * - * TODO @fansili:包的想法,需要重点看看 - * - * 1. org.springframework.ai:包括 chat、image、model、parser、util 部分 - * - * 2. yudao.framework.models - * \qianwen 通义千问 - * \yiyan 文心一言 - * \xinghuo 星火 - * \midjourney - */ -package cn.iocoder.yudao.framework.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java similarity index 81% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java index 6fd8e8981b..bd6aa3e56c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat; +package org.springframework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.model.ModelClient; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.model.ModelClient; @FunctionalInterface public interface ChatClient extends ModelClient { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java similarity index 82% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java index 2b96601548..bc92226997 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatException.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chat; +package org.springframework.ai.chat; /** * 聊天异常 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java index a6de72d7a2..641212b973 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/ChatResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java @@ -13,13 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat; +package org.springframework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.metadata.ChatResponseMetadata; -import cn.iocoder.yudao.framework.ai.model.ModelResponse; +import org.springframework.ai.chat.metadata.ChatResponseMetadata; +import org.springframework.ai.model.ModelResponse; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java index 1835d16d29..ca17848358 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/Generation.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat; +package org.springframework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.AssistantMessage; -import cn.iocoder.yudao.framework.ai.chat.metadata.ChatGenerationMetadata; -import cn.iocoder.yudao.framework.ai.model.ModelResult; +import org.springframework.ai.chat.messages.AssistantMessage; +import org.springframework.ai.chat.metadata.ChatGenerationMetadata; +import org.springframework.ai.model.ModelResult; import org.springframework.lang.Nullable; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java similarity index 83% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java index fdd604f4df..079989db43 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/StreamingChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat; +package org.springframework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.model.StreamingModelClient; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.model.StreamingModelClient; import reactor.core.publisher.Flux; @FunctionalInterface diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java index 8c8e60d5a6..7cc9360725 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AbstractMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import org.springframework.core.io.Resource; import org.springframework.util.Assert; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java index 6a18eeba84..28710db1cc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/AssistantMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java index 16470135b2..194aa54afa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/ChatMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java index d8b6fccbdb..1faba6a794 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/FunctionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java index fed60221f6..9acd9b1515 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MediaData.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import org.springframework.util.Assert; import org.springframework.util.MimeType; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java index 89c7b4fb4a..10c893ad70 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/Message.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import java.util.List; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java index 2c803a0608..a227c45308 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/MessageType.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; public enum MessageType { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java index c474f24bda..f8c67f2b47 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/SystemMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import org.springframework.core.io.Resource; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java index 2b8f547f78..ca7f360c22 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/messages/UserMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.messages; +package org.springframework.ai.chat.messages; import org.springframework.core.io.Resource; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java index a90dda5bfc..d9f5fc56eb 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatGenerationMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; -import cn.iocoder.yudao.framework.ai.model.ResultMetadata; +import org.springframework.ai.model.ResultMetadata; import org.springframework.lang.Nullable; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java index ebcb4ab068..38eb1fd59c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/ChatResponseMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; -import cn.iocoder.yudao.framework.ai.model.ResponseMetadata; +import org.springframework.ai.model.ResponseMetadata; /** * Abstract Data Type (ADT) modeling common AI provider metadata returned in an AI diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java index 62aeeb531b..480a94d3ec 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyRateLimit.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; import java.time.Duration; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java index 11f0255c17..027e302793 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/EmptyUsage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; /** * A EmpytUsage implementation that returns zero for all property getters diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java index 94bad3aa50..becb12ded1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/PromptMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; import org.springframework.util.Assert; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java index 6842783bac..22dd64b186 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/RateLimit.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; import java.time.Duration; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java index cecbc828e7..de4fb9ac62 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/metadata/Usage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.metadata; +package org.springframework.ai.chat.metadata; /** * 抽象数据类型(ADT)封装关于人工智能提供商API使用的元数据根据AI请求。 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java index 17c341f007..98d92eb712 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java @@ -11,4 +11,4 @@ * This bounded context is designed to encapsulate all aspects of chat-based AI * functionalities, maintaining a clear boundary from other contexts within the AI domain. */ -package cn.iocoder.yudao.framework.ai.chat; \ No newline at end of file +package org.springframework.ai.chat; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java similarity index 88% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java index cfe91527e9..ae6373cf10 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/AssistantPromptTemplate.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.AssistantMessage; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.AssistantMessage; +import org.springframework.ai.chat.messages.Message; import org.springframework.core.io.Resource; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java index 979ca6b201..5c45a37baf 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.model.ModelOptions; +import org.springframework.ai.model.ModelOptions; /** * 聊天选项代表了常见的选项,可在不同的聊天模式中移植。 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java index c3e236ea09..f702f63509 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatOptionsBuilder.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; public class ChatOptionsBuilder { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java index a06c981c70..15f9ca5d4f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/ChatPromptTemplate.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.Message; import java.util.ArrayList; import java.util.List; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java index e94545c233..4c7ce981ff 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/FunctionPromptTemplate.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; public class FunctionPromptTemplate extends PromptTemplate { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java similarity index 87% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java index 95b5cd8aa4..a598b3c356 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/Prompt.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java @@ -14,13 +14,12 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.ChatResponse; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.model.ModelOptions; -import cn.iocoder.yudao.framework.ai.model.ModelRequest; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.model.ModelOptions; +import org.springframework.ai.model.ModelRequest; import java.util.Collections; import java.util.List; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java index 7c0c0f7f36..f1e910da0d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplate.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.parser.OutputParser; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.parser.OutputParser; import org.antlr.runtime.Token; import org.antlr.runtime.TokenStream; import org.springframework.core.io.Resource; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java index bdee00acb4..8097e3f359 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateActions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java similarity index 66% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java index 922d57c8d7..24d9f908c2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateChatActions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.Message; import java.util.List; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java similarity index 73% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java index 8de851a891..17ff492867 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateMessageActions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.Message; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java similarity index 77% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java index 58015b47d4..0cd9df3b2b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/PromptTemplateStringActions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java similarity index 88% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java index cafade4bb4..539287d070 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/SystemPromptTemplate.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.SystemMessage; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.SystemMessage; import org.springframework.core.io.Resource; import java.util.Map; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java index c22a78db33..1001ee2660 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chat/prompt/TemplateFormat.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.chat.prompt; +package org.springframework.ai.chat.prompt; public enum TemplateFormat { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java index d6fc44da09..3c6ae1ea12 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/Image.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; import java.util.Objects; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java index 98fc44ff63..1993fbe922 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ModelClient; +import org.springframework.ai.model.ModelClient; public interface ImageClient extends ModelClient { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java index 5ec655de80..924f5872a3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGeneration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ModelResult; +import org.springframework.ai.model.ModelResult; public class ImageGeneration implements ModelResult { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java similarity index 86% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java index 1d620d2c73..e140aa814b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageGenerationMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ResultMetadata; +import org.springframework.ai.model.ResultMetadata; public interface ImageGenerationMetadata extends ResultMetadata { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java index 6a01c6c21d..51d378b8c3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; import java.util.Objects; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java index d9cfd0e864..428376364d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ModelOptions; +import org.springframework.ai.model.ModelOptions; /** * ImageOptions represent the common options, portable across different image generation diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java index d1bc474739..49dc3497d3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageOptionsBuilder.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; public class ImageOptionsBuilder { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java index 75ec519485..4f9dcdc591 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ModelRequest; +import org.springframework.ai.model.ModelRequest; import java.util.Collections; import java.util.List; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java index ca91be5c00..d3e314526d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ModelResponse; +import org.springframework.ai.model.ModelResponse; import java.util.List; import java.util.Objects; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java similarity index 88% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java index c4332c6c35..78fa5e7de0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageResponseMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.image; +package org.springframework.ai.image; -import cn.iocoder.yudao.framework.ai.model.ResponseMetadata; +import org.springframework.ai.model.ResponseMetadata; public interface ImageResponseMetadata extends ResponseMetadata { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java index 705a7a9761..03bec4c70c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * The ModelClient interface provides a generic API for invoking AI models. It is designed diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java index 6a5a738fea..96b301b793 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * Interface representing the customizable options for AI model interactions. This marker diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java similarity index 99% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java index 0d6f740074..9360399b66 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelOptionsUtils.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java index 915aba26e0..b3c4969d47 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * 表示对AI模型的请求的接口。此接口封装了 与人工智能模型交互所需的必要信息,包括指令或 输入(通用类型T)和附加模型选项。它提供了一种标准化的方式 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java index 0bc0cc5939..b3f40ffe74 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; import java.util.List; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java index 616be18171..5a5613a728 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ModelResult.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * This interface provides methods to access the main output of the AI model and the diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java index 2a85cdf7ae..15e685d02d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResponseMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * 表示与AI模型的响应相关联的元数据的接口。此接口 旨在提供有关人工智能生成反应的附加信息 模型,包括处理细节和模型特定数据。它是一种价值 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java index 528b764596..78d5f7f6a9 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/ResultMetadata.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; /** * Interface representing metadata associated with the results of an AI model. This diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java index abbe8598c1..da1db15048 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/StreamingModelClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model; +package org.springframework.ai.model; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java similarity index 99% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java index 33409f72d6..67a34b1b1c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallSupport.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; import org.springframework.util.CollectionUtils; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java index 044c1813c3..801ea3c106 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/AbstractFunctionCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java index a14a59b8fc..91fc3ba8aa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; /** * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java index ca24e2673d..5524182bc2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackContext.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; import com.fasterxml.jackson.annotation.JsonClassDescription; import org.springframework.beans.BeansException; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java index d824121252..23c981b0e4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallbackWrapper.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; -import cn.iocoder.yudao.framework.ai.model.ModelOptionsUtils; +import org.springframework.ai.model.ModelOptionsUtils; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.util.Assert; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java index fdb42d6a4d..c66a4f5b18 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; import java.util.List; import java.util.Set; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java index 4fc258b4a3..44044400db 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/FunctionCallingOptionsBuilder.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.util.Assert; import java.util.ArrayList; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java index e1c8c49325..604ce0adc7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/function/TypeResolverHelper.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.model.function; +package org.springframework.ai.model.function; import net.jodah.typetools.TypeResolver; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java index d2cf8e37bf..12eaa53b40 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/model/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java @@ -8,4 +8,4 @@ * ensuring a broad applicability across diverse AI scenarios. * */ -package cn.iocoder.yudao.framework.ai.model; \ No newline at end of file +package org.springframework.ai.model; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyConfig.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyConfig.java index 8f749baf42..ea35c7768b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyConfig.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyConfig.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package org.springframework.ai.models.midjourney; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyMessage.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyMessage.java index 3ee83be1e0..30ce8ceac3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/MidjourneyMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.midjourney; +package org.springframework.ai.models.midjourney; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; +import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractions.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractions.java index 76549239a1..6e64b2cb13 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractions.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api; +package org.springframework.ai.models.midjourney.api; import cn.hutool.core.util.IdUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.constants.MidjourneyConstants; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpHeaders; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java index 7a578c832b..3771113d07 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/MidjourneyInteractionsApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api; +package org.springframework.ai.models.midjourney.api; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.AttachmentsReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.DescribeReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.res.UploadAttachmentsRes; -import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.api.req.AttachmentsReq; +import org.springframework.ai.models.midjourney.api.req.DescribeReq; +import org.springframework.ai.models.midjourney.api.req.ReRollReq; +import org.springframework.ai.models.midjourney.api.res.UploadAttachmentsRes; +import org.springframework.ai.models.midjourney.util.MidjourneyUtil; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.google.common.collect.Lists; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/AttachmentsReq.java similarity index 85% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/AttachmentsReq.java index ed18a4834b..97de61bc6b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/AttachmentsReq.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/AttachmentsReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api.req; +package org.springframework.ai.models.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/DescribeReq.java similarity index 85% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/DescribeReq.java index 49a4ab31ac..62e13c895f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/DescribeReq.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/DescribeReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api.req; +package org.springframework.ai.models.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/ReRollReq.java similarity index 87% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/ReRollReq.java index 0d83689875..990b60e5bd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/req/ReRollReq.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/req/ReRollReq.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api.req; +package org.springframework.ai.models.midjourney.api.req; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/res/UploadAttachmentsRes.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/res/UploadAttachmentsRes.java index cba21c974f..6d8c0e908e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/api/res/UploadAttachmentsRes.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/res/UploadAttachmentsRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.api.res; +package org.springframework.ai.models.midjourney.api.res; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyConstants.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyConstants.java index 29387a27ba..b80ae6e985 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyConstants.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.constants; +package org.springframework.ai.models.midjourney.constants; public final class MidjourneyConstants { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyGennerateStatusEnum.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyGennerateStatusEnum.java index ef7147beb7..1d2d36b0cd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyGennerateStatusEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyGennerateStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.constants; +package org.springframework.ai.models.midjourney.constants; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyInteractionsEnum.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyInteractionsEnum.java index 08832e78bd..1f5bbc4485 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyInteractionsEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyInteractionsEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.constants; +package org.springframework.ai.models.midjourney.constants; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyMessageTypeEnum.java similarity index 85% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyMessageTypeEnum.java index 9c8eb9ed53..b13a4efe8c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyMessageTypeEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyMessageTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.constants; +package org.springframework.ai.models.midjourney.constants; public enum MidjourneyMessageTypeEnum { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyNotifyCode.java similarity index 73% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyNotifyCode.java index 1dccb8a415..b2cc65a3d0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/constants/MidjourneyNotifyCode.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/constants/MidjourneyNotifyCode.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.constants; +package org.springframework.ai.models.midjourney.constants; import lombok.experimental.UtilityClass; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/util/MidjourneyUtil.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/util/MidjourneyUtil.java index 7e4c94e2be..50376b3f0d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MidjourneyUtil.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/util/MidjourneyUtil.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.framework.ai.midjourney.util; +package org.springframework.ai.models.midjourney.util; import cn.hutool.core.text.CharSequenceUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.MidjourneyMessage; import java.util.Map; import java.util.regex.Matcher; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/FailureCallback.java similarity index 57% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/FailureCallback.java index 29bdb062c7..9e03c076a4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/FailureCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/FailureCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; public interface FailureCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyMessageHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyMessageHandler.java similarity index 61% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyMessageHandler.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyMessageHandler.java index d5522fc82e..efb7948999 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyMessageHandler.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.MidjourneyMessage; /** * message handler diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyWebSocketStarter.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyWebSocketStarter.java index ddf7f3f7b7..d4c81f369e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/MidjourneyWebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/MidjourneyWebSocketStarter.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyNotifyCode; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler.MidjourneyWebSocketHandler; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.constants.MidjourneyNotifyCode; +import org.springframework.ai.models.midjourney.webSocket.handler.MidjourneyWebSocketHandler; +import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.websocket.Constants; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/SuccessCallback.java similarity index 66% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/SuccessCallback.java index 729498fbc8..3b0426da0e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/SuccessCallback.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/SuccessCallback.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; public interface SuccessCallback { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WebSocketStarter.java similarity index 60% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WebSocketStarter.java index 5a438aacc1..0b48eaab39 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WebSocketStarter.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WebSocketStarter.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; public interface WebSocketStarter { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WssNotify.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WssNotify.java similarity index 72% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WssNotify.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WssNotify.java index 33c8a29e8e..8b85c39cc0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/WssNotify.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/WssNotify.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket; +package org.springframework.ai.models.midjourney.webSocket; /** * 通知信息 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java index b6fbf5c217..8f985c425c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/handler/MidjourneyWebSocketHandler.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket.handler; +package org.springframework.ai.models.midjourney.webSocket.handler; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.http.useragent.UserAgent; import cn.hutool.http.useragent.UserAgentUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.FailureCallback; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.SuccessCallback; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.webSocket.FailureCallback; +import org.springframework.ai.models.midjourney.webSocket.SuccessCallback; +import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataArray; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/listener/MidjourneyMessageListener.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/listener/MidjourneyMessageListener.java index 0d196faf92..c99309e5a0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/webSocket/listener/MidjourneyMessageListener.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/webSocket/listener/MidjourneyMessageListener.java @@ -1,16 +1,16 @@ -package cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener; +package org.springframework.ai.models.midjourney.webSocket.listener; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyConfig; -import cn.iocoder.yudao.framework.ai.midjourney.MidjourneyMessage; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyConstants; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyGennerateStatusEnum; -import cn.iocoder.yudao.framework.ai.midjourney.constants.MidjourneyMessageTypeEnum; -import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyMessageHandler; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.constants.MidjourneyConstants; +import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; +import org.springframework.ai.models.midjourney.constants.MidjourneyMessageTypeEnum; +import org.springframework.ai.models.midjourney.util.MidjourneyUtil; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import lombok.extern.slf4j.Slf4j; import net.dv8tion.jda.api.utils.data.DataObject; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java index efc15a3ba6..6cde315e77 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.framework.ai.imageopenai; +package org.springframework.ai.models.openai; import cn.hutool.json.JSONUtil; -import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; -import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; +import org.springframework.ai.models.openai.api.OpenAiImageRequest; +import org.springframework.ai.models.openai.api.OpenAiImageResponse; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import io.netty.channel.ChannelOption; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java similarity index 90% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java index 4dd536f99c..558a0e6e80 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java @@ -1,17 +1,17 @@ -package cn.iocoder.yudao.framework.ai.imageopenai; +package org.springframework.ai.models.openai; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.codec.Base64; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; -import cn.iocoder.yudao.framework.ai.chat.ChatException; -import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; -import cn.iocoder.yudao.framework.ai.exception.AiException; -import cn.iocoder.yudao.framework.ai.image.*; -import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageRequest; -import cn.iocoder.yudao.framework.ai.imageopenai.api.OpenAiImageResponse; +import org.springframework.ai.chat.ChatException; +import org.springframework.ai.models.yiyan.exception.YiYanApiException; +import cn.iocoder.yudao.framework.ai.core.exception.AiException; +import org.springframework.ai.models.openai.api.OpenAiImageRequest; +import org.springframework.ai.models.openai.api.OpenAiImageResponse; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; +import org.springframework.ai.image.*; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; import org.springframework.retry.RetryListener; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java index c2fa74890a..c6c903031e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.framework.ai.imageopenai; +package org.springframework.ai.models.openai; -import cn.iocoder.yudao.framework.ai.image.ImageOptions; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.imageopenai.enums.OpenAiImageStyleEnum; +import org.springframework.ai.image.ImageOptions; +import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; +import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.Getter; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java index 44ee174a2e..0c01e1ea07 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai.api; +package org.springframework.ai.models.openai.api; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java index 02698963ed..beab4cdee1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/api/OpenAiImageResponse.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai.api; +package org.springframework.ai.models.openai.api; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java index 08cd2ae95e..635c62bba9 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageModelEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai.enums; +package org.springframework.ai.models.openai.enums; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java index 63feb85d33..d7999cd728 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/enums/OpenAiImageStyleEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.imageopenai.enums; +package org.springframework.ai.models.openai.enums; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java index e18ebe0367..7707d68791 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java @@ -1,10 +1,11 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen; +package org.springframework.ai.models.tongyi; import cn.iocoder.yudao.framework.ai.chat.*; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; -import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import org.springframework.ai.chat.*; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.tongyi.api.QianWenApi; +import org.springframework.ai.models.yiyan.exception.YiYanApiException; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; import com.alibaba.dashscope.common.Message; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatModal.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatModal.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java index 7fd9411bf6..9474a8df59 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatModal.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen; +package org.springframework.ai.models.tongyi; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java index 4cec86466e..9a677607df 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen; +package org.springframework.ai.models.tongyi; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.ChatOptions; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java index c5d2bb680c..2e905114f1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java @@ -1,12 +1,10 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen.api; +package org.springframework.ai.models.tongyi.api; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatModal; -import cn.iocoder.yudao.framework.ai.exception.AiException; +import org.springframework.ai.models.tongyi.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.core.exception.AiException; import com.alibaba.dashscope.aigc.generation.Generation; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; -import com.alibaba.dashscope.common.Message; -import com.alibaba.dashscope.common.Role; import com.alibaba.dashscope.exception.InputRequiredException; import com.alibaba.dashscope.exception.NoApiKeyException; import io.reactivex.Flowable; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java similarity index 62% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java index 474a7d826c..1c3c6109b5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen.api; +package org.springframework.ai.models.tongyi.api; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java index 07680cbf4a..4e5d02323a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen.api; +package org.springframework.ai.models.tongyi.api; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java similarity index 84% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java index 5017ea4ea0..04b69848fd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/api/QianWenChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatqianwen.api; +package org.springframework.ai.models.tongyi.api; import com.alibaba.dashscope.aigc.generation.models.QwenParam; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java similarity index 86% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java index c22dbe067d..8d7793b342 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java @@ -8,4 +8,4 @@ * author: fansili * time: 2024/3/13 21:05 */ -package cn.iocoder.yudao.framework.ai.chatqianwen; \ No newline at end of file +package org.springframework.ai.models.tongyi; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java index 90ae6dfeea..9025d82fa7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java @@ -1,13 +1,14 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo; +package org.springframework.ai.models.xinghuo; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.chat.*; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import org.springframework.ai.chat.*; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.xinghuo.api.XingHuoApi; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java index 5be9f40a9c..859e41c037 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoChatModel.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo; +package org.springframework.ai.models.xinghuo; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java index 7d56032828..8efa7527b5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/XingHuoOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo; +package org.springframework.ai.models.xinghuo; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.ChatOptions; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java index e2a85779e6..027e8a2d27 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java @@ -1,10 +1,8 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo.api; +package org.springframework.ai.models.xinghuo.api; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import org.springframework.ai.models.xinghuo.XingHuoChatModel; import lombok.Data; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java index a0f9653270..e419d522ea 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo.api; +package org.springframework.ai.models.xinghuo.api; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java index faa3c8c737..f0e0f8d1ec 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo.api; +package org.springframework.ai.models.xinghuo.api; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java index a90697bfcc..3f2b211ff8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatxinghuo/api/XingHuoChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatxinghuo.api; +package org.springframework.ai.models.xinghuo.api; import lombok.Data; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java similarity index 91% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java index d95e9fb99a..fecc6acc0c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java @@ -1,15 +1,16 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan; +package org.springframework.ai.models.yiyan; import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.framework.ai.chat.*; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.MessageType; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; -import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import org.springframework.ai.chat.*; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.MessageType; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.yiyan.api.YiYanApi; +import org.springframework.ai.models.yiyan.api.YiYanChatCompletion; +import org.springframework.ai.models.yiyan.api.YiYanChatCompletionRequest; +import org.springframework.ai.models.yiyan.exception.YiYanApiException; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; import org.springframework.http.ResponseEntity; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java index 4c8b3aa85e..abed185e62 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanChatModel.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan; +package org.springframework.ai.models.yiyan; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java index 84f0ced4cb..aac8e49492 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/YiYanOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan; +package org.springframework.ai.models.yiyan; -import cn.iocoder.yudao.framework.ai.chat.prompt.ChatOptions; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.models.yiyan.api.YiYanChatCompletionRequest; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java index ad1059b1aa..a8f4aa3222 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java @@ -1,10 +1,7 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.api; +package org.springframework.ai.models.yiyan.api; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanAuthRes; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletion; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanChatCompletionRequest; -import cn.iocoder.yudao.framework.ai.chatyiyan.exception.YiYanApiException; +import org.springframework.ai.models.yiyan.YiYanChatModel; +import org.springframework.ai.models.yiyan.exception.YiYanApiException; import lombok.Data; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java index e828858c23..f9f1f27dbb 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanAuthRes.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.api; +package org.springframework.ai.models.yiyan.api; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java index b995da82a2..8e02db6592 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.api; +package org.springframework.ai.models.yiyan.api; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java similarity index 64% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java index ce6259c76d..278b1a7d6b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.api; +package org.springframework.ai.models.yiyan.api; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java similarity index 99% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java index de6c19ee1a..22e9188351 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/api/YiYanChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.api; +package org.springframework.ai.models.yiyan.api; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java similarity index 81% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java index dbb8ed93a5..94850f56a2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatyiyan/exception/YiYanApiException.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.framework.ai.chatyiyan.exception; +package org.springframework.ai.models.yiyan.exception; /** * 一言 api 调用异常 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java new file mode 100644 index 0000000000..b38419f6f7 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java @@ -0,0 +1,15 @@ +/** + * 从 https://github.com/spring-projects/spring-ai 拷贝。 + * + * 最大目的:适配 JDK8 兼容性 + * + * 包路径: + * 1. chat、parser、model、parser 包:https://github.com/spring-projects/spring-ai/tree/main/spring-ai-core 拷贝 + * 2. models 包:对标 https://github.com/spring-projects/spring-ai/tree/main/models 拷贝 + * 2.1 tongyi 包:【阿里】通义千问,对标 spring-cloud-alibaba 提供的 ai 包 + * 2.2 yiyan 包:【百度】文心一言,自己实现 + * 2.3 xinghuo 包:【讯飞】星火,自己实现 + * 2.4 openai 包:【OpenAI】ChatGPT,拷贝 spring-ai 提供的 models/openai 包 + * 2.5 midjourney 包:Midjourney,参考 https://github.com/novicezk/midjourney-proxy 实现 + */ +package org.springframework.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java index cee9fff425..a06827f399 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractConversionServiceOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; import org.springframework.core.convert.support.DefaultConversionService; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java index abe5005abc..01dbadaf14 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/AbstractMessageConverterOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; import org.springframework.messaging.converter.MessageConverter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java similarity index 99% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java index 109e75fc44..fa09c26af0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/BeanOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.util.DefaultIndenter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java index 53d0017293..8d0cb76b09 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/FormatProvider.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; /** * Implementations of this interface provides instructions for how the output of a diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java index 37fd49b89a..d112257973 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/ListOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; import org.springframework.core.convert.support.DefaultConversionService; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java index bd57b3b44a..90f017f794 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/MapOutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; import org.springframework.messaging.Message; import org.springframework.messaging.converter.MappingJackson2MessageConverter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java index 1543532b37..cbc7e6e5a5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/OutputParser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; /** * Converts the (raw) LLM output into a structured responses of type. The diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java index 6016ee51c7..559473f080 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/Parser.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package cn.iocoder.yudao.framework.ai.parser; +package org.springframework.ai.parser; @FunctionalInterface public interface Parser { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md similarity index 100% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/parser/README.md rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 16ddfa45d9..0882f72a0f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.framework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.SystemMessage; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatClient; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenChatModal; -import cn.iocoder.yudao.framework.ai.chatqianwen.QianWenOptions; -import cn.iocoder.yudao.framework.ai.chatqianwen.api.QianWenApi; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.messages.SystemMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.tongyi.QianWenChatClient; +import org.springframework.ai.models.tongyi.QianWenChatModal; +import org.springframework.ai.models.tongyi.QianWenOptions; +import org.springframework.ai.models.tongyi.api.QianWenApi; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; import com.alibaba.dashscope.common.Message; @@ -46,7 +47,7 @@ public class QianWenChatClientTests { @Test public void callTest() { - List messages = new ArrayList<>(); + List messages = new ArrayList<>(); messages.add(new SystemMessage("你是一个优质的小红书文艺作者,抒写着各城市的美好文化和风景。")); messages.add(new UserMessage("长沙怎么样?")); @@ -56,7 +57,7 @@ public class QianWenChatClientTests { @Test public void streamTest() { - List messages = new ArrayList<>(); + List messages = new ArrayList<>(); messages.add(new SystemMessage("你是一个优质的文言文作者,用文言文描述着各城市的人文风景。")); messages.add(new UserMessage("长沙怎么样?")); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java index 674e4dc6d0..77cf9effcd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; import org.springframework.web.reactive.socket.client.WebSocketClient; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java index ee32b67179..44793907ea 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java @@ -1,13 +1,14 @@ package cn.iocoder.yudao.framework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.SystemMessage; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoOptions; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoApi; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.SystemMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.xinghuo.XingHuoChatClient; +import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import org.springframework.ai.models.xinghuo.XingHuoOptions; +import org.springframework.ai.models.xinghuo.api.XingHuoApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java index 3f29032013..f45f964125 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import cn.iocoder.yudao.framework.ai.chatxinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletion; -import cn.iocoder.yudao.framework.ai.chatxinghuo.api.XingHuoChatCompletionRequest; +import org.springframework.ai.models.xinghuo.XingHuoChatClient; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; +import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; import okhttp3.*; import org.jetbrains.annotations.NotNull; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java index df98541fcb..f54ae39c8b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java @@ -1,13 +1,14 @@ package cn.iocoder.yudao.framework.ai.chat; -import cn.iocoder.yudao.framework.ai.chat.messages.Message; -import cn.iocoder.yudao.framework.ai.chat.messages.SystemMessage; -import cn.iocoder.yudao.framework.ai.chat.messages.UserMessage; -import cn.iocoder.yudao.framework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatModel; -import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; -import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.messages.Message; +import org.springframework.ai.chat.messages.SystemMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.models.yiyan.YiYanChatClient; +import org.springframework.ai.models.yiyan.YiYanChatModel; +import org.springframework.ai.models.yiyan.YiYanOptions; +import org.springframework.ai.models.yiyan.api.YiYanApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java index fda7818f05..d93ac0b259 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyInteractionsTests.java @@ -2,11 +2,12 @@ package cn.iocoder.yudao.framework.ai.midjourney; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdUtil; -import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.AttachmentsReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.DescribeReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq; -import cn.iocoder.yudao.framework.ai.midjourney.api.res.UploadAttachmentsRes; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; +import org.springframework.ai.models.midjourney.api.req.AttachmentsReq; +import org.springframework.ai.models.midjourney.api.req.DescribeReq; +import org.springframework.ai.models.midjourney.api.req.ReRollReq; +import org.springframework.ai.models.midjourney.api.res.UploadAttachmentsRes; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import org.junit.Before; import org.junit.Test; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java index 39d64931f5..b5604b86df 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyUtilTests.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.ai.midjourney; -import cn.iocoder.yudao.framework.ai.midjourney.util.MidjourneyUtil; +import org.springframework.ai.models.midjourney.util.MidjourneyUtil; import org.junit.Test; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java index cf90b17d82..ff0395653d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/midjourney/MidjourneyWebSocketTests.java @@ -1,9 +1,10 @@ package cn.iocoder.yudao.framework.ai.midjourney; import cn.hutool.core.io.FileUtil; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener; -import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter; +import org.springframework.ai.models.midjourney.MidjourneyConfig; +import org.springframework.ai.models.midjourney.webSocket.WssNotify; +import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; import org.junit.Before; import org.junit.Test; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java index b85ec8841e..ba439c683c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.ai.openAiImage; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageApi; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageClient; -import cn.iocoder.yudao.framework.ai.imageopenai.OpenAiImageOptions; -import cn.iocoder.yudao.framework.ai.image.ImagePrompt; -import cn.iocoder.yudao.framework.ai.image.ImageResponse; +import org.springframework.ai.models.openai.OpenAiImageApi; +import org.springframework.ai.models.openai.OpenAiImageClient; +import org.springframework.ai.models.openai.OpenAiImageOptions; +import org.springframework.ai.image.ImagePrompt; +import org.springframework.ai.image.ImageResponse; import org.junit.Before; import org.junit.Test; -- Gitee From 37952c6a102368c9b3e53828b66bf86deb8d7a1b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 12 May 2024 19:53:45 +0800 Subject: [PATCH 0527/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=B0=83=E6=95=B4=20ai=20starter=20=E7=9A=84?= =?UTF-8?q?=E5=8C=85=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/springframework/ai/models/tongyi/QianWenChatClient.java | 1 - .../org/springframework/ai/models/xinghuo/XingHuoChatClient.java | 1 - .../org/springframework/ai/models/yiyan/YiYanChatClient.java | 1 - 3 files changed, 3 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java index 7707d68791..c1d0d41bf6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java @@ -1,6 +1,5 @@ package org.springframework.ai.models.tongyi; -import cn.iocoder.yudao.framework.ai.chat.*; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java index 9025d82fa7..740d749109 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java @@ -2,7 +2,6 @@ package org.springframework.ai.models.xinghuo; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.exceptions.ExceptionUtil; -import cn.iocoder.yudao.framework.ai.chat.*; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java index fecc6acc0c..8199766296 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java @@ -1,7 +1,6 @@ package org.springframework.ai.models.yiyan; import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.yudao.framework.ai.chat.*; import org.springframework.ai.chat.*; import org.springframework.ai.chat.messages.Message; import org.springframework.ai.chat.messages.MessageType; -- Gitee From 6bc1f8d0f949cd3f09d7b4d39f55633eb85f02f7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 May 2024 13:12:33 +0800 Subject: [PATCH 0528/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E4=B8=B4=E6=97=B6=E8=A7=A3=E5=86=B3=20send-stream=20?= =?UTF-8?q?=E8=A2=AB=E6=9D=83=E9=99=90=E6=8B=A6=E6=88=AA=20Access=20Denied?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/chat/AiChatMessageController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index fb0d9f5ad3..7a6c1bc12d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.validation.annotation.Validated; @@ -37,6 +38,7 @@ public class AiChatMessageController { // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) + @PermitAll // 解决 SSE 最终响应的时候,会被 Access Denied 拦截的问题 public Flux sendMessageStream(@Validated @RequestBody AiChatMessageSendStreamReqVO sendReqVO) { return chatService.chatStream(sendReqVO); } -- Gitee From f85ca1f88ff62b8e12ef355de9e7d87df01b13df Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 13 May 2024 14:27:01 +0800 Subject: [PATCH 0529/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E6=9D=A1=E4=BB=B6=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=96=B0=E5=A2=9E=E6=9D=A1=E4=BB=B6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmSimpleModeConditionType.java | 3 +- .../config/BpmFlowableConfiguration.java | 4 ++ ...riableConvertByTypeExpressionFunction.java | 29 +++++++++ .../core/enums/SimpleModelConstants.java | 5 ++ .../simple/SimpleModelConditionGroups.java | 63 +++++++++++++++++++ .../flowable/core/util/SimpleModelUtils.java | 30 ++++++++- 6 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/el/VariableConvertByTypeExpressionFunction.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelConditionGroups.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java index 9c9732a206..f6dd04365f 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModeConditionType.java @@ -13,7 +13,8 @@ import lombok.Getter; @AllArgsConstructor public enum BpmSimpleModeConditionType { - CUSTOM_EXPRESSION(1, "自定义条件表达式"); + EXPRESSION(1, "条件表达式"), + RULE(2, "条件规则"); private final Integer type; private final String name; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java index 8e69fdc752..e79437b436 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCand import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate; import org.flowable.common.engine.api.delegate.event.FlowableEventListener; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; @@ -56,12 +57,15 @@ public class BpmFlowableConfiguration { @Bean public EngineConfigurationConfigurer bpmProcessEngineConfigurationConfigurer( ObjectProvider listeners, + ObjectProvider customFlowableFunctionDelegates, BpmActivityBehaviorFactory bpmActivityBehaviorFactory) { return configuration -> { // 注册监听器,例如说 BpmActivityEventListener configuration.setEventListeners(ListUtil.toList(listeners.iterator())); // 设置 ActivityBehaviorFactory 实现类,用于流程任务的审核人的自定义 configuration.setActivityBehaviorFactory(bpmActivityBehaviorFactory); + // 设置自定义的函数 + configuration.setCustomFlowableFunctionDelegates(ListUtil.toList(customFlowableFunctionDelegates.stream().iterator())); }; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/el/VariableConvertByTypeExpressionFunction.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/el/VariableConvertByTypeExpressionFunction.java new file mode 100644 index 0000000000..5ecba588c6 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/el/VariableConvertByTypeExpressionFunction.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.el; + +import org.flowable.common.engine.api.variable.VariableContainer; +import org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction; +import org.springframework.stereotype.Component; + +/** + * 根据流程变量 variable 的类型, 转换参数的值 + * + * @author jason + */ +@Component +public class VariableConvertByTypeExpressionFunction extends AbstractFlowableVariableExpressionFunction { + + public VariableConvertByTypeExpressionFunction() { + super("convertByType"); + } + + public static Object convertByType(VariableContainer variableContainer, String variableName, Object parmaValue) { + Object variable = variableContainer.getVariable(variableName); + if (variable != null && parmaValue != null) { + // 如果值不是字符串类型, 流程变量的类型是字符串。 把值转成字符串 + if (!(parmaValue instanceof String) && variable instanceof String ) { + return parmaValue.toString(); + } + } + return parmaValue; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java index 96dc6733a2..33e2c016eb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/SimpleModelConstants.java @@ -30,4 +30,9 @@ public interface SimpleModelConstants { */ String CONDITION_EXPRESSION_ATTRIBUTE = "conditionExpression"; + /** + * 条件规则的条件组属性 + */ + String CONDITION_GROUPS_ATTRIBUTE = "conditionGroups"; + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelConditionGroups.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelConditionGroups.java new file mode 100644 index 0000000000..ccf7af9493 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelConditionGroups.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.simple; + +import lombok.Data; + +import java.util.List; + +/** + * 仿钉钉流程设计器条件节点的条件组 Model + * + * @author jason + */ +@Data +public class SimpleModelConditionGroups { + + /** + * 条件组的逻辑关系是否为与的关系 + */ + private Boolean and; + + /** + * 条件组下的条件 + */ + private List conditions; + + @Data + public static class SimpleModelCondition { + + /** + * 条件下面多个规则的逻辑关系是否为与的关系 + */ + private Boolean and; + + + /** + * 条件下的规则 + */ + private List rules; + } + + @Data + public static class ConditionRule { + + /** + * 类型. TODO 暂时未定义, 未想好 + */ + private Integer type; + + /** + * 运行符号. 例如 == < + */ + private String opCode; + + /** + * 运算符左边的值 + */ + private String leftSide; + + /** + * 运算符右边的值 + */ + private String rightSide; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 33d8615581..49eac0371f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -1,18 +1,22 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.TypeReference; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.BooleanUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmApproveMethodEnum; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModeConditionType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelConditionGroups; import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; @@ -143,12 +147,34 @@ public class SimpleModelUtils { Integer conditionType = MapUtil.getInt(conditionNode.getAttributes(), CONDITION_TYPE_ATTRIBUTE); BpmSimpleModeConditionType conditionTypeEnum = BpmSimpleModeConditionType.valueOf(conditionType); String conditionExpression = null; - if (conditionTypeEnum == BpmSimpleModeConditionType.CUSTOM_EXPRESSION) { + if (conditionTypeEnum == BpmSimpleModeConditionType.EXPRESSION) { conditionExpression = MapUtil.getStr(conditionNode.getAttributes(), CONDITION_EXPRESSION_ATTRIBUTE); } + if (conditionTypeEnum == BpmSimpleModeConditionType.RULE) { + SimpleModelConditionGroups conditionGroups = BeanUtil.toBean(MapUtil.get(conditionNode.getAttributes(), + CONDITION_GROUPS_ATTRIBUTE, new TypeReference>() { + }), + SimpleModelConditionGroups.class); + if (conditionGroups != null && CollUtil.isNotEmpty(conditionGroups.getConditions())) { + List strConditionGroups = conditionGroups.getConditions().stream().map(item -> { + if (CollUtil.isNotEmpty(item.getRules())) { + Boolean and = item.getAnd(); + List list = CollectionUtils.convertList(item.getRules(), (rule) -> { + // 如果非数值类型加引号 + String rightSide = NumberUtil.isNumber(rule.getRightSide()) ? rule.getRightSide() : "\"" + rule.getRightSide() + "\""; + return String.format(" %s %s var:convertByType(%s,%s)", rule.getLeftSide(), rule.getOpCode(), rule.getLeftSide(), rightSide); + }); + return "(" + CollUtil.join(list, and ? " && " : " || ") + ")"; + } else { + return ""; + } + }).toList(); + conditionExpression = String.format("${%s}", CollUtil.join(strConditionGroups, conditionGroups.getAnd() ? " && " : " || ")); + } + + } // TODO 待增加其它类型 return conditionExpression; - } private static SequenceFlow buildBpmnSequenceFlow(String sourceId, String targetId, String seqFlowId, String seqName, String conditionExpression) { -- Gitee From 1676f671d8170144ec64acfe9ef451913ed0dd47 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 May 2024 20:46:37 +0800 Subject: [PATCH 0530/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E8=A7=92=E8=89=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8850%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 12 +- .../admin/model/AiChatRoleController.java | 88 +++++++----- .../model/vo/role/AiChatRoleAddReqVO.java | 52 ------- .../model/vo/role/AiChatRoleListReqVO.java | 20 --- .../model/vo/role/AiChatRoleListRespVO.java | 52 ------- .../model/vo/role/AiChatRolePageReqVO.java | 27 ++++ .../admin/model/vo/role/AiChatRoleRespVO.java | 56 +++++--- .../model/vo/role/AiChatRoleSaveReqVO.java | 57 ++++++++ .../AiChatRoleUpdatePublicStatusReqVO.java | 27 ---- .../model/vo/role/AiChatRoleUpdateReqVO.java | 62 --------- .../module/ai/convert/AiChatRoleConvert.java | 56 -------- .../ai/dal/dataobject/model/AiChatRoleDO.java | 7 +- .../module/ai/dal/mysql/AiChatRoleMapper.java | 18 ++- .../module/ai/service/AiChatRoleService.java | 76 ----------- .../AiChatConversationServiceImpl.java | 12 +- .../service/impl/AiChatRoleServiceImpl.java | 129 ------------------ .../ai/service/impl/AiChatServiceImpl.java | 28 +--- .../ai/service/model/AiChatRoleService.java | 61 +++++++++ .../service/model/AiChatRoleServiceImpl.java | 85 ++++++++++++ 19 files changed, 353 insertions(+), 572 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{model => impl}/AiChatConversationServiceImpl.java (93%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 4e101cd7e3..b65314f52e 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -18,8 +18,9 @@ public interface ErrorCodeConstants { ErrorCode CHAT_MODAL_NOT_EXIST = new ErrorCode(1_040_001_000, "AI 模型不存在!"); ErrorCode CHAT_MODAL_DISABLE = new ErrorCode(1_040_001_001, "AI 模型({})已禁用!"); - // ErrorCode AI_MODAL_CONFIG_PARAMS_INCORRECT = new ErrorCode(1_022_000_081, "AI 模型 config 参数不正确! {} "); -// ErrorCode AI_MODAL_PLATFORM_PARAMS_INCORRECT = new ErrorCode(1_022_000_083, "AI 平台参数不正确! {} "); + // ========== API 聊天模型 1-040-002-000 ========== + ErrorCode CHAT_ROLE_NOT_EXISTS = new ErrorCode(1_040_002_000, "AI 聊天角色不存在"); + ErrorCode CHAT_ROLE_DISABLE = new ErrorCode(1_040_001_001, "AI 聊天角色({})已禁用!"); // conversation @@ -31,14 +32,7 @@ public interface ErrorCodeConstants { ErrorCode AI_MIDJOURNEY_OPERATION_NOT_EXISTS = new ErrorCode(1_022_000_040, "midjourney 操作不存在!"); ErrorCode AI_MIDJOURNEY_MESSAGE_ID_INCORRECT = new ErrorCode(1_022_000_040, "midjourney message id 不正确!"); - // role - - ErrorCode AI_CHAT_ROLE_NOT_EXIST = new ErrorCode(1_022_000_060, "AI 角色不存在!"); - ErrorCode AI_CHAT_ROLE_NOT_PUBLIC = new ErrorCode(1_022_000_060, "AI 角色未公开!"); - // chat - ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index 1de4b39910..5757d83165 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -1,17 +1,30 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; -import cn.iocoder.yudao.module.ai.service.AiChatRoleService; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + @Tag(name = "管理后台 - AI 聊天角色") @RestController @RequestMapping("/ai/chat-role") @@ -21,42 +34,55 @@ public class AiChatRoleController { @Resource private AiChatRoleService chatRoleService; - @Operation(summary = "chat角色 - 角色列表") - @GetMapping("/list") - public PageResult list(@Validated @ModelAttribute AiChatRoleListReqVO req) { - return chatRoleService.list(req); - } + // TODO 芋艿:我的分页 - @Operation(summary = "chat角色 - 添加") - @PutMapping("/add") - public CommonResult add(@Validated @RequestBody AiChatRoleAddReqVO req) { - chatRoleService.add(req); - return CommonResult.success(null); - } + // TODO 芋艿:我的新增 + + // TODO 芋艿:我的修改 + + // TODO 芋艿:我的删除 - @Operation(summary = "chat角色 - 修改") - @PostMapping("/update") - public CommonResult update(@Validated @RequestBody AiChatRoleUpdateReqVO req) { - chatRoleService.update(req); - return CommonResult.success(null); + // ========== 角色管理 ========== + + @PostMapping("/create") + @Operation(summary = "创建聊天角色") + @PreAuthorize("@ss.hasPermission('ai:chat-role:create')") + public CommonResult createChatRole(@Valid @RequestBody AiChatRoleSaveReqVO createReqVO) { + return success(chatRoleService.createChatRole(createReqVO)); } - @Operation(summary = "chat角色 - 修改可见性") - @PostMapping("/update-public-status") - public CommonResult updatePublicStatus(@Validated @RequestBody AiChatRoleUpdatePublicStatusReqVO req) { - chatRoleService.updatePublicStatus(req); - return CommonResult.success(null); + @PutMapping("/update") + @Operation(summary = "更新聊天角色") + @PreAuthorize("@ss.hasPermission('ai:chat-role:update')") + public CommonResult updateChatRole(@Valid @RequestBody AiChatRoleSaveReqVO updateReqVO) { + chatRoleService.updateChatRole(updateReqVO); + return success(true); } - @Operation(summary = "chat角色 - 删除") @DeleteMapping("/delete") - public CommonResult delete(@RequestParam("id") Long id) { - chatRoleService.delete(id); - return CommonResult.success(null); + @Operation(summary = "删除聊天角色") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('ai:chat-role:delete')") + public CommonResult deleteChatRole(@RequestParam("id") Long id) { + chatRoleService.deleteChatRole(id); + return success(true); } - // ========== 角色管理 ========== - + @GetMapping("/get") + @Operation(summary = "获得聊天角色") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('ai:chat-role:query')") + public CommonResult getChatRole(@RequestParam("id") Long id) { + AiChatRoleDO chatRole = chatRoleService.getChatRole(id); + return success(BeanUtils.toBean(chatRole, AiChatRoleRespVO.class)); + } + @GetMapping("/page") + @Operation(summary = "获得聊天角色分页") + @PreAuthorize("@ss.hasPermission('ai:chat-role:query')") + public CommonResult> getChatRolePage(@Valid AiChatRolePageReqVO pageReqVO) { + PageResult pageResult = chatRoleService.getChatRolePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AiChatRoleRespVO.class)); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java deleted file mode 100644 index f069caf972..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleAddReqVO.java +++ /dev/null @@ -1,52 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色列表 - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatRoleAddReqVO { - - @NotNull - @Schema(description = "角色名,角色的显示名称") - private String name; - - @Schema(description = "头像") - private String avatar; - - @NotNull - @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String category; - - @NotNull - @Schema(description = "角色描述") - private String description; - - @Schema(description = "角色欢迎语") - private String welcomeMessage; - - @NotNull - @Schema(description = "角色设定(消息)") - private String systemMessage; - - @NotNull - @Schema(description = "模型编号") - private Long modelId; - - @NotNull - @Schema(description = "开启状态 0、open 1、close") - private Boolean publicStatus; - - @NotNull - @Schema(description = "排序") - private Integer sort; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java deleted file mode 100644 index 247154a4cd..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListReqVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色列表 - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatRoleListReqVO extends PageParam { - - @Schema(description = "查询") - private String search; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java deleted file mode 100644 index 3eee736bed..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleListRespVO.java +++ /dev/null @@ -1,52 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色列表 - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatRoleListRespVO { - - @Schema(description = "编号", example = "1") - private Long id; - - @Schema(description = "角色名称", example = "小红书写作") - private String name; - - @Schema(description = "角色头像", example = "http://...") - private String avatar; - - @Schema(description = "角色分类", example = "writing") - private String category; - - @Schema(description = "角色描述", example = "角色描述") - private String description; - - @Schema(description = "角色欢迎语", example = "欢迎...") - private String welcomeMessage; - - @Schema(description = "角色设定(消息)", example = "你是拥有丰富的小红书写作经验作者xxxx") - private String systemMessage; - - @Schema(description = "用户编号", example = "1") - private Long userId; - - @Schema(description = "模型编号", example = "1") - private Long modelId; - - @Schema(description = "是否公开 true - 公开;false - 私有", example = "true") - private Boolean publicStatus; - - @Schema(description = "排序值 asc", example = "1") - private Integer sort; - - @Schema(description = "状态 0、开启 1、关闭", example = "1") - private Integer status; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java new file mode 100644 index 0000000000..d1eb417d69 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - AI 聊天角色分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AiChatRolePageReqVO extends PageParam { + + @Schema(description = "角色名称", example = "李四") + private String name; + + @Schema(description = "角色类别", example = "创作") + private String category; + + @Schema(description = "是否公开", example = "1") + private Boolean publicStatus; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java index a28dd4f4cf..60dbf07df2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java @@ -2,36 +2,50 @@ package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色 - * - * @fansili - * @since v1.0 - */ + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - AI 聊天角色 Response VO") @Data -@Accessors(chain = true) public class AiChatRoleRespVO { - @Schema(description = "id") + @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32746") private Long id; - @Schema(description = "用户id") + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9442") private Long userId; - @Schema(description = "角色名字") + @Schema(description = "模型编号", example = "17640") + private Long modelId; + + @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") private String name; - @Schema(description = "角色介绍,详细描述角色的功能或用途") - private String introduce; + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") + private String avatar; + + @Schema(description = "角色类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "创作") + private String category; + + @Schema(description = "角色排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer sort; + + @Schema(description = "角色描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") + private String description; + + @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED) + private String welcomeMessage; + + @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemMessage; + + @Schema(description = "是否公开", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Boolean publicStatus; - @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String classify; + @Schema(description = "状态", example = "1") + private Integer status; - @Schema(description = "状态 open、close") - private String enable; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; - @Schema(description = "角色的使用次数统计") - private Integer useCount; -} +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java new file mode 100644 index 0000000000..97f92f3d12 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - AI 聊天角色新增/修改 Request VO") +@Data +public class AiChatRoleSaveReqVO { + + @Schema(description = "角色编号", example = "32746") + private Long id; + + @Schema(description = "模型编号", example = "17640") + private Long modelId; + + @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "角色名称不能为空") + private String name; + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") + @NotEmpty(message = "角色头像不能为空") + private String avatar; + + @Schema(description = "角色类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "创作") + @NotEmpty(message = "角色类别不能为空") + private String category; + + @Schema(description = "角色排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "角色排序不能为空") + private Integer sort; + + @Schema(description = "角色描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") + @NotEmpty(message = "角色描述不能为空") + private String description; + + @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED, example = "Talk is cheap, i will show code") + @NotEmpty(message = "角色欢迎语不能为空") + private String welcomeMessage; + + @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") + @NotEmpty(message = "角色上下文不能为空") + private String systemMessage; + + @Schema(description = "是否公开", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "是否公开不能为空") + private Boolean publicStatus; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "状态不能为空") + @InEnum(CommonStatusEnum.class) + private Integer status; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java deleted file mode 100644 index c61b6d9640..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdatePublicStatusReqVO.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色 - 修改可见性 - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatRoleUpdatePublicStatusReqVO extends PageParam { - - - @NotNull(message = "角色编号不能为空") - @Schema(description = "角色编号") - private Long id; - - @NotNull(message = "开启状态不能为空") - @Schema(description = "开启状态 open、close") - private Boolean publicStatus; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java deleted file mode 100644 index d578b2f74c..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleUpdateReqVO.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat 角色 - 更新 - * - * @fansili - * @since v1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatRoleUpdateReqVO extends PageParam { - - - @NotNull(message = "角色编号不能为空") - @Schema(description = "角色编号") - private Long id; - - @NotNull - @Schema(description = "角色名,角色的显示名称") - private String name; - - @Schema(description = "头像") - private String avatar; - - @NotNull - @Schema(description = "分类,角色所属的类别,如娱乐、创作等") - private String category; - - @NotNull - @Schema(description = "角色描述") - private String description; - - @Schema(description = "角色欢迎语") - private String welcomeMessage; - - @NotNull - @Schema(description = "角色设定(消息)") - private String systemMessage; - - @NotNull - @Schema(description = "模型编号") - private Long modelId; - - @NotNull - @Schema(description = "开启状态 open、close") - private Boolean publicStatus; - - @NotNull - @Schema(description = "排序") - private Integer sort; - - @NotNull - @Schema(description = "状态") - private Integer status; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java deleted file mode 100644 index 269b4a6ee9..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatRoleConvert.java +++ /dev/null @@ -1,56 +0,0 @@ -package cn.iocoder.yudao.module.ai.convert; - -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleAddReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleUpdateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleListRespVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 聊天 对话 convert - * - * @author fansili - * @time 2024/4/18 16:39 - * @since 1.0 - */ -@Mapper -public interface AiChatRoleConvert { - - AiChatRoleConvert INSTANCE = Mappers.getMapper(AiChatRoleConvert.class); - - /** - * 转换 - ChatRoleListRes - * - * @param roleList - * @return - */ - List convertChatRoleListRes(List roleList); - - /** - * 转换 - AiChatRoleDO - * - * @param req - * @return - */ - AiChatRoleDO convertAiChatRoleDO(AiChatRoleAddReqVO req); - - /** - * 转换 - AiChatRoleDO - * - * @param req - * @return - */ - AiChatRoleDO convertAiChatRoleDO(AiChatRoleUpdateReqVO req); - - /** - * 转换 - AiChatRoleRes - * - * @param aiChatRoleDO - * @return - */ - AiChatRoleRespVO convertAiChatRoleRes(AiChatRoleDO aiChatRoleDO); -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java index 51cf67c867..1b33199d47 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java @@ -46,7 +46,7 @@ public class AiChatRoleDO extends BaseDO { */ private String welcomeMessage; /** - * 角色设定(消息) + * 角色上下文 */ private String systemMessage; @@ -65,9 +65,10 @@ public class AiChatRoleDO extends BaseDO { private Long modelId; /** - * 是否公开 true - 公开;false - 私有 + * 是否公开 * - * true - 公开;false - 私有 + * 1. true - 公开;由管理员在【角色管理】所创建 + * 2. false - 私有;由个人在【我的角色】所创建 */ private Boolean publicStatus; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index 1ab7117b72..2aea83c449 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -1,17 +1,27 @@ package cn.iocoder.yudao.module.ai.dal.mysql; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * role mapper + * AI 聊天角色 Mapper * - * @fansili - * @since v1.0 + * @author fansili */ -@Repository @Mapper public interface AiChatRoleMapper extends BaseMapperX { + + default PageResult selectPage(AiChatRolePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(AiChatRoleDO::getName, reqVO.getName()) + .eqIfPresent(AiChatRoleDO::getCategory, reqVO.getCategory()) + .eqIfPresent(AiChatRoleDO::getPublicStatus, reqVO.getPublicStatus()) + .orderByDesc(AiChatRoleDO::getId)); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java deleted file mode 100644 index c2f56a240f..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatRoleService.java +++ /dev/null @@ -1,76 +0,0 @@ -package cn.iocoder.yudao.module.ai.service; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; - -/** - * chat 角色 - * - * @fansili - * @since v1.0 - */ -public interface AiChatRoleService { - - /** - * 获取聊天角色列表 - * - * @param req - * @return - */ - PageResult list(AiChatRoleListReqVO req); - - /** - * chat角色 - 添加 - * - * @param req - * @return - */ - void add(AiChatRoleAddReqVO req); - - /** - * chat角色 - 修改 - * - * @param req - */ - void update(AiChatRoleUpdateReqVO req); - - - /** - * chat角色 - 修改可见性 - * - * @param req - */ - void updatePublicStatus(AiChatRoleUpdatePublicStatusReqVO req); - - /** - * chat角色 - 删除 - * - * @param chatRoleId - */ - void delete(Long chatRoleId); - - /** - * 获取角色 - * - * @param roleId - * @return - */ - AiChatRoleRespVO getChatRole(Long roleId); - - /** - * 校验 - 角色是否存在 - * - * @param id - * @return - */ - AiChatRoleDO validateExists(Long id); - - /** - * 校验 - 角色是否公开 - * - * @param aiChatRoleDO - */ - void validateIsPublic(AiChatRoleDO aiChatRoleDO); - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java index 5d25f2a114..336f34858e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service.model; +package cn.iocoder.yudao.module.ai.service.impl; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; @@ -7,14 +7,15 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatRoleService; +import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; +import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; @@ -45,10 +46,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 默认使用 sort 排序第一个模型 AiChatModelDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); // 查询角色 - AiChatRoleRespVO chatRoleRes = null; - if (req.getRoleId() != null) { - chatRoleRes = aiChatRoleService.getChatRole(req.getRoleId()); - } + AiChatRoleDO chatRoleRes = req.getRoleId() != null ? aiChatRoleService.getChatRole(req.getRoleId()) : null; Long chatRoleId = chatRoleRes != null ? chatRoleRes.getId() : null; // 创建新的 Conversation AiChatConversationDO insertConversation = saveConversation(AiCommonConstants.CONVERSATION_DEFAULT_TITLE, diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java deleted file mode 100644 index 4264814950..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatRoleServiceImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.impl; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.*; -import cn.iocoder.yudao.module.ai.convert.AiChatRoleConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; -import cn.iocoder.yudao.module.ai.enums.AiChatRoleCategoryEnum; -import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; -import cn.iocoder.yudao.module.ai.service.AiChatRoleService; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * chat 角色 - * - * @fansili - * @since v1.0 - */ -@Service -@AllArgsConstructor -@Slf4j -public class AiChatRoleServiceImpl implements AiChatRoleService { - - private final AiChatRoleMapper aiChatRoleMapper; - private final AiChatModelService aiChatModalService; - - @Override - public PageResult list(AiChatRoleListReqVO req) { - // 查询条件 - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); - // search 查询 - if (!StrUtil.isBlank(req.getSearch())) { - queryWrapperX.eq(AiChatRoleDO::getName, req.getSearch()); - } - // 默认排序id desc - queryWrapperX.orderByDesc(AiChatRoleDO::getId); - // - PageResult aiChatRoleDOPageResult = aiChatRoleMapper.selectPage(req, queryWrapperX); - Long total = aiChatRoleDOPageResult.getTotal(); - List roleList = aiChatRoleDOPageResult.getList(); - // 换货res - List chatRoleListResList = AiChatRoleConvert.INSTANCE.convertChatRoleListRes(roleList); - return new PageResult<>(chatRoleListResList, total); - } - - @Override - public void add(AiChatRoleAddReqVO req) { - // 转换enum,并校验enum - AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); - // 校验模型是否存在 TODO -// aiChatModalService.validateExists(req.getModelId()); - // 转换do - AiChatRoleDO insertAiChatRoleDO = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); - insertAiChatRoleDO.setUserId(SecurityFrameworkUtils.getLoginUserId()); - insertAiChatRoleDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - // 保存 - aiChatRoleMapper.insert(insertAiChatRoleDO); - } - - @Override - public void update(AiChatRoleUpdateReqVO req) { - // 检查角色是否存在 - validateExists(req.getId()); - // 转换enum,并校验enum - AiChatRoleCategoryEnum.valueOfCategory(req.getCategory()); - // 校验模型是否存在 TODO -// aiChatModalService.validateExists(req.getModelId()); - // 转换do - AiChatRoleDO updateChatRole = AiChatRoleConvert.INSTANCE.convertAiChatRoleDO(req); - updateChatRole.setId(req.getId()); - aiChatRoleMapper.updateById(updateChatRole); - } - - - @Override - public void updatePublicStatus(AiChatRoleUpdatePublicStatusReqVO req) { - // 检查角色是否存在 - validateExists(req.getId()); - // 更新 - aiChatRoleMapper.updateById( - new AiChatRoleDO() - .setId(req.getId()) - .setPublicStatus(req.getPublicStatus()) - ); - } - - @Override - public void delete(Long chatRoleId) { - // 检查角色是否存在 - validateExists(chatRoleId); - // 删除 - aiChatRoleMapper.deleteById(chatRoleId); - } - - @Override - public AiChatRoleRespVO getChatRole(Long roleId) { - // 检查角色是否存在 - AiChatRoleDO aiChatRoleDO = validateExists(roleId); - return AiChatRoleConvert.INSTANCE.convertAiChatRoleRes(aiChatRoleDO); - } - - public AiChatRoleDO validateExists(Long id) { - AiChatRoleDO aiChatRoleDO = aiChatRoleMapper.selectById(id); - if (aiChatRoleDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_ROLE_NOT_EXIST); - } - return aiChatRoleDO; - } - - public void validateIsPublic(AiChatRoleDO aiChatRoleDO) { - if (aiChatRoleDO == null) { - return; - } - if (!aiChatRoleDO.getPublicStatus()) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_ROLE_NOT_PUBLIC); - } - } -} - diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 36316dc97e..87d652eefd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -23,12 +23,11 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.AiChatRoleService; +import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.http.HttpMessageConverters; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -53,12 +52,12 @@ import java.util.stream.Collectors; public class AiChatServiceImpl implements AiChatService { private final AiChatClientFactory aiChatClientFactory; + private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationMapper aiChatConversationMapper; private final AiChatConversationService chatConversationService; private final AiChatModelService aiChatModalService; - private final AiChatRoleService aiChatRoleService; - private final HttpMessageConverters messageConverters; + private final AiChatRoleService chatRoleService; @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { @@ -68,12 +67,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 - AiChatRoleDO aiChatRoleDO = null; - if (conversation.getRoleId() != null) { - aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); - } - // 校验角色是否公开 - aiChatRoleService.validateIsPublic(aiChatRoleDO); + AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; // 获取 client 类型 AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); // 保存 chat message @@ -142,12 +136,7 @@ public class AiChatServiceImpl implements AiChatService { // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 - AiChatRoleDO aiChatRoleDO = null; - if (conversation.getRoleId() != null) { - aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); - } - // 校验角色是否公开 - aiChatRoleService.validateIsPublic(aiChatRoleDO); + AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; // 创建 chat 需要的 Prompt Prompt prompt = new Prompt(aiChatMessageDO.getContent()); // 提前创建一个 system message @@ -204,13 +193,6 @@ public class AiChatServiceImpl implements AiChatService { AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); - // 获取角色信息 - AiChatRoleDO aiChatRoleDO = null; - if (conversation.getRoleId() != null) { - aiChatRoleDO = aiChatRoleService.validateExists(conversation.getRoleId()); - } - // 校验角色是否公开 - aiChatRoleService.validateIsPublic(aiChatRoleDO); AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), chatModel.getModel(), chatModel.getId(), req.getContent(), null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java new file mode 100644 index 0000000000..a4d554adb8 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import jakarta.validation.Valid; + +/** + * AI 聊天角色 Service 接口 + * + * @author fansili + */ +public interface AiChatRoleService { + + /** + * 创建聊天角色 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createChatRole(@Valid AiChatRoleSaveReqVO createReqVO); + + /** + * 更新聊天角色 + * + * @param updateReqVO 更新信息 + */ + void updateChatRole(@Valid AiChatRoleSaveReqVO updateReqVO); + + /** + * 删除聊天角色 + * + * @param id 编号 + */ + void deleteChatRole(Long id); + + /** + * 获得聊天角色 + * + * @param id 编号 + * @return AI 聊天角色 + */ + AiChatRoleDO getChatRole(Long id); + + /** + * 校验角色是否存在 + * + * @param id 角色编号 + */ + AiChatRoleDO validateChatRole(Long id); + + /** + * 获得AI 聊天角色分页 + * + * @param pageReqVO 分页查询 + * @return AI 聊天角色分页 + */ + PageResult getChatRolePage(AiChatRolePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java new file mode 100644 index 0000000000..93e79240f4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.ai.service.model; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; +import jakarta.annotation.Resource; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_DISABLE; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_NOT_EXISTS; + +/** + * AI 聊天角色 Service 实现类 + * + * @author fansili + */ +@Service +@AllArgsConstructor +@Slf4j +public class AiChatRoleServiceImpl implements AiChatRoleService { + + @Resource + private AiChatRoleMapper chatRoleMapper; + + @Override + public Long createChatRole(AiChatRoleSaveReqVO createReqVO) { + AiChatRoleDO chatRole = BeanUtils.toBean(createReqVO, AiChatRoleDO.class); + chatRoleMapper.insert(chatRole); + return chatRole.getId(); + } + + @Override + public void updateChatRole(AiChatRoleSaveReqVO updateReqVO) { + // 校验存在 + validateChatRoleExists(updateReqVO.getId()); + // 更新 + AiChatRoleDO updateObj = BeanUtils.toBean(updateReqVO, AiChatRoleDO.class); + chatRoleMapper.updateById(updateObj); + } + + @Override + public void deleteChatRole(Long id) { + // 校验存在 + validateChatRoleExists(id); + // 删除 + chatRoleMapper.deleteById(id); + } + + private AiChatRoleDO validateChatRoleExists(Long id) { + AiChatRoleDO chatRole = chatRoleMapper.selectById(id); + if (chatRole == null) { + throw exception(CHAT_ROLE_NOT_EXISTS); + } + return chatRole; + } + + @Override + public AiChatRoleDO getChatRole(Long id) { + return chatRoleMapper.selectById(id); + } + + @Override + public AiChatRoleDO validateChatRole(Long id) { + AiChatRoleDO chatRole = validateChatRoleExists(id); + if (CommonStatusEnum.isDisable(chatRole.getStatus())) { + throw exception(CHAT_ROLE_DISABLE, chatRole.getName()); + } + return chatRole; + } + + @Override + public PageResult getChatRolePage(AiChatRolePageReqVO pageReqVO) { + return chatRoleMapper.selectPage(pageReqVO); + } + +} + -- Gitee From 31453e19d4a33296cae0395d5545391bb56b8ee2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 May 2024 21:47:58 +0800 Subject: [PATCH 0531/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E8=A7=92=E8=89=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8880%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/model/AiChatModelController.java | 3 ++- .../admin/model/AiChatRoleController.java | 12 +++--------- .../vo/{role => chatRole}/AiChatRolePageReqVO.java | 7 +------ .../vo/{role => chatRole}/AiChatRoleRespVO.java | 13 +++++++++++-- .../vo/{role => chatRole}/AiChatRoleSaveReqVO.java | 5 +++-- .../yudao/module/ai/dal/mysql/AiChatRoleMapper.java | 5 ++--- .../ai/service/model/AiChatModelServiceImpl.java | 3 +-- .../module/ai/service/model/AiChatRoleService.java | 4 ++-- .../ai/service/model/AiChatRoleServiceImpl.java | 5 ++--- 9 files changed, 27 insertions(+), 30 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/{role => chatRole}/AiChatRolePageReqVO.java (67%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/{role => chatRole}/AiChatRoleRespVO.java (74%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/{role => chatRole}/AiChatRoleSaveReqVO.java (93%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 6d568140b9..1b50be79dc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -78,7 +78,8 @@ public class AiChatModelController { @Parameter(name = "status", description = "状态", required = true, example = "1") public CommonResult> getChatModelSimpleList(@RequestParam("status") Integer status) { List list = chatModelService.getChatModelList(status); - return success(convertList(list, model -> new AiChatModelRespVO().setId(model.getId()).setName(model.getName()))); + return success(convertList(list, model -> new AiChatModelRespVO().setId(model.getId()) + .setName(model.getName()).setModel(model.getModel()))); } } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index 5757d83165..a3eace7691 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -1,28 +1,22 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.io.IOException; -import java.util.List; - import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - AI 聊天角色") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRolePageReqVO.java similarity index 67% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRolePageReqVO.java index d1eb417d69..237c834634 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRolePageReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRolePageReqVO.java @@ -1,13 +1,8 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole; import lombok.*; -import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @Schema(description = "管理后台 - AI 聊天角色分页 Request VO") @Data diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java similarity index 74% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java index 60dbf07df2..3adef6b258 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java @@ -1,5 +1,9 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import com.fhs.core.trans.anno.Trans; +import com.fhs.core.trans.constant.TransType; +import com.fhs.core.trans.vo.VO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -7,7 +11,7 @@ import java.time.LocalDateTime; @Schema(description = "管理后台 - AI 聊天角色 Response VO") @Data -public class AiChatRoleRespVO { +public class AiChatRoleRespVO implements VO { @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32746") private Long id; @@ -16,7 +20,12 @@ public class AiChatRoleRespVO { private Long userId; @Schema(description = "模型编号", example = "17640") + @Trans(type = TransType.SIMPLE, target = AiChatModelDO.class, fields = {"name", "model"}, refs = {"modelName", "model"}) private Long modelId; + @Schema(description = "模型名字", example = "张三") + private String modelName; + @Schema(description = "模型标识", example = "gpt-3.5-turbo-0125") + private String model; @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") private String name; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java index 97f92f3d12..1dc62947be 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/role/AiChatRoleSaveReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.module.ai.controller.admin.model.vo.role; +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.URL; @Schema(description = "管理后台 - AI 聊天角色新增/修改 Request VO") @Data @@ -23,6 +23,7 @@ public class AiChatRoleSaveReqVO { @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") @NotEmpty(message = "角色头像不能为空") + @URL(message = "角色头像必须是 URL 格式") private String avatar; @Schema(description = "角色类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "创作") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index 2aea83c449..ac592d38ab 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; /** * AI 聊天角色 Mapper @@ -21,7 +20,7 @@ public interface AiChatRoleMapper extends BaseMapperX { .likeIfPresent(AiChatRoleDO::getName, reqVO.getName()) .eqIfPresent(AiChatRoleDO::getCategory, reqVO.getCategory()) .eqIfPresent(AiChatRoleDO::getPublicStatus, reqVO.getPublicStatus()) - .orderByDesc(AiChatRoleDO::getId)); + .orderByAsc(AiChatRoleDO::getSort)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index c185ffea58..919fb5804d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -95,8 +95,7 @@ public class AiChatModelServiceImpl implements AiChatModelService { @Override public List getChatModelList(Integer status) { - chatModelMapper.selectList(status); - return null; + return chatModelMapper.selectList(status); } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index a4d554adb8..283311a679 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.ai.service.model; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import jakarta.validation.Valid; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 93e79240f4..fcca7b2256 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.ai.service.model; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRolePageReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.role.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import jakarta.annotation.Resource; -- Gitee From 7344ec8aea5c6fc4dd30a0cc47cb1b773d3330b4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 May 2024 22:55:01 +0800 Subject: [PATCH 0532/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E8=A7=92=E8=89=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=88100%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/model/AiChatRoleController.java | 50 +++++++++++++++++-- .../vo/chatRole/AiChatRoleSaveMyReqVO.java | 36 +++++++++++++ .../module/ai/dal/mysql/AiChatRoleMapper.java | 21 ++++++++ .../ai/service/model/AiChatRoleService.java | 50 +++++++++++++++++-- .../service/model/AiChatRoleServiceImpl.java | 50 ++++++++++++++++++- .../src/main/resources/application-local.yaml | 2 +- 6 files changed, 199 insertions(+), 10 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java index a3eace7691..02f698b944 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java @@ -1,10 +1,12 @@ package cn.iocoder.yudao.module.ai.controller.admin.model; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; @@ -17,7 +19,10 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - AI 聊天角色") @RestController @@ -28,13 +33,50 @@ public class AiChatRoleController { @Resource private AiChatRoleService chatRoleService; - // TODO 芋艿:我的分页 + @GetMapping("/my-page") + @Operation(summary = "获得【我的】聊天角色分页") + public CommonResult> getChatRoleMyPage(@Valid AiChatRolePageReqVO pageReqVO) { + PageResult pageResult = chatRoleService.getChatRoleMyPage(pageReqVO, getLoginUserId()); + return success(BeanUtils.toBean(pageResult, AiChatRoleRespVO.class)); + } + + @GetMapping("/get-my") + @Operation(summary = "获得【我的】聊天角色") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getChatRoleMy(@RequestParam("id") Long id) { + AiChatRoleDO chatRole = chatRoleService.getChatRole(id); + if (ObjUtil.notEqual(chatRole.getUserId(), getLoginUserId())) { + return success(null); + } + return success(BeanUtils.toBean(chatRole, AiChatRoleRespVO.class)); + } + + @PostMapping("/create-my") + @Operation(summary = "创建【我的】聊天角色") + public CommonResult createChatRoleMy(@Valid @RequestBody AiChatRoleSaveMyReqVO createReqVO) { + return success(chatRoleService.createChatRoleMy(createReqVO, getLoginUserId())); + } - // TODO 芋艿:我的新增 + @PutMapping("/update-my") + @Operation(summary = "更新【我的】聊天角色") + public CommonResult updateChatRoleMy(@Valid @RequestBody AiChatRoleSaveMyReqVO updateReqVO) { + chatRoleService.updateChatRoleMy(updateReqVO, getLoginUserId()); + return success(true); + } - // TODO 芋艿:我的修改 + @DeleteMapping("/delete-my") + @Operation(summary = "删除【我的】聊天角色") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteChatRoleMy(@RequestParam("id") Long id) { + chatRoleService.deleteChatRoleMy(id, getLoginUserId()); + return success(true); + } - // TODO 芋艿:我的删除 + @GetMapping("/category-list") + @Operation(summary = "获得聊天角色的分类列表") + public CommonResult> getChatRoleCategoryList() { + return success(chatRoleService.getChatRoleCategoryList()); + } // ========== 角色管理 ========== diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java new file mode 100644 index 0000000000..3c5641f08a --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; +import org.hibernate.validator.constraints.URL; + +@Schema(description = "管理后台 - AI 聊天角色新增/修改【我的】 Request VO") +@Data +public class AiChatRoleSaveMyReqVO { + + @Schema(description = "角色编号", example = "32746") + private Long id; + + @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "角色名称不能为空") + private String name; + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") + @NotEmpty(message = "角色头像不能为空") + @URL(message = "角色头像必须是 URL 格式") + private String avatar; + + @Schema(description = "角色描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") + @NotEmpty(message = "角色描述不能为空") + private String description; + + @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED, example = "Talk is cheap, i will show code") + @NotEmpty(message = "角色欢迎语不能为空") + private String welcomeMessage; + + @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") + @NotEmpty(message = "角色上下文不能为空") + private String systemMessage; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index ac592d38ab..d892040052 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.mysql; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -7,6 +8,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleP import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * AI 聊天角色 Mapper * @@ -23,4 +26,22 @@ public interface AiChatRoleMapper extends BaseMapperX { .orderByAsc(AiChatRoleDO::getSort)); } + default PageResult selectPageByMy(AiChatRolePageReqVO reqVO, Long userId) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(AiChatRoleDO::getName, reqVO.getName()) + .eqIfPresent(AiChatRoleDO::getCategory, reqVO.getCategory()) + // 情况一:公开 + .eq(Boolean.TRUE.equals(reqVO.getPublicStatus()), AiChatRoleDO::getPublicStatus, reqVO.getPublicStatus()) + // 情况二:私有 + .eq(Boolean.FALSE.equals(reqVO.getPublicStatus()), AiChatRoleDO::getUserId, userId) + .eq(Boolean.FALSE.equals(reqVO.getPublicStatus()), AiChatRoleDO::getStatus, CommonStatusEnum.ENABLE.getStatus()) + .orderByAsc(AiChatRoleDO::getSort)); + } + + default List selectListGroupByCategory(Integer status) { + return selectList(new LambdaQueryWrapperX() + .eq(AiChatRoleDO::getStatus, status) + .apply("GROUP BY category")); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index 283311a679..8b22d638c9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -2,10 +2,13 @@ package cn.iocoder.yudao.module.ai.service.model; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import jakarta.validation.Valid; +import java.util.List; + /** * AI 聊天角色 Service 接口 * @@ -21,6 +24,15 @@ public interface AiChatRoleService { */ Long createChatRole(@Valid AiChatRoleSaveReqVO createReqVO); + /** + * 创建【我的】聊天角色 + * + * @param createReqVO 创建信息 + * @param userId 用户编号 + * @return 编号 + */ + Long createChatRoleMy(AiChatRoleSaveMyReqVO createReqVO, Long userId); + /** * 更新聊天角色 * @@ -28,6 +40,14 @@ public interface AiChatRoleService { */ void updateChatRole(@Valid AiChatRoleSaveReqVO updateReqVO); + /** + * 创建【我的】聊天角色 + * + * @param updateReqVO 更新信息 + * @param userId 用户编号 + */ + void updateChatRoleMy(AiChatRoleSaveMyReqVO updateReqVO, Long userId); + /** * 删除聊天角色 * @@ -35,6 +55,14 @@ public interface AiChatRoleService { */ void deleteChatRole(Long id); + /** + * 删除【我的】聊天角色 + * + * @param id 编号 + * @param userId 用户编号 + */ + void deleteChatRoleMy(Long id, Long userId); + /** * 获得聊天角色 * @@ -44,18 +72,34 @@ public interface AiChatRoleService { AiChatRoleDO getChatRole(Long id); /** - * 校验角色是否存在 + * 校验聊天角色是否合法 * * @param id 角色编号 */ AiChatRoleDO validateChatRole(Long id); /** - * 获得AI 聊天角色分页 + * 获得聊天角色分页 * * @param pageReqVO 分页查询 - * @return AI 聊天角色分页 + * @return 聊天角色分页 */ PageResult getChatRolePage(AiChatRolePageReqVO pageReqVO); + /** + * 获得【我的】聊天角色分页 + * + * @param pageReqVO 分页查询 + * @param userId 用户编号 + * @return 聊天角色分页 + */ + PageResult getChatRoleMyPage(AiChatRolePageReqVO pageReqVO, Long userId); + + /** + * 获得聊天角色的分类列表 + * + * @return 分类列表 + */ + List getChatRoleCategoryList(); + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index fcca7b2256..507e4ce745 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -1,18 +1,22 @@ package cn.iocoder.yudao.module.ai.service.model; +import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; import jakarta.annotation.Resource; -import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.List; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_DISABLE; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_NOT_EXISTS; @@ -22,7 +26,6 @@ import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_NOT_EXISTS * @author fansili */ @Service -@AllArgsConstructor @Slf4j public class AiChatRoleServiceImpl implements AiChatRoleService { @@ -36,6 +39,14 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { return chatRole.getId(); } + @Override + public Long createChatRoleMy(AiChatRoleSaveMyReqVO createReqVO, Long userId) { + AiChatRoleDO chatRole = BeanUtils.toBean(createReqVO, AiChatRoleDO.class).setUserId(userId) + .setStatus(CommonStatusEnum.ENABLE.getStatus()).setPublicStatus(false); + chatRoleMapper.insert(chatRole); + return chatRole.getId(); + } + @Override public void updateChatRole(AiChatRoleSaveReqVO updateReqVO) { // 校验存在 @@ -45,6 +56,19 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { chatRoleMapper.updateById(updateObj); } + @Override + public void updateChatRoleMy(AiChatRoleSaveMyReqVO updateReqVO, Long userId) { + // 校验存在 + AiChatRoleDO chatRole = validateChatRoleExists(updateReqVO.getId()); + if (ObjectUtil.notEqual(chatRole.getUserId(), userId)) { + throw exception(CHAT_ROLE_NOT_EXISTS); + } + + // 更新 + AiChatRoleDO updateObj = BeanUtils.toBean(updateReqVO, AiChatRoleDO.class); + chatRoleMapper.updateById(updateObj); + } + @Override public void deleteChatRole(Long id) { // 校验存在 @@ -53,6 +77,17 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { chatRoleMapper.deleteById(id); } + @Override + public void deleteChatRoleMy(Long id, Long userId) { + // 校验存在 + AiChatRoleDO chatRole = validateChatRoleExists(id); + if (ObjectUtil.notEqual(chatRole.getUserId(), userId)) { + throw exception(CHAT_ROLE_NOT_EXISTS); + } + // 删除 + chatRoleMapper.deleteById(id); + } + private AiChatRoleDO validateChatRoleExists(Long id) { AiChatRoleDO chatRole = chatRoleMapper.selectById(id); if (chatRole == null) { @@ -80,5 +115,16 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { return chatRoleMapper.selectPage(pageReqVO); } + @Override + public PageResult getChatRoleMyPage(AiChatRolePageReqVO pageReqVO, Long userId) { + return chatRoleMapper.selectPageByMy(pageReqVO, userId); + } + + @Override + public List getChatRoleCategoryList() { + List list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); + return convertList(list, AiChatRoleDO::getName); + } + } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 959988d7d2..41ef6ef1a3 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -52,7 +52,7 @@ spring: # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 # url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root - password: root + password: 123456 # username: sa # SQL Server 连接的示例 # password: Yudao@2024 # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 -- Gitee From 64142965f36f6b4470e4637b320e99f08239e1a3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 14 May 2024 13:24:55 +0800 Subject: [PATCH 0533/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D=E7=9A=84?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=EF=BC=8850%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 17 +-- .../chat/AiChatConversationController.java | 51 ++++--- ...a => AiChatConversationCreateMyReqVO.java} | 8 +- .../AiChatConversationCreateReqVO.java | 17 --- ...a => AiChatConversationUpdateMyReqVO.java} | 4 +- .../ai/convert/AiChatConversationConvert.java | 8 +- .../dataobject/chat/AiChatConversationDO.java | 2 + .../dal/dataobject/model/AiChatModelDO.java | 2 + .../ai/dal/mysql/AiChatModelMapper.java | 23 ++-- .../module/ai/dal/mysql/AiChatRoleMapper.java | 10 ++ .../{ => chat}/AiChatConversationService.java | 30 ++--- .../AiChatConversationServiceImpl.java | 127 ++++++++---------- .../ai/service/impl/AiChatServiceImpl.java | 2 +- .../ai/service/model/AiChatModelService.java | 10 +- .../service/model/AiChatModelServiceImpl.java | 13 +- .../ai/service/model/AiChatRoleService.java | 10 ++ .../service/model/AiChatRoleServiceImpl.java | 13 +- 17 files changed, 178 insertions(+), 169 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/{AiChatConversationListReqVO.java => AiChatConversationCreateMyReqVO.java} (38%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/{AiChatConversationUpdateReqVO.java => AiChatConversationUpdateMyReqVO.java} (88%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{ => chat}/AiChatConversationService.java (60%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{impl => chat}/AiChatConversationServiceImpl.java (33%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index b65314f52e..8948fcba44 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -14,17 +14,21 @@ public interface ErrorCodeConstants { ErrorCode API_KEY_DISABLE = new ErrorCode(1_040_000_001, "AI API 密钥已禁用!"); // ========== API 聊天模型 1-040-001-000 ========== - - ErrorCode CHAT_MODAL_NOT_EXIST = new ErrorCode(1_040_001_000, "AI 模型不存在!"); - ErrorCode CHAT_MODAL_DISABLE = new ErrorCode(1_040_001_001, "AI 模型({})已禁用!"); + ErrorCode CHAT_MODEL_NOT_EXISTS = new ErrorCode(1_040_001_000, "AI 模型不存在!"); + ErrorCode CHAT_MODEL_DISABLE = new ErrorCode(1_040_001_001, "AI 模型({})已禁用!"); + ErrorCode CHAT_MODEL_DEFAULT_NOT_EXISTS = new ErrorCode(1_040_001_002, "操作失败,找不到默认聊天模型"); // ========== API 聊天模型 1-040-002-000 ========== ErrorCode CHAT_ROLE_NOT_EXISTS = new ErrorCode(1_040_002_000, "AI 聊天角色不存在"); ErrorCode CHAT_ROLE_DISABLE = new ErrorCode(1_040_001_001, "AI 聊天角色({})已禁用!"); + ErrorCode CHAT_ROLE_DEFAULT_NOT_EXISTS = new ErrorCode(1_040_001_002, "操作失败,找不到默认聊天角色"); + + // ========== API 聊天会话 1-040-003-000 ========== - // conversation + ErrorCode CHAT_CONVERSATION_NOT_EXISTS = new ErrorCode(1_040_003_000, "AI 对话不存在!");; - ErrorCode AI_CONVERSATION_NOT_EXISTS = new ErrorCode(1_022_000_002, "AI 对话不存在!");; + // chat + ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); // midjourney @@ -32,7 +36,4 @@ public interface ErrorCodeConstants { ErrorCode AI_MIDJOURNEY_OPERATION_NOT_EXISTS = new ErrorCode(1_022_000_040, "midjourney 操作不存在!"); ErrorCode AI_MIDJOURNEY_MESSAGE_ID_INCORRECT = new ErrorCode(1_022_000_040, "midjourney message id 不正确!"); - // chat - ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index 7bd3c5a140..3e56cb999a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -1,53 +1,50 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; -import cn.iocoder.yudao.module.ai.service.AiChatConversationService; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; +import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; import jakarta.validation.Valid; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Slf4j -@Tag(name = "管理后台 - 聊天会话") +@Tag(name = "管理后台 - AI 聊天会话") @RestController @RequestMapping("/ai/chat/conversation") -@AllArgsConstructor +@Validated public class AiChatConversationController { - private final AiChatConversationService aiChatConversationService; + @Resource + private AiChatConversationService chatConversationService; - // TODO done @fan:实现一下 - @PostMapping("/create") - @Operation(summary = "创建聊天会话") - @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") - public CommonResult createConversation(@RequestBody @Valid AiChatConversationCreateReqVO createReqVO) { - return success(aiChatConversationService.createConversation(createReqVO)); + @PostMapping("/create-my") + @Operation(summary = "创建【我的】聊天会话") + public CommonResult createChatConversationMy(@RequestBody @Valid AiChatConversationCreateMyReqVO createReqVO) { + return success(chatConversationService.createChatConversationMy(createReqVO, getLoginUserId())); } - // TODO done @fan:实现一下 - @PutMapping("/update") - @Operation(summary = "更新聊天会话") - @PreAuthorize("@ss.hasPermission('ai:chat-conversation:create')") - public CommonResult updateConversation(@RequestBody @Valid AiChatConversationUpdateReqVO updateReqVO) { - return success(aiChatConversationService.updateConversation(updateReqVO)); + @PutMapping("/update-my") + @Operation(summary = "更新【我的】聊天会话") + public CommonResult updateChatConversationMy(@RequestBody @Valid AiChatConversationUpdateMyReqVO updateReqVO) { + chatConversationService.updateChatConversationMy(updateReqVO, getLoginUserId()); + return success(true); } // TODO done @fan:实现一下 - @GetMapping("/list") + @GetMapping("/my-list") @Operation(summary = "获得聊天会话列表") public CommonResult> getConversationList() { - return success(aiChatConversationService.listConversation()); + return success(chatConversationService.listConversation()); } // TODO @fan:实现一下 @@ -55,7 +52,7 @@ public class AiChatConversationController { @Operation(summary = "获得聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") public CommonResult getConversation(@RequestParam("id") Long id) { - return success(aiChatConversationService.getConversationOfValidate(id)); + return success(chatConversationService.getConversationOfValidate(id)); } // TODO @fan:实现一下 @@ -63,7 +60,9 @@ public class AiChatConversationController { @Operation(summary = "删除聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") public CommonResult deleteConversation(@RequestParam("id") Long id) { - return success(aiChatConversationService.deleteConversation(id)); + return success(chatConversationService.deleteConversation(id)); } + // ========== 会话管理 ========== + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java similarity index 38% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java index 571cf0e389..d64ea7f616 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationListReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java @@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = "管理后台 - AI 聊天会话 Response VO") +@Schema(description = "管理后台 - AI 聊天会话创建【我的】 Request VO") @Data -public class AiChatConversationListReqVO { +public class AiChatConversationCreateMyReqVO { - @Schema(description = "会话标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个标题") - private String title; + @Schema(description = "聊天角色编号", example = "666") + private Long roleId; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java deleted file mode 100644 index b1e1196592..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateReqVO.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.experimental.Accessors; - -@Schema(description = "管理后台 - AI 聊天会话创建 Request VO") -@Data -public class AiChatConversationCreateReqVO { - - @Schema(description = "角色编号", example = "666") - private Long roleId; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java similarity index 88% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java index e8bdabb19b..4eb5a06c33 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java @@ -4,9 +4,9 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; -@Schema(description = "管理后台 - AI 聊天会话更新 Request VO") +@Schema(description = "管理后台 - AI 聊天会话更新【我的】 Request VO") @Data -public class AiChatConversationUpdateReqVO { +public class AiChatConversationUpdateMyReqVO { @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "会话编号不能为空") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java index 50c4b64d6b..7e1350617b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.convert; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import org.mapstruct.Mapper; @@ -36,10 +36,4 @@ public interface AiChatConversationConvert { */ AiChatConversationRespVO covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); - /** - * 转换 - AiChatConversationDO - * - * @param updateReqVO - */ - AiChatConversationDO convertAiChatConversationDO(AiChatConversationUpdateReqVO updateReqVO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index a4651323c7..c8613b5e1a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -26,6 +26,8 @@ import lombok.*; @AllArgsConstructor public class AiChatConversationDO extends BaseDO { + public static final String TITLE_DEFAULT = "新对话"; + /** * ID 编号,自增 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java index 7234280098..c943f7ea66 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java @@ -11,6 +11,8 @@ import lombok.*; /** * AI 聊天模型 DO * + * 默认聊天模型:{@link #status} 为开启,并且 {@link #sort} 排序第一 + * * @author fansili * @since 2024/4/24 19:39 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index d254f9a812..3c959e9617 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -5,8 +5,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -22,23 +24,14 @@ import java.util.List; @Mapper public interface AiChatModelMapper extends BaseMapperX { - // TODO 芋艿:要搞一下 - /** - * 查询 - 第一个modal - * - * @return - */ - default AiChatModelDO selectFirstModal() { - PageResult pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), - new LambdaQueryWrapperX() - .orderByAsc(AiChatModelDO::getSort) - ); - if (CollUtil.isEmpty(pageResult.getList())) { - return null; - } - return pageResult.getList().get(0); + default AiChatModelDO selectFirstByStatus(Integer status) { + return selectOne(new QueryWrapperX() + .eq("status", status) + .limitN(1) + .orderByAsc("sort")); } + // TODO 芋艿:不需要哈 /** * 查询 - 根据 ids * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index d892040052..c0eeb549ec 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -4,7 +4,9 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import org.apache.ibatis.annotations.Mapper; @@ -18,6 +20,14 @@ import java.util.List; @Mapper public interface AiChatRoleMapper extends BaseMapperX { + default AiChatRoleDO selectFirstByPublicStatusAndStatus(Boolean publicStatus, Integer status) { + return selectOne(new QueryWrapperX() + .eq("status", status) + .eq("public_status", publicStatus) + .limitN(1) + .orderByAsc("sort")); + } + default PageResult selectPage(AiChatRolePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(AiChatRoleDO::getName, reqVO.getName()) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java similarity index 60% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index 1abf2476f4..ed8fa101c5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -1,37 +1,35 @@ -package cn.iocoder.yudao.module.ai.service; +package cn.iocoder.yudao.module.ai.service.chat; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import org.jetbrains.annotations.NotNull; import java.util.List; /** - * chat 对话 + * AI 聊天对话 Service 接口 * - * @fansili - * @since v1.0 + * @author fansili */ public interface AiChatConversationService { /** - * 对话 - 创建对话 + * 创建【我的】聊天会话 * - * @param req - * @return + * @param createReqVO 创建信息 + * @param userId 用户编号 + * @return 聊天会话 */ - Long createConversation(AiChatConversationCreateReqVO req); + Long createChatConversationMy(AiChatConversationCreateMyReqVO createReqVO, Long userId); /** - * 对话 - 更新对话 + * 更新【我的】聊天会话 * - * @param updateReqVO - * @return + * @param updateReqVO 更新信息 + * @param userId 用户编号 */ - Boolean updateConversation(AiChatConversationUpdateReqVO updateReqVO); + void updateChatConversationMy(AiChatConversationUpdateMyReqVO updateReqVO, Long userId); /** * 获取 - 对话列表 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java similarity index 33% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 336f34858e..b04f2b7898 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -1,93 +1,83 @@ -package cn.iocoder.yudao.module.ai.service.impl; +package cn.iocoder.yudao.module.ai.service.chat; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.util.ObjUtil; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.AiCommonConstants; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; -import cn.iocoder.yudao.module.ai.service.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; -import lombok.AllArgsConstructor; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; import java.util.List; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.*; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; + /** - * chat 对话 + * AI 聊天对话 Service 实现类 * - * @fansili - * @since v1.0 + * @author fansili */ @Service +@Validated @Slf4j -@AllArgsConstructor public class AiChatConversationServiceImpl implements AiChatConversationService { - private final AiChatModelMapper aiChatModalMapper; - private final AiChatModelService aiChatModalService; - private final AiChatRoleService aiChatRoleService; - private final AiChatConversationMapper aiChatConversationMapper; - - @Override - public Long createConversation(AiChatConversationCreateReqVO req) { - // 获取用户id - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 默认使用 sort 排序第一个模型 - AiChatModelDO aiChatModalDO = aiChatModalMapper.selectFirstModal(); - // 查询角色 - AiChatRoleDO chatRoleRes = req.getRoleId() != null ? aiChatRoleService.getChatRole(req.getRoleId()) : null; - Long chatRoleId = chatRoleRes != null ? chatRoleRes.getId() : null; - // 创建新的 Conversation - AiChatConversationDO insertConversation = saveConversation(AiCommonConstants.CONVERSATION_DEFAULT_TITLE, - loginUserId, chatRoleId, aiChatModalDO.getId(), aiChatModalDO.getModel() - ); - // 返回对话id - return insertConversation.getId(); - } + @Resource + private AiChatConversationMapper chatConversationMapper; - private @NotNull AiChatConversationDO saveConversation(String title, - Long userId, - Long roleId, - Long modalId, - String model) { - AiChatConversationDO insertConversation = new AiChatConversationDO(); - insertConversation.setId(null); - insertConversation.setUserId(userId); - insertConversation.setTitle(title); - insertConversation.setPinned(false); + @Resource + private AiChatModelService chatModalService; + @Resource + private AiChatRoleService chatRoleService; - insertConversation.setRoleId(roleId); - insertConversation.setModelId(modalId); - insertConversation.setModel(model); + @Override + public Long createChatConversationMy(AiChatConversationCreateMyReqVO createReqVO, Long userId) { + // 1.1 获得 AiChatRoleDO 聊天角色 + AiChatRoleDO role = createReqVO.getRoleId() != null ? chatRoleService.validateChatRole(createReqVO.getRoleId()) + : chatRoleService.getRequiredDefaultChatRole(); + Assert.notNull(role, "必须找到聊天角色"); + // 1.2 获得 AiChatModelDO 聊天模型 + AiChatModelDO model = role.getModelId() != null ? chatModalService.validateChatModel(role.getId()) + : chatModalService.getRequiredDefaultChatModel(); + Assert.notNull(role, "必须找到默认模型"); - insertConversation.setTemperature(null); - insertConversation.setMaxTokens(null); - insertConversation.setMaxContexts(null); - aiChatConversationMapper.insert(insertConversation); - return insertConversation; + // 2. 创建 AiChatConversationDO 聊天对话 + AiChatConversationDO conversation = new AiChatConversationDO() + .setUserId(userId).setTitle(AiChatConversationDO.TITLE_DEFAULT).setPinned(false) + .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()) + .setTemperature(model.getTemperature()).setMaxTokens(model.getMaxTokens()).setMaxContexts(model.getMaxContexts()); + chatConversationMapper.insert(conversation); + return conversation.getId(); } @Override - public Boolean updateConversation(AiChatConversationUpdateReqVO updateReqVO) { - // 校验对话是否存在 - validateExists(updateReqVO.getId()); - // 获取模型信息并验证 - aiChatModalService.validateChatModel(updateReqVO.getModelId()); + public void updateChatConversationMy(AiChatConversationUpdateMyReqVO updateReqVO, Long userId) { + // 1.1 校验对话是否存在 + AiChatConversationDO conversation = validateExists(updateReqVO.getId()); + if (ObjUtil.notEqual(conversation.getUserId(), userId)) { + throw exception(CHAT_CONVERSATION_NOT_EXISTS); + } + // 1.2 校验模型是否存在 + AiChatModelDO model = null; + if (updateReqVO.getModelId() != null) { + model = chatModalService.validateChatModel(updateReqVO.getModelId()); + } + // 1.3 校验温度参数、Token 数量、消息数量 TODO + // 更新对话信息 - AiChatConversationDO updateAiChatConversationDO - = AiChatConversationConvert.INSTANCE.convertAiChatConversationDO(updateReqVO); - return aiChatConversationMapper.updateById(updateAiChatConversationDO) > 0; + chatConversationMapper.updateById(BeanUtils.toBean(updateReqVO, AiChatConversationDO.class)); } @Override @@ -96,7 +86,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询前100对话 List top100Conversation - = aiChatConversationMapper.selectTop100Conversation(loginUserId, null); + = chatConversationMapper.selectTop100Conversation(loginUserId, null); return AiChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); } @@ -108,14 +98,15 @@ public class AiChatConversationServiceImpl implements AiChatConversationService @Override public Boolean deleteConversation(Long id) { - return aiChatConversationMapper.deleteById(id) > 0; + return chatConversationMapper.deleteById(id) > 0; } - public @NotNull AiChatConversationDO validateExists(Long id) { - AiChatConversationDO aiChatConversationDO = aiChatConversationMapper.selectById(id); - if (aiChatConversationDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CONVERSATION_NOT_EXISTS); + public AiChatConversationDO validateExists(Long id) { + AiChatConversationDO conversation = chatConversationMapper.selectById(id); + if (conversation == null) { + throw exception(CHAT_CONVERSATION_NOT_EXISTS); } - return aiChatConversationDO; + return conversation; } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 87d652eefd..d74880dfc0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -22,7 +22,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.service.AiChatConversationService; +import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java index b589ba6792..08f0110fe2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java @@ -8,7 +8,6 @@ import jakarta.validation.Valid; import java.util.List; -import java.util.List; import java.util.Set; /** @@ -49,6 +48,15 @@ public interface AiChatModelService { */ AiChatModelDO getChatModel(Long id); + /** + * 获得默认的聊天模型 + * + * 如果获取不到,则抛出 {@link cn.iocoder.yudao.framework.common.exception.ServiceException} 业务异常 + * + * @return 聊天模型 + */ + AiChatModelDO getRequiredDefaultChatModel(); + /** * 获得聊天模型分页 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index 919fb5804d..59298f9fed 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -69,7 +69,7 @@ public class AiChatModelServiceImpl implements AiChatModelService { private AiChatModelDO validateChatModelExists(Long id) { AiChatModelDO model = chatModelMapper.selectById(id); if (chatModelMapper.selectById(id) == null) { - throw exception(CHAT_MODAL_NOT_EXIST); + throw exception(CHAT_MODEL_NOT_EXISTS); } return model; } @@ -79,6 +79,15 @@ public class AiChatModelServiceImpl implements AiChatModelService { return chatModelMapper.selectById(id); } + @Override + public AiChatModelDO getRequiredDefaultChatModel() { + AiChatModelDO model = chatModelMapper.selectFirstByStatus(CommonStatusEnum.ENABLE.getStatus()); + if (model == null) { + throw exception(CHAT_MODEL_DEFAULT_NOT_EXISTS); + } + return model; + } + @Override public PageResult getChatModelPage(AiChatModelPageReqVO pageReqVO) { return chatModelMapper.selectPage(pageReqVO); @@ -88,7 +97,7 @@ public class AiChatModelServiceImpl implements AiChatModelService { public AiChatModelDO validateChatModel(Long id) { AiChatModelDO model = validateChatModelExists(id); if (CommonStatusEnum.isDisable(model.getStatus())) { - throw exception(CHAT_MODAL_DISABLE); + throw exception(CHAT_MODEL_DISABLE); } return model; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index 8b22d638c9..7206fd1040 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import jakarta.validation.Valid; @@ -78,6 +79,15 @@ public interface AiChatRoleService { */ AiChatRoleDO validateChatRole(Long id); + /** + * 获得默认的聊天角色 + * + * 如果获取不到,则抛出 {@link cn.iocoder.yudao.framework.common.exception.ServiceException} 业务异常 + * + * @return 聊天角色 + */ + AiChatRoleDO getRequiredDefaultChatRole(); + /** * 获得聊天角色分页 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 507e4ce745..e039c41134 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -17,8 +17,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_DISABLE; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_ROLE_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; /** * AI 聊天角色 Service 实现类 @@ -110,6 +109,16 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { return chatRole; } + @Override + public AiChatRoleDO getRequiredDefaultChatRole() { + AiChatRoleDO chatRole = chatRoleMapper.selectFirstByPublicStatusAndStatus( + true, CommonStatusEnum.ENABLE.getStatus()); + if (chatRole == null) { + throw exception(CHAT_ROLE_DEFAULT_NOT_EXISTS); + } + return chatRole; + } + @Override public PageResult getChatRolePage(AiChatRolePageReqVO pageReqVO) { return chatRoleMapper.selectPage(pageReqVO); -- Gitee From 85b47e49258985acf58e6a6e56b5311975839746 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 14 May 2024 17:40:54 +0800 Subject: [PATCH 0534/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9E=8B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-server/src/main/resources/application-local.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 41ef6ef1a3..2f5e70b27e 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -61,7 +61,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root - password: root + password: 123456 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: @@ -229,7 +229,7 @@ yudao: appId: 13c8cca6 appKey: cb6415c19d6162cda07b47316fcb0416 secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh - chatModel: XING_HUO_3_5 + model: XING_HUO_3_5 yiyan: enable: true aiPlatform: YI_YAN @@ -240,7 +240,7 @@ yudao: appKey: x0cuLZ7XsaTCU08vuJWO87Lg secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK refreshTokenSecondTime: 86400 - chatModel: ERNIE4_3_5_8K + model: ERNIE4_3_5_8K openAiImage: enable: true api-key: ${OPEN_AI_KEY} -- Gitee From 4c05bd340ef2ec1b42ebfac427fc05df71f32634 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 14 May 2024 23:28:44 +0800 Subject: [PATCH 0535/1557] =?UTF-8?q?fix:=20=E8=8E=B7=E5=BE=97=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81(base64=20image)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 15 ++++++++------- .../app/social/vo/AppSocialWxQrcodeReqVO.java | 9 +++++++-- .../module/system/api/social/SocialClientApi.java | 10 ++++++++++ .../module/system/api/social/SocialUserApi.java | 8 -------- .../system/api/social/SocialClientApiImpl.java | 6 ++++++ .../system/api/social/SocialUserApiImpl.java | 6 ------ .../service/social/SocialClientService.java | 2 +- .../service/social/SocialClientServiceImpl.java | 2 +- .../system/service/social/SocialUserService.java | 8 -------- .../service/social/SocialUserServiceImpl.java | 5 ----- 10 files changed, 33 insertions(+), 38 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index f6a351a33d..a07e6324f4 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserBind import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserRespVO; import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserUnbindReqVO; import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialWxQrcodeReqVO; +import cn.iocoder.yudao.module.system.api.social.SocialClientApi; import cn.iocoder.yudao.module.system.api.social.SocialUserApi; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; @@ -34,6 +35,8 @@ public class AppSocialUserController { @Resource private SocialUserApi socialUserApi; + @Resource + private SocialClientApi socialClientApi; @PostMapping("/bind") @Operation(summary = "社交绑定,使用 code 授权码") @@ -63,14 +66,12 @@ public class AppSocialUserController { return success(BeanUtils.toBean(socialUser, AppSocialUserRespVO.class)); } - // TODO @puhui999:是不是 url 叫 wxa-qrcode?然后相关的方法,都做下调整哈;因为是微信小程序的二维码 - @PostMapping("/wxacode") - @Operation(summary = "获得微信小程序码") - @PreAuthenticated // TODO @puhui999:可能不需要登录 + @PostMapping("/wxa-qrcode") + @Operation(summary = "获得微信小程序码(base64 image)") public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { - byte[] wxQrcode = socialUserApi.getWxQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class).setUserId(getLoginUserId()) - .setUserType(UserTypeEnum.MEMBER.getValue()).setSocialType(reqVO.getType())); - return success(Base64.getEncoder().encodeToString(wxQrcode)); + byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class) + .setUserId(getLoginUserId()).setUserType(UserTypeEnum.MEMBER.getValue()).setSocialType(reqVO.getType())); + return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode)); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index 15d9e20a13..6465b23849 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -12,8 +12,9 @@ import lombok.Data; @Data public class AppSocialWxQrcodeReqVO { - // TODO @puhui999:这个后续不用前端传递,应该是后端搞的 - private static String SCENE = "1011"; // 默认场景值 1011 扫描二维码 + // TODO @puhui999:这个后续不用前端传递,应该是后端搞的。 + // 页面路径不能携带参数(参数请放在scene字段里) + private static String SCENE = ""; // 默认场景值 1011 扫描二维码 // TODO @puhui999:这个默认是不是 release 哈? private static String ENV_VERSION = "develop"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" // TODO @puhui999:这个去掉;因为本身就是 430 啦; @@ -28,6 +29,10 @@ public class AppSocialWxQrcodeReqVO { @Schema(description = "场景值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") private String scene = SCENE; + /** + * 默认是主页,页面 page,例如 pages/index/index,根路径前不要填加 /,不能携带参数(参数请放在scene字段里), + * 如果不填写这个字段,默认跳主页面。scancode_time为系统保留参数,不允许配置 + */ @Schema(description = "页面路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "pages/goods/index") @NotEmpty(message = "页面路径不能为空") private String path; diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApi.java index 7fdb35a324..cdc609b3ff 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApi.java @@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.system.api.social; import cn.iocoder.yudao.module.system.api.social.dto.SocialWxJsapiSignatureRespDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; +import jakarta.validation.Valid; /** * 社交应用的 API 接口 @@ -39,4 +41,12 @@ public interface SocialClientApi { */ SocialWxPhoneNumberInfoRespDTO getWxMaPhoneNumberInfo(Integer userType, String phoneCode); + /** + * 获得小程序二维码 + * + * @param reqVO 请求信息 + * @return 小程序二维码 + */ + byte[] getWxaQrcode(@Valid SocialWxQrcodeReqDTO reqVO); + } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java index 3bde3eab92..6102c4ecad 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java @@ -52,12 +52,4 @@ public interface SocialUserApi { */ SocialUserRespDTO getSocialUserByCode(Integer userType, Integer socialType, String code, String state); - /** - * 获得小程序二维码 - * - * @param reqVO 请求信息 - * @return 小程序二维码 - */ - byte[] getWxQrcode(@Valid SocialWxQrcodeReqDTO reqVO); - } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApiImpl.java index 2e82ad4923..2a7b69cfe6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApiImpl.java @@ -4,6 +4,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.system.api.social.dto.SocialWxJsapiSignatureRespDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO; +import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO; import cn.iocoder.yudao.module.system.service.social.SocialClientService; import me.chanjar.weixin.common.bean.WxJsapiSignature; import org.springframework.stereotype.Service; @@ -40,4 +41,9 @@ public class SocialClientApiImpl implements SocialClientApi { return BeanUtils.toBean(info, SocialWxPhoneNumberInfoRespDTO.class); } + @Override + public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) { + return socialClientService.getWxaQrcode(reqVO); + } + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java index ad56c9ee5f..a8c30a0f8d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApiImpl.java @@ -43,10 +43,4 @@ public class SocialUserApiImpl implements SocialUserApi { return socialUserService.getSocialUserByCode(userType, socialType, code, state); } - // TODO @puhui999:貌似搞到 SocialClientApiImpl 更合适,二维码和用户关系不大;这样 socialUserService 也不用绕一次了 - @Override - public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { - return socialUserService.getWxQrcode(reqVO); - } - } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java index f7d8cd0e2d..7757d35d15 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientService.java @@ -67,7 +67,7 @@ public interface SocialClientService { * @param reqVO 请求信息 * @return 小程序二维码 */ - byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO); + byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO); // =================== 客户端管理 =================== diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index 978f6161c8..aeff40cce0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -229,7 +229,7 @@ public class SocialClientServiceImpl implements SocialClientService { } @Override - public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { + public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) { WxMaService service = getWxMaService(reqVO.getUserType()); try { return service.getQrcodeService().createWxaCodeUnlimitBytes(reqVO.getScene(), reqVO.getPath(), diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java index 40ba455424..73d57687eb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserService.java @@ -87,12 +87,4 @@ public interface SocialUserService { */ PageResult getSocialUserPage(SocialUserPageReqVO pageReqVO); - /** - * 获得小程序二维码 - * - * @param reqVO 请求信息 - * @return 小程序二维码 - */ - byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO); - } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java index 5d236e938f..dedab0db3a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java @@ -171,9 +171,4 @@ public class SocialUserServiceImpl implements SocialUserService { return socialUserMapper.selectPage(pageReqVO); } - @Override - public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) { - return socialClientService.getWxQrcode(reqVO); - } - } -- Gitee From 52b972907a2d47e689d91cb16ac35f8528953ef3 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 14 May 2024 23:29:47 +0800 Subject: [PATCH 0536/1557] =?UTF-8?q?member:=20=E5=A2=9E=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BC=96=E5=8F=B7=E8=BF=94=E5=9B=9E=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E6=B5=B7=E6=8A=A5=E6=9C=89=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/user/vo/AppMemberUserInfoRespVO.java | 3 +++ .../module/member/convert/user/MemberUserConvert.java | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppMemberUserInfoRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppMemberUserInfoRespVO.java index fa05e16d06..72e4fa3fac 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppMemberUserInfoRespVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppMemberUserInfoRespVO.java @@ -11,6 +11,9 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class AppMemberUserInfoRespVO { + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Long id; + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") private String nickname; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java index aae9a76013..eaa5ab50ee 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java @@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.member.dal.dataobject.tag.MemberTagDO; import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; +import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import java.util.List; @@ -27,8 +28,12 @@ public interface MemberUserConvert { AppMemberUserInfoRespVO convert(MemberUserDO bean); - @Mapping(source = "level", target = "level") - @Mapping(source = "bean.experience", target = "experience") + + @Mappings({ + @Mapping(source = "level", target = "level"), + @Mapping(source = "bean.id", target = "id"), + @Mapping(source = "bean.experience", target = "experience") + }) AppMemberUserInfoRespVO convert(MemberUserDO bean, MemberLevelDO level); MemberUserRespDTO convert2(MemberUserDO bean); -- Gitee From 69fa98792ce116458095ea79cb134682d33120c2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 14 May 2024 23:46:29 +0800 Subject: [PATCH 0537/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D=E7=9A=84?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=EF=BC=8880%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 3 +- .../chat/AiChatConversationController.java | 10 +-- .../AiChatConversationRespVO.java | 24 ++++++- .../dal/mysql/AiChatConversationMapper.java | 65 ------------------- .../ai/dal/mysql/AiChatMessageMapper.java | 2 + .../mysql/chat/AiChatConversationMapper.java | 22 +++++++ .../chat/AiChatConversationService.java | 9 +-- .../chat/AiChatConversationServiceImpl.java | 28 ++++---- .../ai/service/impl/AiChatServiceImpl.java | 4 +- 9 files changed, 78 insertions(+), 89 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 8948fcba44..a70c58ba24 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -25,7 +25,8 @@ public interface ErrorCodeConstants { // ========== API 聊天会话 1-040-003-000 ========== - ErrorCode CHAT_CONVERSATION_NOT_EXISTS = new ErrorCode(1_040_003_000, "AI 对话不存在!");; + ErrorCode CHAT_CONVERSATION_NOT_EXISTS = new ErrorCode(1_040_003_000, "AI 对话不存在!"); + ErrorCode CHAT_CONVERSATION_MODEL_ERROR = new ErrorCode(1_040_003_001, "操作失败,该聊天模型的配置不完整"); // chat ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index 3e56cb999a..dcfe8d3865 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -40,11 +42,11 @@ public class AiChatConversationController { return success(true); } - // TODO done @fan:实现一下 @GetMapping("/my-list") - @Operation(summary = "获得聊天会话列表") - public CommonResult> getConversationList() { - return success(chatConversationService.listConversation()); + @Operation(summary = "获得【我的】聊天会话列表") + public CommonResult> getChatConversationMyList() { + List list = chatConversationService.getChatConversationListByUserId(getLoginUserId()); + return success(BeanUtils.toBean(list, AiChatConversationRespVO.class)); } // TODO @fan:实现一下 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 70ff21fc59..42c244e190 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -1,5 +1,11 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; +import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelRespVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import com.fhs.core.trans.anno.Trans; +import com.fhs.core.trans.constant.TransType; +import com.fhs.core.trans.vo.VO; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -7,7 +13,7 @@ import lombok.experimental.Accessors; @Schema(description = "管理后台 - AI 聊天会话 Response VO") @Data -public class AiChatConversationRespVO { +public class AiChatConversationRespVO implements VO { @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; @@ -22,9 +28,12 @@ public class AiChatConversationRespVO { private Boolean pinned; @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") + @Trans(type = TransType.SIMPLE, target = AiChatRoleDO.class, fields = "avatar", ref = "roleAvatar") private Long roleId; @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Trans(type = TransType.SIMPLE, target = AiChatModelDO.class, fields = {"maxTokens", "maxContexts"}, + refs = {"modelMaxTokens", "modelMaxContexts"}) private Long modelId; @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "ERNIE-Bot-turbo-0922") @@ -39,4 +48,17 @@ public class AiChatConversationRespVO { @Schema(description = "上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer maxContexts; + // ========== 关联 role 信息 ========== + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") + private String roleAvatar; + + // ========== 关联 model 信息 ========== + + @Schema(description = "模型的单条回复的最大 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") + private Integer modelMaxTokens; + + @Schema(description = "模型的上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer modelMaxContexts; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java deleted file mode 100644 index 0333be30d1..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatConversationMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package cn.iocoder.yudao.module.ai.dal.mysql; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Update; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * message mapper - * - * @fansili - * @since v1.0 - */ -@Repository -@Mapper -public interface AiChatConversationMapper extends BaseMapperX { - - /** - * 更新 - chat count - * - * @param id - */ - @Update("update ai_chat_conversation set chat_count = chat_count + 1 where id = #{id}") - void updateIncrChatCount(@Param("id") Long id); - - /** - * 查询 - 最新的对话 - * - * @param loginUserId - */ - default AiChatConversationDO selectLatestConversation(Long loginUserId) { - PageResult pageResult = selectPage(new PageParam().setPageNo(1).setPageSize(1), - new LambdaQueryWrapper() - .eq(AiChatConversationDO::getUserId, loginUserId) - .orderByDesc(AiChatConversationDO::getId)); - if (CollUtil.isEmpty(pageResult.getList())) { - return null; - } - return pageResult.getList().get(0); - } - - /** - * 查询 - 前100 - * - * @param search - */ - default List selectTop100Conversation(Long loginUserId, String search) { - LambdaQueryWrapper queryWrapper - = new LambdaQueryWrapper().eq(AiChatConversationDO::getUserId, loginUserId); - if (!StrUtil.isBlank(search)) { - queryWrapper.like(AiChatConversationDO::getTitle, search); - } - queryWrapper.orderByDesc(AiChatConversationDO::getId); - return selectPage(new PageParam().setPageNo(1).setPageSize(100), queryWrapper).getList(); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java index 5f6083fdbc..fef19af128 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.dal.mysql; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -30,4 +31,5 @@ public interface AiChatMessageMapper extends BaseMapperX { .orderByAsc(AiChatMessageDO::getId) ); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java new file mode 100644 index 0000000000..5d41fb0806 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.ai.dal.mysql.chat; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * AI 聊天对话 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface AiChatConversationMapper extends BaseMapperX { + + default List selectListByUserId(Long userId) { + return selectList(AiChatConversationDO::getUserId, userId); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index ed8fa101c5..626f7996be 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -19,7 +19,7 @@ public interface AiChatConversationService { * * @param createReqVO 创建信息 * @param userId 用户编号 - * @return 聊天会话 + * @return 编号 */ Long createChatConversationMy(AiChatConversationCreateMyReqVO createReqVO, Long userId); @@ -32,11 +32,12 @@ public interface AiChatConversationService { void updateChatConversationMy(AiChatConversationUpdateMyReqVO updateReqVO, Long userId); /** - * 获取 - 对话列表 + * 获得【我的】聊天会话列表 * - * @return + * @param userId 用户编号 + * @return 聊天会话列表 */ - List listConversation(); + List getChatConversationListByUserId(Long userId); /** * 获取 - 对话 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index b04f2b7898..22465467e4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.service.chat; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; @@ -11,7 +12,7 @@ import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import jakarta.annotation.Resource; @@ -22,6 +23,7 @@ import org.springframework.validation.annotation.Validated; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.*; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; /** @@ -49,9 +51,10 @@ public class AiChatConversationServiceImpl implements AiChatConversationService : chatRoleService.getRequiredDefaultChatRole(); Assert.notNull(role, "必须找到聊天角色"); // 1.2 获得 AiChatModelDO 聊天模型 - AiChatModelDO model = role.getModelId() != null ? chatModalService.validateChatModel(role.getId()) + AiChatModelDO model = role.getModelId() != null ? chatModalService.validateChatModel(role.getModelId()) : chatModalService.getRequiredDefaultChatModel(); - Assert.notNull(role, "必须找到默认模型"); + Assert.notNull(model, "必须找到默认模型"); + validateChatModel(model); // 2. 创建 AiChatConversationDO 聊天对话 AiChatConversationDO conversation = new AiChatConversationDO() @@ -70,9 +73,10 @@ public class AiChatConversationServiceImpl implements AiChatConversationService throw exception(CHAT_CONVERSATION_NOT_EXISTS); } // 1.2 校验模型是否存在 - AiChatModelDO model = null; + AiChatModelDO model; if (updateReqVO.getModelId() != null) { model = chatModalService.validateChatModel(updateReqVO.getModelId()); + Assert.notNull(model, "必须找到默认模型"); } // 1.3 校验温度参数、Token 数量、消息数量 TODO @@ -81,13 +85,15 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public List listConversation() { - // 获取用户id - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询前100对话 - List top100Conversation - = chatConversationMapper.selectTop100Conversation(loginUserId, null); - return AiChatConversationConvert.INSTANCE.covnertChatConversationResList(top100Conversation); + public List getChatConversationListByUserId(Long userId) { + return chatConversationMapper.selectListByUserId(userId); + } + + private void validateChatModel(AiChatModelDO model) { + if (ObjectUtil.isAllNotEmpty(model.getTemperature(), model.getMaxTokens(), model.getMaxContexts())) { + return; + } + throw exception(CHAT_CONVERSATION_MODEL_ERROR); } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index d74880dfc0..a73531dddd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -20,7 +20,7 @@ import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatConversationMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; @@ -119,8 +119,6 @@ public class AiChatServiceImpl implements AiChatService { .setMaxContexts(maxContexts); // 增加 chat message 记录 aiChatMessageMapper.insert(insertChatMessageDO); - // chat count 先+1 - aiChatConversationMapper.updateIncrChatCount(conversationId); return insertChatMessageDO; } -- Gitee From 78bb2d1dc8ae0bff30c18f14a99133e53d642c0d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 May 2024 08:59:18 +0800 Subject: [PATCH 0538/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 18 +++++++------ .../dataobject/chat/AiChatConversationDO.java | 7 +++++ .../chat/AiChatConversationServiceImpl.java | 26 +++++++++++++------ 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index a70c58ba24..4542c07877 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -10,26 +10,28 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; public interface ErrorCodeConstants { // ========== API 密钥 1-040-000-000 ========== - ErrorCode API_KEY_NOT_EXISTS = new ErrorCode(1_040_000_000, "AI API 密钥不存在"); - ErrorCode API_KEY_DISABLE = new ErrorCode(1_040_000_001, "AI API 密钥已禁用!"); + ErrorCode API_KEY_NOT_EXISTS = new ErrorCode(1_040_000_000, "API 密钥不存在"); + ErrorCode API_KEY_DISABLE = new ErrorCode(1_040_000_001, "API 密钥已禁用!"); // ========== API 聊天模型 1-040-001-000 ========== - ErrorCode CHAT_MODEL_NOT_EXISTS = new ErrorCode(1_040_001_000, "AI 模型不存在!"); - ErrorCode CHAT_MODEL_DISABLE = new ErrorCode(1_040_001_001, "AI 模型({})已禁用!"); + ErrorCode CHAT_MODEL_NOT_EXISTS = new ErrorCode(1_040_001_000, "模型不存在!"); + ErrorCode CHAT_MODEL_DISABLE = new ErrorCode(1_040_001_001, "模型({})已禁用!"); ErrorCode CHAT_MODEL_DEFAULT_NOT_EXISTS = new ErrorCode(1_040_001_002, "操作失败,找不到默认聊天模型"); // ========== API 聊天模型 1-040-002-000 ========== - ErrorCode CHAT_ROLE_NOT_EXISTS = new ErrorCode(1_040_002_000, "AI 聊天角色不存在"); - ErrorCode CHAT_ROLE_DISABLE = new ErrorCode(1_040_001_001, "AI 聊天角色({})已禁用!"); + ErrorCode CHAT_ROLE_NOT_EXISTS = new ErrorCode(1_040_002_000, "聊天角色不存在"); + ErrorCode CHAT_ROLE_DISABLE = new ErrorCode(1_040_001_001, "聊天角色({})已禁用!"); ErrorCode CHAT_ROLE_DEFAULT_NOT_EXISTS = new ErrorCode(1_040_001_002, "操作失败,找不到默认聊天角色"); // ========== API 聊天会话 1-040-003-000 ========== - ErrorCode CHAT_CONVERSATION_NOT_EXISTS = new ErrorCode(1_040_003_000, "AI 对话不存在!"); + ErrorCode CHAT_CONVERSATION_NOT_EXISTS = new ErrorCode(1_040_003_000, "对话不存在!"); ErrorCode CHAT_CONVERSATION_MODEL_ERROR = new ErrorCode(1_040_003_001, "操作失败,该聊天模型的配置不完整"); + ErrorCode CHAT_CONVERSATION_UPDATE_MAX_TOKENS_ERROR = new ErrorCode(1_040_003_002, "更新对话失败,最大 Token 超过上限"); + ErrorCode CHAT_CONVERSATION_UPDATE_MAX_CONTEXTS_ERROR = new ErrorCode(1_040_003_002, "更新对话失败,最大 Context 超过上限"); // chat - ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "AI 提问的 MessageId 不存在!"); + ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "提问的 MessageId 不存在!"); // midjourney diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index c8613b5e1a..5473870558 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -9,6 +9,9 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; +import java.time.LocalDateTime; +import java.util.Date; + /** * AI Chat 会话 DO * @@ -51,6 +54,10 @@ public class AiChatConversationDO extends BaseDO { * 是否置顶 */ private Boolean pinned; + /** + * 置顶时间 + */ + private LocalDateTime pinnedTime; /** * 角色编号 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 22465467e4..41cbf329ca 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -20,11 +20,11 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.time.LocalDateTime; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.*; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; /** * AI 聊天对话 Service 实现类 @@ -72,16 +72,26 @@ public class AiChatConversationServiceImpl implements AiChatConversationService if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); } - // 1.2 校验模型是否存在 - AiChatModelDO model; - if (updateReqVO.getModelId() != null) { - model = chatModalService.validateChatModel(updateReqVO.getModelId()); + // 1.2 校验模型是否存在(修改模型的情况) + if (!ObjectUtil.isAllEmpty(updateReqVO.getModelId(), updateReqVO.getMaxTokens(), updateReqVO.getMaxContexts())) { + AiChatModelDO model = chatModalService.validateChatModel(updateReqVO.getModelId()); Assert.notNull(model, "必须找到默认模型"); + validateChatModel(model); + // 校验 Token 数量、上下文数量 + if (updateReqVO.getMaxTokens() != null && updateReqVO.getMaxTokens() > model.getMaxTokens()) { + throw exception(CHAT_CONVERSATION_UPDATE_MAX_TOKENS_ERROR); + } + if (updateReqVO.getMaxContexts() != null && updateReqVO.getMaxContexts() > model.getMaxContexts()) { + throw exception(CHAT_CONVERSATION_UPDATE_MAX_CONTEXTS_ERROR); + } } - // 1.3 校验温度参数、Token 数量、消息数量 TODO // 更新对话信息 - chatConversationMapper.updateById(BeanUtils.toBean(updateReqVO, AiChatConversationDO.class)); + AiChatConversationDO updateObj = BeanUtils.toBean(updateReqVO, AiChatConversationDO.class); + if (Boolean.TRUE.equals(updateReqVO.getPinned())) { + updateObj.setPinnedTime(LocalDateTime.now()); + } + chatConversationMapper.updateById(updateObj); } @Override -- Gitee From 5632c515271943200f4b189204947632bf77ccc9 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Wed, 15 May 2024 13:44:18 +0800 Subject: [PATCH 0539/1557] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20DeliveryExpressDO=20=E6=97=B6=E6=8F=90=E7=A4=BA=20i?= =?UTF-8?q?d=20=E8=BF=87=E5=A4=A7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/dal/dataobject/delivery/DeliveryExpressDO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java index 265066d83b..c6b7fbf33c 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -20,7 +21,7 @@ public class DeliveryExpressDO extends BaseDO { /** * 编号,自增 */ - @TableId + @TableId(type = IdType.AUTO) private Long id; /** -- Gitee From c68f32cefeecd3afef706f9db677c38ba7c704d6 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Wed, 15 May 2024 13:44:39 +0800 Subject: [PATCH 0540/1557] =?UTF-8?q?chore:=20=E5=A4=87=E6=B3=A8=E5=9B=A2?= =?UTF-8?q?=E9=95=BF=E7=BF=BB=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/trade/dal/dataobject/order/TradeOrderDO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderDO.java index b127004aaa..ba7e689f8f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderDO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderDO.java @@ -322,7 +322,7 @@ public class TradeOrderDO extends BaseDO { * * 关联 CombinationRecordDO 的 headId 字段 */ - private Long combinationHeadId; + private Long combinationHeadId; // FIXME 2024/5/15: "团长" 应该译作 leader / starter 而不是 head /** * 拼团记录编号 * -- Gitee From 9c111acfbe8a1e81542e345d2bef59327bc9cc1c Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Wed, 15 May 2024 13:44:57 +0800 Subject: [PATCH 0541/1557] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20TradeOrde?= =?UTF-8?q?rUpdateServiceTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/TradeOrderUpdateServiceTest.java | 50 +++- .../src/test/resources/sql/create_tables.sql | 275 ++++++++++-------- 2 files changed, 203 insertions(+), 122 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceTest.java b/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceTest.java index 3f05f55591..2f78dbe08b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceTest.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceTest.java @@ -1,33 +1,49 @@ package cn.iocoder.yudao.module.trade.service.order; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.module.member.api.address.MemberAddressApi; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.product.api.comment.ProductCommentApi; import cn.iocoder.yudao.module.product.api.sku.ProductSkuApi; import cn.iocoder.yudao.module.product.api.spu.ProductSpuApi; import cn.iocoder.yudao.module.promotion.api.coupon.CouponApi; +import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; +import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressCreateReqVO; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderDeliveryReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; import cn.iocoder.yudao.module.trade.dal.mysql.order.TradeOrderItemMapper; import cn.iocoder.yudao.module.trade.dal.mysql.order.TradeOrderMapper; +import cn.iocoder.yudao.module.trade.dal.redis.no.TradeNoRedisDAO; +import cn.iocoder.yudao.module.trade.enums.delivery.DeliveryTypeEnum; +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderRefundStatusEnum; import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum; import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderConfig; import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties; +import cn.iocoder.yudao.module.trade.service.cart.CartServiceImpl; +import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; +import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressServiceImpl; +import cn.iocoder.yudao.module.trade.service.message.TradeMessageServiceImpl; +import cn.iocoder.yudao.module.trade.service.order.handler.TradeOrderHandler; +import cn.iocoder.yudao.module.trade.service.price.TradePriceServiceImpl; +import cn.iocoder.yudao.module.trade.service.price.calculator.TradePriceCalculator; +import jakarta.annotation.Resource; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; -import jakarta.annotation.Resource; import java.time.Duration; +import java.util.UUID; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; @@ -37,8 +53,10 @@ import static org.mockito.Mockito.when; * @author LeeYan9 * @since 2022-09-07 */ -@Disabled // TODO 芋艿:后续 fix 补充的单测 -@Import({TradeOrderUpdateServiceImpl.class, TradeOrderConfig.class}) +@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") +@Import({TradeOrderUpdateServiceImpl.class, TradeOrderConfig.class, CartServiceImpl.class, TradePriceServiceImpl.class, + DeliveryExpressServiceImpl.class, TradeMessageServiceImpl.class +}) public class TradeOrderUpdateServiceTest extends BaseDbUnitTest { @Resource @@ -55,7 +73,9 @@ public class TradeOrderUpdateServiceTest extends BaseDbUnitTest { private ProductSpuApi productSpuApi; @MockBean private ProductSkuApi productSkuApi; -// @MockBean + @MockBean + private ProductCommentApi productCommentApi; + // @MockBean // private PriceApi priceApi; @MockBean private PayOrderApi payOrderApi; @@ -66,11 +86,22 @@ public class TradeOrderUpdateServiceTest extends BaseDbUnitTest { @MockBean private TradeOrderProperties tradeOrderProperties; + @MockBean + private TradeNoRedisDAO tradeNoRedisDAO; + @MockBean + private TradeOrderHandler tradeOrderHandler; + @MockBean + private TradePriceCalculator tradePriceCalculator; + @MockBean + private NotifyMessageSendApi notifyMessageSendApi; + @Autowired + private DeliveryExpressService deliveryExpressService; @BeforeEach public void setUp() { when(tradeOrderProperties.getAppId()).thenReturn(888L); when(tradeOrderProperties.getPayExpireTime()).thenReturn(Duration.ofDays(1)); + when(tradeNoRedisDAO.generate(anyString())).thenReturn(UUID.randomUUID().toString()); } // @Test @@ -259,11 +290,18 @@ public class TradeOrderUpdateServiceTest extends BaseDbUnitTest { TradeOrderDO order = randomPojo(TradeOrderDO.class, o -> { o.setId(1L).setStatus(TradeOrderStatusEnum.UNDELIVERED.getStatus()); o.setLogisticsId(null).setLogisticsNo(null).setDeliveryTime(null); + o.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus()); + o.setDeliveryType(DeliveryTypeEnum.EXPRESS.getType()); }); tradeOrderMapper.insert(order); + + DeliveryExpressCreateReqVO expressCreateReqVO = new DeliveryExpressCreateReqVO(); + expressCreateReqVO.setCode("code").setName("Name").setLogo("logo").setSort(0).setStatus(CommonStatusEnum.ENABLE.getStatus()); + Long deliveryExpressId = deliveryExpressService.createDeliveryExpress(expressCreateReqVO); // 准备参数 TradeOrderDeliveryReqVO deliveryReqVO = new TradeOrderDeliveryReqVO().setId(1L) - .setLogisticsId(10L).setLogisticsNo("100"); + .setLogisticsId(deliveryExpressId).setLogisticsNo("100"); + // mock 方法(支付单) // 调用 diff --git a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/sql/create_tables.sql b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/sql/create_tables.sql index d263fdfb92..f619c01de2 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/sql/create_tables.sql @@ -1,128 +1,155 @@ -CREATE TABLE IF NOT EXISTS "trade_order" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "no" varchar NOT NULL, - "type" int NOT NULL, - "terminal" int NOT NULL, - "user_id" bigint NOT NULL, - "user_ip" varchar NOT NULL, - "user_remark" varchar, - "status" int NOT NULL, - "product_count" int NOT NULL, - "cancel_type" int, - "remark" varchar, - "pay_status" bit NOT NULL, - "pay_time" datetime, - "finish_time" datetime, - "cancel_time" datetime, - "original_price" int NOT NULL, - "order_price" int NOT NULL, - "discount_price" int NOT NULL, - "delivery_price" int NOT NULL, - "adjust_price" int NOT NULL, - "pay_price" int NOT NULL, - "pay_order_id" bigint, - "pay_channel_code" varchar, - "delivery_template_id" bigint, - "logistics_id" bigint, - "logistics_no" varchar, - "delivery_time" datetime, - "receive_time" datetime, - "receiver_name" varchar NOT NULL, - "receiver_mobile" varchar NOT NULL, - "receiver_area_id" int NOT NULL, - "receiver_post_code" int, - "receiver_detail_address" varchar NOT NULL, - "after_sale_status" int NOT NULL, - "refund_price" int NOT NULL, - "coupon_id" bigint NOT NULL, - "coupon_price" int NOT NULL, - "point_price" int NOT NULL, - "creator" varchar DEFAULT '', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar DEFAULT '', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, - PRIMARY KEY ("id") +CREATE TABLE IF NOT EXISTS "trade_order" +( + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "no" varchar NOT NULL, + "type" int NOT NULL, + "terminal" int NOT NULL, + "user_id" bigint NOT NULL, + "user_ip" varchar NOT NULL, + "user_remark" varchar, + "status" int NOT NULL, + "product_count" int NOT NULL, + "cancel_type" int, + "remark" varchar, + "comment_status" boolean, + "brokerage_user_id" bigint, + "pay_status" bit NOT NULL, + "pay_time" datetime, + "finish_time" datetime, + "cancel_time" datetime, + "total_price" int NULL, + "order_price" int NULL, + "discount_price" int NOT NULL, + "delivery_price" int NOT NULL, + "adjust_price" int NOT NULL, + "pay_price" int NOT NULL, + "delivery_type" int NOT NULL, + "pay_order_id" bigint, + "pay_channel_code" varchar, + "delivery_template_id" bigint, + "logistics_id" bigint, + "logistics_no" varchar, + "delivery_time" datetime, + "receive_time" datetime, + "receiver_name" varchar NOT NULL, + "receiver_mobile" varchar NOT NULL, + "receiver_area_id" int NOT NULL, + "receiver_post_code" int, + "receiver_detail_address" varchar NOT NULL, + "pick_up_store_id" long NULL, + "pick_up_verify_code" varchar NULL, + "refund_status" int NULL, + "refund_price" int NULL, + "after_sale_status" int NULL, + "coupon_id" bigint NOT NULL, + "coupon_price" int NOT NULL, + "use_point" int NULL, + "point_price" int NOT NULL, + "give_point" int NULL, + "refund_point" int NULL, + "vip_price" int NULL, + "seckill_activity_id" long NULL, + "bargain_activity_id" long NULL, + "bargain_record_id" long NULL, + "combination_activity_id" long NULL, + "combination_head_id" long NULL, + "combination_record_id" long NULL, + "creator" varchar DEFAULT '', + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar DEFAULT '', + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, + PRIMARY KEY ("id") ) COMMENT '交易订单表'; -CREATE TABLE IF NOT EXISTS "trade_order_item" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "user_id" bigint NOT NULL, - "order_id" bigint NOT NULL, - "spu_id" bigint NOT NULL, - "spu_name" varchar NOT NULL, - "sku_id" bigint NOT NULL, - "properties" varchar, - "pic_url" varchar, - "count" int NOT NULL, - "original_price" int NOT NULL, - "original_unit_price" int NOT NULL, - "discount_price" int NOT NULL, - "pay_price" int NOT NULL, - "order_part_price" int NOT NULL, - "order_divide_price" int NOT NULL, - "after_sale_status" int NOT NULL, - "creator" varchar DEFAULT '', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar DEFAULT '', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, - PRIMARY KEY ("id") +CREATE TABLE IF NOT EXISTS "trade_order_item" +( + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "user_id" bigint NOT NULL, + "order_id" bigint NOT NULL, + "cart_id" int NULL, + "spu_id" bigint NOT NULL, + "spu_name" varchar NOT NULL, + "sku_id" bigint NOT NULL, + "properties" varchar, + "pic_url" varchar, + "count" int NOT NULL, + "comment_status" boolean NULL, + "price" int NOT NULL, + "discount_price" int NOT NULL, + "delivery_price" int NULL, + "adjust_price" int NULL, + "pay_price" int NOT NULL, + "coupon_price" int NULL, + "point_price" int NULL, + "use_point" int NULL, + "give_point" int NULL, + "vip_price" int NULL, + "after_sale_id" long NULL, + "after_sale_status" int NOT NULL, + "creator" varchar DEFAULT '', + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar DEFAULT '', + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, + PRIMARY KEY ("id") ) COMMENT '交易订单明细表'; -CREATE TABLE IF NOT EXISTS "trade_after_sale" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "no" varchar NOT NULL, - "status" int NOT NULL, - "type" int NOT NULL, - "way" int NOT NULL, - "user_id" bigint NOT NULL, - "apply_reason" varchar NOT NULL, +CREATE TABLE IF NOT EXISTS "trade_after_sale" +( + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "no" varchar NOT NULL, + "status" int NOT NULL, + "type" int NOT NULL, + "way" int NOT NULL, + "user_id" bigint NOT NULL, + "apply_reason" varchar NOT NULL, "apply_description" varchar, "apply_pic_urls" varchar, - "order_id" bigint NOT NULL, - "order_no" varchar NOT NULL, - "order_item_id" bigint NOT NULL, - "spu_id" bigint NOT NULL, - "spu_name" varchar NOT NULL, - "sku_id" bigint NOT NULL, - "properties" varchar, - "pic_url" varchar, - "count" int NOT NULL, - "audit_time" varchar, - "audit_user_id" bigint, - "audit_reason" varchar, - "refund_price" int NOT NULL, - "pay_refund_id" bigint, - "refund_time" varchar, - "logistics_id" bigint, - "logistics_no" varchar, - "delivery_time" varchar, - "receive_time" varchar, + "order_id" bigint NOT NULL, + "order_no" varchar NOT NULL, + "order_item_id" bigint NOT NULL, + "spu_id" bigint NOT NULL, + "spu_name" varchar NOT NULL, + "sku_id" bigint NOT NULL, + "properties" varchar, + "pic_url" varchar, + "count" int NOT NULL, + "audit_time" varchar, + "audit_user_id" bigint, + "audit_reason" varchar, + "refund_price" int NOT NULL, + "pay_refund_id" bigint, + "refund_time" varchar, + "logistics_id" bigint, + "logistics_no" varchar, + "delivery_time" varchar, + "receive_time" varchar, "receive_reason" varchar, - "creator" varchar DEFAULT '', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar DEFAULT '', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, + "creator" varchar DEFAULT '', + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar DEFAULT '', + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, PRIMARY KEY ("id") ) COMMENT '交易售后表'; -CREATE TABLE IF NOT EXISTS "trade_after_sale_log" ( - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, - "user_id" bigint NOT NULL, - "user_type" int NOT NULL, - "after_sale_id" bigint NOT NULL, - "order_id" bigint NOT NULL, - "order_item_id" bigint NOT NULL, +CREATE TABLE IF NOT EXISTS "trade_after_sale_log" +( + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "user_id" bigint NOT NULL, + "user_type" int NOT NULL, + "after_sale_id" bigint NOT NULL, + "order_id" bigint NOT NULL, + "order_item_id" bigint NOT NULL, "before_status" int, - "after_status" int NOT NULL, - "content" varchar NOT NULL, - "creator" varchar DEFAULT '', - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updater" varchar DEFAULT '', - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - "deleted" bit NOT NULL DEFAULT FALSE, + "after_status" int NOT NULL, + "content" varchar NOT NULL, + "creator" varchar DEFAULT '', + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar DEFAULT '', + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, PRIMARY KEY ("id") ) COMMENT '交易售后日志'; @@ -161,7 +188,7 @@ CREATE TABLE IF NOT EXISTS "trade_brokerage_record" "updater" varchar DEFAULT '', "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, "deleted" bit NOT NULL DEFAULT FALSE, - "tenant_id" bigint not null default '0', + "tenant_id" bigint not null default '0', PRIMARY KEY ("id") ) COMMENT '佣金记录'; CREATE TABLE IF NOT EXISTS "trade_brokerage_withdraw" @@ -186,6 +213,22 @@ CREATE TABLE IF NOT EXISTS "trade_brokerage_withdraw" "updater" varchar DEFAULT '', "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, "deleted" bit NOT NULL DEFAULT FALSE, - "tenant_id" bigint not null default '0', + "tenant_id" bigint not null default '0', + PRIMARY KEY ("id") +) COMMENT '佣金提现'; + +CREATE TABLE IF NOT EXISTS "trade_delivery_express" +( + "id" int NOT NULL GENERATED BY DEFAULT AS IDENTITY, + "code" varchar NULL, + "name" varchar, + "logo" varchar NULL, + "sort" int NOT NULL, + "status" int NOT NULL, + "creator" varchar DEFAULT '', + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updater" varchar DEFAULT '', + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + "deleted" bit NOT NULL DEFAULT FALSE, PRIMARY KEY ("id") ) COMMENT '佣金提现'; \ No newline at end of file -- Gitee From 314a015a2ef2dccc69607cbe8b1367653b227d0d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 15 May 2024 18:16:50 +0800 Subject: [PATCH 0542/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java | 3 ++- .../yudao/module/ai/service/model/AiChatRoleServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index c0eeb549ec..c2a9631dc0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -50,8 +50,9 @@ public interface AiChatRoleMapper extends BaseMapperX { default List selectListGroupByCategory(Integer status) { return selectList(new LambdaQueryWrapperX() + .select(AiChatRoleDO::getCategory) .eq(AiChatRoleDO::getStatus, status) - .apply("GROUP BY category")); + .groupBy(AiChatRoleDO::getCategory)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index e039c41134..196f1a6ac1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -132,7 +132,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public List getChatRoleCategoryList() { List list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); - return convertList(list, AiChatRoleDO::getName); + return convertList(list, AiChatRoleDO::getCategory); } } -- Gitee From d0c7b2333a4103c6ac71fc50a3e4d4918f01fc38 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 May 2024 19:44:39 +0800 Subject: [PATCH 0543/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/AiChatConversationController.java | 22 ++++---- .../AiChatConversationRespVO.java | 13 ++--- .../AiChatConversationUpdateMyReqVO.java | 3 ++ .../model/vo/chatRole/AiChatRoleRespVO.java | 5 +- .../vo/chatRole/AiChatRoleSaveMyReqVO.java | 8 +-- .../vo/chatRole/AiChatRoleSaveReqVO.java | 8 +-- .../ai/convert/AiChatConversationConvert.java | 39 -------------- .../dataobject/chat/AiChatConversationDO.java | 4 ++ .../ai/dal/dataobject/model/AiChatRoleDO.java | 6 +-- .../chat/AiChatConversationService.java | 17 ++++--- .../chat/AiChatConversationServiceImpl.java | 51 +++++++++---------- .../ai/service/impl/AiChatServiceImpl.java | 8 +-- .../src/main/resources/http/chat-role.http | 2 - 13 files changed, 67 insertions(+), 119 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index dcfe8d3865..6838fcf5b8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; @@ -49,20 +50,23 @@ public class AiChatConversationController { return success(BeanUtils.toBean(list, AiChatConversationRespVO.class)); } - // TODO @fan:实现一下 - @GetMapping("/get") - @Operation(summary = "获得聊天会话") + @GetMapping("/get-my") + @Operation(summary = "获得【我的】聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") - public CommonResult getConversation(@RequestParam("id") Long id) { - return success(chatConversationService.getConversationOfValidate(id)); + public CommonResult getChatConversationMy(@RequestParam("id") Long id) { + AiChatConversationDO conversation = chatConversationService.getChatConversation(id); + if (conversation != null && ObjUtil.notEqual(conversation.getUserId(), getLoginUserId())) { + conversation = null; + } + return success(BeanUtils.toBean(conversation, AiChatConversationRespVO.class)); } - // TODO @fan:实现一下 - @DeleteMapping("/delete") + @DeleteMapping("/delete-my") @Operation(summary = "删除聊天会话") @Parameter(name = "id", required = true, description = "会话编号", example = "1024") - public CommonResult deleteConversation(@RequestParam("id") Long id) { - return success(chatConversationService.deleteConversation(id)); + public CommonResult deleteChatConversationMy(@RequestParam("id") Long id) { + chatConversationService.deleteChatConversationMy(id, getLoginUserId()); + return success(true); } // ========== 会话管理 ========== diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 42c244e190..60e45eabda 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -32,13 +32,14 @@ public class AiChatConversationRespVO implements VO { private Long roleId; @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @Trans(type = TransType.SIMPLE, target = AiChatModelDO.class, fields = {"maxTokens", "maxContexts"}, - refs = {"modelMaxTokens", "modelMaxContexts"}) private Long modelId; @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "ERNIE-Bot-turbo-0922") private String model; + @Schema(description = "角色设定", example = "一个快乐的程序员") + private String systemMessage; + @Schema(description = "温度参数", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.8") private Double temperature; @@ -53,12 +54,4 @@ public class AiChatConversationRespVO implements VO { @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") private String roleAvatar; - // ========== 关联 model 信息 ========== - - @Schema(description = "模型的单条回复的最大 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") - private Integer modelMaxTokens; - - @Schema(description = "模型的上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") - private Integer modelMaxContexts; - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java index 4eb5a06c33..36e95d298c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java @@ -21,6 +21,9 @@ public class AiChatConversationUpdateMyReqVO { @Schema(description = "模型编号", example = "1") private Long modelId; + @Schema(description = "角色设定", example = "一个快乐的程序员") + private String systemMessage; + @Schema(description = "温度参数", example = "0.8") private Double temperature; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java index 3adef6b258..eb34da2748 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java @@ -42,10 +42,7 @@ public class AiChatRoleRespVO implements VO { @Schema(description = "角色描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") private String description; - @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED) - private String welcomeMessage; - - @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "角色设定", requiredMode = Schema.RequiredMode.REQUIRED) private String systemMessage; @Schema(description = "是否公开", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java index 3c5641f08a..4673901d38 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveMyReqVO.java @@ -25,12 +25,8 @@ public class AiChatRoleSaveMyReqVO { @NotEmpty(message = "角色描述不能为空") private String description; - @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED, example = "Talk is cheap, i will show code") - @NotEmpty(message = "角色欢迎语不能为空") - private String welcomeMessage; - - @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") - @NotEmpty(message = "角色上下文不能为空") + @Schema(description = "角色设定", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") + @NotEmpty(message = "角色设定不能为空") private String systemMessage; } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java index 1dc62947be..bdda027ef2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleSaveReqVO.java @@ -38,12 +38,8 @@ public class AiChatRoleSaveReqVO { @NotEmpty(message = "角色描述不能为空") private String description; - @Schema(description = "角色欢迎语", requiredMode = Schema.RequiredMode.REQUIRED, example = "Talk is cheap, i will show code") - @NotEmpty(message = "角色欢迎语不能为空") - private String welcomeMessage; - - @Schema(description = "角色上下文", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") - @NotEmpty(message = "角色上下文不能为空") + @Schema(description = "角色设定", requiredMode = Schema.RequiredMode.REQUIRED, example = "现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题") + @NotEmpty(message = "角色设定不能为空") private String systemMessage; @Schema(description = "是否公开", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java deleted file mode 100644 index 7e1350617b..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatConversationConvert.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.ai.convert; - -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 聊天 对话 convert - * - * @author fansili - * @time 2024/4/18 16:39 - * @since 1.0 - */ -@Mapper -public interface AiChatConversationConvert { - - AiChatConversationConvert INSTANCE = Mappers.getMapper(AiChatConversationConvert.class); - - /** - * 转换 - 多个 ChatConversationRes - * - * @param top100Conversation - * @return - */ - List covnertChatConversationResList(List top100Conversation); - - /** - * 转换 - 单个 ChatConversationRes - * - * @param aiChatConversationDO - * @return - */ - AiChatConversationRespVO covnertChatConversationRes(AiChatConversationDO aiChatConversationDO); - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index 5473870558..b92e661436 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -81,6 +81,10 @@ public class AiChatConversationDO extends BaseDO { // ========== 会话配置 ========== + /** + * 角色设定 + */ + private String systemMessage; /** * 温度参数 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java index 1b33199d47..28f6cda43d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatRoleDO.java @@ -42,11 +42,7 @@ public class AiChatRoleDO extends BaseDO { */ private String description; /** - * 角色欢迎语 - */ - private String welcomeMessage; - /** - * 角色上下文 + * 角色设定 */ private String systemMessage; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index 626f7996be..a17b173e55 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.ai.service.chat; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; @@ -40,19 +39,20 @@ public interface AiChatConversationService { List getChatConversationListByUserId(Long userId); /** - * 获取 - 对话 + * 获得聊天会话 * - * @param id - * @return + * @param id 编号 + * @return 聊天会话 */ - AiChatConversationRespVO getConversationOfValidate(Long id); + AiChatConversationDO getChatConversation(Long id); /** - * 删除 - 根据id + * 删除【我的】聊天会话 * - * @param id + * @param id 编号 + * @param userId 用户编号 */ - Boolean deleteConversation(Long id); + void deleteChatConversationMy(Long id, Long userId); /** * 校验 - 是否存在 @@ -61,4 +61,5 @@ public interface AiChatConversationService { * @return */ AiChatConversationDO validateExists(Long id); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 41cbf329ca..f209a700f2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -4,11 +4,9 @@ import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; -import cn.iocoder.yudao.module.ai.convert.AiChatConversationConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; @@ -59,7 +57,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService // 2. 创建 AiChatConversationDO 聊天对话 AiChatConversationDO conversation = new AiChatConversationDO() .setUserId(userId).setTitle(AiChatConversationDO.TITLE_DEFAULT).setPinned(false) - .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()) + .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()).setSystemMessage(role.getSystemMessage()) .setTemperature(model.getTemperature()).setMaxTokens(model.getMaxTokens()).setMaxContexts(model.getMaxContexts()); chatConversationMapper.insert(conversation); return conversation.getId(); @@ -73,24 +71,19 @@ public class AiChatConversationServiceImpl implements AiChatConversationService throw exception(CHAT_CONVERSATION_NOT_EXISTS); } // 1.2 校验模型是否存在(修改模型的情况) - if (!ObjectUtil.isAllEmpty(updateReqVO.getModelId(), updateReqVO.getMaxTokens(), updateReqVO.getMaxContexts())) { - AiChatModelDO model = chatModalService.validateChatModel(updateReqVO.getModelId()); - Assert.notNull(model, "必须找到默认模型"); - validateChatModel(model); - // 校验 Token 数量、上下文数量 - if (updateReqVO.getMaxTokens() != null && updateReqVO.getMaxTokens() > model.getMaxTokens()) { - throw exception(CHAT_CONVERSATION_UPDATE_MAX_TOKENS_ERROR); - } - if (updateReqVO.getMaxContexts() != null && updateReqVO.getMaxContexts() > model.getMaxContexts()) { - throw exception(CHAT_CONVERSATION_UPDATE_MAX_CONTEXTS_ERROR); - } + AiChatModelDO model = null; + if (updateReqVO.getModelId() != null) { + model = chatModalService.validateChatModel(updateReqVO.getModelId()); } - // 更新对话信息 + // 2. 更新对话信息 AiChatConversationDO updateObj = BeanUtils.toBean(updateReqVO, AiChatConversationDO.class); if (Boolean.TRUE.equals(updateReqVO.getPinned())) { updateObj.setPinnedTime(LocalDateTime.now()); } + if (model != null) { + updateObj.setModel(model.getModel()); + } chatConversationMapper.updateById(updateObj); } @@ -99,22 +92,28 @@ public class AiChatConversationServiceImpl implements AiChatConversationService return chatConversationMapper.selectListByUserId(userId); } - private void validateChatModel(AiChatModelDO model) { - if (ObjectUtil.isAllNotEmpty(model.getTemperature(), model.getMaxTokens(), model.getMaxContexts())) { - return; - } - throw exception(CHAT_CONVERSATION_MODEL_ERROR); + @Override + public AiChatConversationDO getChatConversation(Long id) { + return chatConversationMapper.selectById(id); } @Override - public AiChatConversationRespVO getConversationOfValidate(Long id) { - AiChatConversationDO aiChatConversationDO = validateExists(id); - return AiChatConversationConvert.INSTANCE.covnertChatConversationRes(aiChatConversationDO); + public void deleteChatConversationMy(Long id, Long userId) { + // 1. 校验对话是否存在 + AiChatConversationDO conversation = validateExists(id); + if (ObjUtil.notEqual(conversation.getUserId(), userId)) { + throw exception(CHAT_CONVERSATION_NOT_EXISTS); + } + + // 2. 执行删除 + chatConversationMapper.deleteById(id); } - @Override - public Boolean deleteConversation(Long id) { - return chatConversationMapper.deleteById(id) > 0; + private void validateChatModel(AiChatModelDO model) { + if (ObjectUtil.isAllNotEmpty(model.getTemperature(), model.getMaxTokens(), model.getMaxContexts())) { + return; + } + throw exception(CHAT_CONVERSATION_MODEL_ERROR); } public AiChatConversationDO validateExists(Long id) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index a73531dddd..4642c648dd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; @@ -54,7 +55,6 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatClientFactory aiChatClientFactory; private final AiChatMessageMapper aiChatMessageMapper; - private final AiChatConversationMapper aiChatConversationMapper; private final AiChatConversationService chatConversationService; private final AiChatModelService aiChatModalService; private final AiChatRoleService chatRoleService; @@ -63,7 +63,7 @@ public class AiChatServiceImpl implements AiChatService { public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询对话 - AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 @@ -130,7 +130,7 @@ public class AiChatServiceImpl implements AiChatService { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST); } // 查询对话 - AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(aiChatMessageDO.getConversationId()); + AiChatConversationDO conversation = chatConversationService.validateExists(aiChatMessageDO.getConversationId()); // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 @@ -188,7 +188,7 @@ public class AiChatServiceImpl implements AiChatService { public AiChatMessageRespVO add(AiChatMessageAddReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 查询对话 - AiChatConversationRespVO conversation = chatConversationService.getConversationOfValidate(req.getConversationId()); + AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); // 获取对话模型 AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http index 87502e3135..d31e00f811 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-role.http @@ -14,7 +14,6 @@ Authorization: {{token}} "avatar": "http://baidu.com", "category": "writing", "description": "采用gpt3.5模型,拥有小红书优质作者写作经验。", - "welcomeMessage": "欢迎使用小红书写作模型!", "systemMessage": "你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。", "publicStatus": 0, "sort": 0 @@ -33,7 +32,6 @@ Authorization: {{token}} "avatar": "http://baidu.com", "category": "writing", "description": "采用gpt3.5模型,拥有小红书优质作者写作经验。", - "welcomeMessage": "欢迎使用小红书写作模型!", "systemMessage": "你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。", "publicStatus": 0, "sort": 0, -- Gitee From 20657ccaf36b1b261447d1d5d77435df743e7760 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 May 2024 21:20:18 +0800 Subject: [PATCH 0544/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E5=AF=B9=E8=AF=9D=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/chat/AiChatMessageController.java | 5 +---- .../admin/chat/vo/conversation/AiChatConversationRespVO.java | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 7a6c1bc12d..a89381ff44 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -18,24 +18,21 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -// TODO @芋艿:权限标识; @Tag(name = "管理后台 - 聊天消息") @RestController @RequestMapping("/ai/chat/message") @Slf4j public class AiChatMessageController { + @Resource private AiChatService chatService; @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") @PostMapping("/send") public CommonResult sendMessage(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { - // TODO done @fan:使用 static import;这样就 success 就行了; return success(chatService.chat(sendReqVO)); } - // TODO @芋艿:调用这个方法异常,Unable to handle the Spring Security Exception because the response is already committed.;可以再试试 - // TODO @fan:要不要使用 Flux 来返回;可以使用 Flux @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) @PermitAll // 解决 SSE 最终响应的时候,会被 Access Denied 拦截的问题 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 60e45eabda..214cf21d94 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -32,11 +32,15 @@ public class AiChatConversationRespVO implements VO { private Long roleId; @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @Trans(type = TransType.SIMPLE, target = AiChatModelDO.class, fields = "name", ref = "modelName") private Long modelId; @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "ERNIE-Bot-turbo-0922") private String model; + @Schema(description = "模型名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + private String modelName; + @Schema(description = "角色设定", example = "一个快乐的程序员") private String systemMessage; -- Gitee From b31e919d5235362a66e5a9bf7716b7a0990ad124 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 May 2024 23:06:18 +0800 Subject: [PATCH 0545/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E6=B5=81=E5=BC=8F=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E5=BE=AE=E8=B0=83=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=88=90=E5=8D=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.http} | 6 +- .../admin/chat/AiChatMessageController.java | 11 +- .../chat/vo/message/AiChatMessageRespVO.java | 1 + .../vo/message/AiChatMessageSendRespVO.java | 36 +++++ .../message/AiChatMessageSendStreamReqVO.java | 16 -- .../ai/convert/AiChatMessageConvert.java | 8 - .../module/ai/service/AiChatService.java | 25 ++- .../ai/service/impl/AiChatServiceImpl.java | 146 ++++++++---------- .../ai/models/yiyan/YiYanChatClient.java | 5 +- 9 files changed, 121 insertions(+), 133 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/{resources/http/chat-message.http => java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http} (82%) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http similarity index 82% rename from yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http index b357ab66eb..2d417a55fd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/chat-message.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http @@ -10,13 +10,13 @@ Authorization: {{token}} } -### chat call -POST {{baseUrl}}/admin-api/ai/chat/message/send-stream +### 发送消息(流式) +POST {{baseUrl}}/ai/chat/message/send-stream Content-Type: application/json Authorization: {{token}} { - "conversationId": "1781604279872581649", + "conversationId": "1781604279872581651", "content": "苹果是什么颜色?" } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index a89381ff44..47f35f4ea0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -17,6 +17,7 @@ import reactor.core.publisher.Flux; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - 聊天消息") @RestController @@ -36,14 +37,8 @@ public class AiChatMessageController { @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) @PermitAll // 解决 SSE 最终响应的时候,会被 Access Denied 拦截的问题 - public Flux sendMessageStream(@Validated @RequestBody AiChatMessageSendStreamReqVO sendReqVO) { - return chatService.chatStream(sendReqVO); - } - - @Operation(summary = "添加/提问", description = "先创建好 message 前端才好渲染") - @PostMapping(value = "/add") - public CommonResult add(@Validated @RequestBody AiChatMessageAddReqVO req) { - return success(chatService.add(req)); + public Flux sendChatMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { + return chatService.sendChatMessageStream(sendReqVO, getLoginUserId()); } @Operation(summary = "获得指定会话的消息列表") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index f117c67c6b..c4863c7356 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -44,4 +44,5 @@ public class AiChatMessageRespVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") private LocalDateTime createTime; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java new file mode 100644 index 0000000000..9ea7900cb3 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - AI 聊天消息发送 Response VO") +@Data +public class AiChatMessageSendRespVO { + + @Schema(description = "发送消息", requiredMode = Schema.RequiredMode.REQUIRED) + private Message send; + + @Schema(description = "接收消息", requiredMode = Schema.RequiredMode.REQUIRED) + private Message receive; + + @Schema(description = "消息") + @Data + public static class Message { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private Long id; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "role") + private String type; // 参见 MessageType 枚举类 + + @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") + private String content; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") + private LocalDateTime createTime; + + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java deleted file mode 100644 index cfd67ccba4..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendStreamReqVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -@Schema(description = "管理后台 - AI 聊天消息发送 Request VO") -@Data -public class AiChatMessageSendStreamReqVO { - - @Schema(description = "提问的 messageId", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "提问的 messageId 不能为空") - private Long id; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java index 05f7b83b69..eda5563584 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java @@ -27,12 +27,4 @@ public interface AiChatMessageConvert { */ List convertAiChatMessageRespVOList(List aiChatMessageDOList); - /** - * 转换 - aiChatMessageDO - * - * @param aiChatMessageDO - * @return - */ - AiChatMessageRespVO convertAiChatMessageRespVO(AiChatMessageDO aiChatMessageDO); - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index 7be2b8afce..57d848eea7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -22,22 +22,6 @@ public interface AiChatService { */ AiChatMessageRespVO chat(AiChatMessageSendReqVO sendReqVO); - /** - * chat stream - * - * @param sendReqVO - * @return - */ - Flux chatStream(AiChatMessageSendStreamReqVO sendReqVO); - - /** - * 添加 - message - * - * @param sendReqVO - * @return - */ - AiChatMessageRespVO add(AiChatMessageAddReqVO sendReqVO); - /** * 获取 - 获取对话 message list * @@ -54,4 +38,13 @@ public interface AiChatService { */ Boolean deleteMessage(Long id); + /** + * 发送消息 + * + * @param sendReqVO + * @param userId + * @return + */ + Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 4642c648dd..1ab160bfc1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,27 +1,24 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.exceptions.ExceptionUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.MessageType; +import org.springframework.ai.chat.prompt.ChatOptionsBuilder; import org.springframework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageAddReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendStreamReqVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; @@ -33,13 +30,16 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; +import java.time.LocalDateTime; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Consumer; import java.util.stream.Collectors; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; + /** * 聊天 service * @@ -52,11 +52,11 @@ import java.util.stream.Collectors; @AllArgsConstructor public class AiChatServiceImpl implements AiChatService { - private final AiChatClientFactory aiChatClientFactory; + private final AiChatClientFactory chatClientFactory; private final AiChatMessageMapper aiChatMessageMapper; private final AiChatConversationService chatConversationService; - private final AiChatModelService aiChatModalService; + private final AiChatModelService chatModalService; private final AiChatRoleService chatRoleService; @Transactional(rollbackFor = Exception.class) @@ -65,7 +65,7 @@ public class AiChatServiceImpl implements AiChatService { // 查询对话 AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); // 获取对话模型 - AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); + AiChatModelDO chatModel = chatModalService.validateChatModel(conversation.getModelId()); // 获取角色信息 AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; // 获取 client 类型 @@ -84,7 +84,7 @@ public class AiChatServiceImpl implements AiChatService { // req.setTopP(req.getTopP()); // req.setTemperature(req.getTemperature()); // 发送 call 调用 - ChatClient chatClient = aiChatClientFactory.getChatClient(platformEnum); + ChatClient chatClient = chatClientFactory.getChatClient(platformEnum); ChatResponse call = chatClient.call(prompt); content = call.getResult().getOutput().getContent(); tokens = call.getResults().size(); @@ -113,88 +113,72 @@ public class AiChatServiceImpl implements AiChatService { .setModelId(modelId) .setContent(content) .setTokens(tokens) - .setTemperature(temperature) .setMaxTokens(maxTokens) .setMaxContexts(maxContexts); + insertChatMessageDO.setCreateTime(LocalDateTime.now()); // 增加 chat message 记录 aiChatMessageMapper.insert(insertChatMessageDO); return insertChatMessageDO; } - public Flux chatStream(AiChatMessageSendStreamReqVO req) { - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询提问的 message - AiChatMessageDO aiChatMessageDO = aiChatMessageMapper.selectById(req.getId()); - if (aiChatMessageDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST); + @Override + public Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId) { + // 1.1 校验对话存在 + AiChatConversationDO conversation = chatConversationService.validateExists(sendReqVO.getConversationId()); + if (ObjUtil.notEqual(conversation.getUserId(), userId)) { + throw exception(CHAT_CONVERSATION_NOT_EXISTS); } - // 查询对话 - AiChatConversationDO conversation = chatConversationService.validateExists(aiChatMessageDO.getConversationId()); - // 获取对话模型 - AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); - // 获取角色信息 - AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; - // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(aiChatMessageDO.getContent()); - // 提前创建一个 system message - AiChatMessageDO systemMessage = insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), "", + // 1.2 校验模型 + AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); + AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); + StreamingChatClient chatClient = chatClientFactory.getStreamingChatClient(platform); + + // 2. 插入 user 发送消息 TODO tokens 计算 + AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, userId, conversation.getRoleId(), + conversation.getModel(), conversation.getId(), sendReqVO.getContent(), + null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + + // 3.1 插入 system 接收消息 + AiChatMessageDO systemMessage = insertChatMessage(conversation.getId(), MessageType.SYSTEM, userId, conversation.getRoleId(), + conversation.getModel(), conversation.getId(), conversation.getSystemMessage(), 0, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); -// req.setTopK(req.getTopK()); -// req.setTopP(req.getTopP()); -// req.setTemperature(req.getTemperature()); - // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); - StreamingChatClient streamingChatClient = aiChatClientFactory.getStreamingChatClient(platformEnum); - Flux streamResponse = streamingChatClient.stream(prompt); - // 转换 flex AiChatMessageRespVO + // 3.2 创建 chat 需要的 Prompt + // TODO 消息上下文 + Prompt prompt = new Prompt(sendReqVO.getContent()); +// ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build() + Flux streamResponse = chatClient.stream(prompt); + // 3.3 转换 flex AiChatMessageRespVO StringBuffer contentBuffer = new StringBuffer(); - AtomicInteger tokens = new AtomicInteger(0); + AtomicInteger tokens = new AtomicInteger(0); // TODO token 计算不对; return streamResponse.map(res -> { - AiChatMessageRespVO aiChatMessageRespVO = - AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVO(systemMessage); - aiChatMessageRespVO.setContent(res.getResult().getOutput().getContent()); - contentBuffer.append(res.getResult().getOutput().getContent()); - tokens.incrementAndGet(); - return aiChatMessageRespVO; - } - ).doOnComplete(new Runnable() { - @Override - public void run() { - log.info("发送完成!"); - // 保存 chat message - aiChatMessageMapper.updateById(new AiChatMessageDO() - .setId(systemMessage.getId()) - .setContent(contentBuffer.toString()) - .setTokens(tokens.get()) - ); - } - }).doOnError(new Consumer() { - @Override - public void accept(Throwable throwable) { - log.error("发送错误 {}!", throwable.getMessage()); - // 更新错误信息 - aiChatMessageMapper.updateById(new AiChatMessageDO() - .setId(systemMessage.getId()) - .setContent(throwable.getMessage()) - .setTokens(tokens.get()) - ); - } - }); - } + contentBuffer.append(res.getResult().getOutput().getContent()); + tokens.incrementAndGet(); - @Override - public AiChatMessageRespVO add(AiChatMessageAddReqVO req) { - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询对话 - AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); - // 获取对话模型 - AiChatModelDO chatModel = aiChatModalService.validateChatModel(conversation.getModelId()); - AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), req.getContent(), - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); - return AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVO(userMessage); + AiChatMessageSendRespVO.Message send = new AiChatMessageSendRespVO.Message().setId(userMessage.getId()) + .setType(MessageType.USER.getValue()).setCreateTime(userMessage.getCreateTime()) + .setContent(sendReqVO.getContent()); + AiChatMessageSendRespVO.Message receive = new AiChatMessageSendRespVO.Message().setId(systemMessage.getId()) + .setType(MessageType.SYSTEM.getValue()).setCreateTime(systemMessage.getCreateTime()) + .setContent(res.getResult().getOutput().getContent()); + return new AiChatMessageSendRespVO().setSend(send).setReceive(receive); + }).doOnComplete(() -> { + log.info("发送完成!"); + // 保存 chat message + aiChatMessageMapper.updateById(new AiChatMessageDO() + .setId(systemMessage.getId()) + .setContent(contentBuffer.toString()) + .setTokens(tokens.get()) + ); + }).doOnError(throwable -> { + log.error("发送错误 {}!", throwable.getMessage()); + // 更新错误信息 TODO 貌似不应该更新异常 + aiChatMessageMapper.updateById(new AiChatMessageDO() + .setId(systemMessage.getId()) + .setContent(throwable.getMessage()) + .setTokens(tokens.get()) + ); + }); } @Override @@ -205,7 +189,7 @@ public class AiChatServiceImpl implements AiChatService { List aiChatMessageDOList = aiChatMessageMapper.selectByConversationId(conversationId); // 获取模型信息 Set modalIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getModelId).collect(Collectors.toSet()); - List modalList = aiChatModalService.getModalByIds(modalIds); + List modalList = chatModalService.getModalByIds(modalIds); Map modalIdMap = modalList.stream().collect(Collectors.toMap(AiChatModelDO::getId, o -> o)); // 转换 AiChatMessageRespVO List aiChatMessageRespList = AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java index 8199766296..5d1dd4f76d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java @@ -94,7 +94,10 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { String a = ";"; } }); - return response.map(res -> new ChatResponse(List.of(new Generation(res.getResult())))); + return response.map(res -> { + // TODO @fan:这里缺少了 usage 的封装 + return new ChatResponse(List.of(new Generation(res.getResult()))); + }); } private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { -- Gitee From e6fefa06b7463582bd8f981c24364e2ef3fccf67 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 15 May 2024 23:13:54 +0800 Subject: [PATCH 0546/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=20=E8=A7=92=E8=89=B2=E5=88=86=E7=B1=BB=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2=EF=BC=8C=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/service/model/AiChatRoleServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 196f1a6ac1..4372003d09 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -14,6 +14,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -132,7 +134,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public List getChatRoleCategoryList() { List list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); - return convertList(list, AiChatRoleDO::getCategory); + return convertList(list.stream().filter(Objects::nonNull).collect(Collectors.toList()), AiChatRoleDO::getCategory); } } -- Gitee From 40912536931d75395d38cc5f5a39290f1d6ecbb9 Mon Sep 17 00:00:00 2001 From: g_l Date: Thu, 16 May 2024 02:33:01 +0000 Subject: [PATCH 0547/1557] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=BC=95=E5=8F=91=E7=9A=84NPE=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: g_l --- .../module/system/controller/admin/user/UserController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 51ec808575..2d659c3324 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -119,6 +119,7 @@ public class UserController { @PreAuthorize("@ss.hasPermission('system:user:query')") public CommonResult getUser(@RequestParam("id") Long id) { AdminUserDO user = userService.getUser(id); + if (ObjectUtil.isEmpty(user)) return CommonResult.success(null); // 拼接数据 DeptDO dept = deptService.getDept(user.getDeptId()); return success(UserConvert.INSTANCE.convert(user, dept)); -- Gitee From e7a3f47d0268737c6713928957285e09542d0c20 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 16 May 2024 11:28:53 +0800 Subject: [PATCH 0548/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=20=E5=AF=B9=E8=AF=9D=E5=A2=9E=E5=8A=A0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/vo/conversation/AiChatConversationRespVO.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 214cf21d94..78cd713657 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.fhs.core.trans.anno.Trans; import com.fhs.core.trans.constant.TransType; import com.fhs.core.trans.vo.VO; @@ -11,6 +13,9 @@ import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; +import java.time.LocalDateTime; +import java.time.LocalTime; + @Schema(description = "管理后台 - AI 聊天会话 Response VO") @Data public class AiChatConversationRespVO implements VO { @@ -53,6 +58,9 @@ public class AiChatConversationRespVO implements VO { @Schema(description = "上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer maxContexts; + @Schema(description = "最后更新时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-16") + private LocalDateTime updateTime; + // ========== 关联 role 信息 ========== @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") -- Gitee From fe63bda4c7afc96dabe9da560777b31089b7c984 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 16 May 2024 12:10:03 +0800 Subject: [PATCH 0549/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=20Chat=20=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatConversationController.java | 7 +++++++ .../service/chat/AiChatConversationService.java | 6 ++++++ .../chat/AiChatConversationServiceImpl.java | 16 +++++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index 6838fcf5b8..9d0cd74c86 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -69,6 +69,13 @@ public class AiChatConversationController { return success(true); } + @DeleteMapping("/delete-my-all-except-pinned") + @Operation(summary = "删除所有对话(置顶除外)") + @Parameter(name = "id", required = true, description = "会话编号", example = "1024") + public CommonResult deleteMyAllExceptPinned() { + chatConversationService.deleteMyAllExceptPinned(getLoginUserId()); + return success(true); + } // ========== 会话管理 ========== } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index a17b173e55..f93572e66f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -62,4 +62,10 @@ public interface AiChatConversationService { */ AiChatConversationDO validateExists(Long id); + /** + * 删除 - 所有对话,置顶除外 + * + * @param loginUserId + */ + void deleteMyAllExceptPinned(Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index f209a700f2..85dd57afdf 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -4,8 +4,8 @@ import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; @@ -21,8 +21,9 @@ import org.springframework.validation.annotation.Validated; import java.time.LocalDateTime; import java.util.List; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.*; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; /** * AI 聊天对话 Service 实现类 @@ -124,4 +125,13 @@ public class AiChatConversationServiceImpl implements AiChatConversationService return conversation; } + @Override + public void deleteMyAllExceptPinned(Long loginUserId) { + chatConversationMapper.delete( + new LambdaQueryWrapperX() + .eq(AiChatConversationDO::getUserId, loginUserId) + .eq(AiChatConversationDO::getPinned, false) + ); + } + } -- Gitee From 380ec112217a442b31172a527fb7f0c2ead7d428 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 16 May 2024 16:57:43 +0800 Subject: [PATCH 0550/1557] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 2 +- .../app/social/vo/AppSocialWxQrcodeReqVO.java | 37 ++++++------------ .../api/social/dto/SocialWxQrcodeReqDTO.java | 39 ++----------------- .../social/SocialClientServiceImpl.java | 7 ++-- 4 files changed, 20 insertions(+), 65 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index a07e6324f4..6e39735257 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -70,7 +70,7 @@ public class AppSocialUserController { @Operation(summary = "获得微信小程序码(base64 image)") public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class) - .setUserId(getLoginUserId()).setUserType(UserTypeEnum.MEMBER.getValue()).setSocialType(reqVO.getType())); + .setEnvVersion(AppSocialWxQrcodeReqVO.ENV_VERSION)); return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index 6465b23849..10321519c8 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -1,31 +1,25 @@ package cn.iocoder.yudao.module.member.controller.app.social.vo; -import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO @芋艿:需要精简下参数; + @Schema(description = "用户 APP - 获得获取小程序码 Request VO") @Data public class AppSocialWxQrcodeReqVO { - // TODO @puhui999:这个后续不用前端传递,应该是后端搞的。 - // 页面路径不能携带参数(参数请放在scene字段里) - private static String SCENE = ""; // 默认场景值 1011 扫描二维码 - // TODO @puhui999:这个默认是不是 release 哈? - private static String ENV_VERSION = "develop"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" - // TODO @puhui999:这个去掉;因为本身就是 430 啦; + // TODO @puhui999: 没有默认值 getQrcodeService().createWxaCodeUnlimitBytes() 转类型会报错 🤣 + public static String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" + private static String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) private static Integer WIDTH = 430; // 二维码宽度 - // TODO @puhui999:这个去掉;因为本身就是 true 啦; private static Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 - // TODO @puhui999:这个去掉;因为本身就是 true 啦; private static Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 - // TODO @puhui999:这个去掉;因为本身就是 true 啦; - private static Boolean IS_HYALINE = true; // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + private static Boolean HYALINE = true; // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 + /** + * 页面路径不能携带参数(参数请放在scene字段里) + */ @Schema(description = "场景值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") private String scene = SCENE; @@ -37,25 +31,16 @@ public class AppSocialWxQrcodeReqVO { @NotEmpty(message = "页面路径不能为空") private String path; - // TODO @puhui999:这个应该不传递哈 - @Schema(description = "小程序版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "develop") - private String envVersion = ENV_VERSION; - @Schema(description = "二维码宽度", requiredMode = Schema.RequiredMode.REQUIRED, example = "430") private Integer width = WIDTH; @Schema(description = "是/否自动配置线条颜色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean isAutoColor = AUTO_COLOR; + private Boolean autoColor = AUTO_COLOR; @Schema(description = "是/否检查 page 是否存在", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean isCheckPath = CHECK_PATH; + private Boolean checkPath = CHECK_PATH; @Schema(description = "是/否需要透明底色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean isHyaline = IS_HYALINE; - - @Schema(description = "社交平台的类型,参见 SocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") - @InEnum(SocialTypeEnum.class) - @NotNull(message = "社交平台的类型不能为空") - private Integer type; + private Boolean hyaline = HYALINE; } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java index d5e7f194ff..efda43e815 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java @@ -1,42 +1,17 @@ package cn.iocoder.yudao.module.system.api.social.dto; -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.Data; /** * 获取小程序码 Request DTO * - * @see 获取不限制的小程序码 - * * @author HUIHUI + * @see 获取不限制的小程序码 */ @Data public class SocialWxQrcodeReqDTO { - // TODO @puhui999:userId、userType 应该后续要搞成抽象参数;说白了,就是 path 的参数; socialType 应该去掉,因为就是微信的; - /** - * 用户编号 - */ - @NotNull(message = "用户编号不能为空") - private Long userId; - /** - * 用户类型 - */ - @InEnum(UserTypeEnum.class) - @NotNull(message = "用户类型不能为空") - private Integer userType; - - /** - * 社交平台的类型 - */ - @InEnum(SocialTypeEnum.class) - @NotNull(message = "社交平台的类型不能为空") - private Integer socialType; - /** * 场景 */ @@ -56,23 +31,17 @@ public class SocialWxQrcodeReqDTO { */ private Integer width; - // TODO @puhui999:autoColor - /** * 是否需要透明底色 */ - private Boolean isAutoColor; - - // TODO @puhui999: checkPath + private Boolean autoColor; /** * 是否检查 page 是否存在 */ - private Boolean isCheckPath; - - // TODO @puhui999: hyaline + private Boolean checkPath; /** * 是否需要透明底色 */ - private Boolean isHyaline; + private Boolean hyaline; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index aeff40cce0..41b27b171f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -9,6 +9,7 @@ import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ReflectUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.cache.CacheUtils; import cn.iocoder.yudao.framework.common.util.http.HttpUtils; @@ -230,11 +231,11 @@ public class SocialClientServiceImpl implements SocialClientService { @Override public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) { - WxMaService service = getWxMaService(reqVO.getUserType()); + WxMaService service = getWxMaService(UserTypeEnum.MEMBER.getValue()); try { return service.getQrcodeService().createWxaCodeUnlimitBytes(reqVO.getScene(), reqVO.getPath(), - reqVO.getIsCheckPath(), reqVO.getEnvVersion(), reqVO.getWidth(), reqVO.getIsAutoColor(), - null, reqVO.getIsHyaline()); + reqVO.getCheckPath(), reqVO.getEnvVersion(), reqVO.getWidth(), reqVO.getAutoColor(), + null, reqVO.getHyaline()); } catch (WxErrorException e) { log.error("[getWxQrcode][reqVO({})) 获得小程序码失败]", reqVO, e); throw exception(SOCIAL_CLIENT_WEIXIN_MINI_APP_QRCODE_ERROR); -- Gitee From 7fca38ce1e270d8831b5ba426a2e82df6b009474 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 16 May 2024 22:42:39 +0800 Subject: [PATCH 0551/1557] =?UTF-8?q?=E3=80=90=E9=87=8D=E6=9E=84=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E6=9B=BF=E6=8D=A2=20spring-ai=20=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/message/AiChatMessageSendRespVO.java | 2 +- .../ai/dal/vo/AiChatModalDallConfigVO.java | 2 +- .../ai/service/impl/AiImageServiceImpl.java | 12 +- .../YuDaoMidjourneyMessageHandler.java | 2 +- .../yudao-spring-boot-starter-ai/pom.xml | 131 +----- .../ai/config/YudaoAiAutoConfiguration.java | 26 +- .../ai/config/YudaoAiProperties.java | 6 +- .../ai/core}/enums/OpenAiImageModelEnum.java | 3 +- .../ai/core}/enums/OpenAiImageStyleEnum.java | 3 +- .../ai/core/exception}/ChatException.java | 2 +- .../yudao/framework}/ai/package-info.java | 2 +- .../springframework/ai/chat/ChatClient.java | 36 -- .../springframework/ai/chat/ChatResponse.java | 118 ------ .../springframework/ai/chat/Generation.java | 86 ---- .../ai/chat/StreamingChatClient.java | 29 -- .../ai/chat/messages/AbstractMessage.java | 151 ------- .../ai/chat/messages/AssistantMessage.java | 47 --- .../ai/chat/messages/ChatMessage.java | 39 -- .../ai/chat/messages/FunctionMessage.java | 37 -- .../ai/chat/messages/MediaData.java | 46 --- .../ai/chat/messages/Message.java | 32 -- .../ai/chat/messages/MessageType.java | 52 --- .../ai/chat/messages/SystemMessage.java | 48 --- .../ai/chat/messages/UserMessage.java | 51 --- .../chat/metadata/ChatGenerationMetadata.java | 75 ---- .../chat/metadata/ChatResponseMetadata.java | 58 --- .../ai/chat/metadata/EmptyRateLimit.java | 59 --- .../ai/chat/metadata/EmptyUsage.java | 37 -- .../ai/chat/metadata/PromptMetadata.java | 136 ------ .../ai/chat/metadata/RateLimit.java | 84 ---- .../ai/chat/metadata/Usage.java | 66 --- .../springframework/ai/chat/package-info.java | 14 - .../chat/prompt/AssistantPromptTemplate.java | 55 --- .../ai/chat/prompt/ChatOptions.java | 40 -- .../ai/chat/prompt/ChatOptionsBuilder.java | 89 ---- .../ai/chat/prompt/ChatPromptTemplate.java | 87 ---- .../chat/prompt/FunctionPromptTemplate.java | 27 -- .../ai/chat/prompt/Prompt.java | 103 ----- .../ai/chat/prompt/PromptTemplate.java | 218 ---------- .../ai/chat/prompt/PromptTemplateActions.java | 34 -- .../prompt/PromptTemplateChatActions.java | 18 - .../prompt/PromptTemplateMessageActions.java | 24 -- .../prompt/PromptTemplateStringActions.java | 14 - .../ai/chat/prompt/SystemPromptTemplate.java | 55 --- .../ai/chat/prompt/TemplateFormat.java | 42 -- .../org/springframework/ai/image/Image.java | 77 ---- .../springframework/ai/image/ImageClient.java | 31 -- .../ai/image/ImageGeneration.java | 53 --- .../ai/image/ImageGenerationMetadata.java | 23 -- .../ai/image/ImageMessage.java | 63 --- .../ai/image/ImageOptions.java | 37 -- .../ai/image/ImageOptionsBuilder.java | 119 ------ .../springframework/ai/image/ImagePrompt.java | 85 ---- .../ai/image/ImageResponse.java | 75 ---- .../ai/image/ImageResponseMetadata.java | 31 -- .../springframework/ai/model/ModelClient.java | 40 -- .../ai/model/ModelOptions.java | 31 -- .../ai/model/ModelOptionsUtils.java | 387 ------------------ .../ai/model/ModelRequest.java | 51 --- .../ai/model/ModelResponse.java | 62 --- .../springframework/ai/model/ModelResult.java | 43 -- .../ai/model/ResponseMetadata.java | 34 -- .../ai/model/ResultMetadata.java | 31 -- .../ai/model/StreamingModelClient.java | 43 -- .../function/AbstractFunctionCallSupport.java | 163 -------- .../function/AbstractFunctionCallback.java | 159 ------- .../ai/model/function/FunctionCallback.java | 60 --- .../function/FunctionCallbackContext.java | 126 ------ .../function/FunctionCallbackWrapper.java | 140 ------- .../function/FunctionCallingOptions.java | 66 --- .../FunctionCallingOptionsBuilder.java | 150 ------- .../ai/model/function/TypeResolverHelper.java | 87 ---- .../ai/model/package-info.java | 11 - .../api/MidjourneyInteractionsApi.java | 4 +- .../ai/models/openai/OpenAiImageApi.java | 89 ---- .../ai/models/openai/OpenAiImageClient.java | 101 ----- .../ai/models/openai/OpenAiImageOptions.java | 95 ----- .../models/openai/api/OpenAiImageRequest.java | 58 --- .../openai/api/OpenAiImageResponse.java | 39 -- .../ai/models/tongyi/QianWenChatClient.java | 1 + .../ai/models/tongyi/QianWenOptions.java | 26 +- .../ai/models/xinghuo/XingHuoChatClient.java | 1 + .../ai/models/xinghuo/XingHuoOptions.java | 25 +- .../ai/models/yiyan/YiYanChatClient.java | 1 + .../ai/models/yiyan/YiYanOptions.java | 22 +- ...AbstractConversionServiceOutputParser.java | 42 -- .../AbstractMessageConverterOutputParser.java | 41 -- .../ai/parser/BeanOutputParser.java | 171 -------- .../ai/parser/FormatProvider.java | 33 -- .../ai/parser/ListOutputParser.java | 50 --- .../ai/parser/MapOutputParser.java | 60 --- .../ai/parser/OutputParser.java | 30 -- .../org/springframework/ai/parser/Parser.java | 24 -- .../org/springframework/ai/parser/README.md | 12 - .../ai/chat/QianWenChatClientTests.java | 4 +- .../openAiImage/OpenAiImageClientTests.java | 10 +- 96 files changed, 99 insertions(+), 5416 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/openai => cn/iocoder/yudao/framework/ai/core}/enums/OpenAiImageModelEnum.java (89%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/openai => cn/iocoder/yudao/framework/ai/core}/enums/OpenAiImageStyleEnum.java (92%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/chat => cn/iocoder/yudao/framework/ai/core/exception}/ChatException.java (78%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework => cn/iocoder/yudao/framework}/ai/package-info.java (95%) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java index 9ea7900cb3..58ba056595 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java @@ -28,7 +28,7 @@ public class AiChatMessageSendRespVO { @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") private String content; - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java index d77b4ec870..c828c9cf58 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.vo; -import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java index 4727127c9e..20768c21e9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java @@ -6,10 +6,8 @@ import cn.iocoder.yudao.framework.ai.core.exception.AiException; import org.springframework.ai.image.ImageGeneration; import org.springframework.ai.image.ImagePrompt; import org.springframework.ai.image.ImageResponse; -import org.springframework.ai.models.openai.OpenAiImageClient; -import org.springframework.ai.models.openai.OpenAiImageOptions; -import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; -import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; +import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; import org.springframework.ai.models.midjourney.api.req.ReRollReq; import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; @@ -29,6 +27,8 @@ import cn.iocoder.yudao.module.ai.service.AiImageService; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.openai.OpenAiImageClient; +import org.springframework.ai.openai.OpenAiImageOptions; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -95,8 +95,8 @@ public class AiImageServiceImpl implements AiImageService { try { // 转换openai 参数 OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageModelEnum); - openAiImageOptions.setStyle(openAiImageStyleEnum); + openAiImageOptions.setModel(openAiImageModelEnum.getModel()); + openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); openAiImageOptions.setSize(req.getSize()); ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); // 发送 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index d1ccc080e1..c3c9d44d0a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ai.service.midjourneyHandler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; import org.springframework.ai.models.midjourney.MidjourneyMessage; import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; @@ -11,7 +12,6 @@ import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; -import com.alibaba.fastjson2.JSON; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 2195b4bcc8..2188ad9085 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -12,139 +12,48 @@ yudao-spring-boot-starter-ai - - 21 - 21 - UTF-8 - - - - org.springframework - spring-core - - - com.fasterxml.jackson.core - jackson-databind - - - org.springframework - spring-context - - - net.jodah - typetools - 0.6.3 - compile - - - com.github.victools - jsonschema-module-jackson - 4.31.1 - compile - - - com.github.victools - jsonschema-module-swagger-2 - 4.33.1 - - - com.github.victools - jsonschema-generator - 4.31.1 - compile - - - io.projectreactor - reactor-core - - - org.springframework.cloud - spring-cloud-function-context - 4.1.0 - compile - - - org.antlr - stringtemplate - 4.0.2 - compile - - - org.projectlombok - lombok - - - org.springframework - spring-web - - - org.springframework - spring-webflux - - - org.springframework.retry - spring-retry - - - junit - junit - test - - - cn.hutool - hutool-all - test - - com.squareup.okhttp3 - okhttp - 4.12.0 - test + io.springboot.ai + spring-ai-core + 1.0.3 - io.projectreactor.netty - reactor-netty + io.springboot.ai + spring-ai-openai + 1.0.3 + - cn.hutool - hutool-all + cn.iocoder.boot + yudao-common + com.alibaba dashscope-sdk-java 2.11.0 + - org.apache.httpcomponents - httpclient - 4.5.14 - compile + junit + junit + test + + + org.springframework.boot spring-boot-starter-websocket - - - com.fasterxml.jackson.core - jackson-databind - - - com.alibaba.fastjson2 - fastjson2 - 2.0.45 - + com.squareup.okhttp3 okhttp - - com.google.guava - guava - net.dv8tion JDA @@ -156,10 +65,6 @@ - - cn.iocoder.boot - yudao-common - \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 88581f88ab..b37938d4aa 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -11,9 +11,6 @@ import org.springframework.ai.models.xinghuo.api.XingHuoApi; import org.springframework.ai.models.yiyan.YiYanChatClient; import org.springframework.ai.models.yiyan.YiYanOptions; import org.springframework.ai.models.yiyan.api.YiYanApi; -import org.springframework.ai.models.openai.OpenAiImageApi; -import org.springframework.ai.models.openai.OpenAiImageClient; -import org.springframework.ai.models.openai.OpenAiImageOptions; import org.springframework.ai.models.midjourney.MidjourneyConfig; import org.springframework.ai.models.midjourney.MidjourneyMessage; import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; @@ -22,6 +19,10 @@ import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketSta import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; +import org.springframework.ai.openai.OpenAiImageClient; +import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.openai.api.OpenAiImageApi; +import org.springframework.ai.retry.RetryUtils; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -72,10 +73,10 @@ public class YudaoAiAutoConfiguration { YudaoAiProperties.QianWenProperties qianWenProperties = yudaoAiProperties.getQianwen(); // 转换配置 QianWenOptions qianWenOptions = new QianWenOptions(); - qianWenOptions.setTopK(qianWenProperties.getTopK()); +// qianWenOptions.setTopK(qianWenProperties.getTopK()); TODO 芋艿:后续弄 qianWenOptions.setTopP(qianWenProperties.getTopP()); qianWenOptions.setMaxTokens(qianWenProperties.getMaxTokens()); - qianWenOptions.setTemperature(qianWenProperties.getTemperature()); +// qianWenOptions.setTemperature(qianWenProperties.getTemperature()); TODO 芋艿:后续弄 return new QianWenChatClient( new QianWenApi( qianWenProperties.getApiKey(), @@ -91,7 +92,7 @@ public class YudaoAiAutoConfiguration { YudaoAiProperties.YiYanProperties yiYanProperties = yudaoAiProperties.getYiyan(); // 转换配置 YiYanOptions yiYanOptions = new YiYanOptions(); - yiYanOptions.setTopK(yiYanProperties.getTopK()); +// yiYanOptions.setTopK(yiYanProperties.getTopK()); TODO 芋艿:后续弄 yiYanOptions.setTopP(yiYanProperties.getTopP()); yiYanOptions.setTemperature(yiYanProperties.getTemperature()); yiYanOptions.setMaxOutputTokens(yiYanProperties.getMaxTokens()); @@ -106,19 +107,19 @@ public class YudaoAiAutoConfiguration { ); } - @Bean @ConditionalOnProperty(value = "yudao.ai.openAiImage.enable", havingValue = "true") public OpenAiImageClient openAiImageClient(YudaoAiProperties yudaoAiProperties) { YudaoAiProperties.OpenAiImageProperties openAiImageProperties = yudaoAiProperties.getOpenAiImage(); + OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); + openAiImageOptions.setModel(openAiImageProperties.getModel().getModel()); + openAiImageOptions.setStyle(openAiImageProperties.getStyle().getStyle()); + openAiImageOptions.setResponseFormat("url"); // TODO 芋艿:OpenAiImageOptions.ResponseFormatEnum.URL.getValue() // 创建 client return new OpenAiImageClient( new OpenAiImageApi(openAiImageProperties.getApiKey()), - new OpenAiImageOptions() - .setModel(openAiImageProperties.getModel()) - .setResponseFormat(OpenAiImageOptions.ResponseFormatEnum.URL.getValue()) - .setStyle(openAiImageProperties.getStyle()) - ); + openAiImageOptions, + RetryUtils.DEFAULT_RETRY_TEMPLATE); } @Bean @@ -157,7 +158,6 @@ public class YudaoAiAutoConfiguration { return new MidjourneyInteractionsApi(midjourneyConfig); } - private static @NotNull MidjourneyConfig getMidjourneyConfig(ApplicationContext applicationContext, YudaoAiProperties.MidjourneyProperties midjourneyProperties) { Map requestTemplates = new HashMap<>(); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index a23b9109c5..a228a00454 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.models.xinghuo.XingHuoChatModel; import org.springframework.ai.models.yiyan.YiYanChatModel; -import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; -import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; +import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; +import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -95,6 +95,7 @@ public class YudaoAiProperties { @Data @Accessors(chain = true) public static class OpenAiImageProperties { + private boolean enable = false; /** @@ -109,6 +110,7 @@ public class YudaoAiProperties { * 风格 */ private OpenAiImageStyleEnum style = OpenAiImageStyleEnum.VIVID; + } @Data diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java similarity index 89% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java index 635c62bba9..ea2767fcd0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageModelEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java @@ -1,8 +1,9 @@ -package org.springframework.ai.models.openai.enums; +package cn.iocoder.yudao.framework.ai.core.enums; import lombok.AllArgsConstructor; import lombok.Getter; +// TODO 芋艿:待梳理 /** * open ai * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java similarity index 92% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java index d7999cd728..40cbdfc022 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/enums/OpenAiImageStyleEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java @@ -1,8 +1,9 @@ -package org.springframework.ai.models.openai.enums; +package cn.iocoder.yudao.framework.ai.core.enums; import lombok.AllArgsConstructor; import lombok.Getter; +// TODO 芋艿:待梳理 /** * open ai image style * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/ChatException.java similarity index 78% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/ChatException.java index bc92226997..54e50b6658 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatException.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/exception/ChatException.java @@ -1,4 +1,4 @@ -package org.springframework.ai.chat; +package cn.iocoder.yudao.framework.ai.core.exception; /** * 聊天异常 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java index b38419f6f7..a132fdfc5d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/package-info.java @@ -12,4 +12,4 @@ * 2.4 openai 包:【OpenAI】ChatGPT,拷贝 spring-ai 提供的 models/openai 包 * 2.5 midjourney 包:Midjourney,参考 https://github.com/novicezk/midjourney-proxy 实现 */ -package org.springframework.ai; \ No newline at end of file +package cn.iocoder.yudao.framework.ai; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java deleted file mode 100644 index bd6aa3e56c..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatClient.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat; - - -import org.springframework.ai.chat.messages.UserMessage; -import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.model.ModelClient; - -@FunctionalInterface -public interface ChatClient extends ModelClient { - - default String call(String message) { - Prompt prompt = new Prompt(new UserMessage(message)); - Generation generation = call(prompt).getResult(); - return (generation != null) ? generation.getOutput().getContent() : ""; - } - - @Override - ChatResponse call(Prompt prompt); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java deleted file mode 100644 index 641212b973..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/ChatResponse.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.ai.chat; - -import org.springframework.ai.chat.metadata.ChatResponseMetadata; -import org.springframework.ai.model.ModelResponse; -import org.springframework.util.CollectionUtils; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; - -/** - * 人工智能提供商返回的聊天完成(例如生成)响应。 - * - * The chat completion (e.g. generation) response returned by an AI provider. - */ -public class ChatResponse implements ModelResponse { - - private final ChatResponseMetadata chatResponseMetadata; - - /** - * List of generated messages returned by the AI provider. - */ - private final List generations; - - /** - * Construct a new {@link ChatResponse} instance without metadata. - * @param generations the {@link List} of {@link Generation} returned by the AI - * provider. - */ - public ChatResponse(List generations) { - this(generations, ChatResponseMetadata.NULL); - } - - /** - * Construct a new {@link ChatResponse} instance. - * @param generations the {@link List} of {@link Generation} returned by the AI - * provider. - * @param chatResponseMetadata {@link ChatResponseMetadata} containing information - * about the use of the AI provider's API. - */ - public ChatResponse(List generations, ChatResponseMetadata chatResponseMetadata) { - this.chatResponseMetadata = chatResponseMetadata; -// this.generations = List.copyOf(generations); - this.generations = Collections.unmodifiableList(generations); - } - - /** - * The {@link List} of {@link Generation generated outputs}. - *

- * It is a {@link List} of {@link List lists} because the Prompt could request - * multiple output {@link Generation generations}. - * @return the {@link List} of {@link Generation generated outputs}. - */ - - @Override - public List getResults() { - return this.generations; - } - - /** - * @return Returns the first {@link Generation} in the generations list. - */ - public Generation getResult() { - if (CollectionUtils.isEmpty(this.generations)) { - return null; - } - return this.generations.get(0); - } - - /** - * @return Returns {@link ChatResponseMetadata} containing information about the use - * of the AI provider's API. - */ - @Override - public ChatResponseMetadata getMetadata() { - return this.chatResponseMetadata; - } - - @Override - public String toString() { - return "ChatResponse [metadata=" + chatResponseMetadata + ", generations=" + generations + "]"; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; -// if (!(o instanceof ChatResponse that)) -// return false; - if (!(o instanceof ChatResponse)) { - return false; - } - ChatResponse that = (ChatResponse) o; - return Objects.equals(chatResponseMetadata, that.chatResponseMetadata) - && Objects.equals(generations, that.generations); - } - - @Override - public int hashCode() { - return Objects.hash(chatResponseMetadata, generations); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java deleted file mode 100644 index ca17848358..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/Generation.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat; - -import org.springframework.ai.chat.messages.AssistantMessage; -import org.springframework.ai.chat.metadata.ChatGenerationMetadata; -import org.springframework.ai.model.ModelResult; -import org.springframework.lang.Nullable; - -import java.util.Map; -import java.util.Objects; - -/** - * 表示AI返回的响应。 - * - * Represents a response returned by the AI. - */ -public class Generation implements ModelResult { - - private AssistantMessage assistantMessage; - - private ChatGenerationMetadata chatGenerationMetadata; - - public Generation(String text) { - this.assistantMessage = new AssistantMessage(text); - } - - public Generation(String text, Map properties) { - this.assistantMessage = new AssistantMessage(text, properties); - } - - @Override - public AssistantMessage getOutput() { - return this.assistantMessage; - } - - @Override - public ChatGenerationMetadata getMetadata() { - ChatGenerationMetadata chatGenerationMetadata = this.chatGenerationMetadata; - return chatGenerationMetadata != null ? chatGenerationMetadata : ChatGenerationMetadata.NULL; - } - - public Generation withGenerationMetadata(@Nullable ChatGenerationMetadata chatGenerationMetadata) { - this.chatGenerationMetadata = chatGenerationMetadata; - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (!(o instanceof Generation)) { - return false; - } - Generation that = (Generation) o; - return Objects.equals(assistantMessage, that.assistantMessage) - && Objects.equals(chatGenerationMetadata, that.chatGenerationMetadata); - } - - @Override - public int hashCode() { - return Objects.hash(assistantMessage, chatGenerationMetadata); - } - - @Override - public String toString() { - return "Generation{" + "assistantMessage=" + assistantMessage + ", chatGenerationMetadata=" - + chatGenerationMetadata + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java deleted file mode 100644 index 079989db43..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/StreamingChatClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat; - -import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.model.StreamingModelClient; -import reactor.core.publisher.Flux; - -@FunctionalInterface -public interface StreamingChatClient extends StreamingModelClient { - - @Override - Flux stream(Prompt prompt); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java deleted file mode 100644 index 7cc9360725..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import org.springframework.core.io.Resource; -import org.springframework.util.Assert; -import org.springframework.util.StreamUtils; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public abstract class AbstractMessage implements Message { - - protected final MessageType messageType; - - protected final String textContent; - - protected final List mediaData; - - /** - * Additional options for the message to influence the response, not a generative map. - */ - protected final Map properties; - - protected AbstractMessage(MessageType messageType, String content) { - this(messageType, content, Map.of()); - } - - protected AbstractMessage(MessageType messageType, String content, Map messageProperties) { - Assert.notNull(messageType, "Message type must not be null"); - // Assert.notNull(content, "Content must not be null"); - this.messageType = messageType; - this.textContent = content; - this.mediaData = new ArrayList<>(); - this.properties = messageProperties; - } - - protected AbstractMessage(MessageType messageType, String textContent, List mediaData) { - this(messageType, textContent, mediaData, Map.of()); - } - - protected AbstractMessage(MessageType messageType, String textContent, List mediaData, - Map messageProperties) { - - Assert.notNull(messageType, "Message type must not be null"); - Assert.notNull(textContent, "Content must not be null"); - Assert.notNull(mediaData, "media data must not be null"); - - this.messageType = messageType; - this.textContent = textContent; - this.mediaData = new ArrayList<>(mediaData); - this.properties = messageProperties; - } - - protected AbstractMessage(MessageType messageType, Resource resource) { - this(messageType, resource, Collections.emptyMap()); - } - - @SuppressWarnings("null") - protected AbstractMessage(MessageType messageType, Resource resource, Map messageProperties) { - Assert.notNull(messageType, "Message type must not be null"); - Assert.notNull(resource, "Resource must not be null"); - - this.messageType = messageType; - this.properties = messageProperties; - this.mediaData = new ArrayList<>(); - - try (InputStream inputStream = resource.getInputStream()) { - this.textContent = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); - } - catch (IOException ex) { - throw new RuntimeException("Failed to read resource", ex); - } - } - - @Override - public String getContent() { - return this.textContent; - } - - @Override - public List getMediaData() { - return this.mediaData; - } - - @Override - public Map getProperties() { - return this.properties; - } - - @Override - public MessageType getMessageType() { - return this.messageType; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((mediaData == null) ? 0 : mediaData.hashCode()); - result = prime * result + ((properties == null) ? 0 : properties.hashCode()); - result = prime * result + ((messageType == null) ? 0 : messageType.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AbstractMessage other = (AbstractMessage) obj; - if (mediaData == null) { - if (other.mediaData != null) - return false; - } - else if (!mediaData.equals(other.mediaData)) - return false; - if (properties == null) { - if (other.properties != null) - return false; - } - else if (!properties.equals(other.properties)) - return false; - if (messageType != other.messageType) - return false; - return true; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java deleted file mode 100644 index 28710db1cc..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/AssistantMessage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import java.util.Map; - -/** - * 让生成人员知道内容是作为对用户的响应生成的。 - * 此角色指示生成者先前在会话中生成的消息。 - * 通过包括该系列中的辅助消息,您可以为生成的关于提供上下文之前在谈话中的交流。 - * - * Lets the generative know the content was generated as a response to the user. This role - * indicates messages that the generative has previously generated in the conversation. By - * including assistant messages in the series, you provide context to the generative about - * prior exchanges in the conversation. - */ -public class AssistantMessage extends AbstractMessage { - - public AssistantMessage(String content) { - super(MessageType.ASSISTANT, content); - } - - public AssistantMessage(String content, Map properties) { - super(MessageType.ASSISTANT, content, properties); - } - - @Override - public String toString() { - return "AssistantMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" - + messageType + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java deleted file mode 100644 index 194aa54afa..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/ChatMessage.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import java.util.Map; - -public class ChatMessage extends AbstractMessage { - - public ChatMessage(String role, String content) { - super(MessageType.valueOf(role), content); - } - - public ChatMessage(String role, String content, Map properties) { - super(MessageType.valueOf(role), content, properties); - } - - public ChatMessage(MessageType messageType, String content) { - super(messageType, content); - } - - public ChatMessage(MessageType messageType, String content, Map properties) { - super(messageType, content, properties); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java deleted file mode 100644 index 1faba6a794..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/FunctionMessage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import java.util.Map; - -public class FunctionMessage extends AbstractMessage { - - public FunctionMessage(String content) { - super(MessageType.SYSTEM, content); - } - - public FunctionMessage(String content, Map properties) { - super(MessageType.SYSTEM, content, properties); - } - - @Override - public String toString() { - return "FunctionMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" - + messageType + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java deleted file mode 100644 index 9acd9b1515..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MediaData.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import org.springframework.util.Assert; -import org.springframework.util.MimeType; - -/** - * @author Christian Tzolov - */ -public class MediaData { - - private final MimeType mimeType; - - private final Object data; - - public MediaData(MimeType mimeType, Object data) { - Assert.notNull(mimeType, "MimeType must not be null"); - // Assert.notNull(data, "Data must not be null"); - this.mimeType = mimeType; - this.data = data; - } - - public MimeType getMimeType() { - return this.mimeType; - } - - public Object getData() { - return this.data; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java deleted file mode 100644 index 10c893ad70..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/Message.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import java.util.List; -import java.util.Map; - -public interface Message { - - String getContent(); - - List getMediaData(); - - Map getProperties(); - - MessageType getMessageType(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java deleted file mode 100644 index a227c45308..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/MessageType.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.ai.chat.messages; - -public enum MessageType { - - // 用户消息 - USER("user"), - - // 之前会话的消息 - ASSISTANT("assistant"), - - // 根据注释说明:您可以使用系统消息来指示具有生成性,表现得像某个角色或以特定的方式提供答案总体安排 - // 简单理解:在对话前,发送一条具有角色的信息让模型理解(如:你现在是一个10年拍摄经验的导演,拥有丰富的经验。 这样你就可以去问他,怎么拍一个短视频可以在抖音上火) - SYSTEM("system"), - - // 函数?根据引用现在不支持,会抛出一个异常 ---> throw new IllegalArgumentException("Tool execution results are not supported for Bedrock models"); - FUNCTION("function"); - - private final String value; - - MessageType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - public static MessageType fromValue(String value) { - for (MessageType messageType : MessageType.values()) { - if (messageType.getValue().equals(value)) { - return messageType; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + value); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java deleted file mode 100644 index f8c67f2b47..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/SystemMessage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import org.springframework.core.io.Resource; - -/** - * 作为输入传递的“system”类型的消息。系统消息给出高级别对话说明。 - * 此角色通常提供高级说明对话。 - * 例如,您可以使用系统消息来指示具有生成性,表现得像某个角色或以特定的方式提供答案总体安排 - * - * A message of the type 'system' passed as input. The system message gives high level - * instructions for the conversation. This role typically provides high-level instructions - * for the conversation. For example, you might use a system message to instruct the - * generative to behave like a certain character or to provide answers in a specific - * format. - */ -public class SystemMessage extends AbstractMessage { - - public SystemMessage(String content) { - super(MessageType.SYSTEM, content); - } - - public SystemMessage(Resource resource) { - super(MessageType.SYSTEM, resource); - } - - @Override - public String toString() { - return "SystemMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" - + messageType + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java deleted file mode 100644 index ca7f360c22..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/messages/UserMessage.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.messages; - -import org.springframework.core.io.Resource; - -import java.util.List; - -/** - * 作为输入传递的“user”类型的消息具有用户角色的消息来自最终用户或开发者。 - * 它们表示问题、提示或您想要的任何输入产生反应的。 - * - * A message of the type 'user' passed as input Messages with the user role are from the - * end-user or developer. They represent questions, prompts, or any input that you want - * the generative to respond to. - */ -public class UserMessage extends AbstractMessage { - - public UserMessage(String message) { - super(MessageType.USER, message); - } - - public UserMessage(Resource resource) { - super(MessageType.USER, resource); - } - - public UserMessage(String textContent, List mediaDataList) { - super(MessageType.USER, textContent, mediaDataList); - } - - @Override - public String toString() { - return "UserMessage{" + "content='" + getContent() + '\'' + ", properties=" + properties + ", messageType=" - + messageType + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java deleted file mode 100644 index d9f5fc56eb..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - -import org.springframework.ai.model.ResultMetadata; -import org.springframework.lang.Nullable; - -/** - * Abstract Data Type (ADT) encapsulating information on the completion choices in the AI - * response. - * - * @author John Blum - * @since 0.7.0 - */ -public interface ChatGenerationMetadata extends ResultMetadata { - - ChatGenerationMetadata NULL = ChatGenerationMetadata.from(null, null); - - /** - * Factory method used to construct a new {@link ChatGenerationMetadata} from the - * given {@link String finish reason} and content filter metadata. - * @param finishReason {@link String} contain the reason for the choice completion. - * @param contentFilterMetadata underlying AI provider metadata for filtering applied - * to generation content. - * @return a new {@link ChatGenerationMetadata} from the given {@link String finish - * reason} and content filter metadata. - */ - static ChatGenerationMetadata from(String finishReason, Object contentFilterMetadata) { - return new ChatGenerationMetadata() { - - @Override - @SuppressWarnings("unchecked") - public T getContentFilterMetadata() { - return (T) contentFilterMetadata; - } - - @Override - public String getFinishReason() { - return finishReason; - } - }; - } - - /** - * Returns the underlying AI provider metadata for filtering applied to generation - * content. - * @param {@link Class Type} used to cast the filtered content metadata into the - * AI provider-specific type. - * @return the underlying AI provider metadata for filtering applied to generation - * content. - */ - @Nullable - T getContentFilterMetadata(); - - /** - * Get the {@link String reason} this choice completed for the generation. - * @return the {@link String reason} this choice completed for the generation. - */ - String getFinishReason(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java deleted file mode 100644 index 38eb1fd59c..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/ChatResponseMetadata.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - - -import org.springframework.ai.model.ResponseMetadata; - -/** - * Abstract Data Type (ADT) modeling common AI provider metadata returned in an AI - * response. - * - * 抽象数据类型(ADT)建模AI响应中返回的常见AI提供者元数据。 - * - * @author John Blum - * @since 0.7.0 - */ -public interface ChatResponseMetadata extends ResponseMetadata { - - ChatResponseMetadata NULL = new ChatResponseMetadata() { - }; - - /** - * Returns AI provider specific metadata on rate limits. - * @return AI provider specific metadata on rate limits. - * @see RateLimit - */ - default RateLimit getRateLimit() { - return new EmptyRateLimit(); - } - - /** - * Returns AI provider specific metadata on API usage. - * @return AI provider specific metadata on API usage. - * @see Usage - */ - default Usage getUsage() { - return new EmptyUsage(); - } - - default PromptMetadata getPromptMetadata() { - return PromptMetadata.empty(); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java deleted file mode 100644 index 480a94d3ec..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyRateLimit.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - -import java.time.Duration; - -/** - * A RateLimit implementation that returns zero for all property getters - * - * @author John Blum - * @since 0.7.0 - */ -public class EmptyRateLimit implements RateLimit { - - @Override - public Long getRequestsLimit() { - return 0L; - } - - @Override - public Long getRequestsRemaining() { - return 0L; - } - - @Override - public Duration getRequestsReset() { - return Duration.ZERO; - } - - @Override - public Long getTokensLimit() { - return 0L; - } - - @Override - public Long getTokensRemaining() { - return 0L; - } - - @Override - public Duration getTokensReset() { - return Duration.ZERO; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java deleted file mode 100644 index 027e302793..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/EmptyUsage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - -/** - * A EmpytUsage implementation that returns zero for all property getters - * - * @author John Blum - * @since 0.7.0 - */ -public class EmptyUsage implements Usage { - - @Override - public Long getPromptTokens() { - return 0L; - } - - @Override - public Long getGenerationTokens() { - return 0L; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java deleted file mode 100644 index becb12ded1..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/PromptMetadata.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.ai.chat.metadata; - -import org.springframework.util.Assert; - -import java.util.Arrays; -import java.util.Optional; -import java.util.stream.StreamSupport; - -/** - * Abstract Data Type (ADT) modeling metadata gathered by the AI during request - * processing. - * - * @author John Blum - * @since 0.7.0 - */ -@FunctionalInterface -public interface PromptMetadata extends Iterable { - - /** - * Factory method used to create empty {@link PromptMetadata} when the information is - * not supplied by the AI provider. - * @return empty {@link PromptMetadata}. - */ - static PromptMetadata empty() { - return of(); - } - - /** - * Factory method used to create a new {@link PromptMetadata} composed of an array of - * {@link PromptFilterMetadata}. - * @param array array of {@link PromptFilterMetadata} used to compose the - * {@link PromptMetadata}. - * @return a new {@link PromptMetadata} composed of an array of - * {@link PromptFilterMetadata}. - */ - static PromptMetadata of(PromptFilterMetadata... array) { - return of(Arrays.asList(array)); - } - - /** - * Factory method used to create a new {@link PromptMetadata} composed of an - * {@link Iterable} of {@link PromptFilterMetadata}. - * @param iterable {@link Iterable} of {@link PromptFilterMetadata} used to compose - * the {@link PromptMetadata}. - * @return a new {@link PromptMetadata} composed of an {@link Iterable} of - * {@link PromptFilterMetadata}. - */ - static PromptMetadata of(Iterable iterable) { - Assert.notNull(iterable, "An Iterable of PromptFilterMetadata must not be null"); - return iterable::iterator; - } - - /** - * Returns an {@link Optional} {@link PromptFilterMetadata} at the given index. - * @param promptIndex index of the {@link PromptFilterMetadata} contained in this - * {@link PromptMetadata}. - * @return {@link Optional} {@link PromptFilterMetadata} at the given index. - * @throws IllegalArgumentException if the prompt index is less than 0. - */ - default Optional findByPromptIndex(int promptIndex) { - - Assert.isTrue(promptIndex > -1, "Prompt index [%d] must be greater than equal to 0".formatted(promptIndex)); - - return StreamSupport.stream(this.spliterator(), false) - .filter(promptFilterMetadata -> promptFilterMetadata.getPromptIndex() == promptIndex) - .findFirst(); - } - - /** - * Abstract Data Type (ADT) modeling filter metadata for all prompts sent during an AI - * request. - */ - interface PromptFilterMetadata { - - /** - * Factory method used to construct a new {@link PromptFilterMetadata} with the - * given prompt index and content filter metadata. - * @param promptIndex index of the prompt filter metadata contained in the AI - * response. - * @param contentFilterMetadata underlying AI provider metadata for filtering - * applied to prompt content. - * @return a new instance of {@link PromptFilterMetadata} with the given prompt - * index and content filter metadata. - */ - static PromptFilterMetadata from(int promptIndex, Object contentFilterMetadata) { - - return new PromptFilterMetadata() { - - @Override - public int getPromptIndex() { - return promptIndex; - } - - @Override - @SuppressWarnings("unchecked") - public T getContentFilterMetadata() { - return (T) contentFilterMetadata; - } - }; - } - - /** - * Index of the prompt filter metadata contained in the AI response. - * @return an {@link Integer index} fo the prompt filter metadata contained in the - * AI response. - */ - int getPromptIndex(); - - /** - * Returns the underlying AI provider metadata for filtering applied to prompt - * content. - * @param {@link Class Type} used to cast the filtered content metadata into - * the AI provider-specific type. - * @return the underlying AI provider metadata for filtering applied to prompt - * content. - */ - T getContentFilterMetadata(); - - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java deleted file mode 100644 index 22dd64b186..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/RateLimit.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - -import java.time.Duration; - -/** - * Abstract Data Type (ADT) encapsulating metadata from an AI provider's API rate limits - * granted to the API key in use and the API key's current balance. - * - * @author John Blum - * @since 0.7.0 - */ -public interface RateLimit { - - /** - * Returns the maximum number of requests that are permitted before exhausting the - * rate limit. - * @return an {@link Long} with the maximum number of requests that are permitted - * before exhausting the rate limit. - * @see #getRequestsRemaining() - */ - Long getRequestsLimit(); - - /** - * Returns the remaining number of requests that are permitted before exhausting the - * {@link #getRequestsLimit() rate limit}. - * @return an {@link Long} with the remaining number of requests that are permitted - * before exhausting the {@link #getRequestsLimit() rate limit}. - * @see #getRequestsLimit() - */ - Long getRequestsRemaining(); - - /** - * Returns the {@link Duration time} until the rate limit (based on requests) resets - * to its {@link #getRequestsLimit() initial state}. - * @return a {@link Duration} representing the time until the rate limit (based on - * requests) resets to its {@link #getRequestsLimit() initial state}. - * @see #getRequestsLimit() - */ - Duration getRequestsReset(); - - /** - * Returns the maximum number of tokens that are permitted before exhausting the rate - * limit. - * @return an {@link Long} with the maximum number of tokens that are permitted before - * exhausting the rate limit. - * @see #getTokensRemaining() - */ - Long getTokensLimit(); - - /** - * Returns the remaining number of tokens that are permitted before exhausting the - * {@link #getTokensLimit() rate limit}. - * @return an {@link Long} with the remaining number of tokens that are permitted - * before exhausting the {@link #getTokensLimit() rate limit}. - * @see #getTokensLimit() - */ - Long getTokensRemaining(); - - /** - * Returns the {@link Duration time} until the rate limit (based on tokens) resets to - * its {@link #getTokensLimit() initial state}. - * @return a {@link Duration} with the time until the rate limit (based on tokens) - * resets to its {@link #getTokensLimit() initial state}. - * @see #getTokensLimit() - */ - Duration getTokensReset(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java deleted file mode 100644 index de4fb9ac62..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/metadata/Usage.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.metadata; - -/** - * 抽象数据类型(ADT)封装关于人工智能提供商API使用的元数据根据AI请求。 - * - * Abstract Data Type (ADT) encapsulating metadata on the usage of an AI provider's API - * per AI request. - * - * @author John Blum - * @since 0.7.0 - */ -public interface Usage { - - /** - * 返回AI请求的{@literal prompt}中使用的令牌数。 - * @返回一个{@link Long},其中包含在的{@literal提示符}中使用的令牌数AI请求。 - * - * Returns the number of tokens used in the {@literal prompt} of the AI request. - * @return an {@link Long} with the number of tokens used in the {@literal prompt} of - * the AI request. - * @see #getGenerationTokens() - */ - Long getPromptTokens(); - - /** - * Returns the number of tokens returned in the {@literal generation (aka completion)} - * of the AI's response. - * @return an {@link Long} with the number of tokens returned in the - * {@literal generation (aka completion)} of the AI's response. - * @see #getPromptTokens() - */ - Long getGenerationTokens(); - - /** - * Return the total number of tokens from both the {@literal prompt} of an AI request - * and {@literal generation} of the AI's response. - * @return the total number of tokens from both the {@literal prompt} of an AI request - * and {@literal generation} of the AI's response. - * @see #getPromptTokens() - * @see #getGenerationTokens() - */ - default Long getTotalTokens() { - Long promptTokens = getPromptTokens(); - promptTokens = promptTokens != null ? promptTokens : 0; - Long completionTokens = getGenerationTokens(); - completionTokens = completionTokens != null ? completionTokens : 0; - return promptTokens + completionTokens; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java deleted file mode 100644 index 98d92eb712..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The org.sf.ai.chat package represents the bounded context for the Chat Model within the - * AI generative model domain. This package extends the core domain defined in - * org.sf.ai.generative, providing implementations specific to chat-based generative AI - * interactions. - * - * In line with Domain-Driven Design principles, this package includes implementations of - * entities and value objects specific to the chat context, such as ChatPrompt and - * ChatResponse, adhering to the ubiquitous language of chat interactions in AI models. - * - * This bounded context is designed to encapsulate all aspects of chat-based AI - * functionalities, maintaining a clear boundary from other contexts within the AI domain. - */ -package org.springframework.ai.chat; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java deleted file mode 100644 index ae6373cf10..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/AssistantPromptTemplate.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.AssistantMessage; -import org.springframework.ai.chat.messages.Message; -import org.springframework.core.io.Resource; - -import java.util.Map; - -public class AssistantPromptTemplate extends PromptTemplate { - - public AssistantPromptTemplate(String template) { - super(template); - } - - public AssistantPromptTemplate(Resource resource) { - super(resource); - } - - @Override - public Prompt create() { - return new Prompt(new AssistantMessage(render())); - } - - @Override - public Prompt create(Map model) { - return new Prompt(new AssistantMessage(render(model))); - } - - @Override - public Message createMessage() { - return new AssistantMessage(render()); - } - - @Override - public Message createMessage(Map model) { - return new AssistantMessage(render(model)); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java deleted file mode 100644 index 5c45a37baf..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.model.ModelOptions; - -/** - * 聊天选项代表了常见的选项,可在不同的聊天模式中移植。 - * - * The ChatOptions represent the common options, portable across different chat models. - */ -public interface ChatOptions extends ModelOptions { - - Float getTemperature(); - - void setTemperature(Float temperature); - - Float getTopP(); - - void setTopP(Float topP); - - Integer getTopK(); - - void setTopK(Integer topK); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java deleted file mode 100644 index f702f63509..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatOptionsBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -public class ChatOptionsBuilder { - - private class ChatOptionsImpl implements ChatOptions { - - private Float temperature; - - private Float topP; - - private Integer topK; - - @Override - public Float getTemperature() { - return temperature; - } - - @Override - public void setTemperature(Float temperature) { - this.temperature = temperature; - } - - @Override - public Float getTopP() { - return topP; - } - - @Override - public void setTopP(Float topP) { - this.topP = topP; - } - - @Override - public Integer getTopK() { - return topK; - } - - @Override - public void setTopK(Integer topK) { - this.topK = topK; - } - - } - - private final ChatOptionsImpl options = new ChatOptionsImpl(); - - private ChatOptionsBuilder() { - } - - public static ChatOptionsBuilder builder() { - return new ChatOptionsBuilder(); - } - - public ChatOptionsBuilder withTemperature(Float temperature) { - options.setTemperature(temperature); - return this; - } - - public ChatOptionsBuilder withTopP(Float topP) { - options.setTopP(topP); - return this; - } - - public ChatOptionsBuilder withTopK(Integer topK) { - options.setTopK(topK); - return this; - } - - public ChatOptions build() { - return options; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java deleted file mode 100644 index 15f9ca5d4f..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/ChatPromptTemplate.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * PromptTemplate,用于将角色指定为字符串实现及其角色不足以满足您的需求。 - * - * A PromptTemplate that lets you specify the role as a string should the current - * implementations and their roles not suffice for your needs. - */ -public class ChatPromptTemplate implements PromptTemplateActions, PromptTemplateChatActions { - - private final List promptTemplates; - - public ChatPromptTemplate(List promptTemplates) { - this.promptTemplates = promptTemplates; - } - - @Override - public String render() { - StringBuilder sb = new StringBuilder(); - for (PromptTemplate promptTemplate : promptTemplates) { - sb.append(promptTemplate.render()); - } - return sb.toString(); - } - - @Override - public String render(Map model) { - StringBuilder sb = new StringBuilder(); - for (PromptTemplate promptTemplate : promptTemplates) { - sb.append(promptTemplate.render(model)); - } - return sb.toString(); - } - - @Override - public List createMessages() { - List messages = new ArrayList<>(); - for (PromptTemplate promptTemplate : promptTemplates) { - messages.add(promptTemplate.createMessage()); - } - return messages; - } - - @Override - public List createMessages(Map model) { - List messages = new ArrayList<>(); - for (PromptTemplate promptTemplate : promptTemplates) { - messages.add(promptTemplate.createMessage(model)); - } - return messages; - } - - @Override - public Prompt create() { - List messages = createMessages(); - return new Prompt(messages); - } - - @Override - public Prompt create(Map model) { - List messages = createMessages(model); - return new Prompt(messages); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java deleted file mode 100644 index 4c7ce981ff..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/FunctionPromptTemplate.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -public class FunctionPromptTemplate extends PromptTemplate { - - private String name; - - public FunctionPromptTemplate(String template) { - super(template); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java deleted file mode 100644 index a598b3c356..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/Prompt.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; -import org.springframework.ai.chat.messages.UserMessage; -import org.springframework.ai.model.ModelOptions; -import org.springframework.ai.model.ModelRequest; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; - -/** - * 文字内容 - */ -public class Prompt implements ModelRequest> { - - private final List messages; - - private ChatOptions modelOptions; - - public Prompt(String contents) { - this(new UserMessage(contents)); - } - - public Prompt(Message message) { - this(Collections.singletonList(message)); - } - - public Prompt(List messages) { - this.messages = messages; - } - - public Prompt(String contents, ChatOptions modelOptions) { - this(new UserMessage(contents), modelOptions); - } - - public Prompt(Message message, ChatOptions modelOptions) { - this(Collections.singletonList(message), modelOptions); - } - - public Prompt(List messages, ChatOptions modelOptions) { - this.messages = messages; - this.modelOptions = modelOptions; - } - - public String getContents() { - StringBuilder sb = new StringBuilder(); - for (Message message : getInstructions()) { - sb.append(message.getContent()); - } - return sb.toString(); - } - - @Override - public ModelOptions getOptions() { - return this.modelOptions; - } - - @Override - public List getInstructions() { - return this.messages; - } - - @Override - public String toString() { - return "Prompt{" + "messages=" + this.messages + ", modelOptions=" + this.modelOptions + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; -// if (!(o instanceof Prompt prompt)) -// return false; - if (!(o instanceof Prompt)) { - return false; - } - Prompt prompt = (Prompt) o; - return Objects.equals(this.messages, prompt.messages) && Objects.equals(this.modelOptions, prompt.modelOptions); - } - - @Override - public int hashCode() { - return Objects.hash(this.messages, this.modelOptions); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java deleted file mode 100644 index f1e910da0d..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplate.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; -import org.springframework.ai.chat.messages.UserMessage; -import org.springframework.ai.parser.OutputParser; -import org.antlr.runtime.Token; -import org.antlr.runtime.TokenStream; -import org.springframework.core.io.Resource; -import org.springframework.util.StreamUtils; -import org.stringtemplate.v4.ST; -import org.stringtemplate.v4.compiler.STLexer; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; -import java.util.*; -import java.util.Map.Entry; -import java.util.stream.Collectors; -import java.util.stream.IntStream; - -/** - * 用户输入的提示内容模板 - * - * 实现:提示词模板操作 提示词模板message相关操作 - */ -public class PromptTemplate implements PromptTemplateActions, PromptTemplateMessageActions { - - private ST st; - - private Map dynamicModel = new HashMap<>(); - - protected String template; - - protected TemplateFormat templateFormat = TemplateFormat.ST; - - private OutputParser outputParser; - - public PromptTemplate(Resource resource) { - try (InputStream inputStream = resource.getInputStream()) { - this.template = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); - } - catch (IOException ex) { - throw new RuntimeException("Failed to read resource", ex); - } - try { - this.st = new ST(this.template, '{', '}'); - } - catch (Exception ex) { - throw new IllegalArgumentException("The template string is not valid.", ex); - } - } - - public PromptTemplate(String template) { - this.template = template; - // If the template string is not valid, an exception will be thrown - try { - this.st = new ST(this.template, '{', '}'); - } - catch (Exception ex) { - throw new IllegalArgumentException("The template string is not valid.", ex); - } - } - - public PromptTemplate(String template, Map model) { - this.template = template; - // If the template string is not valid, an exception will be thrown - try { - this.st = new ST(this.template, '{', '}'); - for (Entry entry : model.entrySet()) { - add(entry.getKey(), entry.getValue()); - dynamicModel.put(entry.getKey(), entry.getValue()); - } - } - catch (Exception ex) { - throw new IllegalArgumentException("The template string is not valid.", ex); - } - } - - public PromptTemplate(Resource resource, Map model) { - try (InputStream inputStream = resource.getInputStream()) { - this.template = StreamUtils.copyToString(inputStream, Charset.defaultCharset()); - } - catch (IOException ex) { - throw new RuntimeException("Failed to read resource", ex); - } - // If the template string is not valid, an exception will be thrown - try { - this.st = new ST(this.template, '{', '}'); - for (Entry entry : model.entrySet()) { - add(entry.getKey(), entry.getValue()); - dynamicModel.put(entry.getKey(), entry.getValue()); - } - } - catch (Exception ex) { - throw new IllegalArgumentException("The template string is not valid.", ex); - } - } - - public OutputParser getOutputParser() { - return outputParser; - } - - public void setOutputParser(OutputParser outputParser) { - Objects.requireNonNull(outputParser, "Output Parser can not be null"); - this.outputParser = outputParser; - } - - public void add(String name, Object value) { - this.st.add(name, value); - this.dynamicModel.put(name, value); - } - - public String getTemplate() { - return this.template; - } - - public TemplateFormat getTemplateFormat() { - return this.templateFormat; - } - - // Render Methods - @Override - public String render() { - validate(this.dynamicModel); - return st.render(); - } - - @Override - public String render(Map model) { - validate(model); - for (Entry entry : model.entrySet()) { - if (st.getAttribute(entry.getKey()) != null) { - st.remove(entry.getKey()); - } - if (entry.getValue() instanceof Resource) { - st.add(entry.getKey(), renderResource((Resource) entry.getValue())); - } - else { - st.add(entry.getKey(), entry.getValue()); - } - - } - return st.render(); - } - - private String renderResource(Resource resource) { - try { - return resource.getContentAsString(Charset.defaultCharset()); - } - catch (IOException e) { - throw new RuntimeException(e); - } - // try (InputStream inputStream = resource.getInputStream()) { - // return StreamUtils.copyToString(inputStream, Charset.defaultCharset()); - // } - // catch (IOException ex) { - // throw new RuntimeException(ex); - // } - } - - @Override - public Message createMessage() { - return new UserMessage(render()); - } - - @Override - public Message createMessage(Map model) { - return new UserMessage(render(model)); - } - - @Override - public Prompt create() { - return new Prompt(render(new HashMap<>())); - } - - @Override - public Prompt create(Map model) { - return new Prompt(render(model)); - } - - public Set getInputVariables() { - TokenStream tokens = this.st.impl.tokens; - return IntStream.range(0, tokens.range()) - .mapToObj(tokens::get) - .filter(token -> token.getType() == STLexer.ID) - .map(Token::getText) - .collect(Collectors.toSet()); - } - - protected void validate(Map model) { - Set dynamicVariableNames = new HashSet<>(this.dynamicModel.keySet()); - Set modelVariables = new HashSet<>(model.keySet()); - modelVariables.addAll(dynamicVariableNames); - Set missingEntries = new HashSet<>(getInputVariables()); - missingEntries.removeAll(modelVariables); - if (!missingEntries.isEmpty()) { - throw new IllegalStateException( - "All template variables were not replaced. Missing variable names are " + missingEntries); - } - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java deleted file mode 100644 index 8097e3f359..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateActions.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import java.util.Map; - -/** - * 提示词模板操作 - */ -public interface PromptTemplateActions extends PromptTemplateStringActions { - - /** - * 创建 Prompt - * @return - */ - Prompt create(); - - Prompt create(Map model); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java deleted file mode 100644 index 24d9f908c2..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateChatActions.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; - -import java.util.List; -import java.util.Map; - -/** - * 聊天操作 - * - */ -public interface PromptTemplateChatActions { - - List createMessages(); - - List createMessages(Map model); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java deleted file mode 100644 index 17ff492867..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateMessageActions.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; - -import java.util.Map; - -/** - * 用户输入的提示内容 模板信息操作 - */ -public interface PromptTemplateMessageActions { - - /** - * 创建一个 message - * @return - */ - Message createMessage(); - - /** - * 创建一个 message - * @return - */ - Message createMessage(Map model); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java deleted file mode 100644 index 0cd9df3b2b..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/PromptTemplateStringActions.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.springframework.ai.chat.prompt; - -import java.util.Map; - -/** - * 提示次模板字符串操作 - */ -public interface PromptTemplateStringActions { - - String render(); - - String render(Map model); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java deleted file mode 100644 index 539287d070..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/SystemPromptTemplate.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -import org.springframework.ai.chat.messages.Message; -import org.springframework.ai.chat.messages.SystemMessage; -import org.springframework.core.io.Resource; - -import java.util.Map; - -public class SystemPromptTemplate extends PromptTemplate { - - public SystemPromptTemplate(String template) { - super(template); - } - - public SystemPromptTemplate(Resource resource) { - super(resource); - } - - @Override - public Message createMessage() { - return new SystemMessage(render()); - } - - @Override - public Message createMessage(Map model) { - return new SystemMessage(render(model)); - } - - @Override - public Prompt create() { - return new Prompt(new SystemMessage(render())); - } - - @Override - public Prompt create(Map model) { - return new Prompt(new SystemMessage(render(model))); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java deleted file mode 100644 index 1001ee2660..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/chat/prompt/TemplateFormat.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.chat.prompt; - -public enum TemplateFormat { - - ST("ST"); - - private final String value; - - TemplateFormat(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - public static TemplateFormat fromValue(String value) { - for (TemplateFormat templateFormat : TemplateFormat.values()) { - if (templateFormat.getValue().equals(value)) { - return templateFormat; - } - } - throw new IllegalArgumentException("Invalid TemplateFormat value: " + value); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java deleted file mode 100644 index 3c6ae1ea12..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/Image.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import java.util.Objects; - -public class Image { - - /** - * 可以访问图像的URL。 - * - * The URL where the image can be accessed. - */ - private String url; - - /** - * Base64编码的图像字符串。 - * - * Base64 encoded image string. - */ - private String b64Json; - - public Image(String url, String b64Json) { - this.url = url; - this.b64Json = b64Json; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getB64Json() { - return b64Json; - } - - public void setB64Json(String b64Json) { - this.b64Json = b64Json; - } - - @Override - public String toString() { - return "Image{" + "url='" + url + '\'' + ", b64Json='" + b64Json + '\'' + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof Image image)) - return false; - return Objects.equals(url, image.url) && Objects.equals(b64Json, image.b64Json); - } - - @Override - public int hashCode() { - return Objects.hash(url, b64Json); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java deleted file mode 100644 index 1993fbe922..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageClient.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - - -import org.springframework.ai.model.ModelClient; - -public interface ImageClient extends ModelClient { - - /** - * 跟 chat一样 - * @param imagePrompt the request object to be sent to the AI model - * @return - */ - ImageResponse call(ImagePrompt imagePrompt); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java deleted file mode 100644 index 924f5872a3..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGeneration.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - - -import org.springframework.ai.model.ModelResult; - -public class ImageGeneration implements ModelResult { - - // metadata 信息为空现在 - private ImageGenerationMetadata imageGenerationMetadata; - - private Image image; - - public ImageGeneration(Image image) { - this.image = image; - } - - public ImageGeneration(Image image, ImageGenerationMetadata imageGenerationMetadata) { - this.image = image; - this.imageGenerationMetadata = imageGenerationMetadata; - } - - @Override - public Image getOutput() { - return image; - } - - @Override - public ImageGenerationMetadata getMetadata() { - return imageGenerationMetadata; - } - - @Override - public String toString() { - return "ImageGeneration{" + "imageGenerationMetadata=" + imageGenerationMetadata + ", image=" + image + '}'; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java deleted file mode 100644 index e140aa814b..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageGenerationMetadata.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import org.springframework.ai.model.ResultMetadata; - -public interface ImageGenerationMetadata extends ResultMetadata { - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java deleted file mode 100644 index 51d378b8c3..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageMessage.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import java.util.Objects; - -public class ImageMessage { - - private String text; - - private Float weight; - - public ImageMessage(String text) { - this.text = text; - } - - public ImageMessage(String text, Float weight) { - this.text = text; - this.weight = weight; - } - - public String getText() { - return text; - } - - public Float getWeight() { - return weight; - } - - @Override - public String toString() { - return "mageMessage{" + "text='" + text + '\'' + ", weight=" + weight + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof ImageMessage that)) - return false; - return Objects.equals(text, that.text) && Objects.equals(weight, that.weight); - } - - @Override - public int hashCode() { - return Objects.hash(text, weight); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java deleted file mode 100644 index 428376364d..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptions.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import org.springframework.ai.model.ModelOptions; - -/** - * ImageOptions represent the common options, portable across different image generation - * models. - */ -public interface ImageOptions extends ModelOptions { - - Integer getN(); - - String getModel(); - - Integer getWidth(); - - Integer getHeight(); - - String getResponseFormat(); // openai - url or base64 : stability ai byte[] or base64 - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java deleted file mode 100644 index 49dc3497d3..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageOptionsBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -public class ImageOptionsBuilder { - - private class ImageModelOptionsImpl implements ImageOptions { - - private Integer n; - - private String model; - - private Integer width; - - private Integer height; - - private String responseFormat; - - @Override - public Integer getN() { - return n; - } - - public void setN(Integer n) { - this.n = n; - } - - @Override - public String getModel() { - return model; - } - - public void setModel(String model) { - this.model = model; - } - - @Override - public String getResponseFormat() { - return responseFormat; - } - - public void setResponseFormat(String responseFormat) { - this.responseFormat = responseFormat; - } - - @Override - public Integer getWidth() { - return width; - } - - public void setWidth(Integer width) { - this.width = width; - } - - @Override - public Integer getHeight() { - return height; - } - - public void setHeight(Integer height) { - this.height = height; - } - - } - - private final ImageModelOptionsImpl options = new ImageModelOptionsImpl(); - - private ImageOptionsBuilder() { - - } - - public static ImageOptionsBuilder builder() { - return new ImageOptionsBuilder(); - } - - public ImageOptionsBuilder withN(Integer n) { - options.setN(n); - return this; - } - - public ImageOptionsBuilder withModel(String model) { - options.setModel(model); - return this; - } - - public ImageOptionsBuilder withResponseFormat(String responseFormat) { - options.setResponseFormat(responseFormat); - return this; - } - - public ImageOptionsBuilder withWidth(Integer width) { - options.setWidth(width); - return this; - } - - public ImageOptionsBuilder withHeight(Integer height) { - options.setHeight(height); - return this; - } - - public ImageOptions build() { - return options; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java deleted file mode 100644 index 4f9dcdc591..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImagePrompt.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import org.springframework.ai.model.ModelRequest; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; - -/** - * 图片内容 - */ -public class ImagePrompt implements ModelRequest> { - - private final List messages; - - private ImageOptions imageModelOptions; - - public ImagePrompt(List messages) { - this.messages = messages; - } - - public ImagePrompt(List messages, ImageOptions imageModelOptions) { - this.messages = messages; - this.imageModelOptions = imageModelOptions; - } - - public ImagePrompt(ImageMessage imageMessage, ImageOptions imageOptions) { - this(Collections.singletonList(imageMessage), imageOptions); - } - - public ImagePrompt(String instructions, ImageOptions imageOptions) { - this(new ImageMessage(instructions), imageOptions); - } - - public ImagePrompt(String instructions) { -// this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build()); - this(new ImageMessage(instructions), null); - } - - @Override - public List getInstructions() { - return messages; - } - - @Override - public ImageOptions getOptions() { - return imageModelOptions; - } - - @Override - public String toString() { - return "NewImagePrompt{" + "messages=" + messages + ", imageModelOptions=" + imageModelOptions + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof ImagePrompt that)) - return false; - return Objects.equals(messages, that.messages) && Objects.equals(imageModelOptions, that.imageModelOptions); - } - - @Override - public int hashCode() { - return Objects.hash(messages, imageModelOptions); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java deleted file mode 100644 index d3e314526d..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - -import org.springframework.ai.model.ModelResponse; - -import java.util.List; -import java.util.Objects; - -public class ImageResponse implements ModelResponse { - - private final ImageResponseMetadata imageResponseMetadata; - - private final List imageGenerations; - - public ImageResponse(List generations) { - this(generations, ImageResponseMetadata.NULL); - } - - public ImageResponse(List generations, ImageResponseMetadata imageResponseMetadata) { - this.imageResponseMetadata = imageResponseMetadata; - this.imageGenerations = List.copyOf(generations); - } - - @Override - public ImageGeneration getResult() { - return imageGenerations.get(0); - } - - @Override - public List getResults() { - return imageGenerations; - } - - @Override - public ImageResponseMetadata getMetadata() { - return imageResponseMetadata; - } - - @Override - public String toString() { - return "ImageResponse{" + "imageResponseMetadata=" + imageResponseMetadata + ", imageGenerations=" - + imageGenerations + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof ImageResponse that)) - return false; - return Objects.equals(imageResponseMetadata, that.imageResponseMetadata) - && Objects.equals(imageGenerations, that.imageGenerations); - } - - @Override - public int hashCode() { - return Objects.hash(imageResponseMetadata, imageGenerations); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java deleted file mode 100644 index 78fa5e7de0..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.image; - - -import org.springframework.ai.model.ResponseMetadata; - -public interface ImageResponseMetadata extends ResponseMetadata { - - ImageResponseMetadata NULL = new ImageResponseMetadata() { - }; - - default Long created() { - return System.currentTimeMillis(); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java deleted file mode 100644 index 03bec4c70c..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * The ModelClient interface provides a generic API for invoking AI models. It is designed - * to handle the interaction with various types of AI models by abstracting the process of - * sending requests and receiving responses. The interface uses Java generics to - * accommodate different types of requests and responses, enhancing flexibility and - * adaptability across different AI model implementations. - * - * @param the generic type of the request to the AI model - * @param the generic type of the response from the AI model - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ModelClient, TRes extends ModelResponse> { - - /** - * Executes a method call to the AI model. - * @param request the request object to be sent to the AI model - * @return the response from the AI model - */ - TRes call(TReq request) throws Throwable; - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java deleted file mode 100644 index 96b301b793..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptions.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * Interface representing the customizable options for AI model interactions. This marker - * interface allows for the specification of various settings and parameters that can - * influence the behavior and output of AI models. It is designed to provide flexibility - * and adaptability in different AI scenarios, ensuring that the AI models can be - * fine-tuned according to specific requirements. - * - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ModelOptions { - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java deleted file mode 100644 index 9360399b66..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelOptionsUtils.java +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.github.victools.jsonschema.generator.*; -import com.github.victools.jsonschema.module.jackson.JacksonModule; -import com.github.victools.jsonschema.module.jackson.JacksonOption; -import com.github.victools.jsonschema.module.swagger2.Swagger2Module; -import org.springframework.beans.BeanWrapper; -import org.springframework.beans.BeanWrapperImpl; -import org.springframework.util.Assert; -import org.springframework.util.CollectionUtils; - -import java.beans.PropertyDescriptor; -import java.lang.reflect.Field; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; - -/** - * Utility class for manipulating {@link ModelOptions} objects. - * - * @author Christian Tzolov - * @since 0.8.0 - */ -public final class ModelOptionsUtils { - - private final static ObjectMapper OBJECT_MAPPER = new ObjectMapper() - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); - - private final static List BEAN_MERGE_FIELD_EXCISIONS = List.of("class"); - - private static ConcurrentHashMap, List> REQUEST_FIELD_NAMES_PER_CLASS = new ConcurrentHashMap, List>(); - - private static AtomicReference SCHEMA_GENERATOR_CACHE = new AtomicReference<>(); - - private ModelOptionsUtils() { - - } - - /** - * Converts the given JSON string to a Map of String and Object. - * @param json the JSON string to convert to a Map. - * @return the converted Map. - */ - public static Map jsonToMap(String json) { - try { - return OBJECT_MAPPER.readValue(json, MAP_TYPE_REF); - } - catch (Exception e) { - throw new RuntimeException(e); - } - } - - private static TypeReference> MAP_TYPE_REF = new TypeReference>() { - }; - - /** - * Converts the given JSON string to an Object of the given type. - * @param the type of the object to return. - * @param json the JSON string to convert to an object. - * @param type the type of the object to return. - * @return Object instance of the given type. - */ - public static T jsonToObject(String json, Class type) { - try { - return OBJECT_MAPPER.readValue(json, type); - } - catch (Exception e) { - throw new RuntimeException("Failed to json: " + json, e); - } - } - - /** - * Converts the given object to a JSON string. - * @param object the object to convert to a JSON string. - * @return the JSON string. - */ - public static String toJsonString(Object object) { - try { - return OBJECT_MAPPER.writeValueAsString(object); - } - catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Merges the source object into the target object and returns an object represented - * by the given class. The JSON property names are used to match the fields to merge. - * The source non-null values override the target values with the same field name. The - * source null values are ignored. If the acceptedFieldNames is not empty, only the - * fields with the given names are merged and returned. If the acceptedFieldNames is - * empty, use the {@code @JsonProperty} names, inferred from the provided clazz. - * @param they type of the class to return. - * @param source the source object to merge. - * @param target the target object to merge into. - * @param clazz the class to return. - * @param acceptedFieldNames the list of field names accepted for the target object. - * @return the merged object represented by the given class. - */ - public static T merge(Object source, Object target, Class clazz, List acceptedFieldNames) { - - if (source == null) { - source = Map.of(); - } - - List requestFieldNames = CollectionUtils.isEmpty(acceptedFieldNames) - ? REQUEST_FIELD_NAMES_PER_CLASS.computeIfAbsent(clazz, ModelOptionsUtils::getJsonPropertyValues) - : acceptedFieldNames; - - if (CollectionUtils.isEmpty(requestFieldNames)) { - throw new IllegalArgumentException("No @JsonProperty fields found in the " + clazz.getName()); - } - - Map sourceMap = ModelOptionsUtils.objectToMap(source); - Map targetMap = ModelOptionsUtils.objectToMap(target); - - targetMap.putAll(sourceMap.entrySet() - .stream() - .filter(e -> e.getValue() != null) - .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()))); - - targetMap = targetMap.entrySet() - .stream() - .filter(e -> requestFieldNames.contains(e.getKey())) - .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); - - return ModelOptionsUtils.mapToClass(targetMap, clazz); - } - - /** - * Merges the source object into the target object and returns an object represented - * by the given class. The JSON property names are used to match the fields to merge. - * The source non-null values override the target values with the same field name. The - * source null values are ignored. Returns the only field names that match the - * {@code @JsonProperty} names, inferred from the provided clazz. - * @param they type of the class to return. - * @param source the source object to merge. - * @param target the target object to merge into. - * @param clazz the class to return. - * @return the merged object represented by the given class. - */ - public static T merge(Object source, Object target, Class clazz) { - return ModelOptionsUtils.merge(source, target, clazz, null); - } - - /** - * Converts the given object to a Map. - * @param source the object to convert to a Map. - * @return the converted Map. - */ - public static Map objectToMap(Object source) { - if (source == null) { - return new HashMap<>(); - } - try { - String json = OBJECT_MAPPER.writeValueAsString(source); - return OBJECT_MAPPER.readValue(json, new TypeReference>() { - }) - .entrySet() - .stream() - .filter(e -> e.getValue() != null) - .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); - } - catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Converts the given Map to the given class. - * @param the type of the class to return. - * @param source the Map to convert to the given class. - * @param clazz the class to convert the Map to. - * @return the converted class. - */ - public static T mapToClass(Map source, Class clazz) { - try { - String json = OBJECT_MAPPER.writeValueAsString(source); - return OBJECT_MAPPER.readValue(json, clazz); - } - catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Returns the list of name values of the {@link JsonProperty} annotations. - * @param clazz the class that contains fields annotated with {@link JsonProperty}. - * @return the list of values of the {@link JsonProperty} annotations. - */ - public static List getJsonPropertyValues(Class clazz) { - List values = new ArrayList<>(); - Field[] fields = clazz.getDeclaredFields(); - for (Field field : fields) { - JsonProperty jsonPropertyAnnotation = field.getAnnotation(JsonProperty.class); - if (jsonPropertyAnnotation != null) { - values.add(jsonPropertyAnnotation.value()); - } - } - return values; - } - - /** - * Returns a new instance of the targetBeanClazz that copies the bean values from the - * sourceBean instance. - * @param sourceBean the source bean to copy the values from. - * @param sourceInterfaceClazz the source interface class. Only the fields with the - * same name as the interface methods are copied. This allow the source object to be a - * subclass of the source interface with additional, non-interface fields. - * @param targetBeanClazz the target class, a subclass of the ChatOptions, to convert - * into. - * @param the target class type. - * @return a new instance of the targetBeanClazz with the values from the sourceBean - * instance. - */ - public static T copyToTarget(S sourceBean, Class sourceInterfaceClazz, - Class targetBeanClazz) { - - Assert.notNull(sourceInterfaceClazz, "SourceOptionsClazz must not be null"); - Assert.notNull(targetBeanClazz, "TargetOptionsClazz must not be null"); - - if (sourceBean == null) { - return null; - } - - if (sourceBean.getClass().isAssignableFrom(targetBeanClazz)) { - return (T) sourceBean; - } - - try { - T targetOptions = targetBeanClazz.getConstructor().newInstance(); - - ModelOptionsUtils.mergeBeans(sourceBean, targetOptions, sourceInterfaceClazz, true); - - return targetOptions; - } - catch (Exception e) { - throw new RuntimeException( - "Failed to convert the " + sourceInterfaceClazz.getName() + " into " + targetBeanClazz.getName(), - e); - } - } - - /** - * Merges the source object into the target object. The source null values are - * ignored. Only objects with Getter and Setter methods are supported. - * @param the type of the source and target object. - * @param source the source object to merge. - * @param target the target object to merge into. - * @param sourceInterfaceClazz the source interface class. Only the fields with the - * same name as the interface methods are merged. This allow the source object to be a - * subclass of the source interface with additional, non-interface fields. - * @param overrideNonNullTargetValues if true, the source non-null values override the - * target values with the same field name. If false, the source non-null values are - * ignored. - * @return the merged target object. - */ - public static T mergeBeans(S source, T target, Class sourceInterfaceClazz, - boolean overrideNonNullTargetValues) { - Assert.notNull(source, "Source object must not be null"); - Assert.notNull(target, "Target object must not be null"); - - BeanWrapper sourceBeanWrap = new BeanWrapperImpl(source); - BeanWrapper targetBeanWrap = new BeanWrapperImpl(target); - - List interfaceNames = Arrays.stream(sourceInterfaceClazz.getMethods()).map(m -> m.getName()).toList(); - - for (PropertyDescriptor descriptor : sourceBeanWrap.getPropertyDescriptors()) { - - if (!BEAN_MERGE_FIELD_EXCISIONS.contains(descriptor.getName()) - && interfaceNames.contains(toGetName(descriptor.getName()))) { - - String propertyName = descriptor.getName(); - Object value = sourceBeanWrap.getPropertyValue(propertyName); - - // Copy value to the target object - if (value != null) { - var targetValue = targetBeanWrap.getPropertyValue(propertyName); - - if (targetValue == null || overrideNonNullTargetValues) { - targetBeanWrap.setPropertyValue(propertyName, value); - } - } - } - } - - return target; - } - - private static String toGetName(String name) { - return "get" + name.substring(0, 1).toUpperCase() + name.substring(1); - } - - /** - * Generates JSON Schema (version 2020_12) for the given class. - * @param clazz the class to generate JSON Schema for. - * @param toUpperCaseTypeValues if true, the type values are converted to upper case. - * @return the generated JSON Schema as a String. - */ - public static String getJsonSchema(Class clazz, boolean toUpperCaseTypeValues) { - - if (SCHEMA_GENERATOR_CACHE.get() == null) { - - JacksonModule jacksonModule = new JacksonModule(JacksonOption.RESPECT_JSONPROPERTY_REQUIRED); - Swagger2Module swaggerModule = new Swagger2Module(); - - SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, - OptionPreset.PLAIN_JSON) - .with(Option.EXTRA_OPEN_API_FORMAT_VALUES) - .with(Option.PLAIN_DEFINITION_KEYS) - .with(swaggerModule) - .with(jacksonModule); - - SchemaGeneratorConfig config = configBuilder.build(); - SchemaGenerator generator = new SchemaGenerator(config); - SCHEMA_GENERATOR_CACHE.compareAndSet(null, generator); - } - - ObjectNode node = SCHEMA_GENERATOR_CACHE.get().generateSchema(clazz); - if (toUpperCaseTypeValues) { // Required for OpenAPI 3.0 (at least Vertex AI - // version of it). - toUpperCaseTypeValues(node); - } - - return node.toPrettyString(); - } - - public static void toUpperCaseTypeValues(ObjectNode node) { - if (node == null) { - return; - } - if (node.isObject()) { - node.fields().forEachRemaining(entry -> { - JsonNode value = entry.getValue(); - if (value.isObject()) { - toUpperCaseTypeValues((ObjectNode) value); - } - else if (value.isArray()) { - ((ArrayNode) value).elements().forEachRemaining(element -> { - if (element.isObject() || element.isArray()) { - toUpperCaseTypeValues((ObjectNode) element); - } - }); - } - else if (value.isTextual() && entry.getKey().equals("type")) { - String oldValue = ((ObjectNode) node).get("type").asText(); - ((ObjectNode) node).put("type", oldValue.toUpperCase()); - } - }); - } - else if (node.isArray()) { - node.elements().forEachRemaining(element -> { - if (element.isObject() || element.isArray()) { - toUpperCaseTypeValues((ObjectNode) element); - } - }); - } - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java deleted file mode 100644 index b3c4969d47..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelRequest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * 表示对AI模型的请求的接口。此接口封装了 与人工智能模型交互所需的必要信息,包括指令或 输入(通用类型T)和附加模型选项。它提供了一种标准化的方式 - * 向人工智能模型发送请求,确保包括所有必要的细节,并且可以易于管理。 - * - * Interface representing a request to an AI model. This interface encapsulates the - * necessary information required to interact with an AI model, including instructions or - * inputs (of generic type T) and additional model options. It provides a standardized way - * to send requests to AI models, ensuring that all necessary details are included and can - * be easily managed. - * - * @param the type of instructions or input required by the AI model - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ModelRequest { - - /** - * 检索AI模型所需的指令或输入。 返回AI模型所需的指令或输入 - * - * Retrieves the instructions or input required by the AI model. - * @return the instructions or input required by the AI model - */ - T getInstructions(); // required input - - /** - * 检索人工智能模型交互的可自定义选项。 返回AI模型交互的自定义选项 - * - * Retrieves the customizable options for AI model interactions. - * @return the customizable options for AI model interactions - */ - ModelOptions getOptions(); - -} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java deleted file mode 100644 index b3f40ffe74..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResponse.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -import java.util.List; - -/** - * - * 表示从AI模型接收到的响应的接口。此接口提供 访问AI模型生成的主要结果或结果列表的方法,以及 以及响应元数据。它是封装和管理的标准化方式 - * 人工智能模型的输出,确保轻松检索和处理生成的信息 - * - * Interface representing the response received from an AI model. This interface provides - * methods to access the main result or a list of results generated by the AI model, along - * with the response metadata. It serves as a standardized way to encapsulate and manage - * the output from AI models, ensuring easy retrieval and processing of the generated - * information. - * - * @param the type of the result(s) provided by the AI model - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ModelResponse> { - - /** - * 检索AI模型的结果。 - * - * Retrieves the result of the AI model. - * @return the result generated by the AI model - */ - T getResult(); - - /** - * 检索AI模型生成的输出列表。 - * - * Retrieves the list of generated outputs by the AI model. - * @return the list of generated outputs - */ - List getResults(); - - /** - * 检索与AI模型的响应相关联的响应元数据。 - * - * Retrieves the response metadata associated with the AI model's response. - * @return the response metadata - */ - ResponseMetadata getMetadata(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java deleted file mode 100644 index 5a5613a728..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ModelResult.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * This interface provides methods to access the main output of the AI model and the - * metadata associated with this result. It is designed to offer a standardized and - * comprehensive way to handle and interpret the outputs generated by AI models, catering - * to diverse AI applications and use cases. - * - * @param the type of the output generated by the AI model - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ModelResult { - - /** - * Retrieves the output generated by the AI model. - * @return the output generated by the AI model - */ - T getOutput(); - - /** - * Retrieves the metadata associated with the result of an AI model. - * @return the metadata associated with the result - */ - ResultMetadata getMetadata(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java deleted file mode 100644 index 15e685d02d..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResponseMetadata.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * 表示与AI模型的响应相关联的元数据的接口。此接口 旨在提供有关人工智能生成反应的附加信息 模型,包括处理细节和模型特定数据。它是一种价值 - * 核心领域内的对象,增强对人工智能模型的理解和管理 在各种应用中的响应。 - * - * Interface representing metadata associated with an AI model's response. This interface - * is designed to provide additional information about the generative response from an AI - * model, including processing details and model-specific data. It serves as a value - * object within the core domain, enhancing the understanding and management of AI model - * responses in various applications. - * - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ResponseMetadata { - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java deleted file mode 100644 index 78d5f7f6a9..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/ResultMetadata.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -/** - * Interface representing metadata associated with the results of an AI model. This - * interface focuses on providing additional context and insights into the results - * generated by AI models. It could include information like computation time, model - * version, or other relevant details that enhance understanding and management of AI - * model outputs in various applications. - * - * @author Mark Pollack - * @since 0.8.0 - */ -public interface ResultMetadata { - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java deleted file mode 100644 index da1db15048..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/StreamingModelClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model; - -import reactor.core.publisher.Flux; - -/** - * The StreamingModelClient interface provides a generic API for invoking a AI models with - * streaming response. It abstracts the process of sending requests and receiving a - * streaming responses. The interface uses Java generics to accommodate different types of - * requests and responses, enhancing flexibility and adaptability across different AI - * model implementations. - * - * @param the generic type of the request to the AI model - * @param the generic type of a single item in the streaming response from the - * AI model - * @author Christian Tzolov - * @since 0.8.0 - */ -public interface StreamingModelClient, TResChunk extends ModelResponse> { - - /** - * Executes a method call to the AI model. - * @param request the request object to be sent to the AI model - * @return the streaming response from the AI model - */ - Flux stream(TReq request); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java deleted file mode 100644 index 67a34b1b1c..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallSupport.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -import org.springframework.util.CollectionUtils; - -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author Christian Tzolov - */ -public abstract class AbstractFunctionCallSupport { - - protected final static boolean IS_RUNTIME_CALL = true; - - /** - * 函数回调寄存器用于按名称解析函数回调。 - * - * The function callback register is used to resolve the function callbacks by name. - */ - protected final Map functionCallbackRegister = new ConcurrentHashMap<>(); - - /** - * 函数回调上下文用于按名称解析函数回调来自Spring上下文。 - * 它是可选的,通常与Spring一起使用自动配置。 - * - * The function callback context is used to resolve the function callbacks by name - * from the Spring context. It is optional and usually used with Spring - * auto-configuration. - */ - protected final FunctionCallbackContext functionCallbackContext; - - public AbstractFunctionCallSupport(FunctionCallbackContext functionCallbackContext) { - this.functionCallbackContext = functionCallbackContext; - } - - public Map getFunctionCallbackRegister() { - return this.functionCallbackRegister; - } - - protected Set handleFunctionCallbackConfigurations(FunctionCallingOptions options, boolean isRuntimeCall) { - - Set functionToCall = new HashSet<>(); - - if (options != null) { - if (!CollectionUtils.isEmpty(options.getFunctionCallbacks())) { - options.getFunctionCallbacks().stream().forEach(functionCallback -> { - - // Register the tool callback. - if (isRuntimeCall) { - this.functionCallbackRegister.put(functionCallback.getName(), functionCallback); - } - else { - this.functionCallbackRegister.putIfAbsent(functionCallback.getName(), functionCallback); - } - - // Automatically enable the function, usually from prompt callback. - if (isRuntimeCall) { - functionToCall.add(functionCallback.getName()); - } - }); - } - - // Add the explicitly enabled functions. - if (!CollectionUtils.isEmpty(options.getFunctions())) { - functionToCall.addAll(options.getFunctions()); - } - } - - return functionToCall; - } - - /** - * Resolve the function callbacks by name. Retrieve them from the registry or try to - * resolve them from the Application Context. - * @param functionNames Name of function callbacks to retrieve. - * @return list of resolved FunctionCallbacks. - */ - protected List resolveFunctionCallbacks(Set functionNames) { - - List retrievedFunctionCallbacks = new ArrayList<>(); - - for (String functionName : functionNames) { - if (!this.functionCallbackRegister.containsKey(functionName)) { - - if (this.functionCallbackContext != null) { - FunctionCallback functionCallback = this.functionCallbackContext.getFunctionCallback(functionName, - null); - if (functionCallback != null) { - this.functionCallbackRegister.put(functionName, functionCallback); - } - else { - throw new IllegalStateException( - "No function callback [" + functionName + "] fund in tht FunctionCallbackContext"); - } - } - else { - throw new IllegalStateException("No function callback found for name: " + functionName); - } - } - FunctionCallback functionCallback = this.functionCallbackRegister.get(functionName); - - retrievedFunctionCallbacks.add(functionCallback); - } - - return retrievedFunctionCallbacks; - } - - /// - protected Resp callWithFunctionSupport(Req request) { - Resp response = this.doChatCompletion(request); - return this.handleFunctionCallOrReturn(request, response); - } - - protected Resp handleFunctionCallOrReturn(Req request, Resp response) { - - if (!this.isToolFunctionCall(response)) { - return response; - } - - // The chat completion tool call requires the complete conversation - // history. Including the initial user message. - List conversationHistory = new ArrayList<>(); - - conversationHistory.addAll(this.doGetUserMessages(request)); - - Msg responseMessage = this.doGetToolResponseMessage(response); - - // Add the assistant response to the message conversation history. - conversationHistory.add(responseMessage); - - Req newRequest = this.doCreateToolResponseRequest(request, responseMessage, conversationHistory); - - return this.callWithFunctionSupport(newRequest); - } - - abstract protected Req doCreateToolResponseRequest(Req previousRequest, Msg responseMessage, - List conversationHistory); - - abstract protected List doGetUserMessages(Req request); - - abstract protected Msg doGetToolResponseMessage(Resp response); - - abstract protected Resp doChatCompletion(Req request); - - abstract protected boolean isToolFunctionCall(Resp response); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java deleted file mode 100644 index 801ea3c106..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/AbstractFunctionCallback.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.util.Assert; - -import java.util.function.Function; - -/** - * Abstract implementation of the {@link FunctionCallback} for interacting with the - * Model's function calling protocol and a {@link Function} wrapping the interaction with - * the 3rd party service/function. - * - * Implement the {@code O apply(I request) } method to implement the interaction with the - * 3rd party service/function. - * - * The {@link #responseConverter} function is responsible to convert the 3rd party - * function's output type into a string expected by the LLM model. - * - * @param the 3rd party service input type. - * @param the 3rd party service output type. - * @author Christian Tzolov - */ -abstract class AbstractFunctionCallback implements Function, FunctionCallback { - - private final String name; - - private final String description; - - private final Class inputType; - - private final String inputTypeSchema; - - private final ObjectMapper objectMapper; - - private final Function responseConverter; - - /** - * Constructs a new {@link AbstractFunctionCallback} with the given name, description, - * input type and default object mapper. - * @param name Function name. Should be unique within the ChatClient's function - * registry. - * @param description Function description. Used as a "system prompt" by the model to - * decide if the function should be called. - * @param inputTypeSchema Used to compute, the argument's Schema (such as JSON Schema - * or OpenAPI Schema)required by the Model's function calling protocol. - * @param inputType Used to compute, the argument's JSON schema required by the - * Model's function calling protocol. - * @param responseConverter Used to convert the function's output type to a string. - * @param objectMapper Used to convert the function's input and output types to and - * from JSON. - */ - protected AbstractFunctionCallback(String name, String description, String inputTypeSchema, Class inputType, - Function responseConverter, ObjectMapper objectMapper) { - Assert.notNull(name, "Name must not be null"); - Assert.notNull(description, "Description must not be null"); - Assert.notNull(inputType, "InputType must not be null"); - Assert.notNull(inputTypeSchema, "InputTypeSchema must not be null"); - Assert.notNull(responseConverter, "ResponseConverter must not be null"); - Assert.notNull(objectMapper, "ObjectMapper must not be null"); - this.name = name; - this.description = description; - this.inputType = inputType; - this.inputTypeSchema = inputTypeSchema; - this.responseConverter = responseConverter; - this.objectMapper = objectMapper; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public String getDescription() { - return this.description; - } - - @Override - public String getInputTypeSchema() { - return this.inputTypeSchema; - } - - @Override - public String call(String functionArguments) { - - // Convert the tool calls JSON arguments into a Java function request object. - I request = fromJson(functionArguments, inputType); - - // extend conversation with function response. - return this.andThen(this.responseConverter).apply(request); - } - - private T fromJson(String json, Class targetClass) { - try { - return this.objectMapper.readValue(json, targetClass); - } - catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((description == null) ? 0 : description.hashCode()); - result = prime * result + ((inputType == null) ? 0 : inputType.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AbstractFunctionCallback other = (AbstractFunctionCallback) obj; - if (name == null) { - if (other.name != null) - return false; - } - else if (!name.equals(other.name)) - return false; - if (description == null) { - if (other.description != null) - return false; - } - else if (!description.equals(other.description)) - return false; - if (inputType == null) { - if (other.inputType != null) - return false; - } - else if (!inputType.equals(other.inputType)) - return false; - return true; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java deleted file mode 100644 index 91fc3ba8aa..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallback.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -/** - * - * 表示模型函数调用处理程序。实现已向注册对触发函数调用的提示进行建模和调用。 - * - * https://blog.csdn.net/weixin_37546425/article/details/136402740 - * - * https://www.163.com/dy/article/ICE2S20P05119NPR.html - * - * Represents a model function call handler. Implementations are registered with the - * Models and called on prompts that trigger the function call. - * - * @author Christian Tzolov - */ -public interface FunctionCallback { - - /** - * @return Returns the Function name. Unique within the model. - */ - public String getName(); - - /** - * @return Returns the function description. This description is used by the model do - * decide if the function should be called or not. - */ - public String getDescription(); - - /** - * @return Returns the JSON schema of the function input type. - */ - public String getInputTypeSchema(); - - /** - * Called when a model detects and triggers a function call. The model is responsible - * to pass the function arguments in the pre-configured JSON schema format. - * @param functionInput JSON string with the function arguments to be passed to the - * function. The arguments are defined as JSON schema usually registered with the the - * model. - * @return String containing the function call response. - */ - public String call(String functionInput); - -} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java deleted file mode 100644 index 5524182bc2..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackContext.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.ai.model.function; - -import com.fasterxml.jackson.annotation.JsonClassDescription; -import org.springframework.beans.BeansException; -import org.springframework.cloud.function.context.catalog.FunctionTypeUtils; -import org.springframework.cloud.function.context.config.FunctionContextUtils; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.context.annotation.Description; -import org.springframework.context.support.GenericApplicationContext; -import org.springframework.lang.NonNull; -import org.springframework.lang.Nullable; -import org.springframework.util.StringUtils; - -import java.lang.reflect.Type; -import java.util.function.Function; - -/** - * A Spring {@link ApplicationContextAware} implementation that provides a way to retrieve - * a {@link Function} from the Spring context and wrap it into a {@link FunctionCallback}. - * - * The name of the function is determined by the bean name. - * - * The description of the function is determined by the following rules: - *

    - *
  • Provided as a default description
  • - *
  • Provided as a {@code @Description} annotation on the bean
  • - *
  • Provided as a {@code @JsonClassDescription} annotation on the input class
  • - *
- * - * @author Christian Tzolov - * @author Christopher Smith - */ -public class FunctionCallbackContext implements ApplicationContextAware { - - private GenericApplicationContext applicationContext; - - private FunctionCallbackWrapper.Builder.SchemaType schemaType = FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA; - - public void setSchemaType(FunctionCallbackWrapper.Builder.SchemaType schemaType) { - this.schemaType = schemaType; - } - - @Override - public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException { - this.applicationContext = (GenericApplicationContext) applicationContext; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - public FunctionCallback getFunctionCallback(@NonNull String beanName, @Nullable String defaultDescription) { - - Type beanType = FunctionContextUtils.findType(this.applicationContext.getBeanFactory(), beanName); - - if (beanType == null) { - throw new IllegalArgumentException( - "Functional bean with name: " + beanName + " does not exist in the context."); - } - - if (!Function.class.isAssignableFrom(FunctionTypeUtils.getRawType(beanType))) { - throw new IllegalArgumentException( - "Function call Bean must be of type Function. Found: " + beanType.getTypeName()); - } - - Type functionInputType = TypeResolverHelper.getFunctionArgumentType(beanType, 0); - - Class functionInputClass = FunctionTypeUtils.getRawType(functionInputType); - String functionName = beanName; - String functionDescription = defaultDescription; - - if (!StringUtils.hasText(functionDescription)) { - // Look for a Description annotation on the bean - Description descriptionAnnotation = applicationContext.findAnnotationOnBean(beanName, Description.class); - - if (descriptionAnnotation != null) { - functionDescription = descriptionAnnotation.value(); - } - - if (!StringUtils.hasText(functionDescription)) { - // Look for a JsonClassDescription annotation on the input class - JsonClassDescription jsonClassDescriptionAnnotation = functionInputClass - .getAnnotation(JsonClassDescription.class); - if (jsonClassDescriptionAnnotation != null) { - functionDescription = jsonClassDescriptionAnnotation.value(); - } - } - - if (!StringUtils.hasText(functionDescription)) { - throw new IllegalStateException("Could not determine function description." - + "Please provide a description either as a default parameter, via @Description annotation on the bean " - + "or @JsonClassDescription annotation on the input class."); - } - } - - Object bean = this.applicationContext.getBean(beanName); - - // TODO: 2024/3/16 fansili 适配jdk8 - return null; -// if (bean instanceof Function function) { -// return FunctionCallbackWrapper.builder(function) -// .withName(functionName) -// .withSchemaType(this.schemaType) -// .withDescription(functionDescription) -// .withInputType(functionInputClass) -// .build(); -// } -// else { -// throw new IllegalArgumentException("Bean must be of type Function"); -// } - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java deleted file mode 100644 index 23c981b0e4..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallbackWrapper.java +++ /dev/null @@ -1,140 +0,0 @@ -package org.springframework.ai.model.function; - -import org.springframework.ai.model.ModelOptionsUtils; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.util.Assert; - -import java.util.function.Function; - -/** - * Note that the underlying function is responsible for converting the output into format - * that can be consumed by the Model. The default implementation converts the output into - * String before sending it to the Model. Provide a custom function responseConverter - * implementation to override this. - * - */ -public class FunctionCallbackWrapper extends AbstractFunctionCallback { - - private final Function function; - - private FunctionCallbackWrapper(String name, String description, String inputTypeSchema, Class inputType, - Function responseConverter, Function function) { - super(name, description, inputTypeSchema, inputType, responseConverter, - new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)); - Assert.notNull(function, "Function must not be null"); - this.function = function; - } - - @SuppressWarnings("unchecked") - private static Class resolveInputType(Function function) { - return (Class) TypeResolverHelper.getFunctionInputClass((Class>) function.getClass()); - } - - @Override - public O apply(I input) { - return this.function.apply(input); - } - - public static Builder builder(Function function) { - return new Builder<>(function); - } - - public static class Builder { - - public enum SchemaType { - - JSON_SCHEMA, OPEN_API_SCHEMA - - } - - private String name; - - private String description; - - private Class inputType; - - private final Function function; - - private SchemaType schemaType = SchemaType.JSON_SCHEMA; - - public Builder(Function function) { - Assert.notNull(function, "Function must not be null"); - this.function = function; - } - - // By default the response is converted to a JSON string. - private Function responseConverter = (response) -> ModelOptionsUtils.toJsonString(response); - - private String inputTypeSchema; - - private ObjectMapper objectMapper = new ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - public Builder withName(String name) { - Assert.hasText(name, "Name must not be empty"); - this.name = name; - return this; - } - - public Builder withDescription(String description) { - Assert.hasText(description, "Description must not be empty"); - this.description = description; - return this; - } - - @SuppressWarnings("unchecked") - public Builder withInputType(Class inputType) { - this.inputType = (Class) inputType; - return this; - } - - public Builder withResponseConverter(Function responseConverter) { - Assert.notNull(responseConverter, "ResponseConverter must not be null"); - this.responseConverter = responseConverter; - return this; - } - - public Builder withInputTypeSchema(String inputTypeSchema) { - Assert.hasText(inputTypeSchema, "InputTypeSchema must not be empty"); - this.inputTypeSchema = inputTypeSchema; - return this; - } - - public Builder withObjectMapper(ObjectMapper objectMapper) { - Assert.notNull(objectMapper, "ObjectMapper must not be null"); - this.objectMapper = objectMapper; - return this; - } - - public Builder withSchemaType(SchemaType schemaType) { - Assert.notNull(schemaType, "SchemaType must not be null"); - this.schemaType = schemaType; - return this; - } - - public FunctionCallbackWrapper build() { - - Assert.hasText(this.name, "Name must not be empty"); - Assert.hasText(this.description, "Description must not be empty"); - // Assert.notNull(this.inputType, "InputType must not be null"); - Assert.notNull(this.function, "Function must not be null"); - Assert.notNull(this.responseConverter, "ResponseConverter must not be null"); - Assert.notNull(this.objectMapper, "ObjectMapper must not be null"); - - if (this.inputType == null) { - this.inputType = resolveInputType(this.function); - } - - if (this.inputTypeSchema == null) { - boolean upperCaseTypeValues = this.schemaType == SchemaType.OPEN_API_SCHEMA; - this.inputTypeSchema = ModelOptionsUtils.getJsonSchema(this.inputType, upperCaseTypeValues); - } - - return new FunctionCallbackWrapper<>(this.name, this.description, this.inputTypeSchema, this.inputType, - this.responseConverter, this.function); - } - - } - -} \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java deleted file mode 100644 index c66a4f5b18..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -import java.util.List; -import java.util.Set; - -/** - * @author Christian Tzolov - */ -public interface FunctionCallingOptions { - - /** - * Function Callbacks to be registered with the ChatClient. For Prompt Options the - * functionCallbacks are automatically enabled for the duration of the prompt - * execution. For Default Options the FunctionCallbacks are registered but disabled by - * default. You have to use "functions" property to list the function names from the - * ChatClient registry to be used in the chat completion requests. - * @return Return the Function Callbacks to be registered with the ChatClient. - */ - List getFunctionCallbacks(); - - /** - * Set the Function Callbacks to be registered with the ChatClient. - * @param functionCallbacks the Function Callbacks to be registered with the - * ChatClient. - */ - void setFunctionCallbacks(List functionCallbacks); - - /** - * @return List of function names from the ChatClient registry to be used in the next - * chat completion requests. - */ - Set getFunctions(); - - /** - * Set the list of function names from the ChatClient registry to be used in the next - * chat completion requests. - * @param functions the list of function names from the ChatClient registry to be used - * in the next chat completion requests. - */ - void setFunctions(Set functions); - - /** - * @return Returns FunctionCallingOptionsBuilder to create a new instance of - * FunctionCallingOptions. - */ - public static FunctionCallingOptionsBuilder builder() { - return new FunctionCallingOptionsBuilder(); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java deleted file mode 100644 index 44044400db..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/FunctionCallingOptionsBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -import org.springframework.ai.chat.prompt.ChatOptions; -import org.springframework.util.Assert; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * Builder for {@link FunctionCallingOptions}. Using the {@link FunctionCallingOptions} - * permits options portability between different AI providers that support - * function-calling. - * - * @author Christian Tzolov - * @since 0.8.1 - */ -public class FunctionCallingOptionsBuilder { - - private final PortableFunctionCallingOptions options; - - public FunctionCallingOptionsBuilder() { - this.options = new PortableFunctionCallingOptions(); - } - - public FunctionCallingOptionsBuilder withFunctionCallbacks(List functionCallbacks) { - this.options.setFunctionCallbacks(functionCallbacks); - return this; - } - - public FunctionCallingOptionsBuilder withFunctionCallback(FunctionCallback functionCallback) { - Assert.notNull(functionCallback, "FunctionCallback must not be null"); - this.options.getFunctionCallbacks().add(functionCallback); - return this; - } - - public FunctionCallingOptionsBuilder withFunctions(Set functions) { - this.options.setFunctions(functions); - return this; - } - - public FunctionCallingOptionsBuilder withFunction(String function) { - Assert.notNull(function, "Function must not be null"); - this.options.getFunctions().add(function); - return this; - } - - public FunctionCallingOptionsBuilder withTemperature(Float temperature) { - this.options.setTemperature(temperature); - return this; - } - - public FunctionCallingOptionsBuilder withTopP(Float topP) { - this.options.setTopP(topP); - return this; - } - - public FunctionCallingOptionsBuilder withTopK(Integer topK) { - this.options.setTopK(topK); - return this; - } - - public PortableFunctionCallingOptions build() { - return this.options; - } - - public static class PortableFunctionCallingOptions implements FunctionCallingOptions, ChatOptions { - - private List functionCallbacks = new ArrayList<>(); - - private Set functions = new HashSet<>(); - - private Float temperature; - - private Float topP; - - private Integer topK; - - @Override - public List getFunctionCallbacks() { - return this.functionCallbacks; - } - - @Override - public void setFunctionCallbacks(List functionCallbacks) { - Assert.notNull(functionCallbacks, "FunctionCallbacks must not be null"); - this.functionCallbacks = functionCallbacks; - } - - @Override - public Set getFunctions() { - return this.functions; - } - - @Override - public void setFunctions(Set functions) { - Assert.notNull(functions, "Functions must not be null"); - this.functions = functions; - } - - @Override - public Float getTemperature() { - return this.temperature; - } - - @Override - public void setTemperature(Float temperature) { - this.temperature = temperature; - } - - @Override - public Float getTopP() { - return this.topP; - } - - @Override - public void setTopP(Float topP) { - this.topP = topP; - } - - @Override - public Integer getTopK() { - return this.topK; - } - - @Override - public void setTopK(Integer topK) { - this.topK = topK; - } - - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java deleted file mode 100644 index 604ce0adc7..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/function/TypeResolverHelper.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2024-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.model.function; - -import net.jodah.typetools.TypeResolver; - -import java.lang.reflect.GenericArrayType; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.function.Function; - -/** - * @author Christian Tzolov - */ -public class TypeResolverHelper { - - public static Class getFunctionInputClass(Class> functionClass) { - return getFunctionArgumentClass(functionClass, 0); - } - - public static Class getFunctionOutputClass(Class> functionClass) { - return getFunctionArgumentClass(functionClass, 1); - } - - public static Class getFunctionArgumentClass(Class> functionClass, int argumentIndex) { - Type type = TypeResolver.reify(Function.class, functionClass); - - var argumentType = type instanceof ParameterizedType - ? ((ParameterizedType) type).getActualTypeArguments()[argumentIndex] : Object.class; - - return toRawClass(argumentType); - } - - public static Type getFunctionInputType(Class> functionClass) { - return getFunctionArgumentType(functionClass, 0); - } - - public static Type getFunctionOutputType(Class> functionClass) { - return getFunctionArgumentType(functionClass, 1); - } - - public static Type getFunctionArgumentType(Class> functionClass, int argumentIndex) { - Type functionType = TypeResolver.reify(Function.class, functionClass); - return getFunctionArgumentType(functionType, argumentIndex); - } - - public static Type getFunctionArgumentType(Type functionType, int argumentIndex) { - var argumentType = functionType instanceof ParameterizedType - ? ((ParameterizedType) functionType).getActualTypeArguments()[argumentIndex] : Object.class; - - return argumentType; - } - - /** - * Effectively converts {@link Type} which could be {@link ParameterizedType} to raw - * Class (no generics). - * @param type actual {@link Type} instance - * @return instance of {@link Class} as raw representation of the provided - * {@link Type} - */ - public static Class toRawClass(Type type) { - return type != null - ? TypeResolver.resolveRawClass(type instanceof GenericArrayType ? type : TypeResolver.reify(type), null) - : null; - } - - // public static void main(String[] args) { - // Class> clazz = MockWeatherService.class; - // System.out.println(getFunctionInputType(clazz)); - - // } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java deleted file mode 100644 index 12eaa53b40..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/model/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Provides a set of interfaces and classes for a generic API designed to interact with - * various AI models. This package includes interfaces for handling AI model calls, - * requests, responses, results, and associated metadata. It is designed to offer a - * flexible and adaptable framework for interacting with different types of AI models, - * abstracting the complexities involved in model invocation and result processing. The - * use of generics enhances the API's capability to work with a wide range of models, - * ensuring a broad applicability across diverse AI scenarios. - * - */ -package org.springframework.ai.model; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java index 3771113d07..16d86a48f0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java @@ -1,14 +1,14 @@ package org.springframework.ai.models.midjourney.api; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import org.springframework.ai.models.midjourney.MidjourneyConfig; import org.springframework.ai.models.midjourney.api.req.AttachmentsReq; import org.springframework.ai.models.midjourney.api.req.DescribeReq; import org.springframework.ai.models.midjourney.api.req.ReRollReq; import org.springframework.ai.models.midjourney.api.res.UploadAttachmentsRes; import org.springframework.ai.models.midjourney.util.MidjourneyUtil; -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONObject; import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.springframework.core.io.FileSystemResource; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java deleted file mode 100644 index 6cde315e77..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageApi.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.springframework.ai.models.openai; - -import cn.hutool.json.JSONUtil; -import org.springframework.ai.models.openai.api.OpenAiImageRequest; -import org.springframework.ai.models.openai.api.OpenAiImageResponse; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import io.netty.channel.ChannelOption; -import lombok.extern.slf4j.Slf4j; -import org.apache.http.HttpEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.web.reactive.function.client.WebClient; -import reactor.netty.http.client.HttpClient; - -import java.io.IOException; -import java.net.URI; -import java.time.Duration; - -/** - * open ai image - *

- * author: fansili - * time: 2024/3/17 09:53 - */ -@Slf4j -public class OpenAiImageApi { - - private static final String DEFAULT_BASE_URL = "https://api.openai.com"; - private String apiKey = "your-api-key"; - // 发送请求 webClient - private final WebClient webClient; - - private CloseableHttpClient httpclient = HttpClients.createDefault(); - - public OpenAiImageApi(String apiKey) { - this.apiKey = apiKey; - // 创建一个HttpClient实例并设置超时 - HttpClient httpClient = HttpClient.create() - .responseTimeout(Duration.ofSeconds(300)) // 设置响应超时时间为30秒 - .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 * 100); // 设置连接超时为5秒 - this.webClient = WebClient.builder() - .baseUrl(DEFAULT_BASE_URL) - .clientConnector(new ReactorClientHttpConnector(httpClient)) - .build(); - } - - public OpenAiImageResponse createImage(OpenAiImageRequest request) { - HttpPost httpPost = new HttpPost(); - httpPost.setURI(URI.create(DEFAULT_BASE_URL.concat("/v1/images/generations"))); - httpPost.setHeader("Content-Type", "application/json"); - httpPost.setHeader("Authorization", "Bearer " + apiKey); - httpPost.setEntity(new StringEntity(JsonUtils.toJsonString(request), "UTF-8")); - - CloseableHttpResponse response= null; - try { - response = httpclient.execute(httpPost); - HttpEntity entity = response.getEntity(); - String resultJson = EntityUtils.toString(entity); - log.info("openai 图片生成结果: {}", resultJson); - return JSONUtil.toBean(resultJson, OpenAiImageResponse.class); - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - if (response != null) { - try { - response.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } -// String res = webClient.post() -// .uri(uriBuilder -> uriBuilder.path("/v1/images/generations").build()) -// .header("Content-Type", "application/json") -// .header("Authorization", "Bearer " + apiKey) -// // 设置请求体(这里假设jsonStr是一个JSON格式的字符串) -// .body(BodyInserters.fromValue(JacksonUtil.toJson(request))) -// // 发送请求并获取响应体 -// .retrieve() -// // 转换响应体为String类型 -// .bodyToMono(String.class) -// .block(); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java deleted file mode 100644 index 558a0e6e80..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageClient.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.springframework.ai.models.openai; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.codec.Base64; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpUtil; -import org.springframework.ai.chat.ChatException; -import org.springframework.ai.models.yiyan.exception.YiYanApiException; -import cn.iocoder.yudao.framework.ai.core.exception.AiException; -import org.springframework.ai.models.openai.api.OpenAiImageRequest; -import org.springframework.ai.models.openai.api.OpenAiImageResponse; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; -import org.springframework.ai.image.*; -import org.springframework.retry.RetryCallback; -import org.springframework.retry.RetryContext; -import org.springframework.retry.RetryListener; -import org.springframework.retry.support.RetryTemplate; - -import java.time.Duration; - -/** - * open ai 生成 image - * - * author: fansili - * time: 2024/3/17 09:51 - */ -@Slf4j -public class OpenAiImageClient implements ImageClient { - - /** - * open image ai - */ - private OpenAiImageApi openAiImageApi; - /** - * 默认使用的 ImageOptions - */ - private OpenAiImageOptions defaultImageOptions; - - - public final RetryTemplate retryTemplate = RetryTemplate.builder() - // 最大重试次数 10 - .maxAttempts(10) - .retryOn(YiYanApiException.class) - // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms - .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) - .withListener(new RetryListener() { - @Override - public void onError(RetryContext context, - RetryCallback callback, Throwable throwable) { - log.warn("重试异常:" + context.getRetryCount(), throwable); - }; - }) - .build(); - - public OpenAiImageClient(OpenAiImageApi openAiImageApi, OpenAiImageOptions defaultImageOptions) { - this.openAiImageApi = openAiImageApi; - this.defaultImageOptions = defaultImageOptions; - } - - @Override - public ImageResponse call(ImagePrompt imagePrompt) { - return this.retryTemplate.execute(ctx -> { - OpenAiImageOptions openAiImageOptions = getOpenAiImageOptions(imagePrompt); - // 创建请求 - OpenAiImageRequest request = new OpenAiImageRequest(); - BeanUtil.copyProperties(openAiImageOptions, request); - request.setPrompt(imagePrompt.getInstructions().get(0).getText()); - request.setModel(openAiImageOptions.getModel()); - request.setStyle(openAiImageOptions.getStyle().getStyle()); - request.setSize(openAiImageOptions.getSize()); - // 发送请求 - OpenAiImageResponse response = openAiImageApi.createImage(request); - if (response.getError() != null && !StrUtil.isBlank(response.getError().getMessage())) { - // code 错误没有编码,就先根据 message 来进行判断 - throw new AiException("openAi 图片生成失败! " + response.getError().getMessage()); - } - return new ImageResponse(response.getData().stream().map(res -> { - byte[] bytes = HttpUtil.downloadBytes(res.getUrl()); - String base64 = Base64.encode(bytes); - return new ImageGeneration(new Image(res.getUrl(), base64)); - }).toList()); - }); - } - - private @NotNull OpenAiImageOptions getOpenAiImageOptions(ImagePrompt imagePrompt) { - // 检查是否配置了 OpenAiImageOptions - if (defaultImageOptions == null && imagePrompt.getOptions() == null) { - throw new ChatException("OpenAiImageOptions 未配置参数!"); - } - // 优先使用 request 中的 ImageOptions - ImageOptions useImageOptions = imagePrompt.getOptions() == null ? defaultImageOptions : imagePrompt.getOptions(); - if (!(useImageOptions instanceof OpenAiImageOptions)) { - throw new ChatException("配置信息不正确,传入的必须是 OpenAiImageOptions!"); - } - // 转换 OpenAiImageOptions - OpenAiImageOptions openAiImageOptions = (OpenAiImageOptions) useImageOptions; - return openAiImageOptions; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java deleted file mode 100644 index c6c903031e..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/OpenAiImageOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.springframework.ai.models.openai; - -import org.springframework.ai.image.ImageOptions; -import org.springframework.ai.models.openai.enums.OpenAiImageModelEnum; -import org.springframework.ai.models.openai.enums.OpenAiImageStyleEnum; -import lombok.Data; -import lombok.Getter; -import lombok.experimental.Accessors; - -/** - * open ai 配置文件 - * - * 文档地址:https://platform.openai.com/docs/api-reference/images/create - * - * author: fansili - * time: 2024/3/17 09:53 - */ -@Data -@Accessors(chain = true) -public class OpenAiImageOptions implements ImageOptions { - - // 必填字段,用于描述期望生成图像的文字说明。对于dall-e-2模型最大长度为1000个字符,对于dall-e-3模型最大长度为4000个字符。 - private String prompt; - - // 可选字段,默认为dall-e-2 - // 指定用于生成图像的模型名称。 - private OpenAiImageModelEnum model = OpenAiImageModelEnum.DALL_E_2; - - // 可选字段,默认为1 - // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 - private Integer n = 1; - - // 可选字段,默认为standard - // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 - private String quality = "standard"; - - // 可选字段,默认为url - // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 - private String responseFormat = "url"; - - // 可选字段,默认为1024x1024 - // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 - private String size = "1024x1024"; - - // 可选字段,默认为vivid - // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 - private OpenAiImageStyleEnum style = OpenAiImageStyleEnum.VIVID; - - // 可选字段 - // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 - private String endUserId = "UID123456"; - - @Getter - public enum ResponseFormatEnum { - - URL("url"), - BASE64("b64_json"), - - ; - - ResponseFormatEnum(String value) { - this.value = value; - } - - private String value; - } - - // - // 适配 spring ai - - @Override - public Integer getN() { - return this.n; - } - - @Override - public String getModel() { - return this.model.getModel(); - } - - @Override - public Integer getWidth() { - return null; - } - - @Override - public Integer getHeight() { - return null; - } - - @Override - public String getResponseFormat() { - return this.responseFormat; - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java deleted file mode 100644 index 0c01e1ea07..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageRequest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.springframework.ai.models.openai.api; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * open ai 配置文件 - * - * 文档地址:https://platform.openai.com/docs/api-reference/images/create - * - * author: fansili - * time: 2024/3/17 09:53 - */ -@Data -@Accessors(chain = true) -public class OpenAiImageRequest { - - // 必填字段,用于描述期望生成图像的文字说明。对于dall-e-2模型最大长度为1000个字符,对于dall-e-3模型最大长度为4000个字符。 - @JsonProperty("prompt") - private String prompt; - - // 可选字段,默认为dall-e-2、dall-e-3 - // 指定用于生成图像的模型名称。 - @JsonProperty("model") - private String model = "dall-e-2"; - - // 可选字段,默认为1 - // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 - @JsonProperty("n") - private Integer n = 1; - - // 可选字段,默认为standard - // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 - @JsonProperty("quality") - private String quality = "standard"; - - // 可选字段,默认为url - // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 - @JsonProperty("response_format") - private String responseFormat = "url"; - - // 可选字段,默认为1024x1024 - // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 - @JsonProperty("size") - private String size = "1024x1024"; - - // 可选字段,默认为vivid - // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 - @JsonProperty("style") - private String style = "vivid"; - - // 可选字段 - // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 - @JsonProperty("user") - private String endUserId = "UID123123"; - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java deleted file mode 100644 index beab4cdee1..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/openai/api/OpenAiImageResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.springframework.ai.models.openai.api; - -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * image 返回 - * - * author: fansili - * time: 2024/3/17 10:27 - */ -@Data -@Accessors(chain = true) -public class OpenAiImageResponse { - - private long created; - private List data; - private Error error; - - @Data - @Accessors(chain = true) - public static class Item { - - private String url; - private String b64_json; - - } - - @Data - @Accessors(chain = true) - public static class Error { - private String code; - private String message; - private String param; - private String type; - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java index c1d0d41bf6..f038bc83e9 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java @@ -1,5 +1,6 @@ package org.springframework.ai.models.tongyi; +import cn.iocoder.yudao.framework.ai.core.exception.ChatException; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java index 9a677607df..39db366082 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java @@ -41,25 +41,25 @@ public class QianWenOptions implements ChatOptions { return null; } - @Override - public void setTemperature(Float temperature) { - - } - - @Override - public void setTopP(Float topP) { - this.topP = topP; - } +// @Override +// public void setTemperature(Float temperature) { +// +// } +// +// @Override +// public void setTopP(Float topP) { +// this.topP = topP; +// } @Override public Integer getTopK() { return null; } - @Override - public void setTopK(Integer topK) { - - } +// @Override +// public void setTopK(Integer topK) { +// +// } @Data @Accessors diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java index 740d749109..0010a75fa2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java @@ -2,6 +2,7 @@ package org.springframework.ai.models.xinghuo; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.exceptions.ExceptionUtil; +import cn.iocoder.yudao.framework.ai.core.exception.ChatException; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java index 8efa7527b5..bdc6710925 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java @@ -49,28 +49,29 @@ public class XingHuoOptions implements ChatOptions { return this.temperature; } - @Override - public void setTemperature(Float temperature) { - this.temperature = temperature; - } +// @Override +// public void setTemperature(Float temperature) { +// this.temperature = temperature; +// } @Override public Float getTopP() { return null; } - @Override - public void setTopP(Float topP) { - - } +// @Override +// public void setTopP(Float topP) { +// +// } @Override public Integer getTopK() { return this.topK; } - @Override - public void setTopK(Integer topK) { - this.topK = topK; - } +// @Override +// public void setTopK(Integer topK) { +// this.topK = topK; +// } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java index 5d1dd4f76d..e0da409ecd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java @@ -1,6 +1,7 @@ package org.springframework.ai.models.yiyan; import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.ai.core.exception.ChatException; import org.springframework.ai.chat.*; import org.springframework.ai.chat.messages.Message; import org.springframework.ai.chat.messages.MessageType; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java index aac8e49492..0cb1481b34 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java @@ -114,20 +114,20 @@ public class YiYanOptions implements ChatOptions { return this.temperature; } - @Override - public void setTemperature(Float temperature) { - this.temperature = temperature; - } +// @Override +// public void setTemperature(Float temperature) { +// this.temperature = temperature; +// } @Override public Float getTopP() { return topP; } - @Override - public void setTopP(Float topP) { - this.topP = topP; - } +// @Override +// public void setTopP(Float topP) { +// this.topP = topP; +// } // 百度么有 topK @@ -136,7 +136,7 @@ public class YiYanOptions implements ChatOptions { return null; } - @Override - public void setTopK(Integer topK) { - } +// @Override +// public void setTopK(Integer topK) { +// } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java deleted file mode 100644 index a06827f399..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractConversionServiceOutputParser.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -import org.springframework.core.convert.support.DefaultConversionService; - -/** - * Abstract {@link OutputParser} implementation that uses a pre-configured - * {@link DefaultConversionService} to convert the LLM output into the desired type - * format. - * - * @param Specifies the desired response type. - * @author Mark Pollack - * @author Christian Tzolov - */ -public abstract class AbstractConversionServiceOutputParser implements OutputParser { - - private final DefaultConversionService conversionService; - - public AbstractConversionServiceOutputParser(DefaultConversionService conversionService) { - this.conversionService = conversionService; - } - - public DefaultConversionService getConversionService() { - return conversionService; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java deleted file mode 100644 index 01dbadaf14..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/AbstractMessageConverterOutputParser.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -import org.springframework.messaging.converter.MessageConverter; - -/** - * Abstract {@link OutputParser} implementation that uses a pre-configured - * {@link MessageConverter} to convert the LLM output into the desired type format. - * - * @param Specifies the desired response type. - * @author Mark Pollack - * @author Christian Tzolov - */ -public abstract class AbstractMessageConverterOutputParser implements OutputParser { - - private MessageConverter messageConverter; - - public AbstractMessageConverterOutputParser(MessageConverter messageConverter) { - this.messageConverter = messageConverter; - } - - public MessageConverter getMessageConverter() { - return this.messageConverter; - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java deleted file mode 100644 index fa09c26af0..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/BeanOutputParser.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.util.DefaultIndenter; -import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.github.victools.jsonschema.generator.SchemaGenerator; -import com.github.victools.jsonschema.generator.SchemaGeneratorConfig; -import com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder; -import com.github.victools.jsonschema.module.jackson.JacksonModule; - -import java.util.Map; -import java.util.Objects; - -import static com.github.victools.jsonschema.generator.OptionPreset.PLAIN_JSON; -import static com.github.victools.jsonschema.generator.SchemaVersion.DRAFT_2020_12; - -/** - * An implementation of {@link OutputParser} that transforms the LLM output to a specific - * object type using JSON schema. This parser works by generating a JSON schema based on a - * given Java class, which is then used to validate and transform the LLM output into the - * desired type. - * - * @param The target type to which the output will be converted. - * @author Mark Pollack - * @author Christian Tzolov - * @author Sebastian Ullrich - * @author Kirk Lund - */ -public class BeanOutputParser implements OutputParser { - - /** Holds the generated JSON schema for the target type. */ - private String jsonSchema; - - /** The Java class representing the target type. */ - @SuppressWarnings({ "FieldMayBeFinal", "rawtypes" }) - private Class clazz; - - /** The object mapper used for deserialization and other JSON operations. */ - @SuppressWarnings("FieldMayBeFinal") - private ObjectMapper objectMapper; - - /** - * Constructor to initialize with the target type's class. - * @param clazz The target type's class. - */ - public BeanOutputParser(Class clazz) { - this(clazz, null); - } - - /** - * Constructor to initialize with the target type's class, a custom object mapper, and - * a line endings normalizer to ensure consistent line endings on any platform. - * @param clazz The target type's class. - * @param objectMapper Custom object mapper for JSON operations. endings. - */ - public BeanOutputParser(Class clazz, ObjectMapper objectMapper) { - Objects.requireNonNull(clazz, "Java Class cannot be null;"); - this.clazz = clazz; - this.objectMapper = objectMapper != null ? objectMapper : getObjectMapper(); - generateSchema(); - } - - /** - * Generates the JSON schema for the target type. - */ - private void generateSchema() { - JacksonModule jacksonModule = new JacksonModule(); - SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(DRAFT_2020_12, PLAIN_JSON) - .with(jacksonModule); - SchemaGeneratorConfig config = configBuilder.build(); - SchemaGenerator generator = new SchemaGenerator(config); - JsonNode jsonNode = generator.generateSchema(this.clazz); - ObjectWriter objectWriter = new ObjectMapper() - .writer(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter().withLinefeed("\n"))); - try { - this.jsonSchema = objectWriter.writeValueAsString(jsonNode); - } - catch (JsonProcessingException e) { - throw new RuntimeException("Could not pretty print json schema for " + this.clazz, e); - } - } - - @Override - /** - * Parses the given text to transform it to the desired target type. - * @param text The LLM output in string format. - * @return The parsed output in the desired target type. - */ - public T parse(String text) { - try { - // If the response is a JSON Schema, extract the properties and use them as - // the response. - text = this.jsonSchemaToInstance(text); - return (T) this.objectMapper.readValue(text, this.clazz); - } - catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Converts a JSON Schema to an instance based on a given text. - * @param text The JSON Schema in string format. - * @return The JSON instance generated from the JSON Schema, or the original text if - * the input is not a JSON Schema. - */ - private String jsonSchemaToInstance(String text) { - try { - Map map = this.objectMapper.readValue(text, Map.class); - if (map.containsKey("$schema")) { - return this.objectMapper.writeValueAsString(map.get("properties")); - } - } - catch (Exception e) { - } - return text; - } - - /** - * Configures and returns an object mapper for JSON operations. - * @return Configured object mapper. - */ - protected ObjectMapper getObjectMapper() { - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - return mapper; - } - - /** - * Provides the expected format of the response, instructing that it should adhere to - * the generated JSON schema. - * @return The instruction format string. - */ - @Override - public String getFormat() { -// String template = """ -// Your response should be in JSON format. -// Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. -// Do not include markdown code blocks in your response. -// Here is the JSON Schema instance your output must adhere to: -// ```%s``` -// """; - String template = "Your response should be in JSON format.\n" + - "\t\t\t\tDo not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation.\n" + - "\t\t\t\tDo not include markdown code blocks in your response.\n" + - "\t\t\t\tHere is the JSON Schema instance your output must adhere to:\n" + - "\t\t\t\t```%s```"; - return String.format(template, this.jsonSchema); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java deleted file mode 100644 index 8d0cb76b09..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/FormatProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -/** - * Implementations of this interface provides instructions for how the output of a - * language generative should be formatted. - * - * @author Mark Pollack - */ -public interface FormatProvider { - - /** - * @return Returns a string containing instructions for how the output of a language - * generative should be formatted. - */ - String getFormat(); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java deleted file mode 100644 index d112257973..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/ListOutputParser.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.ai.parser; - -import org.springframework.core.convert.support.DefaultConversionService; - -import java.util.List; - -/** - * {@link OutputParser} implementation that uses a {@link DefaultConversionService} to - * convert the LLM output into a {@link List} instance. - * - * @author Mark Pollack - * @author Christian Tzolov - */ -public class ListOutputParser extends AbstractConversionServiceOutputParser> { - - public ListOutputParser(DefaultConversionService defaultConversionService) { - super(defaultConversionService); - } - - @Override - public String getFormat() { -// return """ -// Your response should be a list of comma separated values -// eg: `foo, bar, baz` -// """; - return "Your response should be a list of comma separated values\n" + - "\t\t\t\teg: `foo, bar, baz`"; - } - - @Override - public List parse(String text) { - return getConversionService().convert(text, List.class); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java deleted file mode 100644 index 90f017f794..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/MapOutputParser.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -import org.springframework.messaging.Message; -import org.springframework.messaging.converter.MappingJackson2MessageConverter; -import org.springframework.messaging.support.MessageBuilder; - -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Map; - -/** - * {@link OutputParser} implementation that uses a pre-configured - * {@link MappingJackson2MessageConverter} to convert the LLM output into a - * java.util.Map<String, Object> instance. - * - * @author Mark Pollack - * @author Christian Tzolov - */ -public class MapOutputParser extends AbstractMessageConverterOutputParser> { - - public MapOutputParser() { - super(new MappingJackson2MessageConverter()); - } - - @Override - public Map parse(String text) { - Message message = MessageBuilder.withPayload(text.getBytes(StandardCharsets.UTF_8)).build(); - return (Map) getMessageConverter().fromMessage(message, HashMap.class); - } - - @Override - public String getFormat() { -// String raw = """ -// Your response should be in JSON format. -// The data structure for the JSON should match this Java class: %s -// Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation. -// """; - String raw = "Your response should be in JSON format.\n" + - "\t\t\t\tThe data structure for the JSON should match this Java class: %s\n" + - "\t\t\t\tDo not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation."; - return String.format(raw, "java.util.HashMap"); - } - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java deleted file mode 100644 index cbc7e6e5a5..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/OutputParser.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -/** - * Converts the (raw) LLM output into a structured responses of type. The - * {@link FormatProvider#getFormat()} method should provide the LLM prompt description of - * the desired format. - * - * @param Specifies the desired response type. - * @author Mark Pollack - * @author Christian Tzolov - */ -public interface OutputParser extends Parser, FormatProvider { - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java deleted file mode 100644 index 559473f080..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/Parser.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ai.parser; - -@FunctionalInterface -public interface Parser { - - T parse(String text); - -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md deleted file mode 100644 index 740e330f2c..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/parser/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Output Parsing - -* [Documentation](https://docs.spring.io/spring-ai/reference/concepts.html#_output_parsing) -* [Usage examples](https://github.com/spring-projects/spring-ai/blob/main/spring-ai-openai/src/test/java/org/springframework/ai/openai/client/ClientIT.java) - -The output of AI models traditionally arrives as a java.util.String, even if you ask for the reply to be in JSON. It may be the correct JSON, but it isn’t a JSON data structure. It is just a string. Also, asking "for JSON" as part of the prompt isn’t 100% accurate. - -This intricacy has led to the emergence of a specialized field involving the creation of prompts to yield the intended output, followed by parsing the resulting simple string into a usable data structure for application integration. - -Output parsing employs meticulously crafted prompts, often necessitating multiple interactions with the model to achieve the desired formatting. - -This challenge has prompted OpenAI to introduce 'OpenAI Functions' as a means to specify the desired output format from the model precisely. diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 0882f72a0f..99e2b5f7a7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -37,8 +37,8 @@ public class QianWenChatClientTests { QianWenApi qianWenApi = new QianWenApi("sk-Zsd81gZYg7", QianWenChatModal.QWEN_72B_CHAT); QianWenOptions qianWenOptions = new QianWenOptions(); qianWenOptions.setTopP(0.8F); - qianWenOptions.setTopK(3); - qianWenOptions.setTemperature(0.6F); +// qianWenOptions.setTopK(3); TODO 芋艿:临时处理 +// qianWenOptions.setTemperature(0.6F); TODO 芋艿:临时处理 qianWenChatClient = new QianWenChatClient( qianWenApi, qianWenOptions diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java index ba439c683c..6944eed705 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.framework.ai.openAiImage; -import org.springframework.ai.models.openai.OpenAiImageApi; -import org.springframework.ai.models.openai.OpenAiImageClient; -import org.springframework.ai.models.openai.OpenAiImageOptions; import org.springframework.ai.image.ImagePrompt; import org.springframework.ai.image.ImageResponse; import org.junit.Before; import org.junit.Test; +import org.springframework.ai.openai.OpenAiImageClient; +import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.openai.api.OpenAiImageApi; import javax.imageio.ImageIO; import javax.swing.*; @@ -29,8 +29,8 @@ public class OpenAiImageClientTests { public void setup() { // 初始化 openAiImageClient this.openAiImageClient = new OpenAiImageClient( - new OpenAiImageApi(""), - new OpenAiImageOptions().setResponseFormat(OpenAiImageOptions.ResponseFormatEnum.URL.getValue()) + new OpenAiImageApi("") +// new OpenAiImageOptions().setResponseFormat(OpenAiImageOptions.ResponseFormatEnum.URL.getValue()) TODO 芋艿:临时处理 ); } -- Gitee From 9ef669141feefd7b314e51f88fc2a1666c7f7c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=AB=98?= <171376172@qq.com> Date: Fri, 17 May 2024 03:08:09 +0000 Subject: [PATCH 0552/1557] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=B0=E5=BD=95i?= =?UTF-8?q?nfra=5Fapi=5Faccess=5Flog=E6=96=B9=E6=B3=95=EF=BC=8C=E6=88=AA?= =?UTF-8?q?=E5=8F=96=E5=8F=82=E6=95=B0=E6=9C=80=E9=95=BF8000=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高高 <171376172@qq.com> --- .../infra/dal/dataobject/logger/ApiAccessLogDO.java | 10 ++++++++++ .../infra/dal/dataobject/logger/ApiErrorLogDO.java | 6 ++++++ .../infra/service/logger/ApiAccessLogServiceImpl.java | 6 ++++++ .../infra/service/logger/ApiErrorLogServiceImpl.java | 3 +++ 4 files changed, 25 insertions(+) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java index d4850fcc82..4f671c70a9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java @@ -26,6 +26,16 @@ import java.time.LocalDateTime; @AllArgsConstructor public class ApiAccessLogDO extends BaseDO { + /** + * {@link #requestParams} 的最大长度 + */ + public static final Integer REQUEST_PARAMS_MAX_LENGTH = 8000; + + /** + * {@link #resultMsg} 的最大长度 + */ + public static final Integer RESULT_MSG_MAX_LENGTH = 512; + /** * 编号 */ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiErrorLogDO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiErrorLogDO.java index 7dc0409819..af48f073f9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiErrorLogDO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiErrorLogDO.java @@ -25,6 +25,12 @@ import java.time.LocalDateTime; @KeySequence(value = "infra_api_error_log_seq") public class ApiErrorLogDO extends BaseDO { + + /** + * {@link #requestParams} 的最大长度 + */ + public static final Integer REQUEST_PARAMS_MAX_LENGTH = 8000; + /** * 编号 */ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java index aa393b3120..446f99e6ec 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.net.redstone.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogPageReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO; @@ -13,6 +14,9 @@ import org.springframework.validation.annotation.Validated; import jakarta.annotation.Resource; import java.time.LocalDateTime; +import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiAccessLogDO.REQUEST_PARAMS_MAX_LENGTH; +import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiAccessLogDO.RESULT_MSG_MAX_LENGTH; + /** * API 访问日志 Service 实现类 * @@ -29,6 +33,8 @@ public class ApiAccessLogServiceImpl implements ApiAccessLogService { @Override public void createApiAccessLog(ApiAccessLogCreateReqDTO createDTO) { ApiAccessLogDO apiAccessLog = BeanUtils.toBean(createDTO, ApiAccessLogDO.class); + apiAccessLog.setRequestParams(StrUtils.maxLength(apiAccessLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); + apiAccessLog.setResultMsg(StrUtils.maxLength(apiAccessLog.getResultMsg(), RESULT_MSG_MAX_LENGTH)); apiAccessLogMapper.insert(apiAccessLog); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java index 456a3cc7ac..679b0114c2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.net.redstone.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO; @@ -15,6 +16,7 @@ import jakarta.annotation.Resource; import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiErrorLogDO.REQUEST_PARAMS_MAX_LENGTH; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; /** @@ -34,6 +36,7 @@ public class ApiErrorLogServiceImpl implements ApiErrorLogService { public void createApiErrorLog(ApiErrorLogCreateReqDTO createDTO) { ApiErrorLogDO apiErrorLog = BeanUtils.toBean(createDTO, ApiErrorLogDO.class) .setProcessStatus(ApiErrorLogProcessStatusEnum.INIT.getStatus()); + apiErrorLog.setRequestParams(StrUtils.maxLength(apiErrorLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); apiErrorLogMapper.insert(apiErrorLog); } -- Gitee From 9de9e938bf6d113aac62f419e7db35518e8b4536 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 17 May 2024 22:16:57 +0800 Subject: [PATCH 0553/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E5=A2=9E=E5=8A=A0=20ollama=20=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 6 +++ .../ai/service/impl/AiChatServiceImpl.java | 2 +- .../yudao-spring-boot-starter-ai/pom.xml | 6 +++ .../ai/core/enums/AiPlatformEnum.java | 37 +++++++++---------- .../src/main/resources/application.yaml | 8 ++++ 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index e15eff5904..f93cdc9c7c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -6,6 +6,7 @@ import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.models.tongyi.QianWenChatClient; import org.springframework.ai.models.xinghuo.XingHuoChatClient; import org.springframework.ai.models.yiyan.YiYanChatClient; +import org.springframework.ai.ollama.OllamaChatClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; @@ -36,12 +37,17 @@ public class AiChatClientFactory { // TODO yunai 要不再加一个接口,让他们拥有 ChatClient、StreamingChatClient 功能 public StreamingChatClient getStreamingChatClient(AiPlatformEnum platformEnum) { +// if (true) { +// return applicationContext.getBean(OllamaChatClient.class); +// } if (AiPlatformEnum.QIAN_WEN == platformEnum) { return applicationContext.getBean(QianWenChatClient.class); } else if (AiPlatformEnum.YI_YAN == platformEnum) { return applicationContext.getBean(YiYanChatClient.class); } else if (AiPlatformEnum.XING_HUO == platformEnum) { return applicationContext.getBean(XingHuoChatClient.class); + } else if (AiPlatformEnum.OLLAMA == platformEnum) { + return applicationContext.getBean(OllamaChatClient.class); } throw new IllegalArgumentException("不支持的 chat client!"); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 1ab160bfc1..6a6febfba1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -127,7 +127,7 @@ public class AiChatServiceImpl implements AiChatService { // 1.1 校验对话存在 AiChatConversationDO conversation = chatConversationService.validateExists(sendReqVO.getConversationId()); if (ObjUtil.notEqual(conversation.getUserId(), userId)) { - throw exception(CHAT_CONVERSATION_NOT_EXISTS); + throw exception(CHAT_CONVERSATION_NOT_EXISTS); // TODO 芋艿:异常情况的对接; } // 1.2 校验模型 AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 2188ad9085..5efa911263 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -24,6 +24,12 @@ 1.0.3 + + io.springboot.ai + spring-ai-ollama-spring-boot-starter + 1.0.3 + + cn.iocoder.boot yudao-common diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index 590797d175..e9e1f418e2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -1,11 +1,8 @@ package cn.iocoder.yudao.framework.ai.core.enums; -import com.google.common.collect.Lists; import lombok.AllArgsConstructor; import lombok.Getter; -import java.util.List; - // TODO 芋艿:这块,看看要不要调整下; /** * ai 模型平台 @@ -17,29 +14,31 @@ import java.util.List; @AllArgsConstructor public enum AiPlatformEnum { + OPENAI("OpenAI", "OpenAI"), + OLLAMA("dall", "dall"), + YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), - OPENAI("OpenAI", "OpenAI"), OPEN_AI_DALL("dall", "dall"), - MIDJOURNEY("midjourney", "midjourney"), + MIDJOURNEY("Ollama", "Ollama"), ; - private String platform; - private String name; - - public static List CHAT_PLATFORM_LIST = Lists.newArrayList( - AiPlatformEnum.YI_YAN, - AiPlatformEnum.QIAN_WEN, - AiPlatformEnum.XING_HUO, - AiPlatformEnum.OPENAI - ); - - public static List IMAGE_PLATFORM_LIST = Lists.newArrayList( - AiPlatformEnum.OPEN_AI_DALL, - AiPlatformEnum.MIDJOURNEY - ); + private final String platform; + private final String name; + +// public static List CHAT_PLATFORM_LIST = Lists.newArrayList( +// AiPlatformEnum.YI_YAN, +// AiPlatformEnum.QIAN_WEN, +// AiPlatformEnum.XING_HUO, +// AiPlatformEnum.OPENAI +// ); +// +// public static List IMAGE_PLATFORM_LIST = Lists.newArrayList( +// AiPlatformEnum.OPEN_AI_DALL, +// AiPlatformEnum.MIDJOURNEY +// ); public static AiPlatformEnum validatePlatform(String platform) { for (AiPlatformEnum platformEnum : AiPlatformEnum.values()) { diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 6cb5386e3d..886644e74c 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -142,6 +142,14 @@ spring: listener: missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错 +--- #################### AI 相关配置 #################### + +spring.ai: + ollama: + base-url: http://127.0.0.1:11434 + chat: + model: llama3 + --- #################### 芋道相关配置 #################### yudao: -- Gitee From 275d1fb6275f18806158f4faba06baac34159011 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 17 May 2024 22:25:50 +0800 Subject: [PATCH 0554/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E7=AE=80=E5=8C=96=20AiChatMessageDO=20=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=A1=A8=EF=BC=8C=E5=8E=BB=E9=99=A4=20tokens=E3=80=81?= =?UTF-8?q?temperature=E3=80=81maxTokens=E3=80=81maxContexts=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E5=9B=A0=E4=B8=BA=20spring-ai=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E8=BF=94=E5=9B=9E=20tokens=20=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/message/AiChatMessageAddReqVO.java | 20 ----------- .../vo/message/AiChatMessageAddRespVO.java | 17 --------- .../chat/vo/message/AiChatMessageRespVO.java | 9 ----- .../dal/dataobject/chat/AiChatMessageDO.java | 25 ------------- .../ai/service/impl/AiChatServiceImpl.java | 36 +++++-------------- 5 files changed, 9 insertions(+), 98 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java deleted file mode 100644 index 994472d031..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddReqVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -@Schema(description = "管理后台 - AI 聊天消息发送 Request VO") -@Data -public class AiChatMessageAddReqVO { - - @Schema(description = "聊天对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "聊天对话编号不能为空") - private Long conversationId; - - @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "帮我写个 Java 算法") - @NotEmpty(message = "聊天内容不能为空") - private String content; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java deleted file mode 100644 index 70cfb5b400..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageAddRespVO.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - AI 聊天消息 Add Response VO") -@Data -public class AiChatMessageAddRespVO { - - @Schema(description = "用户信息") - private AiChatMessageRespVO userMessage; - - @Schema(description = "系统信息") - private AiChatMessageRespVO systemMessage; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index c4863c7356..9cd27dd3ae 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -21,9 +21,6 @@ public class AiChatMessageRespVO { @Schema(description = "用户编号", example = "4096") private Long userId; // 仅当 user 发送时非空 - @Schema(description = "用户头像", example = "http://xxx") - private Long avatarUrl; // 仅当 user 发送时非空 - @Schema(description = "角色编号", example = "888") private Long roleId; // 仅当 assistant 回复时非空 @@ -33,15 +30,9 @@ public class AiChatMessageRespVO { @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123") private Long modelId; - @Schema(description = "模型图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "123") - private String modelImage; - @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") private String content; - @Schema(description = "消耗 Token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "80") - private Integer tokens; - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") private LocalDateTime createTime; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 831b7622da..994947724f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -78,32 +78,7 @@ public class AiChatMessageDO extends BaseDO { * 聊天内容 */ private String content; - /** - * 消耗 Token 数量 - */ - private Integer tokens; // TODO 芋艿:是否作为上下文语料?use_context,待定 - // ========== 会话配置 ========== - - /** - * 温度参数 - * - * 冗余 {@link AiChatConversationDO#getTemperature()} - */ - private Double temperature; - /** - * 单条回复的最大 Token 数量 - * - * 冗余 {@link AiChatConversationDO#getMaxTokens()} - */ - private Integer maxTokens; - /** - * 上下文的最大 Message 数量 - * - * 冗余 {@link AiChatConversationDO#getMaxContexts()} - */ - private Integer maxContexts; - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 6a6febfba1..1e9ff242a5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -9,7 +9,6 @@ import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.MessageType; -import org.springframework.ai.chat.prompt.ChatOptionsBuilder; import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; @@ -72,8 +71,7 @@ public class AiChatServiceImpl implements AiChatService { AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); // 保存 chat message insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), req.getContent(), - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + chatModel.getModel(), chatModel.getId(), req.getContent()); String content = null; int tokens = 0; try { @@ -94,28 +92,21 @@ public class AiChatServiceImpl implements AiChatService { } finally { // 保存 chat message insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), content, - tokens, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + chatModel.getModel(), chatModel.getId(), content); } return new AiChatMessageRespVO().setContent(content); } private AiChatMessageDO insertChatMessage(Long conversationId, MessageType messageType, Long loginUserId, Long roleId, - String model, Long modelId, String content, Integer tokens, Double temperature, - Integer maxTokens, Integer maxContexts) { + String model, Long modelId, String content) { AiChatMessageDO insertChatMessageDO = new AiChatMessageDO() - .setId(null) .setConversationId(conversationId) .setType(messageType.getValue()) .setUserId(loginUserId) .setRoleId(roleId) .setModel(model) .setModelId(modelId) - .setContent(content) - .setTokens(tokens) - .setTemperature(temperature) - .setMaxTokens(maxTokens) - .setMaxContexts(maxContexts); + .setContent(content); insertChatMessageDO.setCreateTime(LocalDateTime.now()); // 增加 chat message 记录 aiChatMessageMapper.insert(insertChatMessageDO); @@ -134,15 +125,13 @@ public class AiChatServiceImpl implements AiChatService { AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); StreamingChatClient chatClient = chatClientFactory.getStreamingChatClient(platform); - // 2. 插入 user 发送消息 TODO tokens 计算 + // 2. 插入 user 发送消息 AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, userId, conversation.getRoleId(), - conversation.getModel(), conversation.getId(), sendReqVO.getContent(), - null, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + conversation.getModel(), conversation.getId(), sendReqVO.getContent()); // 3.1 插入 system 接收消息 AiChatMessageDO systemMessage = insertChatMessage(conversation.getId(), MessageType.SYSTEM, userId, conversation.getRoleId(), - conversation.getModel(), conversation.getId(), conversation.getSystemMessage(), - 0, conversation.getTemperature(), conversation.getMaxTokens(), conversation.getMaxContexts()); + conversation.getModel(), conversation.getId(), conversation.getSystemMessage()); // 3.2 创建 chat 需要的 Prompt // TODO 消息上下文 Prompt prompt = new Prompt(sendReqVO.getContent()); @@ -150,11 +139,8 @@ public class AiChatServiceImpl implements AiChatService { Flux streamResponse = chatClient.stream(prompt); // 3.3 转换 flex AiChatMessageRespVO StringBuffer contentBuffer = new StringBuffer(); - AtomicInteger tokens = new AtomicInteger(0); // TODO token 计算不对; return streamResponse.map(res -> { contentBuffer.append(res.getResult().getOutput().getContent()); - tokens.incrementAndGet(); - AiChatMessageSendRespVO.Message send = new AiChatMessageSendRespVO.Message().setId(userMessage.getId()) .setType(MessageType.USER.getValue()).setCreateTime(userMessage.getCreateTime()) .setContent(sendReqVO.getContent()); @@ -167,17 +153,13 @@ public class AiChatServiceImpl implements AiChatService { // 保存 chat message aiChatMessageMapper.updateById(new AiChatMessageDO() .setId(systemMessage.getId()) - .setContent(contentBuffer.toString()) - .setTokens(tokens.get()) - ); + .setContent(contentBuffer.toString())); }).doOnError(throwable -> { log.error("发送错误 {}!", throwable.getMessage()); // 更新错误信息 TODO 貌似不应该更新异常 aiChatMessageMapper.updateById(new AiChatMessageDO() .setId(systemMessage.getId()) - .setContent(throwable.getMessage()) - .setTokens(tokens.get()) - ); + .setContent(throwable.getMessage())); }); } -- Gitee From 276ef98ff1b0387559225efb276f5509fc175873 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 00:16:56 +0800 Subject: [PATCH 0555/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9Aconversation=20=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=B8=8B=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/vo/message/AiChatMessageRespVO.java | 4 +- .../dal/dataobject/chat/AiChatMessageDO.java | 4 - .../ai/service/impl/AiChatServiceImpl.java | 184 +++++++++--------- .../ai/core/enums/AiPlatformEnum.java | 4 +- 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index 9cd27dd3ae..49c7ee54be 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -19,10 +19,10 @@ public class AiChatMessageRespVO { private String type; // 参见 MessageType 枚举类 @Schema(description = "用户编号", example = "4096") - private Long userId; // 仅当 user 发送时非空 + private Long userId; @Schema(description = "角色编号", example = "888") - private Long roleId; // 仅当 assistant 回复时非空 + private Long roleId; @Schema(description = "模型标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "gpt-3.5-turbo") private String model; // 参见 AiOpenAiModelEnum 枚举类 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 994947724f..c665376731 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -47,16 +47,12 @@ public class AiChatMessageDO extends BaseDO { /** * 用户编号 * - * 仅当 user 发送时非空 - * * 关联 AdminUserDO 的 userId 字段 */ private Long userId; /** * 角色编号 * - * 仅当 assistant 回复时非空 - * * 关联 {@link AiChatRoleDO#getId()} 字段 */ private Long roleId; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 1e9ff242a5..335c20789d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.ai.service.impl; -import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.messages.MessageType; +import org.springframework.ai.chat.messages.*; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.ChatOptionsBuilder; import org.springframework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; @@ -30,10 +29,7 @@ import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; +import java.util.*; import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -53,64 +49,49 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatClientFactory chatClientFactory; - private final AiChatMessageMapper aiChatMessageMapper; + private final AiChatMessageMapper chatMessageMapper; + private final AiChatConversationService chatConversationService; private final AiChatModelService chatModalService; private final AiChatRoleService chatRoleService; @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - // 查询对话 - AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); - // 获取对话模型 - AiChatModelDO chatModel = chatModalService.validateChatModel(conversation.getModelId()); - // 获取角色信息 - AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; - // 获取 client 类型 - AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); - // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), req.getContent()); - String content = null; - int tokens = 0; - try { - // 创建 chat 需要的 Prompt - Prompt prompt = new Prompt(req.getContent()); - // TODO @芋艿 @范 看要不要支持这些 -// req.setTopK(req.getTopK()); -// req.setTopP(req.getTopP()); -// req.setTemperature(req.getTemperature()); - // 发送 call 调用 - ChatClient chatClient = chatClientFactory.getChatClient(platformEnum); - ChatResponse call = chatClient.call(prompt); - content = call.getResult().getOutput().getContent(); - tokens = call.getResults().size(); - // 更新 conversation - } catch (Exception e) { - content = ExceptionUtil.getMessage(e); - } finally { - // 保存 chat message - insertChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), - chatModel.getModel(), chatModel.getId(), content); - } - return new AiChatMessageRespVO().setContent(content); - } - - private AiChatMessageDO insertChatMessage(Long conversationId, MessageType messageType, Long loginUserId, Long roleId, - String model, Long modelId, String content) { - AiChatMessageDO insertChatMessageDO = new AiChatMessageDO() - .setConversationId(conversationId) - .setType(messageType.getValue()) - .setUserId(loginUserId) - .setRoleId(roleId) - .setModel(model) - .setModelId(modelId) - .setContent(content); - insertChatMessageDO.setCreateTime(LocalDateTime.now()); - // 增加 chat message 记录 - aiChatMessageMapper.insert(insertChatMessageDO); - return insertChatMessageDO; + return null; // TODO 芋艿:一起改 +// Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); +// // 查询对话 +// AiChatConversationDO conversation = chatConversationService.validateExists(req.getConversationId()); +// // 获取对话模型 +// AiChatModelDO chatModel = chatModalService.validateChatModel(conversation.getModelId()); +// // 获取角色信息 +// AiChatRoleDO chatRoleDO = conversation.getRoleId() != null ? chatRoleService.validateChatRole(conversation.getRoleId()) : null; +// // 获取 client 类型 +// AiPlatformEnum platformEnum = AiPlatformEnum.validatePlatform(chatModel.getPlatform()); +// // 保存 chat message +// createChatMessage(conversation.getId(), MessageType.USER, loginUserId, conversation.getRoleId(), +// chatModel.getModel(), chatModel.getId(), req.getContent()); +// String content = null; +// int tokens = 0; +// try { +// // 创建 chat 需要的 Prompt +// Prompt prompt = new Prompt(req.getContent()); +// // TODO @芋艿 @范 看要不要支持这些 +//// req.setTopK(req.getTopK()); +//// req.setTopP(req.getTopP()); +//// req.setTemperature(req.getTemperature()); +// // 发送 call 调用 +// ChatClient chatClient = chatClientFactory.getChatClient(platformEnum); +// ChatResponse call = chatClient.call(prompt); +// content = call.getResult().getOutput().getContent(); +// // 更新 conversation +// } catch (Exception e) { +// content = ExceptionUtil.getMessage(e); +// } finally { +// // 保存 chat message +// createChatMessage(conversation.getId(), MessageType.SYSTEM, loginUserId, conversation.getRoleId(), +// chatModel.getModel(), chatModel.getId(), content); +// } +// return new AiChatMessageRespVO().setContent(content); } @Override @@ -120,55 +101,78 @@ public class AiChatServiceImpl implements AiChatService { if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); // TODO 芋艿:异常情况的对接; } + List historyMessages = chatMessageMapper.selectByConversationId(conversation.getId()); // 1.2 校验模型 AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); StreamingChatClient chatClient = chatClientFactory.getStreamingChatClient(platform); // 2. 插入 user 发送消息 - AiChatMessageDO userMessage = insertChatMessage(conversation.getId(), MessageType.USER, userId, conversation.getRoleId(), - conversation.getModel(), conversation.getId(), sendReqVO.getContent()); + AiChatMessageDO userMessage = createChatMessage(conversation.getId(), model, + userId, conversation.getRoleId(), MessageType.USER, sendReqVO.getContent()); + + // 3.1 插入 assistant 接收消息 + AiChatMessageDO assistantMessage = createChatMessage(conversation.getId(), model, + userId, conversation.getRoleId(), MessageType.ASSISTANT, ""); - // 3.1 插入 system 接收消息 - AiChatMessageDO systemMessage = insertChatMessage(conversation.getId(), MessageType.SYSTEM, userId, conversation.getRoleId(), - conversation.getModel(), conversation.getId(), conversation.getSystemMessage()); // 3.2 创建 chat 需要的 Prompt // TODO 消息上下文 - Prompt prompt = new Prompt(sendReqVO.getContent()); -// ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build() + Prompt prompt = buildPrompt(conversation, historyMessages, sendReqVO); Flux streamResponse = chatClient.stream(prompt); - // 3.3 转换 flex AiChatMessageRespVO + + // 3.3 流式返回 StringBuffer contentBuffer = new StringBuffer(); - return streamResponse.map(res -> { - contentBuffer.append(res.getResult().getOutput().getContent()); - AiChatMessageSendRespVO.Message send = new AiChatMessageSendRespVO.Message().setId(userMessage.getId()) - .setType(MessageType.USER.getValue()).setCreateTime(userMessage.getCreateTime()) - .setContent(sendReqVO.getContent()); - AiChatMessageSendRespVO.Message receive = new AiChatMessageSendRespVO.Message().setId(systemMessage.getId()) - .setType(MessageType.SYSTEM.getValue()).setCreateTime(systemMessage.getCreateTime()) - .setContent(res.getResult().getOutput().getContent()); - return new AiChatMessageSendRespVO().setSend(send).setReceive(receive); + return streamResponse.map(response -> { + String newContent = response.getResult().getOutput().getContent(); + contentBuffer.append(newContent); + // 响应结果 + return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class)) + .setReceive(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent)); }).doOnComplete(() -> { - log.info("发送完成!"); - // 保存 chat message - aiChatMessageMapper.updateById(new AiChatMessageDO() - .setId(systemMessage.getId()) - .setContent(contentBuffer.toString())); + chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { - log.error("发送错误 {}!", throwable.getMessage()); - // 更新错误信息 TODO 貌似不应该更新异常 - aiChatMessageMapper.updateById(new AiChatMessageDO() - .setId(systemMessage.getId()) - .setContent(throwable.getMessage())); + log.error("[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]", userId, sendReqVO, throwable); + chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())); }); } + private Prompt buildPrompt(AiChatConversationDO conversation, List messages, AiChatMessageSendReqVO sendReqVO) { + // TODO 芋艿:1)保留 n 个上下文;2)每一轮 token 数量 +// if (conversation.getMaxContexts() != null && messages.size() > conversation.getMaxContexts()) { +// +// } + // 1. 构建 Prompt Message 列表 + List chatMessages = new ArrayList<>(); + // 1.1 system context 角色设定 + chatMessages.add(new SystemMessage(conversation.getSystemMessage())); + // 1.2 history message 历史消息 + messages.forEach(message -> chatMessages.add(new ChatMessage(message.getType().toUpperCase(), message.getContent()))); + // 1.3 user message 新发送消息 + chatMessages.add(new UserMessage(sendReqVO.getContent())); + + // 2. 构建 ChatOptions 对象 + ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); + return new Prompt(chatMessages, chatOptions); + } + + private AiChatMessageDO createChatMessage(Long conversationId, AiChatModelDO model, + Long userId, Long roleId, + MessageType messageType, String content) { + AiChatMessageDO message = new AiChatMessageDO() + .setConversationId(conversationId).setModel(model.getModel()).setModelId(model.getId()) + .setUserId(userId).setRoleId(roleId) + .setType(messageType.getValue()).setContent(content); + message.setCreateTime(LocalDateTime.now()); + chatMessageMapper.insert(message); + return message; + } + @Override public List getMessageListByConversationId(Long conversationId) { // 校验对话是否存在 chatConversationService.validateExists(conversationId); // 获取对话所有 message - List aiChatMessageDOList = aiChatMessageMapper.selectByConversationId(conversationId); + List aiChatMessageDOList = chatMessageMapper.selectByConversationId(conversationId); // 获取模型信息 Set modalIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getModelId).collect(Collectors.toSet()); List modalList = chatModalService.getModalByIds(modalIds); @@ -187,7 +191,7 @@ public class AiChatServiceImpl implements AiChatService { @Override public Boolean deleteMessage(Long id) { - return aiChatMessageMapper.deleteById(id) > 0; + return chatMessageMapper.deleteById(id) > 0; } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index e9e1f418e2..66228ff22b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -15,13 +15,13 @@ import lombok.Getter; public enum AiPlatformEnum { OPENAI("OpenAI", "OpenAI"), - OLLAMA("dall", "dall"), + OLLAMA("Ollama", "Ollama"), YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), OPEN_AI_DALL("dall", "dall"), - MIDJOURNEY("Ollama", "Ollama"), + MIDJOURNEY("midjourney", "midjourney"), ; -- Gitee From 04021ce0682c9eea39cb2c06ac081d3c5c615db6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 09:34:17 +0800 Subject: [PATCH 0556/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E6=96=87=E5=BF=83=E4=B8=80?= =?UTF-8?q?=E8=A8=80=E7=9A=84=E6=8E=A5=E5=85=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 6 +- .../AiChatConversationRespVO.java | 8 +- .../module/ai/dal/vo/AiChatModalConfigVO.java | 2 +- .../ai/service/impl/AiChatServiceImpl.java | 6 +- .../service/model/AiChatRoleServiceImpl.java | 5 +- .../yudao-spring-boot-starter-ai/pom.xml | 13 +- .../ai/config/YudaoAiAutoConfiguration.java | 8 +- .../ai/config/YudaoAiImageProperties.java | 2 +- .../ai/config/YudaoAiProperties.java | 2 +- .../ai/core/enums/AiPlatformEnum.java | 2 +- .../framework/ai/core/model/package-info.java | 12 ++ .../ai/core/model}/yiyan/YiYanChatClient.java | 128 +++++++++--------- .../core/model/yiyan/YiYanChatOptions.java} | 42 ++---- .../ai/core/model}/yiyan/api/YiYanApi.java | 75 +++++----- .../model/yiyan/api/YiYanAuthResponse.java} | 10 +- .../yiyan/api/YiYanChatCompletionRequest.java | 12 +- .../api/YiYanChatCompletionResponse.java} | 11 +- .../core/model/yiyan/api}/YiYanChatModel.java | 28 ++-- .../yiyan/exception/YiYanApiException.java | 2 +- .../ai/models/tongyi/QianWenChatClient.java | 2 +- .../yiyan/api/YiYanChatCompletionMessage.java | 8 -- .../framework/ai/chat/YiYanChatTests.java | 10 +- .../src/main/resources/application-local.yaml | 11 -- .../src/main/resources/application.yaml | 13 ++ 24 files changed, 205 insertions(+), 213 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/package-info.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/yiyan/YiYanChatClient.java (45%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/yiyan/YiYanOptions.java => cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java} (82%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/yiyan/api/YiYanApi.java (57%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/yiyan/api/YiYanAuthRes.java => cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanAuthResponse.java} (78%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/yiyan/api/YiYanChatCompletionRequest.java (95%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java => cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionResponse.java} (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models/yiyan => cn/iocoder/yudao/framework/ai/core/model/yiyan/api}/YiYanChatModel.java (65%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/yiyan/exception/YiYanApiException.java (79%) delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index f93cdc9c7c..d5863dbc2e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -5,7 +5,7 @@ import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.models.tongyi.QianWenChatClient; import org.springframework.ai.models.xinghuo.XingHuoChatClient; -import org.springframework.ai.models.yiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import org.springframework.ai.ollama.OllamaChatClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; @@ -27,7 +27,7 @@ public class AiChatClientFactory { public ChatClient getChatClient(AiPlatformEnum platformEnum) { if (AiPlatformEnum.QIAN_WEN == platformEnum) { return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YI_YAN == platformEnum) { + } else if (AiPlatformEnum.YIYAN == platformEnum) { return applicationContext.getBean(YiYanChatClient.class); } else if (AiPlatformEnum.XING_HUO == platformEnum) { return applicationContext.getBean(XingHuoChatClient.class); @@ -42,7 +42,7 @@ public class AiChatClientFactory { // } if (AiPlatformEnum.QIAN_WEN == platformEnum) { return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YI_YAN == platformEnum) { + } else if (AiPlatformEnum.YIYAN == platformEnum) { return applicationContext.getBean(YiYanChatClient.class); } else if (AiPlatformEnum.XING_HUO == platformEnum) { return applicationContext.getBean(XingHuoChatClient.class); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index 78cd713657..e670ef9f94 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -1,20 +1,14 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; -import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; import com.fhs.core.trans.anno.Trans; import com.fhs.core.trans.constant.TransType; import com.fhs.core.trans.vo.VO; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; import lombok.Data; -import lombok.experimental.Accessors; import java.time.LocalDateTime; -import java.time.LocalTime; @Schema(description = "管理后台 - AI 聊天会话 Response VO") @Data @@ -58,7 +52,7 @@ public class AiChatConversationRespVO implements VO { @Schema(description = "上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer maxContexts; - @Schema(description = "最后更新时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-16") + @Schema(description = "最后更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime updateTime; // ========== 关联 role 信息 ========== diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java index ed5ecf2179..723e5338fb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.ai.models.xinghuo.XingHuoChatModel; -import org.springframework.ai.models.yiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; /** * modal config diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 335c20789d..b56b166486 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -150,9 +150,9 @@ public class AiChatServiceImpl implements AiChatService { // 1.3 user message 新发送消息 chatMessages.add(new UserMessage(sendReqVO.getContent())); - // 2. 构建 ChatOptions 对象 - ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); - return new Prompt(chatMessages, chatOptions); + // 2. 构建 ChatOptions 对象 TODO 芋艿:临时注释掉;等文心一言兼容了; +// ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); + return new Prompt(chatMessages, null); } private AiChatMessageDO createChatMessage(Long conversationId, AiChatModelDO model, diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 4372003d09..cf6bcec969 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service.model; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -15,6 +16,8 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; +import java.util.function.Function; +import java.util.function.Predicate; import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -134,7 +137,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public List getChatRoleCategoryList() { List list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); - return convertList(list.stream().filter(Objects::nonNull).collect(Collectors.toList()), AiChatRoleDO::getCategory); + return convertList(list, AiChatRoleDO::getCategory, role -> StrUtil.isNotBlank(role.getCategory())); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 5efa911263..37813feb71 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -10,23 +10,16 @@ yudao-spring-boot-starter-ai - io.springboot.ai - spring-ai-core - 1.0.3 - - - io.springboot.ai - spring-ai-openai + spring-ai-ollama-spring-boot-starter 1.0.3 - io.springboot.ai - spring-ai-ollama-spring-boot-starter + spring-ai-openai-spring-boot-starter 1.0.3 @@ -35,7 +28,7 @@ yudao-common - + com.alibaba dashscope-sdk-java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index b37938d4aa..67226ec602 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -8,9 +8,9 @@ import org.springframework.ai.models.tongyi.api.QianWenApi; import org.springframework.ai.models.xinghuo.XingHuoChatClient; import org.springframework.ai.models.xinghuo.XingHuoOptions; import org.springframework.ai.models.xinghuo.api.XingHuoApi; -import org.springframework.ai.models.yiyan.YiYanChatClient; -import org.springframework.ai.models.yiyan.YiYanOptions; -import org.springframework.ai.models.yiyan.api.YiYanApi; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; import org.springframework.ai.models.midjourney.MidjourneyConfig; import org.springframework.ai.models.midjourney.MidjourneyMessage; import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; @@ -91,7 +91,7 @@ public class YudaoAiAutoConfiguration { public YiYanChatClient yiYanChatClient(YudaoAiProperties yudaoAiProperties) { YudaoAiProperties.YiYanProperties yiYanProperties = yudaoAiProperties.getYiyan(); // 转换配置 - YiYanOptions yiYanOptions = new YiYanOptions(); + YiYanChatOptions yiYanOptions = new YiYanChatOptions(); // yiYanOptions.setTopK(yiYanProperties.getTopK()); TODO 芋艿:后续弄 yiYanOptions.setTopP(yiYanProperties.getTopP()); yiYanOptions.setTemperature(yiYanProperties.getTemperature()); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java index 1f17a12037..1e6d9d9ec0 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.models.xinghuo.XingHuoChatModel; import org.springframework.ai.models.xinghuo.XingHuoOptions; -import org.springframework.ai.models.yiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index a228a00454..62bd1318df 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.models.xinghuo.XingHuoChatModel; -import org.springframework.ai.models.yiyan.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index 66228ff22b..cd60cc990c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -16,8 +16,8 @@ public enum AiPlatformEnum { OPENAI("OpenAI", "OpenAI"), OLLAMA("Ollama", "Ollama"), + YIYAN("YiYan", "文心一言"), - YI_YAN("yiyan", "一言"), QIAN_WEN("qianwen", "千问"), XING_HUO("xinghuo", "星火"), OPEN_AI_DALL("dall", "dall"), diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/package-info.java new file mode 100644 index 0000000000..8a193f7df8 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/package-info.java @@ -0,0 +1,12 @@ +/** + * model 包,接入各种大模型,对标 https://github.com/spring-projects/spring-ai/tree/main/models + * + * 1. yiyan 包:【百度】文心一言 + * 2. TODO 芋艿: + * tongyi 包:【阿里】通义千问,对标 spring-cloud-alibaba 提供的 ai 包 + * 2.2 + * 2.3 xinghuo 包:【讯飞】星火,自己实现 + * 2.4 openai 包:【OpenAI】ChatGPT,拷贝 spring-ai 提供的 models/openai 包 + * 2.5 midjourney 包:Midjourney,参考 https://github.com/novicezk/midjourney-proxy 实现 + */ +package cn.iocoder.yudao.framework.ai.core.model; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java similarity index 45% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java index e0da409ecd..a613af6db2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java @@ -1,23 +1,26 @@ -package org.springframework.ai.models.yiyan; +package cn.iocoder.yudao.framework.ai.core.model.yiyan; import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.framework.ai.core.exception.ChatException; -import org.springframework.ai.chat.*; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatCompletionResponse; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.exception.YiYanApiException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.chat.ChatClient; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.Generation; +import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.Message; import org.springframework.ai.chat.messages.MessageType; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.yiyan.api.YiYanApi; -import org.springframework.ai.models.yiyan.api.YiYanChatCompletion; -import org.springframework.ai.models.yiyan.api.YiYanChatCompletionRequest; -import org.springframework.ai.models.yiyan.exception.YiYanApiException; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; import org.springframework.retry.RetryListener; import org.springframework.retry.support.RetryTemplate; +import org.springframework.util.Assert; import reactor.core.publisher.Flux; import java.time.Duration; @@ -25,134 +28,127 @@ import java.util.List; import java.util.stream.Collectors; /** - * 文心一言 - *

- * author: fansili - * time: 2024/3/8 19:11 + * 文心一言的 {@link ChatClient} 实现类 + * + * @author fansili */ @Slf4j public class YiYanChatClient implements ChatClient, StreamingChatClient { - private YiYanApi yiYanApi; + private final YiYanApi yiYanApi; + + private YiYanChatOptions defaultOptions; - private YiYanOptions yiYanOptions; + // TODO @fan:参考 OpenAiChatClient 调整下 retryTemplate;使用 RetryUtils.DEFAULT_RETRY_TEMPLATE;加允许传入? public YiYanChatClient(YiYanApi yiYanApi) { this.yiYanApi = yiYanApi; + // TODO @fan:这个情况,是不是搞个 defaultOptions;OpenAiChatOptions.builder().withModel(OpenAiApi.DEFAULT_CHAT_MODEL).withTemperature(0.7f).build() } - public YiYanChatClient(YiYanApi yiYanApi, YiYanOptions yiYanOptions) { + public YiYanChatClient(YiYanApi yiYanApi, YiYanChatOptions defaultOptions) { + Assert.notNull(yiYanApi, "OllamaApi must not be null"); + Assert.notNull(defaultOptions, "DefaultOptions must not be null"); this.yiYanApi = yiYanApi; - this.yiYanOptions = yiYanOptions; + this.defaultOptions = defaultOptions; } public final RetryTemplate retryTemplate = RetryTemplate.builder() - // 最大重试次数 10 .maxAttempts(10) .retryOn(YiYanApiException.class) - // 最大重试5次,第一次间隔3000ms,第二次3000ms * 2,第三次3000ms * 3,以此类推,最大间隔3 * 60000ms .exponentialBackoff(Duration.ofMillis(3000), 2, Duration.ofMillis(3 * 60000)) .withListener(new RetryListener() { + @Override - public void onError(RetryContext context, - RetryCallback callback, Throwable throwable) { + public void onError(RetryContext context, + RetryCallback callback, Throwable throwable) { log.warn("重试异常:" + context.getRetryCount(), throwable); } - ; }) .build(); - @Override - public String call(String message) { - return ChatClient.super.call(message); - } - @Override public ChatResponse call(Prompt prompt) { + YiYanChatCompletionRequest request = createRequest(prompt, false); return this.retryTemplate.execute(ctx -> { - // ctx 会有重试的信息 - // 创建 request 请求,stream模式需要供应商支持 - YiYanChatCompletionRequest request = this.createRequest(prompt, false); - // 调用 callWithFunctionSupport 发送请求 - ResponseEntity response = yiYanApi.chatCompletionEntity(request); + // 发送请求 + ResponseEntity response = yiYanApi.chatCompletionEntity(request); // 获取结果封装 ChatResponse - YiYanChatCompletion chatCompletion = response.getBody(); + YiYanChatCompletionResponse chatCompletion = response.getBody(); + // TODO @fan:为空时,参考 OpenAiChatClient 的封装; + // TODO @fan:chatResponseMetadata,参考 OpenAiChatResponseMetadata.from(completionEntity.getBody()) return new ChatResponse(List.of(new Generation(chatCompletion.getResult()))); }); } @Override public Flux stream(Prompt prompt) { - // ctx 会有重试的信息 - // 创建 request 请求,stream模式需要供应商支持 YiYanChatCompletionRequest request = this.createRequest(prompt, true); + // TODO @fan:return this.retryTemplate.execute(ctx -> { // 调用 callWithFunctionSupport 发送请求 - Flux response = this.yiYanApi.chatCompletionStream(request); + Flux response = this.yiYanApi.chatCompletionStream(request); + // TODO @fan:下面的 doOnComplete 是不是可以删除哈? response.doOnComplete(new Runnable() { @Override public void run() { String a = ";"; } }); - return response.map(res -> { - // TODO @fan:这里缺少了 usage 的封装 - return new ChatResponse(List.of(new Generation(res.getResult()))); + return response.map(chunk -> { + // TODO @fan:ChatResponseMetadata chatResponseMetadata + return new ChatResponse(List.of(new Generation(chunk.getResult()))); }); } private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { - // 获取配置 - YiYanOptions useOptions = getYiYanOptions(prompt); - // 创建 request - - // tip: 百度的 system 不在 message 里面 - // tip:百度的 message 只有 user 和 assistant - // https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t - - // 获取 user 和 assistant + // 参考 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t 文档,system 是独立字段 + // 1.1 获取 user 和 assistant List messageList = prompt.getInstructions().stream() // 过滤 system .filter(msg -> MessageType.SYSTEM != msg.getMessageType()) - .map(msg -> new YiYanChatCompletionRequest.Message() - .setRole(msg.getMessageType().getValue()) - .setContent(msg.getContent()) + .map(message -> new YiYanChatCompletionRequest.Message() + .setRole(message.getMessageType().getValue()).setContent(message.getContent()) ).toList(); - // 获取 system + // 1.2 获取 system String systemPrompt = prompt.getInstructions().stream() - .filter(msg -> MessageType.SYSTEM == msg.getMessageType()) + .filter(message -> MessageType.SYSTEM == message.getMessageType()) .map(Message::getContent) .collect(Collectors.joining()); + // 3. 创建 request YiYanChatCompletionRequest request = new YiYanChatCompletionRequest(messageList); - // 复制 qianWenOptions 属性取 request(这里 options 属性和 request 基本保持一致) - // top: 由于遵循 spring-ai规范,支持在构建client的时候传入默认的 chatOptions + // 复制 YiYanOptions 属性,到 request 中(这里 options 属性和 request 基本保持一致) + YiYanChatOptions useOptions = getYiYanOptions(prompt); BeanUtil.copyProperties(useOptions, request); - request.setTop_p(useOptions.getTopP()); - request.setMax_output_tokens(useOptions.getMaxOutputTokens()); - request.setTemperature(useOptions.getTemperature()); - request.setSystem(systemPrompt); - // 设置 stream - request.setStream(stream); + request.setTop_p(useOptions.getTopP()) + .setMax_output_tokens(useOptions.getMaxOutputTokens()) + .setTemperature(useOptions.getTemperature()) + .setSystem(systemPrompt) + .setStream(stream); return request; } - private @NotNull YiYanOptions getYiYanOptions(Prompt prompt) { + // TODO @fan:Options 的处理,参考下 OpenAiChatClient 的 createRequest + private YiYanChatOptions getYiYanOptions(Prompt prompt) { // 两个都为null 则没有配置文件 - if (yiYanOptions == null && prompt.getOptions() == null) { + if (defaultOptions == null && prompt.getOptions() == null) { + // TODO @fan:IllegalArgumentException 参数更好哈 throw new ChatException("ChatOptions 未配置参数!"); } // 优先使用 Prompt 里面的 ChatOptions - ChatOptions options = yiYanOptions; + ChatOptions options = defaultOptions; if (prompt.getOptions() != null) { options = (ChatOptions) prompt.getOptions(); } // Prompt 里面是一个 ChatOptions,用户可以随意传入,这里做一下判断 - if (!(options instanceof YiYanOptions)) { + if (!(options instanceof YiYanChatOptions)) { + // TODO @fan:IllegalArgumentException 参数更好哈 + // TODO @fan:需要兼容 ChatOptionsBuilder 创建出来的 throw new ChatException("Prompt 传入的不是 YiYanOptions!"); } // 转换 YiYanOptions - YiYanOptions useOptions = (YiYanOptions) options; - return useOptions; + return (YiYanChatOptions) options; } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java similarity index 82% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java index 0cb1481b34..14146a3226 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java @@ -1,23 +1,22 @@ -package org.springframework.ai.models.yiyan; +package cn.iocoder.yudao.framework.ai.core.model.yiyan; -import org.springframework.ai.chat.prompt.ChatOptions; -import org.springframework.ai.models.yiyan.api.YiYanChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatCompletionRequest; import lombok.Data; -import lombok.experimental.Accessors; +import org.springframework.ai.chat.prompt.ChatOptions; import java.util.List; +// TODO @fan:字段命名,penalty_score 类似的,建议改成驼峰原则 +// TODO @fan:字段的注释,可以都删除掉,让用户 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t 即可 /** - * 百度 问心一言 + * 文心一言的 {@link ChatOptions} 实现类 * - * 文档地址:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t + * 字段说明:参考 ERNIE-4.0-8K * - * author: fansili - * time: 2024/3/16 19:33 + * @author fansili */ @Data -@Accessors(chain = true) -public class YiYanOptions implements ChatOptions { +public class YiYanChatOptions implements ChatOptions { /** * 一个可触发函数的描述列表,说明: @@ -106,37 +105,24 @@ public class YiYanOptions implements ChatOptions { */ private String tool_choice; - // - // 以下兼容 spring-ai ChatOptions 暂时没有其他地方用到 - @Override public Float getTemperature() { return this.temperature; } -// @Override -// public void setTemperature(Float temperature) { -// this.temperature = temperature; -// } - @Override public Float getTopP() { return topP; } -// @Override -// public void setTopP(Float topP) { -// this.topP = topP; -// } - - // 百度么有 topK - + /** + * 百度么有 topK + * + * @return null + */ @Override public Integer getTopK() { return null; } -// @Override -// public void setTopK(Integer topK) { -// } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java similarity index 57% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java index a8f4aa3222..535901f25c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java @@ -1,8 +1,6 @@ -package org.springframework.ai.models.yiyan.api; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.api; -import org.springframework.ai.models.yiyan.YiYanChatModel; -import org.springframework.ai.models.yiyan.exception.YiYanApiException; -import lombok.Data; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.exception.YiYanApiException; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import org.springframework.web.reactive.function.client.WebClient; @@ -10,47 +8,55 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** - * 文心一言 - *

- * author: fansili - * time: 2024/3/8 21:47 + * 文心一言 API + * + * @author fansili */ -@Data public class YiYanApi { private static final String DEFAULT_BASE_URL = "https://aip.baidubce.com"; private static final String AUTH_2_TOKEN_URI = "/oauth/2.0/token"; - public static final String DEFAULT_CHAT_MODEL = "ERNIE 4.0"; + public static final String DEFAULT_CHAT_MODEL = YiYanChatModel.ERNIE4_0.getModel(); - // 获取access_token流程 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5 - private String appKey; - private String secretKey; - private String token; - // token刷新时间(秒) + private final String appKey; + private final String secretKey; + /** + * TODO fan:这个是不是要有个刷新机制哈;如果目前不需要,可以删除掉 refreshTokenSecondTime;整体更简洁; + */ + private final String token; + /** + * token 刷新时间(秒) + */ private int refreshTokenSecondTime; - // 发送请求 webClient + /** + * 发送请求 webClient + */ private final WebClient webClient; - // 使用的模型 - private YiYanChatModel useChatModel; + /** + * 使用的模型 + */ + private final YiYanChatModel useChatModel; public YiYanApi(String appKey, String secretKey, YiYanChatModel useChatModel, int refreshTokenSecondTime) { this.appKey = appKey; this.secretKey = secretKey; this.useChatModel = useChatModel; this.refreshTokenSecondTime = refreshTokenSecondTime; - - this.webClient = WebClient.builder() - .baseUrl(DEFAULT_BASE_URL) - .build(); - + this.webClient = WebClient.builder().baseUrl(DEFAULT_BASE_URL).build(); + // 获取访问令牌 token = getToken(); } + /** + * 获得访问令牌 + * + * @see 文档地址 + * @return 访问令牌 + */ private String getToken() { - // 文档地址: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5 - ResponseEntity response = this.webClient.post() + ResponseEntity response = this.webClient.post() .uri(uriBuilder -> uriBuilder.path(AUTH_2_TOKEN_URI) .queryParam("grant_type", "client_credentials") .queryParam("client_id", appKey) @@ -58,17 +64,19 @@ public class YiYanApi { .build() ) .retrieve() - .toEntity(YiYanAuthRes.class) + .toEntity(YiYanAuthResponse.class) .block(); // 检查请求状态 - if (HttpStatusCode.valueOf(200) != response.getStatusCode()) { + // TODO @fan:可以使用 response.getStatusCode().is2xxSuccessful() + if (HttpStatusCode.valueOf(200) != response.getStatusCode() + || response.getBody() == null) { + // TODO @fan:可以使用 IllegalStateException 替代;另外,最好打印下返回;方便排错; throw new YiYanApiException("一言认证失败! api:https://aip.baidubce.com/oauth/2.0/token 请检查 client_id、client_secret 是否正确!"); } - YiYanAuthRes body = response.getBody(); - return body.getAccess_token(); + return response.getBody().getAccess_token(); } - public ResponseEntity chatCompletionEntity(YiYanChatCompletionRequest request) { + public ResponseEntity chatCompletionEntity(YiYanChatCompletionRequest request) { // TODO: 2024/3/10 小范 这里错误信息返回的结构不一样 // {"error_code":17,"error_msg":"Open api daily request limit reached"} return this.webClient.post() @@ -78,11 +86,11 @@ public class YiYanApi { .build()) .body(Mono.just(request), YiYanChatCompletionRequest.class) .retrieve() - .toEntity(YiYanChatCompletion.class) + .toEntity(YiYanChatCompletionResponse.class) .block(); } - public Flux chatCompletionStream(YiYanChatCompletionRequest request) { + public Flux chatCompletionStream(YiYanChatCompletionRequest request) { return this.webClient.post() .uri(uriBuilder -> uriBuilder.path(useChatModel.getUri()) @@ -90,6 +98,7 @@ public class YiYanApi { .build()) .body(Mono.just(request), YiYanChatCompletionRequest.class) .retrieve() - .bodyToFlux(YiYanChatCompletion.class); + .bodyToFlux(YiYanChatCompletionResponse.class); } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanAuthResponse.java similarity index 78% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanAuthResponse.java index f9f1f27dbb..134b339942 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanAuthRes.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanAuthResponse.java @@ -1,15 +1,15 @@ -package org.springframework.ai.models.yiyan.api; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.api; import lombok.Data; +// TODO @fan:字段驼峰;字段注释都可以删除,贴个链接就好; /** - * 一言 获取access_token + * 获取文心一言的 access_token 的 Response * - * author: fansili - * time: 2024/3/10 08:51 + * @author fansili */ @Data -public class YiYanAuthRes { +public class YiYanAuthResponse { /** * 访问凭证 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionRequest.java similarity index 95% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionRequest.java index 22e9188351..2501318547 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionRequest.java @@ -1,16 +1,16 @@ -package org.springframework.ai.models.yiyan.api; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.api; import lombok.Data; import java.util.List; +// TODO @fan:字段驼峰;字段注释都可以删除,贴个链接就好; /** - * 一言 Completion req + * 文心一言 Completion Request * - * 百度千帆文档:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11 + * 百度千帆文档:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11 * - * author: fansili - * time: 2024/3/9 10:34 + * @author fansili */ @Data public class YiYanChatCompletionRequest { @@ -114,9 +114,11 @@ public class YiYanChatCompletionRequest { @Data public static class Message { + private String role; private String content; + } @Data diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionResponse.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionResponse.java index 8e02db6592..5082302f8f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatCompletionResponse.java @@ -1,16 +1,16 @@ -package org.springframework.ai.models.yiyan.api; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.api; import lombok.Data; /** - * 聊天返回 + * 文心一言 Completion Response + * * 百度链接: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t * - * author: fansili - * time: 2024/3/9 10:34 + * @author fansili */ @Data -public class YiYanChatCompletion { +public class YiYanChatCompletionResponse { /** * 本轮对话的id @@ -88,4 +88,5 @@ public class YiYanChatCompletion { */ private int total_tokens; } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatModel.java similarity index 65% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatModel.java index abed185e62..9b400cdadc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/YiYanChatModel.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanChatModel.java @@ -1,15 +1,14 @@ -package org.springframework.ai.models.yiyan; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.api; import lombok.AllArgsConstructor; import lombok.Getter; /** - * 一言模型 + * 文心一言的模型枚举 * - * 可参考百度文档:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t + * 可参考 百度文档 * - * author: fansili - * time: 2024/3/9 12:01 + * @author fansili */ @Getter @AllArgsConstructor @@ -18,21 +17,24 @@ public enum YiYanChatModel { ERNIE4_0("ERNIE 4.0", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro"), ERNIE4_3_5_8K("ERNIE-3.5-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions"), ERNIE4_3_5_8K_0205("ERNIE-3.5-8K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-0205"), - ERNIE4_3_5_8K_1222("ERNIE-3.5-8K-1222", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-1222"), ERNIE4_BOT_8K("ERNIE-Bot-8K", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie_bot_8k"), ERNIE4_3_5_4K_0205("ERNIE-3.5-4K-0205", "/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-4k-0205"), - ; - private String model; - - private String uri; + /** + * 模型名 + */ + private final String model; + /** + * API URL + */ + private final String uri; public static YiYanChatModel valueOfModel(String model) { - for (YiYanChatModel itemEnum : YiYanChatModel.values()) { - if (itemEnum.getModel().equals(model)) { - return itemEnum; + for (YiYanChatModel modelEnum : YiYanChatModel.values()) { + if (modelEnum.getModel().equals(model)) { + return modelEnum; } } throw new IllegalArgumentException("Invalid MessageType value: " + model); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/exception/YiYanApiException.java similarity index 79% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/exception/YiYanApiException.java index 94850f56a2..f61badfcb2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/exception/YiYanApiException.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/exception/YiYanApiException.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.yiyan.exception; +package cn.iocoder.yudao.framework.ai.core.model.yiyan.exception; /** * 一言 api 调用异常 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java index f038bc83e9..31e60d119b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java @@ -5,7 +5,7 @@ import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; import org.springframework.ai.models.tongyi.api.QianWenApi; -import org.springframework.ai.models.yiyan.exception.YiYanApiException; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.exception.YiYanApiException; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; import com.alibaba.dashscope.common.Message; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java deleted file mode 100644 index 278b1a7d6b..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/yiyan/api/YiYanChatCompletionMessage.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.springframework.ai.models.yiyan.api; - -/** - * author: fansili - * time: 2024/3/9 10:37 - */ -public class YiYanChatCompletionMessage { -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java index f54ae39c8b..55d16eab96 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/YiYanChatTests.java @@ -5,10 +5,10 @@ import org.springframework.ai.chat.messages.Message; import org.springframework.ai.chat.messages.SystemMessage; import org.springframework.ai.chat.messages.UserMessage; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.yiyan.YiYanChatClient; -import org.springframework.ai.models.yiyan.YiYanChatModel; -import org.springframework.ai.models.yiyan.YiYanOptions; -import org.springframework.ai.models.yiyan.api.YiYanApi; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; @@ -35,7 +35,7 @@ public class YiYanChatTests { YiYanChatModel.ERNIE4_3_5_8K, 86400 ); - YiYanOptions yiYanOptions = new YiYanOptions(); + YiYanChatOptions yiYanOptions = new YiYanChatOptions(); yiYanOptions.setMaxOutputTokens(2048); yiYanOptions.setTopP(0.6f); yiYanOptions.setTemperature(0.85f); diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 2f5e70b27e..93302bddfe 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -230,17 +230,6 @@ yudao: appKey: cb6415c19d6162cda07b47316fcb0416 secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh model: XING_HUO_3_5 - yiyan: - enable: true - aiPlatform: YI_YAN - max-tokens: 1500 - temperature: 0.85 - topP: 0.8 - topK: 0 - appKey: x0cuLZ7XsaTCU08vuJWO87Lg - secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK - refreshTokenSecondTime: 86400 - model: ERNIE4_3_5_8K openAiImage: enable: true api-key: ${OPEN_AI_KEY} diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 886644e74c..52dea3fda8 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -150,6 +150,19 @@ spring.ai: chat: model: llama3 +yudao.ai: + yiyan: + enable: true + aiPlatform: YIYAN # TODO @fan:建议每个都独立配置属性类 + max-tokens: 1500 + temperature: 0.85 + topP: 0.8 + topK: 0 + appKey: x0cuLZ7XsaTCU08vuJWO87Lg + secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK + refreshTokenSecondTime: 86400 + model: ERNIE4_3_5_8K + --- #################### 芋道相关配置 #################### yudao: -- Gitee From 645dfae003c723dd268ce0cacc0f0bfaea1a8314 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 10:15:40 +0800 Subject: [PATCH 0557/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9A=E8=AE=AF=E9=A3=9E=E6=98=9F?= =?UTF-8?q?=E7=81=AB=E7=9A=84=E6=8E=A5=E5=85=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 6 ++-- .../module/ai/dal/vo/AiChatModalConfigVO.java | 2 +- .../ai/config/YudaoAiAutoConfiguration.java | 6 ++-- .../ai/config/YudaoAiImageProperties.java | 4 +-- .../ai/config/YudaoAiProperties.java | 3 +- .../ai/core/enums/AiPlatformEnum.java | 13 ++++++-- .../model}/xinghuo/XingHuoChatClient.java | 9 +++--- .../core/model}/xinghuo/XingHuoChatModel.java | 2 +- .../core/model}/xinghuo/XingHuoOptions.java | 2 +- .../core/model}/xinghuo/api/XingHuoApi.java | 5 +-- .../xinghuo/api/XingHuoChatCompletion.java | 2 +- .../api/XingHuoChatCompletionMessage.java | 2 +- .../api/XingHuoChatCompletionRequest.java | 2 +- .../ai/chat/XingHuoChatClientMainTests.java | 4 +-- .../ai/chat/XingHuoChatClientTests.java | 8 ++--- .../framework/ai/chat/XingHuoOkHttpTests.java | 6 ++-- .../src/main/resources/application-local.yaml | 31 ------------------- .../src/main/resources/application.yaml | 31 ++++++++++++++++++- 18 files changed, 72 insertions(+), 66 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/XingHuoChatClient.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/XingHuoChatModel.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/XingHuoOptions.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/api/XingHuoApi.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/api/XingHuoChatCompletion.java (93%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/api/XingHuoChatCompletionMessage.java (61%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/xinghuo/api/XingHuoChatCompletionRequest.java (97%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index d5863dbc2e..14dc2b8b50 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.models.tongyi.QianWenChatClient; -import org.springframework.ai.models.xinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import org.springframework.ai.ollama.OllamaChatClient; import org.springframework.beans.factory.annotation.Autowired; @@ -27,7 +27,7 @@ public class AiChatClientFactory { public ChatClient getChatClient(AiPlatformEnum platformEnum) { if (AiPlatformEnum.QIAN_WEN == platformEnum) { return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YIYAN == platformEnum) { + } else if (AiPlatformEnum.YI_YAN == platformEnum) { return applicationContext.getBean(YiYanChatClient.class); } else if (AiPlatformEnum.XING_HUO == platformEnum) { return applicationContext.getBean(XingHuoChatClient.class); @@ -42,7 +42,7 @@ public class AiChatClientFactory { // } if (AiPlatformEnum.QIAN_WEN == platformEnum) { return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YIYAN == platformEnum) { + } else if (AiPlatformEnum.YI_YAN == platformEnum) { return applicationContext.getBean(YiYanChatClient.class); } else if (AiPlatformEnum.XING_HUO == platformEnum) { return applicationContext.getBean(XingHuoChatClient.class); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java index 723e5338fb..4ed060e224 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.dal.vo; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import lombok.Data; import lombok.experimental.Accessors; -import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 67226ec602..13f8f71eda 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -5,9 +5,9 @@ import org.springframework.ai.models.tongyi.QianWenChatClient; import org.springframework.ai.models.tongyi.QianWenChatModal; import org.springframework.ai.models.tongyi.QianWenOptions; import org.springframework.ai.models.tongyi.api.QianWenApi; -import org.springframework.ai.models.xinghuo.XingHuoChatClient; -import org.springframework.ai.models.xinghuo.XingHuoOptions; -import org.springframework.ai.models.xinghuo.api.XingHuoApi; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java index 1e6d9d9ec0..ebae45ff16 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiImageProperties.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import org.springframework.ai.models.xinghuo.XingHuoChatModel; -import org.springframework.ai.models.xinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 62bd1318df..16a6bc40ee 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; @@ -21,7 +21,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "yudao.ai") public class YudaoAiProperties { - private String initSource; private QianWenProperties qianwen; private XingHuoProperties xinghuo; private YiYanProperties yiyan; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index cd60cc990c..a85fffe9a8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -16,16 +16,23 @@ public enum AiPlatformEnum { OPENAI("OpenAI", "OpenAI"), OLLAMA("Ollama", "Ollama"), - YIYAN("YiYan", "文心一言"), + YI_YAN("YiYan", "文心一言"), // 百度 + XING_HUO("XingHuo", "星火"), // 讯飞 + + QIAN_WEN("qianwen", "千问"), // 阿里 - QIAN_WEN("qianwen", "千问"), - XING_HUO("xinghuo", "星火"), OPEN_AI_DALL("dall", "dall"), MIDJOURNEY("midjourney", "midjourney"), ; + /** + * 平台 + */ private final String platform; + /** + * 平台名 + */ private final String name; // public static List CHAT_PLATFORM_LIST = Lists.newArrayList( diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatClient.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatClient.java index 0010a75fa2..5537fc1eb2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatClient.java @@ -1,14 +1,14 @@ -package org.springframework.ai.models.xinghuo; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.exceptions.ExceptionUtil; import cn.iocoder.yudao.framework.ai.core.exception.ChatException; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletionRequest; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.xinghuo.api.XingHuoApi; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.retry.RetryCallback; @@ -21,6 +21,7 @@ import java.time.Duration; import java.util.List; import java.util.stream.Collectors; +// TODO @fan:参考 yiyan 的修改建议,调整下 xinghuo 的实现;可以等 yiyan 修改完建议,然后我 review 完,再改这个哈; /** * 讯飞星火 client *

diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatModel.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatModel.java index 859e41c037..e9ef5ef35d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoChatModel.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoChatModel.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.xinghuo; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java index bdc6710925..cb47538334 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/XingHuoOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.xinghuo; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo; import org.springframework.ai.chat.prompt.ChatOptions; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoApi.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoApi.java index 027e8a2d27..b267de84cd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoApi.java @@ -1,8 +1,8 @@ -package org.springframework.ai.models.xinghuo.api; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo.api; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import org.springframework.ai.models.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; import lombok.Data; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; @@ -21,6 +21,7 @@ import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; +// TODO @fan:讯飞使用 spring websocket 接入,还是 okhttp?确认了,未使用的最好删除下,反正 git 也能找回 history /** * 讯飞星火 属性、api *

diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletion.java similarity index 93% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletion.java index e419d522ea..46aff8717a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletion.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.xinghuo.api; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo.api; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionMessage.java similarity index 61% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionMessage.java index f0e0f8d1ec..f527b10d49 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionMessage.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.xinghuo.api; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo.api; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionRequest.java similarity index 97% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionRequest.java index 3f2b211ff8..f3ca1eb306 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/xinghuo/api/XingHuoChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/api/XingHuoChatCompletionRequest.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.xinghuo.api; +package cn.iocoder.yudao.framework.ai.core.model.xinghuo.api; import lombok.Data; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java index 77cf9effcd..524bd3e0d2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientMainTests.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletionRequest; import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; import org.springframework.web.reactive.socket.client.WebSocketClient; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java index 44793907ea..8d9cb38e0a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoChatClientTests.java @@ -5,10 +5,10 @@ import org.springframework.ai.chat.messages.Message; import org.springframework.ai.chat.messages.SystemMessage; import org.springframework.ai.chat.messages.UserMessage; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.xinghuo.XingHuoChatClient; -import org.springframework.ai.models.xinghuo.XingHuoChatModel; -import org.springframework.ai.models.xinghuo.XingHuoOptions; -import org.springframework.ai.models.xinghuo.api.XingHuoApi; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import org.junit.Before; import org.junit.Test; import reactor.core.publisher.Flux; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java index f45f964125..5a087412b3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/XingHuoOkHttpTests.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.framework.ai.chat; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import org.springframework.ai.models.xinghuo.XingHuoChatClient; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletion; -import org.springframework.ai.models.xinghuo.api.XingHuoChatCompletionRequest; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletion; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoChatCompletionRequest; import okhttp3.*; import org.jetbrains.annotations.NotNull; diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 93302bddfe..99c888f31c 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -209,37 +209,6 @@ wx: # 芋道配置项,设置当前项目所有自定义的配置 yudao: - ai: - initSource: yaml - qianwen: - enable: true - aiPlatform: QIAN_WEN - max-tokens: 1500 - temperature: 0.85 - topP: 0.8 - topK: 0 - api-key: sk-Zsd81gZYg7 - xinghuo: - enable: true - aiPlatform: XING_HUO - max-tokens: 1500 - temperature: 0.85 - topP: 0.8 - topK: 0 - appId: 13c8cca6 - appKey: cb6415c19d6162cda07b47316fcb0416 - secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh - model: XING_HUO_3_5 - openAiImage: - enable: true - api-key: ${OPEN_AI_KEY} - model: dall_e_2 - style: vivid - midjourney: - enable: true - token: MTE4MjE3MjY2MjkxNTY3ODIzOA.GEV1SG.c49F8lZoGCUHwsj8O0UdodmM6nyQHvuD2fXflw - guild-id: 1237948819677904956 - channel-id: 1237948819677904960 captcha: enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试; security: diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 52dea3fda8..549fd9edd6 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -153,7 +153,7 @@ spring.ai: yudao.ai: yiyan: enable: true - aiPlatform: YIYAN # TODO @fan:建议每个都独立配置属性类 + aiPlatform: YI_YAN # TODO @fan:建议每个都独立配置属性类 max-tokens: 1500 temperature: 0.85 topP: 0.8 @@ -162,6 +162,35 @@ yudao.ai: secretKey: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK refreshTokenSecondTime: 86400 model: ERNIE4_3_5_8K + xinghuo: + enable: true + aiPlatform: XING_HUO # TODO @fan:建议每个都独立配置属性类 + max-tokens: 1500 + temperature: 0.85 + topP: 0.8 + topK: 0 + appId: 13c8cca6 + appKey: cb6415c19d6162cda07b47316fcb0416 + secretKey: Y2JiYTIxZjA3MDMxMjNjZjQzYzVmNzdh + model: XING_HUO_3_5 + qianwen: + enable: true + aiPlatform: QIAN_WEN + max-tokens: 1500 + temperature: 0.85 + topP: 0.8 + topK: 0 + api-key: sk-Zsd81gZYg7 + openAiImage: + enable: true + api-key: ${OPEN_AI_KEY} + model: dall_e_2 + style: vivid + midjourney: + enable: true + token: MTE4MjE3MjY2MjkxNTY3ODIzOA.GEV1SG.c49F8lZoGCUHwsj8O0UdodmM6nyQHvuD2fXflw + guild-id: 1237948819677904956 + channel-id: 1237948819677904960 --- #################### 芋道相关配置 #################### -- Gitee From f4a0058e88ab97b6c4af52a155ff1975dd7129b5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 10:36:25 +0800 Subject: [PATCH 0558/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9Aqwen=20=E7=9A=84=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/config/AiChatClientFactory.java | 2 +- .../framework/ai/config/YudaoAiAutoConfiguration.java | 8 ++++---- .../yudao/framework/ai/core/enums/AiPlatformEnum.java | 6 ++---- .../ai/core/model}/tongyi/QianWenChatClient.java | 6 +++--- .../framework/ai/core/model}/tongyi/QianWenChatModal.java | 2 +- .../framework/ai/core/model}/tongyi/QianWenOptions.java | 2 +- .../framework/ai/core/model}/tongyi/api/QianWenApi.java | 4 ++-- .../ai/core/model}/tongyi/api/QianWenChatCompletion.java | 2 +- .../model}/tongyi/api/QianWenChatCompletionMessage.java | 2 +- .../model}/tongyi/api/QianWenChatCompletionRequest.java | 2 +- .../framework/ai/core/model}/tongyi/package-info.java | 2 +- .../yudao/framework/ai/chat/QianWenChatClientTests.java | 8 ++++---- 12 files changed, 22 insertions(+), 24 deletions(-) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/QianWenChatClient.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/QianWenChatModal.java (96%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/QianWenOptions.java (98%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/api/QianWenApi.java (94%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/api/QianWenChatCompletion.java (60%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/api/QianWenChatCompletionMessage.java (61%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/api/QianWenChatCompletionRequest.java (82%) rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/{org/springframework/ai/models => cn/iocoder/yudao/framework/ai/core/model}/tongyi/package-info.java (85%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index 14dc2b8b50..e7a64c2142 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.models.tongyi.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import org.springframework.ai.ollama.OllamaChatClient; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 13f8f71eda..f942b12bd2 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.ai.config; import cn.hutool.core.io.IoUtil; -import org.springframework.ai.models.tongyi.QianWenChatClient; -import org.springframework.ai.models.tongyi.QianWenChatModal; -import org.springframework.ai.models.tongyi.QianWenOptions; -import org.springframework.ai.models.tongyi.api.QianWenApi; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index a85fffe9a8..fc41069a92 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -5,10 +5,9 @@ import lombok.Getter; // TODO 芋艿:这块,看看要不要调整下; /** - * ai 模型平台 + * AI 模型平台 * - * author: fansili - * time: 2024/3/11 10:12 + * @author fansili */ @Getter @AllArgsConstructor @@ -18,7 +17,6 @@ public enum AiPlatformEnum { OLLAMA("Ollama", "Ollama"), YI_YAN("YiYan", "文心一言"), // 百度 XING_HUO("XingHuo", "星火"), // 讯飞 - QIAN_WEN("qianwen", "千问"), // 阿里 OPEN_AI_DALL("dall", "dall"), diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java index 31e60d119b..85fa771bd1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java @@ -1,10 +1,10 @@ -package org.springframework.ai.models.tongyi; +package cn.iocoder.yudao.framework.ai.core.model.tongyi; import cn.iocoder.yudao.framework.ai.core.exception.ChatException; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; import org.springframework.ai.chat.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.tongyi.api.QianWenApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.exception.YiYanApiException; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; @@ -24,6 +24,7 @@ import java.time.Duration; import java.util.List; import java.util.stream.Collectors; +// TODO @芋艿:暂时不需要重构;等 spring cloud alibaba 的 ai 发布最新的 /** * 阿里 通义千问 client *

@@ -39,7 +40,6 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenOptions qianWenOptions; - public QianWenChatClient() { } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatModal.java similarity index 96% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatModal.java index 9474a8df59..e1cbcd5ded 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenChatModal.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatModal.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.tongyi; +package cn.iocoder.yudao.framework.ai.core.model.tongyi; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java similarity index 98% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java index 39db366082..b6dba53c96 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/QianWenOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.tongyi; +package cn.iocoder.yudao.framework.ai.core.model.tongyi; import org.springframework.ai.chat.prompt.ChatOptions; import lombok.Data; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenApi.java similarity index 94% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenApi.java index 2e905114f1..6d3e7cd41e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenApi.java @@ -1,6 +1,6 @@ -package org.springframework.ai.models.tongyi.api; +package cn.iocoder.yudao.framework.ai.core.model.tongyi.api; -import org.springframework.ai.models.tongyi.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; import cn.iocoder.yudao.framework.ai.core.exception.AiException; import com.alibaba.dashscope.aigc.generation.Generation; import com.alibaba.dashscope.aigc.generation.GenerationResult; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletion.java similarity index 60% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletion.java index 1c3c6109b5..1e7748ddcb 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletion.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletion.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.tongyi.api; +package cn.iocoder.yudao.framework.ai.core.model.tongyi.api; /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionMessage.java similarity index 61% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionMessage.java index 4e5d02323a..318829bb49 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionMessage.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionMessage.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.tongyi.api; +package cn.iocoder.yudao.framework.ai.core.model.tongyi.api; /** * author: fansili diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionRequest.java similarity index 82% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionRequest.java index 04b69848fd..b1d72d15f6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/api/QianWenChatCompletionRequest.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/api/QianWenChatCompletionRequest.java @@ -1,4 +1,4 @@ -package org.springframework.ai.models.tongyi.api; +package cn.iocoder.yudao.framework.ai.core.model.tongyi.api; import com.alibaba.dashscope.aigc.generation.models.QwenParam; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/package-info.java similarity index 85% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/package-info.java index 8d7793b342..11ed0c1133 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/tongyi/package-info.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/package-info.java @@ -8,4 +8,4 @@ * author: fansili * time: 2024/3/13 21:05 */ -package org.springframework.ai.models.tongyi; \ No newline at end of file +package cn.iocoder.yudao.framework.ai.core.model.tongyi; \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java index 99e2b5f7a7..a003d1bb77 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/QianWenChatClientTests.java @@ -4,10 +4,10 @@ import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.messages.SystemMessage; import org.springframework.ai.chat.messages.UserMessage; import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.models.tongyi.QianWenChatClient; -import org.springframework.ai.models.tongyi.QianWenChatModal; -import org.springframework.ai.models.tongyi.QianWenOptions; -import org.springframework.ai.models.tongyi.api.QianWenApi; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; import com.alibaba.dashscope.aigc.generation.GenerationResult; import com.alibaba.dashscope.aigc.generation.models.QwenParam; import com.alibaba.dashscope.common.Message; -- Gitee From fa9328112dcf130b82fbd92ed2039add2dbfbad6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 12:28:43 +0800 Subject: [PATCH 0559/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9Aopenai=20=E6=8E=A5=E5=85=A5=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 3 +++ .../ai/service/impl/AiChatServiceImpl.java | 7 ++++-- .../src/main/resources/application.properties | 11 ---------- .../openAiImage/OpenAiImageClientTests.java | 22 +++++++++++++++++++ .../src/main/resources/application.yaml | 7 ++++++ 5 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java index e7a64c2142..5efd264a97 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import org.springframework.ai.ollama.OllamaChatClient; +import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; @@ -48,6 +49,8 @@ public class AiChatClientFactory { return applicationContext.getBean(XingHuoChatClient.class); } else if (AiPlatformEnum.OLLAMA == platformEnum) { return applicationContext.getBean(OllamaChatClient.class); + } else if (AiPlatformEnum.OPENAI == platformEnum) { + return applicationContext.getBean(OpenAiChatClient.class); } throw new IllegalArgumentException("不支持的 chat client!"); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index b56b166486..9fd80d1c6a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; @@ -123,7 +124,8 @@ public class AiChatServiceImpl implements AiChatService { // 3.3 流式返回 StringBuffer contentBuffer = new StringBuffer(); return streamResponse.map(response -> { - String newContent = response.getResult().getOutput().getContent(); + String newContent = response.getResult() != null ? response.getResult().getOutput().getContent() : null; + newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); // 响应结果 return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class)) @@ -152,7 +154,8 @@ public class AiChatServiceImpl implements AiChatService { // 2. 构建 ChatOptions 对象 TODO 芋艿:临时注释掉;等文心一言兼容了; // ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); - return new Prompt(chatMessages, null); +// return new Prompt(chatMessages, null); + return new Prompt(chatMessages); } private AiChatMessageDO createChatMessage(Long conversationId, AiChatModelDO model, diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties deleted file mode 100644 index 6ec2672e60..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/application.properties +++ /dev/null @@ -1,11 +0,0 @@ -# open ai TODO @fansili?????????????? - -# openAI https://openai.com/ -spring.ai.openai.api-key=${OPEN_AI_KEY} -spring.ai.openai.chat.options.model=gpt-3.5-turbo -spring.ai.openai.chat.options.temperature=0.7 -#spring.ai.vectorstore.milvus.client.connect-timeout-ms=50000 -#spring.ai.vectorstore.milvus.client.keep-alive-timeout-ms=50000 -#spring.ai.vectorstore.milvus.client.keep-alive-time-ms=80000 -#spring.ai.vectorstore.pinecone.server-side-timeout=100s - diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java index 6944eed705..bf184a8496 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java @@ -4,9 +4,12 @@ import org.springframework.ai.image.ImagePrompt; import org.springframework.ai.image.ImageResponse; import org.junit.Before; import org.junit.Test; +import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.openai.api.OpenAiApi; import org.springframework.ai.openai.api.OpenAiImageApi; +import reactor.core.publisher.Flux; import javax.imageio.ImageIO; import javax.swing.*; @@ -15,6 +18,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Base64; import java.util.Scanner; +import java.util.function.Function; /** * author: fansili @@ -66,4 +70,22 @@ public class OpenAiImageClientTests { return null; } } + + public static void main(String[] args) { +// OpenAiApi api = new OpenAiApi("https://api.gptsapi.net", "sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z"); +// OpenAiApi api = new OpenAiApi("https://openkey.cloud", "sk-QmgIIPc5xiYd8lPb076b1b7774Ea49Af9eD2Ef172c8f7e43"); + OpenAiApi api = new OpenAiApi("https://api.chatanywhere.tech", "sk-gkgfYxhX9FxyZJznwxRZSJwKeGQYNPDVWjhby2PRRf17GHeT"); + OpenAiChatClient client = new OpenAiChatClient(api); +// String result = client.call("未来,英文是什么?"); +// System.out.println(result); + Flux result = client.stream("未来,英文是什么?"); + result.map(new Function() { + @Override + public String apply(String s) { + System.out.println(s); + return s; + } + }).blockLast(); + } + } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 549fd9edd6..e8e07c6754 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -149,6 +149,13 @@ spring.ai: base-url: http://127.0.0.1:11434 chat: model: llama3 + openai: +# api-key: sk-QmgIIPc5xiYd8lPb076b1b7774Ea49Af9eD2Ef172c8f7e43 +# base-url: https://openkey.cloud +# api-key: sk-gkgfYxhX9FxyZJznwxRZSJwKeGQYNPDVWjhby2PRRf17GHeT +# base-url: https://api.chatanywhere.tech + api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z + base-url: https://api.gptsapi.net yudao.ai: yiyan: -- Gitee From 4466eb1bcdec54bdccb29f683016969791b3fb06 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 20:28:27 +0800 Subject: [PATCH 0560/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91S?= =?UTF-8?q?YSTEM=EF=BC=9Aid=20=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=BC=95=E5=8F=91=E7=9A=84=20NPE=20=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/controller/admin/user/UserController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 2d659c3324..ab2f4e27d0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -119,7 +119,9 @@ public class UserController { @PreAuthorize("@ss.hasPermission('system:user:query')") public CommonResult getUser(@RequestParam("id") Long id) { AdminUserDO user = userService.getUser(id); - if (ObjectUtil.isEmpty(user)) return CommonResult.success(null); + if (user == null) { + return success(null); + } // 拼接数据 DeptDO dept = deptService.getDept(user.getDeptId()); return success(UserConvert.INSTANCE.convert(user, dept)); -- Gitee From 33e8c7ca2e4b3e7579361600ef9c10e47cf1d296 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 20:42:48 +0800 Subject: [PATCH 0561/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91MEMBER=EF=BC=9A=E5=AE=8C=E5=96=84=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/app/social/AppSocialUserController.java | 1 + .../member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java | 1 + 2 files changed, 2 insertions(+) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 6e39735257..2cf7b8641a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -71,6 +71,7 @@ public class AppSocialUserController { public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class) .setEnvVersion(AppSocialWxQrcodeReqVO.ENV_VERSION)); + // TODO @puhui999:1)是不是 base64 返回,不拼接哈 data:image/png;base64;2)cn.hutool.core.codec.Base64.encode() return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index 10321519c8..aabdc72c9d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -10,6 +10,7 @@ import lombok.Data; public class AppSocialWxQrcodeReqVO { // TODO @puhui999: 没有默认值 getQrcodeService().createWxaCodeUnlimitBytes() 转类型会报错 🤣 + // TODO @puhui999:懂了哈;default 最好在 controller 搞;对于 VO 来说,不给默认值; public static String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" private static String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) private static Integer WIDTH = 430; // 二维码宽度 -- Gitee From f3dbcf46bbbbf50998e8b8dc511609f2f3636650 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 20:47:10 +0800 Subject: [PATCH 0562/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91INFRA=EF=BC=9A=E4=BC=98=E5=8C=96=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=20infra=5Fapi=5Faccess=5Flog=20=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E6=88=AA=E5=8F=96=E5=8F=82=E6=95=B0=E6=9C=80=E9=95=BF?= =?UTF-8?q?=208000=20=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/logger/ApiAccessLogServiceImpl.java | 12 ++++++------ .../infra/service/logger/ApiErrorLogServiceImpl.java | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java index 446f99e6ec..f6b4963812 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImpl.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.infra.service.logger; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.net.redstone.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogPageReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO; import cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiAccessLogMapper; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.time.LocalDateTime; -import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiAccessLogDO.REQUEST_PARAMS_MAX_LENGTH; -import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiAccessLogDO.RESULT_MSG_MAX_LENGTH; +import static cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO.REQUEST_PARAMS_MAX_LENGTH; +import static cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO.RESULT_MSG_MAX_LENGTH; /** * API 访问日志 Service 实现类 @@ -33,8 +33,8 @@ public class ApiAccessLogServiceImpl implements ApiAccessLogService { @Override public void createApiAccessLog(ApiAccessLogCreateReqDTO createDTO) { ApiAccessLogDO apiAccessLog = BeanUtils.toBean(createDTO, ApiAccessLogDO.class); - apiAccessLog.setRequestParams(StrUtils.maxLength(apiAccessLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); - apiAccessLog.setResultMsg(StrUtils.maxLength(apiAccessLog.getResultMsg(), RESULT_MSG_MAX_LENGTH)); + apiAccessLog.setRequestParams(StrUtil.maxLength(apiAccessLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); + apiAccessLog.setResultMsg(StrUtil.maxLength(apiAccessLog.getResultMsg(), RESULT_MSG_MAX_LENGTH)); apiAccessLogMapper.insert(apiAccessLog); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java index 679b0114c2..5137dc3d31 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImpl.java @@ -1,23 +1,24 @@ package cn.iocoder.yudao.module.infra.service.logger; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.net.redstone.framework.common.util.string.StrUtils; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO; import cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper; import cn.iocoder.yudao.module.infra.enums.logger.ApiErrorLogProcessStatusEnum; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.net.redstone.module.infra.dal.dataobject.logger.ApiErrorLogDO.REQUEST_PARAMS_MAX_LENGTH; -import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO.REQUEST_PARAMS_MAX_LENGTH; +import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.API_ERROR_LOG_NOT_FOUND; +import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.API_ERROR_LOG_PROCESSED; /** * API 错误日志 Service 实现类 @@ -36,7 +37,7 @@ public class ApiErrorLogServiceImpl implements ApiErrorLogService { public void createApiErrorLog(ApiErrorLogCreateReqDTO createDTO) { ApiErrorLogDO apiErrorLog = BeanUtils.toBean(createDTO, ApiErrorLogDO.class) .setProcessStatus(ApiErrorLogProcessStatusEnum.INIT.getStatus()); - apiErrorLog.setRequestParams(StrUtils.maxLength(apiErrorLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); + apiErrorLog.setRequestParams(StrUtil.maxLength(apiErrorLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH)); apiErrorLogMapper.insert(apiErrorLog); } -- Gitee From 423f6cc9da8cc5ecac95f3e763cd61636b0df45b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 21:02:26 +0800 Subject: [PATCH 0563/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=EF=BC=9A@PermitAll=20=E6=9C=AA=E5=A4=84?= =?UTF-8?q?=E7=90=86=20RequestMappingInfo.getPatternsCondition=20=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YudaoWebSecurityConfigurerAdapter.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java index a914b1d752..b8bfdf8845 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java @@ -28,11 +28,15 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.mvc.method.RequestMappingInfo; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; +import org.springframework.web.util.pattern.PathPattern; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; + /** * 自定义的 Spring Security 配置适配器实现 * @@ -163,13 +167,20 @@ public class YudaoWebSecurityConfigurerAdapter { if (!handlerMethod.hasMethodAnnotation(PermitAll.class)) { continue; } - if (entry.getKey().getPatternsCondition() == null) { + Set urls = new HashSet<>(); + if (entry.getKey().getPatternsCondition() != null) { + urls.addAll(entry.getKey().getPatternsCondition().getPatterns()); + } + if (entry.getKey().getPathPatternsCondition() != null) { + urls.addAll(convertList(entry.getKey().getPathPatternsCondition().getPatterns(), PathPattern::getPatternString)); + } + if (urls.isEmpty()) { continue; } - Set urls = entry.getKey().getPatternsCondition().getPatterns(); + // 特殊:使用 @RequestMapping 注解,并且未写 method 属性,此时认为都需要免登录 Set methods = entry.getKey().getMethodsCondition().getMethods(); - if (CollUtil.isEmpty(methods)) { // + if (CollUtil.isEmpty(methods)) { result.putAll(HttpMethod.GET, urls); result.putAll(HttpMethod.POST, urls); result.putAll(HttpMethod.PUT, urls); -- Gitee From b65ccd769f1d5c65940264cf2a7ce1d4bc359af7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 19 May 2024 11:18:30 +0800 Subject: [PATCH 0564/1557] =?UTF-8?q?=E3=80=90=E5=90=8C=E6=AD=A5=E3=80=91B?= =?UTF-8?q?PM=EF=BC=9A=E5=90=88=E5=B9=B6=20master-jdk17=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../module/bpm/enums/ErrorCodeConstants.java | 4 ++ .../definition/BpmSimpleModelController.java | 39 +++++++++++++++++++ .../vo/simple/BpmSimpleModelSaveReqVO.java | 23 +++++++++++ .../core/enums/BpmnModelConstants.java | 7 ++++ .../flowable/core/util/BpmnModelUtils.java | 2 +- .../definition/BpmModelServiceImpl.java | 25 +++++++++--- .../definition/BpmSimpleModelService.java | 29 ++++++++++++++ .../task/BpmProcessInstanceCopyService.java | 6 ++- .../bpm/service/task/BpmTaskServiceImpl.java | 3 +- yudao-server/pom.xml | 10 ++--- 11 files changed, 135 insertions(+), 15 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java diff --git a/pom.xml b/pom.xml index e770c0359e..beb8a071b5 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ yudao-module-system yudao-module-infra - + yudao-module-bpm diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index ec167719cc..e344a2145e 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -75,4 +75,8 @@ public interface ErrorCodeConstants { // ========== BPM 流程表达式 1-009-014-000 ========== ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在"); + // ========== BPM 仿钉钉流程设计器 1-009-015-000 ========== + // TODO @芋艿:这个错误码,需要关注下 + ErrorCode CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT = new ErrorCode(1_009_015_000, "该流程模型不支持仿钉钉设计流程"); + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java new file mode 100644 index 0000000000..2f88c6b6d5 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import cn.iocoder.yudao.module.bpm.service.definition.BpmSimpleModelService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +// TODO @芋艿:后续考虑下,怎么放这个 Controller +@Tag(name = "管理后台 - BPM 仿钉钉流程设计器") +@RestController +@RequestMapping("/bpm/simple") +public class BpmSimpleModelController { + @Resource + private BpmSimpleModelService bpmSimpleModelService; + + @PostMapping("/save") + @Operation(summary = "保存仿钉钉流程设计模型") + @PreAuthorize("@ss.hasPermission('bpm:model:update')") + public CommonResult saveSimpleModel(@Valid @RequestBody BpmSimpleModelSaveReqVO reqVO) { + return success(bpmSimpleModelService.saveSimpleModel(reqVO)); + } + + @GetMapping("/get") + @Operation(summary = "获得仿钉钉流程设计模型") + @Parameter(name = "modelId", description = "流程模型编号", required = true, example = "a2c5eee0-eb6c-11ee-abf4-0c37967c420a") + public CommonResult getSimpleModel(@RequestParam("modelId") String modelId){ + return success(bpmSimpleModelService.getSimpleModel(modelId)); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java new file mode 100644 index 0000000000..54e0191d56 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +// TODO @芋艿:或许挪到 model 里的 simple 包 +@Schema(description = "管理后台 - 仿钉钉流程设计模型的新增/修改 Request VO") +@Data +public class BpmSimpleModelSaveReqVO { + + @Schema(description = "流程模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "流程模型编号不能为空") + private String modelId; // 对应 Flowable act_re_model 表 ID_ 字段 + + @Schema(description = "仿钉钉流程设计模型对象", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "仿钉钉流程设计模型对象不能为空") + @Valid + private BpmSimpleModelNodeVO simpleModelBody; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index e21ba876be..f26890c9a3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -1,5 +1,12 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums; +import com.google.common.collect.ImmutableSet; +import org.flowable.bpmn.model.EndEvent; +import org.flowable.bpmn.model.FlowNode; +import org.flowable.bpmn.model.UserTask; + +import java.util.Set; + /** * BPMN XML 常量信息 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 923c51fa63..e0b2d02b97 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; @@ -14,7 +15,6 @@ import java.util.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; -import java.util.*; /** * 流程模型转操作工具类 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index abfa0d568d..9a12b7acdf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.service.definition; +import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -103,7 +104,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 保存流程定义 repositoryService.saveModel(model); // 保存 BPMN XML - saveModelBpmnXml(model, bpmnXml); + saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(bpmnXml)); return model.getId(); } @@ -121,7 +122,7 @@ public class BpmModelServiceImpl implements BpmModelService { // 更新模型 repositoryService.saveModel(model); // 更新 BPMN XML - saveModelBpmnXml(model, updateReqVO.getBpmnXml()); + saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(updateReqVO.getBpmnXml())); } @Override @@ -236,11 +237,25 @@ public class BpmModelServiceImpl implements BpmModelService { } } - private void saveModelBpmnXml(Model model, String bpmnXml) { - if (StrUtil.isEmpty(bpmnXml)) { + @Override + public void saveModelBpmnXml(String id, byte[] xmlBytes) { + if (ArrayUtil.isEmpty(xmlBytes)) { + return; + } + repositoryService.addModelEditorSource(id, xmlBytes); + } + + @Override + public byte[] getModelSimpleJson(String id) { + return repositoryService.getModelEditorSourceExtra(id); + } + + @Override + public void saveModelSimpleJson(String id, byte[] jsonBytes) { + if (ArrayUtil.isEmpty(jsonBytes)) { return; } - repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(bpmnXml)); + repositoryService.addModelEditorSourceExtra(id, jsonBytes); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java new file mode 100644 index 0000000000..9edaa4aa79 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.bpm.service.definition; + +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; +import jakarta.validation.Valid; + +/** + * 仿钉钉流程设计 Service 接口 + * + * @author jason + */ +public interface BpmSimpleModelService { + + /** + * 保存仿钉钉流程设计模型 + * + * @param reqVO 请求信息 + */ + Boolean saveSimpleModel(@Valid BpmSimpleModelSaveReqVO reqVO); + + /** + * 获取仿钉钉流程设计模型结构 + * + * @param modelId 流程模型编号 + * @return 仿钉钉流程设计模型结构 + */ + BpmSimpleModelNodeVO getSimpleModel(String modelId); + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java index bd84490e8e..94df76d4d8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyService.java @@ -17,9 +17,11 @@ public interface BpmProcessInstanceCopyService { * 流程实例的抄送 * * @param userIds 抄送的用户编号 - * @param taskId 流程任务编号 + * @param processInstanceId 流程编号 + * @param taskId 任务编号 + * @param taskName 任务名称 */ - void createProcessInstanceCopy(Collection userIds, String taskId); + void createProcessInstanceCopy(Collection userIds, String processInstanceId, String taskId, String taskName); /** * 获得抄送的流程的分页 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index aa5326ddd4..c18ea5398f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -186,7 +186,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2. 抄送用户 if (CollUtil.isNotEmpty(reqVO.getCopyUserIds())) { - processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), reqVO.getId()); + processInstanceCopyService.createProcessInstanceCopy(reqVO.getCopyUserIds(), instance.getProcessInstanceId(), + reqVO.getId(), task.getName()); } // 情况一:被委派的任务,不调用 complete 去完成任务 diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index bc850b5902..e5b816b9b2 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -46,11 +46,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-bpm-biz + ${revision} + -- Gitee From 8e5584821e722498b21523a38efe22eef57ae638 Mon Sep 17 00:00:00 2001 From: zhougang <921366807@qq.com> Date: Sun, 19 May 2024 15:34:45 +0800 Subject: [PATCH 0565/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91?= =?UTF-8?q?=20protection=20=E6=A8=A1=E5=9D=97=E6=96=B0=E5=A2=9E=20signatur?= =?UTF-8?q?e=20=E5=AE=9E=E7=8E=B0=20API=20=E7=AD=BE=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pom.xml | 9 +- .../YudaoSignatureAutoConfiguration.java | 27 +++ .../signature/core/annotation/Signature.java | 57 ++++++ .../signature/core/aop/SignatureAspect.java | 170 ++++++++++++++++++ .../core/redis/SignatureRedisDAO.java | 56 ++++++ .../signature/core/SignatureTest.java | 136 ++++++++++++++ .../core/filter/CacheRequestBodyWrapper.java | 4 + 7 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/config/YudaoSignatureAutoConfiguration.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/src/test/java/cn/iocoder/yudao/framework/signature/core/SignatureTest.java diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index bbb5b12ebe..025bb75910 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -12,7 +12,7 @@ jar ${project.artifactId} - 服务保证,提供分布式锁、幂等、限流、熔断等等功能 + 服务保证,提供分布式锁、幂等、限流、熔断、API签名等等功能 https://github.com/YunaiV/ruoyi-vue-pro @@ -35,6 +35,13 @@ lock4j-redisson-spring-boot-starter true + + + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/config/YudaoSignatureAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/config/YudaoSignatureAutoConfiguration.java new file mode 100644 index 0000000000..5b4b8e43e5 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/config/YudaoSignatureAutoConfiguration.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.framework.signature.config; + +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; +import cn.iocoder.yudao.framework.signature.core.aop.SignatureAspect; +import cn.iocoder.yudao.framework.signature.core.redis.SignatureRedisDAO; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.data.redis.core.StringRedisTemplate; + +/** + * @author Zhougang + */ +@AutoConfiguration(after = YudaoRedisAutoConfiguration.class) +public class YudaoSignatureAutoConfiguration { + + @Bean + public SignatureAspect signatureAspect(SignatureRedisDAO signatureRedisDAO) { + return new SignatureAspect(signatureRedisDAO); + } + + @Bean + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") + public SignatureRedisDAO signatureRedisDAO(StringRedisTemplate stringRedisTemplate) { + return new SignatureRedisDAO(stringRedisTemplate); + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java new file mode 100644 index 0000000000..1b7e127860 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.framework.signature.core.annotation; + +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; + +import java.lang.annotation.*; + + +/** + * 签名注解 + * + * @author Zhougang + */ +@Inherited +@Documented +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Signature { + + /** + * 同一个请求多长时间内有效 默认 10分钟 + */ + long expireTime() default 600000L; + + // ========================== 签名参数 ========================== + + /** + * 提示信息,签名失败的提示 + * + * @see GlobalErrorCodeConstants#BAD_REQUEST + */ + String message() default "签名不正确"; // 为空时,使用 BAD_REQUEST 错误提示 + + /** + * 签名字段:appId 应用ID + */ + String appId() default "appId"; + + /** + * 签名字段:timestamp 时间戳 + */ + String timestamp() default "timestamp"; + + /** + * 签名字段:nonce 随机数,10 位以上 + */ + String nonce() default "nonce"; + + /** + * sign 客户端签名 + */ + String sign() default "sign"; + + /** + * url 客户端不需要传递,但是可以用来加签(如: /{id} 带有动态参数的 url ,如果没有动态参数可设置为 false 不进行加签) + */ + boolean urlEnable() default true; +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java new file mode 100644 index 0000000000..dc15104656 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java @@ -0,0 +1,170 @@ +package cn.iocoder.yudao.framework.signature.core.aop; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SignUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.signature.core.annotation.Signature; +import cn.iocoder.yudao.framework.signature.core.redis.SignatureRedisDAO; +import cn.iocoder.yudao.framework.web.core.filter.CacheRequestBodyWrapper; +import jakarta.servlet.http.HttpServletRequest; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.springframework.util.Assert; + +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.Objects; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.concurrent.TimeUnit; + +/** + * 拦截声明了 {@link Signature} 注解的方法,实现签名 + * + * @author Zhougang + */ +@Aspect +@Slf4j +@AllArgsConstructor +public class SignatureAspect { + + private final SignatureRedisDAO signatureRedisDAO; + + @Before("@annotation(signature)") + public void beforePointCut(JoinPoint joinPoint, Signature signature) { + if (!verifySignature(signature, Objects.requireNonNull(ServletUtils.getRequest()))) { + log.info("[beforePointCut][方法{} 参数({}) 签名失败]", joinPoint.getSignature().toString(), + joinPoint.getArgs()); + String message = StrUtil.blankToDefault(signature.message(), + GlobalErrorCodeConstants.BAD_REQUEST.getMsg()); + throw new ServiceException(GlobalErrorCodeConstants.BAD_REQUEST.getCode(), message); + } + } + + private boolean verifySignature(Signature signature, HttpServletRequest request) { + if (!verifyHeaders(signature, request)) { + return false; + } + // 校验 appId 是否能获取到对应的 appSecret + String appId = request.getHeader(signature.appId()); + String appSecret = signatureRedisDAO.getAppSecret(appId); + Assert.notNull(appSecret, "找不到对应的 appSecret"); + // 请求头 + SortedMap headersMap = getRequestHeaders(signature, request); + // 如:/user/{id} url 带有动态参数的情况 + String urlParams = signature.urlEnable() ? request.getServletPath() : ""; + // 请求参数 + String requestParams = getRequestParams(request); + // 请求体 + String requestBody = getRequestBody(request); + // 生成服务端签名 + String serverSignature = SignUtil.signParamsSha256(headersMap, + urlParams + requestParams + requestBody + appSecret); + // 客户端签名 + String clientSignature = request.getHeader(signature.sign()); + if (!StrUtil.equals(clientSignature, serverSignature)) { + return false; + } + String nonce = headersMap.get(signature.nonce()); + // 将 nonce 记入缓存,防止重复使用(重点二:此处需要将 ttl 设定为允许 timestamp 时间差的值 x 2 ) + signatureRedisDAO.setNonce(nonce, signature.expireTime(), TimeUnit.MILLISECONDS); + return true; + } + + /** + * 校验请求头加签参数 + * 1.appId 是否为空 + * 2.timestamp 是否为空,请求是否已经超时,默认 10 分钟 + * 3.nonce 是否为空,随机数是否 10 位以上,是否在规定时间内已经访问过了 + * 4.sign 是否为空 + * + * @param signature signature + * @param request request + */ + private boolean verifyHeaders(Signature signature, HttpServletRequest request) { + String appId = request.getHeader(signature.appId()); + if (StrUtil.isBlank(appId)) { + return false; + } + String timestamp = request.getHeader(signature.timestamp()); + if (StrUtil.isBlank(timestamp)) { + return false; + } + String nonce = request.getHeader(signature.nonce()); + if (StrUtil.isBlank(nonce) || nonce.length() < 10) { + return false; + } + String sign = request.getHeader(signature.sign()); + if (StrUtil.isBlank(sign)) { + return false; + } + // 其他合法性校验 + long expireTime = signature.expireTime(); + long requestTimestamp = Long.parseLong(timestamp); + // 检查 timestamp 是否超出允许的范围 (重点一:此处需要取绝对值) + long timestampDisparity = Math.abs(System.currentTimeMillis() - requestTimestamp); + if (timestampDisparity > expireTime) { + return false; + } + String cacheNonce = signatureRedisDAO.getNonce(nonce); + return StrUtil.isBlank(cacheNonce); + } + + /** + * 获取请求头加签参数 + * + * @param request request + * @return signature params + */ + private SortedMap getRequestHeaders(Signature signature, HttpServletRequest request) { + SortedMap sortedMap = new TreeMap<>(); + sortedMap.put(signature.appId(), request.getHeader(signature.appId())); + sortedMap.put(signature.timestamp(), request.getHeader(signature.timestamp())); + sortedMap.put(signature.nonce(), request.getHeader(signature.nonce())); + return sortedMap; + } + + /** + * 获取 URL 参数 + * + * @param request request + * @return queryParams + */ + private String getRequestParams(HttpServletRequest request) { + if (CollUtil.isEmpty(request.getParameterMap())) { + return ""; + } + Map requestParams = request.getParameterMap(); + // 获取 URL 请求参数 + SortedMap sortParamsMap = new TreeMap<>(); + for (Map.Entry entry : requestParams.entrySet()) { + sortParamsMap.put(entry.getKey(), entry.getValue()[0]); + } + // 按 key 排序 + StringBuilder queryString = new StringBuilder(); + for (Map.Entry entry : sortParamsMap.entrySet()) { + queryString.append("&").append(entry.getKey()).append("=").append(entry.getValue()); + } + return queryString.substring(1); + } + + /** + * 获取请求体参数 + * + * @param request request + * @return body + */ + private String getRequestBody(HttpServletRequest request) { + CacheRequestBodyWrapper requestWrapper = new CacheRequestBodyWrapper(request); + // 获取 body + return new String(requestWrapper.getBody(), StandardCharsets.UTF_8); + } + +} + diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java new file mode 100644 index 0000000000..d00fe7f8d1 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.framework.signature.core.redis; + +import lombok.AllArgsConstructor; +import org.springframework.data.redis.core.StringRedisTemplate; + +import java.util.concurrent.TimeUnit; + +/** + * API 签名 Redis DAO + * + * @author Zhougang + */ +@AllArgsConstructor +public class SignatureRedisDAO { + + private final StringRedisTemplate stringRedisTemplate; + + /** + * 验签随机数 + *

+ * KEY 格式:signature_nonce:%s // 参数为 随机数 + * VALUE 格式:String + * 过期时间:不固定 + */ + private static final String SIGNATURE_NONCE = "signature_nonce:%s"; + + /** + * 签名密钥 + *

+ * KEY 格式:signature_appid:%s // 参数为 appid + * VALUE 格式:String + * 过期时间:预加载到 redis 永不过期 + */ + private static final String SIGNATURE_APPID = "signature_appid:%s"; + + public String getAppSecret(String appId) { + return stringRedisTemplate.opsForValue().get(formatAppIdKey(appId)); + } + + public String getNonce(String nonce) { + return stringRedisTemplate.opsForValue().get(formatNonceKey(nonce)); + } + + public void setNonce(String nonce, long time, TimeUnit timeUnit) { + // 将 nonce 记入缓存,防止重复使用(重点二:此处需要将 ttl 设定为允许 timestamp 时间差的值 x 2 ) + stringRedisTemplate.opsForValue().set(formatNonceKey(nonce), nonce, time * 2, timeUnit); + } + + private static String formatAppIdKey(String key) { + return String.format(SIGNATURE_APPID, key); + } + + private static String formatNonceKey(String key) { + return String.format(SIGNATURE_NONCE, key); + } +} diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/test/java/cn/iocoder/yudao/framework/signature/core/SignatureTest.java b/yudao-framework/yudao-spring-boot-starter-protection/src/test/java/cn/iocoder/yudao/framework/signature/core/SignatureTest.java new file mode 100644 index 0000000000..a253cd51a2 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/test/java/cn/iocoder/yudao/framework/signature/core/SignatureTest.java @@ -0,0 +1,136 @@ +package cn.iocoder.yudao.framework.signature.core; + +import cn.hutool.core.lang.Snowflake; +import cn.hutool.crypto.digest.DigestUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; +import org.junit.jupiter.api.Test; + +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + +/** + * {@link SignatureTest} 的单元测试 + */ +public class SignatureTest { + + @Test + public void testSignatureGet() { + String appId = "xxxxxx"; + Snowflake snowflake = new Snowflake(); + + // 验签请求头前端需传入字段 + SortedMap headersMap = new TreeMap<>(); + headersMap.put("appId", appId); + headersMap.put("timestamp", String.valueOf(System.currentTimeMillis())); + headersMap.put("nonce", String.valueOf(snowflake.nextId())); + + // 客户端加签内容 + StringBuilder clientSignatureContent = new StringBuilder(); + // 请求头 + for (Map.Entry entry : headersMap.entrySet()) { + clientSignatureContent.append(entry.getKey()).append(entry.getValue()); + } + // 请求 url + clientSignatureContent.append("/admin-api/infra/demo01-contact/get"); + // 请求参数 + SortedMap paramsMap = new TreeMap<>(); + paramsMap.put("id", "100"); + paramsMap.put("name", "张三"); + StringBuilder queryString = new StringBuilder(); + for (Map.Entry entry : paramsMap.entrySet()) { + queryString.append("&").append(entry.getKey()).append("=").append(entry.getValue()); + } + clientSignatureContent.append(queryString.substring(1)); + // 密钥 + clientSignatureContent.append("d3cbeed9baf4e68673a1f69a2445359a20022b7c28ea2933dd9db9f3a29f902b"); + System.out.println("加签内容:" + clientSignatureContent); + // 加签 + headersMap.put("sign", DigestUtil.sha256Hex(clientSignatureContent.toString())); + headersMap.put("Authorization", "Bearer xxx"); + + HttpRequest get = HttpUtil.createGet("http://localhost:48080/admin-api/infra/demo01-contact/get?id=100&name=张三"); + get.addHeaders(headersMap); + System.out.println("执行结果==" + get.execute()); + } + + @Test + public void testSignaturePost() { + String appId = "xxxxxx"; + Snowflake snowflake = new Snowflake(); + + // 验签请求头前端需传入字段 + SortedMap headersMap = new TreeMap<>(); + headersMap.put("appId", appId); + headersMap.put("timestamp", String.valueOf(System.currentTimeMillis())); + headersMap.put("nonce", String.valueOf(snowflake.nextId())); + + // 客户端加签内容 + StringBuilder clientSignatureContent = new StringBuilder(); + // 请求头 + for (Map.Entry entry : headersMap.entrySet()) { + clientSignatureContent.append(entry.getKey()).append(entry.getValue()); + } + // 请求 url + clientSignatureContent.append("/admin-api/infra/demo01-contact/create"); + // 请求体 + String body = "{\n" + + " \"password\": \"1\",\n" + + " \"date\": \"2024-04-24 16:28:00\",\n" + + " \"user\": {\n" + + " \"area\": \"浦东新区\",\n" + + " \"1\": \"xx\",\n" + + " \"2\": \"xx\",\n" + + " \"province\": \"上海市\",\n" + + " \"data\": {\n" + + " \"99\": \"xx\",\n" + + " \"1\": \"xx\",\n" + + " \"100\": \"xx\",\n" + + " \"2\": \"xx\",\n" + + " \"3\": \"xx\",\n" + + " \"array\": [\n" + + " {\n" + + " \"3\": \"aa\",\n" + + " \"4\": \"aa\",\n" + + " \"2\": \"aa\",\n" + + " \"1\": \"aa\"\n" + + " },\n" + + " {\n" + + " \"99\": \"aa\",\n" + + " \"100\": \"aa\",\n" + + " \"88\": \"aa\",\n" + + " \"120\": \"aa\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"sex\": \"男\",\n" + + " \"name\": \"张三\",\n" + + " \"array\": [\n" + + " \"1\",\n" + + " \"3\",\n" + + " \"5\",\n" + + " \"2\"\n" + + " ]\n" + + " },\n" + + " \"username\": \"xiaoming\"\n" + + "}"; + clientSignatureContent.append(body); + + // 密钥 + clientSignatureContent.append("d3cbeed9baf4e68673a1f69a2445359a20022b7c28ea2933dd9db9f3a29f902b"); + System.out.println("加签内容:" + clientSignatureContent); + // 加签 + headersMap.put("sign", DigestUtil.sha256Hex(clientSignatureContent.toString())); + headersMap.put("Authorization", "Bearer xxx"); + + HttpRequest post = HttpUtil.createPost("http://localhost:48080/admin-api/infra/demo01-contact/create"); + post.addHeaders(headersMap); + post.body(body); + try (HttpResponse execute = post.execute()) { + System.out.println("执行结果==" + execute); + } + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java index 8e80fa591f..e181edeb4f 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java @@ -23,6 +23,10 @@ public class CacheRequestBodyWrapper extends HttpServletRequestWrapper { */ private final byte[] body; + public byte[] getBody() { + return body; + } + public CacheRequestBodyWrapper(HttpServletRequest request) { super(request); body = ServletUtils.getBodyBytes(request); -- Gitee From 5bc01901948de01ef94d6186389a566aa6b44858 Mon Sep 17 00:00:00 2001 From: zhougang <921366807@qq.com> Date: Sun, 19 May 2024 15:39:22 +0800 Subject: [PATCH 0566/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=20=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-framework/yudao-spring-boot-starter-protection/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index 025bb75910..46326c63aa 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -12,7 +12,7 @@ jar ${project.artifactId} - 服务保证,提供分布式锁、幂等、限流、熔断、API签名等等功能 + 服务保证,提供分布式锁、幂等、限流、熔断、API 签名等等功能 https://github.com/YunaiV/ruoyi-vue-pro -- Gitee From 9cc6528eba87cfe7539da4a61a69eb3fc31ef10c Mon Sep 17 00:00:00 2001 From: orchidblessing <63270044+orchidblessing@users.noreply.github.com> Date: Sun, 19 May 2024 18:05:38 +0800 Subject: [PATCH 0567/1557] =?UTF-8?q?fix=EF=BC=9A=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B5=8B=E8=AF=95=E6=97=B6pg=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 错误详情:Caused by: org.postgresql.util.PSQLException: ERROR: column "id" is of type bigint but expression is of type character varying --- .../yudao/module/infra/dal/dataobject/file/FileContentDO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/file/FileContentDO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/file/FileContentDO.java index eda8a72649..80e18fc569 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/file/FileContentDO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/file/FileContentDO.java @@ -28,8 +28,8 @@ public class FileContentDO extends BaseDO { /** * 编号,数据库自增 */ - @TableId(type = IdType.INPUT) - private String id; + @TableId + private Long id; /** * 配置编号 * -- Gitee From 6a6c30c375ce669cf074a5655eae3e1fac678e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=AB=98?= <171376172@qq.com> Date: Mon, 20 May 2024 01:43:30 +0000 Subject: [PATCH 0568/1557] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=87=E6=A1=88=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高高 <171376172@qq.com> --- .../yudao/module/infra/job/logger/AccessLogCleanJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java index 65727a3cae..23a277bdd1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/job/logger/AccessLogCleanJob.java @@ -35,7 +35,7 @@ public class AccessLogCleanJob implements JobHandler { public String execute(String param) { Integer count = apiAccessLogService.cleanAccessLog(JOB_CLEAN_RETAIN_DAY, DELETE_LIMIT); log.info("[execute][定时执行清理访问日志数量 ({}) 个]", count); - return String.format("定时执行清理错误日志数量 %s 个", count); + return String.format("定时执行清理访问日志数量 %s 个", count); } } -- Gitee From e0d8ac74a47ca78ba16e3715e7e96a778d8846a4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 20 May 2024 13:43:21 +0800 Subject: [PATCH 0569/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=20mj=20jdk21=E9=99=8D=E5=88=B0jdk17=E8=AF=AD?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/models/midjourney/api/MidjourneyInteractionsApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java index 16d86a48f0..96fddfa46a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/org/springframework/ai/models/midjourney/api/MidjourneyInteractionsApi.java @@ -113,7 +113,7 @@ public class MidjourneyInteractionsApi extends MidjourneyInteractions { // // 上传文件 - String uploadUrl = uploadAttachmentsRes.getAttachments().getFirst().getUploadUrl(); + String uploadUrl = uploadAttachmentsRes.getAttachments().get(0).getUploadUrl(); httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); HttpEntity fileSystemResourceHttpEntity = new HttpEntity<>(attachments.getFileSystemResource(), httpHeaders); ResponseEntity exchange = restTemplate.exchange(uploadUrl, HttpMethod.PUT, fileSystemResourceHttpEntity, String.class); -- Gitee From 3a10fedddb66851242e0d7e018fbe0e1d0b8ae43 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 20 May 2024 13:44:50 +0800 Subject: [PATCH 0570/1557] =?UTF-8?q?=E3=80=90todo=E3=80=91=E7=99=BE?= =?UTF-8?q?=E5=BA=A6=E6=96=87=E8=A8=80=E4=B8=80=E5=BF=83=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=20todo=EF=BC=8C=E5=88=A0=E9=99=A4=20doOnComplete?= =?UTF-8?q?=E3=80=81=E5=A2=9E=E5=8A=A0=20retryTemplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/core/model/yiyan/YiYanChatClient.java | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java index a613af6db2..c7b0bf372b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatClient.java @@ -85,22 +85,20 @@ public class YiYanChatClient implements ChatClient, StreamingChatClient { @Override public Flux stream(Prompt prompt) { YiYanChatCompletionRequest request = this.createRequest(prompt, true); - // TODO @fan:return this.retryTemplate.execute(ctx -> { - // 调用 callWithFunctionSupport 发送请求 - Flux response = this.yiYanApi.chatCompletionStream(request); - // TODO @fan:下面的 doOnComplete 是不是可以删除哈? - response.doOnComplete(new Runnable() { - @Override - public void run() { - String a = ";"; - } - }); - return response.map(chunk -> { - // TODO @fan:ChatResponseMetadata chatResponseMetadata - return new ChatResponse(List.of(new Generation(chunk.getResult()))); + // TODO done @fan:return this.retryTemplate.execute(ctx -> { + return retryTemplate.execute(ctx -> { + // 调用 callWithFunctionSupport 发送请求 + Flux response = this.yiYanApi.chatCompletionStream(request); + return response.map(chunk -> { +// System.err.println("---".concat(chunk.getResult())); + // TODO @fan:ChatResponseMetadata chatResponseMetadata + return new ChatResponse(List.of(new Generation(chunk.getResult()))); + }); }); } + + private YiYanChatCompletionRequest createRequest(Prompt prompt, boolean stream) { // 参考 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t 文档,system 是独立字段 // 1.1 获取 user 和 assistant -- Gitee From afad8ac619c624bb5ef9b76c41809a1a57f617bc Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 20 May 2024 21:20:26 +0800 Subject: [PATCH 0571/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E5=A2=9E=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E4=BA=BA=E8=87=AA=E5=B7=B1=E5=80=99=E9=80=89=E4=BA=BA?= =?UTF-8?q?=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmTaskCandidateStartUserStrategy.java | 50 +++++++++++++++++++ .../enums/BpmTaskCandidateStrategyEnum.java | 1 + 2 files changed, 51 insertions(+) create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserStrategy.java diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserStrategy.java new file mode 100644 index 0000000000..7341c6c606 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateStartUserStrategy.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; + +import cn.iocoder.yudao.framework.common.util.collection.SetUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import jakarta.annotation.Resource; +import org.flowable.engine.delegate.DelegateExecution; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.util.Set; + +/** + * 发起人自己 {@link BpmTaskCandidateUserStrategy} 实现类。 用于需要发起人信息复核等场景 + * + * @author jason + */ +@Component +public class BpmTaskCandidateStartUserStrategy implements BpmTaskCandidateStrategy { + + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmProcessInstanceService processInstanceService; + + @Override + public BpmTaskCandidateStrategyEnum getStrategy() { + return BpmTaskCandidateStrategyEnum.START_USER; + } + + /** + * 无需校验参数 + */ + @Override + public void validateParam(String param) {} + + @Override + public Set calculateUsers(DelegateExecution execution, String param) { + String startUserId = processInstanceService.getProcessInstance(execution.getProcessInstanceId()).getStartUserId(); + return SetUtils.asSet(Long.valueOf(startUserId)); + } + + /** + * 不需要参数 + */ + @Override + public boolean isParamRequired() { + return false; + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java index a8b5385012..596ff73f17 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java @@ -21,6 +21,7 @@ public enum BpmTaskCandidateStrategyEnum { POST(22, "岗位"), USER(30, "用户"), START_USER_SELECT(35, "发起人自选"), // 申请人自己,可在提交申请时选择此节点的审批人 + START_USER(36, "发起人自己"), // 申请人自己, 一般紧挨开始节点,常用于发起人信息审核场景 USER_GROUP(40, "用户组"), EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager ; -- Gitee From 802dee2fc353f41d16fb4c7176f7ededaf6f0fa2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 21 May 2024 08:30:51 +0800 Subject: [PATCH 0572/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=B8=8B=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/message/AiChatMessageSendReqVO.java | 3 + .../dal/dataobject/chat/AiChatMessageDO.java | 17 ++++- .../ai/service/impl/AiChatServiceImpl.java | 71 ++++++++++++++----- 3 files changed, 72 insertions(+), 19 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java index 9592da3475..89a84bcbd2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendReqVO.java @@ -19,4 +19,7 @@ public class AiChatMessageSendReqVO { @NotEmpty(message = "聊天内容不能为空") private String content; + @Schema(description = "是否携带上下文", example = "true") + private Boolean useContext; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index c665376731..1c915ed7c8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; +import com.baomidou.mybatisplus.annotation.TableId; import org.springframework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; @@ -27,14 +28,23 @@ public class AiChatMessageDO extends BaseDO { /** * 编号,作为每条聊天记录的唯一标识符 */ + @TableId private Long id; /** * 会话编号 * - * 关联 {@link AiChatConversationDO#getId()} + * 关联 {@link AiChatConversationDO#getId()} 字段 */ private Long conversationId; + /** + * 回复消息编号 + * + * 关联 {@link #id} 字段 + * + * 大模型回复的消息编号,用于“问答”的关联 + */ + private Long replyId; /** * 消息类型 @@ -75,6 +85,9 @@ public class AiChatMessageDO extends BaseDO { */ private String content; - // TODO 芋艿:是否作为上下文语料?use_context,待定 + /** + * 是否携带上下文 + */ + private Boolean useContext; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 9fd80d1c6a..c45a1025ef 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,5 +1,9 @@ package cn.iocoder.yudao.module.ai.service.impl; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.BooleanUtil; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; @@ -109,15 +113,14 @@ public class AiChatServiceImpl implements AiChatService { StreamingChatClient chatClient = chatClientFactory.getStreamingChatClient(platform); // 2. 插入 user 发送消息 - AiChatMessageDO userMessage = createChatMessage(conversation.getId(), model, - userId, conversation.getRoleId(), MessageType.USER, sendReqVO.getContent()); + AiChatMessageDO userMessage = createChatMessage(conversation.getId(), null, model, + userId, conversation.getRoleId(), MessageType.USER, sendReqVO.getContent(), sendReqVO.getUseContext()); // 3.1 插入 assistant 接收消息 - AiChatMessageDO assistantMessage = createChatMessage(conversation.getId(), model, - userId, conversation.getRoleId(), MessageType.ASSISTANT, ""); + AiChatMessageDO assistantMessage = createChatMessage(conversation.getId(), userMessage.getId(), model, + userId, conversation.getRoleId(), MessageType.ASSISTANT, "", sendReqVO.getUseContext()); // 3.2 创建 chat 需要的 Prompt - // TODO 消息上下文 Prompt prompt = buildPrompt(conversation, historyMessages, sendReqVO); Flux streamResponse = chatClient.stream(prompt); @@ -139,32 +142,66 @@ public class AiChatServiceImpl implements AiChatService { } private Prompt buildPrompt(AiChatConversationDO conversation, List messages, AiChatMessageSendReqVO sendReqVO) { - // TODO 芋艿:1)保留 n 个上下文;2)每一轮 token 数量 -// if (conversation.getMaxContexts() != null && messages.size() > conversation.getMaxContexts()) { -// -// } // 1. 构建 Prompt Message 列表 List chatMessages = new ArrayList<>(); // 1.1 system context 角色设定 chatMessages.add(new SystemMessage(conversation.getSystemMessage())); // 1.2 history message 历史消息 - messages.forEach(message -> chatMessages.add(new ChatMessage(message.getType().toUpperCase(), message.getContent()))); + List contextMessages = filterContextMessages(messages, conversation, sendReqVO); + contextMessages.forEach(message -> chatMessages.add(new ChatMessage(message.getType().toUpperCase(), message.getContent()))); // 1.3 user message 新发送消息 chatMessages.add(new UserMessage(sendReqVO.getContent())); // 2. 构建 ChatOptions 对象 TODO 芋艿:临时注释掉;等文心一言兼容了; + // TODO 每一轮 token 数量 // ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); // return new Prompt(chatMessages, null); return new Prompt(chatMessages); } - private AiChatMessageDO createChatMessage(Long conversationId, AiChatModelDO model, - Long userId, Long roleId, - MessageType messageType, String content) { - AiChatMessageDO message = new AiChatMessageDO() - .setConversationId(conversationId).setModel(model.getModel()).setModelId(model.getId()) - .setUserId(userId).setRoleId(roleId) - .setType(messageType.getValue()).setContent(content); + /** + * 从历史消息中,获得倒序的 n 组消息作为消息上下文 + * + * n 组:指的是 user + assistant 形成一组 + * + * @param messages 消息列表 + * @param conversation 会话 + * @param sendReqVO 发送请求 + * @return 消息上下文 + */ + private List filterContextMessages(List messages, AiChatConversationDO conversation, AiChatMessageSendReqVO sendReqVO) { + if (conversation.getMaxContexts() == null || ObjUtil.notEqual(sendReqVO.getUseContext(), Boolean.TRUE)) { + return Collections.emptyList(); + } + List contextMessages = new ArrayList<>(conversation.getMaxContexts() * 2); + for (int i = messages.size() - 1; i >= 0; i--) { + AiChatMessageDO assistantMessage = CollUtil.get(messages, i); + if (assistantMessage == null || assistantMessage.getReplyId() == null) { + continue; + } + AiChatMessageDO userMessage = CollUtil.get(messages, i - 1); + if (userMessage == null || ObjUtil.notEqual(assistantMessage.getReplyId(), userMessage.getId()) + || StrUtil.isEmpty(assistantMessage.getContent())) { + continue; + } + // 由于后续要 reverse 反转,所以先添加 assistantMessage + contextMessages.add(assistantMessage); + contextMessages.add(userMessage); + // 超过最大上下文,结束 + if (contextMessages.size() >= conversation.getMaxContexts() * 2) { + break; + } + } + Collections.reverse(contextMessages); + return contextMessages; + } + + private AiChatMessageDO createChatMessage(Long conversationId, Long replyId, + AiChatModelDO model, Long userId, Long roleId, + MessageType messageType, String content, Boolean useContext) { + AiChatMessageDO message = new AiChatMessageDO().setConversationId(conversationId).setReplyId(replyId) + .setModel(model.getModel()).setModelId(model.getId()).setUserId(userId).setRoleId(roleId) + .setType(messageType.getValue()).setContent(content).setUseContext(useContext); message.setCreateTime(LocalDateTime.now()); chatMessageMapper.insert(message); return message; -- Gitee From 983742fd7416e57aabf3ba866eef7616f7e49f96 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 09:35:05 +0800 Subject: [PATCH 0573/1557] =?UTF-8?q?=E3=80=90=E8=A1=A5=E5=85=85=E3=80=91?= =?UTF-8?q?=E8=A1=A5=E5=85=85pom=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/pom.xml | 4 ++-- yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/pom.xml b/yudao-module-ai/pom.xml index ad49018f0f..04244f21ea 100644 --- a/yudao-module-ai/pom.xml +++ b/yudao-module-ai/pom.xml @@ -18,8 +18,8 @@ - 21 - 21 + 17 + 17 UTF-8 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 37813feb71..9a19270dbf 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -53,6 +53,10 @@ com.squareup.okhttp3 okhttp + + io.projectreactor.netty + reactor-netty + net.dv8tion JDA -- Gitee From 3633c7415b0dbc85887a646fccc5480e86403b6d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 10:59:28 +0800 Subject: [PATCH 0574/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91ai=20=E5=AF=B9=E8=AF=9D=E6=94=B9=E4=B8=BA=E5=8D=87?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/mysql/chat/AiChatConversationMapper.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java index 5d41fb0806..181b136ef2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.ai.dal.mysql.chat; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -16,7 +16,11 @@ import java.util.List; public interface AiChatConversationMapper extends BaseMapperX { default List selectListByUserId(Long userId) { - return selectList(AiChatConversationDO::getUserId, userId); + return selectList( + new LambdaQueryWrapperX() + .eq(AiChatConversationDO::getUserId, userId) + .orderByAsc(AiChatConversationDO::getCreateTime) + ); } } -- Gitee From 19bd0c66ffea0ada9ace56137bbc808605a42144 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 12:11:07 +0800 Subject: [PATCH 0575/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91AI=20chat=20=E8=BF=94=E5=9B=9E=E7=9A=84=20message=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c45a1025ef..e1fe760f06 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -132,7 +132,7 @@ public class AiChatServiceImpl implements AiChatService { contentBuffer.append(newContent); // 响应结果 return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class)) - .setReceive(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent)); + .setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent)); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { -- Gitee From 041a00b27fa94c662485c0682495494a828b9136 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 17:18:33 +0800 Subject: [PATCH 0576/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E5=A6=82=E6=9E=9C=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BA=86=20role=20=EF=BC=8C=E5=88=99=E4=BD=BF=E7=94=A8=20role?= =?UTF-8?q?=20=E4=BD=9C=E4=B8=BA=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/chat/AiChatConversationServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 85dd57afdf..1e3bd52ced 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -56,8 +56,9 @@ public class AiChatConversationServiceImpl implements AiChatConversationService validateChatModel(model); // 2. 创建 AiChatConversationDO 聊天对话 + String title = createReqVO.getRoleId() == null ? AiChatConversationDO.TITLE_DEFAULT : role.getName(); AiChatConversationDO conversation = new AiChatConversationDO() - .setUserId(userId).setTitle(AiChatConversationDO.TITLE_DEFAULT).setPinned(false) + .setUserId(userId).setTitle(title).setPinned(false) .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()).setSystemMessage(role.getSystemMessage()) .setTemperature(model.getTemperature()).setMaxTokens(model.getMaxTokens()).setMaxContexts(model.getMaxContexts()); chatConversationMapper.insert(conversation); -- Gitee From 99b6f240923b05357b5f31f37dd9907764d6012a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 21 May 2024 19:55:29 +0800 Subject: [PATCH 0577/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=A7=A3=E5=86=B3=20spring-ai=20=E4=B8=8E=20webflux?= =?UTF-8?q?=20=E9=9B=86=E6=88=90=E6=97=B6=EF=BC=8CSSE=20=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E4=B9=B1=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.http | 7 +++---- .../mysql/chat/AiChatConversationMapper.java | 9 ++++----- .../ai/service/impl/AiChatServiceImpl.java | 6 ++++-- .../ai/openAiImage/OpenAiImageClientTests.java | 17 ----------------- .../src/main/resources/application.yaml | 3 +++ 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http index 2d417a55fd..463e612077 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.http @@ -6,7 +6,7 @@ Authorization: {{token}} { "conversationId": "1781604279872581649", - "content": "中国好看吗?" + "content": "你是 OpenAI 么?" } @@ -16,11 +16,10 @@ Content-Type: application/json Authorization: {{token}} { - "conversationId": "1781604279872581651", - "content": "苹果是什么颜色?" + "conversationId": "1781604279872581690", + "content": "1+1=?" } - ### message list GET {{baseUrl}}/admin-api/ai/chat/message/list-by-conversation-id?conversationId=1781604279872581649 Authorization: {{token}} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java index 181b136ef2..dd4901bdf4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java @@ -15,12 +15,11 @@ import java.util.List; @Mapper public interface AiChatConversationMapper extends BaseMapperX { + // TODO @fan:建议这里不排序哈;交给他们前端排序 default List selectListByUserId(Long userId) { - return selectList( - new LambdaQueryWrapperX() - .eq(AiChatConversationDO::getUserId, userId) - .orderByAsc(AiChatConversationDO::getCreateTime) - ); + return selectList(new LambdaQueryWrapperX() + .eq(AiChatConversationDO::getUserId, userId) + .orderByAsc(AiChatConversationDO::getCreateTime)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index e1fe760f06..7c7e379548 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -32,6 +32,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; +import reactor.core.scheduler.Schedulers; import java.time.LocalDateTime; import java.util.*; @@ -125,9 +126,10 @@ public class AiChatServiceImpl implements AiChatService { Flux streamResponse = chatClient.stream(prompt); // 3.3 流式返回 + // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 StringBuffer contentBuffer = new StringBuffer(); - return streamResponse.map(response -> { - String newContent = response.getResult() != null ? response.getResult().getOutput().getContent() : null; + return streamResponse.publishOn(Schedulers.immediate()).map(chunk -> { + String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); // 响应结果 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java index bf184a8496..828f7dc2d6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/openAiImage/OpenAiImageClientTests.java @@ -71,21 +71,4 @@ public class OpenAiImageClientTests { } } - public static void main(String[] args) { -// OpenAiApi api = new OpenAiApi("https://api.gptsapi.net", "sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z"); -// OpenAiApi api = new OpenAiApi("https://openkey.cloud", "sk-QmgIIPc5xiYd8lPb076b1b7774Ea49Af9eD2Ef172c8f7e43"); - OpenAiApi api = new OpenAiApi("https://api.chatanywhere.tech", "sk-gkgfYxhX9FxyZJznwxRZSJwKeGQYNPDVWjhby2PRRf17GHeT"); - OpenAiChatClient client = new OpenAiChatClient(api); -// String result = client.call("未来,英文是什么?"); -// System.out.println(result); - Flux result = client.stream("未来,英文是什么?"); - result.map(new Function() { - @Override - public String apply(String s) { - System.out.println(s); - return s; - } - }).blockLast(); - } - } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index e8e07c6754..6bb087d819 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -156,6 +156,9 @@ spring.ai: # base-url: https://api.chatanywhere.tech api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z base-url: https://api.gptsapi.net +# chat: +# options: +# model: gpt-4-0125-preview yudao.ai: yiyan: -- Gitee From 12d3c0a9af9ba7733a10830f1b03ecaa965abae2 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 22:46:59 +0800 Subject: [PATCH 0578/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=20=E8=A7=92=E8=89=B2=E5=88=86=E7=B1=BB=EF=BC=8C=E5=A4=84?= =?UTF-8?q?=E7=90=86=20role=20=E7=A9=BA=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/service/model/AiChatRoleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index cf6bcec969..e0192ffe4a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -137,7 +137,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { @Override public List getChatRoleCategoryList() { List list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); - return convertList(list, AiChatRoleDO::getCategory, role -> StrUtil.isNotBlank(role.getCategory())); + return convertList(list, AiChatRoleDO::getCategory, role -> role != null && StrUtil.isNotBlank(role.getCategory())); } } -- Gitee From 747b2ebce529ec0374d7ca05afda455fd3565fb7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 22 May 2024 09:57:20 +0800 Subject: [PATCH 0579/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=20Chat=20=E5=A2=9E=E5=8A=A0=E6=B8=85=E7=A9=BA=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.java | 6 +++++ .../ai/dal/mysql/AiChatMessageMapper.java | 8 ++++++ .../module/ai/service/AiChatService.java | 7 +++++ .../ai/service/impl/AiChatServiceImpl.java | 26 +++++++++---------- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 47f35f4ea0..ad9375f39a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -55,4 +55,10 @@ public class AiChatMessageController { return success(chatService.deleteMessage(id)); } + @Operation(summary = "删除消息-对于对话全部消息") + @DeleteMapping("/delete-by-conversation-id") + @Parameter(name = "id", required = true, description = "消息编号", example = "1024") + public CommonResult deleteByConversationId(@RequestParam("conversationId") Long conversationId) { + return success(chatService.deleteByConversationId(conversationId)); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java index fef19af128..6c9c22ad03 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java @@ -32,4 +32,12 @@ public interface AiChatMessageMapper extends BaseMapperX { ); } + /** + * 删除 - 根据 conversationId + * + * @param conversationId + */ + default int deleteByConversationId(Long conversationId) { + return this.delete(new LambdaQueryWrapperX().eq(AiChatMessageDO::getConversationId, conversationId)); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java index 57d848eea7..f8924cb635 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java @@ -47,4 +47,11 @@ public interface AiChatService { */ Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); + /** + * 删除消息-对于对话全部消息 + * + * @param conversationId + * @return + */ + Boolean deleteByConversationId(Long conversationId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 7c7e379548..0a52681c6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -1,34 +1,29 @@ package cn.iocoder.yudao.module.ai.service.impl; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.ListUtil; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.BooleanUtil; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import org.springframework.ai.chat.ChatResponse; -import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.messages.*; -import org.springframework.ai.chat.prompt.ChatOptions; -import org.springframework.ai.chat.prompt.ChatOptionsBuilder; -import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; -import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import cn.iocoder.yudao.module.ai.service.AiChatService; +import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; +import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.messages.*; +import org.springframework.ai.chat.prompt.Prompt; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -143,6 +138,11 @@ public class AiChatServiceImpl implements AiChatService { }); } + @Override + public Boolean deleteByConversationId(Long conversationId) { + return chatMessageMapper.deleteByConversationId(conversationId) > 0; + } + private Prompt buildPrompt(AiChatConversationDO conversation, List messages, AiChatMessageSendReqVO sendReqVO) { // 1. 构建 Prompt Message 列表 List chatMessages = new ArrayList<>(); -- Gitee From cad1ce4852f449785fee1b3d2fc9d7bc3acc42e1 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 22 May 2024 10:30:37 +0800 Subject: [PATCH 0580/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=20message=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E3=80=81role=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/vo/message/AiChatMessageRespVO.java | 7 +++++++ .../ai/service/impl/AiChatServiceImpl.java | 21 ++++++++++++------- .../ai/service/model/AiChatRoleService.java | 9 ++++++++ .../service/model/AiChatRoleServiceImpl.java | 6 ++++++ 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index 49c7ee54be..e4e878e400 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -36,4 +36,11 @@ public class AiChatMessageRespVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") private LocalDateTime createTime; + // ========= 扩展字段 + + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + private String userAvatar; + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + private String roleAvatar; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index 0a52681c6b..c603f43e81 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; @@ -216,16 +217,22 @@ public class AiChatServiceImpl implements AiChatService { // 获取对话所有 message List aiChatMessageDOList = chatMessageMapper.selectByConversationId(conversationId); // 获取模型信息 - Set modalIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getModelId).collect(Collectors.toSet()); - List modalList = chatModalService.getModalByIds(modalIds); - Map modalIdMap = modalList.stream().collect(Collectors.toMap(AiChatModelDO::getId, o -> o)); + Set roleIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getRoleId).collect(Collectors.toSet()); + List roleList; + if (!CollUtil.isEmpty(roleIds)) { + roleList = chatRoleService.getChatRoles(roleIds); + } else { + roleList = Collections.emptyList(); + } + Map roleMap = roleList.stream().collect(Collectors.toMap(AiChatRoleDO::getId, o -> o)); // 转换 AiChatMessageRespVO List aiChatMessageRespList = AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); - // 设置用户头像 和 模型头像 todo @芋艿 这里需要转换 用户头像、模型头像 + // 设置用户头像 和 模型头像 return aiChatMessageRespList.stream().map(item -> { - if (modalIdMap.containsKey(item.getModelId())) { -// modalIdMap.get(item.getModelId()); -// item.setModelImage() + // 设置 role 头像 + if (roleMap.containsKey(item.getRoleId())) { + AiChatRoleDO role = roleMap.get(item.getRoleId()); + item.setRoleAvatar(role.getAvatar()); } return item; }).collect(Collectors.toList()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index 7206fd1040..228b1ee6e9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import jakarta.validation.Valid; import java.util.List; +import java.util.Set; /** * AI 聊天角色 Service 接口 @@ -72,6 +73,14 @@ public interface AiChatRoleService { */ AiChatRoleDO getChatRole(Long id); + /** + * 获得聊天角色 - 根据 ids + * + * @param roleIds + * @return + */ + List getChatRoles(Set roleIds); + /** * 校验聊天角色是否合法 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index e0192ffe4a..1413dd8ce1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -105,6 +106,11 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { return chatRoleMapper.selectById(id); } + @Override + public List getChatRoles(Set roleIds) { + return chatRoleMapper.selectBatchIds(roleIds); + } + @Override public AiChatRoleDO validateChatRole(Long id) { AiChatRoleDO chatRole = validateChatRoleExists(id); -- Gitee From ccd7928a6b638090dac7b39e618de5ba83fdc0d8 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 22 May 2024 10:53:25 +0800 Subject: [PATCH 0581/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/system/api/user/dto/AdminUserRespDTO.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/dto/AdminUserRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/dto/AdminUserRespDTO.java index ac13c3a8b0..d86f3e5481 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/dto/AdminUserRespDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/dto/AdminUserRespDTO.java @@ -40,5 +40,9 @@ public class AdminUserRespDTO { * 手机号码 */ private String mobile; + /** + * 用户头像 + */ + private String avatar; } -- Gitee From 2a01f6b9fca6826331e3cea2de549d8514667896 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 22 May 2024 10:58:29 +0800 Subject: [PATCH 0582/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=20Chat=20stream=20=E5=A2=9E=E5=8A=A0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/message/AiChatMessageSendRespVO.java | 7 +++++++ .../ai/service/impl/AiChatServiceImpl.java | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java index 58ba056595..3314b1d328 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java @@ -31,6 +31,13 @@ public class AiChatMessageSendRespVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; + // ========= 扩展字段 + + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + private String userAvatar; + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + private String roleAvatar; } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c603f43e81..f0cbb807e2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; @@ -19,6 +20,8 @@ import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.ai.chat.ChatResponse; @@ -56,6 +59,7 @@ public class AiChatServiceImpl implements AiChatService { private final AiChatConversationService chatConversationService; private final AiChatModelService chatModalService; private final AiChatRoleService chatRoleService; + private final AdminUserApi adminUserApi; @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { @@ -124,13 +128,17 @@ public class AiChatServiceImpl implements AiChatService { // 3.3 流式返回 // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 StringBuffer contentBuffer = new StringBuffer(); + + // 3.4 获取用户头像、角色头像 + AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); + AiChatRoleDO chatRole = chatRoleService.getChatRole(assistantMessage.getRoleId()); return streamResponse.publishOn(Schedulers.immediate()).map(chunk -> { String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); // 响应结果 - return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class)) - .setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent)); + return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class).setUserAvatar(user.getAvatar())) + .setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent).setRoleAvatar(chatRole == null ? null : chatRole.getAvatar())); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { @@ -227,6 +235,8 @@ public class AiChatServiceImpl implements AiChatService { Map roleMap = roleList.stream().collect(Collectors.toMap(AiChatRoleDO::getId, o -> o)); // 转换 AiChatMessageRespVO List aiChatMessageRespList = AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); + // 获取用户信息 + AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); // 设置用户头像 和 模型头像 return aiChatMessageRespList.stream().map(item -> { // 设置 role 头像 @@ -234,6 +244,10 @@ public class AiChatServiceImpl implements AiChatService { AiChatRoleDO role = roleMap.get(item.getRoleId()); item.setRoleAvatar(role.getAvatar()); } + // 设置 user 头像 + if (user != null) { + item.setUserAvatar(user.getAvatar()); + } return item; }).collect(Collectors.toList()); } -- Gitee From 2fefcf8834ede9c73fbd64a16d04fe2ffd25a425 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 22 May 2024 12:37:21 +0800 Subject: [PATCH 0583/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E9=80=9A=E8=BF=87=20AiClientFactory=20=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=20chatclient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/config/AiChatClientFactory.java | 57 ------ .../ai/service/impl/AiChatServiceImpl.java | 55 +++--- .../ai/service/model/AiApiKeyService.java | 11 ++ .../ai/service/model/AiApiKeyServiceImpl.java | 15 ++ .../ai/config/YudaoAiAutoConfiguration.java | 30 ++-- .../ai/core/factory/AiClientFactory.java | 47 +++++ .../ai/core/factory/AiClientFactoryImpl.java | 167 ++++++++++++++++++ .../ai/core/model/tongyi/QianWenOptions.java | 2 + .../ai/core/model/xinghuo/XingHuoOptions.java | 2 +- .../ai/core/model/yiyan/YiYanChatOptions.java | 1 + .../ai/core/model/yiyan/api/YiYanApi.java | 3 +- .../src/main/resources/application.yaml | 7 - 12 files changed, 289 insertions(+), 108 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java deleted file mode 100644 index 5efd264a97..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/config/AiChatClientFactory.java +++ /dev/null @@ -1,57 +0,0 @@ -package cn.iocoder.yudao.module.ai.config; - -import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import org.springframework.ai.chat.ChatClient; -import org.springframework.ai.chat.StreamingChatClient; -import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; -import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; -import org.springframework.ai.ollama.OllamaChatClient; -import org.springframework.ai.openai.OpenAiChatClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Component; - -/** - * factory - * - * @author fansili - * @time 2024/4/25 17:36 - * @since 1.0 - */ -@Component -public class AiChatClientFactory { - - @Autowired - private ApplicationContext applicationContext; - - public ChatClient getChatClient(AiPlatformEnum platformEnum) { - if (AiPlatformEnum.QIAN_WEN == platformEnum) { - return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YI_YAN == platformEnum) { - return applicationContext.getBean(YiYanChatClient.class); - } else if (AiPlatformEnum.XING_HUO == platformEnum) { - return applicationContext.getBean(XingHuoChatClient.class); - } - throw new IllegalArgumentException("不支持的 chat client!"); - } - - // TODO yunai 要不再加一个接口,让他们拥有 ChatClient、StreamingChatClient 功能 - public StreamingChatClient getStreamingChatClient(AiPlatformEnum platformEnum) { -// if (true) { -// return applicationContext.getBean(OllamaChatClient.class); -// } - if (AiPlatformEnum.QIAN_WEN == platformEnum) { - return applicationContext.getBean(QianWenChatClient.class); - } else if (AiPlatformEnum.YI_YAN == platformEnum) { - return applicationContext.getBean(YiYanChatClient.class); - } else if (AiPlatformEnum.XING_HUO == platformEnum) { - return applicationContext.getBean(XingHuoChatClient.class); - } else if (AiPlatformEnum.OLLAMA == platformEnum) { - return applicationContext.getBean(OllamaChatClient.class); - } else if (AiPlatformEnum.OPENAI == platformEnum) { - return applicationContext.getBean(OpenAiChatClient.class); - } - throw new IllegalArgumentException("不支持的 chat client!"); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index c603f43e81..32511141c7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -4,13 +4,20 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; +import jakarta.annotation.Resource; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.messages.*; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; @@ -19,12 +26,7 @@ import cn.iocoder.yudao.module.ai.service.AiChatService; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; -import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.ai.chat.ChatResponse; -import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.messages.*; -import org.springframework.ai.chat.prompt.Prompt; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -46,16 +48,22 @@ import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NO */ @Slf4j @Service -@AllArgsConstructor public class AiChatServiceImpl implements AiChatService { - private final AiChatClientFactory chatClientFactory; + @Resource + private AiChatMessageMapper chatMessageMapper; - private final AiChatMessageMapper chatMessageMapper; + @Resource + private AiClientFactory clientFactory; - private final AiChatConversationService chatConversationService; - private final AiChatModelService chatModalService; - private final AiChatRoleService chatRoleService; + @Resource + private AiChatConversationService chatConversationService; + @Resource + private AiChatModelService chatModalService; + @Resource + private AiChatRoleService chatRoleService; + @Resource + private AiApiKeyService apiKeyService; @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { @@ -106,8 +114,7 @@ public class AiChatServiceImpl implements AiChatService { List historyMessages = chatMessageMapper.selectByConversationId(conversation.getId()); // 1.2 校验模型 AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); - AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); - StreamingChatClient chatClient = chatClientFactory.getStreamingChatClient(platform); + StreamingChatClient chatClient = apiKeyService.getStreamingChatClient(model.getKeyId()); // 2. 插入 user 发送消息 AiChatMessageDO userMessage = createChatMessage(conversation.getId(), null, model, @@ -118,13 +125,13 @@ public class AiChatServiceImpl implements AiChatService { userId, conversation.getRoleId(), MessageType.ASSISTANT, "", sendReqVO.getUseContext()); // 3.2 创建 chat 需要的 Prompt - Prompt prompt = buildPrompt(conversation, historyMessages, sendReqVO); + Prompt prompt = buildPrompt(conversation, historyMessages, model, sendReqVO); Flux streamResponse = chatClient.stream(prompt); // 3.3 流式返回 // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 StringBuffer contentBuffer = new StringBuffer(); - return streamResponse.publishOn(Schedulers.immediate()).map(chunk -> { + return streamResponse.publishOn(Schedulers.single()).map(chunk -> { String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); @@ -144,7 +151,8 @@ public class AiChatServiceImpl implements AiChatService { return chatMessageMapper.deleteByConversationId(conversationId) > 0; } - private Prompt buildPrompt(AiChatConversationDO conversation, List messages, AiChatMessageSendReqVO sendReqVO) { + private Prompt buildPrompt(AiChatConversationDO conversation, List messages, + AiChatModelDO model, AiChatMessageSendReqVO sendReqVO) { // 1. 构建 Prompt Message 列表 List chatMessages = new ArrayList<>(); // 1.1 system context 角色设定 @@ -156,10 +164,11 @@ public class AiChatServiceImpl implements AiChatService { chatMessages.add(new UserMessage(sendReqVO.getContent())); // 2. 构建 ChatOptions 对象 TODO 芋艿:临时注释掉;等文心一言兼容了; - // TODO 每一轮 token 数量 -// ChatOptions chatOptions = ChatOptionsBuilder.builder().withTemperature(conversation.getTemperature().floatValue()).build(); -// return new Prompt(chatMessages, null); - return new Prompt(chatMessages); + AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); + ChatOptions chatOptions = clientFactory.buildChatOptions(platform, model.getModel(), + conversation.getTemperature(), conversation.getMaxTokens()); + return new Prompt(chatMessages, chatOptions); +// return new Prompt(chatMessages); } /** diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java index 331dd62e2b..8056eab780 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageR import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import jakarta.validation.Valid; +import org.springframework.ai.chat.StreamingChatClient; import java.util.List; @@ -68,4 +69,14 @@ public interface AiApiKeyService { */ List getApiKeyList(); + // ========== 与 spring-ai 集成 ========== + + /** + * 获得 StreamingChatClient 对象 + * + * @param id 编号 + * @return StreamingChatClient 对象 + */ + StreamingChatClient getStreamingChatClient(Long id); + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java index f8a83ce57c..e4db8125ba 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.ai.service.model; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -8,6 +10,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveR import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import cn.iocoder.yudao.module.ai.dal.mysql.model.AiApiKeyMapper; import jakarta.annotation.Resource; +import org.springframework.ai.chat.StreamingChatClient; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -28,6 +31,9 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { @Resource private AiApiKeyMapper apiKeyMapper; + @Resource + private AiClientFactory clientFactory; + @Override public Long createApiKey(AiApiKeySaveReqVO createReqVO) { // 插入 @@ -86,4 +92,13 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { return apiKeyMapper.selectList(); } + // ========== 与 spring-ai 集成 ========== + + @Override + public StreamingChatClient getStreamingChatClient(Long id) { + AiApiKeyDO apiKey = validateApiKey(id); + AiPlatformEnum platform = AiPlatformEnum.validatePlatform(apiKey.getPlatform()); + return clientFactory.getOrCreateStreamingChatClient(platform, apiKey.getApiKey(), apiKey.getUrl()); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index f942b12bd2..55705c40ff 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.framework.ai.config; import cn.hutool.core.io.IoUtil; +import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; +import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactoryImpl; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; @@ -36,17 +38,22 @@ import java.util.HashMap; import java.util.Map; /** - * ai 自动配置 + * 芋道 AI 自动配置 * * @author fansili - * @time 2024/4/12 16:29 - * @since 1.0 */ -@Slf4j @AutoConfiguration @EnableConfigurationProperties(YudaoAiProperties.class) +@Slf4j public class YudaoAiAutoConfiguration { + @Bean + public AiClientFactory aiClientFactory() { + return new AiClientFactoryImpl(); + } + + // ========== 各种 AI Client 创建 ========== + @Bean @ConditionalOnProperty(value = "yudao.ai.xinghuo.enable", havingValue = "true") public XingHuoChatClient xingHuoChatClient(YudaoAiProperties yudaoAiProperties) { @@ -107,21 +114,6 @@ public class YudaoAiAutoConfiguration { ); } - @Bean - @ConditionalOnProperty(value = "yudao.ai.openAiImage.enable", havingValue = "true") - public OpenAiImageClient openAiImageClient(YudaoAiProperties yudaoAiProperties) { - YudaoAiProperties.OpenAiImageProperties openAiImageProperties = yudaoAiProperties.getOpenAiImage(); - OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageProperties.getModel().getModel()); - openAiImageOptions.setStyle(openAiImageProperties.getStyle().getStyle()); - openAiImageOptions.setResponseFormat("url"); // TODO 芋艿:OpenAiImageOptions.ResponseFormatEnum.URL.getValue() - // 创建 client - return new OpenAiImageClient( - new OpenAiImageApi(openAiImageProperties.getApiKey()), - openAiImageOptions, - RetryUtils.DEFAULT_RETRY_TEMPLATE); - } - @Bean @ConditionalOnMissingBean(value = MidjourneyMessageHandler.class) public MidjourneyMessageHandler defaultMidjourneyMessageHandler() { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java new file mode 100644 index 0000000000..98707fdc84 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.framework.ai.core.factory; + +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.prompt.ChatOptions; + +/** + * AI 客户端工厂的接口类 + * + * @author fansili + */ +public interface AiClientFactory { + + /** + * 基于指定配置,获得 StreamingChatClient 对象 + * + * 如果不存在,则进行创建 + * + * @param platform 平台 + * @param apiKey API KEY + * @param url API URL + * @return StreamingChatClient 对象 + */ + StreamingChatClient getOrCreateStreamingChatClient(AiPlatformEnum platform, String apiKey, String url); + + /** + * 基于默认配置,获得 StreamingChatClient 对象 + * + * 默认配置,指的是在 application.yaml 配置文件中的 spring.ai 相关的配置 + * + * @param platform 平台 + * @return StreamingChatClient 对象 + */ + StreamingChatClient getDefaultStreamingChatClient(AiPlatformEnum platform); + + /** + * 创建 Chat 参数 + * + * @param platform 平台 + * @param model 模型 + * @param temperature 温度 + * @param maxTokens 生成的最大 Token + * @return Chat 参数 + */ + ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens); + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java new file mode 100644 index 0000000000..b005d7c3e0 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -0,0 +1,167 @@ +package cn.iocoder.yudao.framework.ai.core.factory; + +import cn.hutool.core.lang.Assert; +import cn.hutool.core.lang.Singleton; +import cn.hutool.core.lang.func.Func0; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.spring.SpringUtil; +import cn.iocoder.yudao.framework.ai.config.YudaoAiAutoConfiguration; +import cn.iocoder.yudao.framework.ai.config.YudaoAiProperties; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; +import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.ollama.OllamaChatClient; +import org.springframework.ai.ollama.api.OllamaApi; +import org.springframework.ai.ollama.api.OllamaOptions; +import org.springframework.ai.openai.OpenAiChatClient; +import org.springframework.ai.openai.OpenAiChatOptions; +import org.springframework.ai.openai.api.ApiUtils; +import org.springframework.ai.openai.api.OpenAiApi; + +import java.util.List; + +/** + * AI 客户端工厂的实现类 + * + * @author 芋道源码 + */ +public class AiClientFactoryImpl implements AiClientFactory { + + @Override + public StreamingChatClient getOrCreateStreamingChatClient(AiPlatformEnum platform, String apiKey, String url) { + String cacheKey = buildClientCacheKey(StreamingChatClient.class, platform, apiKey, url); + return Singleton.get(cacheKey, (Func0) () -> { + //noinspection EnhancedSwitchMigration + switch (platform) { + case OPENAI: + return buildOpenAiChatClient(apiKey, url); + case OLLAMA: + return buildOllamaChatClient(url); + case YI_YAN: + return buildYiYanChatClient(apiKey); + case XING_HUO: + return buildXingHuoChatClient(apiKey); + case QIAN_WEN: + return buildQianWenChatClient(apiKey); + default: + throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); + } + }); + } + + @Override + public StreamingChatClient getDefaultStreamingChatClient(AiPlatformEnum platform) { + //noinspection EnhancedSwitchMigration + switch (platform) { + case OPENAI: + return SpringUtil.getBean(OpenAiChatClient.class); + case OLLAMA: + return SpringUtil.getBean(OllamaChatClient.class); + case YI_YAN: + return SpringUtil.getBean(YiYanChatClient.class); + case XING_HUO: + return SpringUtil.getBean(XingHuoChatClient.class); + case QIAN_WEN: + return SpringUtil.getBean(QianWenChatClient.class); + default: + throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); + } + } + + private static String buildClientCacheKey(Class clazz, Object... params) { + if (ArrayUtil.isEmpty(params)) { + return clazz.getName(); + } + return StrUtil.format("{}#{}", clazz.getName(), ArrayUtil.join(params, "_")); + } + + @Override + public ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens) { + Float temperatureF = temperature != null ? temperature.floatValue() : null; + //noinspection EnhancedSwitchMigration + switch (platform) { + case OPENAI: + return OpenAiChatOptions.builder().withModel(model).withTemperature(temperatureF).withMaxTokens(maxTokens).build(); + case OLLAMA: + return OllamaOptions.create().withModel(model).withTemperature(temperatureF).withNumPredict(maxTokens); + case YI_YAN: + // TODO @fan:增加一个 model + return new YiYanChatOptions().setTemperature(temperatureF).setMaxOutputTokens(maxTokens); + case XING_HUO: + return new XingHuoOptions().setChatModel(XingHuoChatModel.valueOfModel(model)).setTemperature(temperatureF) + .setMaxTokens(maxTokens); + case QIAN_WEN: + // TODO @fan:增加 model、temperature 参数 + return new QianWenOptions().setMaxTokens(maxTokens); + default: + throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); + } + } + + // ========== 各种创建 spring-ai 客户端的方法 ========== + + /** + * 可参考 {@link OpenAiAutoConfiguration} + */ + private static OpenAiChatClient buildOpenAiChatClient(String openAiToken, String url) { + url = StrUtil.blankToDefault(url, ApiUtils.DEFAULT_BASE_URL); + OpenAiApi openAiApi = new OpenAiApi(url, openAiToken); + return new OpenAiChatClient(openAiApi); + } + + /** + * 可参考 {@link OllamaAutoConfiguration} + */ + private static OllamaChatClient buildOllamaChatClient(String url) { + OllamaApi ollamaApi = new OllamaApi(url); + return new OllamaChatClient(ollamaApi); + } + + /** + * 可参考 {@link YudaoAiAutoConfiguration#yiYanChatClient(YudaoAiProperties)} + */ + private static YiYanChatClient buildYiYanChatClient(String key) { + List keys = StrUtil.split(key, '|'); + Assert.equals(keys.size(), 2, "YiYanChatClient 的密钥需要 (appKey|secretKey) 格式"); + String appKey = keys.get(0); + String secretKey = keys.get(1); + YiYanApi yiYanApi = new YiYanApi(appKey, secretKey, YiYanApi.DEFAULT_CHAT_MODEL, 0); + return new YiYanChatClient(yiYanApi); + } + + /** + * 可参考 {@link YudaoAiAutoConfiguration#xingHuoChatClient(YudaoAiProperties)} + */ + private static XingHuoChatClient buildXingHuoChatClient(String key) { + List keys = StrUtil.split(key, '|'); + Assert.equals(keys.size(), 2, "XingHuoChatClient 的密钥需要 (appKey|secretKey) 格式"); + String appId = keys.get(0); + String appKey = keys.get(1); + String secretKey = keys.get(2); + XingHuoApi xingHuoApi = new XingHuoApi(appId, appKey, secretKey); + return new XingHuoChatClient(xingHuoApi); + } + + /** + * 可参考 {@link YudaoAiAutoConfiguration#qianWenChatClient(YudaoAiProperties)} + */ + private static QianWenChatClient buildQianWenChatClient(String key) { + QianWenApi qianWenApi = new QianWenApi(key, QianWenChatModal.QWEN_72B_CHAT); + return new QianWenChatClient(qianWenApi); + } + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java index b6dba53c96..4f7632c974 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java @@ -6,6 +6,8 @@ import lombok.experimental.Accessors; import java.util.List; +// TODO @fan:增加一个 model 参数 +// TODO @fan:增加一个 Temperature 参数 /** * 阿里云 千问 属性 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java index cb47538334..ccec8598dd 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/xinghuo/XingHuoOptions.java @@ -14,6 +14,7 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class XingHuoOptions implements ChatOptions { + // TODO @fan:这里 model 参数,然后使用 string /** * https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E *

@@ -43,7 +44,6 @@ public class XingHuoOptions implements ChatOptions { */ private String chatId; - @Override public Float getTemperature() { return this.temperature; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java index 14146a3226..a84b0ec98b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/YiYanChatOptions.java @@ -6,6 +6,7 @@ import org.springframework.ai.chat.prompt.ChatOptions; import java.util.List; +// TODO @fan:增加一个 model // TODO @fan:字段命名,penalty_score 类似的,建议改成驼峰原则 // TODO @fan:字段的注释,可以都删除掉,让用户 https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t 即可 /** diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java index 535901f25c..93cd13fe18 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/yiyan/api/YiYanApi.java @@ -18,7 +18,7 @@ public class YiYanApi { private static final String AUTH_2_TOKEN_URI = "/oauth/2.0/token"; - public static final String DEFAULT_CHAT_MODEL = YiYanChatModel.ERNIE4_0.getModel(); + public static final YiYanChatModel DEFAULT_CHAT_MODEL = YiYanChatModel.ERNIE4_0; private final String appKey; private final String secretKey; @@ -39,6 +39,7 @@ public class YiYanApi { */ private final YiYanChatModel useChatModel; + // TODO fan:看看是不是去掉 refreshTokenSecondTime 字段 public YiYanApi(String appKey, String secretKey, YiYanChatModel useChatModel, int refreshTokenSecondTime) { this.appKey = appKey; this.secretKey = secretKey; diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 6bb087d819..cc5ed76a38 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -150,15 +150,8 @@ spring.ai: chat: model: llama3 openai: -# api-key: sk-QmgIIPc5xiYd8lPb076b1b7774Ea49Af9eD2Ef172c8f7e43 -# base-url: https://openkey.cloud -# api-key: sk-gkgfYxhX9FxyZJznwxRZSJwKeGQYNPDVWjhby2PRRf17GHeT -# base-url: https://api.chatanywhere.tech api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z base-url: https://api.gptsapi.net -# chat: -# options: -# model: gpt-4-0125-preview yudao.ai: yiyan: -- Gitee From 3b02bcf4f84b11cf72c2573dad91924f322e4110 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 22 May 2024 12:39:55 +0800 Subject: [PATCH 0584/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E9=80=9A=E8=BF=87=20AiClientFactory=20=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=20chatclient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java index d2682eba87..a67517fed0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java @@ -18,7 +18,6 @@ import org.springframework.ai.chat.messages.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.module.ai.config.AiChatClientFactory; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; -- Gitee From a48287611358f7b885ca0e7b99e14ede39af6347 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 22 May 2024 13:12:54 +0800 Subject: [PATCH 0585/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=81=8A=E5=A4=A9=E6=B6=88=E6=81=AF=E7=9A=84=20Servi?= =?UTF-8?q?ce=20=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 4 +- .../admin/chat/AiChatMessageController.java | 64 +++++++++--- .../vo/message/AiChatMessageSendRespVO.java | 7 +- .../ai/convert/AiChatMessageConvert.java | 30 ------ .../ai/dal/mysql/AiChatMessageMapper.java | 43 -------- .../ai/dal/mysql/AiChatModelMapper.java | 6 -- .../module/ai/dal/mysql/AiImageMapper.java | 1 - .../dal/mysql/chat/AiChatMessageMapper.java | 24 +++++ .../AiChatMessageService.java} | 52 +++++----- .../AiChatMessageServiceImpl.java} | 97 ++++++++----------- .../ai/service/model/AiChatRoleService.java | 18 ++-- .../service/model/AiChatRoleServiceImpl.java | 15 +-- 12 files changed, 166 insertions(+), 195 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{AiChatService.java => chat/AiChatMessageService.java} (31%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{impl/AiChatServiceImpl.java => chat/AiChatMessageServiceImpl.java} (77%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 4542c07877..cd1985f81d 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -30,8 +30,8 @@ public interface ErrorCodeConstants { ErrorCode CHAT_CONVERSATION_UPDATE_MAX_TOKENS_ERROR = new ErrorCode(1_040_003_002, "更新对话失败,最大 Token 超过上限"); ErrorCode CHAT_CONVERSATION_UPDATE_MAX_CONTEXTS_ERROR = new ErrorCode(1_040_003_002, "更新对话失败,最大 Context 超过上限"); - // chat - ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_022_000_100, "提问的 MessageId 不存在!"); + // ========== API 聊天消息 1-040-004-000 ========== + ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_040_004_000, "消息不存在!"); // midjourney diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index ad9375f39a..2522d0dc0d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -1,8 +1,19 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; -import cn.iocoder.yudao.module.ai.service.AiChatService; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; +import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; +import cn.iocoder.yudao.module.ai.service.chat.AiChatMessageService; +import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -14,9 +25,12 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import reactor.core.publisher.Flux; +import java.util.Collections; import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - 聊天消息") @@ -26,39 +40,65 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti public class AiChatMessageController { @Resource - private AiChatService chatService; + private AiChatMessageService chatMessageService; + @Resource + private AiChatConversationService chatConversationService; + @Resource + private AiChatRoleService chatRoleService; + + @Resource + private AdminUserApi adminUserApi; @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") @PostMapping("/send") public CommonResult sendMessage(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { - return success(chatService.chat(sendReqVO)); + return success(chatMessageService.sendMessage(sendReqVO)); } @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) @PermitAll // 解决 SSE 最终响应的时候,会被 Access Denied 拦截的问题 public Flux sendChatMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { - return chatService.sendChatMessageStream(sendReqVO, getLoginUserId()); + return chatMessageService.sendChatMessageStream(sendReqVO, getLoginUserId()); } @Operation(summary = "获得指定会话的消息列表") @GetMapping("/list-by-conversation-id") @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") - public CommonResult> getMessageListByConversationId(@RequestParam("conversationId") Long conversationId) { - return success(chatService.getMessageListByConversationId(conversationId)); + public CommonResult> getChatMessageListByConversationId( + @RequestParam("conversationId") Long conversationId) { + AiChatConversationDO conversation = chatConversationService.getChatConversation(conversationId); + if (conversation == null || ObjUtil.notEqual(conversation.getUserId(), getLoginUserId())) { + return success(Collections.emptyList()); + } + List messageList = chatMessageService.getChatMessageListByConversationId(conversationId); + if (CollUtil.isEmpty(messageList)) { + return success(Collections.emptyList()); + } + + // 拼接数据 + Map roleMap = chatRoleService.getChatRoleMap(convertSet(messageList, AiChatMessageDO::getRoleId)); + AdminUserRespDTO user = adminUserApi.getUser(getLoginUserId()); + return success(BeanUtils.toBean(messageList, AiChatMessageRespVO.class, respVO -> { + MapUtils.findAndThen(roleMap, respVO.getRoleId(), role -> respVO.setRoleAvatar(role.getAvatar())); + respVO.setUserAvatar(user.getAvatar()); + })); } @Operation(summary = "删除消息") @DeleteMapping("/delete") @Parameter(name = "id", required = true, description = "消息编号", example = "1024") - public CommonResult deleteMessage(@RequestParam("id") Long id) { - return success(chatService.deleteMessage(id)); + public CommonResult deleteChatMessage(@RequestParam("id") Long id) { + chatMessageService.deleteMessage(id, getLoginUserId()); + return success(true); } - @Operation(summary = "删除消息-对于对话全部消息") + @Operation(summary = "删除指定会话的消息") @DeleteMapping("/delete-by-conversation-id") - @Parameter(name = "id", required = true, description = "消息编号", example = "1024") - public CommonResult deleteByConversationId(@RequestParam("conversationId") Long conversationId) { - return success(chatService.deleteByConversationId(conversationId)); + @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") + public CommonResult deleteChatMessageByConversationId(@RequestParam("conversationId") Long conversationId) { + chatMessageService.deleteChatMessageByConversationId(conversationId, getLoginUserId()); + return success(true); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java index 3314b1d328..fbc31eea57 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageSendRespVO.java @@ -31,13 +31,14 @@ public class AiChatMessageSendRespVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; - // ========= 扩展字段 + // ========== 扩展字段 ========== - @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://iocoder.cn/1.png") private String userAvatar; - @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://iocoder.cn/2.png") private String roleAvatar; + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java deleted file mode 100644 index eda5563584..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiChatMessageConvert.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.ai.convert; - -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 聊天 对话 convert - * - * @author fansili - * @time 2024/4/18 16:39 - * @since 1.0 - */ -@Mapper -public interface AiChatMessageConvert { - - AiChatMessageConvert INSTANCE = Mappers.getMapper(AiChatMessageConvert.class); - - /** - * 转换 AiChatMessageRespVO - * - * @param aiChatMessageDOList - * @return - */ - List convertAiChatMessageRespVOList(List aiChatMessageDOList); - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java deleted file mode 100644 index 6c9c22ad03..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatMessageMapper.java +++ /dev/null @@ -1,43 +0,0 @@ -package cn.iocoder.yudao.module.ai.dal.mysql; - -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * message mapper - * - * @fansili - * @since v1.0 - */ -@Repository -@Mapper -public interface AiChatMessageMapper extends BaseMapperX { - - /** - * 查询 - 根据 对话id查询 - * - * @param conversationId - */ - default List selectByConversationId(Long conversationId) { - return this.selectList( - new LambdaQueryWrapperX() - .eq(AiChatMessageDO::getConversationId, conversationId) - .orderByAsc(AiChatMessageDO::getId) - ); - } - - /** - * 删除 - 根据 conversationId - * - * @param conversationId - */ - default int deleteByConversationId(Long conversationId) { - return this.delete(new LambdaQueryWrapperX().eq(AiChatMessageDO::getConversationId, conversationId)); - } -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java index 3c959e9617..25687d0e0c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java @@ -1,18 +1,13 @@ package cn.iocoder.yudao.module.ai.dal.mysql; -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - import java.util.Collection; import java.util.List; @@ -42,7 +37,6 @@ public interface AiChatModelMapper extends BaseMapperX { return this.selectList(new LambdaQueryWrapperX().eq(AiChatModelDO::getId, modalIds)); } - default PageResult selectPage(AiChatModelPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(AiChatModelDO::getName, reqVO.getName()) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java index 1ee5b436d4..d353fea5aa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java @@ -13,7 +13,6 @@ import org.springframework.stereotype.Repository; * @time 2024/4/28 14:01 * @since 1.0 */ -@Repository @Mapper public interface AiImageMapper extends BaseMapperX { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java new file mode 100644 index 0000000000..7b3e9c4937 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.ai.dal.mysql.chat; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * AI 聊天对话 Mapper + * + * @author fansili + */ +@Mapper +public interface AiChatMessageMapper extends BaseMapperX { + + default List selectListByConversationId(Long conversationId) { + return selectList(new LambdaQueryWrapperX() + .eq(AiChatMessageDO::getConversationId, conversationId) + .orderByAsc(AiChatMessageDO::getId)); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java similarity index 31% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java index f8924cb635..e9dc43ec9c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiChatService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java @@ -1,57 +1,57 @@ -package cn.iocoder.yudao.module.ai.service; +package cn.iocoder.yudao.module.ai.service.chat; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import reactor.core.publisher.Flux; import java.util.List; /** - * 聊天 chat + * AI 聊天消息 Service 接口 * * @author fansili - * @time 2024/4/14 15:55 - * @since 1.0 */ -public interface AiChatService { +public interface AiChatMessageService { /** - * chat + * 发送消息 * - * @param sendReqVO - * @return + * @param sendReqVO 发送信息 + * @return 发送结果 */ - AiChatMessageRespVO chat(AiChatMessageSendReqVO sendReqVO); + AiChatMessageRespVO sendMessage(AiChatMessageSendReqVO sendReqVO); /** - * 获取 - 获取对话 message list + * 发送消息 * - * @param conversationId - * @return + * @param sendReqVO 发送信息 + * @param userId 用户编号 + * @return 发送结果 */ - List getMessageListByConversationId(Long conversationId); + Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); /** - * 删除 - 删除message + * 获得指定会话的消息列表 * - * @param id - * @return + * @param conversationId 会话编号 + * @return 消息列表 */ - Boolean deleteMessage(Long id); + List getChatMessageListByConversationId(Long conversationId); /** - * 发送消息 + * 删除消息 * - * @param sendReqVO - * @param userId - * @return + * @param id 消息编号 + * @param userId 用户编号 */ - Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); + void deleteMessage(Long id, Long userId); /** - * 删除消息-对于对话全部消息 + * 删除指定会话的消息 * - * @param conversationId - * @return + * @param conversationId 会话编号 + * @param userId 用户编号 */ - Boolean deleteByConversationId(Long conversationId); + void deleteChatMessageByConversationId(Long conversationId, Long userId); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java similarity index 77% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index a67517fed0..3e4f602586 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service.impl; +package cn.iocoder.yudao.module.ai.service.chat; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; @@ -20,13 +20,10 @@ import org.springframework.ai.chat.prompt.Prompt; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; -import cn.iocoder.yudao.module.ai.convert.AiChatMessageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatMessageMapper; -import cn.iocoder.yudao.module.ai.service.AiChatService; -import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; +import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatMessageMapper; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; import lombok.extern.slf4j.Slf4j; @@ -37,21 +34,20 @@ import reactor.core.scheduler.Schedulers; import java.time.LocalDateTime; import java.util.*; -import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; /** - * 聊天 service + * AI 聊天消息 Service 实现类 * * @author fansili - * @time 2024/4/14 15:55 - * @since 1.0 */ -@Slf4j @Service -public class AiChatServiceImpl implements AiChatService { +@Slf4j +public class AiChatMessageServiceImpl implements AiChatMessageService { @Resource private AiChatMessageMapper chatMessageMapper; @@ -72,7 +68,7 @@ public class AiChatServiceImpl implements AiChatService { private AdminUserApi adminUserApi; @Transactional(rollbackFor = Exception.class) - public AiChatMessageRespVO chat(AiChatMessageSendReqVO req) { + public AiChatMessageRespVO sendMessage(AiChatMessageSendReqVO req) { return null; // TODO 芋艿:一起改 // Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // // 查询对话 @@ -117,10 +113,13 @@ public class AiChatServiceImpl implements AiChatService { if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); // TODO 芋艿:异常情况的对接; } - List historyMessages = chatMessageMapper.selectByConversationId(conversation.getId()); + List historyMessages = chatMessageMapper.selectListByConversationId(conversation.getId()); // 1.2 校验模型 AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); StreamingChatClient chatClient = apiKeyService.getStreamingChatClient(model.getKeyId()); + // 1.3 获取用户头像、角色头像 + AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); + AiChatRoleDO role = conversation.getRoleId() != null ? chatRoleService.getChatRole(conversation.getRoleId()) : null; // 2. 插入 user 发送消息 AiChatMessageDO userMessage = createChatMessage(conversation.getId(), null, model, @@ -136,19 +135,17 @@ public class AiChatServiceImpl implements AiChatService { // 3.3 流式返回 // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 - - // 3.4 获取用户头像、角色头像 - AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); - AiChatRoleDO chatRole = chatRoleService.getChatRole(assistantMessage.getRoleId()); - StringBuffer contentBuffer = new StringBuffer(); return streamResponse.publishOn(Schedulers.single()).map(chunk -> { String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); // 响应结果 - return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class).setUserAvatar(user.getAvatar())) - .setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent).setRoleAvatar(chatRole == null ? null : chatRole.getAvatar())); + AiChatMessageSendRespVO.Message send = BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class, + o -> o.setUserAvatar(user.getAvatar())); + AiChatMessageSendRespVO.Message receive = BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class, + o -> o.setRoleAvatar(role != null ? role.getAvatar() : null)).setContent(newContent); + return new AiChatMessageSendRespVO().setSend(send).setReceive(receive); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { @@ -157,11 +154,6 @@ public class AiChatServiceImpl implements AiChatService { }); } - @Override - public Boolean deleteByConversationId(Long conversationId) { - return chatMessageMapper.deleteByConversationId(conversationId) > 0; - } - private Prompt buildPrompt(AiChatConversationDO conversation, List messages, AiChatModelDO model, AiChatMessageSendReqVO sendReqVO) { // 1. 构建 Prompt Message 列表 @@ -174,12 +166,11 @@ public class AiChatServiceImpl implements AiChatService { // 1.3 user message 新发送消息 chatMessages.add(new UserMessage(sendReqVO.getContent())); - // 2. 构建 ChatOptions 对象 TODO 芋艿:临时注释掉;等文心一言兼容了; + // 2. 构建 ChatOptions 对象 AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); ChatOptions chatOptions = clientFactory.buildChatOptions(platform, model.getModel(), conversation.getTemperature(), conversation.getMaxTokens()); return new Prompt(chatMessages, chatOptions); -// return new Prompt(chatMessages); } /** @@ -231,42 +222,30 @@ public class AiChatServiceImpl implements AiChatService { } @Override - public List getMessageListByConversationId(Long conversationId) { - // 校验对话是否存在 - chatConversationService.validateExists(conversationId); - // 获取对话所有 message - List aiChatMessageDOList = chatMessageMapper.selectByConversationId(conversationId); - // 获取模型信息 - Set roleIds = aiChatMessageDOList.stream().map(AiChatMessageDO::getRoleId).collect(Collectors.toSet()); - List roleList; - if (!CollUtil.isEmpty(roleIds)) { - roleList = chatRoleService.getChatRoles(roleIds); - } else { - roleList = Collections.emptyList(); + public List getChatMessageListByConversationId(Long conversationId) { + return chatMessageMapper.selectListByConversationId(conversationId); + } + + @Override + public void deleteMessage(Long id, Long userId) { + // 1. 校验消息存在 + AiChatMessageDO message = chatMessageMapper.selectById(id); + if (message == null || ObjUtil.notEqual(message.getUserId(), userId)) { + throw exception(AI_CHAT_MESSAGE_NOT_EXIST); } - Map roleMap = roleList.stream().collect(Collectors.toMap(AiChatRoleDO::getId, o -> o)); - // 转换 AiChatMessageRespVO - List aiChatMessageRespList = AiChatMessageConvert.INSTANCE.convertAiChatMessageRespVOList(aiChatMessageDOList); - // 获取用户信息 - AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); - // 设置用户头像 和 模型头像 - return aiChatMessageRespList.stream().map(item -> { - // 设置 role 头像 - if (roleMap.containsKey(item.getRoleId())) { - AiChatRoleDO role = roleMap.get(item.getRoleId()); - item.setRoleAvatar(role.getAvatar()); - } - // 设置 user 头像 - if (user != null) { - item.setUserAvatar(user.getAvatar()); - } - return item; - }).collect(Collectors.toList()); + // 2. 执行删除 + chatMessageMapper.deleteById(id); } @Override - public Boolean deleteMessage(Long id) { - return chatMessageMapper.deleteById(id) > 0; + public void deleteChatMessageByConversationId(Long conversationId, Long userId) { + // 1. 校验消息存在 + List messages = chatMessageMapper.selectListByConversationId(conversationId); + if (CollUtil.isEmpty(messages) || ObjUtil.notEqual(messages.get(0).getUserId(), userId)) { + throw exception(AI_CHAT_MESSAGE_NOT_EXIST); + } + // 2. 执行删除 + chatMessageMapper.deleteBatchIds(convertList(messages, AiChatMessageDO::getId)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index 228b1ee6e9..a7bc2501a7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -4,12 +4,14 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRolePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import jakarta.validation.Valid; +import java.util.Collection; import java.util.List; -import java.util.Set; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; /** * AI 聊天角色 Service 接口 @@ -74,12 +76,16 @@ public interface AiChatRoleService { AiChatRoleDO getChatRole(Long id); /** - * 获得聊天角色 - 根据 ids + * 获得聊天角色列表 * - * @param roleIds - * @return + * @param ids 编号数组 + * @return 聊天角色列表 */ - List getChatRoles(Set roleIds); + List getChatRoleList(Collection ids); + + default Map getChatRoleMap(Collection ids) { + return convertMap(getChatRoleList(ids), AiChatRoleDO::getId); + } /** * 校验聊天角色是否合法 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 1413dd8ce1..d3083ec9fb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.service.model; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; @@ -14,12 +15,9 @@ import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.Collection; +import java.util.Collections; import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -107,8 +105,11 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { } @Override - public List getChatRoles(Set roleIds) { - return chatRoleMapper.selectBatchIds(roleIds); + public List getChatRoleList(Collection ids) { + if (CollUtil.isEmpty(ids)) { + return Collections.emptyList(); + } + return chatRoleMapper.selectBatchIds(ids); } @Override -- Gitee From b227b039c961d04ba49af8f022278c784b4c3431 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 23 May 2024 17:14:35 +0800 Subject: [PATCH 0586/1557] =?UTF-8?q?MEMBER:=20=E6=A0=B9=E6=8D=AE=E3=80=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1=E3=80=91=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 22 ++++++++++++++----- .../app/social/vo/AppSocialWxQrcodeReqVO.java | 19 +++++----------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 2cf7b8641a..722da6dabe 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.member.controller.app.social; +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -22,8 +24,6 @@ import jakarta.validation.Valid; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.Base64; - import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -33,6 +33,13 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti @Validated public class AppSocialUserController { + public static final String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" + private static final String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) + private static final Integer WIDTH = 430; // 二维码宽度 + private static final Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + private static final Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 + private static final Boolean HYALINE = true; // 是否需要透明底色, hyaline 为true时,生成透明底色的小程序码 + @Resource private SocialUserApi socialUserApi; @Resource @@ -69,10 +76,13 @@ public class AppSocialUserController { @PostMapping("/wxa-qrcode") @Operation(summary = "获得微信小程序码(base64 image)") public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { - byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class) - .setEnvVersion(AppSocialWxQrcodeReqVO.ENV_VERSION)); - // TODO @puhui999:1)是不是 base64 返回,不拼接哈 data:image/png;base64;2)cn.hutool.core.codec.Base64.encode() - return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode)); + byte[] wxQrcode = socialClientApi.getWxaQrcode(new SocialWxQrcodeReqDTO().setPath(reqVO.getPath()) + .setEnvVersion(ENV_VERSION).setWidth(ObjUtil.defaultIfNull(reqVO.getWidth(), WIDTH)) + .setScene(ObjUtil.defaultIfNull(reqVO.getScene(), SCENE)) + .setAutoColor(ObjUtil.defaultIfNull(reqVO.getAutoColor(), AUTO_COLOR)) + .setHyaline(ObjUtil.defaultIfNull(reqVO.getHyaline(), HYALINE)) + .setCheckPath(ObjUtil.defaultIfNull(reqVO.getCheckPath(), CHECK_PATH))); + return success(Base64.encode(wxQrcode)); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index aabdc72c9d..8927a34c98 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -9,20 +9,11 @@ import lombok.Data; @Data public class AppSocialWxQrcodeReqVO { - // TODO @puhui999: 没有默认值 getQrcodeService().createWxaCodeUnlimitBytes() 转类型会报错 🤣 - // TODO @puhui999:懂了哈;default 最好在 controller 搞;对于 VO 来说,不给默认值; - public static String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" - private static String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) - private static Integer WIDTH = 430; // 二维码宽度 - private static Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 - private static Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 - private static Boolean HYALINE = true; // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 - /** * 页面路径不能携带参数(参数请放在scene字段里) */ @Schema(description = "场景值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001") - private String scene = SCENE; + private String scene; /** * 默认是主页,页面 page,例如 pages/index/index,根路径前不要填加 /,不能携带参数(参数请放在scene字段里), @@ -33,15 +24,15 @@ public class AppSocialWxQrcodeReqVO { private String path; @Schema(description = "二维码宽度", requiredMode = Schema.RequiredMode.REQUIRED, example = "430") - private Integer width = WIDTH; + private Integer width; @Schema(description = "是/否自动配置线条颜色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean autoColor = AUTO_COLOR; + private Boolean autoColor; @Schema(description = "是/否检查 page 是否存在", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean checkPath = CHECK_PATH; + private Boolean checkPath; @Schema(description = "是/否需要透明底色", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean hyaline = HYALINE; + private Boolean hyaline; } -- Gitee From d34fef67dae7259e7a05c5f19778d097467ec0e4 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 23 May 2024 22:34:56 +0800 Subject: [PATCH 0587/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E5=AE=A1=E6=89=B9=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=B6=85=E6=97=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmTimerBoundaryEventType.java | 24 ++++ .../BpmUserTaskTimeoutActionEnum.java | 26 ++++ .../core/enums/BpmnModelConstants.java | 10 ++ .../listener/BpmTimerFiredEventListener.java | 117 ++++++++++++++++++ .../SysNotifyTodoTaskReminderConsumer.java | 42 +++++++ .../message/task/TodoTaskReminderMessage.java | 34 +++++ .../task/TodoTaskReminderProducer.java | 25 ++++ .../simple/SimpleModelUserTaskConfig.java | 68 ++++++++++ .../flowable/core/util/SimpleModelUtils.java | 81 ++++++++---- .../bpm/service/task/BpmTaskService.java | 7 ++ .../bpm/service/task/BpmTaskServiceImpl.java | 7 ++ 11 files changed, 417 insertions(+), 24 deletions(-) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutActionEnum.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/consumer/task/SysNotifyTodoTaskReminderConsumer.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/message/task/TodoTaskReminderMessage.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/producer/task/TodoTaskReminderProducer.java create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java new file mode 100644 index 0000000000..b4c63c25f0 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import cn.hutool.core.util.ArrayUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 定时器边界事件类型枚举 + * + * @author jason + */ +@Getter +@AllArgsConstructor +public enum BpmTimerBoundaryEventType { + + USER_TASK_TIMEOUT(1,"用户任务超时"); + + private final Integer type; + private final String name; + + public static BpmTimerBoundaryEventType typeOf(Integer type) { + return ArrayUtil.firstMatch(eventType -> eventType.getType().equals(type), values()); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutActionEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutActionEnum.java new file mode 100644 index 0000000000..cc4d06d9d0 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskTimeoutActionEnum.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import cn.hutool.core.util.ArrayUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 用户任务超时处理执行动作枚举 + * + * @author jason + */ +@Getter +@AllArgsConstructor +public enum BpmUserTaskTimeoutActionEnum { + + AUTO_REMINDER(1,"自动提醒"), + AUTO_APPROVE(2, "自动同意"), + AUTO_REJECT(3, "自动拒绝"); + + private final Integer action; + private final String name; + + public static BpmUserTaskTimeoutActionEnum actionOf(Integer action) { + return ArrayUtil.firstMatch(item -> item.getAction().equals(action), values()); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index f26890c9a3..ec99ff9785 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -30,6 +30,16 @@ public interface BpmnModelConstants { */ String USER_TASK_CANDIDATE_PARAM = "candidateParam"; + /** + * BPMN ExtensionElement 的扩展属性,用于标记用户任务超时执行动作 + */ + String USER_TASK_TIMEOUT_HANDLER_ACTION = "timeoutAction"; + + /** + * BPMN ExtensionElement 的扩展属性,用于标记定时边界事件类型 + */ + String TIMER_BOUNDARY_EVENT_TYPE = "timerBoundaryEventType"; + /** * BPMN ExtensionElement 流程表单字段权限元素, 用于标记字段权限 */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java new file mode 100644 index 0000000000..780b6b739c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java @@ -0,0 +1,117 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskApproveReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRejectReqVO; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmTimerBoundaryEventType; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.message.task.TodoTaskReminderMessage; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.producer.task.TodoTaskReminderProducer; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; +import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; +import com.google.common.collect.ImmutableSet; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.flowable.bpmn.model.BoundaryEvent; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.ExtensionElement; +import org.flowable.bpmn.model.FlowElement; +import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; +import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; +import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; +import org.flowable.job.api.Job; +import org.flowable.task.api.Task; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Optional; +import java.util.Set; + +/** + * 监听定时器触发事件 + * + * @author jason + */ +@Component +@Slf4j +public class BpmTimerFiredEventListener extends AbstractFlowableEngineEventListener { + + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmModelService bpmModelService; + + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmTaskService bpmTaskService; + + @Resource + private TodoTaskReminderProducer todoTaskReminderProducer; + + public static final Set TIME_EVENTS = ImmutableSet.builder() + .add(FlowableEngineEventType.TIMER_FIRED) + .build(); + + public BpmTimerFiredEventListener() { + super(TIME_EVENTS); + } + + @Override + protected void timerFired(FlowableEngineEntityEvent event) { + String processDefinitionId = event.getProcessDefinitionId(); + BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(processDefinitionId); + Job entity = (Job) event.getEntity(); + FlowElement element = BpmnModelUtils.getFlowElementById(bpmnModel, entity.getElementId()); + // 如果是定时器边界事件 + if (element instanceof BoundaryEvent) { + BoundaryEvent boundaryEvent = (BoundaryEvent) element; + ExtensionElement extensionElement = CollUtil.getFirst(boundaryEvent.getExtensionElements().get(BpmnModelConstants.TIMER_BOUNDARY_EVENT_TYPE)); + Integer timerBoundaryEventType = NumberUtils.parseInt(Optional.ofNullable(extensionElement).map(ExtensionElement::getElementText).orElse(null)); + BpmTimerBoundaryEventType bpmTimerBoundaryEventType = BpmTimerBoundaryEventType.typeOf(timerBoundaryEventType); + // 类型为用户任务超时未处理的情况 + if (bpmTimerBoundaryEventType == BpmTimerBoundaryEventType.USER_TASK_TIMEOUT) { + ExtensionElement timeoutActionElement = CollUtil.getFirst(boundaryEvent.getExtensionElements().get(BpmnModelConstants.USER_TASK_TIMEOUT_HANDLER_ACTION)); + Integer timeoutAction = NumberUtils.parseInt(Optional.ofNullable(timeoutActionElement).map(ExtensionElement::getElementText).orElse(null)); + processUserTaskTimeout(event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), timeoutAction); + } + } + } + + private void processUserTaskTimeout(String processInstanceId, String taskDefKey, Integer timeoutAction) { + BpmUserTaskTimeoutActionEnum userTaskTimeoutAction = BpmUserTaskTimeoutActionEnum.actionOf(timeoutAction); + if (userTaskTimeoutAction != null) { + // 查询超时未处理的任务 + List taskList = bpmTaskService.getAssignedTaskListByConditions(processInstanceId, taskDefKey); + taskList.forEach(task -> { + // 自动提醒 + if (userTaskTimeoutAction == BpmUserTaskTimeoutActionEnum.AUTO_REMINDER) { + TodoTaskReminderMessage message = new TodoTaskReminderMessage().setTenantId(Long.parseLong(task.getTenantId())) + .setUserId(Long.parseLong(task.getAssignee())).setTaskName(task.getName()); + todoTaskReminderProducer.sendReminderMessage(message); + } + // 自动同意 + if (userTaskTimeoutAction == BpmUserTaskTimeoutActionEnum.AUTO_APPROVE) { + // TODO @芋艿 这个上下文如何清除呢? 任务通过后, BpmProcessInstanceEventListener 会有回调 + TenantContextHolder.setTenantId(Long.parseLong(task.getTenantId())); + TenantContextHolder.setIgnore(false); + BpmTaskApproveReqVO req = new BpmTaskApproveReqVO().setId(task.getId()) + .setReason("超时系统自动同意"); + bpmTaskService.approveTask(Long.parseLong(task.getAssignee()), req); + + } + // 自动拒绝 + if (userTaskTimeoutAction == BpmUserTaskTimeoutActionEnum.AUTO_REJECT) { + // TODO @芋艿 这个上下文如何清除呢? 任务拒绝后, BpmProcessInstanceEventListener 会有回调 + TenantContextHolder.setTenantId(Long.parseLong(task.getTenantId())); + TenantContextHolder.setIgnore(false); + BpmTaskRejectReqVO req = new BpmTaskRejectReqVO().setId(task.getId()).setReason("超时系统自动拒绝"); + bpmTaskService.rejectTask(Long.parseLong(task.getAssignee()), req); + } + }); + } + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/consumer/task/SysNotifyTodoTaskReminderConsumer.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/consumer/task/SysNotifyTodoTaskReminderConsumer.java new file mode 100644 index 0000000000..d0dd51e939 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/consumer/task/SysNotifyTodoTaskReminderConsumer.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.consumer.task; + +import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.message.task.TodoTaskReminderMessage; +import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; +import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.event.EventListener; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * 待办任务提醒 - 站内信的消费者 + * + * @author jason + */ +@Component +@Slf4j +public class SysNotifyTodoTaskReminderConsumer { + + private static final String TASK_REMIND_TEMPLATE_CODE = "user_task_remind"; + + @Resource + private NotifyMessageSendApi notifyMessageSendApi; + + @EventListener + @Async + public void onMessage(TodoTaskReminderMessage message) { + log.info("站内信消费者接收到消息 [消息内容({})] ", message); + TenantUtils.execute(message.getTenantId(), ()-> { + Map templateParams = MapUtil.newHashMap(); + templateParams.put("name", message.getTaskName()); + NotifySendSingleToUserReqDTO req = new NotifySendSingleToUserReqDTO().setUserId(message.getUserId()) + .setTemplateCode(TASK_REMIND_TEMPLATE_CODE).setTemplateParams(templateParams); + notifyMessageSendApi.sendSingleMessageToAdmin(req); + }); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/message/task/TodoTaskReminderMessage.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/message/task/TodoTaskReminderMessage.java new file mode 100644 index 0000000000..f91b673274 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/message/task/TodoTaskReminderMessage.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.message.task; + +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +/** + * 待办任务提醒消息 + * + * @author jason + */ +@Data +public class TodoTaskReminderMessage { + + /** + * 租户 Id + */ + @NotNull(message = "租户 Id 不能未空") + private Long tenantId; + + /** + * 用户Id + */ + @NotNull(message = "用户 Id 不能未空") + private Long userId; + + /** + * 任务名称 + */ + @NotEmpty(message = "任务名称不能未空") + private String taskName; + + // TODO 暂时只有站内信通知. 后面可以增加 +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/producer/task/TodoTaskReminderProducer.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/producer/task/TodoTaskReminderProducer.java new file mode 100644 index 0000000000..816e3a71fa --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/mq/producer/task/TodoTaskReminderProducer.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.producer.task; + +import cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.message.task.TodoTaskReminderMessage; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Component; +import org.springframework.validation.annotation.Validated; + +/** + * 待办任务提醒 Producer + * + * @author jason + */ +@Component +@Validated +public class TodoTaskReminderProducer { + + @Resource + private ApplicationContext applicationContext; + + public void sendReminderMessage(@Valid TodoTaskReminderMessage message) { + applicationContext.publishEvent(message); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java new file mode 100644 index 0000000000..49fd21018a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.bpm.framework.flowable.core.simple; + +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * 仿钉钉流程设计器审批节点配置 Model + * + * @author jason + */ +@Data +public class SimpleModelUserTaskConfig { + + /** + * 候选人策略 + */ + private Integer candidateStrategy; + + /** + * 候选人参数 + */ + private String candidateParam; + + /** + * 字段权限 + */ + private List> fieldsPermission; + + /** + * 审批方式 + */ + private Integer approveMethod; + + + /** + * 超时处理 + */ + private TimeoutHandler timeoutHandler; + + + @Data + public static class TimeoutHandler { + + /** + * 是否开启超时处理 + */ + private Boolean enable; + + /** + * 超时执行的动作 + */ + private Integer action; + + /** + * 超时时间设置 + */ + private String timeDuration; + + /** + * 如果执行动作是自动提醒, 最大提醒次数 + */ + private Integer maxRemindCount; + + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 49eac0371f..72f6157a92 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -5,27 +5,27 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.TypeReference; import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.BooleanUtil; -import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.*; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmApproveMethodEnum; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModeConditionType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelConditionGroups; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelUserTaskConfig; import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; import java.util.List; import java.util.Map; +import java.util.Objects; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_EVENT; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.FORM_FIELD_PERMISSION_ELEMENT; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmTimerBoundaryEventType.USER_TASK_TIMEOUT; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum.AUTO_REMINDER; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.*; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX; @@ -205,8 +205,15 @@ public class SimpleModelUtils { break; } case USER_TASK: { - UserTask userTask = buildBpmnUserTask(simpleModelNode); + // 获取用户任务的配置 + SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(simpleModelNode.getAttributes(), SimpleModelUserTaskConfig.class); + UserTask userTask = buildBpmnUserTask(simpleModelNode, userTaskConfig); mainProcess.addFlowElement(userTask); + if (userTaskConfig.getTimeoutHandler() != null && userTaskConfig.getTimeoutHandler().getEnable()) { + // 添加用户任务的 Timer Boundary Event, 用于任务的超时处理 + BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); + mainProcess.addFlowElement(boundaryEvent); + } break; } case COPY_TASK: { @@ -263,6 +270,28 @@ public class SimpleModelUtils { } } + private static BoundaryEvent buildUserTaskTimerBoundaryEvent(UserTask userTask, SimpleModelUserTaskConfig.TimeoutHandler timeoutHandler) { + // 定时器边界事件 + BoundaryEvent boundaryEvent = new BoundaryEvent(); + boundaryEvent.setId(IdUtil.fastUUID()); + // 设置关联的任务为不会被中断 + boundaryEvent.setCancelActivity(false); + boundaryEvent.setAttachedToRef(userTask); + TimerEventDefinition eventDefinition = new TimerEventDefinition(); + eventDefinition.setTimeDuration(timeoutHandler.getTimeDuration()); + if (Objects.equals(AUTO_REMINDER.getAction(), timeoutHandler.getAction()) && + timeoutHandler.getMaxRemindCount() != null && timeoutHandler.getMaxRemindCount() > 1) { + // 最大提醒次数 + eventDefinition.setTimeCycle(String.format("R%d/%s", timeoutHandler.getMaxRemindCount(), timeoutHandler.getTimeDuration())); + } + boundaryEvent.addEventDefinition(eventDefinition); + // 添加定时器边界事件类型 + addExtensionElement(boundaryEvent, TIMER_BOUNDARY_EVENT_TYPE, USER_TASK_TIMEOUT.getType().toString()); + // 添加超时执行动作元素 + addExtensionElement(boundaryEvent, USER_TASK_TIMEOUT_HANDLER_ACTION, StrUtil.toStringOrNull(timeoutHandler.getAction())); + return boundaryEvent; + } + private static ParallelGateway buildBpmnParallelGateway(BpmSimpleModelNodeVO node) { ParallelGateway parallelGateway = new ParallelGateway(); parallelGateway.setId(node.getId()); @@ -278,9 +307,14 @@ public class SimpleModelUtils { // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners // 添加抄送候选人元素 - addCandidateElements(node, serviceTask); + addCandidateElements(MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY), + MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM), + serviceTask); // 添加表单字段权限属性元素 - addFormFieldsPermission(node, serviceTask); + List> fieldsPermissions = MapUtil.get(node.getAttributes(), + FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() { + }); + addFormFieldsPermission(fieldsPermissions, serviceTask); return serviceTask; } @@ -288,12 +322,10 @@ public class SimpleModelUtils { /** * 给节点添加候选人元素 */ - private static void addCandidateElements(BpmSimpleModelNodeVO node, FlowElement flowElement) { - Integer candidateStrategy = MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY); + private static void addCandidateElements(Integer candidateStrategy, String candidateParam, FlowElement flowElement) { addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, - candidateStrategy == null ? null : String.valueOf(candidateStrategy)); - addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, - MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM)); + candidateStrategy == null ? null : candidateStrategy.toString()); + addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, candidateParam); } private static ExclusiveGateway buildBpmnExclusiveGateway(BpmSimpleModelNodeVO node) { @@ -328,21 +360,25 @@ public class SimpleModelUtils { return endEvent; } - private static UserTask buildBpmnUserTask(BpmSimpleModelNodeVO node) { + private static UserTask buildBpmnUserTask(BpmSimpleModelNodeVO node, SimpleModelUserTaskConfig userTaskConfig) { UserTask userTask = new UserTask(); userTask.setId(node.getId()); userTask.setName(node.getName()); + // 设置审批任务的截止时间 + if (userTaskConfig.getTimeoutHandler() != null && userTaskConfig.getTimeoutHandler().getEnable()) { + userTask.setDueDate(userTaskConfig.getTimeoutHandler().getTimeDuration()); + } + // 添加候选人元素 - addCandidateElements(node, userTask); + addCandidateElements(userTaskConfig.getCandidateStrategy(), userTaskConfig.getCandidateParam(), userTask); // 添加表单字段权限属性元素 - addFormFieldsPermission(node, userTask); + addFormFieldsPermission(userTaskConfig.getFieldsPermission(), userTask); // 处理多实例 - processMultiInstanceLoopCharacteristics(node, userTask); + processMultiInstanceLoopCharacteristics(userTaskConfig.getApproveMethod(), userTask); return userTask; } - private static void processMultiInstanceLoopCharacteristics(BpmSimpleModelNodeVO node, UserTask userTask) { - Integer approveMethod = MapUtil.getInt(node.getAttributes(), SimpleModelConstants.APPROVE_METHOD_ATTRIBUTE); + private static void processMultiInstanceLoopCharacteristics(Integer approveMethod, UserTask userTask) { BpmApproveMethodEnum bpmApproveMethodEnum = BpmApproveMethodEnum.valueOf(approveMethod); if (bpmApproveMethodEnum == null || bpmApproveMethodEnum == BpmApproveMethodEnum.SINGLE_PERSON_APPROVE) { return; @@ -369,10 +405,7 @@ public class SimpleModelUtils { /** * 给节点添加表单字段权限元素 */ - private static void addFormFieldsPermission(BpmSimpleModelNodeVO node, FlowElement flowElement) { - List> fieldsPermissions = MapUtil.get(node.getAttributes(), - FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() { - }); + private static void addFormFieldsPermission(List> fieldsPermissions, FlowElement flowElement) { if (CollUtil.isNotEmpty(fieldsPermissions)) { fieldsPermissions.forEach(item -> addExtensionElement(flowElement, FORM_FIELD_PERMISSION_ELEMENT, item)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index f69757f142..0b989f44c1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -127,6 +127,13 @@ public interface BpmTaskService { */ Task getTask(String id); + /** + * 根据条件查询已经分配的用户任务列表 + * @param processInstanceId 流程实例编号 + * @param taskDefineKey 任务定义 Key + */ + List getAssignedTaskListByConditions(String processInstanceId, String taskDefineKey); + /** * 获取当前任务的可回退的 UserTask 集合 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index c18ea5398f..4d6f9bae3e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -433,6 +433,13 @@ public class BpmTaskServiceImpl implements BpmTaskService { return taskService.createTaskQuery().taskId(id).includeTaskLocalVariables().singleResult(); } + @Override + public List getAssignedTaskListByConditions(String processInstanceId, String defineKey) { + TaskQuery taskQuery = taskService.createTaskQuery().processInstanceId(processInstanceId) + .taskDefinitionKey(defineKey).active().taskAssigned().includeTaskLocalVariables(); + return taskQuery.list(); + } + private HistoricTaskInstance getHistoricTask(String id) { return historyService.createHistoricTaskInstanceQuery().taskId(id).includeTaskLocalVariables().singleResult(); } -- Gitee From e39513c6b2e8fa320ee0b5038be499316dc813b7 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 14:25:00 +0800 Subject: [PATCH 0588/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=20QianWen=20topP=20=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/core/model/tongyi/QianWenChatClient.java | 2 +- .../ai/core/model/tongyi/QianWenOptions.java | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java index 85fa771bd1..63f3af7760 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java @@ -106,7 +106,7 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { .messages(messageList) .maxTokens(chatOptions.getMaxTokens()) .resultFormat(QwenParam.ResultFormat.MESSAGE) - .topP(Double.valueOf(chatOptions.getTopP())) + .topP(chatOptions.getTopP() == null ? null : Double.valueOf(chatOptions.getTopP())) .topK(chatOptions.getTopK()) .temperature(chatOptions.getTemperature()) // 控制流式输出模式,即后面的内容会包含已经输出的内容;设置为True,将开启增量输出模式,后面的输出不会包含已经输出的内容,您需要自行拼接整体输出 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java index 4f7632c974..07805cf11c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenOptions.java @@ -43,25 +43,14 @@ public class QianWenOptions implements ChatOptions { return null; } -// @Override -// public void setTemperature(Float temperature) { -// -// } -// -// @Override -// public void setTopP(Float topP) { -// this.topP = topP; -// } - @Override public Integer getTopK() { return null; } -// @Override -// public void setTopK(Integer topK) { -// -// } + public Float getTopP() { + return topP; + } @Data @Accessors -- Gitee From f0e4e535f48ad30a0f74536f2d7eaa45c0412537 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 14:27:08 +0800 Subject: [PATCH 0589/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=20AI=20stream=20=E8=BF=94=E5=9B=9E=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/service/chat/AiChatMessageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 3e4f602586..e5afe64441 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -136,7 +136,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { // 3.3 流式返回 // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 StringBuffer contentBuffer = new StringBuffer(); - return streamResponse.publishOn(Schedulers.single()).map(chunk -> { + return streamResponse.map(chunk -> { String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); -- Gitee From 8f0c5998aad17f50faca1ae857616c98e1bc47f6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 14:49:05 +0800 Subject: [PATCH 0590/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91Chat=20Stream=20=E5=A4=84=E7=90=86=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 1 + .../controller/admin/chat/AiChatMessageController.java | 2 +- .../module/ai/service/chat/AiChatMessageService.java | 3 ++- .../ai/service/chat/AiChatMessageServiceImpl.java | 10 ++++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index cd1985f81d..ca0af92f4e 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -32,6 +32,7 @@ public interface ErrorCodeConstants { // ========== API 聊天消息 1-040-004-000 ========== ErrorCode AI_CHAT_MESSAGE_NOT_EXIST = new ErrorCode(1_040_004_000, "消息不存在!"); + ErrorCode AI_CHAT_STREAM_ERROR = new ErrorCode(1_040_004_001, "Stream 对话异常!"); // midjourney diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 2522d0dc0d..8a2dba0031 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -58,7 +58,7 @@ public class AiChatMessageController { @Operation(summary = "发送消息(流式)", description = "流式返回,响应较快") @PostMapping(value = "/send-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE) @PermitAll // 解决 SSE 最终响应的时候,会被 Access Denied 拦截的问题 - public Flux sendChatMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { + public Flux> sendChatMessageStream(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { return chatMessageService.sendChatMessageStream(sendReqVO, getLoginUserId()); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java index e9dc43ec9c..fcf97a73f9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.service.chat; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import reactor.core.publisher.Flux; @@ -28,7 +29,7 @@ public interface AiChatMessageService { * @param userId 用户编号 * @return 发送结果 */ - Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); + Flux> sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); /** * 获得指定会话的消息列表 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index e5afe64441..edc11995d9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -5,13 +5,17 @@ import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; +import cn.iocoder.yudao.framework.common.exception.ErrorCode; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; +import org.reactivestreams.Publisher; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.*; @@ -107,7 +111,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { } @Override - public Flux sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId) { + public Flux> sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId) { // 1.1 校验对话存在 AiChatConversationDO conversation = chatConversationService.validateExists(sendReqVO.getConversationId()); if (ObjUtil.notEqual(conversation.getUserId(), userId)) { @@ -145,12 +149,14 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { o -> o.setUserAvatar(user.getAvatar())); AiChatMessageSendRespVO.Message receive = BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class, o -> o.setRoleAvatar(role != null ? role.getAvatar() : null)).setContent(newContent); - return new AiChatMessageSendRespVO().setSend(send).setReceive(receive); + return CommonResult.success(new AiChatMessageSendRespVO().setSend(send).setReceive(receive)); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { log.error("[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]", userId, sendReqVO, throwable); chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())); + }).onErrorResume( error -> { + return Flux.just(CommonResult.error(ErrorCodeConstants.AI_CHAT_STREAM_ERROR)); }); } -- Gitee From 5618313d65b342ff2ae413a970e3ad0f93501aa6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 15:05:00 +0800 Subject: [PATCH 0591/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=20build=20xing=20huo=20key=20size=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/core/factory/AiClientFactoryImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index b005d7c3e0..50d7149607 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -20,6 +20,7 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import com.google.cloud.vertexai.VertexAI; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; import org.springframework.ai.chat.StreamingChatClient; @@ -31,6 +32,8 @@ import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; +import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatClient; +import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions; import java.util.List; @@ -57,6 +60,8 @@ public class AiClientFactoryImpl implements AiClientFactory { return buildXingHuoChatClient(apiKey); case QIAN_WEN: return buildQianWenChatClient(apiKey); + case GEMIR: + return buildGoogleGemir(apiKey); default: throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } @@ -148,7 +153,7 @@ public class AiClientFactoryImpl implements AiClientFactory { */ private static XingHuoChatClient buildXingHuoChatClient(String key) { List keys = StrUtil.split(key, '|'); - Assert.equals(keys.size(), 2, "XingHuoChatClient 的密钥需要 (appKey|secretKey) 格式"); + Assert.equals(keys.size(), 3, "XingHuoChatClient 的密钥需要 (appid|appKey|secretKey) 格式"); String appId = keys.get(0); String appKey = keys.get(1); String secretKey = keys.get(2); -- Gitee From 10ca7a93ac660b03a13ac2a04bfe58bbfa1bc9d4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 15:06:36 +0800 Subject: [PATCH 0592/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20google=20gemini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml | 5 +++++ .../yudao/framework/ai/core/enums/AiPlatformEnum.java | 1 + .../ai/core/factory/AiClientFactoryImpl.java | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 9a19270dbf..e7a4cf2452 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -22,6 +22,11 @@ spring-ai-openai-spring-boot-starter 1.0.3 + + io.springboot.ai + spring-ai-vertex-ai-gemini + 1.0.3 + cn.iocoder.boot diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index fc41069a92..cd70122988 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -21,6 +21,7 @@ public enum AiPlatformEnum { OPEN_AI_DALL("dall", "dall"), MIDJOURNEY("midjourney", "midjourney"), + GEMIR ("gemir ", "gemir "), // google gemir ; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 50d7149607..0f83a99ee5 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -169,4 +169,15 @@ public class AiClientFactoryImpl implements AiClientFactory { return new QianWenChatClient(qianWenApi); } + + private static VertexAiGeminiChatClient buildGoogleGemir(String key) { + List keys = StrUtil.split(key, '|'); + Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); + VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1)); + return new VertexAiGeminiChatClient(vertexApi, + VertexAiGeminiChatOptions.builder() + .withTemperature(0.4F) + .build()); + } + } -- Gitee From 48c3210f5f0a2e95b006b609d0880deb93dc8eff Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 24 May 2024 15:38:56 +0800 Subject: [PATCH 0593/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E6=96=B0=E5=BB=BA=E5=AF=B9=E8=AF=9D=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4=E8=A7=92?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/dal/mysql/AiChatRoleMapper.java | 8 -------- .../chat/AiChatConversationServiceImpl.java | 17 +++++++++-------- .../service/chat/AiChatMessageServiceImpl.java | 4 +++- .../ai/service/model/AiChatRoleService.java | 9 --------- .../ai/service/model/AiChatRoleServiceImpl.java | 10 ---------- 5 files changed, 12 insertions(+), 36 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java index c2a9631dc0..42a3cb1955 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java @@ -20,14 +20,6 @@ import java.util.List; @Mapper public interface AiChatRoleMapper extends BaseMapperX { - default AiChatRoleDO selectFirstByPublicStatusAndStatus(Boolean publicStatus, Integer status) { - return selectOne(new QueryWrapperX() - .eq("status", status) - .eq("public_status", publicStatus) - .limitN(1) - .orderByAsc("sort")); - } - default PageResult selectPage(AiChatRolePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(AiChatRoleDO::getName, reqVO.getName()) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 1e3bd52ced..3a3b16aeac 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -46,21 +46,22 @@ public class AiChatConversationServiceImpl implements AiChatConversationService @Override public Long createChatConversationMy(AiChatConversationCreateMyReqVO createReqVO, Long userId) { // 1.1 获得 AiChatRoleDO 聊天角色 - AiChatRoleDO role = createReqVO.getRoleId() != null ? chatRoleService.validateChatRole(createReqVO.getRoleId()) - : chatRoleService.getRequiredDefaultChatRole(); - Assert.notNull(role, "必须找到聊天角色"); + AiChatRoleDO role = createReqVO.getRoleId() != null ? chatRoleService.validateChatRole(createReqVO.getRoleId()) : null; // 1.2 获得 AiChatModelDO 聊天模型 - AiChatModelDO model = role.getModelId() != null ? chatModalService.validateChatModel(role.getModelId()) + AiChatModelDO model = role != null && role.getModelId() != null ? chatModalService.validateChatModel(role.getModelId()) : chatModalService.getRequiredDefaultChatModel(); Assert.notNull(model, "必须找到默认模型"); validateChatModel(model); // 2. 创建 AiChatConversationDO 聊天对话 - String title = createReqVO.getRoleId() == null ? AiChatConversationDO.TITLE_DEFAULT : role.getName(); - AiChatConversationDO conversation = new AiChatConversationDO() - .setUserId(userId).setTitle(title).setPinned(false) - .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()).setSystemMessage(role.getSystemMessage()) + AiChatConversationDO conversation = new AiChatConversationDO().setUserId(userId).setPinned(false) + .setModelId(model.getId()).setModel(model.getModel()) .setTemperature(model.getTemperature()).setMaxTokens(model.getMaxTokens()).setMaxContexts(model.getMaxContexts()); + if (role != null) { + conversation.setTitle(role.getName()).setRoleId(role.getId()).setSystemMessage(role.getSystemMessage()); + } else { + conversation.setTitle(AiChatConversationDO.TITLE_DEFAULT); + } chatConversationMapper.insert(conversation); return conversation.getId(); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index edc11995d9..a6861243a8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -165,7 +165,9 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { // 1. 构建 Prompt Message 列表 List chatMessages = new ArrayList<>(); // 1.1 system context 角色设定 - chatMessages.add(new SystemMessage(conversation.getSystemMessage())); + if (StrUtil.isNotBlank(conversation.getSystemMessage())) { + chatMessages.add(new SystemMessage(conversation.getSystemMessage())); + } // 1.2 history message 历史消息 List contextMessages = filterContextMessages(messages, conversation, sendReqVO); contextMessages.forEach(message -> chatMessages.add(new ChatMessage(message.getType().toUpperCase(), message.getContent()))); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java index a7bc2501a7..a602d6537b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleService.java @@ -94,15 +94,6 @@ public interface AiChatRoleService { */ AiChatRoleDO validateChatRole(Long id); - /** - * 获得默认的聊天角色 - * - * 如果获取不到,则抛出 {@link cn.iocoder.yudao.framework.common.exception.ServiceException} 业务异常 - * - * @return 聊天角色 - */ - AiChatRoleDO getRequiredDefaultChatRole(); - /** * 获得聊天角色分页 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index d3083ec9fb..8313e12a11 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -121,16 +121,6 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { return chatRole; } - @Override - public AiChatRoleDO getRequiredDefaultChatRole() { - AiChatRoleDO chatRole = chatRoleMapper.selectFirstByPublicStatusAndStatus( - true, CommonStatusEnum.ENABLE.getStatus()); - if (chatRole == null) { - throw exception(CHAT_ROLE_DEFAULT_NOT_EXISTS); - } - return chatRole; - } - @Override public PageResult getChatRolePage(AiChatRolePageReqVO pageReqVO) { return chatRoleMapper.selectPage(pageReqVO); -- Gitee From 546b522c4884b1f1574eee2ae4d331a1d96520ee Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 16:10:23 +0800 Subject: [PATCH 0594/1557] =?UTF-8?q?=E3=80=90=E6=B7=BB=E5=8A=A0todo?= =?UTF-8?q?=E3=80=91google=20gemini=20=E5=88=9D=E5=A7=8B=E5=8C=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/core/factory/AiClientFactoryImpl.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 0f83a99ee5..b604359683 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -20,9 +20,12 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.vertexai.VertexAI; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; +import org.springframework.ai.autoconfigure.vertexai.gemini.VertexAiGeminiConnectionProperties; +import org.springframework.ai.autoconfigure.vertexai.palm2.VertexAiPalm2ConnectionProperties; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.ollama.OllamaChatClient; @@ -35,6 +38,7 @@ import org.springframework.ai.openai.api.OpenAiApi; import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatClient; import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions; +import java.io.IOException; import java.util.List; /** @@ -169,15 +173,23 @@ public class AiClientFactoryImpl implements AiClientFactory { return new QianWenChatClient(qianWenApi); } - private static VertexAiGeminiChatClient buildGoogleGemir(String key) { List keys = StrUtil.split(key, '|'); Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); - VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1)); +// VertexAiGeminiConnectionProperties connectionProperties = new VertexAiGeminiConnectionProperties(); +// connectionProperties.setApiKey("AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU"); +// +// GoogleCredentials credentials = GoogleCredentials.fromStream(connectionProperties.getCredentialsUri().getInputStream()); + // todo @芋艿 google gemini 没找到对于初始化 client 方式,文档中说是用过 GoogleCredentials 来初始化凭证 + // api-key: AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU + VertexAI vertexApi = new VertexAI( + "skilled-snow-409401", + "us-central1" + ); return new VertexAiGeminiChatClient(vertexApi, VertexAiGeminiChatOptions.builder() .withTemperature(0.4F) + .withModel(VertexAiGeminiChatClient.ChatModel.GEMINI_PRO.getValue()) .build()); } - } -- Gitee From 17afb14c88432a2a12fcf7513dd938068d9ab86d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 16:39:47 +0800 Subject: [PATCH 0595/1557] =?UTF-8?q?=E3=80=90=E6=B3=A8=E9=87=8Agoogle=20g?= =?UTF-8?q?ami=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao-spring-boot-starter-ai/pom.xml | 10 ++-- .../ai/core/factory/AiClientFactoryImpl.java | 49 ++++++++----------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index e7a4cf2452..85f5fa63d3 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -22,11 +22,11 @@ spring-ai-openai-spring-boot-starter 1.0.3 - - io.springboot.ai - spring-ai-vertex-ai-gemini - 1.0.3 - + + + + + cn.iocoder.boot diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index b604359683..44a76dd492 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -20,12 +20,8 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; -import com.google.auth.oauth2.GoogleCredentials; -import com.google.cloud.vertexai.VertexAI; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; -import org.springframework.ai.autoconfigure.vertexai.gemini.VertexAiGeminiConnectionProperties; -import org.springframework.ai.autoconfigure.vertexai.palm2.VertexAiPalm2ConnectionProperties; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.ollama.OllamaChatClient; @@ -35,10 +31,7 @@ import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; -import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatClient; -import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions; -import java.io.IOException; import java.util.List; /** @@ -64,8 +57,8 @@ public class AiClientFactoryImpl implements AiClientFactory { return buildXingHuoChatClient(apiKey); case QIAN_WEN: return buildQianWenChatClient(apiKey); - case GEMIR: - return buildGoogleGemir(apiKey); +// case GEMIR: +// return buildGoogleGemir(apiKey); default: throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } @@ -172,24 +165,24 @@ public class AiClientFactoryImpl implements AiClientFactory { QianWenApi qianWenApi = new QianWenApi(key, QianWenChatModal.QWEN_72B_CHAT); return new QianWenChatClient(qianWenApi); } - - private static VertexAiGeminiChatClient buildGoogleGemir(String key) { - List keys = StrUtil.split(key, '|'); - Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); -// VertexAiGeminiConnectionProperties connectionProperties = new VertexAiGeminiConnectionProperties(); -// connectionProperties.setApiKey("AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU"); // -// GoogleCredentials credentials = GoogleCredentials.fromStream(connectionProperties.getCredentialsUri().getInputStream()); - // todo @芋艿 google gemini 没找到对于初始化 client 方式,文档中说是用过 GoogleCredentials 来初始化凭证 - // api-key: AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU - VertexAI vertexApi = new VertexAI( - "skilled-snow-409401", - "us-central1" - ); - return new VertexAiGeminiChatClient(vertexApi, - VertexAiGeminiChatOptions.builder() - .withTemperature(0.4F) - .withModel(VertexAiGeminiChatClient.ChatModel.GEMINI_PRO.getValue()) - .build()); - } +// private static VertexAiGeminiChatClient buildGoogleGemir(String key) { +// List keys = StrUtil.split(key, '|'); +// Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); +//// VertexAiGeminiConnectionProperties connectionProperties = new VertexAiGeminiConnectionProperties(); +//// connectionProperties.setApiKey("AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU"); +//// +//// GoogleCredentials credentials = GoogleCredentials.fromStream(connectionProperties.getCredentialsUri().getInputStream()); +// // todo @芋艿 google gemini 没找到对于初始化 client 方式,文档中说是用过 GoogleCredentials 来初始化凭证 +// // api-key: AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU +// VertexAI vertexApi = new VertexAI( +// "skilled-snow-409401", +// "us-central1" +// ); +// return new VertexAiGeminiChatClient(vertexApi, +// VertexAiGeminiChatOptions.builder() +// .withTemperature(0.4F) +// .withModel(VertexAiGeminiChatClient.ChatModel.GEMINI_PRO.getValue()) +// .build()); +// } } -- Gitee From 4fddec5f0217b3aa4895f136a2066134942a3b10 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 24 May 2024 20:56:21 +0800 Subject: [PATCH 0596/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=B0=83=E6=95=B4=20image=20=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E5=8C=85=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.java | 2 +- .../admin/image/AiImageController.java | 2 +- .../admin/model/AiChatModelController.java | 3 +- .../dal/mysql/{ => image}/AiImageMapper.java | 3 +- .../mysql/{ => model}/AiChatModelMapper.java | 14 ++------ .../mysql/{ => model}/AiChatRoleMapper.java | 2 +- .../ai/service/chat/AiChatMessageService.java | 2 +- .../chat/AiChatMessageServiceImpl.java | 12 ++++--- .../service/{ => image}/AiImageService.java | 2 +- .../{impl => image}/AiImageServiceImpl.java | 5 ++- .../YuDaoMidjourneyMessageHandler.java | 4 +-- .../AiChatModelConfigTypeHandler.java | 0 .../vo/AiChatModalChatConfigVO.java | 2 +- .../vo/AiChatModalConfigVO.java | 2 +- .../vo/AiChatModalDallConfigVO.java | 2 +- .../vo/AiChatModalMidjourneyConfigVO.java | 2 +- .../ai/service/model/AiChatModelService.java | 11 +++--- .../service/model/AiChatModelServiceImpl.java | 11 +++--- .../service/model/AiChatRoleServiceImpl.java | 2 +- .../ai/core/factory/AiClientFactoryImpl.java | 36 ++++++++----------- .../core/model/tongyi/QianWenChatClient.java | 1 + 21 files changed, 52 insertions(+), 68 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/{ => image}/AiImageMapper.java (93%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/{ => model}/AiChatModelMapper.java (81%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/{ => model}/AiChatRoleMapper.java (97%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{ => image}/AiImageService.java (95%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{impl => image}/AiImageServiceImpl.java (98%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/{ => image}/midjourneyHandler/YuDaoMidjourneyMessageHandler.java (97%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{dal/vo => service/image/midjourneyHandler}/typeHandler/AiChatModelConfigTypeHandler.java (100%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{dal => service/image/midjourneyHandler}/vo/AiChatModalChatConfigVO.java (91%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{dal => service/image/midjourneyHandler}/vo/AiChatModalConfigVO.java (90%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{dal => service/image/midjourneyHandler}/vo/AiChatModalDallConfigVO.java (96%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/{dal => service/image/midjourneyHandler}/vo/AiChatModalMidjourneyConfigVO.java (78%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 8a2dba0031..7211f0664d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -89,7 +89,7 @@ public class AiChatMessageController { @DeleteMapping("/delete") @Parameter(name = "id", required = true, description = "消息编号", example = "1024") public CommonResult deleteChatMessage(@RequestParam("id") Long id) { - chatMessageService.deleteMessage(id, getLoginUserId()); + chatMessageService.deleteChatMessage(id, getLoginUserId()); return success(true); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 7df2592f90..fd9ea0802c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; -import cn.iocoder.yudao.module.ai.service.AiImageService; +import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java index 1b50be79dc..08a53b286b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatModelController.java @@ -18,7 +18,6 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; -import java.util.function.Function; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @@ -77,7 +76,7 @@ public class AiChatModelController { @Operation(summary = "获得聊天模型列表") @Parameter(name = "status", description = "状态", required = true, example = "1") public CommonResult> getChatModelSimpleList(@RequestParam("status") Integer status) { - List list = chatModelService.getChatModelList(status); + List list = chatModelService.getChatModelListByStatus(status); return success(convertList(list, model -> new AiChatModelRespVO().setId(model.getId()) .setName(model.getName()).setModel(model.getModel()))); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index d353fea5aa..9e75cb4369 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.mysql; +package cn.iocoder.yudao.module.ai.dal.mysql.image; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -26,4 +26,5 @@ public interface AiImageMapper extends BaseMapperX { default void updateByMjNonce(Long mjNonceId, AiImageDO aiImageDO) { this.update(aiImageDO, new LambdaQueryWrapperX().eq(AiImageDO::getMjNonceId, mjNonceId)); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatModelMapper.java similarity index 81% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatModelMapper.java index 25687d0e0c..a3136fa9f6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatModelMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatModelMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.mysql; +package cn.iocoder.yudao.module.ai.dal.mysql.model; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -26,17 +26,6 @@ public interface AiChatModelMapper extends BaseMapperX { .orderByAsc("sort")); } - // TODO 芋艿:不需要哈 - /** - * 查询 - 根据 ids - * - * @param modalIds - * @return - */ - default List selectByIds(Collection modalIds) { - return this.selectList(new LambdaQueryWrapperX().eq(AiChatModelDO::getId, modalIds)); - } - default PageResult selectPage(AiChatModelPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(AiChatModelDO::getName, reqVO.getName()) @@ -50,4 +39,5 @@ public interface AiChatModelMapper extends BaseMapperX { .eq(AiChatModelDO::getStatus, status) .orderByAsc(AiChatModelDO::getSort)); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatRoleMapper.java similarity index 97% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatRoleMapper.java index 42a3cb1955..1ddef83453 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/AiChatRoleMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiChatRoleMapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.mysql; +package cn.iocoder.yudao.module.ai.dal.mysql.model; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java index fcf97a73f9..d7f3e80780 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java @@ -45,7 +45,7 @@ public interface AiChatMessageService { * @param id 消息编号 * @param userId 用户编号 */ - void deleteMessage(Long id, Long userId); + void deleteChatMessage(Long id, Long userId); /** * 删除指定会话的消息 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index a6861243a8..8da9110baf 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -40,6 +40,8 @@ import java.time.LocalDateTime; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; @@ -138,7 +140,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { Flux streamResponse = chatClient.stream(prompt); // 3.3 流式返回 - // 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 + // TODO 注意:Schedulers.immediate() 目的是,避免默认 Schedulers.parallel() 并发消费 chunk 导致 SSE 响应前端会乱序问题 StringBuffer contentBuffer = new StringBuffer(); return streamResponse.map(chunk -> { String newContent = chunk.getResult() != null ? chunk.getResult().getOutput().getContent() : null; @@ -149,14 +151,14 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { o -> o.setUserAvatar(user.getAvatar())); AiChatMessageSendRespVO.Message receive = BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class, o -> o.setRoleAvatar(role != null ? role.getAvatar() : null)).setContent(newContent); - return CommonResult.success(new AiChatMessageSendRespVO().setSend(send).setReceive(receive)); + return success(new AiChatMessageSendRespVO().setSend(send).setReceive(receive)); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { log.error("[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]", userId, sendReqVO, throwable); chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())); - }).onErrorResume( error -> { - return Flux.just(CommonResult.error(ErrorCodeConstants.AI_CHAT_STREAM_ERROR)); + }).onErrorResume(error -> { + return Flux.just(error(ErrorCodeConstants.AI_CHAT_STREAM_ERROR)); }); } @@ -235,7 +237,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { } @Override - public void deleteMessage(Long id, Long userId) { + public void deleteChatMessage(Long id, Long userId) { // 1. 校验消息存在 AiChatMessageDO message = chatMessageMapper.selectById(id); if (message == null || ObjUtil.notEqual(message.getUserId(), userId)) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java similarity index 95% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index b582010560..836f37dfbb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service; +package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java similarity index 98% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 20768c21e9..f4521af844 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service.impl; +package cn.iocoder.yudao.module.ai.service.image; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; @@ -21,9 +21,8 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; -import cn.iocoder.yudao.module.ai.service.AiImageService; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java similarity index 97% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index c3c9d44d0a..5327d65ffa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.service.midjourneyHandler; +package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; @@ -10,7 +10,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiImageMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/typeHandler/AiChatModelConfigTypeHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/typeHandler/AiChatModelConfigTypeHandler.java similarity index 100% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/typeHandler/AiChatModelConfigTypeHandler.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/typeHandler/AiChatModelConfigTypeHandler.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java similarity index 91% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java index 79cce7ad46..c3d2b77cca 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalChatConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.vo; +package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java similarity index 90% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java index 4ed060e224..426641a0d3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.vo; +package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java similarity index 96% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java index c828c9cf58..f07b446477 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalDallConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.vo; +package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import lombok.Data; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java similarity index 78% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java index 543c58705c..6c91ca6527 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/vo/AiChatModalMidjourneyConfigVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.dal.vo; +package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java index 08f0110fe2..f83ac73c91 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelService.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatMode import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import jakarta.validation.Valid; +import java.util.Collection; import java.util.List; import java.util.Set; @@ -79,13 +80,13 @@ public interface AiChatModelService { * @param status 状态 * @return 聊天模型列表 */ - List getChatModelList(Integer status); + List getChatModelListByStatus(Integer status); /** - * 获取 - 根据多个 ids 获取 + * 获得聊天模型列表 * - * @param modalIds - * @return + * @param ids 编号数组 + * @return 模型列表 */ - List getModalByIds(Set modalIds); + List getChatModelList(Collection ids); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index 59298f9fed..31d048c707 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -7,15 +7,14 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatModel.AiChatModelSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatModelMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.model.AiChatModelMapper; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.Collection; import java.util.List; -import java.util.Set; - import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; @@ -103,13 +102,13 @@ public class AiChatModelServiceImpl implements AiChatModelService { } @Override - public List getChatModelList(Integer status) { + public List getChatModelListByStatus(Integer status) { return chatModelMapper.selectList(status); } @Override - public List getModalByIds(Set modalIds) { - return chatModelMapper.selectByIds(modalIds); + public List getChatModelList(Collection ids) { + return chatModelMapper.selectBatchIds(ids); } } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index 8313e12a11..faee09d06c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -10,7 +10,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleP import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.dal.mysql.AiChatRoleMapper; +import cn.iocoder.yudao.module.ai.dal.mysql.model.AiChatRoleMapper; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 44a76dd492..ba496adb08 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -20,6 +20,7 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import com.google.cloud.vertexai.VertexAI; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; import org.springframework.ai.chat.StreamingChatClient; @@ -31,6 +32,8 @@ import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; +import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatClient; +import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions; import java.util.List; @@ -57,8 +60,8 @@ public class AiClientFactoryImpl implements AiClientFactory { return buildXingHuoChatClient(apiKey); case QIAN_WEN: return buildQianWenChatClient(apiKey); -// case GEMIR: -// return buildGoogleGemir(apiKey); + case GEMIR: + return buildGoogleGemir(apiKey); default: throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } @@ -165,24 +168,13 @@ public class AiClientFactoryImpl implements AiClientFactory { QianWenApi qianWenApi = new QianWenApi(key, QianWenChatModal.QWEN_72B_CHAT); return new QianWenChatClient(qianWenApi); } -// -// private static VertexAiGeminiChatClient buildGoogleGemir(String key) { -// List keys = StrUtil.split(key, '|'); -// Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); -//// VertexAiGeminiConnectionProperties connectionProperties = new VertexAiGeminiConnectionProperties(); -//// connectionProperties.setApiKey("AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU"); -//// -//// GoogleCredentials credentials = GoogleCredentials.fromStream(connectionProperties.getCredentialsUri().getInputStream()); -// // todo @芋艿 google gemini 没找到对于初始化 client 方式,文档中说是用过 GoogleCredentials 来初始化凭证 -// // api-key: AIzaSyBpe376HTA8uPKJN_OJTh7MEO3v6LMqfXU -// VertexAI vertexApi = new VertexAI( -// "skilled-snow-409401", -// "us-central1" -// ); -// return new VertexAiGeminiChatClient(vertexApi, -// VertexAiGeminiChatOptions.builder() -// .withTemperature(0.4F) -// .withModel(VertexAiGeminiChatClient.ChatModel.GEMINI_PRO.getValue()) -// .build()); -// } + + + private static VertexAiGeminiChatClient buildGoogleGemir(String key) { + List keys = StrUtil.split(key, '|'); + Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); + VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1)); + return new VertexAiGeminiChatClient(vertexApi); + } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java index 63f3af7760..02a25cef4a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/tongyi/QianWenChatClient.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.ai.core.model.tongyi; +import cn.hutool.core.util.NumberUtil; import cn.iocoder.yudao.framework.ai.core.exception.ChatException; import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; import org.springframework.ai.chat.*; -- Gitee From 2d11f085c8a1d65d3e7af6e1f196acc3936d1ac8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 May 2024 00:08:27 +0800 Subject: [PATCH 0597/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E5=AF=B9=E8=AF=9D=E7=AE=A1=E7=90=86=2050%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/AiChatConversationController.java | 50 ++++++++++++++----- .../admin/chat/AiChatMessageController.java | 12 +++-- .../AiChatConversationCreateMyReqVO.java | 2 +- .../AiChatConversationPageReqVO.java | 26 ++++++++++ .../AiChatConversationRespVO.java | 24 ++++++--- .../AiChatConversationUpdateMyReqVO.java | 8 +-- .../chat/vo/message/AiChatMessageRespVO.java | 2 +- .../dataobject/chat/AiChatConversationDO.java | 6 +-- .../dal/dataobject/chat/AiChatMessageDO.java | 2 +- .../dal/dataobject/model/AiChatModelDO.java | 2 +- .../mysql/chat/AiChatConversationMapper.java | 16 ++++++ .../dal/mysql/chat/AiChatMessageMapper.java | 22 ++++++++ .../chat/AiChatConversationService.java | 33 ++++++------ .../chat/AiChatConversationServiceImpl.java | 29 +++++++---- .../ai/service/chat/AiChatMessageService.java | 18 +++++-- .../chat/AiChatMessageServiceImpl.java | 12 +++-- 16 files changed, 196 insertions(+), 68 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationPageReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index 9d0cd74c86..ad57460ca9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -1,27 +1,35 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; +import cn.iocoder.yudao.module.ai.service.chat.AiChatMessageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Map; +import java.util.function.Consumer; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Tag(name = "管理后台 - AI 聊天会话") +@Tag(name = "管理后台 - AI 聊天对话") @RestController @RequestMapping("/ai/chat/conversation") @Validated @@ -29,30 +37,32 @@ public class AiChatConversationController { @Resource private AiChatConversationService chatConversationService; + @Resource + private AiChatMessageService chatMessageService; @PostMapping("/create-my") - @Operation(summary = "创建【我的】聊天会话") + @Operation(summary = "创建【我的】聊天对话") public CommonResult createChatConversationMy(@RequestBody @Valid AiChatConversationCreateMyReqVO createReqVO) { return success(chatConversationService.createChatConversationMy(createReqVO, getLoginUserId())); } @PutMapping("/update-my") - @Operation(summary = "更新【我的】聊天会话") + @Operation(summary = "更新【我的】聊天对话") public CommonResult updateChatConversationMy(@RequestBody @Valid AiChatConversationUpdateMyReqVO updateReqVO) { chatConversationService.updateChatConversationMy(updateReqVO, getLoginUserId()); return success(true); } @GetMapping("/my-list") - @Operation(summary = "获得【我的】聊天会话列表") + @Operation(summary = "获得【我的】聊天对话列表") public CommonResult> getChatConversationMyList() { List list = chatConversationService.getChatConversationListByUserId(getLoginUserId()); return success(BeanUtils.toBean(list, AiChatConversationRespVO.class)); } @GetMapping("/get-my") - @Operation(summary = "获得【我的】聊天会话") - @Parameter(name = "id", required = true, description = "会话编号", example = "1024") + @Operation(summary = "获得【我的】聊天对话") + @Parameter(name = "id", required = true, description = "对话编号", example = "1024") public CommonResult getChatConversationMy(@RequestParam("id") Long id) { AiChatConversationDO conversation = chatConversationService.getChatConversation(id); if (conversation != null && ObjUtil.notEqual(conversation.getUserId(), getLoginUserId())) { @@ -62,20 +72,36 @@ public class AiChatConversationController { } @DeleteMapping("/delete-my") - @Operation(summary = "删除聊天会话") - @Parameter(name = "id", required = true, description = "会话编号", example = "1024") + @Operation(summary = "删除聊天对话") + @Parameter(name = "id", required = true, description = "对话编号", example = "1024") public CommonResult deleteChatConversationMy(@RequestParam("id") Long id) { chatConversationService.deleteChatConversationMy(id, getLoginUserId()); return success(true); } + // TODO 芋艿:这个 url 可以改下 @DeleteMapping("/delete-my-all-except-pinned") @Operation(summary = "删除所有对话(置顶除外)") - @Parameter(name = "id", required = true, description = "会话编号", example = "1024") - public CommonResult deleteMyAllExceptPinned() { - chatConversationService.deleteMyAllExceptPinned(getLoginUserId()); + public CommonResult deleteChatConversationMyByUnpinned() { + chatConversationService.deleteChatConversationMyByUnpinned(getLoginUserId()); return success(true); } - // ========== 会话管理 ========== + + // ========== 对话管理 ========== + + @GetMapping("/page") + @Operation(summary = "获得对话分页", description = "用于【对话管理】菜单") + @PreAuthorize("@ss.hasPermission('ai:chat-conversation:query')") + public CommonResult> getChatConversationPage(AiChatConversationPageReqVO pageReqVO) { + PageResult pageResult = chatConversationService.getChatConversationPage(pageReqVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty()); + } + // 拼接关联数据 + Map messageCountMap = chatMessageService.getChatMessageCountMap( + convertList(pageResult.getList(), AiChatConversationDO::getId)); + return success(BeanUtils.toBean(pageResult, AiChatConversationRespVO.class, + conversation -> conversation.setMessageCount(messageCountMap.getOrDefault(conversation.getId(), 0)))); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 7211f0664d..68559c7763 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -62,9 +62,9 @@ public class AiChatMessageController { return chatMessageService.sendChatMessageStream(sendReqVO, getLoginUserId()); } - @Operation(summary = "获得指定会话的消息列表") + @Operation(summary = "获得指定对话的消息列表") @GetMapping("/list-by-conversation-id") - @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") + @Parameter(name = "conversationId", required = true, description = "对话编号", example = "1024") public CommonResult> getChatMessageListByConversationId( @RequestParam("conversationId") Long conversationId) { AiChatConversationDO conversation = chatConversationService.getChatConversation(conversationId); @@ -93,12 +93,16 @@ public class AiChatMessageController { return success(true); } - @Operation(summary = "删除指定会话的消息") + @Operation(summary = "删除指定对话的消息") @DeleteMapping("/delete-by-conversation-id") - @Parameter(name = "conversationId", required = true, description = "会话编号", example = "1024") + @Parameter(name = "conversationId", required = true, description = "对话编号", example = "1024") public CommonResult deleteChatMessageByConversationId(@RequestParam("conversationId") Long conversationId) { chatMessageService.deleteChatMessageByConversationId(conversationId, getLoginUserId()); return success(true); } + // ========== 对话管理 ========== + + + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java index d64ea7f616..c13200b6ae 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationCreateMyReqVO.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = "管理后台 - AI 聊天会话创建【我的】 Request VO") +@Schema(description = "管理后台 - AI 聊天对话创建【我的】 Request VO") @Data public class AiChatConversationCreateMyReqVO { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationPageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationPageReqVO.java new file mode 100644 index 0000000000..967e866ea7 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationPageReqVO.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - AI 聊天对话的分页 Request VO") +@Data +public class AiChatConversationPageReqVO extends PageParam { + + @Schema(description = "用户编号", example = "1024") + private Long userId; + + @Schema(description = "对话标题", example = "你好") + private String title; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java index e670ef9f94..66eb24db5f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java @@ -10,24 +10,24 @@ import lombok.Data; import java.time.LocalDateTime; -@Schema(description = "管理后台 - AI 聊天会话 Response VO") +@Schema(description = "管理后台 - AI 聊天对话 Response VO") @Data public class AiChatConversationRespVO implements VO { - @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @Schema(description = "对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long userId; - @Schema(description = "会话标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个标题") + @Schema(description = "对话标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个标题") private String title; @Schema(description = "是否置顶", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean pinned; - @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1") - @Trans(type = TransType.SIMPLE, target = AiChatRoleDO.class, fields = "avatar", ref = "roleAvatar") + @Schema(description = "角色编号", example = "1") + @Trans(type = TransType.SIMPLE, target = AiChatRoleDO.class, fields = {"name", "avatar"}, refs = {"roleName", "roleAvatar"}) private Long roleId; @Schema(description = "模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @@ -52,12 +52,20 @@ public class AiChatConversationRespVO implements VO { @Schema(description = "上下文的最大 Message 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer maxContexts; - @Schema(description = "最后更新时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime updateTime; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; // ========== 关联 role 信息 ========== - @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") + @Schema(description = "角色头像", example = "https://www.iocoder.cn/1.png") private String roleAvatar; + @Schema(description = "角色名字", example = "小黄") + private String roleName; + + // ========== 仅在【对话管理】时加载 ========== + + @Schema(description = "消息数量", example = "20") + private Integer messageCount; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java index 36e95d298c..f9ce64bae3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationUpdateMyReqVO.java @@ -4,15 +4,15 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; -@Schema(description = "管理后台 - AI 聊天会话更新【我的】 Request VO") +@Schema(description = "管理后台 - AI 聊天对话更新【我的】 Request VO") @Data public class AiChatConversationUpdateMyReqVO { - @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "会话编号不能为空") + @Schema(description = "对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + @NotNull(message = "对话编号不能为空") private Long id; - @Schema(description = "会话标题", example = "我是一个标题") + @Schema(description = "对话标题", example = "我是一个标题") private String title; @Schema(description = "是否置顶", example = "true") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index e4e878e400..2cb0f9c5c9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -12,7 +12,7 @@ public class AiChatMessageRespVO { @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") + @Schema(description = "对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long conversationId; @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "role") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index b92e661436..8e582f621d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; import java.util.Date; /** - * AI Chat 会话 DO + * AI Chat 对话 DO * * 用户每次发起 Chat 聊天时,会创建一个 {@link AiChatConversationDO} 对象,将它的消息关联在一起 * @@ -45,7 +45,7 @@ public class AiChatConversationDO extends BaseDO { private Long userId; /** - * 会话标题 + * 对话标题 * * 默认由系统自动生成,可用户手动修改 */ @@ -79,7 +79,7 @@ public class AiChatConversationDO extends BaseDO { */ private String model; - // ========== 会话配置 ========== + // ========== 对话配置 ========== /** * 角色设定 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 1c915ed7c8..455a428a7a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -32,7 +32,7 @@ public class AiChatMessageDO extends BaseDO { private Long id; /** - * 会话编号 + * 对话编号 * * 关联 {@link AiChatConversationDO#getId()} 字段 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java index c943f7ea66..7197f8b58f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/model/AiChatModelDO.java @@ -62,7 +62,7 @@ public class AiChatModelDO extends BaseDO { */ private Integer status; - // ========== 会话配置 ========== + // ========== 对话配置 ========== /** * 温度参数 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java index dd4901bdf4..6400297d8e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.ai.dal.mysql.chat; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import org.apache.ibatis.annotations.Mapper; @@ -22,4 +24,18 @@ public interface AiChatConversationMapper extends BaseMapperX selectListByUserIdAndPinned(Long userId, boolean pinned) { + return selectList(new LambdaQueryWrapperX() + .eq(AiChatConversationDO::getUserId, userId) + .eq(AiChatConversationDO::getPinned, pinned)); + } + + default PageResult selectChatConversationPage(AiChatConversationPageReqVO pageReqVO) { + return selectPage(pageReqVO, new LambdaQueryWrapperX() + .eqIfPresent(AiChatConversationDO::getUserId, pageReqVO.getUserId()) + .likeIfPresent(AiChatConversationDO::getTitle, pageReqVO.getTitle()) + .betweenIfPresent(AiChatConversationDO::getCreateTime, pageReqVO.getCreateTime()) + .orderByDesc(AiChatConversationDO::getId)); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java index 7b3e9c4937..76db130bef 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java @@ -1,11 +1,18 @@ package cn.iocoder.yudao.module.ai.dal.mysql.chat; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; +import java.util.Collection; +import java.util.Collections; import java.util.List; +import java.util.Map; /** * AI 聊天对话 Mapper @@ -21,4 +28,19 @@ public interface AiChatMessageMapper extends BaseMapperX { .orderByAsc(AiChatMessageDO::getId)); } + default Map selectCountMapByConversationId(Collection conversationIds) { + // SQL count 查询 + List> result = selectMaps(new QueryWrapper() + .select("COUNT(id) AS count, conversation_id AS conversationId") + .in("conversation_id", conversationIds) + .groupBy("conversation_id")); + if (CollUtil.isEmpty(result)) { + return Collections.emptyMap(); + } + // 转换数据 + return CollectionUtils.convertMap(result, + record -> MapUtil.getLong(record, "conversationId"), + record -> MapUtil.getInt(record, "count" )); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index f93572e66f..42678a2f9f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.ai.service.chat; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; @@ -14,7 +16,7 @@ import java.util.List; public interface AiChatConversationService { /** - * 创建【我的】聊天会话 + * 创建【我的】聊天对话 * * @param createReqVO 创建信息 * @param userId 用户编号 @@ -23,7 +25,7 @@ public interface AiChatConversationService { Long createChatConversationMy(AiChatConversationCreateMyReqVO createReqVO, Long userId); /** - * 更新【我的】聊天会话 + * 更新【我的】聊天对话 * * @param updateReqVO 更新信息 * @param userId 用户编号 @@ -31,23 +33,23 @@ public interface AiChatConversationService { void updateChatConversationMy(AiChatConversationUpdateMyReqVO updateReqVO, Long userId); /** - * 获得【我的】聊天会话列表 + * 获得【我的】聊天对话列表 * * @param userId 用户编号 - * @return 聊天会话列表 + * @return 聊天对话列表 */ List getChatConversationListByUserId(Long userId); /** - * 获得聊天会话 + * 获得聊天对话 * * @param id 编号 - * @return 聊天会话 + * @return 聊天对话 */ AiChatConversationDO getChatConversation(Long id); /** - * 删除【我的】聊天会话 + * 删除【我的】聊天对话 * * @param id 编号 * @param userId 用户编号 @@ -55,17 +57,20 @@ public interface AiChatConversationService { void deleteChatConversationMy(Long id, Long userId); /** - * 校验 - 是否存在 + * 校验聊天对话是否存在 * - * @param id - * @return + * @param id 编号 + * @return 聊天对话 */ - AiChatConversationDO validateExists(Long id); + AiChatConversationDO validateChatConversationExists(Long id); /** - * 删除 - 所有对话,置顶除外 + * 删除【我的】 + 非置顶的聊天对话 * - * @param loginUserId + * @param userId 用户编号 */ - void deleteMyAllExceptPinned(Long loginUserId); + void deleteChatConversationMyByUnpinned(Long userId); + + PageResult getChatConversationPage(AiChatConversationPageReqVO pageReqVO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 3a3b16aeac..41417fbcd5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -1,11 +1,13 @@ package cn.iocoder.yudao.module.ai.service.chat; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ObjectUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; @@ -22,6 +24,8 @@ import java.time.LocalDateTime; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; @@ -69,7 +73,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService @Override public void updateChatConversationMy(AiChatConversationUpdateMyReqVO updateReqVO, Long userId) { // 1.1 校验对话是否存在 - AiChatConversationDO conversation = validateExists(updateReqVO.getId()); + AiChatConversationDO conversation = validateChatConversationExists(updateReqVO.getId()); if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); } @@ -103,7 +107,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService @Override public void deleteChatConversationMy(Long id, Long userId) { // 1. 校验对话是否存在 - AiChatConversationDO conversation = validateExists(id); + AiChatConversationDO conversation = validateChatConversationExists(id); if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); } @@ -119,7 +123,7 @@ public class AiChatConversationServiceImpl implements AiChatConversationService throw exception(CHAT_CONVERSATION_MODEL_ERROR); } - public AiChatConversationDO validateExists(Long id) { + public AiChatConversationDO validateChatConversationExists(Long id) { AiChatConversationDO conversation = chatConversationMapper.selectById(id); if (conversation == null) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); @@ -128,12 +132,17 @@ public class AiChatConversationServiceImpl implements AiChatConversationService } @Override - public void deleteMyAllExceptPinned(Long loginUserId) { - chatConversationMapper.delete( - new LambdaQueryWrapperX() - .eq(AiChatConversationDO::getUserId, loginUserId) - .eq(AiChatConversationDO::getPinned, false) - ); + public void deleteChatConversationMyByUnpinned(Long userId) { + List list = chatConversationMapper.selectListByUserIdAndPinned(userId, false); + if (CollUtil.isEmpty(list)) { + return; + } + chatConversationMapper.deleteBatchIds(convertList(list, AiChatConversationDO::getId)); + } + + @Override + public PageResult getChatConversationPage(AiChatConversationPageReqVO pageReqVO) { + return chatConversationMapper.selectChatConversationPage(pageReqVO); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java index d7f3e80780..329e2cb1be 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java @@ -5,7 +5,9 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import reactor.core.publisher.Flux; +import java.util.Collection; import java.util.List; +import java.util.Map; /** * AI 聊天消息 Service 接口 @@ -32,9 +34,9 @@ public interface AiChatMessageService { Flux> sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId); /** - * 获得指定会话的消息列表 + * 获得指定对话的消息列表 * - * @param conversationId 会话编号 + * @param conversationId 对话编号 * @return 消息列表 */ List getChatMessageListByConversationId(Long conversationId); @@ -48,11 +50,19 @@ public interface AiChatMessageService { void deleteChatMessage(Long id, Long userId); /** - * 删除指定会话的消息 + * 删除指定对话的消息 * - * @param conversationId 会话编号 + * @param conversationId 对话编号 * @param userId 用户编号 */ void deleteChatMessageByConversationId(Long conversationId, Long userId); + /** + * 获得聊天对话的消息数量 Map + * + * @param conversationIds 对话编号数组 + * @return 消息数量 Map + */ + Map getChatMessageCountMap(Collection conversationIds); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 8da9110baf..55ae7a7a35 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; -import cn.iocoder.yudao.framework.common.exception.ErrorCode; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; @@ -15,7 +14,6 @@ import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; -import org.reactivestreams.Publisher; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.*; @@ -34,7 +32,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; -import reactor.core.scheduler.Schedulers; import java.time.LocalDateTime; import java.util.*; @@ -115,7 +112,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { @Override public Flux> sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId) { // 1.1 校验对话存在 - AiChatConversationDO conversation = chatConversationService.validateExists(sendReqVO.getConversationId()); + AiChatConversationDO conversation = chatConversationService.validateChatConversationExists(sendReqVO.getConversationId()); if (ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); // TODO 芋艿:异常情况的对接; } @@ -189,7 +186,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { * n 组:指的是 user + assistant 形成一组 * * @param messages 消息列表 - * @param conversation 会话 + * @param conversation 对话 * @param sendReqVO 发送请求 * @return 消息上下文 */ @@ -258,4 +255,9 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { chatMessageMapper.deleteBatchIds(convertList(messages, AiChatMessageDO::getId)); } + @Override + public Map getChatMessageCountMap(Collection conversationIds) { + return chatMessageMapper.selectCountMapByConversationId(conversationIds); + } + } -- Gitee From 12b82b72e33e8ba00c7ef75d79c80953dec2ee45 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 May 2024 09:00:04 +0800 Subject: [PATCH 0598/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E5=AF=B9=E8=AF=9D=E7=AE=A1=E7=90=86=20100%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/AiChatConversationController.java | 9 ++++++ .../admin/chat/AiChatMessageController.java | 27 +++++++++++++++++ .../vo/message/AiChatMessagePageReqVO.java | 29 +++++++++++++++++++ .../chat/vo/message/AiChatMessageRespVO.java | 14 +++++++-- .../dal/mysql/chat/AiChatMessageMapper.java | 13 +++++++++ .../chat/AiChatConversationService.java | 14 +++++++++ .../chat/AiChatConversationServiceImpl.java | 13 +++++++-- .../ai/service/chat/AiChatMessageService.java | 17 +++++++++++ .../chat/AiChatMessageServiceImpl.java | 19 ++++++++++++ 9 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessagePageReqVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java index ad57460ca9..ed22acf693 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java @@ -104,4 +104,13 @@ public class AiChatConversationController { conversation -> conversation.setMessageCount(messageCountMap.getOrDefault(conversation.getId(), 0)))); } + @Operation(summary = "管理员删除对话") + @DeleteMapping("/delete-by-admin") + @Parameter(name = "id", required = true, description = "对话编号", example = "1024") + @PreAuthorize("@ss.hasPermission('ai:chat-conversation:delete')") + public CommonResult deleteChatConversationByAdmin(@RequestParam("id") Long id) { + chatConversationService.deleteChatConversationByAdmin(id); + return success(true); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index 68559c7763..dccc3bfa37 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -3,8 +3,11 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; @@ -21,6 +24,7 @@ import jakarta.annotation.Resource; import jakarta.annotation.security.PermitAll; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import reactor.core.publisher.Flux; @@ -30,6 +34,7 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -103,6 +108,28 @@ public class AiChatMessageController { // ========== 对话管理 ========== + @GetMapping("/page") + @Operation(summary = "获得消息分页", description = "用于【对话管理】菜单") + @PreAuthorize("@ss.hasPermission('ai:chat-conversation:query')") + public CommonResult> getChatMessagePage(AiChatMessagePageReqVO pageReqVO) { + PageResult pageResult = chatMessageService.getChatMessagePage(pageReqVO); + if (CollUtil.isEmpty(pageResult.getList())) { + return success(PageResult.empty()); + } + // 拼接数据 + Map roleMap = chatRoleService.getChatRoleMap( + convertSet(pageResult.getList(), AiChatMessageDO::getRoleId)); + return success(BeanUtils.toBean(pageResult, AiChatMessageRespVO.class, + respVO -> MapUtils.findAndThen(roleMap, respVO.getRoleId(), role -> respVO.setRoleName(role.getName())))); + } + @Operation(summary = "管理员删除消息") + @DeleteMapping("/delete-by-admin") + @Parameter(name = "id", required = true, description = "消息编号", example = "1024") + @PreAuthorize("@ss.hasPermission('ai:chat-message:delete')") + public CommonResult deleteChatMessageByAdmin(@RequestParam("id") Long id) { + chatMessageService.deleteChatMessageByAdmin(id); + return success(true); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessagePageReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessagePageReqVO.java new file mode 100644 index 0000000000..7ccb6aa0b6 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessagePageReqVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - AI 聊天消息的分页 Request VO") +@Data +public class AiChatMessagePageReqVO extends PageParam { + + @Schema(description = "对话编号", example = "2048") + private Long conversationId; + + @Schema(description = "用户编号", example = "1024") + private Long userId; + + @Schema(description = "消息内容", example = "你好") + private String content; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index 2cb0f9c5c9..918609a53f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -15,6 +15,9 @@ public class AiChatMessageRespVO { @Schema(description = "对话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long conversationId; + @Schema(description = "回复消息编号", example = "1024") + private Long replyId; + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "role") private String type; // 参见 MessageType 枚举类 @@ -33,14 +36,21 @@ public class AiChatMessageRespVO { @Schema(description = "聊天内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,你好啊") private String content; + @Schema(description = "是否携带上下文", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean useContext; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-12 12:51") private LocalDateTime createTime; - // ========= 扩展字段 + // ========== 仅在【对话管理】时加载 ========== @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") private String userAvatar; - @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") + @Schema(description = "角色名字", example = "小黄") + private String roleName; + + @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") private String roleAvatar; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java index 76db130bef..5020f3944e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatMessageMapper.java @@ -2,9 +2,13 @@ package cn.iocoder.yudao.module.ai.dal.mysql.chat; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; @@ -43,4 +47,13 @@ public interface AiChatMessageMapper extends BaseMapperX { record -> MapUtil.getInt(record, "count" )); } + default PageResult selectPage(AiChatMessagePageReqVO pageReqVO) { + return selectPage(pageReqVO, new LambdaQueryWrapperX() + .eqIfPresent(AiChatMessageDO::getConversationId, pageReqVO.getConversationId()) + .eqIfPresent(AiChatMessageDO::getUserId, pageReqVO.getUserId()) + .likeIfPresent(AiChatMessageDO::getContent, pageReqVO.getContent()) + .betweenIfPresent(AiChatMessageDO::getCreateTime, pageReqVO.getCreateTime()) + .orderByDesc(AiChatMessageDO::getId)); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java index 42678a2f9f..bce6d435dd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationCreateMyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationUpdateMyReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import java.util.List; @@ -56,6 +57,13 @@ public interface AiChatConversationService { */ void deleteChatConversationMy(Long id, Long userId); + /** + * 【管理员】删除聊天对话 + * + * @param id 编号 + */ + void deleteChatConversationByAdmin(Long id); + /** * 校验聊天对话是否存在 * @@ -71,6 +79,12 @@ public interface AiChatConversationService { */ void deleteChatConversationMyByUnpinned(Long userId); + /** + * 获得聊天对话的分页列表 + * + * @param pageReqVO 分页查询 + * @return 聊天对话的分页列表 + */ PageResult getChatConversationPage(AiChatConversationPageReqVO pageReqVO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 41417fbcd5..85349b7605 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -25,7 +25,6 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; @@ -108,10 +107,20 @@ public class AiChatConversationServiceImpl implements AiChatConversationService public void deleteChatConversationMy(Long id, Long userId) { // 1. 校验对话是否存在 AiChatConversationDO conversation = validateChatConversationExists(id); - if (ObjUtil.notEqual(conversation.getUserId(), userId)) { + if (conversation == null || ObjUtil.notEqual(conversation.getUserId(), userId)) { throw exception(CHAT_CONVERSATION_NOT_EXISTS); } + // 2. 执行删除 + chatConversationMapper.deleteById(id); + } + @Override + public void deleteChatConversationByAdmin(Long id) { + // 1. 校验对话是否存在 + AiChatConversationDO conversation = validateChatConversationExists(id); + if (conversation == null) { + throw exception(CHAT_CONVERSATION_NOT_EXISTS); + } // 2. 执行删除 chatConversationMapper.deleteById(id); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java index 329e2cb1be..a529a97160 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageService.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.ai.service.chat; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import reactor.core.publisher.Flux; @@ -57,6 +59,13 @@ public interface AiChatMessageService { */ void deleteChatMessageByConversationId(Long conversationId, Long userId); + /** + * 【管理员】删除消息 + * + * @param id 消息编号 + */ + void deleteChatMessageByAdmin(Long id); + /** * 获得聊天对话的消息数量 Map * @@ -65,4 +74,12 @@ public interface AiChatMessageService { */ Map getChatMessageCountMap(Collection conversationIds); + /** + * 获得聊天消息的分页 + * + * @param pageReqVO 分页查询 + * @return 聊天消息的分页 + */ + PageResult getChatMessagePage(AiChatMessagePageReqVO pageReqVO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 55ae7a7a35..5cd9ae94ed 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -6,8 +6,11 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; @@ -255,9 +258,25 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { chatMessageMapper.deleteBatchIds(convertList(messages, AiChatMessageDO::getId)); } + @Override + public void deleteChatMessageByAdmin(Long id) { + // 1. 校验消息存在 + AiChatMessageDO message = chatMessageMapper.selectById(id); + if (message == null) { + throw exception(AI_CHAT_MESSAGE_NOT_EXIST); + } + // 2. 执行删除 + chatMessageMapper.deleteById(id); + } + @Override public Map getChatMessageCountMap(Collection conversationIds) { return chatMessageMapper.selectCountMapByConversationId(conversationIds); } + @Override + public PageResult getChatMessagePage(AiChatMessagePageReqVO pageReqVO) { + return chatMessageMapper.selectPage(pageReqVO); + } + } -- Gitee From 17103201142db3317a73cfdad4f422a689cbeeb9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 May 2024 11:51:05 +0800 Subject: [PATCH 0599/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E5=AF=B9=E8=AF=9D=E7=9A=84=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E4=BA=A4=E7=BB=99=E5=89=8D=E7=AB=AF=E6=8B=BC=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chat/AiChatMessageController.java | 25 +++----------- .../chat/vo/message/AiChatMessageRespVO.java | 6 ---- .../mysql/chat/AiChatConversationMapper.java | 5 +-- .../chat/AiChatMessageServiceImpl.java | 33 +++++++------------ 4 files changed, 17 insertions(+), 52 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java index dccc3bfa37..c0a116216b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatMessageController.java @@ -6,17 +6,16 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.*; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; import cn.iocoder.yudao.module.ai.service.chat.AiChatMessageService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -34,7 +33,6 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -51,9 +49,6 @@ public class AiChatMessageController { @Resource private AiChatRoleService chatRoleService; - @Resource - private AdminUserApi adminUserApi; - @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢") @PostMapping("/send") public CommonResult sendMessage(@Validated @RequestBody AiChatMessageSendReqVO sendReqVO) { @@ -77,17 +72,7 @@ public class AiChatMessageController { return success(Collections.emptyList()); } List messageList = chatMessageService.getChatMessageListByConversationId(conversationId); - if (CollUtil.isEmpty(messageList)) { - return success(Collections.emptyList()); - } - - // 拼接数据 - Map roleMap = chatRoleService.getChatRoleMap(convertSet(messageList, AiChatMessageDO::getRoleId)); - AdminUserRespDTO user = adminUserApi.getUser(getLoginUserId()); - return success(BeanUtils.toBean(messageList, AiChatMessageRespVO.class, respVO -> { - MapUtils.findAndThen(roleMap, respVO.getRoleId(), role -> respVO.setRoleAvatar(role.getAvatar())); - respVO.setUserAvatar(user.getAvatar()); - })); + return success(BeanUtils.toBean(messageList, AiChatMessageRespVO.class)); } @Operation(summary = "删除消息") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java index 918609a53f..1f7e33fc39 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/message/AiChatMessageRespVO.java @@ -44,13 +44,7 @@ public class AiChatMessageRespVO { // ========== 仅在【对话管理】时加载 ========== - @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://xxx") - private String userAvatar; - @Schema(description = "角色名字", example = "小黄") private String roleName; - @Schema(description = "角色头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") - private String roleAvatar; - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java index 6400297d8e..ce9da2f24d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/chat/AiChatConversationMapper.java @@ -17,11 +17,8 @@ import java.util.List; @Mapper public interface AiChatConversationMapper extends BaseMapperX { - // TODO @fan:建议这里不排序哈;交给他们前端排序 default List selectListByUserId(Long userId) { - return selectList(new LambdaQueryWrapperX() - .eq(AiChatConversationDO::getUserId, userId) - .orderByAsc(AiChatConversationDO::getCreateTime)); + return selectList(AiChatConversationDO::getUserId, userId); } default List selectListByUserIdAndPinned(Long userId, boolean pinned) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 5cd9ae94ed..97984045da 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -9,29 +9,25 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatConversationPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; -import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import jakarta.annotation.Resource; -import org.springframework.ai.chat.ChatResponse; -import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.messages.*; -import org.springframework.ai.chat.prompt.ChatOptions; -import org.springframework.ai.chat.prompt.Prompt; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendRespVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatMessageMapper; +import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.chat.ChatResponse; +import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.chat.messages.*; +import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.chat.prompt.Prompt; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -70,9 +66,6 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { @Resource private AiApiKeyService apiKeyService; - @Resource - private AdminUserApi adminUserApi; - @Transactional(rollbackFor = Exception.class) public AiChatMessageRespVO sendMessage(AiChatMessageSendReqVO req) { return null; // TODO 芋艿:一起改 @@ -124,7 +117,6 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { AiChatModelDO model = chatModalService.validateChatModel(conversation.getModelId()); StreamingChatClient chatClient = apiKeyService.getStreamingChatClient(model.getKeyId()); // 1.3 获取用户头像、角色头像 - AdminUserRespDTO user = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()); AiChatRoleDO role = conversation.getRoleId() != null ? chatRoleService.getChatRole(conversation.getRoleId()) : null; // 2. 插入 user 发送消息 @@ -147,11 +139,8 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { newContent = StrUtil.nullToDefault(newContent, ""); // 避免 null 的 情况 contentBuffer.append(newContent); // 响应结果 - AiChatMessageSendRespVO.Message send = BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class, - o -> o.setUserAvatar(user.getAvatar())); - AiChatMessageSendRespVO.Message receive = BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class, - o -> o.setRoleAvatar(role != null ? role.getAvatar() : null)).setContent(newContent); - return success(new AiChatMessageSendRespVO().setSend(send).setReceive(receive)); + return success(new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class)) + .setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent))); }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { -- Gitee From ca4ee3be1f0381e0bbbd3376be604852da76f29b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 May 2024 13:31:07 +0800 Subject: [PATCH 0600/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9AAI=20=E7=9B=B8=E5=85=B3=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- sql/mysql/ruoyi-vue-pro.sql | 392 +++--------------- .../chat/AiChatMessageServiceImpl.java | 1 + .../ai/core/enums/AiPlatformEnum.java | 9 +- yudao-server/pom.xml | 13 +- 5 files changed, 75 insertions(+), 342 deletions(-) diff --git a/pom.xml b/pom.xml index 1606182b4d..0623ce85c6 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,6 @@ yudao-module-system yudao-module-infra - yudao-module-ai @@ -24,6 +23,7 @@ + yudao-module-ai ${project.artifactId} diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index a4f642547e..48c8fb9ca1 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,307 +11,12 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 30/04/2024 09:54:18 + Date: 25/05/2024 13:29:34 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; --- ---------------------------- --- Table structure for QRTZ_BLOB_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`; -CREATE TABLE `QRTZ_BLOB_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `BLOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - INDEX `SCHED_NAME`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_BLOB_TRIGGERS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_CALENDARS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_CALENDARS`; -CREATE TABLE `QRTZ_CALENDARS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CALENDAR` blob NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_CALENDARS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_CRON_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`; -CREATE TABLE `QRTZ_CRON_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_CRON_TRIGGERS --- ---------------------------- -BEGIN; -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', '0 * * * * ?', 'Asia/Shanghai'); -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_FIRED_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`; -CREATE TABLE `QRTZ_FIRED_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `FIRED_TIME` bigint NOT NULL, - `SCHED_TIME` bigint NOT NULL, - `PRIORITY` int NOT NULL, - `STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE, - INDEX `IDX_QRTZ_FT_TRIG_INST_NAME`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY`(`SCHED_NAME` ASC, `INSTANCE_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_J_G`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_T_G`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_FT_TG`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_FIRED_TRIGGERS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_JOB_DETAILS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`; -CREATE TABLE `QRTZ_JOB_DETAILS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, - INDEX `IDX_QRTZ_J_REQ_RECOVERY`(`SCHED_NAME` ASC, `REQUESTS_RECOVERY` ASC) USING BTREE, - INDEX `IDX_QRTZ_J_GRP`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_JOB_DETAILS --- ---------------------------- -BEGIN; -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000197400104A4F425F48414E444C45525F4E414D457400116163636573734C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000187400104A4F425F48414E444C45525F4E414D4574001A62726F6B65726167655265636F7264556E667265657A654A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001A7400104A4F425F48414E444C45525F4E414D457400106572726F724C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000001B7400104A4F425F48414E444C45525F4E414D4574000E6A6F624C6F67436C65616E4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000137400104A4F425F48414E444C45525F4E414D45740010706179526566756E6453796E634A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000157400104A4F425F48414E444C45525F4E414D4574001774726164654F726465724175746F43616E63656C4A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000177400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F436F6D6D656E744A6F627800); -INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000167400104A4F425F48414E444C45525F4E414D4574001874726164654F726465724175746F526563656976654A6F627800); -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_LOCKS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_LOCKS`; -CREATE TABLE `QRTZ_LOCKS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_LOCKS --- ---------------------------- -BEGIN; -INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'STATE_ACCESS'); -INSERT INTO `QRTZ_LOCKS` (`SCHED_NAME`, `LOCK_NAME`) VALUES ('schedulerName', 'TRIGGER_ACCESS'); -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`; -CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_PAUSED_TRIGGER_GRPS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SCHEDULER_STATE --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`; -CREATE TABLE `QRTZ_SCHEDULER_STATE` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `LAST_CHECKIN_TIME` bigint NOT NULL, - `CHECKIN_INTERVAL` bigint NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_SCHEDULER_STATE --- ---------------------------- -BEGIN; -INSERT INTO `QRTZ_SCHEDULER_STATE` (`SCHED_NAME`, `INSTANCE_NAME`, `LAST_CHECKIN_TIME`, `CHECKIN_INTERVAL`) VALUES ('schedulerName', 'MacBook-Pro.local1713489703551', 1713742509534, 15000); -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`; -CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `REPEAT_COUNT` bigint NOT NULL, - `REPEAT_INTERVAL` bigint NOT NULL, - `TIMES_TRIGGERED` bigint NOT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_SIMPLE_TRIGGERS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`; -CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `INT_PROP_1` int NULL DEFAULT NULL, - `INT_PROP_2` int NULL DEFAULT NULL, - `LONG_PROP_1` bigint NULL DEFAULT NULL, - `LONG_PROP_2` bigint NULL DEFAULT NULL, - `DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL, - `DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL, - `BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_SIMPROP_TRIGGERS --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for QRTZ_TRIGGERS --- ---------------------------- -DROP TABLE IF EXISTS `QRTZ_TRIGGERS`; -CREATE TABLE `QRTZ_TRIGGERS` ( - `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `NEXT_FIRE_TIME` bigint NULL DEFAULT NULL, - `PREV_FIRE_TIME` bigint NULL DEFAULT NULL, - `PRIORITY` int NULL DEFAULT NULL, - `TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `START_TIME` bigint NOT NULL, - `END_TIME` bigint NULL DEFAULT NULL, - `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, - `MISFIRE_INSTR` smallint NULL DEFAULT NULL, - `JOB_DATA` blob NULL, - PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, - INDEX `IDX_QRTZ_T_J`(`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_JG`(`SCHED_NAME` ASC, `JOB_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_C`(`SCHED_NAME` ASC, `CALENDAR_NAME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_G`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_STATE`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_N_STATE`(`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_N_G_STATE`(`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NEXT_FIRE_TIME`(`SCHED_NAME` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST`(`SCHED_NAME` ASC, `TRIGGER_STATE` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_STATE` ASC) USING BTREE, - INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP`(`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC) USING BTREE, - CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of QRTZ_TRIGGERS --- ---------------------------- -BEGIN; -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'accessLogCleanJob', 'DEFAULT', 'accessLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696301981000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'brokerageRecordUnfreezeJob', 'DEFAULT', 'brokerageRecordUnfreezeJob', 'DEFAULT', NULL, 1695909720000, -1, 5, 'PAUSED', 'CRON', 1695909706000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'errorLogCleanJob', 'DEFAULT', 'errorLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302043000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'jobLogCleanJob', 'DEFAULT', 'jobLogCleanJob', 'DEFAULT', NULL, 1696348800000, -1, 5, 'PAUSED', 'CRON', 1696302092000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payRefundSyncJob', 'DEFAULT', 'payRefundSyncJob', 'DEFAULT', NULL, 1690117560000, 1690117500000, 5, 'PAUSED', 'CRON', 1690117424000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCancelJob', 'DEFAULT', 'tradeOrderAutoCancelJob', 'DEFAULT', NULL, 1695727440000, 1695727380000, 5, 'PAUSED', 'CRON', 1695656605000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoCommentJob', 'DEFAULT', 'tradeOrderAutoCommentJob', 'DEFAULT', NULL, 1695783840000, 1695783780000, 5, 'PAUSED', 'CRON', 1695742709000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'tradeOrderAutoReceiveJob', 'DEFAULT', 'tradeOrderAutoReceiveJob', 'DEFAULT', NULL, 1695742740000, 1695742680000, 5, 'PAUSED', 'CRON', 1695727433000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E547371007E000A000000037800); -COMMIT; - -- ---------------------------- -- Table structure for infra_api_access_log -- ---------------------------- @@ -344,7 +49,7 @@ CREATE TABLE `infra_api_access_log` ( `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, INDEX `idx_create_time`(`create_time` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35934 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; +) ENGINE = InnoDB AUTO_INCREMENT = 35940 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; -- ---------------------------- -- Records of infra_api_access_log @@ -358,24 +63,24 @@ COMMIT; DROP TABLE IF EXISTS `infra_api_error_log`; CREATE TABLE `infra_api_error_log` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '编号', - `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '链路追踪编号\n *\n * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。', + `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '链路追踪编号', `user_id` int NOT NULL DEFAULT 0 COMMENT '用户编号', `user_type` tinyint NOT NULL DEFAULT 0 COMMENT '用户类型', - `application_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名\n *\n * 目前读取 spring.application.name', + `application_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名', `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求方法名', `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求地址', `request_params` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求参数', `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP', `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '浏览器 UA', `exception_time` datetime NOT NULL COMMENT '异常发生时间', - `exception_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '异常名\n *\n * {@link Throwable#getClass()} 的类全名', - `exception_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常导致的消息\n *\n * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}', - `exception_root_cause_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常导致的根消息\n *\n * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}', - `exception_stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常的栈轨迹\n *\n * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}', - `exception_class_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的类全名\n *\n * {@link StackTraceElement#getClassName()}', - `exception_file_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的类文件\n *\n * {@link StackTraceElement#getFileName()}', - `exception_method_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的方法名\n *\n * {@link StackTraceElement#getMethodName()}', - `exception_line_number` int NOT NULL COMMENT '异常发生的方法所在行\n *\n * {@link StackTraceElement#getLineNumber()}', + `exception_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '异常名', + `exception_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常导致的消息', + `exception_root_cause_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常导致的根消息', + `exception_stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常的栈轨迹', + `exception_class_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的类全名', + `exception_file_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的类文件', + `exception_method_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异常发生的方法名', + `exception_line_number` int NOT NULL COMMENT '异常发生的方法所在行', `process_status` tinyint NOT NULL COMMENT '处理状态', `process_time` datetime NULL DEFAULT NULL COMMENT '处理时间', `process_user_id` int NULL DEFAULT 0 COMMENT '处理用户编号', @@ -386,7 +91,7 @@ CREATE TABLE `infra_api_error_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 16530 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 17651 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; -- ---------------------------- -- Records of infra_api_error_log @@ -423,7 +128,7 @@ CREATE TABLE `infra_codegen_column` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2305 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; +) ENGINE = InnoDB AUTO_INCREMENT = 2397 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; -- ---------------------------- -- Records of infra_codegen_column @@ -461,7 +166,7 @@ CREATE TABLE `infra_codegen_table` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 176 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; +) ENGINE = InnoDB AUTO_INCREMENT = 182 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; -- ---------------------------- -- Records of infra_codegen_table @@ -545,7 +250,7 @@ CREATE TABLE `infra_file` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1307 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1322 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; -- ---------------------------- -- Records of infra_file @@ -691,7 +396,7 @@ CREATE TABLE `system_dept` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '部门表'; +) ENGINE = InnoDB AUTO_INCREMENT = 115 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '部门表'; -- ---------------------------- -- Records of system_dept @@ -733,7 +438,7 @@ CREATE TABLE `system_dict_data` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1537 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1542 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; -- ---------------------------- -- Records of system_dict_data @@ -1104,6 +809,11 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1534, 1, '赢单', '1', 'crm_business_end_status_type', 0, 'success', '', '', '1', '2024-04-13 23:26:57', '1', '2024-04-13 23:26:57', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1535, 2, '输单', '2', 'crm_business_end_status_type', 0, 'primary', '', '', '1', '2024-04-13 23:27:31', '1', '2024-04-13 23:27:31', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1536, 3, '无效', '3', 'crm_business_end_status_type', 0, 'info', '', '', '1', '2024-04-13 23:27:59', '1', '2024-04-13 23:27:59', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1537, 1, 'OpenAI', 'OpenAI', 'ai_platform', 0, '', '', '', '1', '2024-05-09 22:33:47', '1', '2024-05-09 22:58:46', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1538, 2, 'Ollama', 'Ollama', 'ai_platform', 0, '', '', '', '1', '2024-05-17 23:02:55', '1', '2024-05-17 23:02:55', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1539, 3, '文心一言', 'YiYan', 'ai_platform', 0, '', '', '', '1', '2024-05-18 09:24:20', '1', '2024-05-18 09:29:01', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1540, 4, '讯飞星火', 'XingHuo', 'ai_platform', 0, '', '', '', '1', '2024-05-18 10:08:56', '1', '2024-05-18 10:08:56', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1541, 5, '通义千问', 'QianWen', 'ai_platform', 0, '', '', '', '1', '2024-05-18 10:32:29', '1', '2024-05-25 13:18:31', b'0'); COMMIT; -- ---------------------------- @@ -1122,9 +832,8 @@ CREATE TABLE `system_dict_type` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 620 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 621 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; -- ---------------------------- -- Records of system_dict_type @@ -1213,6 +922,7 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', b'0', '1970-01-01 00:00:00'); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (616, '时间间隔', 'date_interval', 0, '', '1', '2024-03-29 22:50:09', '1', '2024-03-29 22:50:09', b'0', '1970-01-01 00:00:00'); INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (619, 'CRM 商机结束状态类型', 'crm_business_end_status_type', 0, '', '1', '2024-04-13 23:23:00', '1', '2024-04-13 23:23:00', b'0', '1970-01-01 00:00:00'); +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (620, 'AI 模型平台', 'ai_platform', 0, '', '1', '2024-05-09 22:27:38', '1', '2024-05-09 22:27:38', b'0', '1970-01-01 00:00:00'); COMMIT; -- ---------------------------- @@ -1236,7 +946,7 @@ CREATE TABLE `system_login_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3104 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 3152 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; -- ---------------------------- -- Records of system_login_log @@ -1367,7 +1077,7 @@ CREATE TABLE `system_menu` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2758 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; +) ENGINE = InnoDB AUTO_INCREMENT = 2783 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; -- ---------------------------- -- Records of system_menu @@ -1377,7 +1087,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, '基础设施', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-03-01 08:28:40', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (5, 'OA 示例', '', 1, 40, 1185, 'oa', 'fa:road', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2021-09-20 16:26:19', '1', '2024-02-29 12:38:13', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (100, '用户管理', 'system:user:list', 2, 1, 1, 'user', 'ep:avatar', 'system/user/index', 'SystemUser', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:02:04', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (101, '角色管理', '', 2, 2, 1, 'role', 'ep:user', 'system/role/index', 'SystemRole', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:28', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (101, '角色管理', '', 2, 2, 1, 'role', 'ep:user', 'system/role/index', 'SystemRole', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-05-01 18:35:29', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (102, '菜单管理', '', 2, 3, 1, 'menu', 'ep:menu', 'system/menu/index', 'SystemMenu', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:50', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (103, '部门管理', '', 2, 4, 1, 'dept', 'fa:address-card', 'system/dept/index', 'SystemDept', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:28', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (104, '岗位管理', '', 2, 5, 1, 'post', 'fa:address-book-o', 'system/post/index', 'SystemPost', 0, b'1', b'1', b'1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:39', b'0'); @@ -1902,7 +1612,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2445, '装修页面更新', 'promotion:diy-page:update', 3, 3, 2442, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2446, '装修页面删除', 'promotion:diy-page:delete', 3, 4, 2442, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2447, '三方登录', '', 1, 10, 1, 'social', 'fa:rocket', '', '', 0, b'1', b'1', b'1', '1', '2023-11-04 12:12:01', '1', '2024-02-29 01:14:05', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2448, '三方应用', '', 2, 1, 2447, 'client', 'ep:set-up', 'views/system/social/client/index.vue', 'SocialClient', 0, b'1', b'1', b'1', '1', '2023-11-04 12:17:19', '1', '2023-11-04 12:17:19', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2448, '三方应用', '', 2, 1, 2447, 'client', 'ep:set-up', 'system/social/client/index.vue', 'SocialClient', 0, b'1', b'1', b'1', '1', '2023-11-04 12:17:19', '1', '2024-05-04 19:09:54', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2449, '三方应用查询', 'system:social-client:query', 3, 1, 2448, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-11-04 12:43:12', '1', '2023-11-04 12:43:33', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2450, '三方应用创建', 'system:social-client:create', 3, 2, 2448, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-11-04 12:43:58', '1', '2023-11-04 12:43:58', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2451, '三方应用更新', 'system:social-client:update', 3, 3, 2448, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-11-04 12:44:27', '1', '2023-11-04 12:44:27', b'0'); @@ -2118,7 +1828,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2709, '客户公海配置查询', 'crm:customer-pool-config:query', 3, 2, 2516, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:45:19', '1', '2024-02-24 16:45:28', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2710, '合同配置更新', 'crm:contract-config:update', 3, 1, 2708, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:45:56', '1', '2024-02-24 16:45:56', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2711, '合同配置查询', 'crm:contract-config:query', 3, 2, 2708, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-02-24 16:46:16', '1', '2024-02-24 16:46:16', b'0'); -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2712, '客户分析', 'crm:statistics-customer:query', 2, 0, 2560, 'customer', 'ep:avatar', 'views/crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, b'1', b'1', b'1', '1', '2024-03-09 16:43:56', '1', '2024-04-24 19:42:52', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2712, '客户分析', 'crm:statistics-customer:query', 2, 0, 2560, 'customer', 'ep:avatar', 'crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, b'1', b'1', b'1', '1', '2024-03-09 16:43:56', '1', '2024-05-04 20:38:50', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2713, '抄送我的', 'bpm:process-instance-cc:query', 2, 30, 1200, 'copy', 'ep:copy-document', 'bpm/task/copy/index', 'BpmProcessInstanceCopy', 0, b'1', b'1', b'1', '1', '2024-03-17 21:50:23', '1', '2024-04-24 19:55:12', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2714, '流程分类', '', 2, 3, 1186, 'category', 'fa:object-ungroup', 'bpm/category/index', 'BpmCategory', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-21 23:51:18', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2715, '分类查询', 'bpm:category:query', 3, 1, 2714, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:25', b'0'); @@ -2163,6 +1873,29 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2755, '删除项目', 'report:go-view-project:delete', 3, 2, 2153, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-04-24 20:01:37', '1', '2024-04-24 20:01:37', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2756, '会员等级记录查询', 'member:level-record:query', 3, 10, 2325, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-04-24 20:02:32', '1', '2024-04-24 20:02:32', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2757, '会员经验记录查询', 'member:experience-record:query', 3, 11, 2325, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-04-24 20:02:51', '1', '2024-04-24 20:02:51', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2758, 'AI 大模型', '', 1, 400, 0, '/ai', 'fa:apple', '', '', 0, b'1', b'1', b'1', '1', '2024-05-07 15:07:56', '1', '2024-05-25 12:36:12', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2759, 'AI 对话', '', 2, 1, 2758, 'chat', 'ep:message', 'ai/chat/index.vue', 'AiChat', 0, b'1', b'1', b'1', '1', '2024-05-07 15:09:14', '1', '2024-05-25 12:37:15', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2760, '控制台', '', 1, 100, 2758, 'console', 'ep:setting', '', '', 0, b'1', b'1', b'1', '1', '2024-05-09 22:39:09', '1', '2024-05-24 23:34:21', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2761, 'API 密钥', '', 2, 0, 2760, 'api-key', 'ep:key', 'ai/model/apiKey/index.vue', 'AiApiKey', 0, b'1', b'1', b'1', '', '2024-05-09 14:52:56', '1', '2024-05-10 22:44:08', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2762, 'API 密钥查询', 'ai:api-key:query', 3, 1, 2761, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-09 14:52:56', '1', '2024-05-13 20:36:32', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2763, 'API 密钥创建', 'ai:api-key:create', 3, 2, 2761, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-09 14:52:56', '1', '2024-05-13 20:36:26', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2764, 'API 密钥更新', 'ai:api-key:update', 3, 3, 2761, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-09 14:52:56', '1', '2024-05-13 20:36:42', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2765, 'API 密钥删除', 'ai:api-key:delete', 3, 4, 2761, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-09 14:52:56', '1', '2024-05-13 20:36:48', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2767, '聊天模型', '', 2, 0, 2760, 'chat-model', 'fa-solid:abacus', 'ai/model/chatModel/index.vue', 'AiChatModel', 0, b'1', b'1', b'1', '', '2024-05-10 14:42:48', '1', '2024-05-10 22:44:16', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2768, '聊天模型查询', 'ai:chat-model:query', 3, 1, 2767, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-10 14:42:48', '1', '2024-05-13 20:37:02', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2769, '聊天模型创建', 'ai:chat-model:create', 3, 2, 2767, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-10 14:42:48', '1', '2024-05-13 20:37:12', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2770, '聊天模型更新', 'ai:chat-model:update', 3, 3, 2767, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-10 14:42:48', '1', '2024-05-13 20:37:18', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2771, '聊天模型删除', 'ai:chat-model:delete', 3, 4, 2767, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-10 14:42:48', '1', '2024-05-13 20:37:23', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2773, '聊天角色', '', 2, 0, 2760, 'chat-role', 'fa:user-secret', 'ai/model/chatRole/index.vue', 'AiChatRole', 0, b'1', b'1', b'1', '', '2024-05-13 12:39:28', '1', '2024-05-13 20:41:45', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2774, '聊天角色查询', 'ai:chat-role:query', 3, 1, 2773, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-05-13 12:39:28', '', '2024-05-13 12:39:28', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2775, '聊天角色创建', 'ai:chat-role:create', 3, 2, 2773, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-05-13 12:39:28', '', '2024-05-13 12:39:28', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2776, '聊天角色更新', 'ai:chat-role:update', 3, 3, 2773, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-05-13 12:39:28', '', '2024-05-13 12:39:28', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2777, '聊天角色删除', 'ai:chat-role:delete', 3, 4, 2773, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-05-13 21:43:38', '1', '2024-05-13 21:43:38', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2778, '聊天管理', '', 2, 0, 2760, 'chat-conversation', 'ep:chat-square', 'ai/chat/manager/index.vue', 'ChatConversation', 0, b'1', b'1', b'1', '', '2024-05-24 15:39:18', '1', '2024-05-24 23:44:11', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2779, '会话查询', 'ai:chat-conversation:query', 3, 1, 2778, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-24 15:39:18', '1', '2024-05-25 08:38:30', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2780, '会话删除', 'ai:chat-conversation:delete', 3, 2, 2778, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-24 15:39:18', '1', '2024-05-25 08:38:40', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2781, '消息查询', 'ai:chat-message:query', 3, 11, 2778, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-05-25 08:38:56', '1', '2024-05-25 08:38:56', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2782, '消息删除', 'ai:chat-message:delete', 3, 12, 2778, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-05-25 08:39:10', '1', '2024-05-25 08:39:10', b'0'); COMMIT; -- ---------------------------- @@ -2284,7 +2017,7 @@ CREATE TABLE `system_oauth2_access_token` ( PRIMARY KEY (`id`) USING BTREE, INDEX `idx_access_token`(`access_token` ASC) USING BTREE, INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6620 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 7123 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; -- ---------------------------- -- Records of system_oauth2_access_token @@ -2406,7 +2139,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1483 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 1521 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; -- ---------------------------- -- Records of system_oauth2_refresh_token @@ -3410,7 +3143,7 @@ CREATE TABLE `system_sms_code` ( `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' -) ENGINE = InnoDB AUTO_INCREMENT = 614 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; +) ENGINE = InnoDB AUTO_INCREMENT = 615 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; -- ---------------------------- -- Records of system_sms_code @@ -3451,7 +3184,7 @@ CREATE TABLE `system_sms_log` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 962 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 963 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; -- ---------------------------- -- Records of system_sms_log @@ -3616,8 +3349,8 @@ CREATE TABLE `system_tenant` ( -- ---------------------------- BEGIN; INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2023-11-06 11:41:41', b'0'); -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-11-06 11:41:47', b'0'); -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-11-06 11:41:53', b'0'); +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2024-05-04 22:37:03', b'0'); +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-29 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2024-05-04 22:36:09', b'0'); COMMIT; -- ---------------------------- @@ -3739,15 +3472,14 @@ CREATE TABLE `system_users` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `idx_username`(`username` ASC, `update_time` ASC, `tenant_id` ASC) USING BTREE + PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户信息表'; -- ---------------------------- -- Records of system_users -- ---------------------------- BEGIN; -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-29 21:50:32', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-29 21:50:32', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-05-19 11:11:07', 'admin', '2021-01-05 17:03:47', NULL, '2024-05-19 11:11:07', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', b'0', 1); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 97984045da..93d8167cad 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -144,6 +144,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { }).doOnComplete(() -> { chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString())); }).doOnError(throwable -> { + // TODO @芋艿:失败的情况下,要不要删除消息 log.error("[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]", userId, sendReqVO, throwable); chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())); }).onErrorResume(error -> { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index cd70122988..63b8834b87 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -17,12 +17,11 @@ public enum AiPlatformEnum { OLLAMA("Ollama", "Ollama"), YI_YAN("YiYan", "文心一言"), // 百度 XING_HUO("XingHuo", "星火"), // 讯飞 - QIAN_WEN("qianwen", "千问"), // 阿里 - - OPEN_AI_DALL("dall", "dall"), - MIDJOURNEY("midjourney", "midjourney"), - GEMIR ("gemir ", "gemir "), // google gemir + QIAN_WEN("QianWen", "千问"), // 阿里 + GEMIR ("gemir ", "gemir "), // 谷歌 + OPEN_AI_DALL("dall", "dall"), // TODO OpenAI 提供的绘图,接入中 + MIDJOURNEY("midjourney", "midjourney"), // TODO MJ 提供的绘图,接入中 ; /** diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index bb71ddddd3..7e44995da5 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -32,12 +32,6 @@ ${revision} - - cn.iocoder.boot - yudao-module-ai-biz - ${revision} - - @@ -107,6 +101,13 @@ + + + cn.iocoder.boot + yudao-module-ai-biz + ${revision} + + org.springframework.boot -- Gitee From 22e12366e84736c812eccee4787b812b47e81f96 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 May 2024 13:38:39 +0800 Subject: [PATCH 0601/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=EF=BC=9AAI=20=E7=9B=B8=E5=85=B3=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-server/src/main/resources/application.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index cc5ed76a38..37e0f5b59f 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -152,6 +152,11 @@ spring.ai: openai: api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z base-url: https://api.gptsapi.net + vertex: + ai: + gemini: + project-id: 1 # TODO 芋艿:缺配置 + location: 2 yudao.ai: yiyan: -- Gitee From d695219534649d279178fb44e5b8f5f7366f25ab Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 25 May 2024 14:28:43 +0800 Subject: [PATCH 0602/1557] =?UTF-8?q?=E3=80=90=E5=A4=84=E7=90=86=E3=80=91G?= =?UTF-8?q?oogleGemir=20=E5=85=88=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E7=84=B6=E8=B7=91=E4=B8=8D=E8=B5=B7=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/core/factory/AiClientFactoryImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index ba496adb08..615cfac1d1 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -60,8 +60,8 @@ public class AiClientFactoryImpl implements AiClientFactory { return buildXingHuoChatClient(apiKey); case QIAN_WEN: return buildQianWenChatClient(apiKey); - case GEMIR: - return buildGoogleGemir(apiKey); +// case GEMIR: +// return buildGoogleGemir(apiKey); default: throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } @@ -170,11 +170,11 @@ public class AiClientFactoryImpl implements AiClientFactory { } - private static VertexAiGeminiChatClient buildGoogleGemir(String key) { - List keys = StrUtil.split(key, '|'); - Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); - VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1)); - return new VertexAiGeminiChatClient(vertexApi); - } +// private static VertexAiGeminiChatClient buildGoogleGemir(String key) { +// List keys = StrUtil.split(key, '|'); +// Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); +// VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1)); +// return new VertexAiGeminiChatClient(vertexApi); +// } } -- Gitee From 3afb3089b536edf4b48295b8153be3013343cd63 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 25 May 2024 14:29:06 +0800 Subject: [PATCH 0603/1557] =?UTF-8?q?=E3=80=90=E5=A4=84=E7=90=86=E3=80=91G?= =?UTF-8?q?oogleGemir=20=E5=85=88=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E7=84=B6=E8=B7=91=E4=B8=8D=E8=B5=B7=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/core/factory/AiClientFactoryImpl.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 615cfac1d1..99fef7436b 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -20,7 +20,6 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; -import com.google.cloud.vertexai.VertexAI; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; import org.springframework.ai.chat.StreamingChatClient; @@ -32,8 +31,6 @@ import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; -import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatClient; -import org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions; import java.util.List; -- Gitee From b073c1d37f0c5027f5d2476d8a12836654b01227 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 25 May 2024 22:06:55 +0800 Subject: [PATCH 0604/1557] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E4=B8=AA=E4=BA=BA=E5=88=86=E9=94=80=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=20NPE=20=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../brokerage/AppBrokerageUserController.java | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java index bb2ba59fea..d82915cde1 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.trade.controller.app.brokerage; import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; @@ -10,6 +11,8 @@ import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.*; import cn.iocoder.yudao.module.trade.convert.brokerage.BrokerageRecordConvert; import cn.iocoder.yudao.module.trade.convert.brokerage.BrokerageUserConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; +import cn.iocoder.yudao.module.trade.dal.dataobject.config.TradeConfigDO; +import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageEnabledConditionEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageWithdrawStatusEnum; @@ -17,16 +20,17 @@ import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageRecordService; import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageUserService; import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageWithdrawService; import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageWithdrawSummaryRespBO; +import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; import java.time.LocalDateTime; import java.util.Collections; import java.util.Map; @@ -50,7 +54,8 @@ public class AppBrokerageUserController { private BrokerageRecordService brokerageRecordService; @Resource private BrokerageWithdrawService brokerageWithdrawService; - + @Resource + private TradeConfigService tradeConfigService; @Resource private MemberUserApi memberUserApi; @@ -59,9 +64,13 @@ public class AppBrokerageUserController { @PreAuthenticated public CommonResult getBrokerageUser() { Optional user = Optional.ofNullable(brokerageUserService.getBrokerageUser(getLoginUserId())); + // 获得交易中心配置 + TradeConfigDO tradeConfig = tradeConfigService.getTradeConfig(); + // 如果是人人分佣 BrokerageUserDO 为 null 时,也有分销资格 + boolean brokerageEnabled = ObjUtil.equal(BrokerageEnabledConditionEnum.ALL.getCondition(), tradeConfig.getBrokerageEnabledCondition()); // 返回数据 AppBrokerageUserRespVO respVO = new AppBrokerageUserRespVO() - .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(false)) + .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(brokerageEnabled)) .setBrokeragePrice(user.map(BrokerageUserDO::getBrokeragePrice).orElse(0)) .setFrozenPrice(user.map(BrokerageUserDO::getFrozenPrice).orElse(0)); return success(respVO); @@ -79,21 +88,22 @@ public class AppBrokerageUserController { @PreAuthenticated public CommonResult getBrokerageUserSummary() { // 查询当前登录用户信息 - BrokerageUserDO brokerageUser = brokerageUserService.getBrokerageUser(getLoginUserId()); + Long userId = getLoginUserId(); + BrokerageUserDO brokerageUser = brokerageUserService.getBrokerageUser(userId); // 统计用户昨日的佣金 LocalDateTime yesterday = LocalDateTime.now().minusDays(1); LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday); LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday); - Integer yesterdayPrice = brokerageRecordService.getSummaryPriceByUserId(brokerageUser.getId(), + Integer yesterdayPrice = brokerageRecordService.getSummaryPriceByUserId(userId, BrokerageRecordBizTypeEnum.ORDER, BrokerageRecordStatusEnum.SETTLEMENT, beginTime, endTime); // 统计用户提现的佣金 - Integer withdrawPrice = brokerageWithdrawService.getWithdrawSummaryListByUserId(Collections.singleton(brokerageUser.getId()), + Integer withdrawPrice = brokerageWithdrawService.getWithdrawSummaryListByUserId(Collections.singleton(userId), BrokerageWithdrawStatusEnum.AUDIT_SUCCESS).stream() .findFirst().map(BrokerageWithdrawSummaryRespBO::getPrice).orElse(0); // 统计分销用户数量(一级) - Long firstBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(brokerageUser.getId(), 1); + Long firstBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(userId, 1); // 统计分销用户数量(二级) - Long secondBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(brokerageUser.getId(), 2); + Long secondBrokerageUserCount = brokerageUserService.getBrokerageUserCountByBindUserId(userId, 2); // 拼接返回 return success(BrokerageUserConvert.INSTANCE.convert(yesterdayPrice, withdrawPrice, firstBrokerageUserCount, secondBrokerageUserCount, brokerageUser)); -- Gitee From 3025bff63111108a60a3999f5e8a041e86756232 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 26 May 2024 09:47:41 +0800 Subject: [PATCH 0605/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91SYSTEM=EF=BC=9A=E5=AE=8C=E5=96=84=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/social/AppSocialUserController.java | 15 +--------- .../api/social/dto/SocialWxQrcodeReqDTO.java | 29 +++++++++++++++++++ .../social/SocialClientServiceImpl.java | 12 ++++++-- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 722da6dabe..038b225f2d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.member.controller.app.social; import cn.hutool.core.codec.Base64; -import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -33,13 +32,6 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti @Validated public class AppSocialUserController { - public static final String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" - private static final String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) - private static final Integer WIDTH = 430; // 二维码宽度 - private static final Boolean AUTO_COLOR = true; // 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 - private static final Boolean CHECK_PATH = true; // 默认true 检查 page 是否存在 - private static final Boolean HYALINE = true; // 是否需要透明底色, hyaline 为true时,生成透明底色的小程序码 - @Resource private SocialUserApi socialUserApi; @Resource @@ -76,12 +68,7 @@ public class AppSocialUserController { @PostMapping("/wxa-qrcode") @Operation(summary = "获得微信小程序码(base64 image)") public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { - byte[] wxQrcode = socialClientApi.getWxaQrcode(new SocialWxQrcodeReqDTO().setPath(reqVO.getPath()) - .setEnvVersion(ENV_VERSION).setWidth(ObjUtil.defaultIfNull(reqVO.getWidth(), WIDTH)) - .setScene(ObjUtil.defaultIfNull(reqVO.getScene(), SCENE)) - .setAutoColor(ObjUtil.defaultIfNull(reqVO.getAutoColor(), AUTO_COLOR)) - .setHyaline(ObjUtil.defaultIfNull(reqVO.getHyaline(), HYALINE)) - .setCheckPath(ObjUtil.defaultIfNull(reqVO.getCheckPath(), CHECK_PATH))); + byte[] wxQrcode = socialClientApi.getWxaQrcode(new SocialWxQrcodeReqDTO().setPath(reqVO.getPath())); return success(Base64.encode(wxQrcode)); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java index efda43e815..4b964af4fa 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java @@ -12,6 +12,35 @@ import lombok.Data; @Data public class SocialWxQrcodeReqDTO { + /** + * 小程序版本 + * + * 正式版为 "release";体验版为 "trial";开发版为 "develop" + */ + public static final String ENV_VERSION = "release"; + /** + * 页面路径不能携带参数(参数请放在scene字段里) + */ + public static final String SCENE = ""; + /** + * 二维码宽度 + */ + public static final Integer WIDTH = 430; + /** + * 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 + */ + public static final Boolean AUTO_COLOR = true; + /** + * 检查 page 是否存在 + */ + public static final Boolean CHECK_PATH = true; + /** + * 是否需要透明底色 + * + * hyaline 为 true 时,生成透明底色的小程序码 + */ + public static final Boolean HYALINE = true; + /** * 场景 */ diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index 41b27b171f..25d6d99d2d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -233,9 +233,15 @@ public class SocialClientServiceImpl implements SocialClientService { public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) { WxMaService service = getWxMaService(UserTypeEnum.MEMBER.getValue()); try { - return service.getQrcodeService().createWxaCodeUnlimitBytes(reqVO.getScene(), reqVO.getPath(), - reqVO.getCheckPath(), reqVO.getEnvVersion(), reqVO.getWidth(), reqVO.getAutoColor(), - null, reqVO.getHyaline()); + return service.getQrcodeService().createWxaCodeUnlimitBytes( + ObjUtil.defaultIfEmpty(reqVO.getScene(), SocialWxQrcodeReqDTO.SCENE), + reqVO.getPath(), + ObjUtil.defaultIfNull(reqVO.getCheckPath(), SocialWxQrcodeReqDTO.CHECK_PATH), + ObjUtil.defaultIfBlank(reqVO.getEnvVersion(), SocialWxQrcodeReqDTO.ENV_VERSION), + ObjUtil.defaultIfNull(reqVO.getWidth(), SocialWxQrcodeReqDTO.WIDTH), + ObjUtil.defaultIfNull(reqVO.getAutoColor(), SocialWxQrcodeReqDTO.AUTO_COLOR), + null, + ObjUtil.defaultIfNull(reqVO.getHyaline(), SocialWxQrcodeReqDTO.HYALINE)); } catch (WxErrorException e) { log.error("[getWxQrcode][reqVO({})) 获得小程序码失败]", reqVO, e); throw exception(SOCIAL_CLIENT_WEIXIN_MINI_APP_QRCODE_ERROR); -- Gitee From d2750f08ce67e6cfa2db4873bdf54bb93bcc439e Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 26 May 2024 10:57:23 +0800 Subject: [PATCH 0606/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E5=AE=A1=E6=89=B9=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=B7=BB=E5=8A=A0=E6=8B=92=E7=BB=9D=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...entType.java => BpmBoundaryEventType.java} | 9 ++- .../BpmUserTaskRejectHandlerType.java | 25 ++++++ .../core/enums/BpmnModelConstants.java | 15 +++- .../core/listener/BpmTaskEventListener.java | 76 ++++++++++++++++++- .../listener/BpmTimerFiredEventListener.java | 23 +++--- .../simple/SimpleModelUserTaskConfig.java | 19 ++++- .../flowable/core/util/BpmnModelUtils.java | 29 +++++++ .../flowable/core/util/SimpleModelUtils.java | 45 +++++++++-- .../bpm/service/task/BpmTaskService.java | 7 +- .../bpm/service/task/BpmTaskServiceImpl.java | 54 +++++++++---- 10 files changed, 254 insertions(+), 48 deletions(-) rename yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/{BpmTimerBoundaryEventType.java => BpmBoundaryEventType.java} (57%) create mode 100644 yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmBoundaryEventType.java similarity index 57% rename from yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java rename to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmBoundaryEventType.java index b4c63c25f0..f824dfaac9 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmTimerBoundaryEventType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmBoundaryEventType.java @@ -5,20 +5,21 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 定时器边界事件类型枚举 + * BPM 边界事件 (boundary event) 自定义类型枚举 * * @author jason */ @Getter @AllArgsConstructor -public enum BpmTimerBoundaryEventType { +public enum BpmBoundaryEventType { - USER_TASK_TIMEOUT(1,"用户任务超时"); + USER_TASK_TIMEOUT(1,"用户任务超时"), + USER_TASK_REJECT_POST_PROCESS(2, "用户任务拒绝后处理"); private final Integer type; private final String name; - public static BpmTimerBoundaryEventType typeOf(Integer type) { + public static BpmBoundaryEventType typeOf(Integer type) { return ArrayUtil.firstMatch(eventType -> eventType.getType().equals(type), values()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java new file mode 100644 index 0000000000..b1bb07f17a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.bpm.enums.definition; + +import cn.hutool.core.util.ArrayUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * BPM 用户任务拒绝处理类型枚举 + * + * @author jason + */ +@Getter +@AllArgsConstructor +public enum BpmUserTaskRejectHandlerType { + + TERMINATION(1, "终止流程"), + RETURN_PRE_USER_TASK(2, "驳回到用户任务"); + + private final Integer type; + private final String name; + + public static BpmUserTaskRejectHandlerType typeOf(Integer type) { + return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); + } +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java index ec99ff9785..a3b0bc0c81 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnModelConstants.java @@ -30,15 +30,25 @@ public interface BpmnModelConstants { */ String USER_TASK_CANDIDATE_PARAM = "candidateParam"; + /** + * BPMN ExtensionElement 的扩展属性,用于标记边界事件类型 + */ + String BOUNDARY_EVENT_TYPE = "boundaryEventType"; + /** * BPMN ExtensionElement 的扩展属性,用于标记用户任务超时执行动作 */ String USER_TASK_TIMEOUT_HANDLER_ACTION = "timeoutAction"; /** - * BPMN ExtensionElement 的扩展属性,用于标记定时边界事件类型 + * BPMN ExtensionElement 的扩展属性,用于标记用户任务拒绝处理类型 + */ + String USER_TASK_REJECT_HANDLER_TYPE = "rejectHandlerType"; + + /** + * BPMN ExtensionElement 的扩展属性,用于标记用户任务拒绝后的回退的任务 Id */ - String TIMER_BOUNDARY_EVENT_TYPE = "timerBoundaryEventType"; + String USER_TASK_REJECT_RETURN_TASK_ID = "rejectReturnTaskId"; /** * BPMN ExtensionElement 流程表单字段权限元素, 用于标记字段权限 @@ -66,4 +76,5 @@ public interface BpmnModelConstants { */ Set> SUPPORT_CONVERT_SIMPLE_FlOW_NODES = ImmutableSet.of(UserTask.class, EndEvent.class); + String REJECT_POST_PROCESS_MESSAGE_NAME = "message_reject_post_process"; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java index 733cc2b41b..7f6d8c5c45 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java @@ -2,23 +2,41 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskReturnReqVO; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import com.google.common.collect.ImmutableSet; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.flowable.bpmn.model.BoundaryEvent; +import org.flowable.bpmn.model.BpmnModel; +import org.flowable.bpmn.model.FlowElement; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; import org.flowable.engine.delegate.event.FlowableActivityCancelledEvent; +import org.flowable.engine.delegate.event.FlowableMessageEvent; import org.flowable.engine.history.HistoricActivityInstance; import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; -import jakarta.annotation.Resource; import java.util.List; +import java.util.Objects; import java.util.Set; +import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseBoundaryEventExtensionElement; + /** * 监听 {@link Task} 的开始与完成 * @@ -34,15 +52,22 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { @Resource @Lazy // 解决循环依赖 private BpmActivityService activityService; + @Resource + @Lazy // 解决循环依赖 + private BpmProcessInstanceService processInstanceService; + @Resource + @Lazy // 延迟加载,避免循环依赖 + private BpmModelService bpmModelService; public static final Set TASK_EVENTS = ImmutableSet.builder() .add(FlowableEngineEventType.TASK_CREATED) .add(FlowableEngineEventType.TASK_ASSIGNED) -// .add(FlowableEngineEventType.TASK_COMPLETED) // 由于审批通过时,已经记录了 task 的 status 为通过,所以不需要监听了。 + //.add(FlowableEngineEventType.TASK_COMPLETED) // 由于审批通过时,已经记录了 task 的 status 为通过,所以不需要监听了。 + .add(FlowableEngineEventType.ACTIVITY_MESSAGE_RECEIVED) .add(FlowableEngineEventType.ACTIVITY_CANCELLED) .build(); - public BpmTaskEventListener(){ + public BpmTaskEventListener() { super(TASK_EVENTS); } @@ -53,7 +78,7 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { @Override protected void taskAssigned(FlowableEngineEntityEvent event) { - taskService.updateTaskExtAssign((Task)event.getEntity()); + taskService.updateTaskExtAssign((Task) event.getEntity()); } @Override @@ -72,4 +97,47 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { }); } + @Override + protected void activityMessageReceived(FlowableMessageEvent event) { + BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(event.getProcessDefinitionId()); + FlowElement element = BpmnModelUtils.getFlowElementById(bpmnModel, event.getActivityId()); + if (element instanceof BoundaryEvent) { + BoundaryEvent boundaryEvent = (BoundaryEvent) element; + String boundaryEventType = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.BOUNDARY_EVENT_TYPE); + // 如果自定义类型为拒绝后处理,进行拒绝处理 + if (Objects.equals(USER_TASK_REJECT_POST_PROCESS.getType(), NumberUtils.parseInt(boundaryEventType))) { + String rejectHandlerType = parseBoundaryEventExtensionElement((BoundaryEvent) element, BpmnModelConstants.USER_TASK_REJECT_HANDLER_TYPE); + rejectHandler(boundaryEvent, event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), NumberUtils.parseInt(rejectHandlerType)); + } + } + } + + private void rejectHandler(BoundaryEvent boundaryEvent, String processInstanceId, String taskDefineKey, Integer rejectHandlerType) { + BpmUserTaskRejectHandlerType userTaskRejectHandlerType = BpmUserTaskRejectHandlerType.typeOf(rejectHandlerType); + if (userTaskRejectHandlerType != null) { + List taskList = taskService.getAssignedTaskListByConditions(processInstanceId, null, taskDefineKey); + taskList.forEach(task -> { + Integer taskStatus = FlowableUtils.getTaskStatus(task); + // 只有处于拒绝状态下才处理 + if (Objects.equals(BpmTaskStatusEnum.REJECT.getStatus(), taskStatus)) { + // 终止流程 + if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.TERMINATION) { + processInstanceService.updateProcessInstanceReject(task.getProcessInstanceId(), FlowableUtils.getTaskReason(task)); + return; + } + // 驳回 + if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK) { + String returnTaskId = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.USER_TASK_REJECT_RETURN_TASK_ID); + if (returnTaskId != null) { + BpmTaskReturnReqVO reqVO = new BpmTaskReturnReqVO().setId(task.getId()) + .setTargetTaskDefinitionKey(returnTaskId) + .setReason("任务拒绝回退"); + taskService.returnTask(getLoginUserId(), reqVO); + } + } + } + }); + } + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java index 780b6b739c..891d91409a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTimerFiredEventListener.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; -import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskApproveReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRejectReqVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmTimerBoundaryEventType; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.mq.message.task.TodoTaskReminderMessage; @@ -18,7 +17,6 @@ import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BoundaryEvent; import org.flowable.bpmn.model.BpmnModel; -import org.flowable.bpmn.model.ExtensionElement; import org.flowable.bpmn.model.FlowElement; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; @@ -29,7 +27,6 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.List; -import java.util.Optional; import java.util.Set; /** @@ -69,23 +66,21 @@ public class BpmTimerFiredEventListener extends AbstractFlowableEngineEventListe // 如果是定时器边界事件 if (element instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) element; - ExtensionElement extensionElement = CollUtil.getFirst(boundaryEvent.getExtensionElements().get(BpmnModelConstants.TIMER_BOUNDARY_EVENT_TYPE)); - Integer timerBoundaryEventType = NumberUtils.parseInt(Optional.ofNullable(extensionElement).map(ExtensionElement::getElementText).orElse(null)); - BpmTimerBoundaryEventType bpmTimerBoundaryEventType = BpmTimerBoundaryEventType.typeOf(timerBoundaryEventType); + String boundaryEventType = BpmnModelUtils.parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.BOUNDARY_EVENT_TYPE); + BpmBoundaryEventType bpmTimerBoundaryEventType = BpmBoundaryEventType.typeOf(NumberUtils.parseInt(boundaryEventType)); // 类型为用户任务超时未处理的情况 - if (bpmTimerBoundaryEventType == BpmTimerBoundaryEventType.USER_TASK_TIMEOUT) { - ExtensionElement timeoutActionElement = CollUtil.getFirst(boundaryEvent.getExtensionElements().get(BpmnModelConstants.USER_TASK_TIMEOUT_HANDLER_ACTION)); - Integer timeoutAction = NumberUtils.parseInt(Optional.ofNullable(timeoutActionElement).map(ExtensionElement::getElementText).orElse(null)); - processUserTaskTimeout(event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), timeoutAction); + if (bpmTimerBoundaryEventType == BpmBoundaryEventType.USER_TASK_TIMEOUT) { + String timeoutAction = BpmnModelUtils.parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.USER_TASK_TIMEOUT_HANDLER_ACTION); + userTaskTimeoutHandler(event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), NumberUtils.parseInt(timeoutAction)); } } } - private void processUserTaskTimeout(String processInstanceId, String taskDefKey, Integer timeoutAction) { + private void userTaskTimeoutHandler(String processInstanceId, String taskDefKey, Integer timeoutAction) { BpmUserTaskTimeoutActionEnum userTaskTimeoutAction = BpmUserTaskTimeoutActionEnum.actionOf(timeoutAction); if (userTaskTimeoutAction != null) { - // 查询超时未处理的任务 - List taskList = bpmTaskService.getAssignedTaskListByConditions(processInstanceId, taskDefKey); + // 查询超时未处理的任务 TODO 加签的情况会不会有问题 ??? + List taskList = bpmTaskService.getAssignedTaskListByConditions(processInstanceId, null, taskDefKey); taskList.forEach(task -> { // 自动提醒 if (userTaskTimeoutAction == BpmUserTaskTimeoutActionEnum.AUTO_REMINDER) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java index 49fd21018a..1ff3dd714c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/simple/SimpleModelUserTaskConfig.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.simple; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType; import lombok.Data; import java.util.List; @@ -33,12 +34,15 @@ public class SimpleModelUserTaskConfig { */ private Integer approveMethod; - /** * 超时处理 */ private TimeoutHandler timeoutHandler; + /** + * 用户任务拒绝处理 + */ + private RejectHandler rejectHandler; @Data public static class TimeoutHandler { @@ -62,7 +66,20 @@ public class SimpleModelUserTaskConfig { * 如果执行动作是自动提醒, 最大提醒次数 */ private Integer maxRemindCount; + } + + @Data + public static class RejectHandler { + /** + * 用户任务拒绝处理类型 {@link BpmUserTaskRejectHandlerType} + */ + private Integer type; + + /** + * 用户任务拒绝后驳回的节点 Id + */ + private String returnNodeId; } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index e0b2d02b97..7a0b2b7616 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -5,6 +5,7 @@ import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; @@ -360,4 +361,32 @@ public class BpmnModelUtils { return userTaskList; } + /** + * 在用户任务中查找自定义的边界事件 + * + * @param userTask 用户任务 + * @param bpmBoundaryEventType 自定义的边界事件类型 + */ + public static BoundaryEvent findCustomBoundaryEventOfUserTask(UserTask userTask, BpmBoundaryEventType bpmBoundaryEventType) { + if (userTask == null) { + return null; + } + BoundaryEvent result = null; + for (BoundaryEvent item : userTask.getBoundaryEvents()) { + String boundaryEventType = parseBoundaryEventExtensionElement(item, BpmnModelConstants.BOUNDARY_EVENT_TYPE); + if (Objects.equals(bpmBoundaryEventType.getType(), NumberUtils.parseInt(boundaryEventType))) { + result = item; + break; + } + } + return result; + } + + public static String parseBoundaryEventExtensionElement(BoundaryEvent boundaryEvent, String customElement) { + if (boundaryEvent == null) { + return null; + } + ExtensionElement extensionElement = CollUtil.getFirst(boundaryEvent.getExtensionElements().get(customElement)); + return Optional.ofNullable(extensionElement).map(ExtensionElement::getElementText).orElse(null); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 72f6157a92..993baaa66e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelConditionGroups; import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelUserTaskConfig; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.simple.SimpleModelUserTaskConfig.RejectHandler; import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; @@ -22,13 +23,14 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_TIMEOUT; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_EVENT; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmTimerBoundaryEventType.USER_TASK_TIMEOUT; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum.AUTO_REMINDER; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.*; -import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE; -import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX; +import static org.flowable.bpmn.constants.BpmnXMLConstants.*; /** * 仿钉钉快搭模型相关的工具方法 @@ -42,12 +44,12 @@ public class SimpleModelUtils { /** * 所有审批人同意的表达式 */ - public static final String ALL_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances >= 0 }"; + public static final String ALL_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances >= nrOfInstances }"; /** * 任一一名审批人同意的表达式 */ - public static final String ANY_OF_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances >= nrOfInstances }"; + public static final String ANY_OF_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances > 0 }"; /** * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) @@ -59,6 +61,12 @@ public class SimpleModelUtils { */ public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); + // 不加这个 解析 Message 会报 NPE 异常 + bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); + Message rejectPostProcessMsg = new Message(); + rejectPostProcessMsg.setName(REJECT_POST_PROCESS_MESSAGE_NAME); + bpmnModel.addMessage(rejectPostProcessMsg); + Process mainProcess = new Process(); mainProcess.setId(processId); mainProcess.setName(processName); @@ -214,6 +222,12 @@ public class SimpleModelUtils { BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); mainProcess.addFlowElement(boundaryEvent); } + if (userTaskConfig.getRejectHandler() != null) { + // 添加用户任务拒绝 Message Boundary Event, 用于任务的拒绝处理 + BoundaryEvent boundaryEvent = buildUserTaskRejectBoundaryEvent(userTask, userTaskConfig.getRejectHandler()); + mainProcess.addFlowElement(boundaryEvent); + } + break; } case COPY_TASK: { @@ -270,10 +284,27 @@ public class SimpleModelUtils { } } + private static BoundaryEvent buildUserTaskRejectBoundaryEvent(UserTask userTask, RejectHandler rejectHandler) { + BoundaryEvent messageBoundaryEvent = new BoundaryEvent(); + messageBoundaryEvent.setId("Event-" + IdUtil.fastUUID()); + // 设置关联的任务为不会被中断 + messageBoundaryEvent.setCancelActivity(false); + messageBoundaryEvent.setAttachedToRef(userTask); + MessageEventDefinition messageEventDefinition = new MessageEventDefinition(); + messageEventDefinition.setMessageRef(REJECT_POST_PROCESS_MESSAGE_NAME); + messageBoundaryEvent.addEventDefinition(messageEventDefinition); + addExtensionElement(messageBoundaryEvent, BOUNDARY_EVENT_TYPE, USER_TASK_REJECT_POST_PROCESS.getType().toString()); + addExtensionElement(messageBoundaryEvent, USER_TASK_REJECT_HANDLER_TYPE, StrUtil.toStringOrNull(rejectHandler.getType())); + if (Objects.equals(rejectHandler.getType(), RETURN_PRE_USER_TASK.getType())) { + addExtensionElement(messageBoundaryEvent, USER_TASK_REJECT_RETURN_TASK_ID, rejectHandler.getReturnNodeId()); + } + return messageBoundaryEvent; + } + private static BoundaryEvent buildUserTaskTimerBoundaryEvent(UserTask userTask, SimpleModelUserTaskConfig.TimeoutHandler timeoutHandler) { // 定时器边界事件 BoundaryEvent boundaryEvent = new BoundaryEvent(); - boundaryEvent.setId(IdUtil.fastUUID()); + boundaryEvent.setId("Event-" + IdUtil.fastUUID()); // 设置关联的任务为不会被中断 boundaryEvent.setCancelActivity(false); boundaryEvent.setAttachedToRef(userTask); @@ -286,7 +317,7 @@ public class SimpleModelUtils { } boundaryEvent.addEventDefinition(eventDefinition); // 添加定时器边界事件类型 - addExtensionElement(boundaryEvent, TIMER_BOUNDARY_EVENT_TYPE, USER_TASK_TIMEOUT.getType().toString()); + addExtensionElement(boundaryEvent, BOUNDARY_EVENT_TYPE, USER_TASK_TIMEOUT.getType().toString()); // 添加超时执行动作元素 addExtensionElement(boundaryEvent, USER_TASK_TIMEOUT_HANDLER_ACTION, StrUtil.toStringOrNull(timeoutHandler.getAction())); return boundaryEvent; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java index 0b989f44c1..f65e3333ba 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java @@ -90,6 +90,8 @@ public interface BpmTaskService { */ void rejectTask(Long userId, @Valid BpmTaskRejectReqVO reqVO); + + /** * 将流程任务分配给指定用户 * @@ -129,10 +131,11 @@ public interface BpmTaskService { /** * 根据条件查询已经分配的用户任务列表 - * @param processInstanceId 流程实例编号 + * @param processInstanceId 流程实例编号,不允许为空 + * @param executionId execution Id * @param taskDefineKey 任务定义 Key */ - List getAssignedTaskListByConditions(String processInstanceId, String taskDefineKey); + List getAssignedTaskListByConditions(String processInstanceId, String executionId, String taskDefineKey); /** * 获取当前任务的可回退的 UserTask 集合 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 4d6f9bae3e..57ea058123 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -9,16 +9,18 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; @@ -26,6 +28,7 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; +import org.flowable.bpmn.model.BoundaryEvent; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.UserTask; @@ -33,6 +36,7 @@ import org.flowable.engine.HistoryService; import org.flowable.engine.ManagementService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; +import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.DelegationState; import org.flowable.task.api.Task; @@ -245,7 +249,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 如果父任务是有前后【加签】的任务,如果它【加签】出来的子任务都被处理,需要处理父任务: - * + *

* 1. 如果是【向前】加签,则需要重新激活父任务,让它可以被审批 * 2. 如果是【向后】加签,则需要完成父任务,让它完成审批 * @@ -278,7 +282,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.resolveTask(parentTaskId); // 3.1.2 更新流程任务 status updateTaskStatus(parentTaskId, BpmTaskStatusEnum.RUNNING.getStatus()); - // 3.2 情况二:处理向【向后】加签 + // 3.2 情况二:处理向【向后】加签 } else if (BpmTaskSignTypeEnum.AFTER.getType().equals(scopeType)) { // 只有 parentTask 处于 APPROVING 的情况下,才可以继续 complete 完成 // 否则,一个未审批的 parentTask 任务,在加签出来的任务都被减签的情况下,就直接完成审批,这样会存在问题 @@ -333,14 +337,29 @@ public class BpmTaskServiceImpl implements BpmTaskService { taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.REJECT.getType(), BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason())); - // 3. 更新流程实例,审批不通过! + BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(task.getProcessDefinitionId()); + FlowElement flowElement = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey()); + // 寻找用户任务的自定义拒绝后处理边界事件 + BoundaryEvent rejectBoundaryEvent = BpmnModelUtils.findCustomBoundaryEventOfUserTask((UserTask) flowElement, + BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS); + + if (rejectBoundaryEvent != null) { + Execution execution = runtimeService.createExecutionQuery().processInstanceId(task.getProcessInstanceId()) + .activityId(rejectBoundaryEvent.getId()).singleResult(); + if (execution != null) { + // 3.1 触发消息边界事件. 进一步的处理交给 BpmTaskEventListener + runtimeService.messageEventReceived(BpmnModelConstants.REJECT_POST_PROCESS_MESSAGE_NAME, execution.getId()); + return; + } + } + // 3.2 没有找到拒绝后处理边界事件, 更新流程实例,审批不通过! processInstanceService.updateProcessInstanceReject(instance.getProcessInstanceId(), reqVO.getReason()); } /** * 更新流程任务的 status 状态 * - * @param id 任务编号 + * @param id 任务编号 * @param status 状态 */ private void updateTaskStatus(String id, Integer status) { @@ -350,7 +369,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 更新流程任务的 status 状态、reason 理由 * - * @param id 任务编号 + * @param id 任务编号 * @param status 状态 * @param reason 理由(审批通过、审批不通过的理由) */ @@ -434,9 +453,16 @@ public class BpmTaskServiceImpl implements BpmTaskService { } @Override - public List getAssignedTaskListByConditions(String processInstanceId, String defineKey) { - TaskQuery taskQuery = taskService.createTaskQuery().processInstanceId(processInstanceId) - .taskDefinitionKey(defineKey).active().taskAssigned().includeTaskLocalVariables(); + public List getAssignedTaskListByConditions(String processInstanceId, String executionId, String defineKey) { + Assert.notNull(processInstanceId, "processInstanceId 不能为空"); + TaskQuery taskQuery = taskService.createTaskQuery().taskAssigned().processInstanceId(processInstanceId).active() + .includeTaskLocalVariables(); + if (StrUtil.isNotEmpty(executionId)) { + taskQuery.executionId(executionId); + } + if (StrUtil.isNotEmpty(defineKey)) { + taskQuery.taskDefinitionKey(defineKey); + } return taskQuery.list(); } @@ -664,7 +690,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { List currentAssigneeList = convertListByFlatMap(taskList, task -> // 需要考虑 owner 的情况,因为向后加签时,它暂时没 assignee 而是 owner Stream.of(NumberUtils.parseLong(task.getAssignee()), NumberUtils.parseLong(task.getOwner()))); if (CollUtil.containsAny(currentAssigneeList, reqVO.getUserIds())) { - List userList = adminUserApi.getUserList( CollUtil.intersection(currentAssigneeList, reqVO.getUserIds())); + List userList = adminUserApi.getUserList(CollUtil.intersection(currentAssigneeList, reqVO.getUserIds())); throw exception(TASK_SIGN_CREATE_USER_REPEAT, String.join(",", convertList(userList, AdminUserRespDTO::getNickname))); } return taskEntity; @@ -673,8 +699,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { /** * 创建加签子任务 * - * @param userIds 被加签的用户 ID - * @param taskEntity 被加签的任务 + * @param userIds 被加签的用户 ID + * @param taskEntity 被加签的任务 */ private void createSignTaskList(List userIds, TaskEntityImpl taskEntity) { if (CollUtil.isEmpty(userIds)) { @@ -703,7 +729,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.1 向前加签,设置审批人 if (BpmTaskSignTypeEnum.BEFORE.getType().equals(parentTask.getScopeType())) { task.setAssignee(assignee); - // 2.2 向后加签,设置 owner 不设置 assignee 是因为不能同时审批,需要等父任务完成 + // 2.2 向后加签,设置 owner 不设置 assignee 是因为不能同时审批,需要等父任务完成 } else { task.setOwner(assignee); } -- Gitee From 007639d61aeed2b1530b6d32555ac85980566c86 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 27 May 2024 09:28:04 +0800 Subject: [PATCH 0607/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=E7=AE=80=E5=8C=96=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E8=8A=82=E7=82=B9=E6=8B=92=E7=BB=9D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/bpm/enums/ErrorCodeConstants.java | 1 + .../BpmUserTaskRejectHandlerType.java | 2 +- .../core/listener/BpmTaskEventListener.java | 110 +++++++----------- .../flowable/core/util/BpmnModelUtils.java | 30 ++--- .../flowable/core/util/SimpleModelUtils.java | 35 ++---- .../bpm/service/task/BpmTaskServiceImpl.java | 33 +++--- 6 files changed, 79 insertions(+), 132 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java index e344a2145e..daa4d86168 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java @@ -51,6 +51,7 @@ public interface ErrorCodeConstants { ErrorCode TASK_SIGN_DELETE_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务"); ErrorCode TASK_TRANSFER_FAIL_USER_REPEAT = new ErrorCode(1_009_005_013, "任务转办失败,转办人和当前审批人为同一人"); ErrorCode TASK_TRANSFER_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_014, "任务转办失败,转办人不存在"); + ErrorCode TASK_RETURN_NOT_ASSIGN_TARGET_TASK_ID = new ErrorCode(1_009_005_015, "回退任务未指定目标任务编号"); ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败,原因:找不到任务的审批人!"); // ========== 动态表单模块 1-009-010-000 ========== diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java index b1bb07f17a..7a455f382d 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmUserTaskRejectHandlerType.java @@ -14,7 +14,7 @@ import lombok.Getter; public enum BpmUserTaskRejectHandlerType { TERMINATION(1, "终止流程"), - RETURN_PRE_USER_TASK(2, "驳回到用户任务"); + RETURN_PRE_USER_TASK(2, "驳回到指定任务节点"); private final Integer type; private final String name; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java index 7f6d8c5c45..89e6854679 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java @@ -2,41 +2,23 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskReturnReqVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType; -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; -import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; -import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import com.google.common.collect.ImmutableSet; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.flowable.bpmn.model.BoundaryEvent; -import org.flowable.bpmn.model.BpmnModel; -import org.flowable.bpmn.model.FlowElement; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; import org.flowable.engine.delegate.event.FlowableActivityCancelledEvent; -import org.flowable.engine.delegate.event.FlowableMessageEvent; import org.flowable.engine.history.HistoricActivityInstance; import org.flowable.task.api.Task; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.List; -import java.util.Objects; import java.util.Set; -import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseBoundaryEventExtensionElement; - /** * 监听 {@link Task} 的开始与完成 * @@ -52,18 +34,12 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { @Resource @Lazy // 解决循环依赖 private BpmActivityService activityService; - @Resource - @Lazy // 解决循环依赖 - private BpmProcessInstanceService processInstanceService; - @Resource - @Lazy // 延迟加载,避免循环依赖 - private BpmModelService bpmModelService; public static final Set TASK_EVENTS = ImmutableSet.builder() .add(FlowableEngineEventType.TASK_CREATED) .add(FlowableEngineEventType.TASK_ASSIGNED) //.add(FlowableEngineEventType.TASK_COMPLETED) // 由于审批通过时,已经记录了 task 的 status 为通过,所以不需要监听了。 - .add(FlowableEngineEventType.ACTIVITY_MESSAGE_RECEIVED) +// .add(FlowableEngineEventType.ACTIVITY_MESSAGE_RECEIVED) .add(FlowableEngineEventType.ACTIVITY_CANCELLED) .build(); @@ -97,47 +73,47 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener { }); } - @Override - protected void activityMessageReceived(FlowableMessageEvent event) { - BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(event.getProcessDefinitionId()); - FlowElement element = BpmnModelUtils.getFlowElementById(bpmnModel, event.getActivityId()); - if (element instanceof BoundaryEvent) { - BoundaryEvent boundaryEvent = (BoundaryEvent) element; - String boundaryEventType = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.BOUNDARY_EVENT_TYPE); - // 如果自定义类型为拒绝后处理,进行拒绝处理 - if (Objects.equals(USER_TASK_REJECT_POST_PROCESS.getType(), NumberUtils.parseInt(boundaryEventType))) { - String rejectHandlerType = parseBoundaryEventExtensionElement((BoundaryEvent) element, BpmnModelConstants.USER_TASK_REJECT_HANDLER_TYPE); - rejectHandler(boundaryEvent, event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), NumberUtils.parseInt(rejectHandlerType)); - } - } - } - - private void rejectHandler(BoundaryEvent boundaryEvent, String processInstanceId, String taskDefineKey, Integer rejectHandlerType) { - BpmUserTaskRejectHandlerType userTaskRejectHandlerType = BpmUserTaskRejectHandlerType.typeOf(rejectHandlerType); - if (userTaskRejectHandlerType != null) { - List taskList = taskService.getAssignedTaskListByConditions(processInstanceId, null, taskDefineKey); - taskList.forEach(task -> { - Integer taskStatus = FlowableUtils.getTaskStatus(task); - // 只有处于拒绝状态下才处理 - if (Objects.equals(BpmTaskStatusEnum.REJECT.getStatus(), taskStatus)) { - // 终止流程 - if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.TERMINATION) { - processInstanceService.updateProcessInstanceReject(task.getProcessInstanceId(), FlowableUtils.getTaskReason(task)); - return; - } - // 驳回 - if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK) { - String returnTaskId = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.USER_TASK_REJECT_RETURN_TASK_ID); - if (returnTaskId != null) { - BpmTaskReturnReqVO reqVO = new BpmTaskReturnReqVO().setId(task.getId()) - .setTargetTaskDefinitionKey(returnTaskId) - .setReason("任务拒绝回退"); - taskService.returnTask(getLoginUserId(), reqVO); - } - } - } - }); - } - } +// @Override +// protected void activityMessageReceived(FlowableMessageEvent event) { +// BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(event.getProcessDefinitionId()); +// FlowElement element = BpmnModelUtils.getFlowElementById(bpmnModel, event.getActivityId()); +// if (element instanceof BoundaryEvent) { +// BoundaryEvent boundaryEvent = (BoundaryEvent) element; +// String boundaryEventType = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.BOUNDARY_EVENT_TYPE); +// // 如果自定义类型为拒绝后处理,进行拒绝处理 +// if (Objects.equals(USER_TASK_REJECT_POST_PROCESS.getType(), NumberUtils.parseInt(boundaryEventType))) { +// String rejectHandlerType = parseBoundaryEventExtensionElement((BoundaryEvent) element, BpmnModelConstants.USER_TASK_REJECT_HANDLER_TYPE); +// rejectHandler(boundaryEvent, event.getProcessInstanceId(), boundaryEvent.getAttachedToRefId(), NumberUtils.parseInt(rejectHandlerType)); +// } +// } +// } +// +// private void rejectHandler(BoundaryEvent boundaryEvent, String processInstanceId, String taskDefineKey, Integer rejectHandlerType) { +// BpmUserTaskRejectHandlerType userTaskRejectHandlerType = BpmUserTaskRejectHandlerType.typeOf(rejectHandlerType); +// if (userTaskRejectHandlerType != null) { +// List taskList = taskService.getAssignedTaskListByConditions(processInstanceId, null, taskDefineKey); +// taskList.forEach(task -> { +// Integer taskStatus = FlowableUtils.getTaskStatus(task); +// // 只有处于拒绝状态下才处理 +// if (Objects.equals(BpmTaskStatusEnum.REJECT.getStatus(), taskStatus)) { +// // 终止流程 +// if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.TERMINATION) { +// processInstanceService.updateProcessInstanceReject(task.getProcessInstanceId(), FlowableUtils.getTaskReason(task)); +// return; +// } +// // 驳回 +// if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK) { +// String returnTaskId = parseBoundaryEventExtensionElement(boundaryEvent, BpmnModelConstants.USER_TASK_REJECT_RETURN_TASK_ID); +// if (returnTaskId != null) { +// BpmTaskReturnReqVO reqVO = new BpmTaskReturnReqVO().setId(task.getId()) +// .setTargetTaskDefinitionKey(returnTaskId) +// .setReason("任务拒绝回退"); +// taskService.returnTask(getLoginUserId(), reqVO); +// } +// } +// } +// }); +// } +// } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java index 7a0b2b7616..cdaa155dca 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java @@ -5,7 +5,6 @@ import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.number.NumberUtils; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.model.Process; @@ -43,6 +42,14 @@ public class BpmnModelUtils { return candidateParam; } + public static String parseExtensionElement(FlowElement flowElement, String elementName) { + if (flowElement == null) { + return null; + } + ExtensionElement element = CollUtil.getFirst(flowElement.getExtensionElements().get(elementName)); + return Optional.ofNullable(element).map(ExtensionElement::getElementText).orElse(null); + } + // TODO @jason:貌似这个没地方调用??? @芋艿 在 BpmTaskConvert里面。暂时注释掉了。 public static Map parseFormFieldsPermission(BpmnModel bpmnModel, String flowElementId) { FlowElement flowElement = getFlowElementById(bpmnModel, flowElementId); @@ -361,27 +368,6 @@ public class BpmnModelUtils { return userTaskList; } - /** - * 在用户任务中查找自定义的边界事件 - * - * @param userTask 用户任务 - * @param bpmBoundaryEventType 自定义的边界事件类型 - */ - public static BoundaryEvent findCustomBoundaryEventOfUserTask(UserTask userTask, BpmBoundaryEventType bpmBoundaryEventType) { - if (userTask == null) { - return null; - } - BoundaryEvent result = null; - for (BoundaryEvent item : userTask.getBoundaryEvents()) { - String boundaryEventType = parseBoundaryEventExtensionElement(item, BpmnModelConstants.BOUNDARY_EVENT_TYPE); - if (Objects.equals(bpmBoundaryEventType.getType(), NumberUtils.parseInt(boundaryEventType))) { - result = item; - break; - } - } - return result; - } - public static String parseBoundaryEventExtensionElement(BoundaryEvent boundaryEvent, String customElement) { if (boundaryEvent == null) { return null; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 993baaa66e..dd7bad7a89 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -23,10 +23,8 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_TIMEOUT; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_EVENT; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum.AUTO_REMINDER; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.*; @@ -222,12 +220,6 @@ public class SimpleModelUtils { BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); mainProcess.addFlowElement(boundaryEvent); } - if (userTaskConfig.getRejectHandler() != null) { - // 添加用户任务拒绝 Message Boundary Event, 用于任务的拒绝处理 - BoundaryEvent boundaryEvent = buildUserTaskRejectBoundaryEvent(userTask, userTaskConfig.getRejectHandler()); - mainProcess.addFlowElement(boundaryEvent); - } - break; } case COPY_TASK: { @@ -284,23 +276,6 @@ public class SimpleModelUtils { } } - private static BoundaryEvent buildUserTaskRejectBoundaryEvent(UserTask userTask, RejectHandler rejectHandler) { - BoundaryEvent messageBoundaryEvent = new BoundaryEvent(); - messageBoundaryEvent.setId("Event-" + IdUtil.fastUUID()); - // 设置关联的任务为不会被中断 - messageBoundaryEvent.setCancelActivity(false); - messageBoundaryEvent.setAttachedToRef(userTask); - MessageEventDefinition messageEventDefinition = new MessageEventDefinition(); - messageEventDefinition.setMessageRef(REJECT_POST_PROCESS_MESSAGE_NAME); - messageBoundaryEvent.addEventDefinition(messageEventDefinition); - addExtensionElement(messageBoundaryEvent, BOUNDARY_EVENT_TYPE, USER_TASK_REJECT_POST_PROCESS.getType().toString()); - addExtensionElement(messageBoundaryEvent, USER_TASK_REJECT_HANDLER_TYPE, StrUtil.toStringOrNull(rejectHandler.getType())); - if (Objects.equals(rejectHandler.getType(), RETURN_PRE_USER_TASK.getType())) { - addExtensionElement(messageBoundaryEvent, USER_TASK_REJECT_RETURN_TASK_ID, rejectHandler.getReturnNodeId()); - } - return messageBoundaryEvent; - } - private static BoundaryEvent buildUserTaskTimerBoundaryEvent(UserTask userTask, SimpleModelUserTaskConfig.TimeoutHandler timeoutHandler) { // 定时器边界事件 BoundaryEvent boundaryEvent = new BoundaryEvent(); @@ -406,9 +381,19 @@ public class SimpleModelUtils { addFormFieldsPermission(userTaskConfig.getFieldsPermission(), userTask); // 处理多实例 processMultiInstanceLoopCharacteristics(userTaskConfig.getApproveMethod(), userTask); + // 添加任务被拒绝的处理元素 + addTaskRejectElements(userTaskConfig.getRejectHandler(), userTask); return userTask; } + private static void addTaskRejectElements(RejectHandler rejectHandler, UserTask userTask) { + if (rejectHandler == null) { + return; + } + addExtensionElement(userTask, USER_TASK_REJECT_HANDLER_TYPE, StrUtil.toStringOrNull(rejectHandler.getType())); + addExtensionElement(userTask, USER_TASK_REJECT_RETURN_TASK_ID, rejectHandler.getReturnNodeId()); + } + private static void processMultiInstanceLoopCharacteristics(Integer approveMethod, UserTask userTask) { BpmApproveMethodEnum bpmApproveMethodEnum = BpmApproveMethodEnum.valueOf(approveMethod); if (bpmApproveMethodEnum == null || bpmApproveMethodEnum == BpmApproveMethodEnum.SINGLE_PERSON_APPROVE) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 57ea058123..c572329390 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -12,13 +12,12 @@ import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType; +import cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskRejectHandlerType; import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; @@ -28,7 +27,6 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.flowable.bpmn.model.BoundaryEvent; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.UserTask; @@ -36,7 +34,6 @@ import org.flowable.engine.HistoryService; import org.flowable.engine.ManagementService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; -import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.api.DelegationState; import org.flowable.task.api.Task; @@ -57,6 +54,8 @@ import java.util.stream.Stream; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_REJECT_HANDLER_TYPE; +import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_REJECT_RETURN_TASK_ID; /** * 流程任务实例 Service 实现类 @@ -336,23 +335,23 @@ public class BpmTaskServiceImpl implements BpmTaskService { // 2.2 添加评论 taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.REJECT.getType(), BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason())); - + // 3.1 解析用户任务的拒绝处理类型 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(task.getProcessDefinitionId()); FlowElement flowElement = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey()); - // 寻找用户任务的自定义拒绝后处理边界事件 - BoundaryEvent rejectBoundaryEvent = BpmnModelUtils.findCustomBoundaryEventOfUserTask((UserTask) flowElement, - BpmBoundaryEventType.USER_TASK_REJECT_POST_PROCESS); - - if (rejectBoundaryEvent != null) { - Execution execution = runtimeService.createExecutionQuery().processInstanceId(task.getProcessInstanceId()) - .activityId(rejectBoundaryEvent.getId()).singleResult(); - if (execution != null) { - // 3.1 触发消息边界事件. 进一步的处理交给 BpmTaskEventListener - runtimeService.messageEventReceived(BpmnModelConstants.REJECT_POST_PROCESS_MESSAGE_NAME, execution.getId()); - return; + Integer rejectHandlerType = NumberUtils.parseInt(BpmnModelUtils.parseExtensionElement(flowElement, USER_TASK_REJECT_HANDLER_TYPE)); + BpmUserTaskRejectHandlerType userTaskRejectHandlerType = BpmUserTaskRejectHandlerType.typeOf(rejectHandlerType); + // 3.2 类型为驳回到指定的任务节点 + if (userTaskRejectHandlerType == BpmUserTaskRejectHandlerType.RETURN_PRE_USER_TASK) { + String returnTaskId = BpmnModelUtils.parseExtensionElement(flowElement, USER_TASK_REJECT_RETURN_TASK_ID); + if (returnTaskId == null) { + throw exception(TASK_RETURN_NOT_ASSIGN_TARGET_TASK_ID); } + BpmTaskReturnReqVO returnReq = new BpmTaskReturnReqVO().setId(task.getId()).setTargetTaskDefinitionKey(returnTaskId) + .setReason(reqVO.getReason()); + returnTask(userId, returnReq); + return; } - // 3.2 没有找到拒绝后处理边界事件, 更新流程实例,审批不通过! + // 3.3 其他情况 终止流程。 TODO 后续可能会增加处理类型 processInstanceService.updateProcessInstanceReject(instance.getProcessInstanceId(), reqVO.getReason()); } -- Gitee From 95bbf749a166f0900778750b29b0539b4ab4645b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 27 May 2024 13:23:13 +0800 Subject: [PATCH 0608/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9Areview=20=E5=BF=AB=E6=90=AD?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelController.java | 2 +- .../service/definition/BpmModelService.java | 10 +- .../definition/BpmSimpleModelServiceImpl.java | 118 +----------------- 3 files changed, 13 insertions(+), 117 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java index 2f88c6b6d5..1da4250b0d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -// TODO @芋艿:后续考虑下,怎么放这个 Controller +// TODO @jason:融合到 BpmModelController 中,url 是 /bpm/model/simple/... 这样,通过一个子目录区分;目的是:逻辑更聚焦! @Tag(name = "管理后台 - BPM 仿钉钉流程设计器") @RestController @RequestMapping("/bpm/simple") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java index 48b7ec4f37..b02f5a5796 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java @@ -46,7 +46,6 @@ public interface BpmModelService { */ byte[] getModelBpmnXML(String id); - /** * 保存流程模型的 BPMN XML * @@ -107,4 +106,13 @@ public interface BpmModelService { */ BpmnModel getBpmnModelByDefinitionId(String processDefinitionId); + // ========== 仿钉钉/飞书的精简模型 ========= + + // TODO @jason:使用 ========== 仿钉钉/飞书的精简模型 ========= 分隔下;把相关的 controller、service 懂合并了;另外,vo 可以挪到 model/simple 这样的形式; + + // TODO @jason:BpmSimpleModelServiceImpl 迁移到这里,搞成 updateSimpleModel(BpmSimpleModelUpdateReqVO reqVO) + // TODO @jason:BpmSimpleModelServiceImpl 迁移到这里,搞成 getSimpleModel; + + // TODO @jason:另外个问题,因为是存储到 modelExtra 里,那需要 deploy 存储出快照。和 bpmn xml 一样。目前我想到的,就是存储到 BpmProcessDefinitionInfoDO 加一个 simple_model 字段,text 类型。可以看看还有啥方案? + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java index 53af051dc4..3f77cfbe75 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java @@ -1,31 +1,19 @@ package cn.iocoder.yudao.module.bpm.service.definition; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.Assert; -import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.SimpleModelUtils; import jakarta.annotation.Resource; -import org.flowable.bpmn.model.*; +import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.repository.Model; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import java.util.List; -import java.util.Map; - import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.START_EVENT; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_PARAM; -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY; // TODO @jason:这块可以讨论下,是不是合并成一个 BpmnModelServiceImpl /** @@ -42,20 +30,12 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { @Override public Boolean saveSimpleModel(BpmSimpleModelSaveReqVO reqVO) { + // 1.1 校验流程模型存在 Model model = bpmModelService.getModel(reqVO.getModelId()); if (model == null) { throw exception(MODEL_NOT_EXISTS); } -// byte[] bpmnBytes = bpmModelService.getModelBpmnXML(reqVO.getModelId()); -// if (ArrayUtil.isEmpty(bpmnBytes)) { -// // BPMN XML 不存在。新增 -// BpmnModel bpmnModel = BpmnModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); -// bpmModelService.saveModelBpmnXml(model.getId(), BpmnModelUtils.getBpmnXml(bpmnModel)); -// return Boolean.TRUE; -// } else { -// // TODO BPMN XML 已经存在。如何修改 ?? TODO add by 芋艿:感觉一个流程,只能二选一,要么 bpmn、要么 simple -// return Boolean.FALSE; -// } + // 1. JSON 转换成 bpmnModel BpmnModel bpmnModel = SimpleModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); // 2.1 保存 Bpmn XML @@ -77,96 +57,4 @@ public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { return JsonUtils.parseObject(jsonBytes, BpmSimpleModelNodeVO.class); } - // TODO @jason:一般要支持这个么?感觉 bpmn 转 json 支持会不会太复杂。可以优先级低一点,做下调研~ - - /** - * Bpmn Model 转换成 仿钉钉流程设计模型数据结构(json) 待完善 - * - * @param bpmnModel Bpmn Model - * @return 仿钉钉流程设计模型数据结构 - */ - private BpmSimpleModelNodeVO convertBpmnModelToSimpleModel(BpmnModel bpmnModel) { - if (bpmnModel == null) { - return null; - } - StartEvent startEvent = BpmnModelUtils.getStartEvent(bpmnModel); - if (startEvent == null) { - return null; - } - BpmSimpleModelNodeVO rootNode = new BpmSimpleModelNodeVO(); - rootNode.setType(START_EVENT.getType()); - rootNode.setId(startEvent.getId()); - rootNode.setName(startEvent.getName()); - recursiveBuildSimpleModelNode(startEvent, rootNode); - return rootNode; - } - - private void recursiveBuildSimpleModelNode(FlowNode currentFlowNode, BpmSimpleModelNodeVO currentSimpleModeNode) { - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(currentSimpleModeNode.getType()); - Assert.notNull(nodeType, "节点类型不支持"); - // 校验节点是否支持转仿钉钉的流程模型 - List outgoingFlows = validateCanConvertSimpleNode(nodeType, currentFlowNode); - if (CollUtil.isEmpty(outgoingFlows) || CollUtil.getFirst(outgoingFlows).getTargetFlowElement() == null) { - return; - } - FlowElement targetElement = CollUtil.getFirst(outgoingFlows).getTargetFlowElement(); - // 如果是 EndEvent 直接退出 - if (targetElement instanceof EndEvent) { - return; - } - if (targetElement instanceof UserTask) { - BpmSimpleModelNodeVO childNode = convertUserTaskToSimpleModelNode((UserTask) targetElement); - currentSimpleModeNode.setChildNode(childNode); - recursiveBuildSimpleModelNode((FlowNode) targetElement, childNode); - } - // TODO 其它节点类型待实现 - } - - private BpmSimpleModelNodeVO convertUserTaskToSimpleModelNode(UserTask userTask) { - BpmSimpleModelNodeVO simpleModelNodeVO = new BpmSimpleModelNodeVO(); - simpleModelNodeVO.setType(BpmSimpleModelNodeType.USER_TASK.getType()); - simpleModelNodeVO.setName(userTask.getName()); - simpleModelNodeVO.setId(userTask.getId()); - Map attributes = MapUtil.newHashMap(); - // TODO 暂时是普通审批,需要加会签 - attributes.put("approveMethod", 1); - attributes.computeIfAbsent(USER_TASK_CANDIDATE_STRATEGY, (key) -> BpmnModelUtils.parseCandidateStrategy(userTask)); - attributes.computeIfAbsent(USER_TASK_CANDIDATE_PARAM, (key) -> BpmnModelUtils.parseCandidateParam(userTask)); - simpleModelNodeVO.setAttributes(attributes); - return simpleModelNodeVO; - } - - private List validateCanConvertSimpleNode(BpmSimpleModelNodeType nodeType, FlowNode currentFlowNode) { - switch (nodeType) { - case START_EVENT: - case USER_TASK: { - List outgoingFlows = currentFlowNode.getOutgoingFlows(); - if (CollUtil.isNotEmpty(outgoingFlows) && outgoingFlows.size() > 1) { - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - validIsSupportFlowNode(CollUtil.getFirst(outgoingFlows).getTargetFlowElement()); - return outgoingFlows; - } - default: { - // TODO 其它节点类型待实现 - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - } - } - - private void validIsSupportFlowNode(FlowElement targetElement) { - if (targetElement == null) { - return; - } - boolean isSupport = false; - for (Class item : BpmnModelConstants.SUPPORT_CONVERT_SIMPLE_FlOW_NODES) { - if (item.isInstance(targetElement)) { - isSupport = true; - break; - } - } - if (!isSupport) { - throw exception(CONVERT_TO_SIMPLE_MODEL_NOT_SUPPORT); - } - } } -- Gitee From 0cdd3423e5050f2745aeb99a9a65d048bc62dd51 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 27 May 2024 15:26:44 +0800 Subject: [PATCH 0609/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=20Image=20=E8=B0=83=E6=95=B4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...StatusEnum.java => AiImageStatusEnum.java} | 6 +-- .../admin/image/AiImageController.java | 4 +- ...rawingReqVO.java => AiImageDallReqVO.java} | 7 ++-- ...wingRespVO.java => AiImageDallRespVO.java} | 10 +++-- .../module/ai/convert/AiImageConvert.java | 6 +-- .../ai/dal/dataobject/image/AiImageDO.java | 16 +++++--- .../ai/service/image/AiImageService.java | 4 +- .../ai/service/image/AiImageServiceImpl.java | 40 +++++++++---------- .../YuDaoMidjourneyMessageHandler.java | 18 ++++----- 9 files changed, 58 insertions(+), 53 deletions(-) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{AiImageDrawingStatusEnum.java => AiImageStatusEnum.java} (76%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageDallDrawingReqVO.java => AiImageDallReqVO.java} (85%) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageDallDrawingRespVO.java => AiImageDallRespVO.java} (84%) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java similarity index 76% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java index c38b177565..a5231a3bf6 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageDrawingStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java @@ -12,7 +12,7 @@ import lombok.Getter; */ @AllArgsConstructor @Getter -public enum AiImageDrawingStatusEnum { +public enum AiImageStatusEnum { SUBMIT("submit", "提交任务"), WAITING("waiting", "等待"), @@ -27,8 +27,8 @@ public enum AiImageDrawingStatusEnum { private String name; - public static AiImageDrawingStatusEnum valueOfStatus(String status) { - for (AiImageDrawingStatusEnum itemEnum : AiImageDrawingStatusEnum.values()) { + public static AiImageStatusEnum valueOfStatus(String status) { + for (AiImageStatusEnum itemEnum : AiImageStatusEnum.values()) { if (itemEnum.getStatus().equals(status)) { return itemEnum; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index fd9ea0802c..2dbac1a9bd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -37,8 +37,8 @@ public class AiImageController { } @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") - @PostMapping("/dallDrawing") - public AiImageDallDrawingRespVO dallDrawing(@Validated @RequestBody AiImageDallDrawingReqVO req) { + @PostMapping("/dall") + public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) { return aiImageService.dallDrawing(req); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java similarity index 85% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java index 3973eb2e99..ef91618708 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java @@ -15,19 +15,18 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageDallDrawingReqVO { +public class AiImageDallReqVO { @Schema(description = "提示词") @NotNull(message = "提示词不能为空!") @Size(max = 1200, message = "提示词最大1200") private String prompt; - @Schema(description = "模型") + @Schema(description = "模型(dall2、dall3)") @NotNull(message = "模型不能为空") - private String modal; + private String model; @Schema(description = "图像生成的风格。可为vivid(生动)或natural(自然)") - @NotNull(message = "图像生成的风格,不能为空!") private String style; @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java similarity index 84% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java index 7e480a8f00..18c27a64fc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallDrawingRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java @@ -15,8 +15,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageDallDrawingRespVO { - +public class AiImageDallRespVO { @Schema(description = "提示词") @NotNull(message = "提示词不能为空!") @@ -25,7 +24,7 @@ public class AiImageDallDrawingRespVO { @Schema(description = "模型") @NotNull(message = "模型不能为空") - private String modal; + private String model; @Schema(description = "风格") private String style; @@ -33,8 +32,11 @@ public class AiImageDallDrawingRespVO { @Schema(description = "图片size 1024x1024 ...") private String size; + @Schema(description = "图片地址(自己服务器)") + private String picUrl; + @Schema(description = "可以访问图像的URL。") - private String url; + private String originalPicUrl; @Schema(description = "图片base64。") private String base64; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index b0f8abc398..f5e6699d76 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.ai.convert; import org.springframework.ai.models.midjourney.MidjourneyMessage; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallDrawingRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; @@ -29,7 +29,7 @@ public interface AiImageConvert { * @param req * @return */ - AiImageDallDrawingRespVO convertAiImageDallDrawingRespVO(AiImageDallDrawingReqVO req); + AiImageDallRespVO convertAiImageDallDrawingRespVO(AiImageDallReqVO req); /** * 转换 - AiImageListRespVO diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index c04fea12f6..cb3aedda1e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -30,22 +30,28 @@ public class AiImageDO extends BaseDO { private String prompt; @Schema(description = "模型 dall2/dall3、MJ、NIJI") - private String modal; + private String model; @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") private String size; + @Schema(description = "风格") + private String style; + @Schema(description = "图片地址(自己服务器)") - private String imageUrl; + private String picUrl; @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") - private String drawingStatus; + private String status; @Schema(description = "绘画图片地址(绘画好的服务器)") - private String drawingImageUrl; + private String originalPicUrl; @Schema(description = "绘画错误信息") - private String drawingErrorMessage; + private String errorMessage; + + @Schema(description = "是否发布") + private String publicStatus; // ============ mj 需要字段 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 836f37dfbb..4af34d3bfa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; -import java.util.List; - /** * ai 作图 * @@ -27,7 +25,7 @@ public interface AiImageService { * * @param req */ - AiImageDallDrawingRespVO dallDrawing(AiImageDallDrawingReqVO req); + AiImageDallRespVO dallDrawing(AiImageDallReqVO req); /** * midjourney 图片生成 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index f4521af844..01476a4a3d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -22,7 +22,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; -import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; +import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -85,12 +85,12 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public AiImageDallDrawingRespVO dallDrawing(AiImageDallDrawingReqVO req) { + public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { // 获取 model - OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModal()); + OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); // 转换 AiImageDallDrawingRespVO - AiImageDallDrawingRespVO respVO = AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(req); + AiImageDallRespVO respVO = AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(req); try { // 转换openai 参数 OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); @@ -101,17 +101,17 @@ public class AiImageServiceImpl implements AiImageService { // 发送 ImageGeneration imageGeneration = imageResponse.getResult(); // 保存数据库 - doSave(req.getPrompt(), req.getSize(), req.getModal(), - imageGeneration.getOutput().getUrl(), AiImageDrawingStatusEnum.COMPLETE, null, + doSave(req.getPrompt(), req.getSize(), req.getModel(), + imageGeneration.getOutput().getUrl(), AiImageStatusEnum.COMPLETE, null, null, null, null); // 返回 flex - respVO.setUrl(imageGeneration.getOutput().getUrl()); + respVO.setOriginalPicUrl(imageGeneration.getOutput().getUrl()); respVO.setBase64(imageGeneration.getOutput().getB64Json()); return respVO; } catch (AiException aiException) { // 保存数据库 - doSave(req.getPrompt(), req.getSize(), req.getModal(), - null, AiImageDrawingStatusEnum.FAIL, aiException.getMessage(), + doSave(req.getPrompt(), req.getSize(), req.getModel(), + null, AiImageStatusEnum.FAIL, aiException.getMessage(), null, null, null); // 发送错误信息 respVO.setErrorMessage(aiException.getMessage()); @@ -125,7 +125,7 @@ public class AiImageServiceImpl implements AiImageService { // 保存数据库 String messageId = String.valueOf(IdUtil.getSnowflakeNextId()); AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", - null, AiImageDrawingStatusEnum.SUBMIT, null, + null, AiImageStatusEnum.SUBMIT, null, messageId, null, null); // 提交 midjourney 任务 Boolean imagine = midjourneyInteractionsApi.imagine(messageId, req.getPrompt()); @@ -148,8 +148,8 @@ public class AiImageServiceImpl implements AiImageService { // 获取 mjOperationName String mjOperationName = midjourneyOperationsVO.getLabel(); // 保存一个 image 任务记录 - doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModal(), - null, AiImageDrawingStatusEnum.SUBMIT, null, + doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), + null, AiImageStatusEnum.SUBMIT, null, req.getMessageId(), req.getOperateId(), mjOperationName); // 提交操作 midjourneyInteractionsApi.reRoll( @@ -201,9 +201,9 @@ public class AiImageServiceImpl implements AiImageService { private AiImageDO doSave(String prompt, String size, String model, - String drawingImageUrl, - AiImageDrawingStatusEnum drawingStatusEnum, - String drawingErrorMessage, + String originalPicUrl, + AiImageStatusEnum statusEnum, + String errorMessage, String mjMessageId, String mjOperationId, String mjOperationName) { @@ -213,13 +213,13 @@ public class AiImageServiceImpl implements AiImageService { aiImageDO.setId(null); aiImageDO.setPrompt(prompt); aiImageDO.setSize(size); - aiImageDO.setModal(model); + aiImageDO.setModel(model); aiImageDO.setUserId(loginUserId); // TODO @芋艿 如何上传到自己服务器 - aiImageDO.setImageUrl(null); - aiImageDO.setDrawingStatus(drawingStatusEnum.getStatus()); - aiImageDO.setDrawingImageUrl(drawingImageUrl); - aiImageDO.setDrawingErrorMessage(drawingErrorMessage); + aiImageDO.setPicUrl(null); + aiImageDO.setStatus(statusEnum.getStatus()); + aiImageDO.setOriginalPicUrl(originalPicUrl); + aiImageDO.setErrorMessage(errorMessage); // aiImageDO.setMjNonceId(mjMessageId); aiImageDO.setMjOperationId(mjOperationId); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 5327d65ffa..7b95b968e1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -11,7 +11,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOpe import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; -import cn.iocoder.yudao.module.ai.enums.AiImageDrawingStatusEnum; +import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -67,8 +67,8 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { String errorMessage = getErrorMessage(midjourneyMessage); aiImageMapper.updateByMjNonce(nonceId, new AiImageDO() - .setDrawingErrorMessage(errorMessage) - .setDrawingStatus(AiImageDrawingStatusEnum.FAIL.getStatus()) + .setErrorMessage(errorMessage) + .setStatus(AiImageStatusEnum.FAIL.getStatus()) ); } @@ -90,22 +90,22 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { imageUrl = midjourneyMessage.getAttachments().get(0).getUrl(); } // 转换状态 - AiImageDrawingStatusEnum drawingStatusEnum = null; + AiImageStatusEnum drawingStatusEnum = null; String generateStatus = midjourneyMessage.getGenerateStatus(); if (MidjourneyGennerateStatusEnum.COMPLETED.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiImageDrawingStatusEnum.COMPLETE; + drawingStatusEnum = AiImageStatusEnum.COMPLETE; } else if (MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiImageDrawingStatusEnum.IN_PROGRESS; + drawingStatusEnum = AiImageStatusEnum.IN_PROGRESS; } else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiImageDrawingStatusEnum.WAITING; + drawingStatusEnum = AiImageStatusEnum.WAITING; } // 获取 midjourneyOperations List midjourneyOperations = getMidjourneyOperationsList(midjourneyMessage); // 更新数据库 aiImageMapper.updateByMjNonce(nonceId, new AiImageDO() - .setDrawingImageUrl(imageUrl) - .setDrawingStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) + .setOriginalPicUrl(imageUrl) + .setStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) .setMjNonceId(midjourneyMessage.getId()) .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) ); -- Gitee From 447526a6d9c31cce93a27da4176a345f881baf6f Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Mon, 27 May 2024 15:44:55 +0800 Subject: [PATCH 0610/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9Asuno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/core/model/suno/SunoApi.java | 175 ++++++++++++++++++ .../yudao/framework/ai/suno/SunoTests.java | 24 +++ 2 files changed, 199 insertions(+) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java new file mode 100644 index 0000000000..0198197f1c --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java @@ -0,0 +1,175 @@ +package cn.iocoder.yudao.framework.ai.core.model.suno; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.Data; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; + +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * @Author xiaoxin + * @Date 2024/5/27 + */ +@Slf4j +public class SunoApi { + + public static final String APPLICATION_JSON = "application/json"; + public static final String TOKEN_PREFIX = "Bearer "; + public static final String API_URL = "https://api.acedata.cloud/suno/audios"; + public static final String TEST_TOKEN = "13f13540dd3f4ae9885f63ac9f5d0b9f"; + private static final int READ_TIMEOUT = 160; // 连接超时时间(秒),音乐生成时间较长,设置为 160s,后续可做callback + private final OkHttpClient client; + private final ObjectMapper objectMapper; + + public SunoApi() { + this.client = new OkHttpClient().newBuilder().readTimeout(READ_TIMEOUT, TimeUnit.SECONDS).build(); + this.objectMapper = new ObjectMapper(); + } + + public SunoResponse generateMusic(SunoRequest sunoRequest) throws IOException { + Request request = new Request.Builder() + .url(API_URL) + .header("Authorization", TOKEN_PREFIX + TEST_TOKEN) + .post(RequestBody.create(MediaType.parse(APPLICATION_JSON), objectMapper.writeValueAsString(sunoRequest))) + .build(); + + try (Response response = client.newCall(request).execute()) { + if (!response.isSuccessful()) { + log.error("suno调用失败! response: {}", response); + throw new IllegalStateException("suno调用失败!" + response); + } + return objectMapper.readValue(response.body().string(), SunoResponse.class); + } + } + + + /** + * 请求数据对象,用于生成音乐音频 + */ + @Data + @Accessors(chain = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL) + public static class SunoRequest { + /** + * 用于生成音乐音频的提示 + */ + private String prompt; + + /** + * 用于生成音乐音频的歌词 + */ + private String lyric; + + /** + * 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 + */ + private boolean custom; + + /** + * 音乐音频的标题 + */ + private String title; + + /** + * 音乐音频的风格 + */ + private String style; + + /** + * 音乐音频生成后回调的 URL + */ + private String callbackUrl; + } + + + /** + * API 响应的数据 + */ + @Data + public static class SunoResponse { + /** + * 表示请求是否成功 + */ + private boolean success; + + /** + * 任务 ID + */ + @JsonProperty("task_id") + private String taskId; + + /** + * 音乐数据列表 + */ + private List data; + + /** + * 表示单个音乐数据的类 + */ + @Data + static class MusicData { + /** + * 音乐数据的 ID + */ + private String id; + + /** + * 音乐音频的标题 + */ + private String title; + + /** + * 音乐音频的图片 URL + */ + @JsonProperty("image_url") + private String imageUrl; + + /** + * 音乐音频的歌词 + */ + private String lyric; + + /** + * 音乐音频的 URL + */ + @JsonProperty("audio_url") + private String audioUrl; + + /** + * 音乐视频的 URL + */ + @JsonProperty("video_url") + private String videoUrl; + + /** + * 音乐音频的创建时间 + */ + @JsonProperty("created_at") + private String createdAt; + + /** + * 使用的模型名称 + */ + private String model; + + /** + * 生成音乐音频的提示 + */ + private String prompt; + + /** + * 音乐音频的风格 + */ + private String style; + } + } + + +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java new file mode 100644 index 0000000000..30883a6e1e --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.framework.ai.suno; + +import cn.iocoder.yudao.framework.ai.core.model.suno.SunoApi; +import org.junit.Test; + +import java.io.IOException; + +/** + * @Author xiaoxin + * @Date 2024/5/27 + */ +public class SunoTests { + + + @Test + public void generateMusic() throws IOException { + SunoApi sunoApi = new SunoApi(); + SunoApi.SunoRequest sunoRequest = new SunoApi + .SunoRequest() + .setPrompt("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); + SunoApi.SunoResponse sunoResponse = sunoApi.generateMusic(sunoRequest); + System.out.println(sunoResponse); + } +} -- Gitee From ea7f923072bc1879fa1b825f270d7cfb204eaa9f Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 27 May 2024 16:18:52 +0800 Subject: [PATCH 0611/1557] =?UTF-8?q?SYSTEM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/social/AppSocialUserController.java | 4 ++-- .../system/api/social/dto/SocialWxQrcodeReqDTO.java | 10 ---------- .../system/service/social/SocialClientServiceImpl.java | 9 ++++++++- yudao-server/src/main/resources/application-dev.yaml | 2 ++ yudao-server/src/main/resources/application-local.yaml | 2 ++ yudao-server/src/main/resources/application.yaml | 2 ++ 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 038b225f2d..de76856c3e 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -67,8 +67,8 @@ public class AppSocialUserController { @PostMapping("/wxa-qrcode") @Operation(summary = "获得微信小程序码(base64 image)") - public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { - byte[] wxQrcode = socialClientApi.getWxaQrcode(new SocialWxQrcodeReqDTO().setPath(reqVO.getPath())); + public CommonResult getWxaQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { + byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class)); return success(Base64.encode(wxQrcode)); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java index 4b964af4fa..6f4b96f4e8 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxQrcodeReqDTO.java @@ -12,12 +12,6 @@ import lombok.Data; @Data public class SocialWxQrcodeReqDTO { - /** - * 小程序版本 - * - * 正式版为 "release";体验版为 "trial";开发版为 "develop" - */ - public static final String ENV_VERSION = "release"; /** * 页面路径不能携带参数(参数请放在scene字段里) */ @@ -51,10 +45,6 @@ public class SocialWxQrcodeReqDTO { */ @NotEmpty(message = "页面路径不能为空") private String path; - /** - * 要打开的小程序版本 - */ - private String envVersion; /** * 二维码宽度 */ diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index 25d6d99d2d..b9a3392231 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -41,6 +41,7 @@ import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl; +import org.springframework.beans.factory.annotation.Value; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; @@ -60,6 +61,12 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; @Slf4j public class SocialClientServiceImpl implements SocialClientService { + /** + * 小程序版本 + */ + @Value("${yudao.wxa-code.env-version}") + public String envVersion; + @Resource private AuthRequestFactory authRequestFactory; @@ -237,7 +244,7 @@ public class SocialClientServiceImpl implements SocialClientService { ObjUtil.defaultIfEmpty(reqVO.getScene(), SocialWxQrcodeReqDTO.SCENE), reqVO.getPath(), ObjUtil.defaultIfNull(reqVO.getCheckPath(), SocialWxQrcodeReqDTO.CHECK_PATH), - ObjUtil.defaultIfBlank(reqVO.getEnvVersion(), SocialWxQrcodeReqDTO.ENV_VERSION), + envVersion, ObjUtil.defaultIfNull(reqVO.getWidth(), SocialWxQrcodeReqDTO.WIDTH), ObjUtil.defaultIfNull(reqVO.getAutoColor(), SocialWxQrcodeReqDTO.AUTO_COLOR), null, diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 936aaae694..cc105790d2 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -171,6 +171,8 @@ yudao: order-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址 refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址 demo: true # 开启演示模式 + wxa-code: + env-version: release # 小程序版本: 正式版为 "release";体验版为 "trial";开发版为 "develop" tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc justauth: diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index f5912f690a..d494593abe 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -220,6 +220,8 @@ yudao: access-log: # 访问日志的配置项 enable: false demo: false # 关闭演示模式 + wxa-code: + env-version: develop # 小程序版本: 正式版为 "release";体验版为 "trial";开发版为 "develop" tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc justauth: diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 6cb5386e3d..561db7a93b 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -177,6 +177,8 @@ yudao: license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE captcha: enable: true # 验证码的开关,默认为 true + wxa-code: + env-version: release # 小程序版本: 正式版为 "release";体验版为 "trial";开发版为 "develop"。默认为 release codegen: base-package: ${yudao.info.base-package} db-schemas: ${spring.datasource.dynamic.datasource.master.name} -- Gitee From ae493e66dface723e8b08f1b93f72a1ff90feebb Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 27 May 2024 16:24:07 +0800 Subject: [PATCH 0612/1557] =?UTF-8?q?MALL-TRADE=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20BrokerageUserService#getOrCreateBrokerageUser=20=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E6=88=96=E5=88=9B=E5=BB=BA=E5=88=86=E9=94=80=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=96=B9=E6=B3=95=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=88=B6?= =?UTF-8?q?=E7=BA=A7=E6=8E=A8=E5=B9=BF=E4=BA=BA=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../brokerage/AppBrokerageUserController.java | 14 ++------- .../vo/user/AppBrokerageUserBindReqVO.java | 2 +- .../brokerage/BrokerageUserService.java | 15 ++++++++-- .../brokerage/BrokerageUserServiceImpl.java | 29 +++++++++++++++---- 4 files changed, 38 insertions(+), 22 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java index d82915cde1..202ed3c42e 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.trade.controller.app.brokerage; import cn.hutool.core.date.LocalDateTimeUtil; -import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; @@ -11,8 +10,6 @@ import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.*; import cn.iocoder.yudao.module.trade.convert.brokerage.BrokerageRecordConvert; import cn.iocoder.yudao.module.trade.convert.brokerage.BrokerageUserConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; -import cn.iocoder.yudao.module.trade.dal.dataobject.config.TradeConfigDO; -import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageEnabledConditionEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageWithdrawStatusEnum; @@ -20,7 +17,6 @@ import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageRecordService; import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageUserService; import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageWithdrawService; import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageWithdrawSummaryRespBO; -import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -55,22 +51,16 @@ public class AppBrokerageUserController { @Resource private BrokerageWithdrawService brokerageWithdrawService; @Resource - private TradeConfigService tradeConfigService; - @Resource private MemberUserApi memberUserApi; @GetMapping("/get") @Operation(summary = "获得个人分销信息") @PreAuthenticated public CommonResult getBrokerageUser() { - Optional user = Optional.ofNullable(brokerageUserService.getBrokerageUser(getLoginUserId())); - // 获得交易中心配置 - TradeConfigDO tradeConfig = tradeConfigService.getTradeConfig(); - // 如果是人人分佣 BrokerageUserDO 为 null 时,也有分销资格 - boolean brokerageEnabled = ObjUtil.equal(BrokerageEnabledConditionEnum.ALL.getCondition(), tradeConfig.getBrokerageEnabledCondition()); + Optional user = Optional.ofNullable(brokerageUserService.getOrCreateBrokerageUser(getLoginUserId())); // 返回数据 AppBrokerageUserRespVO respVO = new AppBrokerageUserRespVO() - .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(brokerageEnabled)) + .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(false)) .setBrokeragePrice(user.map(BrokerageUserDO::getBrokeragePrice).orElse(0)) .setFrozenPrice(user.map(BrokerageUserDO::getFrozenPrice).orElse(0)); return success(respVO); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserBindReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserBindReqVO.java index e6f2982eb1..db23d8e200 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserBindReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserBindReqVO.java @@ -8,7 +8,7 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "应用 App - 绑定推广员 Request VO") @Data -public class AppBrokerageUserBindReqVO extends PageParam { +public class AppBrokerageUserBindReqVO { @Schema(description = "推广员编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "推广员编号不能为空") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserService.java index a50eedda1a..7b6e4b1109 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserService.java @@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokera import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByUserCountRespVO; import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankPageReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; - import jakarta.validation.constraints.NotNull; + import java.util.Collection; import java.util.List; @@ -67,6 +67,14 @@ public interface BrokerageUserService { */ BrokerageUserDO getBindBrokerageUser(Long id); + /** + * 获得或创建分销用户 + * + * @param id 用户编号 + * @return 分销用户 + */ + BrokerageUserDO getOrCreateBrokerageUser(Long id); + /** * 更新用户佣金 * @@ -104,8 +112,8 @@ public interface BrokerageUserService { /** * 【会员】绑定推广员 * - * @param userId 用户编号 - * @param bindUserId 推广员编号 + * @param userId 用户编号 + * @param bindUserId 推广员编号 * @return 是否绑定 */ boolean bindBrokerageUser(@NotNull Long userId, @NotNull Long bindUserId); @@ -134,4 +142,5 @@ public interface BrokerageUserService { * @return 下级分销统计分页 */ PageResult getBrokerageUserChildSummaryPage(AppBrokerageUserChildSummaryPageReqVO pageReqVO, Long userId); + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java index 355e1ee8b8..08e42c9a0b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.BooleanUtil; +import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; @@ -25,10 +26,10 @@ import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum; import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum; import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; -import jakarta.annotation.Resource; import java.time.LocalDateTime; import java.util.*; @@ -127,6 +128,18 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { .orElse(null); } + @Override + public BrokerageUserDO getOrCreateBrokerageUser(Long id) { + BrokerageUserDO brokerageUser = brokerageUserMapper.selectById(id); + if (brokerageUser == null && ObjUtil.equal(BrokerageEnabledConditionEnum.ALL.getCondition(), + tradeConfigService.getTradeConfig().getBrokerageEnabledCondition())) { // 人人分销的情况下,如果分销人为空则创建分销人 + brokerageUser = new BrokerageUserDO().setId(id).setBrokerageEnabled(true).setBrokeragePrice(0) + .setBrokerageTime(LocalDateTime.now()).setFrozenPrice(0); + brokerageUserMapper.insert(brokerageUser); + } + return brokerageUser; + } + @Override public boolean updateUserPrice(Long id, Integer price) { if (price > 0) { @@ -184,7 +197,6 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { if (BrokerageEnabledConditionEnum.ALL.getCondition().equals(enabledCondition)) { // 人人分销:用户默认就有分销资格 brokerageUser.setBrokerageEnabled(true).setBrokerageTime(LocalDateTime.now()); } - brokerageUser.setBindUserId(bindUserId).setBindUserTime(LocalDateTime.now()); brokerageUserMapper.insert(fillBindUserData(bindUserId, brokerageUser)); } else { brokerageUserMapper.updateById(fillBindUserData(bindUserId, new BrokerageUserDO().setId(userId))); @@ -294,18 +306,23 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { } private void validateCanBindUser(BrokerageUserDO user, Long bindUserId) { - // 校验要绑定的用户有无推广资格 - BrokerageUserDO bindUser = brokerageUserMapper.selectById(bindUserId); + // 1.1 校验推广人是否存在 + MemberUserRespDTO bindUserInfo = memberUserApi.getUser(bindUserId); + if (bindUserInfo == null) { + throw exception(BROKERAGE_USER_NOT_EXISTS); + } + // 1.2 校验要绑定的用户有无推广资格 + BrokerageUserDO bindUser = getOrCreateBrokerageUser(bindUserId); if (bindUser == null || BooleanUtil.isFalse(bindUser.getBrokerageEnabled())) { throw exception(BROKERAGE_BIND_USER_NOT_ENABLED); } - // 校验绑定自己 + // 2. 校验绑定自己 if (Objects.equals(user.getId(), bindUserId)) { throw exception(BROKERAGE_BIND_SELF); } - // 下级不能绑定自己的上级 + // 3. 下级不能绑定自己的上级 for (int i = 0; i <= Short.MAX_VALUE; i++) { if (Objects.equals(bindUser.getBindUserId(), user.getId())) { throw exception(BROKERAGE_BIND_LOOP); -- Gitee From 63a8cc244d054040ad227a9b5651e0382a65d7e9 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 27 May 2024 18:16:44 +0800 Subject: [PATCH 0613/1557] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91A?= =?UTF-8?q?I=20Image=20dall=20=E8=AF=B7=E6=B1=82=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 4 +- .../admin/image/vo/AiImageListRespVO.java | 49 +++++++++++++++++++ .../module/ai/convert/AiImageConvert.java | 8 +++ .../ai/service/image/AiImageServiceImpl.java | 46 ++++++++--------- 4 files changed, 83 insertions(+), 24 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 2dbac1a9bd..d072822eb9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -32,8 +32,8 @@ public class AiImageController { @Operation(summary = "获取image列表", description = "dall3、midjourney") @GetMapping("/list") - public PageResult list(@Validated @RequestBody AiImageListReqVO req) { - return aiImageService.list(req); + public CommonResult> list(@Validated @ModelAttribute AiImageListReqVO req) { + return CommonResult.success(aiImageService.list(req)); } @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java index 9222a4ec4d..1ddec8d7b5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -15,4 +18,50 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiImageListRespVO extends PageParam { + private Long id; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "提示词") + private String prompt; + + @Schema(description = "模型 dall2/dall3、MJ、NIJI") + private String model; + + @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") + private String size; + + @Schema(description = "风格") + private String style; + + @Schema(description = "图片地址(自己服务器)") + private String picUrl; + + @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") + private String status; + + @Schema(description = "绘画图片地址(绘画好的服务器)") + private String originalPicUrl; + + @Schema(description = "绘画错误信息") + private String errorMessage; + + @Schema(description = "是否发布") + private String publicStatus; + + // ============ mj 需要字段 + + @Schema(description = "用户操作的Nonce编号(MJ返回)") + private String mjNonceId; + + @Schema(description = "用户操作的操作编号(MJ返回)") + private String mjOperationId; + + @Schema(description = "用户操作的操作名字(MJ返回)") + private String mjOperationName; + + @Schema(description = "mj图片生产成功保存的 components json 数组") + private String mjOperations; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index f5e6699d76..df8647a5b9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -23,6 +23,14 @@ public interface AiImageConvert { AiImageConvert INSTANCE = Mappers.getMapper(AiImageConvert.class); + /** + * 转换 - AiImageDallDrawingRespVO + * + * @param req + * @return + */ + AiImageDallRespVO convertAiImageDallDrawingRespVO(AiImageDO req); + /** * 转换 - AiImageDallDrawingRespVO * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 01476a4a3d..18659377c0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -2,16 +2,10 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.ai.core.exception.AiException; -import org.springframework.ai.image.ImageGeneration; -import org.springframework.ai.image.ImagePrompt; -import org.springframework.ai.image.ImageResponse; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; -import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; -import org.springframework.ai.models.midjourney.api.req.ReRollReq; -import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; -import org.springframework.ai.models.midjourney.webSocket.WssNotify; +import cn.iocoder.yudao.framework.ai.core.exception.AiException; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -23,9 +17,17 @@ import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; +import cn.iocoder.yudao.module.infra.api.file.FileApi; import jakarta.annotation.PostConstruct; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.image.ImageGeneration; +import org.springframework.ai.image.ImagePrompt; +import org.springframework.ai.image.ImageResponse; +import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; +import org.springframework.ai.models.midjourney.api.req.ReRollReq; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; +import org.springframework.ai.models.midjourney.webSocket.WssNotify; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.OpenAiImageOptions; import org.springframework.stereotype.Service; @@ -47,6 +49,7 @@ import java.util.List; public class AiImageServiceImpl implements AiImageService { private final AiImageMapper aiImageMapper; + private final FileApi fileApi; private final OpenAiImageClient openAiImageClient; private final MidjourneyWebSocketStarter midjourneyWebSocketStarter; private final MidjourneyInteractionsApi midjourneyInteractionsApi; @@ -89,8 +92,6 @@ public class AiImageServiceImpl implements AiImageService { // 获取 model OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); - // 转换 AiImageDallDrawingRespVO - AiImageDallRespVO respVO = AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(req); try { // 转换openai 参数 OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); @@ -100,22 +101,21 @@ public class AiImageServiceImpl implements AiImageService { ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); // 发送 ImageGeneration imageGeneration = imageResponse.getResult(); + // 图片保存到服务器 + String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); // 保存数据库 - doSave(req.getPrompt(), req.getSize(), req.getModel(), - imageGeneration.getOutput().getUrl(), AiImageStatusEnum.COMPLETE, null, + AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), + filePath, imageGeneration.getOutput().getUrl(), AiImageStatusEnum.COMPLETE, null, null, null, null); - // 返回 flex - respVO.setOriginalPicUrl(imageGeneration.getOutput().getUrl()); - respVO.setBase64(imageGeneration.getOutput().getB64Json()); - return respVO; + // 转换 AiImageDallDrawingRespVO + return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); } catch (AiException aiException) { // 保存数据库 - doSave(req.getPrompt(), req.getSize(), req.getModel(), - null, AiImageStatusEnum.FAIL, aiException.getMessage(), + AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), + null, null, AiImageStatusEnum.FAIL, aiException.getMessage(), null, null, null); // 发送错误信息 - respVO.setErrorMessage(aiException.getMessage()); - return respVO; + return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); } } @@ -125,7 +125,7 @@ public class AiImageServiceImpl implements AiImageService { // 保存数据库 String messageId = String.valueOf(IdUtil.getSnowflakeNextId()); AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", - null, AiImageStatusEnum.SUBMIT, null, + null, null, AiImageStatusEnum.SUBMIT, null, messageId, null, null); // 提交 midjourney 任务 Boolean imagine = midjourneyInteractionsApi.imagine(messageId, req.getPrompt()); @@ -149,7 +149,7 @@ public class AiImageServiceImpl implements AiImageService { String mjOperationName = midjourneyOperationsVO.getLabel(); // 保存一个 image 任务记录 doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), - null, AiImageStatusEnum.SUBMIT, null, + null, null, AiImageStatusEnum.SUBMIT, null, req.getMessageId(), req.getOperateId(), mjOperationName); // 提交操作 midjourneyInteractionsApi.reRoll( @@ -201,6 +201,7 @@ public class AiImageServiceImpl implements AiImageService { private AiImageDO doSave(String prompt, String size, String model, + String picUrl, String originalPicUrl, AiImageStatusEnum statusEnum, String errorMessage, @@ -218,6 +219,7 @@ public class AiImageServiceImpl implements AiImageService { // TODO @芋艿 如何上传到自己服务器 aiImageDO.setPicUrl(null); aiImageDO.setStatus(statusEnum.getStatus()); + aiImageDO.setPicUrl(picUrl); aiImageDO.setOriginalPicUrl(originalPicUrl); aiImageDO.setErrorMessage(errorMessage); // -- Gitee From 5b97d565cd6632ed340f6d8ae077e31cbd253e83 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 27 May 2024 21:15:08 +0800 Subject: [PATCH 0614/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/definition/BpmModelController.java | 19 ++++++ .../definition/BpmSimpleModelController.java | 39 ------------ .../simple/BpmSimpleModelNodeVO.java | 2 +- .../simple/BpmSimpleModelUpdateReqVO.java} | 5 +- .../flowable/core/util/SimpleModelUtils.java | 7 +-- .../service/definition/BpmModelService.java | 28 +++++++-- .../definition/BpmModelServiceImpl.java | 30 ++++++++++ .../definition/BpmSimpleModelService.java | 29 --------- .../definition/BpmSimpleModelServiceImpl.java | 60 ------------------- 9 files changed, 75 insertions(+), 144 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/{ => model}/simple/BpmSimpleModelNodeVO.java (98%) rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/{simple/BpmSimpleModelSaveReqVO.java => model/simple/BpmSimpleModelUpdateReqVO.java} (89%) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index dcf91260fb..c9ff059ffe 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -8,6 +8,8 @@ import cn.iocoder.yudao.framework.common.util.io.IoUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelUpdateReqVO; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; @@ -145,4 +147,21 @@ public class BpmModelController { return success(true); } + // ========== 仿钉钉/飞书的精简模型 ========= + + @GetMapping("/simple/get") + @Operation(summary = "获得仿钉钉流程设计模型") + @Parameter(name = "modelId", description = "流程模型编号", required = true, example = "a2c5eee0-eb6c-11ee-abf4-0c37967c420a") + public CommonResult getSimpleModel(@RequestParam("modelId") String modelId){ + return success(modelService.getSimpleModel(modelId)); + } + + @PostMapping("/simple/update") + @Operation(summary = "保存仿钉钉流程设计模型") + @PreAuthorize("@ss.hasPermission('bpm:model:update')") + public CommonResult updateSimpleModel(@Valid @RequestBody BpmSimpleModelUpdateReqVO reqVO) { + modelService.updateSimpleModel(reqVO); + return success(Boolean.TRUE); + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java deleted file mode 100644 index 1da4250b0d..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmSimpleModelController.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import cn.iocoder.yudao.module.bpm.service.definition.BpmSimpleModelService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.validation.Valid; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -// TODO @jason:融合到 BpmModelController 中,url 是 /bpm/model/simple/... 这样,通过一个子目录区分;目的是:逻辑更聚焦! -@Tag(name = "管理后台 - BPM 仿钉钉流程设计器") -@RestController -@RequestMapping("/bpm/simple") -public class BpmSimpleModelController { - @Resource - private BpmSimpleModelService bpmSimpleModelService; - - @PostMapping("/save") - @Operation(summary = "保存仿钉钉流程设计模型") - @PreAuthorize("@ss.hasPermission('bpm:model:update')") - public CommonResult saveSimpleModel(@Valid @RequestBody BpmSimpleModelSaveReqVO reqVO) { - return success(bpmSimpleModelService.saveSimpleModel(reqVO)); - } - - @GetMapping("/get") - @Operation(summary = "获得仿钉钉流程设计模型") - @Parameter(name = "modelId", description = "流程模型编号", required = true, example = "a2c5eee0-eb6c-11ee-abf4-0c37967c420a") - public CommonResult getSimpleModel(@RequestParam("modelId") String modelId){ - return success(bpmSimpleModelService.getSimpleModel(modelId)); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java similarity index 98% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java index 4a9e653e51..4bc5ac85e4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelNodeVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java similarity index 89% rename from yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java rename to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java index 54e0191d56..20f3bf1b10 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/simple/BpmSimpleModelSaveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple; +package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; @@ -6,10 +6,9 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO @芋艿:或许挪到 model 里的 simple 包 @Schema(description = "管理后台 - 仿钉钉流程设计模型的新增/修改 Request VO") @Data -public class BpmSimpleModelSaveReqVO { +public class BpmSimpleModelUpdateReqVO { @Schema(description = "流程模型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotEmpty(message = "流程模型编号不能为空") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index dd7bad7a89..a5fbb5a273 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -7,7 +7,7 @@ import cn.hutool.core.lang.TypeReference; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.*; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmApproveMethodEnum; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModeConditionType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType; @@ -59,11 +59,6 @@ public class SimpleModelUtils { */ public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); - // 不加这个 解析 Message 会报 NPE 异常 - bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); - Message rejectPostProcessMsg = new Message(); - rejectPostProcessMsg.setName(REJECT_POST_PROCESS_MESSAGE_NAME); - bpmnModel.addMessage(rejectPostProcessMsg); Process mainProcess = new Process(); mainProcess.setId(processId); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java index b02f5a5796..3b9646f731 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelService.java @@ -1,7 +1,11 @@ package cn.iocoder.yudao.module.bpm.service.definition; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelUpdateReqVO; import jakarta.validation.Valid; import org.flowable.bpmn.model.BpmnModel; import org.flowable.engine.repository.Model; @@ -49,7 +53,7 @@ public interface BpmModelService { /** * 保存流程模型的 BPMN XML * - * @param id 编号 + * @param id 编号 * @param xmlBytes BPMN XML bytes */ // TODO @芋艿:感觉可以不修改这个方法,而是额外加一个方法;传入 id,bpmn,json; @@ -57,6 +61,7 @@ public interface BpmModelService { /** * 获得仿钉钉快搭模型的 JSON 数据 + * * @param id 编号 * @return JSON bytes */ @@ -64,7 +69,8 @@ public interface BpmModelService { /** * 保存仿钉钉快搭模型的 JSON 数据 - * @param id 编号 + * + * @param id 编号 * @param jsonBytes JSON bytes */ void saveModelSimpleJson(String id, byte[] jsonBytes); @@ -108,10 +114,20 @@ public interface BpmModelService { // ========== 仿钉钉/飞书的精简模型 ========= - // TODO @jason:使用 ========== 仿钉钉/飞书的精简模型 ========= 分隔下;把相关的 controller、service 懂合并了;另外,vo 可以挪到 model/simple 这样的形式; + /** + * 获取仿钉钉流程设计模型结构 + * + * @param modelId 流程模型编号 + * @return 仿钉钉流程设计模型结构 + */ + BpmSimpleModelNodeVO getSimpleModel(String modelId); - // TODO @jason:BpmSimpleModelServiceImpl 迁移到这里,搞成 updateSimpleModel(BpmSimpleModelUpdateReqVO reqVO) - // TODO @jason:BpmSimpleModelServiceImpl 迁移到这里,搞成 getSimpleModel; + /** + * 更新仿钉钉流程设计模型 + * + * @param reqVO 请求信息 + */ + void updateSimpleModel(@Valid BpmSimpleModelUpdateReqVO reqVO); // TODO @jason:另外个问题,因为是存储到 modelExtra 里,那需要 deploy 存储出快照。和 bpmn xml 一样。目前我想到的,就是存储到 BpmProcessDefinitionInfoDO 加一个 simple_model 字段,text 类型。可以看看还有啥方案? diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 9a12b7acdf..349b4200d5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -9,12 +9,15 @@ import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; +import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelUpdateReqVO; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.SimpleModelUtils; import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; @@ -209,6 +212,33 @@ public class BpmModelServiceImpl implements BpmModelService { return repositoryService.getBpmnModel(processDefinitionId); } + @Override + public BpmSimpleModelNodeVO getSimpleModel(String modelId) { + Model model = getModel(modelId); + if (model == null) { + throw exception(MODEL_NOT_EXISTS); + } + // 通过 ACT_RE_MODEL 表 EDITOR_SOURCE_EXTRA_VALUE_ID_ 获取 仿钉钉快搭模型的JSON 数据 + byte[] jsonBytes = getModelSimpleJson(model.getId()); + return JsonUtils.parseObject(jsonBytes, BpmSimpleModelNodeVO.class); + } + + @Override + public void updateSimpleModel(BpmSimpleModelUpdateReqVO reqVO) { + // 1.1 校验流程模型存在 + Model model = getModel(reqVO.getModelId()); + if (model == null) { + throw exception(MODEL_NOT_EXISTS); + } + // 1.2 JSON 转换成 bpmnModel + BpmnModel bpmnModel = SimpleModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + // 2.1 保存 Bpmn XML + saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); + // 2.2 保存 JSON 数据 + saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModelBody())); + } + + /** * 校验流程表单已配置 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java deleted file mode 100644 index 9edaa4aa79..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelService.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import jakarta.validation.Valid; - -/** - * 仿钉钉流程设计 Service 接口 - * - * @author jason - */ -public interface BpmSimpleModelService { - - /** - * 保存仿钉钉流程设计模型 - * - * @param reqVO 请求信息 - */ - Boolean saveSimpleModel(@Valid BpmSimpleModelSaveReqVO reqVO); - - /** - * 获取仿钉钉流程设计模型结构 - * - * @param modelId 流程模型编号 - * @return 仿钉钉流程设计模型结构 - */ - BpmSimpleModelNodeVO getSimpleModel(String modelId); - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java deleted file mode 100644 index 3f77cfbe75..0000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmSimpleModelServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package cn.iocoder.yudao.module.bpm.service.definition; - -import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelNodeVO; -import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.simple.BpmSimpleModelSaveReqVO; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; -import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.SimpleModelUtils; -import jakarta.annotation.Resource; -import org.flowable.bpmn.model.BpmnModel; -import org.flowable.engine.repository.Model; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.MODEL_NOT_EXISTS; - -// TODO @jason:这块可以讨论下,是不是合并成一个 BpmnModelServiceImpl -/** - * 仿钉钉流程设计 Service 实现类 - * - * @author jason - */ -@Service -@Validated -public class BpmSimpleModelServiceImpl implements BpmSimpleModelService { - - @Resource - private BpmModelService bpmModelService; - - @Override - public Boolean saveSimpleModel(BpmSimpleModelSaveReqVO reqVO) { - // 1.1 校验流程模型存在 - Model model = bpmModelService.getModel(reqVO.getModelId()); - if (model == null) { - throw exception(MODEL_NOT_EXISTS); - } - - // 1. JSON 转换成 bpmnModel - BpmnModel bpmnModel = SimpleModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); - // 2.1 保存 Bpmn XML - bpmModelService.saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); - // 2.2 保存 JSON 数据 - bpmModelService.saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModelBody())); - return Boolean.TRUE; - } - - @Override - public BpmSimpleModelNodeVO getSimpleModel(String modelId) { - Model model = bpmModelService.getModel(modelId); - if (model == null) { - throw exception(MODEL_NOT_EXISTS); - } - // 暂时不用 bpmn 转 json, 有点复杂, - // 通过 ACT_RE_MODEL 表 EDITOR_SOURCE_EXTRA_VALUE_ID_ 获取 仿钉钉快搭模型的JSON 数据 - byte[] jsonBytes = bpmModelService.getModelSimpleJson(model.getId()); - return JsonUtils.parseObject(jsonBytes, BpmSimpleModelNodeVO.class); - } - -} -- Gitee From 1ae06b89e4cc639a638e8745a36535c3c3bc3468 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 27 May 2024 21:18:59 +0800 Subject: [PATCH 0615/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9Areview=20simple=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E8=BD=AC=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmApproveMethodEnum.java | 7 +- .../flowable/core/util/SimpleModelUtils.java | 73 ++++++++++++++----- 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmApproveMethodEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmApproveMethodEnum.java index 004c774684..522ff45eac 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmApproveMethodEnum.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmApproveMethodEnum.java @@ -15,9 +15,9 @@ import lombok.Getter; public enum BpmApproveMethodEnum { SINGLE_PERSON_APPROVE(1, "单人审批"), - ALL_APPROVE(2, "多人会签(需所有审批人同意)"), - ANY_OF_APPROVE(3, "多人或签(一名审批人同意即可)"), - SEQUENTIAL_APPROVE(4, "依次审批"); + ALL_APPROVE(2, "多人会签(需所有审批人同意)"), // 会签 + ANY_OF_APPROVE(3, "多人或签(一名审批人同意即可)"), // 或签 + SEQUENTIAL_APPROVE(4, "依次审批"); // 依次审批 /** * 审批方式 @@ -31,4 +31,5 @@ public enum BpmApproveMethodEnum { public static BpmApproveMethodEnum valueOf(Integer method) { return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); } + } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index dd7bad7a89..1f67717568 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -49,6 +49,8 @@ public class SimpleModelUtils { */ public static final String ANY_OF_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances > 0 }"; + // TODO @jason:建议方法名,改成 buildBpmnModel + // TODO @yunai:注释需要完善下; /** * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) * @@ -59,28 +61,31 @@ public class SimpleModelUtils { */ public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); + bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); // TODO @jason:待定:是不是搞个自定义的 namespace; + // TODO 芋艿:后续在 review // 不加这个 解析 Message 会报 NPE 异常 - bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); Message rejectPostProcessMsg = new Message(); rejectPostProcessMsg.setName(REJECT_POST_PROCESS_MESSAGE_NAME); bpmnModel.addMessage(rejectPostProcessMsg); - Process mainProcess = new Process(); - mainProcess.setId(processId); - mainProcess.setName(processName); - mainProcess.setExecutable(Boolean.TRUE); - bpmnModel.addProcess(mainProcess); - // 前端模型数据结构。 + Process process = new Process(); + process.setId(processId); + process.setName(processName); + process.setExecutable(Boolean.TRUE); // TODO @jason:这个是必须设置的么? + bpmnModel.addProcess(process); + + // 前端模型数据结构 // 从 SimpleModel 构建 FlowNode 并添加到 Main Process - buildAndAddBpmnFlowNode(simpleModelNode, mainProcess); + buildAndAddBpmnFlowNode(simpleModelNode, process); // 找到 end event - EndEvent endEvent = (EndEvent) CollUtil.findOne(mainProcess.getFlowElements(), item -> item instanceof EndEvent); + EndEvent endEvent = (EndEvent) CollUtil.findOne(process.getFlowElements(), item -> item instanceof EndEvent); if (endEvent == null) { // TODO 暂时为了兼容 单独构建 end event 节点. 后面去掉 - endEvent = buildAndAddBpmnEndEvent(mainProcess); + endEvent = buildAndAddBpmnEndEvent(process); } + // 构建并添加节点之间的连线 Sequence Flow - buildAndAddBpmnSequenceFlow(mainProcess, simpleModelNode, endEvent.getId()); + buildAndAddBpmnSequenceFlow(process, simpleModelNode, endEvent.getId()); // 自动布局 new BpmnAutoLayout(bpmnModel).execute(); return bpmnModel; @@ -197,20 +202,27 @@ public class SimpleModelUtils { return sequenceFlow; } + // TODO @jason:要不改成 recursionNode 递归节点,然后把 build 名字让出来,专门用于构建各种 Node + // TODO @jason:simpleModelNode 改成 node,mainProcess 改成 process;更符合递归的感觉哈,处理当前节点 private static void buildAndAddBpmnFlowNode(BpmSimpleModelNodeVO simpleModelNode, Process mainProcess) { // 节点为 null 退出 + // TODO @jason:是不是写个 isValidNode 方法:判断是否为有效节点; if (simpleModelNode == null || simpleModelNode.getId() == null) { return; } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); + // TODO @jason:要不抽个 buildNode 方法,然后返回一个 List,之后这个方法 addFlowElement;原因是,让当前这个方法,有主干逻辑;不然现在太长了; switch (nodeType) { case START_EVENT: { + // TODO @jason:每个 nodeType,buildXXX 方法要不更明确,并且去掉 Bpmn; StartEvent startEvent = buildBpmnStartEvent(simpleModelNode); mainProcess.addFlowElement(startEvent); break; } case USER_TASK: { + // TODO @jason:这个,搞成一个 buildUserTask,然后把下面这 2 种节点,搞在一起实现类;这样 buildNode 里面可以更简洁; + // TODO @jason:这里还有个想法,是不是可以所有的都叫 buildXXXNode,然后里面有一些是 bpmn 相关的构建,叫做 buildBpmnUserTask,用于区分; // 获取用户任务的配置 SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(simpleModelNode.getAttributes(), SimpleModelUserTaskConfig.class); UserTask userTask = buildBpmnUserTask(simpleModelNode, userTaskConfig); @@ -259,18 +271,23 @@ public class SimpleModelUtils { } // 如果不是网关类型的接口, 并且chileNode为空退出 + // TODO @jason:建议这个判断去掉,可以更简洁一点;因为往下走;如果不成功,本身也就会结束哈;主要是,这里多了一个这样的判断,增加了理解成本; if (!BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { return; } - // 如果是网关类型接口. 递归添加条件节点 - if (BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { + // 如果是“条件”节点,则递归处理条件 + if (BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) + && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { + // TODO @jason:可以搞成 stream 写成一行哈; for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { buildAndAddBpmnFlowNode(node.getChildNode(), mainProcess); } } + // 如果有“子”节点,则递归处理子节点 // chileNode不为空,递归添加子节点 + // TODO @jason:这个,是不是不写判断,直接继续调用;因为本身 buildAndAddBpmnFlowNode 就会最开始判断了哈,就不重复判断了; if (simpleModelNode.getChildNode() != null) { buildAndAddBpmnFlowNode(simpleModelNode.getChildNode(), mainProcess); } @@ -301,30 +318,33 @@ public class SimpleModelUtils { private static ParallelGateway buildBpmnParallelGateway(BpmSimpleModelNodeVO node) { ParallelGateway parallelGateway = new ParallelGateway(); parallelGateway.setId(node.getId()); + // TODO @jason:setName + + // TODO @芋艿 + jason:合并网关;是不是要有条件啥的。微信讨论 return parallelGateway; } private static ServiceTask buildBpmnServiceTask(BpmSimpleModelNodeVO node) { ServiceTask serviceTask = new ServiceTask(); - serviceTask.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION); - serviceTask.setImplementation(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); serviceTask.setId(node.getId()); serviceTask.setName(node.getName()); - // TODO @jason:建议使用 ServiceTask,通过 executionListeners 实现; - // @芋艿 ServiceTask 就可以了吧。 不需要 executionListeners + // TODO @jason:建议用 delegateExpression;原因是,直接走 bpmSimpleNodeService.copy(execution) 的话,万一后续抄送改实现,可能比较麻烦。最好是搞个独立的 bean,然后它去调用抄 bpmSimpleNodeService; + serviceTask.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION); + serviceTask.setImplementation(BPMN_SIMPLE_COPY_EXECUTION_SCRIPT); + // 添加抄送候选人元素 addCandidateElements(MapUtil.getInt(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY), MapUtil.getStr(node.getAttributes(), BpmnModelConstants.USER_TASK_CANDIDATE_PARAM), serviceTask); + // 添加表单字段权限属性元素 + // TODO @芋艿:这块关注下哈; List> fieldsPermissions = MapUtil.get(node.getAttributes(), - FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() { - }); + FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() {}); addFormFieldsPermission(fieldsPermissions, serviceTask); return serviceTask; } - /** * 给节点添加候选人元素 */ @@ -350,6 +370,9 @@ public class SimpleModelUtils { private static InclusiveGateway buildBpmnInclusiveGateway(BpmSimpleModelNodeVO node, Boolean isFork) { InclusiveGateway inclusiveGateway = new InclusiveGateway(); inclusiveGateway.setId(node.getId()); + // TODO @jason:这里是不是 setName 哈; + + // TODO @芋艿 + jason:是不是搞个合并网关;这里微信讨论下,有点奇怪; if (isFork) { Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); // 网关的最后一个条件为 网关的 default sequence flow @@ -375,6 +398,9 @@ public class SimpleModelUtils { userTask.setDueDate(userTaskConfig.getTimeoutHandler().getTimeDuration()); } + // TODO 芋艿 + jason:要不要基于服务任务,实现或签下的审批不通过?或者说,按比例审批 + + // TODO @jason:addCandidateElements、processMultiInstanceLoopCharacteristics 建议一起搞哈? // 添加候选人元素 addCandidateElements(userTaskConfig.getCandidateStrategy(), userTaskConfig.getCandidateParam(), userTask); // 添加表单字段权限属性元素 @@ -455,10 +481,14 @@ public class SimpleModelUtils { element.addExtensionElement(extensionElement); } + // ========== 各种 build 节点的方法 ========== + private static StartEvent buildBpmnStartEvent(BpmSimpleModelNodeVO node) { StartEvent startEvent = new StartEvent(); startEvent.setId(node.getId()); startEvent.setName(node.getName()); + + // TODO 芋艿 + jason:要不要在开启节点后面,加一个“发起人”任务节点,然后自动审批通过 return startEvent; } @@ -466,6 +496,9 @@ public class SimpleModelUtils { EndEvent endEvent = new EndEvent(); endEvent.setId(node.getId()); endEvent.setName(node.getName()); + + // TODO @芋艿 + jason:要不要加一个终止定义? return endEvent; } + } -- Gitee From 8f31e745dd838189ad4d5a9ff78d32b3ef0dcf85 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 28 May 2024 00:19:28 +0800 Subject: [PATCH 0616/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/core/util/SimpleModelUtils.java | 133 +++++++++--------- .../definition/BpmModelServiceImpl.java | 2 +- 2 files changed, 70 insertions(+), 65 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 1ce5464f47..87d9097ba4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -19,6 +19,7 @@ import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; @@ -49,8 +50,9 @@ public class SimpleModelUtils { */ public static final String ANY_OF_APPROVE_COMPLETE_EXPRESSION = "${ nrOfCompletedInstances > 0 }"; - // TODO @jason:建议方法名,改成 buildBpmnModel + // TODO-DONE @jason:建议方法名,改成 buildBpmnModel // TODO @yunai:注释需要完善下; + /** * 仿钉钉流程设计模型数据结构(json) 转换成 Bpmn Model (待完善) * @@ -59,11 +61,12 @@ public class SimpleModelUtils { * @param simpleModelNode 仿钉钉流程设计模型数据结构 * @return Bpmn Model */ - public static BpmnModel convertSimpleModelToBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { + public static BpmnModel buildBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); // TODO @jason:待定:是不是搞个自定义的 namespace; // TODO 芋艿:后续在 review - // 不加这个 解析 Message 会报 NPE 异常 + // @芋艿 这个 Message 可以去掉 暂时用不上 + // 不加这个 解析 Message 会报 NPE 异常 . Message rejectPostProcessMsg = new Message(); rejectPostProcessMsg.setName(REJECT_POST_PROCESS_MESSAGE_NAME); bpmnModel.addMessage(rejectPostProcessMsg); @@ -76,13 +79,9 @@ public class SimpleModelUtils { // 前端模型数据结构 // 从 SimpleModel 构建 FlowNode 并添加到 Main Process - buildAndAddBpmnFlowNode(simpleModelNode, process); + traverseNodeToBuildFlowNode(simpleModelNode, process); // 找到 end event EndEvent endEvent = (EndEvent) CollUtil.findOne(process.getFlowElements(), item -> item instanceof EndEvent); - if (endEvent == null) { - // TODO 暂时为了兼容 单独构建 end event 节点. 后面去掉 - endEvent = buildAndAddBpmnEndEvent(process); - } // 构建并添加节点之间的连线 Sequence Flow buildAndAddBpmnSequenceFlow(process, simpleModelNode, endEvent.getId()); @@ -202,95 +201,100 @@ public class SimpleModelUtils { return sequenceFlow; } - // TODO @jason:要不改成 recursionNode 递归节点,然后把 build 名字让出来,专门用于构建各种 Node - // TODO @jason:simpleModelNode 改成 node,mainProcess 改成 process;更符合递归的感觉哈,处理当前节点 - private static void buildAndAddBpmnFlowNode(BpmSimpleModelNodeVO simpleModelNode, Process mainProcess) { - // 节点为 null 退出 - // TODO @jason:是不是写个 isValidNode 方法:判断是否为有效节点; - if (simpleModelNode == null || simpleModelNode.getId() == null) { + // TODO-DONE @jason:要不改成 recursionNode 递归节点,然后把 build 名字让出来,专门用于构建各种 Node + // @芋艿 改成了 traverseNodeToBuildFlowNode, 连线的叫 traverseNodeToBuildSequenceFlow + // TODO-DONE @jason:node 改成 node,process 改成 process;更符合递归的感觉哈,处理当前节点 + private static void traverseNodeToBuildFlowNode(BpmSimpleModelNodeVO node, Process process) { + // 判断是否有效节点 + // TODO-DONE @jason:是不是写个 isValidNode 方法:判断是否为有效节点; + if (!isValidNode(node)) { return; } - BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(simpleModelNode.getType()); + BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); - // TODO @jason:要不抽个 buildNode 方法,然后返回一个 List,之后这个方法 addFlowElement;原因是,让当前这个方法,有主干逻辑;不然现在太长了; + + // TODO-DONE @jason:要不抽个 buildNode 方法,然后返回一个 List,之后这个方法 addFlowElement;原因是,让当前这个方法,有主干逻辑;不然现在太长了; + List flowElements = buildFlowNode(node, nodeType); + flowElements.forEach(process::addFlowElement); + + // 如果不是网关类型的接口, 并且chileNode为空退出 + // TODO-DONE @jason:建议这个判断去掉,可以更简洁一点;因为往下走;如果不成功,本身也就会结束哈;主要是,这里多了一个这样的判断,增加了理解成本; + // 如果是“分支”节点,则递归处理条件 + if (BpmSimpleModelNodeType.isBranchNode(node.getType()) + && ArrayUtil.isNotEmpty(node.getConditionNodes())) { + // TODO-DONE @jason:可以搞成 stream 写成一行哈 + node.getConditionNodes().forEach(item -> traverseNodeToBuildFlowNode(item.getChildNode(), process)); + } + + // 如果有“子”节点,则递归处理子节点 + // TODO-DONE @jason:这个,是不是不写判断,直接继续调用;因为本身 buildAndAddBpmnFlowNode 就会最开始判断了哈,就不重复判断了; + traverseNodeToBuildFlowNode(node.getChildNode(), process); + } + + private static boolean isValidNode(BpmSimpleModelNodeVO node) { + return node != null && node.getId() != null; + } + + private static List buildFlowNode(BpmSimpleModelNodeVO node, BpmSimpleModelNodeType nodeType) { + List list = new ArrayList<>(); switch (nodeType) { case START_EVENT: { - // TODO @jason:每个 nodeType,buildXXX 方法要不更明确,并且去掉 Bpmn; - StartEvent startEvent = buildBpmnStartEvent(simpleModelNode); - mainProcess.addFlowElement(startEvent); + // TODO-DONE @jason:每个 nodeType,buildXXX 方法要不更明确,并且去掉 Bpmn; + StartEvent startEvent = buildStartEvent(node); + list.add(startEvent); break; } case USER_TASK: { // TODO @jason:这个,搞成一个 buildUserTask,然后把下面这 2 种节点,搞在一起实现类;这样 buildNode 里面可以更简洁; // TODO @jason:这里还有个想法,是不是可以所有的都叫 buildXXXNode,然后里面有一些是 bpmn 相关的构建,叫做 buildBpmnUserTask,用于区分; // 获取用户任务的配置 - SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(simpleModelNode.getAttributes(), SimpleModelUserTaskConfig.class); - UserTask userTask = buildBpmnUserTask(simpleModelNode, userTaskConfig); - mainProcess.addFlowElement(userTask); + SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(node.getAttributes(), SimpleModelUserTaskConfig.class); + UserTask userTask = buildBpmnUserTask(node, userTaskConfig); + list.add(userTask); if (userTaskConfig.getTimeoutHandler() != null && userTaskConfig.getTimeoutHandler().getEnable()) { // 添加用户任务的 Timer Boundary Event, 用于任务的超时处理 BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); - mainProcess.addFlowElement(boundaryEvent); + //process.addFlowElement(boundaryEvent); + list.add(boundaryEvent); } break; } case COPY_TASK: { - ServiceTask serviceTask = buildBpmnServiceTask(simpleModelNode); - mainProcess.addFlowElement(serviceTask); + ServiceTask serviceTask = buildServiceTask(node); + list.add(serviceTask); break; } case EXCLUSIVE_GATEWAY: { - ExclusiveGateway exclusiveGateway = buildBpmnExclusiveGateway(simpleModelNode); - mainProcess.addFlowElement(exclusiveGateway); + ExclusiveGateway exclusiveGateway = buildExclusiveGateway(node); + list.add(exclusiveGateway); break; } case PARALLEL_GATEWAY_FORK: case PARALLEL_GATEWAY_JOIN: { - ParallelGateway parallelGateway = buildBpmnParallelGateway(simpleModelNode); - mainProcess.addFlowElement(parallelGateway); + ParallelGateway parallelGateway = buildParallelGateway(node); + list.add(parallelGateway); break; } case INCLUSIVE_GATEWAY_FORK: { - InclusiveGateway inclusiveGateway = buildBpmnInclusiveGateway(simpleModelNode, Boolean.TRUE); - mainProcess.addFlowElement(inclusiveGateway); + InclusiveGateway inclusiveGateway = buildInclusiveGateway(node, Boolean.TRUE); + list.add(inclusiveGateway); break; } case INCLUSIVE_GATEWAY_JOIN: { - InclusiveGateway inclusiveGateway = buildBpmnInclusiveGateway(simpleModelNode, Boolean.FALSE); - mainProcess.addFlowElement(inclusiveGateway); + InclusiveGateway inclusiveGateway = buildInclusiveGateway(node, Boolean.FALSE); + list.add(inclusiveGateway); break; } case END_EVENT: { - EndEvent endEvent = buildBpmnEndEvent(simpleModelNode); - mainProcess.addFlowElement(endEvent); + EndEvent endEvent = buildEndEvent(node); + list.add(endEvent); break; } default: { // TODO 其它节点类型的实现 } } - - // 如果不是网关类型的接口, 并且chileNode为空退出 - // TODO @jason:建议这个判断去掉,可以更简洁一点;因为往下走;如果不成功,本身也就会结束哈;主要是,这里多了一个这样的判断,增加了理解成本; - if (!BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) && simpleModelNode.getChildNode() == null) { - return; - } - - // 如果是“条件”节点,则递归处理条件 - if (BpmSimpleModelNodeType.isBranchNode(simpleModelNode.getType()) - && ArrayUtil.isNotEmpty(simpleModelNode.getConditionNodes())) { - // TODO @jason:可以搞成 stream 写成一行哈; - for (BpmSimpleModelNodeVO node : simpleModelNode.getConditionNodes()) { - buildAndAddBpmnFlowNode(node.getChildNode(), mainProcess); - } - } - - // 如果有“子”节点,则递归处理子节点 - // chileNode不为空,递归添加子节点 - // TODO @jason:这个,是不是不写判断,直接继续调用;因为本身 buildAndAddBpmnFlowNode 就会最开始判断了哈,就不重复判断了; - if (simpleModelNode.getChildNode() != null) { - buildAndAddBpmnFlowNode(simpleModelNode.getChildNode(), mainProcess); - } + return list; } private static BoundaryEvent buildUserTaskTimerBoundaryEvent(UserTask userTask, SimpleModelUserTaskConfig.TimeoutHandler timeoutHandler) { @@ -315,7 +319,7 @@ public class SimpleModelUtils { return boundaryEvent; } - private static ParallelGateway buildBpmnParallelGateway(BpmSimpleModelNodeVO node) { + private static ParallelGateway buildParallelGateway(BpmSimpleModelNodeVO node) { ParallelGateway parallelGateway = new ParallelGateway(); parallelGateway.setId(node.getId()); // TODO @jason:setName @@ -324,7 +328,7 @@ public class SimpleModelUtils { return parallelGateway; } - private static ServiceTask buildBpmnServiceTask(BpmSimpleModelNodeVO node) { + private static ServiceTask buildServiceTask(BpmSimpleModelNodeVO node) { ServiceTask serviceTask = new ServiceTask(); serviceTask.setId(node.getId()); serviceTask.setName(node.getName()); @@ -340,7 +344,8 @@ public class SimpleModelUtils { // 添加表单字段权限属性元素 // TODO @芋艿:这块关注下哈; List> fieldsPermissions = MapUtil.get(node.getAttributes(), - FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() {}); + FORM_FIELD_PERMISSION_ELEMENT, new TypeReference<>() { + }); addFormFieldsPermission(fieldsPermissions, serviceTask); return serviceTask; } @@ -354,7 +359,7 @@ public class SimpleModelUtils { addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, candidateParam); } - private static ExclusiveGateway buildBpmnExclusiveGateway(BpmSimpleModelNodeVO node) { + private static ExclusiveGateway buildExclusiveGateway(BpmSimpleModelNodeVO node) { Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); exclusiveGateway.setId(node.getId()); @@ -367,7 +372,7 @@ public class SimpleModelUtils { return exclusiveGateway; } - private static InclusiveGateway buildBpmnInclusiveGateway(BpmSimpleModelNodeVO node, Boolean isFork) { + private static InclusiveGateway buildInclusiveGateway(BpmSimpleModelNodeVO node, Boolean isFork) { InclusiveGateway inclusiveGateway = new InclusiveGateway(); inclusiveGateway.setId(node.getId()); // TODO @jason:这里是不是 setName 哈; @@ -483,7 +488,7 @@ public class SimpleModelUtils { // ========== 各种 build 节点的方法 ========== - private static StartEvent buildBpmnStartEvent(BpmSimpleModelNodeVO node) { + private static StartEvent buildStartEvent(BpmSimpleModelNodeVO node) { StartEvent startEvent = new StartEvent(); startEvent.setId(node.getId()); startEvent.setName(node.getName()); @@ -492,7 +497,7 @@ public class SimpleModelUtils { return startEvent; } - private static EndEvent buildBpmnEndEvent(BpmSimpleModelNodeVO node) { + private static EndEvent buildEndEvent(BpmSimpleModelNodeVO node) { EndEvent endEvent = new EndEvent(); endEvent.setId(node.getId()); endEvent.setName(node.getName()); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 349b4200d5..4762fac4d5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -231,7 +231,7 @@ public class BpmModelServiceImpl implements BpmModelService { throw exception(MODEL_NOT_EXISTS); } // 1.2 JSON 转换成 bpmnModel - BpmnModel bpmnModel = SimpleModelUtils.convertSimpleModelToBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + BpmnModel bpmnModel = SimpleModelUtils.buildBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); // 2.1 保存 Bpmn XML saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); // 2.2 保存 JSON 数据 -- Gitee From 4bd399cd3261597192963141cd9a885287efad29 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 28 May 2024 08:46:58 +0800 Subject: [PATCH 0617/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 27 ++-- .../flowable/core/util/SimpleModelUtils.java | 122 ++++++++++-------- 2 files changed, 79 insertions(+), 70 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 12cda1d3d0..8426d4482b 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -18,17 +18,18 @@ import java.util.Objects; public enum BpmSimpleModelNodeType implements IntArrayValuable { // TODO @jaosn:-1、0、1、4、-2 是前端已经定义好的么?感觉未来可以考虑搞成和 BPMN 尽量一致的单词哈;类似 usertask 用户审批; - START_EVENT(0, "开始节点"), - END_EVENT(-2, "结束节点"), // TODO @jaosn:挪到 START_EVENT_NODE 后; - - USER_TASK(1, "审批人节点"), // TODO @jaosn:是不是这里从 10 开始好点;相当于说,0-9 给开始和结束;10-19 给各种节点;20-29 给各种条件; TODO 后面改改 - COPY_TASK(2, "抄送人节点"), - - EXCLUSIVE_GATEWAY(4, "排他网关"), // TODO @jason:是不是改成叫 条件分支? - PARALLEL_GATEWAY_FORK(5, "并行网关分叉节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? 后面是否去掉并行网关。只用包容网关 - PARALLEL_GATEWAY_JOIN(6, "并行网关聚合节点"), - INCLUSIVE_GATEWAY_FORK(7, "包容网关分叉节点"), - INCLUSIVE_GATEWAY_JOIN(8, "包容网关聚合节点"), + // @芋艿 感觉还是用 START_NODE . END_NODE 比较好. + START_NODE(0, "开始节点"), + END_NODE(-2, "结束节点"), // TODO @jaosn:挪到 START_EVENT_NODE 后; + + APPROVE_NODE(1, "审批人节点"), // TODO @jaosn:是不是这里从 10 开始好点;相当于说,0-9 给开始和结束;10-19 给各种节点;20-29 给各种条件; TODO 后面改改 + COPY_NODE(2, "抄送人节点"), + + CONDITION_BRANCH_NODE(4, "条件分支节点"), // TODO @jason:是不是改成叫 条件分支? + PARALLEL_BRANCH_FORK_NODE(5, "并行分支分叉节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? 后面是否去掉并行网关。只用包容网关 + PARALLEL_BRANCH_JOIN_NODE(6, "并行分支聚合节点"), + INCLUSIVE_BRANCH_FORK_NODE(7, "包容网关分叉节点"), + INCLUSIVE_BRANCH_JOIN_NODE(8, "包容网关聚合节点"), ; public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); @@ -42,8 +43,8 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { * @param type 节点类型 */ public static boolean isBranchNode(Integer type) { - return Objects.equals(EXCLUSIVE_GATEWAY.getType(), type) || Objects.equals(PARALLEL_GATEWAY_FORK.getType(), type) - || Objects.equals(INCLUSIVE_GATEWAY_FORK.getType(), type) ; + return Objects.equals(CONDITION_BRANCH_NODE.getType(), type) || Objects.equals(PARALLEL_BRANCH_FORK_NODE.getType(), type) + || Objects.equals(INCLUSIVE_BRANCH_FORK_NODE.getType(), type) ; } public static BpmSimpleModelNodeType valueOf(Integer type) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 87d9097ba4..8fa8da01e0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -25,7 +25,7 @@ import java.util.Map; import java.util.Objects; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_TIMEOUT; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_EVENT; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_NODE; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum.AUTO_REMINDER; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.*; @@ -63,10 +63,10 @@ public class SimpleModelUtils { */ public static BpmnModel buildBpmnModel(String processId, String processName, BpmSimpleModelNodeVO simpleModelNode) { BpmnModel bpmnModel = new BpmnModel(); + // 不加这个 解析 Message 会报 NPE 异常 . bpmnModel.setTargetNamespace(BPMN2_NAMESPACE); // TODO @jason:待定:是不是搞个自定义的 namespace; // TODO 芋艿:后续在 review // @芋艿 这个 Message 可以去掉 暂时用不上 - // 不加这个 解析 Message 会报 NPE 异常 . Message rejectPostProcessMsg = new Message(); rejectPostProcessMsg.setName(REJECT_POST_PROCESS_MESSAGE_NAME); bpmnModel.addMessage(rejectPostProcessMsg); @@ -92,7 +92,7 @@ public class SimpleModelUtils { private static void buildAndAddBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String targetId) { // 节点为 null 或者 为END_EVENT 退出 - if (node == null || node.getId() == null || END_EVENT.getType().equals(node.getType())) { + if (node == null || node.getId() == null || END_NODE.getType().equals(node.getType())) { return; } BpmSimpleModelNodeVO childNode = node.getChildNode(); @@ -105,20 +105,20 @@ public class SimpleModelUtils { BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); switch (nodeType) { - case START_EVENT: - case USER_TASK: - case COPY_TASK: - case PARALLEL_GATEWAY_JOIN: - case INCLUSIVE_GATEWAY_JOIN: { + case START_NODE: + case APPROVE_NODE: + case COPY_NODE: + case PARALLEL_BRANCH_JOIN_NODE: + case INCLUSIVE_BRANCH_JOIN_NODE: { SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null, null); mainProcess.addFlowElement(sequenceFlow); // 递归调用后续节点 buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); break; } - case PARALLEL_GATEWAY_FORK: - case EXCLUSIVE_GATEWAY: - case INCLUSIVE_GATEWAY_FORK: { + case PARALLEL_BRANCH_FORK_NODE: + case CONDITION_BRANCH_NODE: + case INCLUSIVE_BRANCH_FORK_NODE: { String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? targetId : childNode.getId(); List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); @@ -238,55 +238,50 @@ public class SimpleModelUtils { private static List buildFlowNode(BpmSimpleModelNodeVO node, BpmSimpleModelNodeType nodeType) { List list = new ArrayList<>(); switch (nodeType) { - case START_EVENT: { + case START_NODE: { // TODO-DONE @jason:每个 nodeType,buildXXX 方法要不更明确,并且去掉 Bpmn; - StartEvent startEvent = buildStartEvent(node); + // @芋艿 改成 convert 是不是好理解一点 + StartEvent startEvent = convertStartNode(node); list.add(startEvent); break; } - case USER_TASK: { - // TODO @jason:这个,搞成一个 buildUserTask,然后把下面这 2 种节点,搞在一起实现类;这样 buildNode 里面可以更简洁; - // TODO @jason:这里还有个想法,是不是可以所有的都叫 buildXXXNode,然后里面有一些是 bpmn 相关的构建,叫做 buildBpmnUserTask,用于区分; - // 获取用户任务的配置 - SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(node.getAttributes(), SimpleModelUserTaskConfig.class); - UserTask userTask = buildBpmnUserTask(node, userTaskConfig); - list.add(userTask); - if (userTaskConfig.getTimeoutHandler() != null && userTaskConfig.getTimeoutHandler().getEnable()) { - // 添加用户任务的 Timer Boundary Event, 用于任务的超时处理 - BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); - //process.addFlowElement(boundaryEvent); - list.add(boundaryEvent); - } + case APPROVE_NODE: { + // TODO-DONE @jason:这个,搞成一个 buildUserTask,然后把下面这 2 种节点,搞在一起实现类;这样 buildNode 里面可以更简洁; + // TODO-DONE @jason:这里还有个想法,是不是可以所有的都叫 buildXXXNode,然后里面有一些是 bpmn 相关的构建,叫做 buildBpmnUserTask,用于区分; + // @芋艿 改成 convertXXXNode, , 方面里面使用 buildBpmnXXXNode. 是否更好理解 + // 转换审批节点 + List flowElements = convertApproveNode(node); + list.addAll(flowElements); break; } - case COPY_TASK: { - ServiceTask serviceTask = buildServiceTask(node); + case COPY_NODE: { + ServiceTask serviceTask = convertCopyNode(node); list.add(serviceTask); break; } - case EXCLUSIVE_GATEWAY: { - ExclusiveGateway exclusiveGateway = buildExclusiveGateway(node); + case CONDITION_BRANCH_NODE: { + ExclusiveGateway exclusiveGateway = convertConditionBranchNode(node); list.add(exclusiveGateway); break; } - case PARALLEL_GATEWAY_FORK: - case PARALLEL_GATEWAY_JOIN: { - ParallelGateway parallelGateway = buildParallelGateway(node); + case PARALLEL_BRANCH_FORK_NODE: + case PARALLEL_BRANCH_JOIN_NODE: { + ParallelGateway parallelGateway = convertParallelBranchNode(node); list.add(parallelGateway); break; } - case INCLUSIVE_GATEWAY_FORK: { - InclusiveGateway inclusiveGateway = buildInclusiveGateway(node, Boolean.TRUE); + case INCLUSIVE_BRANCH_FORK_NODE: { + InclusiveGateway inclusiveGateway = convertInclusiveBranchNode(node, Boolean.TRUE); list.add(inclusiveGateway); break; } - case INCLUSIVE_GATEWAY_JOIN: { - InclusiveGateway inclusiveGateway = buildInclusiveGateway(node, Boolean.FALSE); + case INCLUSIVE_BRANCH_JOIN_NODE: { + InclusiveGateway inclusiveGateway = convertInclusiveBranchNode(node, Boolean.FALSE); list.add(inclusiveGateway); break; } - case END_EVENT: { - EndEvent endEvent = buildEndEvent(node); + case END_NODE: { + EndEvent endEvent = convertEndNode(node); list.add(endEvent); break; } @@ -297,6 +292,19 @@ public class SimpleModelUtils { return list; } + private static List convertApproveNode(BpmSimpleModelNodeVO node) { + List flowElements = new ArrayList<>(); + SimpleModelUserTaskConfig userTaskConfig = BeanUtil.toBean(node.getAttributes(), SimpleModelUserTaskConfig.class); + UserTask userTask = buildBpmnUserTask(node, userTaskConfig); + flowElements.add(userTask); + if (userTaskConfig.getTimeoutHandler() != null && userTaskConfig.getTimeoutHandler().getEnable()) { + // 添加用户任务的 Timer Boundary Event, 用于任务的超时处理 + BoundaryEvent boundaryEvent = buildUserTaskTimerBoundaryEvent(userTask, userTaskConfig.getTimeoutHandler()); + flowElements.add(boundaryEvent); + } + return flowElements; + } + private static BoundaryEvent buildUserTaskTimerBoundaryEvent(UserTask userTask, SimpleModelUserTaskConfig.TimeoutHandler timeoutHandler) { // 定时器边界事件 BoundaryEvent boundaryEvent = new BoundaryEvent(); @@ -319,16 +327,17 @@ public class SimpleModelUtils { return boundaryEvent; } - private static ParallelGateway buildParallelGateway(BpmSimpleModelNodeVO node) { + private static ParallelGateway convertParallelBranchNode(BpmSimpleModelNodeVO node) { ParallelGateway parallelGateway = new ParallelGateway(); parallelGateway.setId(node.getId()); // TODO @jason:setName // TODO @芋艿 + jason:合并网关;是不是要有条件啥的。微信讨论 + // @芋艿 貌似并行网关没有条件的 return parallelGateway; } - private static ServiceTask buildServiceTask(BpmSimpleModelNodeVO node) { + private static ServiceTask convertCopyNode(BpmSimpleModelNodeVO node) { ServiceTask serviceTask = new ServiceTask(); serviceTask.setId(node.getId()); serviceTask.setName(node.getName()); @@ -359,8 +368,8 @@ public class SimpleModelUtils { addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_PARAM, candidateParam); } - private static ExclusiveGateway buildExclusiveGateway(BpmSimpleModelNodeVO node) { - Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); + private static ExclusiveGateway convertConditionBranchNode(BpmSimpleModelNodeVO node) { + Assert.notEmpty(node.getConditionNodes(), "条件分支节点不能为空"); ExclusiveGateway exclusiveGateway = new ExclusiveGateway(); exclusiveGateway.setId(node.getId()); // 寻找默认的序列流 @@ -372,28 +381,25 @@ public class SimpleModelUtils { return exclusiveGateway; } - private static InclusiveGateway buildInclusiveGateway(BpmSimpleModelNodeVO node, Boolean isFork) { + private static InclusiveGateway convertInclusiveBranchNode(BpmSimpleModelNodeVO node, Boolean isFork) { InclusiveGateway inclusiveGateway = new InclusiveGateway(); inclusiveGateway.setId(node.getId()); // TODO @jason:这里是不是 setName 哈; // TODO @芋艿 + jason:是不是搞个合并网关;这里微信讨论下,有点奇怪; + // @芋艿 isFork 为 false 就是合并网关。由前端传入。这个前端暂时还未实现 if (isFork) { - Assert.notEmpty(node.getConditionNodes(), "网关节点的条件节点不能为空"); - // 网关的最后一个条件为 网关的 default sequence flow - inclusiveGateway.setDefaultFlow(String.format("%s_SequenceFlow_%d", node.getId(), node.getConditionNodes().size())); + Assert.notEmpty(node.getConditionNodes(), "条件节点不能为空"); + // 寻找默认的序列流 + BpmSimpleModelNodeVO defaultSeqFlow = CollUtil.findOne(node.getConditionNodes(), + item -> BooleanUtil.isTrue(MapUtil.getBool(item.getAttributes(), DEFAULT_FLOW_ATTRIBUTE))); + if (defaultSeqFlow != null) { + inclusiveGateway.setDefaultFlow(defaultSeqFlow.getId()); + } } return inclusiveGateway; } - private static EndEvent buildAndAddBpmnEndEvent(Process mainProcess) { - EndEvent endEvent = new EndEvent(); - endEvent.setId(BpmnModelConstants.END_EVENT_ID); - endEvent.setName("结束"); - mainProcess.addFlowElement(endEvent); - return endEvent; - } - private static UserTask buildBpmnUserTask(BpmSimpleModelNodeVO node, SimpleModelUserTaskConfig userTaskConfig) { UserTask userTask = new UserTask(); userTask.setId(node.getId()); @@ -488,16 +494,18 @@ public class SimpleModelUtils { // ========== 各种 build 节点的方法 ========== - private static StartEvent buildStartEvent(BpmSimpleModelNodeVO node) { + private static StartEvent convertStartNode(BpmSimpleModelNodeVO node) { StartEvent startEvent = new StartEvent(); startEvent.setId(node.getId()); startEvent.setName(node.getName()); // TODO 芋艿 + jason:要不要在开启节点后面,加一个“发起人”任务节点,然后自动审批通过 + // @芋艿 这个是不是由前端来实现。 默认开始节点后面跟一个 “发起人”的审批节点(审批人是发起人自己)。 + // 我看有些平台这个审批节点允许删除,有些不允许。由用户决定 return startEvent; } - private static EndEvent buildEndEvent(BpmSimpleModelNodeVO node) { + private static EndEvent convertEndNode(BpmSimpleModelNodeVO node) { EndEvent endEvent = new EndEvent(); endEvent.setId(node.getId()); endEvent.setName(node.getName()); -- Gitee From e97408b3ac1d2c05c96855e622b362db6e33aca3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 28 May 2024 11:39:29 +0800 Subject: [PATCH 0618/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91d?= =?UTF-8?q?all=20=E7=BB=98=E7=94=BB=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/image/AiImageServiceImpl.java | 75 ++++++++++++------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 18659377c0..5d01483ecc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -35,6 +35,9 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Collections; import java.util.List; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; /** * ai 作图 @@ -53,6 +56,8 @@ public class AiImageServiceImpl implements AiImageService { private final OpenAiImageClient openAiImageClient; private final MidjourneyWebSocketStarter midjourneyWebSocketStarter; private final MidjourneyInteractionsApi midjourneyInteractionsApi; + private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor( + 3, 5, 1, TimeUnit.HOURS, new LinkedBlockingQueue<>(32)); @PostConstruct public void startMidjourney() { @@ -89,34 +94,48 @@ public class AiImageServiceImpl implements AiImageService { @Override public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { - // 获取 model - OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); - OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); - try { - // 转换openai 参数 - OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageModelEnum.getModel()); - openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); - openAiImageOptions.setSize(req.getSize()); - ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); - // 发送 - ImageGeneration imageGeneration = imageResponse.getResult(); - // 图片保存到服务器 - String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); - // 保存数据库 - AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), - filePath, imageGeneration.getOutput().getUrl(), AiImageStatusEnum.COMPLETE, null, - null, null, null); - // 转换 AiImageDallDrawingRespVO - return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); - } catch (AiException aiException) { - // 保存数据库 - AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), - null, null, AiImageStatusEnum.FAIL, aiException.getMessage(), - null, null, null); - // 发送错误信息 - return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); - } + // 保存数据库 + AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), + null, null, AiImageStatusEnum.IN_PROGRESS, null, + null, null, null); + // 异步执行 + EXECUTOR.execute(() -> { + try { + + // 获取 model + OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); + OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); + + // 转换openai 参数 + OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); + openAiImageOptions.setModel(openAiImageModelEnum.getModel()); + openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); + openAiImageOptions.setSize(req.getSize()); + ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); + // 发送 + ImageGeneration imageGeneration = imageResponse.getResult(); + // 图片保存到服务器 + String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); + // 更新数据库 + aiImageMapper.updateById( + new AiImageDO() + .setId(aiImageDO.getId()) + .setStatus(AiImageStatusEnum.COMPLETE.getStatus()) + .setPicUrl(filePath) + .setOriginalPicUrl(imageGeneration.getOutput().getUrl()) + ); + } catch (AiException aiException) { + // 更新错误信息 + aiImageMapper.updateById( + new AiImageDO() + .setId(aiImageDO.getId()) + .setStatus(AiImageStatusEnum.FAIL.getStatus()) + .setErrorMessage(aiException.getMessage()) + ); + } + }); + // 转换 AiImageDallDrawingRespVO + return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); } @Override -- Gitee From 9878abb03c7ebee3e234ee0a1f12491d9a6cb348 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 28 May 2024 14:05:44 +0800 Subject: [PATCH 0619/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8D=95=E4=B8=AA=20image=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/image/AiImageController.java | 6 ++++++ .../iocoder/yudao/module/ai/convert/AiImageConvert.java | 8 ++++++++ .../yudao/module/ai/service/image/AiImageService.java | 8 ++++++++ .../yudao/module/ai/service/image/AiImageServiceImpl.java | 6 ++++++ 4 files changed, 28 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index d072822eb9..e64edec2cc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -36,6 +36,12 @@ public class AiImageController { return CommonResult.success(aiImageService.list(req)); } + @Operation(summary = "获取image信息", description = "获取image信息") + @GetMapping("/get") + public CommonResult get(@RequestParam("id") Long id) { + return CommonResult.success(aiImageService.get(id)); + } + @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index df8647a5b9..c096147397 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -47,6 +47,14 @@ public interface AiImageConvert { */ List convertAiImageListRespVO(List list); + /** + * 转换 - AiImageListRespVO + * + * @param aiImageDO + * @return + */ + AiImageListRespVO convertAiImageListRespVO(AiImageDO aiImageDO); + /** * 转换 - AiImageMidjourneyOperationsVO * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 4af34d3bfa..1d4e24764a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -20,6 +20,14 @@ public interface AiImageService { */ PageResult list(AiImageListReqVO req); + /** + * 获取 - image 信息 + * + * @param id + * @return + */ + AiImageListRespVO get(Long id); + /** * ai绘画 - dall2/dall3 绘画 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 5d01483ecc..f635fb70ec 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -92,6 +92,12 @@ public class AiImageServiceImpl implements AiImageService { return result; } + @Override + public AiImageListRespVO get(Long id) { + AiImageDO aiImageDO = aiImageMapper.selectById(id); + return AiImageConvert.INSTANCE.convertAiImageListRespVO(aiImageDO); + } + @Override public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { // 保存数据库 -- Gitee From 7268f002d830c09fb93b040374a826cc4d7a4acb Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 28 May 2024 14:47:56 +0800 Subject: [PATCH 0620/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91d?= =?UTF-8?q?all=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/vo/AiImageListRespVO.java | 10 ++++ .../module/ai/convert/AiImageConvert.java | 8 +++ .../ai/service/image/AiImageServiceImpl.java | 54 +++++-------------- 3 files changed, 31 insertions(+), 41 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java index 1ddec8d7b5..8e41f5a872 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java @@ -1,12 +1,16 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; +import java.time.LocalDateTime; + /** * midjourney req * @@ -50,6 +54,12 @@ public class AiImageListRespVO extends PageParam { @Schema(description = "是否发布") private String publicStatus; + @Schema(description = "创建时间") + private LocalDateTime createTime; + + @Schema(description = "更新时间") + private LocalDateTime updateTime; + // ============ mj 需要字段 @Schema(description = "用户操作的Nonce编号(MJ返回)") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index c096147397..0f92710617 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -62,4 +62,12 @@ public interface AiImageConvert { * @return */ AiImageMidjourneyOperationsVO convertAiImageMidjourneyOperationsVO(MidjourneyMessage.Component component); + + /** + * 转换 - AiImageDO + * + * @param req + * @return + */ + AiImageDO convertAiImageDO(AiImageDallReqVO req); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index f635fb70ec..6a0aea2998 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -100,10 +100,12 @@ public class AiImageServiceImpl implements AiImageService { @Override public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 保存数据库 - AiImageDO aiImageDO = doSave(req.getPrompt(), req.getSize(), req.getModel(), - null, null, AiImageStatusEnum.IN_PROGRESS, null, - null, null, null); + AiImageDO aiImageDO = AiImageConvert.INSTANCE.convertAiImageDO(req); + aiImageDO.setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); + aiImageDO.setUserId(loginUserId); + aiImageMapper.insert(aiImageDO); // 异步执行 EXECUTOR.execute(() -> { try { @@ -149,9 +151,10 @@ public class AiImageServiceImpl implements AiImageService { public void midjourney(AiImageMidjourneyReqVO req) { // 保存数据库 String messageId = String.valueOf(IdUtil.getSnowflakeNextId()); - AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", - null, null, AiImageStatusEnum.SUBMIT, null, - messageId, null, null); + // todo +// AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", +// null, null, AiImageStatusEnum.SUBMIT, null, +// messageId, null, null); // 提交 midjourney 任务 Boolean imagine = midjourneyInteractionsApi.imagine(messageId, req.getPrompt()); if (!imagine) { @@ -173,9 +176,10 @@ public class AiImageServiceImpl implements AiImageService { // 获取 mjOperationName String mjOperationName = midjourneyOperationsVO.getLabel(); // 保存一个 image 任务记录 - doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), - null, null, AiImageStatusEnum.SUBMIT, null, - req.getMessageId(), req.getOperateId(), mjOperationName); + // todo +// doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), +// null, null, AiImageStatusEnum.SUBMIT, null, +// req.getMessageId(), req.getOperateId(), mjOperationName); // 提交操作 midjourneyInteractionsApi.reRoll( new ReRollReq() @@ -222,36 +226,4 @@ public class AiImageServiceImpl implements AiImageService { } return aiImageDO; } - - private AiImageDO doSave(String prompt, - String size, - String model, - String picUrl, - String originalPicUrl, - AiImageStatusEnum statusEnum, - String errorMessage, - String mjMessageId, - String mjOperationId, - String mjOperationName) { - // 保存数据库 - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); - AiImageDO aiImageDO = new AiImageDO(); - aiImageDO.setId(null); - aiImageDO.setPrompt(prompt); - aiImageDO.setSize(size); - aiImageDO.setModel(model); - aiImageDO.setUserId(loginUserId); - // TODO @芋艿 如何上传到自己服务器 - aiImageDO.setPicUrl(null); - aiImageDO.setStatus(statusEnum.getStatus()); - aiImageDO.setPicUrl(picUrl); - aiImageDO.setOriginalPicUrl(originalPicUrl); - aiImageDO.setErrorMessage(errorMessage); - // - aiImageDO.setMjNonceId(mjMessageId); - aiImageDO.setMjOperationId(mjOperationId); - aiImageDO.setMjOperationName(mjOperationName); - aiImageMapper.insert(aiImageDO); - return aiImageDO; - } } -- Gitee From 5f278ac23b392d6ecd9452cc50fdfc9e77af97e8 Mon Sep 17 00:00:00 2001 From: zhougang Date: Tue, 28 May 2024 15:09:01 +0800 Subject: [PATCH 0621/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{Signature.java => ApiSignature.java} | 16 ++++--- .../signature/core/aop/SignatureAspect.java | 43 ++++++------------- .../core/redis/SignatureRedisDAO.java | 3 +- ...ot.autoconfigure.AutoConfiguration.imports | 3 +- .../core/filter/CacheRequestBodyWrapper.java | 4 -- 5 files changed, 26 insertions(+), 43 deletions(-) rename yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/{Signature.java => ApiSignature.java} (75%) diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/ApiSignature.java similarity index 75% rename from yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java rename to yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/ApiSignature.java index 1b7e127860..e338ae7090 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/Signature.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/annotation/ApiSignature.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.framework.signature.core.annotation; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import java.lang.annotation.*; +import java.util.concurrent.TimeUnit; /** @@ -14,12 +15,17 @@ import java.lang.annotation.*; @Documented @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) -public @interface Signature { +public @interface ApiSignature { /** - * 同一个请求多长时间内有效 默认 10分钟 + * 同一个请求多长时间内有效 默认 60 秒 */ - long expireTime() default 600000L; + int timeout() default 60; + + /** + * 时间单位,默认为 SECONDS 秒 + */ + TimeUnit timeUnit() default TimeUnit.SECONDS; // ========================== 签名参数 ========================== @@ -50,8 +56,4 @@ public @interface Signature { */ String sign() default "sign"; - /** - * url 客户端不需要传递,但是可以用来加签(如: /{id} 带有动态参数的 url ,如果没有动态参数可设置为 false 不进行加签) - */ - boolean urlEnable() default true; } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java index dc15104656..a001419f8b 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/aop/SignatureAspect.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.framework.signature.core.aop; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.SignUtil; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; -import cn.iocoder.yudao.framework.signature.core.annotation.Signature; +import cn.iocoder.yudao.framework.signature.core.annotation.ApiSignature; import cn.iocoder.yudao.framework.signature.core.redis.SignatureRedisDAO; import cn.iocoder.yudao.framework.web.core.filter.CacheRequestBodyWrapper; import jakarta.servlet.http.HttpServletRequest; @@ -15,7 +16,6 @@ import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; -import org.springframework.util.Assert; import java.nio.charset.StandardCharsets; import java.util.Map; @@ -25,7 +25,7 @@ import java.util.TreeMap; import java.util.concurrent.TimeUnit; /** - * 拦截声明了 {@link Signature} 注解的方法,实现签名 + * 拦截声明了 {@link ApiSignature} 注解的方法,实现签名 * * @author Zhougang */ @@ -37,9 +37,9 @@ public class SignatureAspect { private final SignatureRedisDAO signatureRedisDAO; @Before("@annotation(signature)") - public void beforePointCut(JoinPoint joinPoint, Signature signature) { + public void beforePointCut(JoinPoint joinPoint, ApiSignature signature) { if (!verifySignature(signature, Objects.requireNonNull(ServletUtils.getRequest()))) { - log.info("[beforePointCut][方法{} 参数({}) 签名失败]", joinPoint.getSignature().toString(), + log.error("[beforePointCut][方法{} 参数({}) 签名失败]", joinPoint.getSignature().toString(), joinPoint.getArgs()); String message = StrUtil.blankToDefault(signature.message(), GlobalErrorCodeConstants.BAD_REQUEST.getMsg()); @@ -47,25 +47,22 @@ public class SignatureAspect { } } - private boolean verifySignature(Signature signature, HttpServletRequest request) { + private boolean verifySignature(ApiSignature signature, HttpServletRequest request) { if (!verifyHeaders(signature, request)) { return false; } // 校验 appId 是否能获取到对应的 appSecret String appId = request.getHeader(signature.appId()); String appSecret = signatureRedisDAO.getAppSecret(appId); - Assert.notNull(appSecret, "找不到对应的 appSecret"); + Assert.notNull(appSecret, "[appId({})] 找不到对应的 appSecret", appId); // 请求头 SortedMap headersMap = getRequestHeaders(signature, request); - // 如:/user/{id} url 带有动态参数的情况 - String urlParams = signature.urlEnable() ? request.getServletPath() : ""; // 请求参数 String requestParams = getRequestParams(request); // 请求体 - String requestBody = getRequestBody(request); + String requestBody = ServletUtils.isJsonRequest(request) ? ServletUtils.getBody(request) : ""; // 生成服务端签名 - String serverSignature = SignUtil.signParamsSha256(headersMap, - urlParams + requestParams + requestBody + appSecret); + String serverSignature = SignUtil.signParamsSha256(headersMap, requestParams + requestBody + appSecret); // 客户端签名 String clientSignature = request.getHeader(signature.sign()); if (!StrUtil.equals(clientSignature, serverSignature)) { @@ -73,7 +70,7 @@ public class SignatureAspect { } String nonce = headersMap.get(signature.nonce()); // 将 nonce 记入缓存,防止重复使用(重点二:此处需要将 ttl 设定为允许 timestamp 时间差的值 x 2 ) - signatureRedisDAO.setNonce(nonce, signature.expireTime(), TimeUnit.MILLISECONDS); + signatureRedisDAO.setNonce(nonce, signature.timeout() * 2L, signature.timeUnit()); return true; } @@ -87,7 +84,7 @@ public class SignatureAspect { * @param signature signature * @param request request */ - private boolean verifyHeaders(Signature signature, HttpServletRequest request) { + private boolean verifyHeaders(ApiSignature signature, HttpServletRequest request) { String appId = request.getHeader(signature.appId()); if (StrUtil.isBlank(appId)) { return false; @@ -97,7 +94,7 @@ public class SignatureAspect { return false; } String nonce = request.getHeader(signature.nonce()); - if (StrUtil.isBlank(nonce) || nonce.length() < 10) { + if (StrUtil.isBlank(nonce) || StrUtil.length(nonce) < 10) { return false; } String sign = request.getHeader(signature.sign()); @@ -105,7 +102,7 @@ public class SignatureAspect { return false; } // 其他合法性校验 - long expireTime = signature.expireTime(); + long expireTime = signature.timeUnit().toMillis(signature.timeout()); long requestTimestamp = Long.parseLong(timestamp); // 检查 timestamp 是否超出允许的范围 (重点一:此处需要取绝对值) long timestampDisparity = Math.abs(System.currentTimeMillis() - requestTimestamp); @@ -122,7 +119,7 @@ public class SignatureAspect { * @param request request * @return signature params */ - private SortedMap getRequestHeaders(Signature signature, HttpServletRequest request) { + private SortedMap getRequestHeaders(ApiSignature signature, HttpServletRequest request) { SortedMap sortedMap = new TreeMap<>(); sortedMap.put(signature.appId(), request.getHeader(signature.appId())); sortedMap.put(signature.timestamp(), request.getHeader(signature.timestamp())); @@ -154,17 +151,5 @@ public class SignatureAspect { return queryString.substring(1); } - /** - * 获取请求体参数 - * - * @param request request - * @return body - */ - private String getRequestBody(HttpServletRequest request) { - CacheRequestBodyWrapper requestWrapper = new CacheRequestBodyWrapper(request); - // 获取 body - return new String(requestWrapper.getBody(), StandardCharsets.UTF_8); - } - } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java index d00fe7f8d1..326e238ee9 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/signature/core/redis/SignatureRedisDAO.java @@ -42,8 +42,7 @@ public class SignatureRedisDAO { } public void setNonce(String nonce, long time, TimeUnit timeUnit) { - // 将 nonce 记入缓存,防止重复使用(重点二:此处需要将 ttl 设定为允许 timestamp 时间差的值 x 2 ) - stringRedisTemplate.opsForValue().set(formatNonceKey(nonce), nonce, time * 2, timeUnit); + stringRedisTemplate.opsForValue().set(formatNonceKey(nonce), nonce, time, timeUnit); } private static String formatAppIdKey(String key) { diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index d7cd3a8830..6cab74e750 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,4 @@ cn.iocoder.yudao.framework.idempotent.config.YudaoIdempotentConfiguration cn.iocoder.yudao.framework.lock4j.config.YudaoLock4jConfiguration -cn.iocoder.yudao.framework.ratelimiter.config.YudaoRateLimiterConfiguration \ No newline at end of file +cn.iocoder.yudao.framework.ratelimiter.config.YudaoRateLimiterConfiguration +cn.iocoder.yudao.framework.signature.config.YudaoSignatureAutoConfiguration \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java index e181edeb4f..8e80fa591f 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java @@ -23,10 +23,6 @@ public class CacheRequestBodyWrapper extends HttpServletRequestWrapper { */ private final byte[] body; - public byte[] getBody() { - return body; - } - public CacheRequestBodyWrapper(HttpServletRequest request) { super(request); body = ServletUtils.getBodyBytes(request); -- Gitee From cfeb4bdca47f1ae807c86633ab82de83a8f95db2 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 28 May 2024 17:59:33 +0800 Subject: [PATCH 0622/1557] =?UTF-8?q?=E3=80=90=E6=B7=BB=E5=8A=A0=E3=80=91m?= =?UTF-8?q?idjourney=20job(=E5=90=8C=E6=AD=A5=20mj=20=E7=BB=93=E6=9E=9C)?= =?UTF-8?q?=20=E6=9C=AA=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-ai/yudao-module-ai-biz/pom.xml | 4 ++++ .../yudao/module/ai/job/MidjourneyJob.java | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java diff --git a/yudao-module-ai/yudao-module-ai-biz/pom.xml b/yudao-module-ai/yudao-module-ai-biz/pom.xml index d87818569e..3eb23d57f9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/pom.xml +++ b/yudao-module-ai/yudao-module-ai-biz/pom.xml @@ -47,6 +47,10 @@ cn.iocoder.boot yudao-spring-boot-starter-test + + cn.iocoder.boot + yudao-spring-boot-starter-job + diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java new file mode 100644 index 0000000000..71b3e7731f --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.ai.job; + +import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import org.springframework.stereotype.Component; + +/** + * midjourney job(同步 mj 结果) + * + * @author fansili + * @time 2024/5/28 17:57 + * @since 1.0 + */ +@Component +public class MidjourneyJob implements JobHandler { + + @Override + public String execute(String param) throws Exception { + // todo @范 同步 midjourney proxy 结果 + return ""; + } +} -- Gitee From d9ca52a478a4c56344b042914d3dfa548fdd29d3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 28 May 2024 20:04:21 +0800 Subject: [PATCH 0623/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9Areview=20simple=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E3=80=81seq=20=E8=BF=9E=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 4 +++- .../vo/model/simple/BpmSimpleModelNodeVO.java | 19 ++++++++++++++----- .../simple/BpmSimpleModelUpdateReqVO.java | 2 ++ .../flowable/core/util/SimpleModelUtils.java | 15 ++++++++++++++- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 8426d4482b..0f59baf5b7 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -30,6 +30,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { PARALLEL_BRANCH_JOIN_NODE(6, "并行分支聚合节点"), INCLUSIVE_BRANCH_FORK_NODE(7, "包容网关分叉节点"), INCLUSIVE_BRANCH_JOIN_NODE(8, "包容网关聚合节点"), + // TODO @jason:建议整合 join,最终只有 条件分支、并行分支、包容分支,三种~ ; public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); @@ -43,7 +44,8 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { * @param type 节点类型 */ public static boolean isBranchNode(Integer type) { - return Objects.equals(CONDITION_BRANCH_NODE.getType(), type) || Objects.equals(PARALLEL_BRANCH_FORK_NODE.getType(), type) + return Objects.equals(CONDITION_BRANCH_NODE.getType(), type) + || Objects.equals(PARALLEL_BRANCH_FORK_NODE.getType(), type) || Objects.equals(INCLUSIVE_BRANCH_FORK_NODE.getType(), type) ; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java index 4bc5ac85e4..5c2148707b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java @@ -28,16 +28,25 @@ public class BpmSimpleModelNodeVO { @Schema(description = "模型节点名称", example = "领导审批") private String name; + // TODO @jason:要不改成 placeholder 和一般 Element-Plus 组件一致。占位符,用于展示。 @Schema(description = "节点展示内容", example = "指定成员: 芋道源码") private String showText; - @Schema(description = "孩子节点") - private BpmSimpleModelNodeVO childNode; + @Schema(description = "子节点") + private BpmSimpleModelNodeVO childNode; // 补充说明:在该模型下,子节点有且仅有一个,不会有多个 - @Schema(description = "网关节点的条件节点") - private List conditionNodes; + @Schema(description = "条件节点") + private List conditionNodes; // 补充说明:有且仅有条件、并行、包容等分支会使用 @Schema(description = "节点的属性") - private Map attributes; + private Map attributes; // TODO @jason:建议是字段分拆下;类似说: + // Map formPermissions; 表单权限;仅发起、审批、抄送节点会使用 + // Integer approveMethod; 审批方式;仅审批节点会使用 + // TODO @芋艿:审批人的选择; + // TODO @芋艿:没有人的策略? + // TODO @芋艿:审批拒绝的策略? + // TODO @芋艿:配置的可操作列表? + // TODO @芋艿:超时配置;要支持指定时间点、指定时间间隔; + // TODO @芋艿:条件;建议可以固化的一些选项;然后有个表达式兜底;要支持 } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java index 20f3bf1b10..33d6a42480 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java @@ -6,6 +6,7 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; +// TODO @jason:需要考虑,如果某个节点的配置不正确,需要有提示;具体怎么实现,可以讨论下; @Schema(description = "管理后台 - 仿钉钉流程设计模型的新增/修改 Request VO") @Data public class BpmSimpleModelUpdateReqVO { @@ -14,6 +15,7 @@ public class BpmSimpleModelUpdateReqVO { @NotEmpty(message = "流程模型编号不能为空") private String modelId; // 对应 Flowable act_re_model 表 ID_ 字段 + // TODO @jason:simpleModel 要不? @Schema(description = "仿钉钉流程设计模型对象", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "仿钉钉流程设计模型对象不能为空") @Valid diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 8fa8da01e0..210c1eb700 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -92,11 +92,13 @@ public class SimpleModelUtils { private static void buildAndAddBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String targetId) { // 节点为 null 或者 为END_EVENT 退出 + // TODO @jason:isValidNode;然后把 END_NODE 是不是拿到 switch (nodeType) { 那 return 哈?这样出口更统一一点? if (node == null || node.getId() == null || END_NODE.getType().equals(node.getType())) { return; } BpmSimpleModelNodeVO childNode = node.getChildNode(); // 如果是网关分支节点. 后续节点可能为 null。但不是 END_EVENT 节点 + // TODO @芋艿:这个要不要挪到 START_NODE - INCLUSIVE_BRANCH_JOIN_NODE 待定;感觉 switch 那最终是分三个情况;branch、子节点、结束了;(每种情况的注释,需要写的更完整) if (!BpmSimpleModelNodeType.isBranchNode(node.getType()) && (childNode == null || childNode.getId() == null)) { SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetId, null, null, null); mainProcess.addFlowElement(sequenceFlow); @@ -104,6 +106,7 @@ public class SimpleModelUtils { } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); + // TODO @jason:下面的 PARALLEL_BRANCH_FORK_NODE、CONDITION_BRANCH_NODE、INCLUSIVE_BRANCH_FORK_NODE 是不是就是 isBranchNode?如果是的话,貌似不用 swtich,而是 if else 分类处理呢。 switch (nodeType) { case START_NODE: case APPROVE_NODE: @@ -119,17 +122,24 @@ public class SimpleModelUtils { case PARALLEL_BRANCH_FORK_NODE: case CONDITION_BRANCH_NODE: case INCLUSIVE_BRANCH_FORK_NODE: { + // TODO @jason:这里 sequenceFlowTargetId 不建议做这样的 default。万一可能有 bug 哈;直接弄到对应的 136- 146 会更安全一点。 String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? targetId : childNode.getId(); List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); for (BpmSimpleModelNodeVO item : conditionNodes) { + // 构建表达式 + // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 String conditionExpression = buildConditionExpression(item); + BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); + // TODO @jason:isValidNode if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { + // TODO @jason:会存在 item.name 未空的情况么?这个时候,要不要兜底处理拼接 SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), item.getId(), item.getName(), conditionExpression); mainProcess.addFlowElement(sequenceFlow); // 递归调用后续节点 + // TODO @jason:最好也有个例子,嘿嘿;S4 buildAndAddBpmnSequenceFlow(mainProcess, nextNodeOnCondition, sequenceFlowTargetId); } else { SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), sequenceFlowTargetId, @@ -137,7 +147,7 @@ public class SimpleModelUtils { mainProcess.addFlowElement(sequenceFlow); } } - // 递归调用后续节点 + // 递归调用后续节点 TODO @jason:最好有个例子哈 buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); break; } @@ -188,6 +198,9 @@ public class SimpleModelUtils { } private static SequenceFlow buildBpmnSequenceFlow(String sourceId, String targetId, String seqFlowId, String seqName, String conditionExpression) { + // TODO @jason:最好断言下,sourceId、targetId 必须存在! + // TODO @jason:如果 seqFlowId 不存在的时候,是不是要生成一个默认的 seqFlowId? + // TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); if (StrUtil.isNotEmpty(conditionExpression)) { sequenceFlow.setConditionExpression(conditionExpression); -- Gitee From 4932ce60d24e0b9615df4314927a2f14ecd5861a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 28 May 2024 22:09:35 +0800 Subject: [PATCH 0624/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9AAI=20=E7=BB=98=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/enums/AiImageStatusEnum.java | 2 + .../admin/image/AiImageController.java | 12 ++++++ .../module/ai/convert/AiImageConvert.java | 1 + .../ai/dal/dataobject/image/AiImageDO.java | 2 + .../ai/service/image/AiImageServiceImpl.java | 37 ++++++++++++------- 5 files changed, 40 insertions(+), 14 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java index a5231a3bf6..534ad7e3f9 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java @@ -14,6 +14,7 @@ import lombok.Getter; @Getter public enum AiImageStatusEnum { + // TODO @fan:改成 10 生成中;20 成功;30 失败;其它可以去掉噢 SUBMIT("submit", "提交任务"), WAITING("waiting", "等待"), IN_PROGRESS("in_progress", "进行中"), @@ -22,6 +23,7 @@ public enum AiImageStatusEnum { ; + // TODO @fan:final 一下 private String status; private String name; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index e64edec2cc..038b024545 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; // TODO @芋艿:整理接口定义 +// TODO @fan:参考 AiChatMessageController 改下 swagger 注解、注释 /** * ai作图 * @@ -28,20 +29,28 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @AllArgsConstructor public class AiImageController { + // TODO @fan:使用 @Resource 注入哈;然后 aiImageService => imageService; private final AiImageService aiImageService; + // TODO @fan:分页列表,建议是 getImagePage,包括接口 path 也建议改下哈; + // TODO @fan:@ModelAttribute 不需要哈; + // TODO @fan:这个要不搞成 my-page?因为是我的哈 @Operation(summary = "获取image列表", description = "dall3、midjourney") @GetMapping("/list") public CommonResult> list(@Validated @ModelAttribute AiImageListReqVO req) { + // TODO @fan:import static,这样只要 success() 就行啦 return CommonResult.success(aiImageService.list(req)); } + // TODO @fan:搞成 get-my? + // TODO @fan:方法名改下哈。 @Operation(summary = "获取image信息", description = "获取image信息") @GetMapping("/get") public CommonResult get(@RequestParam("id") Long id) { return CommonResult.success(aiImageService.get(id)); } + // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) { @@ -62,6 +71,7 @@ public class AiImageController { return success(null); } + // TODO @fan:要不先不要 midjourneyOperate、cancelMidjourney 接口哈 @Operation(summary = "取消 midjourney 绘画", description = "取消 midjourney 绘画") @PostMapping("/cancel-midjourney") public CommonResult cancelMidjourney(@RequestParam("id") Long id) { @@ -69,10 +79,12 @@ public class AiImageController { return success(null); } + // TODO @fan:delete-my?需要校验是不是当前人哈 @Operation(summary = "删除绘画记录", description = "") @DeleteMapping("/delete") public CommonResult delete(@RequestParam("id") Long id) { aiImageService.delete(id); return success(null); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java index 0f92710617..d094f489da 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java @@ -11,6 +11,7 @@ import org.mapstruct.factory.Mappers; import java.util.List; +// TODO @fan:convert 可以考虑去掉,使用 BeanUtils.copy 替代 /** * ai image convert * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index cb3aedda1e..eb901e23f8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -29,6 +29,8 @@ public class AiImageDO extends BaseDO { @Schema(description = "提示词") private String prompt; + // TODO @fan:要加一个平台字段;platform;因为一个平台,会有多种 model 模型; + @Schema(description = "模型 dall2/dall3、MJ、NIJI") private String model; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 6a0aea2998..77299fceb5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -39,6 +39,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +// TODO @fan:注释优化下哈 /** * ai 作图 * @@ -51,14 +52,23 @@ import java.util.concurrent.TimeUnit; @Slf4j public class AiImageServiceImpl implements AiImageService { + // TODO @fan:使用 @Resource 注入 + + // TODO @fan:imageMapper private final AiImageMapper aiImageMapper; + private final FileApi fileApi; + private final OpenAiImageClient openAiImageClient; + private final MidjourneyWebSocketStarter midjourneyWebSocketStarter; + private final MidjourneyInteractionsApi midjourneyInteractionsApi; + private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor( 3, 5, 1, TimeUnit.HOURS, new LinkedBlockingQueue<>(32)); + // TODO @fan:接 mj proxy @PostConstruct public void startMidjourney() { log.info("midjourney web socket starter..."); @@ -75,6 +85,7 @@ public class AiImageServiceImpl implements AiImageService { }); } + // TODO @fan:1)分页,然后 loginUser 通过参数传入,这样 Service 无状态;2)另外,返回 DO;VO 的翻译,交给 Controller;3:还有,使用 BeanUtils 替代哈 @Override public PageResult list(AiImageListReqVO req) { // 获取登录用户 @@ -92,29 +103,33 @@ public class AiImageServiceImpl implements AiImageService { return result; } + // TODO @fan:1)返回 DO;VO 的翻译,交给 Controller;2)还有,使用 BeanUtils 替代哈 @Override public AiImageListRespVO get(Long id) { AiImageDO aiImageDO = aiImageMapper.selectById(id); return AiImageConvert.INSTANCE.convertAiImageListRespVO(aiImageDO); } + // TODO @fan:1)loginUserId 通过 controller 传入; @Override public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 保存数据库 + // TODO @fan:1)使用 BeanUtils;2)使用链式调用哈; AiImageDO aiImageDO = AiImageConvert.INSTANCE.convertAiImageDO(req); aiImageDO.setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); aiImageDO.setUserId(loginUserId); aiImageMapper.insert(aiImageDO); // 异步执行 + // TODO @fan:使用 @Async 去调用哈; EXECUTOR.execute(() -> { try { - // 获取 model OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); // 转换openai 参数 + // TODO @fan:需要考虑,不同平台,参数不同; OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); openAiImageOptions.setModel(openAiImageModelEnum.getModel()); openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); @@ -125,23 +140,16 @@ public class AiImageServiceImpl implements AiImageService { // 图片保存到服务器 String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); // 更新数据库 - aiImageMapper.updateById( - new AiImageDO() - .setId(aiImageDO.getId()) - .setStatus(AiImageStatusEnum.COMPLETE.getStatus()) - .setPicUrl(filePath) - .setOriginalPicUrl(imageGeneration.getOutput().getUrl()) + aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) + .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl()) ); } catch (AiException aiException) { - // 更新错误信息 - aiImageMapper.updateById( - new AiImageDO() - .setId(aiImageDO.getId()) - .setStatus(AiImageStatusEnum.FAIL.getStatus()) - .setErrorMessage(aiException.getMessage()) - ); + // TODO @fan:错误日志,也打印下哈;因为 aiException.getMessage() 比较精简; + aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.FAIL.getStatus()) + .setErrorMessage(aiException.getMessage())); } }); + // TODO @fan:返回 id 就可以啦 // 转换 AiImageDallDrawingRespVO return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); } @@ -188,6 +196,7 @@ public class AiImageServiceImpl implements AiImageService { ); } + // TODO @fan:1)需要校验存在;2)需要校验属于我; @Override public void delete(Long id) { // 校验记录是否存在 -- Gitee From c7ee3dc2cd623148c0e56c5db5a9e76dbe138d00 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 29 May 2024 08:34:40 +0800 Subject: [PATCH 0625/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9AAI=20=E7=BB=98=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/dataobject/image/AiImageDO.java | 16 +++++++++++----- .../ai/service/image/AiImageServiceImpl.java | 3 +-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index eb901e23f8..2a21acd13b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -8,16 +8,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; +// TODO @fan:@time、@sine 注解可以不加哈 /** - * ai 绘画 + * AI 绘画 DO * * @author fansili * @time 2024/4/25 15:53 * @since 1.0 */ @Data -@Accessors(chain = true) -@TableName("ai_image") +@Accessors(chain = true) // TODO @fan:这个不用添加哈,全局的 lombok.config 搞啦 +@TableName("ai_image") // TODO @fan:建议放在 @Data 前面,因为它是关键注解,@Data 本质可悲替代 public class AiImageDO extends BaseDO { @TableId(type = IdType.AUTO) @@ -31,12 +32,14 @@ public class AiImageDO extends BaseDO { // TODO @fan:要加一个平台字段;platform;因为一个平台,会有多种 model 模型; - @Schema(description = "模型 dall2/dall3、MJ、NIJI") + @Schema(description = "模型") private String model; - @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") + // TODO @fan:这个记录到 db,要不改成 width、height?更明确的尺寸 + @Schema(description = "尺寸大小") private String size; + // TODO @fan:style 是所有模型都有么?如果不是,是不是靠 drawRequest 记录下就好了; @Schema(description = "风格") private String style; @@ -55,6 +58,9 @@ public class AiImageDO extends BaseDO { @Schema(description = "是否发布") private String publicStatus; + // TODO @fan:增加一个 Map 字段,drawRequest;用于记录请求模型的字段;对应的就是 ImageOptions + // TODO @fan:增加一个 Map 字段,记录 ImageResponseMetadata?这样 mjNonceId、mjOperationId、mjOperationName、mjOperations 这些字段,貌似可以收掉 + // ============ mj 需要字段 @Schema(description = "用户操作的Nonce编号(MJ返回)") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 77299fceb5..18b1ef0ea0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -141,8 +141,7 @@ public class AiImageServiceImpl implements AiImageService { String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); // 更新数据库 aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) - .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl()) - ); + .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl())); } catch (AiException aiException) { // TODO @fan:错误日志,也打印下哈;因为 aiException.getMessage() 比较精简; aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.FAIL.getStatus()) -- Gitee From 65a09182e714f25f8696300c14a06263f042ae4b Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Wed, 29 May 2024 09:48:28 +0800 Subject: [PATCH 0626/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=8A=82=E7=82=B9=E8=BF=9E=E7=BA=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/core/util/SimpleModelUtils.java | 163 ++++++++++++------ 1 file changed, 107 insertions(+), 56 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 210c1eb700..a5a25ca04c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -25,7 +25,7 @@ import java.util.Map; import java.util.Objects; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmBoundaryEventType.USER_TASK_TIMEOUT; -import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.END_NODE; +import static cn.iocoder.yudao.module.bpm.enums.definition.BpmSimpleModelNodeType.*; import static cn.iocoder.yudao.module.bpm.enums.definition.BpmUserTaskTimeoutActionEnum.AUTO_REMINDER; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.*; import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.SimpleModelConstants.*; @@ -84,78 +84,128 @@ public class SimpleModelUtils { EndEvent endEvent = (EndEvent) CollUtil.findOne(process.getFlowElements(), item -> item instanceof EndEvent); // 构建并添加节点之间的连线 Sequence Flow - buildAndAddBpmnSequenceFlow(process, simpleModelNode, endEvent.getId()); + traverseNodeToBuildSequenceFlow(process, simpleModelNode, endEvent.getId()); // 自动布局 new BpmnAutoLayout(bpmnModel).execute(); return bpmnModel; } - private static void buildAndAddBpmnSequenceFlow(Process mainProcess, BpmSimpleModelNodeVO node, String targetId) { - // 节点为 null 或者 为END_EVENT 退出 - // TODO @jason:isValidNode;然后把 END_NODE 是不是拿到 switch (nodeType) { 那 return 哈?这样出口更统一一点? - if (node == null || node.getId() == null || END_NODE.getType().equals(node.getType())) { + private static void traverseNodeToBuildSequenceFlow(Process process, BpmSimpleModelNodeVO node, String targetNodeId) { + // 1.无效节点返回 + if (!isValidNode(node)) { return; } - BpmSimpleModelNodeVO childNode = node.getChildNode(); + // 如果是网关分支节点. 后续节点可能为 null。但不是 END_EVENT 节点 - // TODO @芋艿:这个要不要挪到 START_NODE - INCLUSIVE_BRANCH_JOIN_NODE 待定;感觉 switch 那最终是分三个情况;branch、子节点、结束了;(每种情况的注释,需要写的更完整) - if (!BpmSimpleModelNodeType.isBranchNode(node.getType()) && (childNode == null || childNode.getId() == null)) { - SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetId, null, null, null); - mainProcess.addFlowElement(sequenceFlow); - return; - } + // TODO-DONE @芋艿:这个要不要挪到 START_NODE - INCLUSIVE_BRANCH_JOIN_NODE 待定;感觉 switch 那最终是分三个情况;branch、子节点、结束了;(每种情况的注释,需要写的更完整) +// if (!BpmSimpleModelNodeType.isBranchNode(node.getType()) && (childNode == null || childNode.getId() == null)) { +// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetNodeId, null, null, null); +// process.addFlowElement(sequenceFlow); +// return; +// } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); - // TODO @jason:下面的 PARALLEL_BRANCH_FORK_NODE、CONDITION_BRANCH_NODE、INCLUSIVE_BRANCH_FORK_NODE 是不是就是 isBranchNode?如果是的话,貌似不用 swtich,而是 if else 分类处理呢。 - switch (nodeType) { - case START_NODE: - case APPROVE_NODE: - case COPY_NODE: - case PARALLEL_BRANCH_JOIN_NODE: - case INCLUSIVE_BRANCH_JOIN_NODE: { + BpmSimpleModelNodeVO childNode = node.getChildNode(); + // 2.1 普通节点 + if (!BpmSimpleModelNodeType.isBranchNode(node.getType())) { + // 2.1.1 结束节点退出递归 + if (nodeType == END_NODE) { + return; + } + if (!isValidNode(childNode)) { + // 2.1.2 普通节点且无孩子节点。分两种情况 + // a.结束节点 b. 条件分支的最后一个节点.与分支节点的孩子节点或聚合节点建立连线。 + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetNodeId, null, null, null); + process.addFlowElement(sequenceFlow); + } else { + // 2.1.3 普通节点且有孩子节点。建立连线 SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null, null); - mainProcess.addFlowElement(sequenceFlow); + process.addFlowElement(sequenceFlow); // 递归调用后续节点 - buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); - break; + traverseNodeToBuildSequenceFlow(process, childNode, targetNodeId); } - case PARALLEL_BRANCH_FORK_NODE: - case CONDITION_BRANCH_NODE: - case INCLUSIVE_BRANCH_FORK_NODE: { - // TODO @jason:这里 sequenceFlowTargetId 不建议做这样的 default。万一可能有 bug 哈;直接弄到对应的 136- 146 会更安全一点。 - String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? targetId : childNode.getId(); - List conditionNodes = node.getConditionNodes(); - Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); - for (BpmSimpleModelNodeVO item : conditionNodes) { - // 构建表达式 - // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 - String conditionExpression = buildConditionExpression(item); - - BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); - // TODO @jason:isValidNode - if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { - // TODO @jason:会存在 item.name 未空的情况么?这个时候,要不要兜底处理拼接 - SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), - item.getId(), item.getName(), conditionExpression); - mainProcess.addFlowElement(sequenceFlow); - // 递归调用后续节点 - // TODO @jason:最好也有个例子,嘿嘿;S4 - buildAndAddBpmnSequenceFlow(mainProcess, nextNodeOnCondition, sequenceFlowTargetId); - } else { - SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), sequenceFlowTargetId, - item.getId(), item.getName(), conditionExpression); - mainProcess.addFlowElement(sequenceFlow); - } + } else { + // 2.2 分支节点 + List conditionNodes = node.getConditionNodes(); + Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空"); + // 4.1 分支节点,遍历分支节点. 如下情况: + // 分支1、A->B->C->D->E 和 分支2、A->D->E。 A为分支节点, D为A孩子节点 + // 分支终点节点, 1. 分支节点有孩子节点时为孩子节点 2. 当分支节点孩子为无效节点时。分支嵌套时并且为分支最后一个节点 + String branchEndNodeId = isValidNode(childNode) ? childNode.getId() : targetNodeId ; + for (BpmSimpleModelNodeVO item : conditionNodes) { + // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 + // 构建表达式 + String conditionExpression = buildConditionExpression(item); + BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); + // 4.2 分支有后续节点, 分支1: A->B->C->D + if (isValidNode(nextNodeOnCondition)) { + // 4.2.1 建立 A->B + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), + item.getId(), item.getName(), conditionExpression); + process.addFlowElement(sequenceFlow); + // 4.2.2 递归调用后续节点连线。 建立 B->C->D 的连线 + traverseNodeToBuildSequenceFlow(process, nextNodeOnCondition, branchEndNodeId); + } else { + // 4.3 分支无后续节点 建立 A->D + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), branchEndNodeId, + item.getId(), item.getName(), conditionExpression); + process.addFlowElement(sequenceFlow); } - // 递归调用后续节点 TODO @jason:最好有个例子哈 - buildAndAddBpmnSequenceFlow(mainProcess, childNode, targetId); - break; - } - default: { - // TODO 其它节点类型的实现 } + // 递归调用后续节点 继续递归建立 D->E 的连线 + traverseNodeToBuildSequenceFlow(process, childNode, targetNodeId); } + // TODO @jason:下面的 PARALLEL_BRANCH_FORK_NODE、CONDITION_BRANCH_NODE、INCLUSIVE_BRANCH_FORK_NODE 是不是就是 isBranchNode?如果是的话,貌似不用 swtich,而是 if else 分类处理呢。 +// switch (nodeType) { +// case START_NODE: +// case APPROVE_NODE: +// case COPY_NODE: +// case PARALLEL_BRANCH_JOIN_NODE: +// case INCLUSIVE_BRANCH_JOIN_NODE: { +// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null, null); +// process.addFlowElement(sequenceFlow); +// // 递归调用后续节点 +// buildAndAddBpmnSequenceFlow(process, childNode, targetNodeId); +// break; +// } +// case PARALLEL_BRANCH_FORK_NODE: +// case CONDITION_BRANCH_NODE: +// case INCLUSIVE_BRANCH_FORK_NODE: { +// // TODO @jason:这里 sequenceFlowTargetId 不建议做这样的 default。万一可能有 bug 哈;直接弄到对应的 136- 146 会更安全一点。 +// String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? targetNodeId : childNode.getId(); +// List conditionNodes = node.getConditionNodes(); +// Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); +// for (BpmSimpleModelNodeVO item : conditionNodes) { +// // 构建表达式 +// // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 +// String conditionExpression = buildConditionExpression(item); +// +// BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); +// // TODO @jason:isValidNode +// if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { +// // TODO @jason:会存在 item.name 未空的情况么?这个时候,要不要兜底处理拼接 +// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), +// item.getId(), item.getName(), conditionExpression); +// process.addFlowElement(sequenceFlow); +// // 递归调用后续节点 +// // TODO @jason:最好也有个例子,嘿嘿;S4 +// buildAndAddBpmnSequenceFlow(process, nextNodeOnCondition, sequenceFlowTargetId); +// } else { +// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), sequenceFlowTargetId, +// item.getId(), item.getName(), conditionExpression); +// process.addFlowElement(sequenceFlow); +// } +// } +// // 递归调用后续节点 TODO @jason:最好有个例子哈 +// buildAndAddBpmnSequenceFlow(process, childNode, targetNodeId); +// break; +// } +// default: { +// // TODO 其它节点类型的实现 +// } +// } + } /** @@ -283,6 +333,7 @@ public class SimpleModelUtils { list.add(parallelGateway); break; } + case INCLUSIVE_BRANCH_FORK_NODE: { InclusiveGateway inclusiveGateway = convertInclusiveBranchNode(node, Boolean.TRUE); list.add(inclusiveGateway); -- Gitee From 1b725fd517d729f34544f6330f6898d25efabab0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:19:22 +0800 Subject: [PATCH 0627/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20AI=20Image=20=E5=A2=9E=E8=82=8C=20draw=20r?= =?UTF-8?q?quest=20=E5=92=8C=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/dataobject/image/AiImageDO.java | 66 +++++++++---------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 2a21acd13b..d18d03d38f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -6,19 +6,16 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.experimental.Accessors; -// TODO @fan:@time、@sine 注解可以不加哈 +import java.util.Map; + /** * AI 绘画 DO * * @author fansili - * @time 2024/4/25 15:53 - * @since 1.0 */ +@TableName("ai_image") @Data -@Accessors(chain = true) // TODO @fan:这个不用添加哈,全局的 lombok.config 搞啦 -@TableName("ai_image") // TODO @fan:建议放在 @Data 前面,因为它是关键注解,@Data 本质可悲替代 public class AiImageDO extends BaseDO { @TableId(type = IdType.AUTO) @@ -30,50 +27,49 @@ public class AiImageDO extends BaseDO { @Schema(description = "提示词") private String prompt; - // TODO @fan:要加一个平台字段;platform;因为一个平台,会有多种 model 模型; + @Schema(description = "平台") + private String platform; @Schema(description = "模型") private String model; - // TODO @fan:这个记录到 db,要不改成 width、height?更明确的尺寸 - @Schema(description = "尺寸大小") - private String size; + @Schema(description = "图片宽度") + private String width; - // TODO @fan:style 是所有模型都有么?如果不是,是不是靠 drawRequest 记录下就好了; - @Schema(description = "风格") - private String style; - - @Schema(description = "图片地址(自己服务器)") - private String picUrl; + @Schema(description = "图片高度") + private String height; @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") private String status; - @Schema(description = "绘画图片地址(绘画好的服务器)") - private String originalPicUrl; - - @Schema(description = "绘画错误信息") - private String errorMessage; - @Schema(description = "是否发布") private String publicStatus; - // TODO @fan:增加一个 Map 字段,drawRequest;用于记录请求模型的字段;对应的就是 ImageOptions - // TODO @fan:增加一个 Map 字段,记录 ImageResponseMetadata?这样 mjNonceId、mjOperationId、mjOperationName、mjOperations 这些字段,貌似可以收掉 - - // ============ mj 需要字段 - - @Schema(description = "用户操作的Nonce编号(MJ返回)") - private String mjNonceId; + @Schema(description = "图片地址(自己服务器)") + private String picUrl; - @Schema(description = "用户操作的操作编号(MJ返回)") - private String mjOperationId; + @Schema(description = "绘画图片地址(绘画好的服务器)") + private String originalPicUrl; - @Schema(description = "用户操作的操作名字(MJ返回)") - private String mjOperationName; + @Schema(description = "绘画错误信息") + private String errorMessage; - @Schema(description = "mj图片生产成功保存的 components json 数组") - private String mjOperations; + // ============ 绘画请求参数 + + /** + * - style + */ + @Schema(description = "绘画请求参数") + private Map drawRequest; + + /** + * - mjNonceId + * - mjOperationId + * - mjOperationName + * - mjOperations + */ + @Schema(description = "绘画请求响应参数") + private Map drawResponse; } -- Gitee From 54b60cd564e25040b6996f7e0ada536ce0c7b194 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:29:32 +0800 Subject: [PATCH 0628/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E6=94=B9=20image=20controller=20=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 49 +++++++------------ 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 038b024545..f1decdc860 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -6,48 +6,33 @@ import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -// TODO @芋艿:整理接口定义 -// TODO @fan:参考 AiChatMessageController 改下 swagger 注解、注释 -/** - * ai作图 - * - * @author fansili - * @time 2024/4/25 15:49 - * @since 1.0 - */ -@Tag(name = "A10-ai作图") +@Tag(name = "管理后台 - Ai 绘画") @RestController @RequestMapping("/ai/image") @Slf4j -@AllArgsConstructor public class AiImageController { - // TODO @fan:使用 @Resource 注入哈;然后 aiImageService => imageService; - private final AiImageService aiImageService; + @Resource + private AiImageService aiImageService; - // TODO @fan:分页列表,建议是 getImagePage,包括接口 path 也建议改下哈; - // TODO @fan:@ModelAttribute 不需要哈; - // TODO @fan:这个要不搞成 my-page?因为是我的哈 - @Operation(summary = "获取image列表", description = "dall3、midjourney") - @GetMapping("/list") - public CommonResult> list(@Validated @ModelAttribute AiImageListReqVO req) { - // TODO @fan:import static,这样只要 success() 就行啦 - return CommonResult.success(aiImageService.list(req)); + @Operation(summary = "获取 - 我的分页列表", description = "dall3、midjourney") + @GetMapping("/my-page") + public CommonResult> myPage(@Validated AiImageListReqVO req) { + return success(aiImageService.list(req)); } - // TODO @fan:搞成 get-my? - // TODO @fan:方法名改下哈。 - @Operation(summary = "获取image信息", description = "获取image信息") - @GetMapping("/get") - public CommonResult get(@RequestParam("id") Long id) { - return CommonResult.success(aiImageService.get(id)); + @Operation(summary = "获取 - 我的 image 信息", description = "...") + @GetMapping("/get-my") + public CommonResult getMy(@RequestParam("id") Long id) { + return CommonResult.success(aiImageService.getMy(id)); } // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 @@ -79,11 +64,11 @@ public class AiImageController { return success(null); } - // TODO @fan:delete-my?需要校验是不是当前人哈 @Operation(summary = "删除绘画记录", description = "") - @DeleteMapping("/delete") - public CommonResult delete(@RequestParam("id") Long id) { - aiImageService.delete(id); + @DeleteMapping("/delete-my") + public CommonResult deleteMy(@RequestParam("id") Long id) { + Long loginUserId = getLoginUserId(); + aiImageService.deleteMy(id, loginUserId); return success(null); } -- Gitee From 1d538239829145b3ed25ae68e53350b472b631bc Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:30:22 +0800 Subject: [PATCH 0629/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91a?= =?UTF-8?q?i=20image=20=E5=88=A0=E9=99=A4=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index ca0af92f4e..da48c61e5f 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -40,4 +40,7 @@ public interface ErrorCodeConstants { ErrorCode AI_MIDJOURNEY_OPERATION_NOT_EXISTS = new ErrorCode(1_022_000_040, "midjourney 操作不存在!"); ErrorCode AI_MIDJOURNEY_MESSAGE_ID_INCORRECT = new ErrorCode(1_022_000_040, "midjourney message id 不正确!"); + // ========== API 绘画 1-040-005-000 ========== + + ErrorCode AI_IMAGE_NOT_CREATE_USER = new ErrorCode(1_022_005_000, "不是创建用户,不能删除 image!"); } -- Gitee From ed372cffc789a3fa5961f4deaa1bc2fee703f599 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:30:40 +0800 Subject: [PATCH 0630/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E6=94=B9=20ai=20image=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/enums/AiImageStatusEnum.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java index 534ad7e3f9..ad4ab4590a 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java @@ -14,19 +14,16 @@ import lombok.Getter; @Getter public enum AiImageStatusEnum { - // TODO @fan:改成 10 生成中;20 成功;30 失败;其它可以去掉噢 - SUBMIT("submit", "提交任务"), - WAITING("waiting", "等待"), - IN_PROGRESS("in_progress", "进行中"), - COMPLETE("complete", "完成"), - FAIL("fail", "失败"), + IN_PROGRESS("10", "进行中"), + COMPLETE("20", "完成"), + FAIL("30", "失败"), ; // TODO @fan:final 一下 - private String status; + private final String status; - private String name; + private final String name; public static AiImageStatusEnum valueOfStatus(String status) { -- Gitee From f347b15a1e5a98118e535b5e92340a1e292bb001 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:32:00 +0800 Subject: [PATCH 0631/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E5=88=A0=E9=99=A4=20mj=20=E7=9B=B8=E5=85=B3=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E6=8A=BD=E7=A6=BB=E5=88=B0=20drawRequest=20?= =?UTF-8?q?=E5=92=8C=20drwaResponse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/mysql/image/AiImageMapper.java | 3 +- .../ai/service/image/AiImageService.java | 5 +- .../ai/service/image/AiImageServiceImpl.java | 61 +++++++++++-------- .../YuDaoMidjourneyMessageHandler.java | 9 +-- 4 files changed, 44 insertions(+), 34 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index 9e75cb4369..6cf8a80e7d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -24,7 +24,8 @@ public interface AiImageMapper extends BaseMapperX { * @param aiImageDO */ default void updateByMjNonce(Long mjNonceId, AiImageDO aiImageDO) { - this.update(aiImageDO, new LambdaQueryWrapperX().eq(AiImageDO::getMjNonceId, mjNonceId)); +// this.update(aiImageDO, new LambdaQueryWrapperX().eq(AiImageDO::getMjNonceId, mjNonceId)); + return; } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 1d4e24764a..68543e50b9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -26,7 +26,7 @@ public interface AiImageService { * @param id * @return */ - AiImageListRespVO get(Long id); + AiImageListRespVO getMy(Long id); /** * ai绘画 - dall2/dall3 绘画 @@ -54,7 +54,8 @@ public interface AiImageService { * 删除 - image 记录 * * @param id + * @param loginUserId */ - void delete(Long id); + void deleteMy(Long id, Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 18b1ef0ea0..87e0fa2ff0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -39,6 +39,9 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + + // TODO @fan:注释优化下哈 /** * ai 作图 @@ -105,7 +108,7 @@ public class AiImageServiceImpl implements AiImageService { // TODO @fan:1)返回 DO;VO 的翻译,交给 Controller;2)还有,使用 BeanUtils 替代哈 @Override - public AiImageListRespVO get(Long id) { + public AiImageListRespVO getMy(Long id) { AiImageDO aiImageDO = aiImageMapper.selectById(id); return AiImageConvert.INSTANCE.convertAiImageListRespVO(aiImageDO); } @@ -172,34 +175,37 @@ public class AiImageServiceImpl implements AiImageService { @Transactional(rollbackFor = Exception.class) @Override public void midjourneyOperate(AiImageMidjourneyOperateReqVO req) { - // 校验是否存在 - AiImageDO aiImageDO = validateExists(req.getId()); - // 获取 midjourneyOperations - List midjourneyOperations = getMidjourneyOperations(aiImageDO); - // 校验 OperateId 是否存在 - AiImageMidjourneyOperationsVO midjourneyOperationsVO = validateMidjourneyOperationsExists(midjourneyOperations, req.getOperateId()); - // 校验 messageId - validateMessageId(aiImageDO.getMjNonceId(), req.getMessageId()); - // 获取 mjOperationName - String mjOperationName = midjourneyOperationsVO.getLabel(); - // 保存一个 image 任务记录 - // todo -// doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), -// null, null, AiImageStatusEnum.SUBMIT, null, -// req.getMessageId(), req.getOperateId(), mjOperationName); - // 提交操作 - midjourneyInteractionsApi.reRoll( - new ReRollReq() - .setCustomId(req.getOperateId()) - .setMessageId(req.getMessageId()) - ); +// // 校验是否存在 +// AiImageDO aiImageDO = validateExists(req.getId()); +// // 获取 midjourneyOperations +// List midjourneyOperations = getMidjourneyOperations(aiImageDO); +// // 校验 OperateId 是否存在 +// AiImageMidjourneyOperationsVO midjourneyOperationsVO = validateMidjourneyOperationsExists(midjourneyOperations, req.getOperateId()); +// // 校验 messageId +// validateMessageId(aiImageDO.getMjNonceId(), req.getMessageId()); +// // 获取 mjOperationName +// String mjOperationName = midjourneyOperationsVO.getLabel(); +// // 保存一个 image 任务记录 +// // todo +//// doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), +//// null, null, AiImageStatusEnum.SUBMIT, null, +//// req.getMessageId(), req.getOperateId(), mjOperationName); +// // 提交操作 +// midjourneyInteractionsApi.reRoll( +// new ReRollReq() +// .setCustomId(req.getOperateId()) +// .setMessageId(req.getMessageId()) +// ); } // TODO @fan:1)需要校验存在;2)需要校验属于我; @Override - public void delete(Long id) { + public void deleteMy(Long id, Long loginUserId) { // 校验记录是否存在 AiImageDO aiImageDO = validateExists(id); + if (!aiImageDO.getUserId().equals(loginUserId)) { + throw exception(ErrorCodeConstants.AI_IMAGE_NOT_CREATE_USER); + } // 删除记录 aiImageMapper.deleteById(id); } @@ -221,10 +227,11 @@ public class AiImageServiceImpl implements AiImageService { private List getMidjourneyOperations(AiImageDO aiImageDO) { - if (StrUtil.isBlank(aiImageDO.getMjOperations())) { - return Collections.emptyList(); - } - return JsonUtils.parseArray(aiImageDO.getMjOperations(), AiImageMidjourneyOperationsVO.class); +// if (StrUtil.isBlank(aiImageDO.getMjOperations())) { +// return Collections.emptyList(); +// } +// return JsonUtils.parseArray(aiImageDO.getMjOperations(), AiImageMidjourneyOperationsVO.class); + return null; } private AiImageDO validateExists(Long id) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 7b95b968e1..6235a9bd7e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -96,9 +96,10 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { drawingStatusEnum = AiImageStatusEnum.COMPLETE; } else if (MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus().equals(generateStatus)) { drawingStatusEnum = AiImageStatusEnum.IN_PROGRESS; - } else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiImageStatusEnum.WAITING; } +// else if (MidjourneyGennerateStatusEnum.WAITING.getStatus().equals(generateStatus)) { +// drawingStatusEnum = AiImageStatusEnum.WAITING; +// } // 获取 midjourneyOperations List midjourneyOperations = getMidjourneyOperationsList(midjourneyMessage); // 更新数据库 @@ -106,8 +107,8 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { new AiImageDO() .setOriginalPicUrl(imageUrl) .setStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) - .setMjNonceId(midjourneyMessage.getId()) - .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) +// .setMjNonceId(midjourneyMessage.getId()) +// .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) ); } -- Gitee From e4a0512b5185f99cb88576d0f062a61c477eef0b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:53:37 +0800 Subject: [PATCH 0632/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91A?= =?UTF-8?q?I=20Image=20=E5=88=86=E9=A1=B5=E5=88=97=E8=A1=A8=E3=80=81get-my?= =?UTF-8?q?=20=E8=BF=94=E5=9B=9E=20resp=20=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 4 +- .../admin/image/vo/AiImageDallRespVO.java | 60 +++++++++++----- .../admin/image/vo/AiImageListReqVO.java | 2 +- .../admin/image/vo/AiImageListRespVO.java | 70 ++++++++++--------- .../ai/dal/dataobject/image/AiImageDO.java | 4 ++ .../ai/service/image/AiImageService.java | 2 +- .../ai/service/image/AiImageServiceImpl.java | 2 +- 7 files changed, 88 insertions(+), 56 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index f1decdc860..6d15798e4e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -38,8 +38,8 @@ public class AiImageController { // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") - public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) { - return aiImageService.dallDrawing(req); + public AiImageDallRespVO dall(@Validated @RequestBody AiImageDallReqVO req) { + return aiImageService.dall(req); } @Operation(summary = "midjourney绘画", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java index 18c27a64fc..934141339f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; import lombok.Data; import lombok.experimental.Accessors; +import java.util.Map; + /** * dall2/dall2 绘画 * @@ -17,31 +17,57 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class AiImageDallRespVO { - @Schema(description = "提示词") - @NotNull(message = "提示词不能为空!") - @Size(max = 1200, message = "提示词最大1200") + @Schema(description = "id编号", example = "1") + private Long id; + + @Schema(description = "用户id", example = "1") + private Long userId; + + @Schema(description = "提示词", example = "南极的小企鹅") private String prompt; - @Schema(description = "模型") - @NotNull(message = "模型不能为空") + @Schema(description = "平台", example = "openai") + private String platform; + + @Schema(description = "模型", example = "dall2") private String model; - @Schema(description = "风格") - private String style; + @Schema(description = "图片宽度", example = "1024") + private String width; + + @Schema(description = "图片高度", example = "1024") + private String height; - @Schema(description = "图片size 1024x1024 ...") - private String size; + @Schema(description = "绘画状态:10 进行中、20 绘画完成、30 绘画失败", example = "10") + private String status; - @Schema(description = "图片地址(自己服务器)") + @Schema(description = "是否发布", example = "public") + private String publicStatus; + + @Schema(description = "图片地址(自己服务器)", example = "http://") private String picUrl; - @Schema(description = "可以访问图像的URL。") + @Schema(description = "绘画图片地址(绘画好的服务器)", example = "http://") private String originalPicUrl; - @Schema(description = "图片base64。") - private String base64; - - @Schema(description = "错误信息。") + @Schema(description = "绘画错误信息", example = "图片错误信息") private String errorMessage; + // ============ 绘画请求参数 + + /** + * - style + */ + @Schema(description = "绘画请求参数") + private Map drawRequest; + + /** + * - mjNonceId + * - mjOperationId + * - mjOperationName + * - mjOperations + */ + @Schema(description = "绘画请求响应参数") + private Map drawResponse; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java index e75ebb4b3b..6af9803638 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java @@ -5,7 +5,7 @@ import lombok.Data; import lombok.experimental.Accessors; /** - * midjourney req + * AI Image 我的图片列表 req * * @author fansili * @time 2024/4/28 17:42 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java index 8e41f5a872..c0bb207734 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java @@ -10,6 +10,7 @@ import lombok.Data; import lombok.experimental.Accessors; import java.time.LocalDateTime; +import java.util.Map; /** * midjourney req @@ -22,56 +23,57 @@ import java.time.LocalDateTime; @Accessors(chain = true) public class AiImageListRespVO extends PageParam { + @Schema(description = "id编号", example = "1") private Long id; - @Schema(description = "用户id") + @Schema(description = "用户id", example = "1") private Long userId; - @Schema(description = "提示词") + @Schema(description = "提示词", example = "南极的小企鹅") private String prompt; - @Schema(description = "模型 dall2/dall3、MJ、NIJI") - private String model; + @Schema(description = "平台", example = "openai") + private String platform; - @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") - private String size; + @Schema(description = "模型", example = "dall2") + private String model; - @Schema(description = "风格") - private String style; + @Schema(description = "图片宽度", example = "1024") + private String width; - @Schema(description = "图片地址(自己服务器)") - private String picUrl; + @Schema(description = "图片高度", example = "1024") + private String height; - @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") + @Schema(description = "绘画状态:10 进行中、20 绘画完成、30 绘画失败", example = "10") private String status; - @Schema(description = "绘画图片地址(绘画好的服务器)") - private String originalPicUrl; - - @Schema(description = "绘画错误信息") - private String errorMessage; - - @Schema(description = "是否发布") + @Schema(description = "是否发布", example = "public") private String publicStatus; - @Schema(description = "创建时间") - private LocalDateTime createTime; - - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - // ============ mj 需要字段 - - @Schema(description = "用户操作的Nonce编号(MJ返回)") - private String mjNonceId; + @Schema(description = "图片地址(自己服务器)", example = "http://") + private String picUrl; - @Schema(description = "用户操作的操作编号(MJ返回)") - private String mjOperationId; + @Schema(description = "绘画图片地址(绘画好的服务器)", example = "http://") + private String originalPicUrl; - @Schema(description = "用户操作的操作名字(MJ返回)") - private String mjOperationName; + @Schema(description = "绘画错误信息", example = "图片错误信息") + private String errorMessage; - @Schema(description = "mj图片生产成功保存的 components json 数组") - private String mjOperations; + // ============ 绘画请求参数 + + /** + * - style + */ + @Schema(description = "绘画请求参数") + private Map drawRequest; + + /** + * - mjNonceId + * - mjOperationId + * - mjOperationName + * - mjOperations + */ + @Schema(description = "绘画请求响应参数") + private Map drawResponse; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index d18d03d38f..1474fc683f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -2,8 +2,10 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.image; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -60,6 +62,7 @@ public class AiImageDO extends BaseDO { * - style */ @Schema(description = "绘画请求参数") + @TableField(typeHandler = JacksonTypeHandler.class) private Map drawRequest; /** @@ -69,6 +72,7 @@ public class AiImageDO extends BaseDO { * - mjOperations */ @Schema(description = "绘画请求响应参数") + @TableField(typeHandler = JacksonTypeHandler.class) private Map drawResponse; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 68543e50b9..2ffd722402 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -33,7 +33,7 @@ public interface AiImageService { * * @param req */ - AiImageDallRespVO dallDrawing(AiImageDallReqVO req); + AiImageDallRespVO dall(AiImageDallReqVO req); /** * midjourney 图片生成 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 87e0fa2ff0..93c1e51f08 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -115,7 +115,7 @@ public class AiImageServiceImpl implements AiImageService { // TODO @fan:1)loginUserId 通过 controller 传入; @Override - public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) { + public AiImageDallRespVO dall(AiImageDallReqVO req) { Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); // 保存数据库 // TODO @fan:1)使用 BeanUtils;2)使用链式调用哈; -- Gitee From e582aaad2eeabe4411eec239b67a83c02ee72325 Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Wed, 29 May 2024 15:17:15 +0800 Subject: [PATCH 0633/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9Asuno=E9=9F=B3=E4=B9=90=E7=94=9F=E6=88=90=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/music/MusicController.java | 31 +++++++++ .../admin/music/vo/MusicDataVO.java | 64 +++++++++++++++++++ .../controller/admin/music/vo/SunoReqVO.java | 40 ++++++++++++ .../controller/admin/music/vo/SunoRespVO.java | 29 +++++++++ .../module/ai/service/music/MusicService.java | 19 ++++++ .../ai/service/music/MusicServiceImpl.java | 25 ++++++++ .../ai/config/YudaoAiAutoConfiguration.java | 17 +++-- .../ai/config/YudaoAiProperties.java | 11 ++++ .../ai/core/model/suno/SunoConfig.java | 21 ++++++ .../ai/core/model/suno/{ => api}/SunoApi.java | 32 ++++++---- .../yudao/framework/ai/suno/SunoTests.java | 19 ++++-- .../src/main/resources/application.yaml | 3 + 12 files changed, 287 insertions(+), 24 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/MusicController.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicService.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java rename yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/{ => api}/SunoApi.java (79%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/MusicController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/MusicController.java new file mode 100644 index 0000000000..ae66d71aa7 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/MusicController.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.ai.controller.admin.music; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoRespVO; +import cn.iocoder.yudao.module.ai.service.music.MusicService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - AI 音乐生成") +@RestController +@RequestMapping("/ai/music") +@RequiredArgsConstructor +public class MusicController { + + private final MusicService musicService; + + @PostMapping("/suno-gen") + @Operation(summary = "音乐生成") + public CommonResult musicGen(@RequestBody @Valid SunoReqVO sunoReqVO) { + return success(musicService.musicGen(sunoReqVO)); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java new file mode 100644 index 0000000000..ce372aff94 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.ai.controller.admin.music.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 表示单个音乐数据的类 + */ +@Data +public class MusicDataVO { + /** + * 音乐数据的 ID + */ + private String id; + + /** + * 音乐音频的标题 + */ + private String title; + + /** + * 音乐音频的图片 URL + */ + @JsonProperty("image_url") + private String imageUrl; + + /** + * 音乐音频的歌词 + */ + private String lyric; + + /** + * 音乐音频的 URL + */ + @JsonProperty("audio_url") + private String audioUrl; + + /** + * 音乐视频的 URL + */ + @JsonProperty("video_url") + private String videoUrl; + + /** + * 音乐音频的创建时间 + */ + @JsonProperty("created_at") + private String createdAt; + + /** + * 使用的模型名称 + */ + private String model; + + /** + * 生成音乐音频的提示 + */ + private String prompt; + + /** + * 音乐音频的风格 + */ + private String style; +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoReqVO.java new file mode 100644 index 0000000000..ae40cf5402 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoReqVO.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.ai.controller.admin.music.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class SunoReqVO { + /** + * 用于生成音乐音频的提示 + */ + private String prompt; + + /** + * 用于生成音乐音频的歌词 + */ + private String lyric; + + /** + * 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 + */ + private boolean custom; + + /** + * 音乐音频的标题 + */ + private String title; + + /** + * 音乐音频的风格 + */ + private String style; + + /** + * 音乐音频生成后回调的 URL + */ + private String callbackUrl; +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java new file mode 100644 index 0000000000..bbb4264c77 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.ai.controller.admin.music.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * API 响应的数据 + */ +@Data +public class SunoRespVO { + /** + * 表示请求是否成功 + */ + private boolean success; + + /** + * 任务 ID + */ + @JsonProperty("task_id") + private String taskId; + + /** + * 音乐数据列表 + */ + private List data; + +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicService.java new file mode 100644 index 0000000000..c0e7b34f18 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicService.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.ai.service.music; + +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoRespVO; + +/** + * @Author xiaoxin + * @Date 2024/5/29 + */ +public interface MusicService { + + /** + * 音乐生成 + * + * @param sunoReqVO 请求实体 + * @return 响应实体 + */ + SunoRespVO musicGen(SunoReqVO sunoReqVO); +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java new file mode 100644 index 0000000000..64173d2dc4 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.ai.service.music; + +import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoRespVO; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +/** + * @Author xiaoxin + * @Date 2024/5/29 + */ +@Service +@RequiredArgsConstructor +public class MusicServiceImpl implements MusicService { + + private final SunoApi sunoApi; + + @Override + public SunoRespVO musicGen(SunoReqVO sunoReqVO) { + SunoApi.SunoRequest req = BeanUtils.toBean(sunoReqVO, SunoApi.SunoRequest.class); + return BeanUtils.toBean(sunoApi.musicGen(req), SunoRespVO.class); + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 55705c40ff..5472e2fafe 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.framework.ai.config; import cn.hutool.core.io.IoUtil; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactoryImpl; +import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; @@ -13,18 +15,14 @@ import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.NotNull; import org.springframework.ai.models.midjourney.MidjourneyConfig; import org.springframework.ai.models.midjourney.MidjourneyMessage; import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; import org.springframework.ai.models.midjourney.webSocket.listener.MidjourneyMessageListener; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; -import org.springframework.ai.openai.OpenAiImageClient; -import org.springframework.ai.openai.OpenAiImageOptions; -import org.springframework.ai.openai.api.OpenAiImageApi; -import org.springframework.ai.retry.RetryUtils; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -150,6 +148,13 @@ public class YudaoAiAutoConfiguration { return new MidjourneyInteractionsApi(midjourneyConfig); } + @Bean + @ConditionalOnProperty(value = "yudao.ai.suno.enable", havingValue = "true") + public SunoApi sunoApi(YudaoAiProperties yudaoAiProperties) { + // 创建 sunoApi + return new SunoApi(new SunoConfig(yudaoAiProperties.getSuno().getToken())); + } + private static @NotNull MidjourneyConfig getMidjourneyConfig(ApplicationContext applicationContext, YudaoAiProperties.MidjourneyProperties midjourneyProperties) { Map requestTemplates = new HashMap<>(); diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 16a6bc40ee..4a7dd69de6 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -26,6 +26,7 @@ public class YudaoAiProperties { private YiYanProperties yiyan; private OpenAiImageProperties openAiImage; private MidjourneyProperties midjourney; + private SunoProperties suno; @Data @Accessors(chain = true) @@ -134,4 +135,14 @@ public class YudaoAiProperties { */ private String channelId; } + + @Data + @Accessors(chain = true) + public static class SunoProperties { + private boolean enable = false; + /** + * token + */ + private String token; + } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java new file mode 100644 index 0000000000..0d717f6cd4 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.framework.ai.core.model.suno; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +/** + * @Author xiaoxin + * @Date 2024/5/29 + */ +@Data +@Accessors(chain = true) +@NoArgsConstructor +@AllArgsConstructor +public class SunoConfig { + /** + * token信息 + */ + private String token; +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java similarity index 79% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java index 0198197f1c..5da45fceda 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java @@ -1,9 +1,10 @@ -package cn.iocoder.yudao.framework.ai.core.model.suno; +package cn.iocoder.yudao.framework.ai.core.model.suno.api; +import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; import lombok.Data; import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; @@ -23,21 +24,26 @@ public class SunoApi { public static final String APPLICATION_JSON = "application/json"; public static final String TOKEN_PREFIX = "Bearer "; public static final String API_URL = "https://api.acedata.cloud/suno/audios"; - public static final String TEST_TOKEN = "13f13540dd3f4ae9885f63ac9f5d0b9f"; private static final int READ_TIMEOUT = 160; // 连接超时时间(秒),音乐生成时间较长,设置为 160s,后续可做callback private final OkHttpClient client; - private final ObjectMapper objectMapper; - public SunoApi() { - this.client = new OkHttpClient().newBuilder().readTimeout(READ_TIMEOUT, TimeUnit.SECONDS).build(); - this.objectMapper = new ObjectMapper(); + + public SunoApi(SunoConfig sunoConfig) { + this.client = new OkHttpClient().newBuilder().readTimeout(READ_TIMEOUT, TimeUnit.SECONDS) + .addInterceptor(chain -> { + Request originalRequest = chain.request(); + Request requestWithUserAgent = originalRequest.newBuilder() + .header("Authorization", TOKEN_PREFIX + sunoConfig.getToken()) + .build(); + return chain.proceed(requestWithUserAgent); + }) + .build(); } - public SunoResponse generateMusic(SunoRequest sunoRequest) throws IOException { + public SunoResponse musicGen(SunoRequest sunoRequest) { Request request = new Request.Builder() .url(API_URL) - .header("Authorization", TOKEN_PREFIX + TEST_TOKEN) - .post(RequestBody.create(MediaType.parse(APPLICATION_JSON), objectMapper.writeValueAsString(sunoRequest))) + .post(RequestBody.create(MediaType.parse(APPLICATION_JSON), JsonUtils.toJsonString(sunoRequest))) .build(); try (Response response = client.newCall(request).execute()) { @@ -45,7 +51,9 @@ public class SunoApi { log.error("suno调用失败! response: {}", response); throw new IllegalStateException("suno调用失败!" + response); } - return objectMapper.readValue(response.body().string(), SunoResponse.class); + return JsonUtils.parseObject(response.body().string(), SunoResponse.class); + } catch (IOException ioException) { + throw new RuntimeException(ioException); } } @@ -90,7 +98,7 @@ public class SunoApi { /** - * API 响应的数据 + * SunoAPI 响应的数据 */ @Data public static class SunoResponse { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java index 30883a6e1e..58d1609f79 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -1,24 +1,31 @@ package cn.iocoder.yudao.framework.ai.suno; -import cn.iocoder.yudao.framework.ai.core.model.suno.SunoApi; +import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import org.junit.Before; import org.junit.Test; -import java.io.IOException; - /** * @Author xiaoxin * @Date 2024/5/27 */ public class SunoTests { + private SunoConfig sunoConfig; + + @Before + public void setup() { + String token = "13f13540dd3f4ae9885f63ac9f5d0b9f"; + this.sunoConfig = new SunoConfig(token); + } @Test - public void generateMusic() throws IOException { - SunoApi sunoApi = new SunoApi(); + public void generateMusic() { + SunoApi sunoApi = new SunoApi(sunoConfig); SunoApi.SunoRequest sunoRequest = new SunoApi .SunoRequest() .setPrompt("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); - SunoApi.SunoResponse sunoResponse = sunoApi.generateMusic(sunoRequest); + SunoApi.SunoResponse sunoResponse = sunoApi.musicGen(sunoRequest); System.out.println(sunoResponse); } } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 37e0f5b59f..417787ba4c 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -199,6 +199,9 @@ yudao.ai: token: MTE4MjE3MjY2MjkxNTY3ODIzOA.GEV1SG.c49F8lZoGCUHwsj8O0UdodmM6nyQHvuD2fXflw guild-id: 1237948819677904956 channel-id: 1237948819677904960 + suno: + enable: true + token: 13f13540dd3f4ae9885f63ac9f5d0b9f --- #################### 芋道相关配置 #################### -- Gitee From 342f603964aae28373f2cc830d4c164238e2fc39 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 30 May 2024 09:35:23 +0800 Subject: [PATCH 0634/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9AAI=20=E7=BB=98=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/ErrorCodeConstants.java | 2 ++ .../module/ai/enums/AiImageStatusEnum.java | 26 +++++++++---------- .../admin/image/AiImageController.java | 13 +++++++--- .../admin/image/vo/AiImageDallRespVO.java | 7 ++--- .../admin/image/vo/AiImageListRespVO.java | 3 +++ .../ai/dal/dataobject/image/AiImageDO.java | 13 ++++++---- .../ai/dal/mysql/image/AiImageMapper.java | 6 ++--- .../ai/service/image/AiImageServiceImpl.java | 6 +++-- 8 files changed, 46 insertions(+), 30 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index da48c61e5f..5ec26f7edf 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -42,5 +42,7 @@ public interface ErrorCodeConstants { // ========== API 绘画 1-040-005-000 ========== + // TODO @fan:这个直接返回找不到图片就好了 ErrorCode AI_IMAGE_NOT_CREATE_USER = new ErrorCode(1_022_005_000, "不是创建用户,不能删除 image!"); + } diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java index ad4ab4590a..39df7b1a8f 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java @@ -4,11 +4,9 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * ai绘画状态 + * AI 绘画状态的枚举 * * @author fansili - * @time 2024/4/28 17:05 - * @since 1.0 */ @AllArgsConstructor @Getter @@ -16,22 +14,24 @@ public enum AiImageStatusEnum { IN_PROGRESS("10", "进行中"), COMPLETE("20", "完成"), - FAIL("30", "失败"), + FAIL("30", "失败"); - ; - - // TODO @fan:final 一下 + /** + * 状态 + */ private final String status; - + /** + * 状态名 + */ private final String name; - public static AiImageStatusEnum valueOfStatus(String status) { - for (AiImageStatusEnum itemEnum : AiImageStatusEnum.values()) { - if (itemEnum.getStatus().equals(status)) { - return itemEnum; + for (AiImageStatusEnum statusEnum : AiImageStatusEnum.values()) { + if (statusEnum.getStatus().equals(status)) { + return statusEnum; } } - throw new IllegalArgumentException("Invalid MessageType value: " + status); + throw new IllegalArgumentException("未知会话状态: " + status); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 6d15798e4e..cee0954ce6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; @@ -23,13 +24,15 @@ public class AiImageController { @Resource private AiImageService aiImageService; - @Operation(summary = "获取 - 我的分页列表", description = "dall3、midjourney") + // TODO @fan:方法名叫做,getImagePageMy ;我们的命名,还是以动名词哈。不考虑省略名词的原因,是担心一个 Service 扩多个模块,纯粹动词无法表达 + @Operation(summary = "获取【我的】绘图分页") @GetMapping("/my-page") public CommonResult> myPage(@Validated AiImageListReqVO req) { return success(aiImageService.list(req)); } - @Operation(summary = "获取 - 我的 image 信息", description = "...") + // TODO @fan:类似 /my-page 的建议 + @Operation(summary = "获取【我的】绘图记录", description = "...") @GetMapping("/get-my") public CommonResult getMy(@RequestParam("id") Long id) { return CommonResult.success(aiImageService.getMy(id)); @@ -64,9 +67,13 @@ public class AiImageController { return success(null); } - @Operation(summary = "删除绘画记录", description = "") + // TODO @fan:类似 /my-page 的建议 + // TODO @fan:目前如果没结果,返回 Boolean 哈 + @Operation(summary = "删除【我的】绘画记录") @DeleteMapping("/delete-my") + @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") public CommonResult deleteMy(@RequestParam("id") Long id) { + // TODO @fan:这种一次性的 loginUserId,可以不用定义变量,直接当参数传递 Long loginUserId = getLoginUserId(); aiImageService.deleteMy(id, loginUserId); return success(null); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java index 934141339f..a687192e6d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java @@ -44,17 +44,18 @@ public class AiImageDallRespVO { @Schema(description = "是否发布", example = "public") private String publicStatus; - @Schema(description = "图片地址(自己服务器)", example = "http://") + @Schema(description = "图片地址(自己服务器)", example = "https://") private String picUrl; - @Schema(description = "绘画图片地址(绘画好的服务器)", example = "http://") + @Schema(description = "绘画图片地址(绘画好的服务器)", example = "https://") private String originalPicUrl; @Schema(description = "绘画错误信息", example = "图片错误信息") private String errorMessage; - // ============ 绘画请求参数 + // ============ 绘画请求参数 ============ + // todo @fan:下面的 style、mjNonceId 直接就不用注释啦,直接去看 DO 完事哈 /** * - style */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java index c0bb207734..1ee14cb890 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java @@ -12,6 +12,7 @@ import lombok.experimental.Accessors; import java.time.LocalDateTime; import java.util.Map; +// TODO @fan:可以考虑,复用 AiImageDallRespVO,统一成 AIImageRespVO /** * midjourney req * @@ -61,6 +62,8 @@ public class AiImageListRespVO extends PageParam { // ============ 绘画请求参数 + // todo @fan:下面的 style、mjNonceId 直接就不用注释啦,直接去看 DO 完事哈 + /** * - style */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 1474fc683f..259215cdc1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -20,10 +20,12 @@ import java.util.Map; @Data public class AiImageDO extends BaseDO { + // TODO @fan:1)使用 java 注释哈,不要注解。2)关联、枚举字段,要关联到对应类,参考 AiChatMessageDO 的注释 + @TableId(type = IdType.AUTO) private Long id; - @Schema(description = "用户id") + @Schema(description = "用户编号") private Long userId; @Schema(description = "提示词") @@ -41,6 +43,7 @@ public class AiImageDO extends BaseDO { @Schema(description = "图片高度") private String height; + // TODO @fan:这种就注释绘画状态,然后枚举类关联下就好啦 @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") private String status; @@ -53,10 +56,7 @@ public class AiImageDO extends BaseDO { @Schema(description = "绘画图片地址(绘画好的服务器)") private String originalPicUrl; - @Schema(description = "绘画错误信息") - private String errorMessage; - - // ============ 绘画请求参数 + // ============ 绘画请求参数 ============ /** * - style @@ -75,5 +75,8 @@ public class AiImageDO extends BaseDO { @TableField(typeHandler = JacksonTypeHandler.class) private Map drawResponse; + @Schema(description = "绘画错误信息") + private String errorMessage; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index 6cf8a80e7d..f60668d218 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -7,16 +7,14 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * ai image + * AI 绘图 Mapper * * @author fansili - * @time 2024/4/28 14:01 - * @since 1.0 */ @Mapper public interface AiImageMapper extends BaseMapperX { - + // TODO @fan:这个建议,直接使用 update,service 拼接要改的状态哈 /** * 更新 - 根据 messageId * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 93c1e51f08..1cce116427 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -200,10 +200,12 @@ public class AiImageServiceImpl implements AiImageService { // TODO @fan:1)需要校验存在;2)需要校验属于我; @Override - public void deleteMy(Long id, Long loginUserId) { + public void deleteMy(Long id, Long userId) { // 校验记录是否存在 + // TODO @fan:aiImageDO 这种命名 image 就 ok 拉,更简洁 + // TODO @fan:下面这个,可以返回图片不存在 AiImageDO aiImageDO = validateExists(id); - if (!aiImageDO.getUserId().equals(loginUserId)) { + if (!aiImageDO.getUserId().equals(userId)) { throw exception(ErrorCodeConstants.AI_IMAGE_NOT_CREATE_USER); } // 删除记录 -- Gitee From aea4f465ee73f8e1f5bc1f8d52be6b65dbcd08e0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:12:25 +0800 Subject: [PATCH 0635/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?i=20Image=20=E5=A2=9E=E5=8A=A0=20PublicStatus=20=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/enums/AiImagePublicStatusEnum.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java new file mode 100644 index 0000000000..3a7762bb7d --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ai绘画 public 状态 + * + * @author fansili + * @time 2024/4/28 17:05 + * @since 1.0 + */ +@AllArgsConstructor +@Getter +public enum AiImagePublicStatusEnum { + + PRIVATE("private", "私有"), + PUBLIC("public", "公开"), + + ; + + // TODO @fan:final 一下 + private final String status; + + private final String name; + + + public static AiImagePublicStatusEnum valueOfStatus(String status) { + for (AiImagePublicStatusEnum itemEnum : AiImagePublicStatusEnum.values()) { + if (itemEnum.getStatus().equals(status)) { + return itemEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + status); + } +} -- Gitee From 92ee6659961d0ff65eb247a0b6f66a13e17e6b59 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:14:00 +0800 Subject: [PATCH 0636/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=20Image=20=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/AiCommonConstants.java | 9 ++- .../admin/image/vo/AiImageDallRespVO.java | 74 ------------------- 2 files changed, 7 insertions(+), 76 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java index 2bd71376b2..01b57733e0 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java @@ -10,7 +10,12 @@ package cn.iocoder.yudao.module.ai; public class AiCommonConstants { /** - * 对话 - 默认 title + * 绘画 request - style */ - public static final String CONVERSATION_DEFAULT_TITLE = "新增对话"; + public static final String DRAW_REQ_KEY_STYLE = "style"; + /** + * dall size - 模板(1024x1024) + */ + public static final String DALL_SIZE_TEMPLATE = "%sx%s"; + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java deleted file mode 100644 index a687192e6d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallRespVO.java +++ /dev/null @@ -1,74 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.image.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.Map; - -/** - * dall2/dall2 绘画 - * - * @author fansili - * @time 2024/4/25 16:24 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiImageDallRespVO { - - @Schema(description = "id编号", example = "1") - private Long id; - - @Schema(description = "用户id", example = "1") - private Long userId; - - @Schema(description = "提示词", example = "南极的小企鹅") - private String prompt; - - @Schema(description = "平台", example = "openai") - private String platform; - - @Schema(description = "模型", example = "dall2") - private String model; - - @Schema(description = "图片宽度", example = "1024") - private String width; - - @Schema(description = "图片高度", example = "1024") - private String height; - - @Schema(description = "绘画状态:10 进行中、20 绘画完成、30 绘画失败", example = "10") - private String status; - - @Schema(description = "是否发布", example = "public") - private String publicStatus; - - @Schema(description = "图片地址(自己服务器)", example = "https://") - private String picUrl; - - @Schema(description = "绘画图片地址(绘画好的服务器)", example = "https://") - private String originalPicUrl; - - @Schema(description = "绘画错误信息", example = "图片错误信息") - private String errorMessage; - - // ============ 绘画请求参数 ============ - - // todo @fan:下面的 style、mjNonceId 直接就不用注释啦,直接去看 DO 完事哈 - /** - * - style - */ - @Schema(description = "绘画请求参数") - private Map drawRequest; - - /** - * - mjNonceId - * - mjOperationId - * - mjOperationName - * - mjOperations - */ - @Schema(description = "绘画请求响应参数") - private Map drawResponse; - -} -- Gitee From 8b1e1c047bf6c6334b3bd6ed17c1dc20d7677b83 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:14:34 +0800 Subject: [PATCH 0637/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=20=E5=A4=84=E7=90=86=20dall=20=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E8=B0=83=E7=94=A8=EF=BC=8C=E9=87=87=E7=94=A8=20@Async?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/image/AiImageServiceImpl.java | 181 ++++++++---------- 1 file changed, 82 insertions(+), 99 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 1cce116427..a3494fb20f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,56 +1,51 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.core.exception.AiException; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; -import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; +import cn.iocoder.yudao.module.ai.enums.AiImagePublicStatusEnum; import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; import cn.iocoder.yudao.module.infra.api.file.FileApi; +import com.google.common.collect.ImmutableMap; import jakarta.annotation.PostConstruct; -import lombok.AllArgsConstructor; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.ai.image.ImageGeneration; import org.springframework.ai.image.ImagePrompt; import org.springframework.ai.image.ImageResponse; import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; -import org.springframework.ai.models.midjourney.api.req.ReRollReq; import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; -import org.springframework.ai.models.midjourney.webSocket.WssNotify; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Collections; import java.util.List; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; // TODO @fan:注释优化下哈 + /** - * ai 作图 + * AI 绘画(接入 dall2/dall3、midjourney) * * @author fansili * @time 2024/4/25 15:51 * @since 1.0 */ -@AllArgsConstructor @Service @Slf4j public class AiImageServiceImpl implements AiImageService { @@ -58,102 +53,92 @@ public class AiImageServiceImpl implements AiImageService { // TODO @fan:使用 @Resource 注入 // TODO @fan:imageMapper - private final AiImageMapper aiImageMapper; - - private final FileApi fileApi; - - private final OpenAiImageClient openAiImageClient; - - private final MidjourneyWebSocketStarter midjourneyWebSocketStarter; - - private final MidjourneyInteractionsApi midjourneyInteractionsApi; - - private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor( - 3, 5, 1, TimeUnit.HOURS, new LinkedBlockingQueue<>(32)); + @Resource + private AiImageMapper imageMapper; + @Resource + private FileApi fileApi; + @Resource + private OpenAiImageClient openAiImageClient; + @Resource + private MidjourneyWebSocketStarter midjourneyWebSocketStarter; + @Resource + private MidjourneyInteractionsApi midjourneyInteractionsApi; // TODO @fan:接 mj proxy @PostConstruct public void startMidjourney() { - log.info("midjourney web socket starter..."); - midjourneyWebSocketStarter.start(new WssNotify() { - @Override - public void notify(int code, String message) { - log.info("code: {}, message: {}", code, message); - if (message.contains("Authentication failed")) { - // TODO 芋艿,这里看怎么处理,token无效的时候会认证失败! - // 认证失败 - log.error("midjourney socket 认证失败,检查token是否失效!"); - } - } - }); + // todo @fan 暂时注释掉 +// log.info("midjourney web socket starter..."); +// midjourneyWebSocketStarter.start(new WssNotify() { +// @Override +// public void notify(int code, String message) { +// log.info("code: {}, message: {}", code, message); +// if (message.contains("Authentication failed")) { +// // TODO 芋艿,这里看怎么处理,token无效的时候会认证失败! +// // 认证失败 +// log.error("midjourney socket 认证失败,检查token是否失效!"); +// } +// } +// }); } - // TODO @fan:1)分页,然后 loginUser 通过参数传入,这样 Service 无状态;2)另外,返回 DO;VO 的翻译,交给 Controller;3:还有,使用 BeanUtils 替代哈 @Override - public PageResult list(AiImageListReqVO req) { - // 获取登录用户 - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + public PageResult getImagePageMy(Long loginUserId, AiImageListReqVO req) { // 查询当前用户下所有的绘画记录 - PageResult pageResult = aiImageMapper.selectPage(req, + return imageMapper.selectPage(req, new LambdaQueryWrapperX() .eq(AiImageDO::getUserId, loginUserId) - .orderByDesc(AiImageDO::getId) - ); - // 转换 PageResult 返回 - PageResult result = new PageResult<>(); - result.setTotal(pageResult.getTotal()); - result.setList(AiImageConvert.INSTANCE.convertAiImageListRespVO(pageResult.getList())); - return result; + .orderByDesc(AiImageDO::getId)); } - // TODO @fan:1)返回 DO;VO 的翻译,交给 Controller;2)还有,使用 BeanUtils 替代哈 @Override - public AiImageListRespVO getMy(Long id) { - AiImageDO aiImageDO = aiImageMapper.selectById(id); - return AiImageConvert.INSTANCE.convertAiImageListRespVO(aiImageDO); + public AiImageDO getMy(Long id) { + return imageMapper.selectById(id); } - // TODO @fan:1)loginUserId 通过 controller 传入; @Override - public AiImageDallRespVO dall(AiImageDallReqVO req) { - Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + public Long dall(Long loginUserId, AiImageDallReqVO req) { // 保存数据库 - // TODO @fan:1)使用 BeanUtils;2)使用链式调用哈; - AiImageDO aiImageDO = AiImageConvert.INSTANCE.convertAiImageDO(req); - aiImageDO.setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); - aiImageDO.setUserId(loginUserId); - aiImageMapper.insert(aiImageDO); + AiImageDO aiImageDO = BeanUtils.toBean(req, AiImageDO.class) + .setUserId(loginUserId) + .setWidth(req.getWidth()) + .setHeight(req.getHeight()) + .setDrawRequest(ImmutableMap.of(AiCommonConstants.DRAW_REQ_KEY_STYLE, req.getStyle())) + .setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()) + .setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); + imageMapper.insert(aiImageDO); // 异步执行 - // TODO @fan:使用 @Async 去调用哈; - EXECUTOR.execute(() -> { - try { - // 获取 model - OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); - OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); - - // 转换openai 参数 - // TODO @fan:需要考虑,不同平台,参数不同; - OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageModelEnum.getModel()); - openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); - openAiImageOptions.setSize(req.getSize()); - ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); - // 发送 - ImageGeneration imageGeneration = imageResponse.getResult(); - // 图片保存到服务器 - String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); - // 更新数据库 - aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) - .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl())); - } catch (AiException aiException) { - // TODO @fan:错误日志,也打印下哈;因为 aiException.getMessage() 比较精简; - aiImageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.FAIL.getStatus()) - .setErrorMessage(aiException.getMessage())); - } - }); - // TODO @fan:返回 id 就可以啦 + doDall(aiImageDO, req); // 转换 AiImageDallDrawingRespVO - return AiImageConvert.INSTANCE.convertAiImageDallDrawingRespVO(aiImageDO); + return aiImageDO.getId(); + } + + @Async + public void doDall(AiImageDO aiImageDO, AiImageDallReqVO req) { + try { + // 获取 model + OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); + OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); + + // 转换openai 参数 + // TODO @fan:需要考虑,不同平台,参数不同; + OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); + openAiImageOptions.setModel(openAiImageModelEnum.getModel()); + openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); + openAiImageOptions.setSize(String.format(AiCommonConstants.DALL_SIZE_TEMPLATE, req.getWidth(), req.getHeight())); + ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); + // 发送 + ImageGeneration imageGeneration = imageResponse.getResult(); + // 图片保存到服务器 + String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); + // 更新数据库 + imageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) + .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl())); + } catch (AiException aiException) { + // TODO @fan:错误日志,也打印下哈;因为 aiException.getMessage() 比较精简; + imageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.FAIL.getStatus()) + .setErrorMessage(aiException.getMessage())); + } } @Override @@ -198,18 +183,16 @@ public class AiImageServiceImpl implements AiImageService { // ); } - // TODO @fan:1)需要校验存在;2)需要校验属于我; @Override public void deleteMy(Long id, Long userId) { - // 校验记录是否存在 - // TODO @fan:aiImageDO 这种命名 image 就 ok 拉,更简洁 - // TODO @fan:下面这个,可以返回图片不存在 - AiImageDO aiImageDO = validateExists(id); - if (!aiImageDO.getUserId().equals(userId)) { - throw exception(ErrorCodeConstants.AI_IMAGE_NOT_CREATE_USER); + // 校验是否存在,并获取 image + AiImageDO image = validateExists(id); + // 是否属于当前用户 + if (!image.getUserId().equals(userId)) { + throw exception(ErrorCodeConstants.AI_IMAGE_NOT_EXISTS); } // 删除记录 - aiImageMapper.deleteById(id); + imageMapper.deleteById(id); } private void validateMessageId(String mjMessageId, String messageId) { @@ -237,7 +220,7 @@ public class AiImageServiceImpl implements AiImageService { } private AiImageDO validateExists(Long id) { - AiImageDO aiImageDO = aiImageMapper.selectById(id); + AiImageDO aiImageDO = imageMapper.selectById(id); if (aiImageDO == null) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); } -- Gitee From 26616ea7a7deca95dafceaed6a246ffebf6d686b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:15:02 +0800 Subject: [PATCH 0638/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E5=B0=86=20login=20user=20=E9=80=9A=E8=BF=87=20contro?= =?UTF-8?q?ller=20=E4=BC=A0=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 28 ++++++++++++------- .../ai/service/image/AiImageService.java | 14 +++++++--- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index cee0954ce6..e847cc193e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -24,25 +26,33 @@ public class AiImageController { @Resource private AiImageService aiImageService; - // TODO @fan:方法名叫做,getImagePageMy ;我们的命名,还是以动名词哈。不考虑省略名词的原因,是担心一个 Service 扩多个模块,纯粹动词无法表达 @Operation(summary = "获取【我的】绘图分页") @GetMapping("/my-page") - public CommonResult> myPage(@Validated AiImageListReqVO req) { - return success(aiImageService.list(req)); + public CommonResult> getImagePageMy(@Validated AiImageListReqVO req) { + // 转换 resp + PageResult pageResult = aiImageService.getImagePageMy(getLoginUserId(), req); + // 转换 PageResult 返回 + PageResult result = new PageResult<>(); + result.setTotal(pageResult.getTotal()); + result.setList(BeanUtils.toBean(pageResult.getList(), AiImagePageMyRespVO.class)); + return success(result); } // TODO @fan:类似 /my-page 的建议 @Operation(summary = "获取【我的】绘图记录", description = "...") @GetMapping("/get-my") - public CommonResult getMy(@RequestParam("id") Long id) { - return CommonResult.success(aiImageService.getMy(id)); + public CommonResult getMy(@RequestParam("id") Long id) { + // 获取 image 信息 + AiImageDO imageDO = aiImageService.getMy(id); + // 转 resp 并返回 + return CommonResult.success(BeanUtils.toBean(imageDO, AiImagePageMyRespVO.class)); } // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") - public AiImageDallRespVO dall(@Validated @RequestBody AiImageDallReqVO req) { - return aiImageService.dall(req); + public CommonResult dall(@Validated @RequestBody AiImageDallReqVO req) { + return success(aiImageService.dall(getLoginUserId(), req)); } @Operation(summary = "midjourney绘画", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") @@ -73,9 +83,7 @@ public class AiImageController { @DeleteMapping("/delete-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") public CommonResult deleteMy(@RequestParam("id") Long id) { - // TODO @fan:这种一次性的 loginUserId,可以不用定义变量,直接当参数传递 - Long loginUserId = getLoginUserId(); - aiImageService.deleteMy(id, loginUserId); + aiImageService.deleteMy(id, getLoginUserId()); return success(null); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 2ffd722402..7cb44fa5b9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -1,7 +1,11 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperateReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; +import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; /** * ai 作图 @@ -15,10 +19,11 @@ public interface AiImageService { /** * ai绘画 - 列表 * + * @param loginUserId * @param req * @return */ - PageResult list(AiImageListReqVO req); + PageResult getImagePageMy(Long loginUserId, AiImageListReqVO req); /** * 获取 - image 信息 @@ -26,14 +31,15 @@ public interface AiImageService { * @param id * @return */ - AiImageListRespVO getMy(Long id); + AiImageDO getMy(Long id); /** * ai绘画 - dall2/dall3 绘画 * + * @param loginUserId * @param req */ - AiImageDallRespVO dall(AiImageDallReqVO req); + Long dall(Long loginUserId, AiImageDallReqVO req); /** * midjourney 图片生成 -- Gitee From c808453c1dc7213e4b94113f7f21c3fcc735c4ca Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:16:40 +0800 Subject: [PATCH 0639/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91i?= =?UTF-8?q?mage=20=E8=BF=94=E5=9B=9E=E7=9A=84size=20=E6=94=B9=E4=B8=BA=20w?= =?UTF-8?q?idth=20=E5=92=8C=20height?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/image/vo/AiImageDallReqVO.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java index ef91618708..ad4512832d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java @@ -29,8 +29,12 @@ public class AiImageDallReqVO { @Schema(description = "图像生成的风格。可为vivid(生动)或natural(自然)") private String style; - @Schema(description = "生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") - @NotNull(message = "size不能为空!") - private String size; + @Schema(description = "图片高度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") + @NotNull(message = "图片高度不能为空!") + private String height; + + @Schema(description = "图片宽度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") + @NotNull(message = "图片宽度不能为空!") + private String width; } -- Gitee From 2eade5ad5bcbacfd0f23fb0b4272866c5883284d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:17:14 +0800 Subject: [PATCH 0640/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=20image=20=E4=B8=8D=E5=AD=98=E5=9C=A8=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java index 5ec26f7edf..f0833b71f5 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java @@ -42,7 +42,6 @@ public interface ErrorCodeConstants { // ========== API 绘画 1-040-005-000 ========== - // TODO @fan:这个直接返回找不到图片就好了 - ErrorCode AI_IMAGE_NOT_CREATE_USER = new ErrorCode(1_022_005_000, "不是创建用户,不能删除 image!"); + ErrorCode AI_IMAGE_NOT_EXISTS = new ErrorCode(1_022_005_000, "image 不存在!"); } -- Gitee From 1c0cf4b860596de08a88602b2e3b8725b6f46502 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:18:55 +0800 Subject: [PATCH 0641/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91=E6=89=80=E6=9C=89=E8=BD=AC=E6=8D=A2=E9=83=BD=E4=B8=8D?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=20convert=20=E9=87=87=E7=94=A8=20BeanUtils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stRespVO.java => AiImagePageMyRespVO.java} | 7 +- .../module/ai/convert/AiImageConvert.java | 74 ------------------- .../YuDaoMidjourneyMessageHandler.java | 33 ++++----- 3 files changed, 16 insertions(+), 98 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageListRespVO.java => AiImagePageMyRespVO.java} (87%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java similarity index 87% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java index 1ee14cb890..e542879ca2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java @@ -1,15 +1,10 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.time.LocalDateTime; import java.util.Map; // TODO @fan:可以考虑,复用 AiImageDallRespVO,统一成 AIImageRespVO @@ -22,7 +17,7 @@ import java.util.Map; */ @Data @Accessors(chain = true) -public class AiImageListRespVO extends PageParam { +public class AiImagePageMyRespVO extends PageParam { @Schema(description = "id编号", example = "1") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java deleted file mode 100644 index d094f489da..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/convert/AiImageConvert.java +++ /dev/null @@ -1,74 +0,0 @@ -package cn.iocoder.yudao.module.ai.convert; - -import org.springframework.ai.models.midjourney.MidjourneyMessage; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; -import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -// TODO @fan:convert 可以考虑去掉,使用 BeanUtils.copy 替代 -/** - * ai image convert - * - * @author fansili - * @time 2024/4/18 16:39 - * @since 1.0 - */ -@Mapper -public interface AiImageConvert { - - AiImageConvert INSTANCE = Mappers.getMapper(AiImageConvert.class); - - /** - * 转换 - AiImageDallDrawingRespVO - * - * @param req - * @return - */ - AiImageDallRespVO convertAiImageDallDrawingRespVO(AiImageDO req); - - /** - * 转换 - AiImageDallDrawingRespVO - * - * @param req - * @return - */ - AiImageDallRespVO convertAiImageDallDrawingRespVO(AiImageDallReqVO req); - - /** - * 转换 - AiImageListRespVO - * - * @param list - * @return - */ - List convertAiImageListRespVO(List list); - - /** - * 转换 - AiImageListRespVO - * - * @param aiImageDO - * @return - */ - AiImageListRespVO convertAiImageListRespVO(AiImageDO aiImageDO); - - /** - * 转换 - AiImageMidjourneyOperationsVO - * - * @param component - * @return - */ - AiImageMidjourneyOperationsVO convertAiImageMidjourneyOperationsVO(MidjourneyMessage.Component component); - - /** - * 转换 - AiImageDO - * - * @param req - * @return - */ - AiImageDO convertAiImageDO(AiImageDallReqVO req); -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 6235a9bd7e..0568bbec66 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -2,23 +2,19 @@ package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import org.springframework.ai.models.midjourney.MidjourneyMessage; -import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; -import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; -import cn.iocoder.yudao.module.ai.convert.AiImageConvert; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; +import com.alibaba.fastjson.JSON; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.models.midjourney.MidjourneyMessage; +import org.springframework.ai.models.midjourney.constants.MidjourneyGennerateStatusEnum; +import org.springframework.ai.models.midjourney.webSocket.MidjourneyMessageHandler; import org.springframework.stereotype.Component; -import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; /** * yudao message handler @@ -113,15 +109,16 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { } private List getMidjourneyOperationsList(MidjourneyMessage midjourneyMessage) { - // 为空直接返回 - if (CollUtil.isEmpty(midjourneyMessage.getComponents())) { - return Collections.emptyList(); - } - // 将 component 转成 AiImageMidjourneyOperationsVO - return midjourneyMessage.getComponents().stream() - .map(componentType -> componentType.getComponents().stream() - .map(AiImageConvert.INSTANCE::convertAiImageMidjourneyOperationsVO) - .collect(Collectors.toList())) - .toList().stream().flatMap(List::stream).toList(); +// // 为空直接返回 +// if (CollUtil.isEmpty(midjourneyMessage.getComponents())) { +// return Collections.emptyList(); +// } +// // 将 component 转成 AiImageMidjourneyOperationsVO +// return midjourneyMessage.getComponents().stream() +// .map(componentType -> componentType.getComponents().stream() +// .map(AiImageConvert.INSTANCE::convertAiImageMidjourneyOperationsVO) +// .collect(Collectors.toList())) +// .toList().stream().flatMap(List::stream).toList(); + return null; } } -- Gitee From bde1eede2a863f0a0bce8e7954f1cefd65e271ed Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:22:06 +0800 Subject: [PATCH 0642/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91image=20delete-my=20=E5=88=A0=E9=99=A4=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20boolean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/admin/image/AiImageController.java | 6 ++---- .../yudao/module/ai/service/image/AiImageService.java | 2 +- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index e847cc193e..8b279e484f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -78,13 +78,11 @@ public class AiImageController { } // TODO @fan:类似 /my-page 的建议 - // TODO @fan:目前如果没结果,返回 Boolean 哈 @Operation(summary = "删除【我的】绘画记录") @DeleteMapping("/delete-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") - public CommonResult deleteMy(@RequestParam("id") Long id) { - aiImageService.deleteMy(id, getLoginUserId()); - return success(null); + public CommonResult deleteMy(@RequestParam("id") Long id) { + return success(aiImageService.deleteMy(id, getLoginUserId())); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 7cb44fa5b9..6a374178ae 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -62,6 +62,6 @@ public interface AiImageService { * @param id * @param loginUserId */ - void deleteMy(Long id, Long loginUserId); + Boolean deleteMy(Long id, Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index a3494fb20f..fc23ed6fba 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -184,7 +184,7 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public void deleteMy(Long id, Long userId) { + public Boolean deleteMy(Long id, Long userId) { // 校验是否存在,并获取 image AiImageDO image = validateExists(id); // 是否属于当前用户 @@ -192,7 +192,7 @@ public class AiImageServiceImpl implements AiImageService { throw exception(ErrorCodeConstants.AI_IMAGE_NOT_EXISTS); } // 删除记录 - imageMapper.deleteById(id); + return imageMapper.deleteById(id) > 0; } private void validateMessageId(String mjMessageId, String messageId) { -- Gitee From 0d4b67a9c458d26a6450348eba9bd75b1200e548 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:23:26 +0800 Subject: [PATCH 0643/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91image=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20my=20delete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/image/AiImageController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 8b279e484f..e9e35352e5 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -77,12 +77,11 @@ public class AiImageController { return success(null); } - // TODO @fan:类似 /my-page 的建议 @Operation(summary = "删除【我的】绘画记录") - @DeleteMapping("/delete-my") + @DeleteMapping("/my-delete") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") - public CommonResult deleteMy(@RequestParam("id") Long id) { - return success(aiImageService.deleteMy(id, getLoginUserId())); + public CommonResult myDelete(@RequestParam("id") Long id) { + return success(aiImageService.myDelete(id, getLoginUserId())); } } -- Gitee From 610badf503e0fbebb0e9a7a6bd7830429058c2d0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:23:32 +0800 Subject: [PATCH 0644/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91image=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20my=20delete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/ai/service/image/AiImageService.java | 2 +- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 6a374178ae..3d8c30d491 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -62,6 +62,6 @@ public interface AiImageService { * @param id * @param loginUserId */ - Boolean deleteMy(Long id, Long loginUserId); + Boolean myDelete(Long id, Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index fc23ed6fba..6e0ede4704 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -184,7 +184,7 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public Boolean deleteMy(Long id, Long userId) { + public Boolean myDelete(Long id, Long userId) { // 校验是否存在,并获取 image AiImageDO image = validateExists(id); // 是否属于当前用户 -- Gitee From 5d8aedbe9bbdfc15c25f89eebf4552566e77baf4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 10:26:23 +0800 Subject: [PATCH 0645/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91image=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/admin/image/AiImageController.java | 6 +++--- .../yudao/module/ai/service/image/AiImageService.java | 2 +- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index e9e35352e5..dc7d80c2b3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -78,10 +78,10 @@ public class AiImageController { } @Operation(summary = "删除【我的】绘画记录") - @DeleteMapping("/my-delete") + @DeleteMapping("/delete-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") - public CommonResult myDelete(@RequestParam("id") Long id) { - return success(aiImageService.myDelete(id, getLoginUserId())); + public CommonResult deleteMyById(@RequestParam("id") Long id) { + return success(aiImageService.deleteMyById(id, getLoginUserId())); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 3d8c30d491..1569ce05d4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -62,6 +62,6 @@ public interface AiImageService { * @param id * @param loginUserId */ - Boolean myDelete(Long id, Long loginUserId); + Boolean deleteMyById(Long id, Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 6e0ede4704..337d9fa4b7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -184,7 +184,7 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public Boolean myDelete(Long id, Long userId) { + public Boolean deleteMyById(Long id, Long userId) { // 校验是否存在,并获取 image AiImageDO image = validateExists(id); // 是否属于当前用户 -- Gitee From 347824c985a3b53d7a91bfa2fb25c465682187db Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 11:05:44 +0800 Subject: [PATCH 0646/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91image=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/controller/admin/image/AiImageController.java | 7 +++---- .../yudao/module/ai/service/image/AiImageService.java | 2 +- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index dc7d80c2b3..4dc66a644b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -78,10 +78,9 @@ public class AiImageController { } @Operation(summary = "删除【我的】绘画记录") - @DeleteMapping("/delete-my") + @DeleteMapping("/delete-id-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") - public CommonResult deleteMyById(@RequestParam("id") Long id) { - return success(aiImageService.deleteMyById(id, getLoginUserId())); + public CommonResult deleteIdMy(@RequestParam("id") Long id) { + return success(aiImageService.deleteIdMy(id, getLoginUserId())); } - } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 1569ce05d4..6a342a804f 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -62,6 +62,6 @@ public interface AiImageService { * @param id * @param loginUserId */ - Boolean deleteMyById(Long id, Long loginUserId); + Boolean deleteIdMy(Long id, Long loginUserId); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 337d9fa4b7..25467c9af3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -184,7 +184,7 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public Boolean deleteMyById(Long id, Long userId) { + public Boolean deleteIdMy(Long id, Long userId) { // 校验是否存在,并获取 image AiImageDO image = validateExists(id); // 是否属于当前用户 -- Gitee From 0faba44acf890d1f66851845de03db1bfded28fc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 30 May 2024 13:19:33 +0800 Subject: [PATCH 0647/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9ASuno=20=E9=9F=B3=E4=B9=90=E7=9A=84?= =?UTF-8?q?=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/config/YudaoAiAutoConfiguration.java | 1 - .../yudao/framework/ai/config/YudaoAiProperties.java | 5 ++++- .../framework/ai/core/model/suno/api/SunoApi.java | 11 +++++++++-- .../cn/iocoder/yudao/framework/ai/suno/SunoTests.java | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 5472e2fafe..7285448a38 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -151,7 +151,6 @@ public class YudaoAiAutoConfiguration { @Bean @ConditionalOnProperty(value = "yudao.ai.suno.enable", havingValue = "true") public SunoApi sunoApi(YudaoAiProperties yudaoAiProperties) { - // 创建 sunoApi return new SunoApi(new SunoConfig(yudaoAiProperties.getSuno().getToken())); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 4a7dd69de6..209407e80c 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -137,12 +137,15 @@ public class YudaoAiProperties { } @Data - @Accessors(chain = true) + @Accessors(chain = true) // TODO @xiaoxin:可以去掉这个,默认全局已经开启 public static class SunoProperties { + private boolean enable = false; /** * token */ private String token; + } + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java index 5da45fceda..b8496a0948 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.framework.ai.core.model.suno.api; - import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import com.fasterxml.jackson.annotation.JsonInclude; @@ -14,6 +13,7 @@ import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; +// TODO @xiaoxin:类注释 /** * @Author xiaoxin * @Date 2024/5/27 @@ -21,13 +21,17 @@ import java.util.concurrent.TimeUnit; @Slf4j public class SunoApi { + // TODO @xiaoxin:APPLICATION_JSON、TOKEN_PREFIX 看看 spring 有没自带的这 2 个枚举哈。变量越少越好 public static final String APPLICATION_JSON = "application/json"; public static final String TOKEN_PREFIX = "Bearer "; public static final String API_URL = "https://api.acedata.cloud/suno/audios"; + private static final int READ_TIMEOUT = 160; // 连接超时时间(秒),音乐生成时间较长,设置为 160s,后续可做callback - private final OkHttpClient client; + // TODO @xiaoxin:建议使用 webClient 对接。参考 https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java + private final OkHttpClient client; + // TODO @xiaoxin:sunoConfig => config,简洁一点 public SunoApi(SunoConfig sunoConfig) { this.client = new OkHttpClient().newBuilder().readTimeout(READ_TIMEOUT, TimeUnit.SECONDS) .addInterceptor(chain -> { @@ -40,6 +44,7 @@ public class SunoApi { .build(); } + // TODO @芋艿:方法名,要考虑下; public SunoResponse musicGen(SunoRequest sunoRequest) { Request request = new Request.Builder() .url(API_URL) @@ -57,6 +62,7 @@ public class SunoApi { } } + // TODO @xiaoxin:看看是不是使用 record 特性,简化下; /** * 请求数据对象,用于生成音乐音频 @@ -96,6 +102,7 @@ public class SunoApi { private String callbackUrl; } + // TODO @xiaoxin:看看是不是使用 record 特性,简化下; /** * SunoAPI 响应的数据 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java index 58d1609f79..1bbac41e27 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -28,4 +28,5 @@ public class SunoTests { SunoApi.SunoResponse sunoResponse = sunoApi.musicGen(sunoRequest); System.out.println(sunoResponse); } + } -- Gitee From b9d823f0ed5ab08a4639fc25614caa755cf33a14 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 13:58:19 +0800 Subject: [PATCH 0648/1557] =?UTF-8?q?=E3=80=90=E5=88=A0=E9=99=A4=E3=80=91?= =?UTF-8?q?=E5=88=A0=E9=99=A4=20MidjourneyJob=20=E6=8F=90=E4=BE=9B=20?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/job/MidjourneyJob.java | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java deleted file mode 100644 index 71b3e7731f..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/job/MidjourneyJob.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.ai.job; - -import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; -import org.springframework.stereotype.Component; - -/** - * midjourney job(同步 mj 结果) - * - * @author fansili - * @time 2024/5/28 17:57 - * @since 1.0 - */ -@Component -public class MidjourneyJob implements JobHandler { - - @Override - public String execute(String param) throws Exception { - // todo @范 同步 midjourney proxy 结果 - return ""; - } -} -- Gitee From 20addff45edc33ea44d2ca013c666cca80027603 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 14:21:13 +0800 Subject: [PATCH 0649/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91M?= =?UTF-8?q?idjourney=20client=EF=BC=8C=E5=A2=9E=E5=8A=A0=20imagine=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/client/MidjourneyProxyClient.java | 40 +++++++++++++++++++ .../ai/client/vo/MidjourneyImagineReqVO.java | 32 +++++++++++++++ .../ai/client/vo/MidjourneySubmitRespVO.java | 27 +++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java new file mode 100644 index 0000000000..79db06e5c3 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.ai.client; + +import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; +import jakarta.validation.constraints.NotNull; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.client.RestTemplate; + +/** + * Midjourney Proxy 客户端 + * + * @author fansili + * @time 2024/5/30 13:58 + * @since 1.0 + */ +@Component +public class MidjourneyProxyClient { + + private static final String URI_IMAGINE = "/submit/imagine"; + + @Value("${ai.midjourney-proxy.url:http://127.0.0.1:8080/mj}") + private String url; + + @Autowired + private RestTemplate restTemplate; + + /** + * imagine - 根据提示词提交绘画任务 + * + * @param imagineReqVO + * @return + */ + public MidjourneySubmitRespVO imagine(@Validated @NotNull MidjourneyImagineReqVO imagineReqVO) { + return restTemplate.postForObject(url.concat(URI_IMAGINE), imagineReqVO, MidjourneySubmitRespVO.class); + } + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java new file mode 100644 index 0000000000..ce3b33c4ab --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.ai.client.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.util.List; + +/** + * Midjourney:Imagine 请求 + * + * @author fansili + * @time 2024/5/30 14:02 + * @since 1.0 + */ +@Data +public class MidjourneyImagineReqVO { + + @Schema(description = "垫图(参考图)base64数组", required = false) + private List base64Array; + + @Schema(description = "通知地址", required = false) + @NotNull(message = "回调地址不能为空!") + private String notifyHook; + + @Schema(description = "提示词", required = true) + @NotNull(message = "提示词不能为空!") + private String prompt; + + @Schema(description = "自定义参数", required = false) + private String state; +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java new file mode 100644 index 0000000000..c9a430d50e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.ai.client.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * Midjourney:Imagine 请求 + * + * @author fansili + * @time 2024/5/30 14:02 + * @since 1.0 + */ +@Data +public class MidjourneySubmitRespVO { + + @Schema(description = "状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)") + private String code; + + @Schema(description = "描述") + private String description; + + @Schema(description = "扩展字段") + private String properties; + + @Schema(description = "任务ID") + private String result; +} -- Gitee From a858eb84e5ade81a7b142e1c68fef153094134a5 Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Thu, 30 May 2024 15:34:36 +0800 Subject: [PATCH 0650/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91Suno=E8=B0=83=E7=94=A8=E6=94=B9=E4=B8=BAWebClient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/music/MusicServiceImpl.java | 2 +- .../ai/config/YudaoAiProperties.java | 1 - .../ai/core/model/suno/SunoConfig.java | 2 - .../ai/core/model/suno/api/SunoApi.java | 73 ++++++++----------- .../yudao/framework/ai/suno/SunoTests.java | 9 +-- 5 files changed, 34 insertions(+), 53 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java index 64173d2dc4..cbc4f94294 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java @@ -19,7 +19,7 @@ public class MusicServiceImpl implements MusicService { @Override public SunoRespVO musicGen(SunoReqVO sunoReqVO) { - SunoApi.SunoRequest req = BeanUtils.toBean(sunoReqVO, SunoApi.SunoRequest.class); + SunoApi.SunoReq req = BeanUtils.toBean(sunoReqVO, SunoApi.SunoReq.class); return BeanUtils.toBean(sunoApi.musicGen(req), SunoRespVO.class); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index 209407e80c..e0cfa05f93 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -137,7 +137,6 @@ public class YudaoAiProperties { } @Data - @Accessors(chain = true) // TODO @xiaoxin:可以去掉这个,默认全局已经开启 public static class SunoProperties { private boolean enable = false; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java index 0d717f6cd4..b0526e665f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/SunoConfig.java @@ -3,14 +3,12 @@ package cn.iocoder.yudao.framework.ai.core.model.suno; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; /** * @Author xiaoxin * @Date 2024/5/29 */ @Data -@Accessors(chain = true) @NoArgsConstructor @AllArgsConstructor public class SunoConfig { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java index b8496a0948..1b1a500adc 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java @@ -1,65 +1,51 @@ package cn.iocoder.yudao.framework.ai.core.model.suno.api; import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; -import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; -import okhttp3.*; +import org.springframework.ai.openai.api.ApiUtils; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; -import java.io.IOException; import java.util.List; -import java.util.concurrent.TimeUnit; -// TODO @xiaoxin:类注释 /** + * Suno API + *
+ * 文档地址:https://platform.acedata.cloud/documents/d016ee3f-421b-4b6e-989a-8beba8701701 + * * @Author xiaoxin * @Date 2024/5/27 */ @Slf4j public class SunoApi { - // TODO @xiaoxin:APPLICATION_JSON、TOKEN_PREFIX 看看 spring 有没自带的这 2 个枚举哈。变量越少越好 - public static final String APPLICATION_JSON = "application/json"; - public static final String TOKEN_PREFIX = "Bearer "; - public static final String API_URL = "https://api.acedata.cloud/suno/audios"; - - private static final int READ_TIMEOUT = 160; // 连接超时时间(秒),音乐生成时间较长,设置为 160s,后续可做callback - - // TODO @xiaoxin:建议使用 webClient 对接。参考 https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java - private final OkHttpClient client; - - // TODO @xiaoxin:sunoConfig => config,简洁一点 - public SunoApi(SunoConfig sunoConfig) { - this.client = new OkHttpClient().newBuilder().readTimeout(READ_TIMEOUT, TimeUnit.SECONDS) - .addInterceptor(chain -> { - Request originalRequest = chain.request(); - Request requestWithUserAgent = originalRequest.newBuilder() - .header("Authorization", TOKEN_PREFIX + sunoConfig.getToken()) - .build(); - return chain.proceed(requestWithUserAgent); - }) + public static final String DEFAULT_BASE_URL = "https://api.acedata.cloud/suno"; + private final WebClient webClient; + + public SunoApi(SunoConfig config) { + this.webClient = WebClient.builder() + .baseUrl(DEFAULT_BASE_URL) + .defaultHeaders(ApiUtils.getJsonContentHeaders(config.getToken())) .build(); } // TODO @芋艿:方法名,要考虑下; - public SunoResponse musicGen(SunoRequest sunoRequest) { - Request request = new Request.Builder() - .url(API_URL) - .post(RequestBody.create(MediaType.parse(APPLICATION_JSON), JsonUtils.toJsonString(sunoRequest))) - .build(); - - try (Response response = client.newCall(request).execute()) { - if (!response.isSuccessful()) { - log.error("suno调用失败! response: {}", response); - throw new IllegalStateException("suno调用失败!" + response); - } - return JsonUtils.parseObject(response.body().string(), SunoResponse.class); - } catch (IOException ioException) { - throw new RuntimeException(ioException); - } + public SunoResp musicGen(SunoReq sunReq) { + return this.webClient.post() + .uri("/audios") + .body(Mono.just(sunReq), SunoReq.class) + .retrieve() + .onStatus(status -> !status.is2xxSuccessful(), + response -> response.bodyToMono(String.class) + .handle((respBody, sink) -> { + log.error("【Suno】调用失败!resp: 【{}】", respBody); + sink.error(new IllegalStateException("【Suno】调用失败!")); + })) + .bodyToMono(SunoResp.class) + .block(); } // TODO @xiaoxin:看看是不是使用 record 特性,简化下; @@ -68,9 +54,8 @@ public class SunoApi { * 请求数据对象,用于生成音乐音频 */ @Data - @Accessors(chain = true) @JsonInclude(value = JsonInclude.Include.NON_NULL) - public static class SunoRequest { + public static class SunoReq { /** * 用于生成音乐音频的提示 */ @@ -108,7 +93,7 @@ public class SunoApi { * SunoAPI 响应的数据 */ @Data - public static class SunoResponse { + public static class SunoResp { /** * 表示请求是否成功 */ diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java index 1bbac41e27..02e9243d26 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -15,18 +15,17 @@ public class SunoTests { @Before public void setup() { - String token = "13f13540dd3f4ae9885f63ac9f5d0b9f"; + String token = "16b4356581984d538652354b60d69ff0"; this.sunoConfig = new SunoConfig(token); } @Test public void generateMusic() { SunoApi sunoApi = new SunoApi(sunoConfig); - SunoApi.SunoRequest sunoRequest = new SunoApi - .SunoRequest() + SunoApi.SunoReq sunoReq = new SunoApi.SunoReq() .setPrompt("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); - SunoApi.SunoResponse sunoResponse = sunoApi.musicGen(sunoRequest); - System.out.println(sunoResponse); + SunoApi.SunoResp sunoResp = sunoApi.musicGen(sunoReq); + System.out.println(sunoResp); } } -- Gitee From 020f3a9a12b715c8d648ae620160c67bdc113600 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 30 May 2024 16:09:36 +0800 Subject: [PATCH 0651/1557] =?UTF-8?q?MALL-KEHU:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E7=9B=B8=E5=85=B3=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/enums/kehu/MessageTypeEnum.java | 42 +++++++ .../dal/dataobject/kefu/KehuMessageDO.java | 72 ++++++++++++ .../dal/dataobject/kefu/KehuTalkDO.java | 104 ++++++++++++++++++ 3 files changed, 218 insertions(+) create mode 100644 yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java new file mode 100644 index 0000000000..f866414c69 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.promotion.enums.kehu; + +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; + +/** + * 消息类型枚举 + * + * @author HUIHUI + */ +@AllArgsConstructor +@Getter +public enum MessageTypeEnum implements IntArrayValuable { + + MESSAGE(1, "普通消息"), + PICTURE(2, "图片消息"), + VOICE(3, "语音消息"), + GOODS(4, "商品消息"), + ORDER(5, "订单消息"), + VIDEO(6, "视频消息"); + + private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MessageTypeEnum::getType).toArray(); + + /** + * 类型 + */ + private final Integer type; + + /** + * 名称 + */ + private final String name; + + @Override + public int[] array() { + return ARRAYS; + } + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java new file mode 100644 index 0000000000..e949daf0b2 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.kefu; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.promotion.enums.kehu.MessageTypeEnum; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * 客户消息 DO + * + * @author HUIHUI + */ +@TableName("kehu_message") +@KeySequence("kehu_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class KehuMessageDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + /** + * 会话编号 + * + * 关联 {@link KehuTalkDO#getId()} + */ + private Long talkId; + + /** + * 发送者 + */ + private Long fromUserId; + /** + * 发送者用户类型 + */ + private String fromUserType; + /** + * 接收者 + */ + private Long toUserId; + /** + * 接收着用户类型 + */ + private String toUserType; + + /** + * 消息类型 + * + * 枚举 {@link MessageTypeEnum} + */ + private Integer messageType; + /** + * 消息 + */ + private String message; + + //======================= 消息相关状态 ======================= + + /** + * 是/否已读 + */ + private Boolean isRead; + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java new file mode 100644 index 0000000000..303281438a --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java @@ -0,0 +1,104 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.kefu; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; +import cn.iocoder.yudao.module.promotion.enums.kehu.MessageTypeEnum; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +import java.time.LocalDateTime; + +/** + * 客户会话 DO + * + * @author HUIHUI + */ +@TableName("kehu_talk") +@KeySequence("kehu_talk_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class KehuTalkDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + /** + * 会话所属用户 + * + * 关联 {@link MemberUserRespDTO#getId()} + */ + private Long userId; + /** + * 用户名称 + * + * 关联 {@link MemberUserRespDTO#getNickname()} + */ + private String userName; + /** + * 用户头像 + * + * 关联 {@link MemberUserRespDTO#getAvatar()} + */ + private String userFace; + /** + * 管理员名称 + * + * 关联 {@link AdminUserRespDTO#getNickname()} + */ + private String adminName; + /** + * 管理员头像, 管理员搞个默认头像 + */ + private String adminFace; + + /** + * 最后聊天时间 + */ + private LocalDateTime lastTalkTime; + /** + * 最后聊天内容 + */ + private String lastTalkMessage; + /** + * 最后发送的消息类型 + * + * 枚举 {@link MessageTypeEnum} + */ + private Integer lastMessageType; + + //======================= 会话操作相关 ======================= + + /** + * 管理端置顶 + */ + private Boolean adminPinned; + /** + * 用户端不可见,默认为 true + * + * 用户删除此会话时设置为 false + */ + private Boolean userDisable; + /** + * 管理员端不可见,默认为 true + * + * 管理员删除此会话时设置为 false + */ + private Boolean adminDisable; + + /** + * 管理员未读消息数 + * + * 用户发送消息时增加,管理员查看后扣减 + */ + private Integer adminUnreadMessageCount; + +} -- Gitee From a1f738dd81dac8149a0004cc1003c76bb3236297 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 16:29:28 +0800 Subject: [PATCH 0652/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20midjourney=20=E6=8F=90=E4=BA=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/vo/MidjourneySubmitCodeEnum.java | 36 +++++++ .../ai/client/vo/MidjourneySubmitRespVO.java | 4 +- .../admin/image/AiImageController.java | 37 +++---- ...ava => AiImageMidjourneyImagineReqVO.java} | 17 ++-- .../ai/service/image/AiImageService.java | 5 +- .../ai/service/image/AiImageServiceImpl.java | 97 ++++++++++++------- 6 files changed, 127 insertions(+), 69 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImageMidjourneyReqVO.java => AiImageMidjourneyImagineReqVO.java} (51%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java new file mode 100644 index 0000000000..5bf5719295 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.ai.client.vo; + +import com.google.common.collect.Lists; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.List; + +/** + * Midjourney 提交任务 code 枚举 + * + * @author fansili + * @time 2024/5/30 14:33 + * @since 1.0 + */ +@Getter +@AllArgsConstructor +public enum MidjourneySubmitCodeEnum { + + // 状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误) + SUBMIT_SUCCESS("1", "提交成功"), + ALREADY_EXISTS("1", "已存在"), + QUEUING("22", "排队中"), + + ; + + public static final List SUCCESS_CODES = Lists.newArrayList( + SUBMIT_SUCCESS.code, + ALREADY_EXISTS.code, + QUEUING.code + ); + + private String code; + private String name; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java index c9a430d50e..d689b2bd74 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.ai.client.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.Map; + /** * Midjourney:Imagine 请求 * @@ -20,7 +22,7 @@ public class MidjourneySubmitRespVO { private String description; @Schema(description = "扩展字段") - private String properties; + private Map properties; @Schema(description = "任务ID") private String result; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 4dc66a644b..6841b1c9c0 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -3,13 +3,17 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImagePageMyRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -49,32 +53,17 @@ public class AiImageController { } // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 + // TODO @芋艿: 参数差异较大 @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") public CommonResult dall(@Validated @RequestBody AiImageDallReqVO req) { return success(aiImageService.dall(getLoginUserId(), req)); } - @Operation(summary = "midjourney绘画", description = "midjourney图片绘画流程:1、提交任务 2、获取完成的任务 3、选择对应功能 4、获取最终结果") - @PostMapping("/midjourney") - public CommonResult midjourney(@Validated @RequestBody AiImageMidjourneyReqVO req) { - aiImageService.midjourney(req); - return success(null); - } - - @Operation(summary = "midjourney绘画操作", description = "一般有选择图片、放大、换一批...") - @PostMapping("/midjourney-operate") - public CommonResult midjourneyOperate(@Validated @RequestBody AiImageMidjourneyOperateReqVO req) { - aiImageService.midjourneyOperate(req); - return success(null); - } - - // TODO @fan:要不先不要 midjourneyOperate、cancelMidjourney 接口哈 - @Operation(summary = "取消 midjourney 绘画", description = "取消 midjourney 绘画") - @PostMapping("/cancel-midjourney") - public CommonResult cancelMidjourney(@RequestParam("id") Long id) { - // @范 这里实现mj取消逻辑 - return success(null); + @Operation(summary = "midjourney-imagine 绘画", description = "...") + @PostMapping("/midjourney/imagine") + public CommonResult midjourneyImagine(@Validated @RequestBody AiImageMidjourneyImagineReqVO req) { + return success(aiImageService.midjourneyImagine(getLoginUserId(), req)); } @Operation(summary = "删除【我的】绘画记录") @@ -83,4 +72,10 @@ public class AiImageController { public CommonResult deleteIdMy(@RequestParam("id") Long id) { return success(aiImageService.deleteIdMy(id, getLoginUserId())); } + + @Operation(summary = "删除【我的】绘画记录") + @RequestMapping("/midjourney-notify") + public CommonResult midjourneyNotify(HttpServletRequest request) { + return success(true); + } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java similarity index 51% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java index e6cb0dcecf..07cd10ab6d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java @@ -1,9 +1,12 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; +import java.util.List; + /** * midjourney req * @@ -13,17 +16,15 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class AiImageMidjourneyReqVO { +public class AiImageMidjourneyImagineReqVO { @Schema(description = "提示词") + @NotNull(message = "提示词不能为空!") private String prompt; - @Schema(description = "绘画比例 1:1、3:4、4:3、9:16、16:9") - private String size; - - @Schema(description = "风格") - private String style; + @Schema(description = "模型(midjourney、niji)") + private String model; - @Schema(description = "参考图") - private String referImage; + @Schema(description = "垫图(参考图)base64数组") + private List base64Array; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 6a342a804f..b07ba7dd8c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperateReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; /** @@ -44,10 +44,11 @@ public interface AiImageService { /** * midjourney 图片生成 * + * @param loginUserId * @param req * @return */ - void midjourney(AiImageMidjourneyReqVO req); + Long midjourneyImagine(Long loginUserId, AiImageMidjourneyImagineReqVO req); /** * midjourney 操作(u1、u2、放大、换一批...) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 25467c9af3..d6da654f5a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.ai.service.image; -import cn.hutool.core.util.IdUtil; import cn.hutool.http.HttpUtil; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.core.exception.AiException; @@ -11,6 +11,10 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitCodeEnum; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; @@ -18,21 +22,22 @@ import cn.iocoder.yudao.module.ai.enums.AiImagePublicStatusEnum; import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; import cn.iocoder.yudao.module.infra.api.file.FileApi; import com.google.common.collect.ImmutableMap; -import jakarta.annotation.PostConstruct; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.ai.image.ImageGeneration; import org.springframework.ai.image.ImagePrompt; import org.springframework.ai.image.ImageResponse; -import org.springframework.ai.models.midjourney.api.MidjourneyInteractionsApi; -import org.springframework.ai.models.midjourney.webSocket.MidjourneyWebSocketStarter; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.HashMap; import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -59,28 +64,11 @@ public class AiImageServiceImpl implements AiImageService { private FileApi fileApi; @Resource private OpenAiImageClient openAiImageClient; - @Resource - private MidjourneyWebSocketStarter midjourneyWebSocketStarter; - @Resource - private MidjourneyInteractionsApi midjourneyInteractionsApi; - - // TODO @fan:接 mj proxy - @PostConstruct - public void startMidjourney() { - // todo @fan 暂时注释掉 -// log.info("midjourney web socket starter..."); -// midjourneyWebSocketStarter.start(new WssNotify() { -// @Override -// public void notify(int code, String message) { -// log.info("code: {}, message: {}", code, message); -// if (message.contains("Authentication failed")) { -// // TODO 芋艿,这里看怎么处理,token无效的时候会认证失败! -// // 认证失败 -// log.error("midjourney socket 认证失败,检查token是否失效!"); -// } -// } -// }); - } + @Autowired + private MidjourneyProxyClient midjourneyProxyClient; + + @Value("${ai.midjourney-proxy.notifyUrl:http://127.0.0.1:48080/admin-api/ai/image/midjourney-notify}") + private String midjourneyNotifyUrl; @Override public PageResult getImagePageMy(Long loginUserId, AiImageListReqVO req) { @@ -143,18 +131,53 @@ public class AiImageServiceImpl implements AiImageService { @Override @Transactional(rollbackFor = Exception.class) - public void midjourney(AiImageMidjourneyReqVO req) { - // 保存数据库 - String messageId = String.valueOf(IdUtil.getSnowflakeNextId()); - // todo -// AiImageDO aiImageDO = doSave(req.getPrompt(), null, "midjoureny", -// null, null, AiImageStatusEnum.SUBMIT, null, -// messageId, null, null); - // 提交 midjourney 任务 - Boolean imagine = midjourneyInteractionsApi.imagine(messageId, req.getPrompt()); - if (!imagine) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); + public Long midjourneyImagine(Long loginUserId, AiImageMidjourneyImagineReqVO req) { + + // 1、构建 AiImageDO + AiImageDO aiImageDO = new AiImageDO(); + aiImageDO.setId(null); + aiImageDO.setUserId(loginUserId); + aiImageDO.setPrompt(req.getPrompt()); + aiImageDO.setPlatform(AiPlatformEnum.MIDJOURNEY.getPlatform()); + // todo @范 平台需要转换(mj 模型一般分版本) + aiImageDO.setModel(null); + aiImageDO.setWidth(null); + aiImageDO.setHeight(null); + aiImageDO.setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); + aiImageDO.setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()); + aiImageDO.setPicUrl(null); + aiImageDO.setOriginalPicUrl(null); + aiImageDO.setDrawRequest(null); + aiImageDO.setDrawResponse(null); + aiImageDO.setErrorMessage(null); + + // 2、保存 image + imageMapper.insert(aiImageDO); + + // 3、调用 MidjourneyProxy 提交任务 + MidjourneyImagineReqVO imagineReqVO = BeanUtils.toBean(req, MidjourneyImagineReqVO.class); + imagineReqVO.setNotifyHook(midjourneyNotifyUrl); + imagineReqVO.setState(String.valueOf(aiImageDO.getId())); + MidjourneySubmitRespVO submitRespVO = midjourneyProxyClient.imagine(imagineReqVO); + + // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) + String updateStatus = null; + String errorMessage = null; + Map drawResponse = new HashMap<>(); + + if (!MidjourneySubmitCodeEnum.SUCCESS_CODES.contains(submitRespVO.getCode())) { + updateStatus = AiImageStatusEnum.FAIL.getStatus(); + errorMessage = submitRespVO.getDescription(); + } else { + drawResponse.put("jobId", submitRespVO.getResult()); } + imageMapper.updateById(new AiImageDO() + .setId(aiImageDO.getId()) + .setStatus(updateStatus) + .setErrorMessage(errorMessage) + .setDrawResponse(drawResponse) + ); + return aiImageDO.getId(); } @Transactional(rollbackFor = Exception.class) -- Gitee From c0de6cc508a0be28ede39bb9ac627246897e3844 Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Thu, 30 May 2024 16:56:49 +0800 Subject: [PATCH 0653/1557] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo?= =?UTF-8?q?=E3=80=91SunoResp=E3=80=81SunoReq=E6=94=B9=E4=B8=BArecord?= =?UTF-8?q?=E7=AE=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/music/vo/MusicDataVO.java | 23 ++- .../controller/admin/music/vo/SunoRespVO.java | 11 ++ .../ai/service/music/MusicServiceImpl.java | 12 +- .../ai/core/model/suno/api/SunoApi.java | 166 ++++++------------ .../yudao/framework/ai/suno/SunoTests.java | 4 +- .../src/main/resources/application.yaml | 2 +- 6 files changed, 98 insertions(+), 120 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java index ce372aff94..d4c4afa22c 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java @@ -1,13 +1,17 @@ package cn.iocoder.yudao.module.ai.controller.admin.music.vo; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import java.util.List; +import java.util.stream.Collectors; + /** * 表示单个音乐数据的类 */ @Data -public class MusicDataVO { +public class MusicDataVO { /** * 音乐数据的 ID */ @@ -61,4 +65,21 @@ public class MusicDataVO { * 音乐音频的风格 */ private String style; + + public static List convertFrom(List musicDataList) { + return musicDataList.stream().map(musicData -> { + MusicDataVO musicDataVO = new MusicDataVO(); + musicDataVO.setId(musicData.id()); + musicDataVO.setTitle(musicData.title()); + musicDataVO.setImageUrl(musicData.imageUrl()); + musicDataVO.setLyric(musicData.lyric()); + musicDataVO.setAudioUrl(musicData.audioUrl()); + musicDataVO.setVideoUrl(musicData.videoUrl()); + musicDataVO.setCreatedAt(musicData.createdAt()); + musicDataVO.setModel(musicData.model()); + musicDataVO.setPrompt(musicData.prompt()); + musicDataVO.setStyle(musicData.style()); + return musicDataVO; + }).collect(Collectors.toList()); + } } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java index bbb4264c77..b3d66363ff 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.music.vo; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @@ -26,4 +27,14 @@ public class SunoRespVO { */ private List data; + + //把 SunoResp转为本vo类 + public static SunoRespVO convertFrom(SunoApi.SunoResp sunoResp) { + SunoRespVO sunoRespVO = new SunoRespVO(); + sunoRespVO.setSuccess(sunoResp.success()); + sunoRespVO.setTaskId(sunoResp.taskId()); + sunoRespVO.setData(MusicDataVO.convertFrom(sunoResp.data())); + return sunoRespVO; + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java index cbc4f94294..0673e59acc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.ai.service.music; import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoReqVO; import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoRespVO; import lombok.RequiredArgsConstructor; @@ -19,7 +18,14 @@ public class MusicServiceImpl implements MusicService { @Override public SunoRespVO musicGen(SunoReqVO sunoReqVO) { - SunoApi.SunoReq req = BeanUtils.toBean(sunoReqVO, SunoApi.SunoReq.class); - return BeanUtils.toBean(sunoApi.musicGen(req), SunoRespVO.class); + SunoApi.SunoResp sunoResp = sunoApi.musicGen(new SunoApi.SunoReq( + sunoReqVO.getPrompt(), + sunoReqVO.getLyric(), + sunoReqVO.isCustom(), + sunoReqVO.getTitle(), + sunoReqVO.getStyle(), + sunoReqVO.getCallbackUrl() + )); + return SunoRespVO.convertFrom(sunoResp); } } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java index 1b1a500adc..22435affdf 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.framework.ai.core.model.suno.api; import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.web.reactive.function.client.WebClient; @@ -48,128 +47,69 @@ public class SunoApi { .block(); } - // TODO @xiaoxin:看看是不是使用 record 特性,简化下; - /** - * 请求数据对象,用于生成音乐音频 + * 请求数据对象,用于生成音乐音频。 + * + * @param prompt 用于生成音乐音频的提示 + * @param lyric 用于生成音乐音频的歌词 + * @param custom 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 + * @param title 音乐音频的标题 + * @param style 音乐音频的风格 + * @param callbackUrl 音乐音频生成后回调的 URL */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) - public static class SunoReq { - /** - * 用于生成音乐音频的提示 - */ - private String prompt; - - /** - * 用于生成音乐音频的歌词 - */ - private String lyric; - - /** - * 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 - */ - private boolean custom; - - /** - * 音乐音频的标题 - */ - private String title; - - /** - * 音乐音频的风格 - */ - private String style; + public record SunoReq( + String prompt, + String lyric, + boolean custom, + String title, + String style, + String callbackUrl + ) { + public SunoReq(String prompt) { + this(prompt, null, false, null, null, null); + } - /** - * 音乐音频生成后回调的 URL - */ - private String callbackUrl; } - // TODO @xiaoxin:看看是不是使用 record 特性,简化下; - /** - * SunoAPI 响应的数据 + * SunoAPI 响应的数据。 + * + * @param success 表示请求是否成功 + * @param taskId 任务 ID + * @param data 音乐数据列表 */ - @Data - public static class SunoResp { + public record SunoResp( + boolean success, + @JsonProperty("task_id") String taskId, + List data + ) { /** - * 表示请求是否成功 + * 单个音乐数据。 + * + * @param id 音乐数据的 ID + * @param title 音乐音频的标题 + * @param imageUrl 音乐音频的图片 URL + * @param lyric 音乐音频的歌词 + * @param audioUrl 音乐音频的 URL + * @param videoUrl 音乐视频的 URL + * @param createdAt 音乐音频的创建时间 + * @param model 使用的模型名称 + * @param prompt 生成音乐音频的提示 + * @param style 音乐音频的风格 */ - private boolean success; - - /** - * 任务 ID - */ - @JsonProperty("task_id") - private String taskId; - - /** - * 音乐数据列表 - */ - private List data; - - /** - * 表示单个音乐数据的类 - */ - @Data - static class MusicData { - /** - * 音乐数据的 ID - */ - private String id; - - /** - * 音乐音频的标题 - */ - private String title; - - /** - * 音乐音频的图片 URL - */ - @JsonProperty("image_url") - private String imageUrl; - - /** - * 音乐音频的歌词 - */ - private String lyric; - - /** - * 音乐音频的 URL - */ - @JsonProperty("audio_url") - private String audioUrl; - - /** - * 音乐视频的 URL - */ - @JsonProperty("video_url") - private String videoUrl; - - /** - * 音乐音频的创建时间 - */ - @JsonProperty("created_at") - private String createdAt; - - /** - * 使用的模型名称 - */ - private String model; - - /** - * 生成音乐音频的提示 - */ - private String prompt; - - /** - * 音乐音频的风格 - */ - private String style; + public record MusicData( + String id, + String title, + @JsonProperty("image_url") String imageUrl, + String lyric, + @JsonProperty("audio_url") String audioUrl, + @JsonProperty("video_url") String videoUrl, + @JsonProperty("created_at") String createdAt, + String model, + String prompt, + String style + ) { } } - - } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java index 02e9243d26..36fc40b17a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -22,8 +22,8 @@ public class SunoTests { @Test public void generateMusic() { SunoApi sunoApi = new SunoApi(sunoConfig); - SunoApi.SunoReq sunoReq = new SunoApi.SunoReq() - .setPrompt("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); + SunoApi.SunoReq sunoReq = new SunoApi.SunoReq("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); + SunoApi.SunoResp sunoResp = sunoApi.musicGen(sunoReq); System.out.println(sunoResp); } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 417787ba4c..f1b8f56f7d 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -201,7 +201,7 @@ yudao.ai: channel-id: 1237948819677904960 suno: enable: true - token: 13f13540dd3f4ae9885f63ac9f5d0b9f + token: 16b4356581984d538652354b60d69ff0 --- #################### 芋道相关配置 #################### -- Gitee From 74620ebc349393249b65116561bd7c28623c8a43 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 30 May 2024 17:21:22 +0800 Subject: [PATCH 0654/1557] =?UTF-8?q?=E3=80=90sql=E3=80=91=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=9C=80=E6=96=B0=E7=89=88=20image=20sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/ai_image.sql | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql new file mode 100644 index 0000000000..4de719235d --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql @@ -0,0 +1,61 @@ +/* + Navicat Premium Data Transfer + + Source Server : localhost + Source Server Type : MySQL + Source Server Version : 80034 (8.0.34) + Source Host : localhost:3306 + Source Schema : ruoyi-vue-pro + + Target Server Type : MySQL + Target Server Version : 80034 (8.0.34) + File Encoding : 65001 + + Date: 30/05/2024 17:20:37 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for ai_image +-- ---------------------------- +DROP TABLE IF EXISTS `ai_image`; +CREATE TABLE `ai_image` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `user_id` bigint DEFAULT NULL, + `prompt` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '提示词\n', + `platform` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '平台', + `model` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型 dall2/dall3、MJ、NIJI', + `width` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片宽度', + `height` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片高度', + `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画状态:提交、排队、绘画中、绘画完成、绘画失败\n', + `public_status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '是否发布', + `pic_url` varchar(512) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片地址', + `original_pic_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画图片地址\n', + `error_message` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '错误信息', + `draw_request` json DEFAULT NULL COMMENT '绘画request', + `draw_response` json DEFAULT NULL COMMENT '绘画response', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `creator` bigint DEFAULT NULL COMMENT '创建用户', + `updater` bigint DEFAULT NULL COMMENT '更新用户', + `deleted` bit(1) DEFAULT b'0' COMMENT '删除', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; + +-- ---------------------------- +-- Records of ai_image +-- ---------------------------- +BEGIN; +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (91, 1, '北极企鹅', NULL, 'dall-e-2', '1024', '1024', '20', NULL, 'http://test.yudao.iocoder.cn/75b4d733222b60aafdbdcd0475562ff88149eaaff93a25c4e4c66a95bd07f01f.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-z4KBxbWtUpLBYmgaYPvWXjBh.png?st=2024-05-29T04%3A50%3A54Z&se=2024-05-29T06%3A50%3A54Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-28T23%3A21%3A22Z&ske=2024-05-29T23%3A21%3A22Z&sks=b&skv=2023-11-03&sig=jSw/hJfuPWJqQgjSoINtVrt4w61FsaQ6ed4pRCM8UUA%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-29 13:50:43', '2024-05-29 13:51:05', 1, 1, b'0'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (93, 1, '北极企鹅', NULL, 'dall-e-2', '1024', '1024', '20', 'private', 'http://test.yudao.iocoder.cn/ab326bbf3fae9a940770a5c36bbf39467ae539a5b94a030b6c6cc2f179d7dd31.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-CsJtCgLT9lTigTuBDJtPyO8X.png?st=2024-05-29T09%3A02%3A12Z&se=2024-05-29T11%3A02%3A12Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-28T23%3A21%3A54Z&ske=2024-05-29T23%3A21%3A54Z&sks=b&skv=2023-11-03&sig=tH6yFzHtcp3Dxwaua2crFYurCdE7B7%2BAXhyPNVVep1c%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-29 18:02:03', '2024-05-29 18:02:17', 1, 1, b'0'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (94, 1, '北极大熊猫', NULL, 'dall-e-2', '1024', '1024', '20', 'private', 'http://test.yudao.iocoder.cn/ed9d43a6c841c4a967700e211c998778994eeea60cff2dfeb1c3a88b0542ebdd.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-GAwShv01C2408VY5lXvLTP4Q.png?st=2024-05-30T01%3A31%3A28Z&se=2024-05-30T03%3A31%3A28Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-29T23%3A39%3A20Z&ske=2024-05-30T23%3A39%3A20Z&sks=b&skv=2023-11-03&sig=n/rqAnD0qJDkhbh/Qm12lz1Se70PQSdXetarmwCKoMY%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-30 10:31:18', '2024-05-30 10:31:34', 1, 1, b'1'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (102, 1, '女少侠', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:11:13', '2024-05-30 16:11:13', 1, 1, b'1'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (103, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:27:34', '2024-05-30 16:27:34', 1, 1, b'1'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (104, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:23', '2024-05-30 16:28:24', 1, 1, b'1'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (105, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:25', '2024-05-30 16:28:25', 1, 1, b'1'); +INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (106, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:34', '2024-05-30 16:28:34', 1, 1, b'1'); +COMMIT; + +SET FOREIGN_KEY_CHECKS = 1; -- Gitee From c53633a286aefc8e0fbc06020c904602e3a7f06d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 30 May 2024 19:21:12 +0800 Subject: [PATCH 0655/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91AI=EF=BC=9ASuno=20=E9=9F=B3=E4=B9=90=E7=9A=84?= =?UTF-8?q?=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java | 1 + .../yudao/module/ai/client/vo/MidjourneyImagineReqVO.java | 1 + .../yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java | 1 + .../yudao/module/ai/client/vo/MidjourneySubmitRespVO.java | 1 + .../module/ai/controller/admin/image/AiImageController.java | 1 + .../controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java | 1 + 6 files changed, 6 insertions(+) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java index 79db06e5c3..efba5234bb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Component; import org.springframework.validation.annotation.Validated; import org.springframework.web.client.RestTemplate; +// TODO @fan:这个写到 starter-ai 里哈。搞个 MidjourneyApi,参考 https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java 的风格写哈 /** * Midjourney Proxy 客户端 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java index ce3b33c4ab..5f48747b6b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyImagineReqVO.java @@ -6,6 +6,7 @@ import lombok.Data; import java.util.List; +// TODO @fan:待定 /** * Midjourney:Imagine 请求 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java index 5bf5719295..13bf09814d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java @@ -6,6 +6,7 @@ import lombok.Getter; import java.util.List; +// TODO @fan:待定 /** * Midjourney 提交任务 code 枚举 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java index d689b2bd74..9aa9e97f19 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitRespVO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.util.Map; +// TODO @fan:待定 /** * Midjourney:Imagine 请求 * diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 6841b1c9c0..bef20fe145 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -54,6 +54,7 @@ public class AiImageController { // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 // TODO @芋艿: 参数差异较大 + // TODO @fan:直接参数平铺?写好注释,要么? @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") public CommonResult dall(@Validated @RequestBody AiImageDallReqVO req) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java index 07cd10ab6d..df43efa36a 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java @@ -7,6 +7,7 @@ import lombok.experimental.Accessors; import java.util.List; +// TODO @fan:待定 /** * midjourney req * -- Gitee From 8a3b6c3eb94ccc8ca1e08025be0157148275c4be Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 31 May 2024 08:57:08 +0800 Subject: [PATCH 0656/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/vo/model/simple/BpmSimpleModelNodeVO.java | 3 ++- .../vo/model/simple/BpmSimpleModelUpdateReqVO.java | 3 +-- .../bpm/framework/flowable/core/util/SimpleModelUtils.java | 7 ++++--- .../module/bpm/service/definition/BpmModelServiceImpl.java | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java index 5c2148707b..a32449c21f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java @@ -28,7 +28,7 @@ public class BpmSimpleModelNodeVO { @Schema(description = "模型节点名称", example = "领导审批") private String name; - // TODO @jason:要不改成 placeholder 和一般 Element-Plus 组件一致。占位符,用于展示。 + // TODO @jason:要不改成 placeholder 和一般 Element-Plus 组件一致。占位符,用于展示。@芋艿。这个不是 placeholder 占位符的含义。节点配置后。节点展示的内容,不知道取什么名字好??? @Schema(description = "节点展示内容", example = "指定成员: 芋道源码") private String showText; @@ -42,6 +42,7 @@ public class BpmSimpleModelNodeVO { private Map attributes; // TODO @jason:建议是字段分拆下;类似说: // Map formPermissions; 表单权限;仅发起、审批、抄送节点会使用 // Integer approveMethod; 审批方式;仅审批节点会使用 + // TODO @jason 后面和前端一起调整一下 // TODO @芋艿:审批人的选择; // TODO @芋艿:没有人的策略? // TODO @芋艿:审批拒绝的策略? diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java index 33d6a42480..fc72d3f679 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelUpdateReqVO.java @@ -15,10 +15,9 @@ public class BpmSimpleModelUpdateReqVO { @NotEmpty(message = "流程模型编号不能为空") private String modelId; // 对应 Flowable act_re_model 表 ID_ 字段 - // TODO @jason:simpleModel 要不? @Schema(description = "仿钉钉流程设计模型对象", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "仿钉钉流程设计模型对象不能为空") @Valid - private BpmSimpleModelNodeVO simpleModelBody; + private BpmSimpleModelNodeVO simpleModel; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index a5a25ca04c..dc70962d2b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -248,9 +248,10 @@ public class SimpleModelUtils { } private static SequenceFlow buildBpmnSequenceFlow(String sourceId, String targetId, String seqFlowId, String seqName, String conditionExpression) { - // TODO @jason:最好断言下,sourceId、targetId 必须存在! - // TODO @jason:如果 seqFlowId 不存在的时候,是不是要生成一个默认的 seqFlowId? - // TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? + Assert.notEmpty(sourceId, "sourceId 不能为空"); + Assert.notEmpty(targetId, "targetId 不能为空"); + // TODO @jason:如果 seqFlowId 不存在的时候,是不是要生成一个默认的 seqFlowId? @芋艿: 貌似不需要,Flowable 会默认生成 + // TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? @芋艿: 不需要生成默认的吧? 这个会在流程图展示的, 一般用户填写的。不好生成默认的吧 SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId); if (StrUtil.isNotEmpty(conditionExpression)) { sequenceFlow.setConditionExpression(conditionExpression); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 4762fac4d5..ef421a2e31 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -231,11 +231,11 @@ public class BpmModelServiceImpl implements BpmModelService { throw exception(MODEL_NOT_EXISTS); } // 1.2 JSON 转换成 bpmnModel - BpmnModel bpmnModel = SimpleModelUtils.buildBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModelBody()); + BpmnModel bpmnModel = SimpleModelUtils.buildBpmnModel(model.getKey(), model.getName(), reqVO.getSimpleModel()); // 2.1 保存 Bpmn XML saveModelBpmnXml(model.getId(), StrUtil.utf8Bytes(BpmnModelUtils.getBpmnXml(bpmnModel))); // 2.2 保存 JSON 数据 - saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModelBody())); + saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModel())); } -- Gitee From 0be9c67aa6b534e872b25b9e82e4a32e7fc7e331 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 31 May 2024 09:58:23 +0800 Subject: [PATCH 0657/1557] =?UTF-8?q?MALL-KEFU:=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1=E4=BF=AE=E6=94=B9=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...m.java => KeFuMessageContentTypeEnum.java} | 15 ++--- ...ehuTalkDO.java => KeFuConversationDO.java} | 55 ++++++------------- ...{KehuMessageDO.java => KeFuMessageDO.java} | 47 +++++++++------- 3 files changed, 53 insertions(+), 64 deletions(-) rename yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/{MessageTypeEnum.java => KeFuMessageContentTypeEnum.java} (64%) rename yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/{KehuTalkDO.java => KeFuConversationDO.java} (49%) rename yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/{KehuMessageDO.java => KeFuMessageDO.java} (44%) diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/KeFuMessageContentTypeEnum.java similarity index 64% rename from yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java rename to yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/KeFuMessageContentTypeEnum.java index f866414c69..29c3b34c40 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/MessageTypeEnum.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/kehu/KeFuMessageContentTypeEnum.java @@ -13,16 +13,17 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum MessageTypeEnum implements IntArrayValuable { +public enum KeFuMessageContentTypeEnum implements IntArrayValuable { - MESSAGE(1, "普通消息"), - PICTURE(2, "图片消息"), + TEXT(1, "文本消息"), + IMAGE(2, "图片消息"), VOICE(3, "语音消息"), - GOODS(4, "商品消息"), - ORDER(5, "订单消息"), - VIDEO(6, "视频消息"); + VIDEO(4, "视频消息"), + // 和正常消息隔离下 + PRODUCT(10, "商品消息"), + ORDER(11, "订单消息"); - private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MessageTypeEnum::getType).toArray(); + private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(KeFuMessageContentTypeEnum::getType).toArray(); /** * 类型 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java similarity index 49% rename from yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java rename to yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java index 303281438a..04432eebe6 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuTalkDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.promotion.dal.dataobject.kefu; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; -import cn.iocoder.yudao.module.promotion.enums.kehu.MessageTypeEnum; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import cn.iocoder.yudao.module.promotion.enums.kehu.KeFuMessageContentTypeEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -12,19 +11,19 @@ import lombok.*; import java.time.LocalDateTime; /** - * 客户会话 DO + * 客服会话 DO * * @author HUIHUI */ -@TableName("kehu_talk") -@KeySequence("kehu_talk_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName("promotion_kefu_conversation") +@KeySequence("promotion_kefu_conversation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class KehuTalkDO extends BaseDO { +public class KeFuConversationDO extends BaseDO { /** * 编号 @@ -37,43 +36,21 @@ public class KehuTalkDO extends BaseDO { * 关联 {@link MemberUserRespDTO#getId()} */ private Long userId; - /** - * 用户名称 - * - * 关联 {@link MemberUserRespDTO#getNickname()} - */ - private String userName; - /** - * 用户头像 - * - * 关联 {@link MemberUserRespDTO#getAvatar()} - */ - private String userFace; - /** - * 管理员名称 - * - * 关联 {@link AdminUserRespDTO#getNickname()} - */ - private String adminName; - /** - * 管理员头像, 管理员搞个默认头像 - */ - private String adminFace; /** * 最后聊天时间 */ - private LocalDateTime lastTalkTime; + private LocalDateTime lastMessageTime; /** * 最后聊天内容 */ - private String lastTalkMessage; + private String lastMessageContent; /** * 最后发送的消息类型 * - * 枚举 {@link MessageTypeEnum} + * 枚举 {@link KeFuMessageContentTypeEnum} */ - private Integer lastMessageType; + private Integer lastMessageContentType; //======================= 会话操作相关 ======================= @@ -82,17 +59,19 @@ public class KehuTalkDO extends BaseDO { */ private Boolean adminPinned; /** - * 用户端不可见,默认为 true + * 用户是否可见 * - * 用户删除此会话时设置为 false + * true - 可见,默认值 + * false - 不可见,用户删除时设置为 false */ - private Boolean userDisable; + private Boolean userDeleted; /** - * 管理员端不可见,默认为 true + * 管理员是否可见 * - * 管理员删除此会话时设置为 false + * true - 可见,默认值 + * false - 不可见,管理员删除时设置为 false */ - private Boolean adminDisable; + private Boolean adminDeleted; /** * 管理员未读消息数 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuMessageDO.java similarity index 44% rename from yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java rename to yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuMessageDO.java index e949daf0b2..bd542f890a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KehuMessageDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuMessageDO.java @@ -1,26 +1,27 @@ package cn.iocoder.yudao.module.promotion.dal.dataobject.kefu; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.promotion.enums.kehu.MessageTypeEnum; +import cn.iocoder.yudao.module.promotion.enums.kehu.KeFuMessageContentTypeEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; /** - * 客户消息 DO + * 客服消息 DO * * @author HUIHUI */ -@TableName("kehu_message") -@KeySequence("kehu_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName("promotion_kefu_message") +@KeySequence("promotion_kefu_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class KehuMessageDO extends BaseDO { +public class KeFuMessageDO extends BaseDO { /** * 编号 @@ -30,43 +31,51 @@ public class KehuMessageDO extends BaseDO { /** * 会话编号 * - * 关联 {@link KehuTalkDO#getId()} + * 关联 {@link KeFuConversationDO#getId()} */ - private Long talkId; + private Long conversationId; /** - * 发送者 + * 发送人编号 + * + * 存储的是用户编号 */ - private Long fromUserId; + private Long senderId; /** - * 发送者用户类型 + * 发送人类型 + * + * 枚举,{@link UserTypeEnum} */ - private String fromUserType; + private Integer senderType; /** - * 接收者 + * 接收人编号 + * + * 存储的是用户编号 */ - private Long toUserId; + private Long receiverId; /** - * 接收着用户类型 + * 接收人类型 + * + * 枚举,{@link UserTypeEnum} */ - private String toUserType; + private Integer receiverType; /** * 消息类型 * - * 枚举 {@link MessageTypeEnum} + * 枚举 {@link KeFuMessageContentTypeEnum} */ - private Integer messageType; + private Integer contentType; /** * 消息 */ - private String message; + private String content; //======================= 消息相关状态 ======================= /** * 是/否已读 */ - private Boolean isRead; + private Boolean readStatus; } -- Gitee From 27f052de0a7bf9f61d17eea59427aee8fcf79c47 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:05:16 +0800 Subject: [PATCH 0658/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91m?= =?UTF-8?q?idjourney=20=E5=A2=9E=E5=8A=A0=20--ar=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/vo/AiImageMidjourneyImagineReqVO.java | 6 ++++++ .../yudao/module/ai/service/image/AiImageServiceImpl.java | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java index 07cd10ab6d..ee17f10651 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java @@ -25,6 +25,12 @@ public class AiImageMidjourneyImagineReqVO { @Schema(description = "模型(midjourney、niji)") private String model; + @Schema(description = "图片宽度") + private String width; + + @Schema(description = "图片高度") + private String height; + @Schema(description = "垫图(参考图)base64数组") private List base64Array; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index d6da654f5a..ee45eee730 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -12,8 +12,8 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; +import cn.iocoder.yudao.module.ai.client.enums.MidjourneySubmitCodeEnum; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; -import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitCodeEnum; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; @@ -157,7 +157,8 @@ public class AiImageServiceImpl implements AiImageService { // 3、调用 MidjourneyProxy 提交任务 MidjourneyImagineReqVO imagineReqVO = BeanUtils.toBean(req, MidjourneyImagineReqVO.class); imagineReqVO.setNotifyHook(midjourneyNotifyUrl); - imagineReqVO.setState(String.valueOf(aiImageDO.getId())); + // 设置 midjourney 扩展参数,通过 --ar 来设置尺寸 + imagineReqVO.setState(String.format("--ar %s:%s", req.getWidth(), req.getHeight())); MidjourneySubmitRespVO submitRespVO = midjourneyProxyClient.imagine(imagineReqVO); // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) -- Gitee From 47ff5bf814490791317f654e9515364fca05aedd Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:25:03 +0800 Subject: [PATCH 0659/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91m?= =?UTF-8?q?idjourney=20=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/vo/AiImageMidjourneyImagineReqVO.java | 7 +++++-- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java index b4398ad739..e83dd2c872 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyImagineReqVO.java @@ -26,12 +26,15 @@ public class AiImageMidjourneyImagineReqVO { @Schema(description = "模型(midjourney、niji)") private String model; - @Schema(description = "图片宽度") + @Schema(description = "图片宽度 --ar 设置") private String width; - @Schema(description = "图片高度") + @Schema(description = "图片高度 --ar 设置") private String height; + @Schema(description = "版本号 --v 设置") + private String version; + @Schema(description = "垫图(参考图)base64数组") private List base64Array; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index ee45eee730..67884e2640 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -158,7 +158,9 @@ public class AiImageServiceImpl implements AiImageService { MidjourneyImagineReqVO imagineReqVO = BeanUtils.toBean(req, MidjourneyImagineReqVO.class); imagineReqVO.setNotifyHook(midjourneyNotifyUrl); // 设置 midjourney 扩展参数,通过 --ar 来设置尺寸 - imagineReqVO.setState(String.format("--ar %s:%s", req.getWidth(), req.getHeight())); + String midjourneySizeParam = String.format("--ar %s:%s", req.getWidth(), req.getHeight()); + String midjourneyVersionParam = String.format("--v %s", req.getVersion()); + imagineReqVO.setState(midjourneySizeParam.concat(" ").concat(midjourneyVersionParam)); MidjourneySubmitRespVO submitRespVO = midjourneyProxyClient.imagine(imagineReqVO); // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) -- Gitee From 8f3076b2ea6ad9e803f7ebc998f54868bafc0181 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:36:07 +0800 Subject: [PATCH 0660/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91n?= =?UTF-8?q?iji=20=E6=A8=A1=E5=9E=8B=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/client/enums/MidjourneyModelEnum.java | 30 +++++++++++++++++++ .../ai/service/image/AiImageServiceImpl.java | 15 +++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyModelEnum.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyModelEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyModelEnum.java new file mode 100644 index 0000000000..6c53b92943 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyModelEnum.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.ai.client.enums; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 来源于 midjourney-proxy + */ +@Getter +@AllArgsConstructor +public enum MidjourneyModelEnum { + + MIDJOURNEY("midjourney", "midjourney"), + NIJI("Niji", "Niji"), + + ; + + private String model; + private String name; + + public static MidjourneyModelEnum valueOfModel(String model) { + for (MidjourneyModelEnum itemEnum : MidjourneyModelEnum.values()) { + if (itemEnum.getModel().equals(model)) { + return itemEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + model); + } +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 67884e2640..bef3b600bb 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -12,6 +12,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; +import cn.iocoder.yudao.module.ai.client.enums.MidjourneyModelEnum; import cn.iocoder.yudao.module.ai.client.enums.MidjourneySubmitCodeEnum; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; @@ -157,10 +158,16 @@ public class AiImageServiceImpl implements AiImageService { // 3、调用 MidjourneyProxy 提交任务 MidjourneyImagineReqVO imagineReqVO = BeanUtils.toBean(req, MidjourneyImagineReqVO.class); imagineReqVO.setNotifyHook(midjourneyNotifyUrl); - // 设置 midjourney 扩展参数,通过 --ar 来设置尺寸 - String midjourneySizeParam = String.format("--ar %s:%s", req.getWidth(), req.getHeight()); - String midjourneyVersionParam = String.format("--v %s", req.getVersion()); - imagineReqVO.setState(midjourneySizeParam.concat(" ").concat(midjourneyVersionParam)); + // 设置 midjourney 扩展参数 + // --ar 来设置尺寸 + String midjourneySizeParam = String.format(" --ar %s:%s ", req.getWidth(), req.getHeight()); + // --v 版本 + String midjourneyVersionParam = String.format(" --v %s ", req.getVersion()); + // --niji 模型 + MidjourneyModelEnum midjourneyModelEnum = MidjourneyModelEnum.valueOfModel(req.getModel()); + String midjourneyNijiParam = MidjourneyModelEnum.NIJI == midjourneyModelEnum ? " --niji " : ""; + // 设置参数 + imagineReqVO.setState(midjourneySizeParam.concat(midjourneyVersionParam).concat(midjourneyNijiParam)); MidjourneySubmitRespVO submitRespVO = midjourneyProxyClient.imagine(imagineReqVO); // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) -- Gitee From 3c7fccfcf315d001cbb19b710e8a550e7e1dbeda Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:37:47 +0800 Subject: [PATCH 0661/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91m?= =?UTF-8?q?idjourney=20proxy=20=E9=80=9A=E7=9F=A5=E5=9B=9E=E8=B0=83=20vo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/client/vo/MidjourneyNotifyVO.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java new file mode 100644 index 0000000000..c2a934331e --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.ai.client.vo; + +import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskActionEnum; +import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskStatusEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * @author fansili + * @time 2024/5/31 10:37 + * @since 1.0 + */ +@Data +public class MidjourneyNotifyVO { + + @Schema(description = "任务类型") + private MidjourneyTaskActionEnum action; + @Schema(description = "任务状态") + private MidjourneyTaskStatusEnum status = MidjourneyTaskStatusEnum.NOT_START; + + @Schema(description = "提示词") + private String prompt; + @Schema(description = "提示词-英文") + private String promptEn; + + @Schema(description = "任务描述") + private String description; + @Schema(description = "自定义参数") + private String state; + + @Schema(description = "提交时间") + private Long submitTime; + @Schema(description = "开始执行时间") + private Long startTime; + @Schema(description = "结束时间") + private Long finishTime; + + @Schema(description = "图片url") + private String imageUrl; + + @Schema(description = "任务进度") + private String progress; + @Schema(description = "失败原因") + private String failReason; + +} -- Gitee From 3c6fb95917c22a263628dd0e70e29d13f2c95112 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:38:04 +0800 Subject: [PATCH 0662/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91m?= =?UTF-8?q?idjourney=20proxy=20=E6=9E=9A=E4=B8=BE=20action=20=E5=92=8C=20s?= =?UTF-8?q?tatus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/MidjourneyTaskActionEnum.java | 35 +++++++++++++++++ .../enums/MidjourneyTaskStatusEnum.java | 38 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskActionEnum.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskStatusEnum.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskActionEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskActionEnum.java new file mode 100644 index 0000000000..a845a47f82 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskActionEnum.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.ai.client.enums; + +import lombok.Getter; + +/** + * 来源于 midjourney-proxy + */ +@Getter +public enum MidjourneyTaskActionEnum { + /** + * 生成图片. + */ + IMAGINE, + /** + * 选中放大. + */ + UPSCALE, + /** + * 选中其中的一张图,生成四张相似的. + */ + VARIATION, + /** + * 重新执行. + */ + REROLL, + /** + * 图转prompt. + */ + DESCRIBE, + /** + * 多图混合. + */ + BLEND + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskStatusEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskStatusEnum.java new file mode 100644 index 0000000000..b3af66e2e8 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneyTaskStatusEnum.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.ai.client.enums; + + +import lombok.Getter; + +/** + * 来源于 midjourney-proxy + */ +public enum MidjourneyTaskStatusEnum { + /** + * 未启动. + */ + NOT_START(0), + /** + * 已提交. + */ + SUBMITTED(1), + /** + * 执行中. + */ + IN_PROGRESS(3), + /** + * 失败. + */ + FAILURE(4), + /** + * 成功. + */ + SUCCESS(4); + + @Getter + private final int order; + + MidjourneyTaskStatusEnum(int order) { + this.order = order; + } + +} -- Gitee From 36b6fee0ec86d407af1c67585c3927606fddc8f6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 14:38:15 +0800 Subject: [PATCH 0663/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/client/{vo => enums}/MidjourneySubmitCodeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/{vo => enums}/MidjourneySubmitCodeEnum.java (93%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java similarity index 93% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java index 13bf09814d..3f432ce361 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneySubmitCodeEnum.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.client.vo; +package cn.iocoder.yudao.module.ai.client.enums; import com.google.common.collect.Lists; import lombok.AllArgsConstructor; -- Gitee From 127a98a93478abbaa0e54a49052b0793c6334d8e Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 31 May 2024 16:59:06 +0800 Subject: [PATCH 0664/1557] =?UTF-8?q?MALL-KEFU:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E7=9B=B8=E5=85=B3=E6=93=8D=E4=BD=9C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/mall-promotion-kefu.sql | 37 +++++ .../promotion/enums/ErrorCodeConstants.java | 6 + .../kefu/KeFuConversationController.java | 54 ++++++++ .../admin/kefu/KeFuMessageController.java | 58 ++++++++ .../conversation/KeFuConversationRespVO.java | 42 ++++++ .../KeFuConversationUpdatePinnedReqVO.java | 19 +++ .../kefu/vo/message/KeFuMessagePageReqVO.java | 16 +++ .../kefu/vo/message/KeFuMessageRespVO.java | 43 ++++++ .../kefu/vo/message/KeFuMessageSendReqVO.java | 43 ++++++ .../kefu/AppKeFuConversationController.java | 35 +++++ .../app/kefu/AppKeFuMessageController.java | 58 ++++++++ .../AppKeFuConversationRespVO.java | 42 ++++++ .../vo/message/AppKeFuMessagePageReqVO.java | 18 +++ .../kefu/vo/message/AppKeFuMessageRespVO.java | 42 ++++++ .../vo/message/AppKeFuMessageSendReqVO.java | 43 ++++++ .../dataobject/kefu/KeFuConversationDO.java | 8 +- .../mysql/kefu/KeFuConversationMapper.java | 38 ++++++ .../dal/mysql/kefu/KeFuMessageMapper.java | 42 ++++++ .../service/kefu/KeFuConversationService.java | 78 +++++++++++ .../kefu/KeFuConversationServiceImpl.java | 88 ++++++++++++ .../service/kefu/KeFuMessageService.java | 40 ++++++ .../service/kefu/KeFuMessageServiceImpl.java | 128 ++++++++++++++++++ .../module/member/api/user/MemberUserApi.java | 8 ++ .../member/api/user/MemberUserApiImpl.java | 11 ++ 24 files changed, 993 insertions(+), 4 deletions(-) create mode 100644 sql/mysql/mall-promotion-kefu.sql create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuConversationController.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuMessageController.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationRespVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationUpdatePinnedReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessagePageReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageRespVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageSendReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuConversationController.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuMessageController.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/conversation/AppKeFuConversationRespVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessagePageReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageRespVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageSendReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuConversationMapper.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationService.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationServiceImpl.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageService.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java diff --git a/sql/mysql/mall-promotion-kefu.sql b/sql/mysql/mall-promotion-kefu.sql new file mode 100644 index 0000000000..e0b478f573 --- /dev/null +++ b/sql/mysql/mall-promotion-kefu.sql @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS `promotion_kefu_conversation`; +CREATE TABLE `promotion_kefu_conversation` ( + `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '编号', + `user_id` BIGINT NOT NULL COMMENT '会话所属用户', + `last_message_time` DATETIME NOT NULL COMMENT '最后聊天时间', + `last_message_content` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '最后聊天内容', + `last_message_content_type` INT NOT NULL COMMENT '最后发送的消息类型', + `admin_pinned` BIT(1) NOT NULL DEFAULT b'0' COMMENT '管理端置顶', + `user_deleted` BIT(1) NOT NULL DEFAULT b'0' COMMENT '用户是否可见', + `admin_deleted` BIT(1) NOT NULL DEFAULT b'0' COMMENT '管理员是否可见', + `admin_unread_message_count` INT NOT NULL COMMENT '管理员未读消息数', + `creator` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` BIT(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '客服会话' ROW_FORMAT = Dynamic; + +DROP TABLE IF EXISTS `promotion_kefu_message`; +CREATE TABLE `promotion_kefu_message` ( + `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '编号', + `conversation_id` BIGINT NOT NULL COMMENT '会话编号', + `sender_id` BIGINT NOT NULL COMMENT '发送人编号', + `sender_type` INT NOT NULL COMMENT '发送人类型', + `receiver_id` BIGINT NOT NULL COMMENT '接收人编号', + `receiver_type` INT NOT NULL COMMENT '接收人类型', + `content_type` INT NOT NULL COMMENT '消息类型', + `content` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息', + `read_status` BIT(1) NOT NULL DEFAULT b'0' COMMENT '是否已读', + `creator` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` BIT(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '客服消息' ROW_FORMAT = Dynamic; diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/ErrorCodeConstants.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/ErrorCodeConstants.java index 3b19d616a7..8cebd6e13d 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/ErrorCodeConstants.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/ErrorCodeConstants.java @@ -125,4 +125,10 @@ public interface ErrorCodeConstants { ErrorCode DIY_PAGE_NOT_EXISTS = new ErrorCode(1_013_018_000, "装修页面不存在"); ErrorCode DIY_PAGE_NAME_USED = new ErrorCode(1_013_018_001, "装修页面名称({})已经被使用"); + // ========== 客服会话 1-013-019-000 ========== + ErrorCode KEFU_CONVERSATION_NOT_EXISTS = new ErrorCode(1_013_019_000, "客服会话不存在"); + + // ========== 客服消息 1-013-020-000 ========== + ErrorCode KEFU_MESSAGE_NOT_EXISTS = new ErrorCode(1_013_020_000, "客服消息不存在"); + } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuConversationController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuConversationController.java new file mode 100644 index 0000000000..099cc264c6 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuConversationController.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation.KeFuConversationRespVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation.KeFuConversationUpdatePinnedReqVO; +import cn.iocoder.yudao.module.promotion.service.kefu.KeFuConversationService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 客服会话") +@RestController +@RequestMapping("/promotion/kefu-conversation") +@Validated +public class KeFuConversationController { + + @Resource + private KeFuConversationService conversationService; + + @PostMapping("/update-pinned") + @Operation(summary = "置顶客服会话") + @PreAuthorize("@ss.hasPermission('promotion:kefu-conversation:update')") + public CommonResult updatePinned(@Valid @RequestBody KeFuConversationUpdatePinnedReqVO updateReqVO) { + conversationService.updatePinned(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除客服会话") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('promotion:kefu-conversation:delete')") + public CommonResult deleteKefuConversation(@RequestParam("id") Long id) { + conversationService.deleteKefuConversation(id); + return success(true); + } + + @GetMapping("/list") + @Operation(summary = "获得客服会话列表") + @PreAuthorize("@ss.hasPermission('promotion:kefu-conversation:query')") + public CommonResult> getKefuConversationPage() { + return success(BeanUtils.toBean(conversationService.getKefuConversationList(), KeFuConversationRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuMessageController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuMessageController.java new file mode 100644 index 0000000000..b8adada3a3 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/KeFuMessageController.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu; + +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessagePageReqVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageRespVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageSendReqVO; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; + +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuMessageDO; +import cn.iocoder.yudao.module.promotion.service.kefu.KeFuMessageService; + +@Tag(name = "管理后台 - 客服消息") +@RestController +@RequestMapping("/promotion/kefu-message") +@Validated +public class KeFuMessageController { + + @Resource + private KeFuMessageService messageService; + + @PostMapping("/send") + @Operation(summary = "发送客服消息") + @PreAuthorize("@ss.hasPermission('promotion:kefu-message:send')") + public CommonResult createKefuMessage(@Valid @RequestBody KeFuMessageSendReqVO sendReqVO) { + return success(messageService.sendKefuMessage(sendReqVO)); + } + + @PutMapping("/update-read-status") + @Operation(summary = "更新客服消息已读状态") + @Parameter(name = "conversationId", description = "会话编号", required = true) + @PreAuthorize("@ss.hasPermission('promotion:kefu-message:update')") + public CommonResult updateKefuMessageReadStatus(@RequestParam("conversationId") Long conversationId) { + messageService.updateKefuMessageReadStatus(conversationId, getLoginUserId()); + return success(true); + } + + @GetMapping("/page") + @Operation(summary = "获得客服消息分页") + @PreAuthorize("@ss.hasPermission('promotion:kefu-message:query')") + public CommonResult> getKefuMessagePage(@Valid KeFuMessagePageReqVO pageReqVO) { + PageResult pageResult = messageService.getKefuMessagePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, KeFuMessageRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationRespVO.java new file mode 100644 index 0000000000..b3748e147b --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationRespVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 客服会话 Response VO") +@Data +public class KeFuConversationRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24988") + private Long id; + + @Schema(description = "会话所属用户", requiredMode = Schema.RequiredMode.REQUIRED, example = "8300") + private Long userId; + + @Schema(description = "最后聊天时间", requiredMode = Schema.RequiredMode.REQUIRED,example = "2024-01-01 00:00:00") + private LocalDateTime lastMessageTime; + + @Schema(description = "最后聊天内容", requiredMode = Schema.RequiredMode.REQUIRED,example = "嗨,您好啊") + private String lastMessageContent; + + @Schema(description = "最后发送的消息类型", requiredMode = Schema.RequiredMode.REQUIRED,example = "1") + private Integer lastMessageContentType; + + @Schema(description = "管理端置顶", requiredMode = Schema.RequiredMode.REQUIRED,example = "false") + private Boolean adminPinned; + + @Schema(description = "用户是否可见", requiredMode = Schema.RequiredMode.REQUIRED,example = "true") + private Boolean userDeleted; + + @Schema(description = "管理员是否可见", requiredMode = Schema.RequiredMode.REQUIRED,example = "true") + private Boolean adminDeleted; + + @Schema(description = "管理员未读消息数", requiredMode = Schema.RequiredMode.REQUIRED,example = "6") + private Integer adminUnreadMessageCount; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED,example = "2024-01-01 00:00:00") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationUpdatePinnedReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationUpdatePinnedReqVO.java new file mode 100644 index 0000000000..235f78227b --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/conversation/KeFuConversationUpdatePinnedReqVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 客服会话置顶 Request VO") +@Data +public class KeFuConversationUpdatePinnedReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23202") + @NotNull(message = "会话编号,不能为空") + private Long id; + + @Schema(description = "管理端置顶", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") + @NotNull(message = "管理端置顶,不能为空") + private Boolean adminPinned; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessagePageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessagePageReqVO.java new file mode 100644 index 0000000000..ec5e7261c1 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessagePageReqVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +@Schema(description = "管理后台 - 客服消息分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class KeFuMessagePageReqVO extends PageParam { + + @Schema(description = "会话编号", example = "12580") + private Long conversationId; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageRespVO.java new file mode 100644 index 0000000000..41f9c52f68 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageRespVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 客服消息 Response VO") +@Data +public class KeFuMessageRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23202") + private Long id; + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12580") + private Long conversationId; + + @Schema(description = "发送人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24571") + private Long senderId; + + @Schema(description = "发送人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer senderType; + + @Schema(description = "接收人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29124") + private Long receiverId; + + @Schema(description = "接收人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer receiverType; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer contentType; + + @Schema(description = "消息", requiredMode = Schema.RequiredMode.REQUIRED) + private String content; + + @Schema(description = "是否已读", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Boolean readStatus; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageSendReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageSendReqVO.java new file mode 100644 index 0000000000..5ac8f04c44 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageSendReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 发送客服消息 Request VO") +@Data +public class KeFuMessageSendReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23202") + private Long id; + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12580") + @NotNull(message = "会话编号不能为空") + private Long conversationId; + + @Schema(description = "发送人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24571") + @NotNull(message = "发送人编号不能为空") + private Long senderId; + + @Schema(description = "发送人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "发送人类型不能为空") + private Integer senderType; + + @Schema(description = "接收人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29124") + @NotNull(message = "接收人编号不能为空") + private Long receiverId; + + @Schema(description = "接收人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "接收人类型不能为空") + private Integer receiverType; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "消息类型不能为空") + private Integer contentType; + + @Schema(description = "消息", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "消息不能为空") + private String content; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuConversationController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuConversationController.java new file mode 100644 index 0000000000..15c0e2892b --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuConversationController.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; +import cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.conversation.AppKeFuConversationRespVO; +import cn.iocoder.yudao.module.promotion.service.kefu.KeFuConversationService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; + +@Tag(name = "用户 APP - 客户会话") +@RestController +@RequestMapping("/promotion/kefu-conversation") +@Validated +public class AppKeFuConversationController { + + @Resource + private KeFuConversationService conversationService; + + @GetMapping("/get") + @Operation(summary = "获得客服会话") + @PreAuthenticated + public CommonResult getDiyPage() { + return success(BeanUtils.toBean(conversationService.getOrCreateConversation(getLoginUserId()), AppKeFuConversationRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuMessageController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuMessageController.java new file mode 100644 index 0000000000..1af72dba7a --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/AppKeFuMessageController.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessagePageReqVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageRespVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageSendReqVO; +import cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.message.AppKeFuMessageSendReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuMessageDO; +import cn.iocoder.yudao.module.promotion.service.kefu.KeFuMessageService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; + +@Tag(name = "管理后台 - 客服消息") +@RestController +@RequestMapping("/promotion/kefu-message") +@Validated +public class AppKeFuMessageController { + + @Resource + private KeFuMessageService kefuMessageService; + + @PostMapping("/send") + @Operation(summary = "发送客服消息") + @PreAuthenticated + public CommonResult createKefuMessage(@Valid @RequestBody AppKeFuMessageSendReqVO sendReqVO) { + return success(kefuMessageService.sendKefuMessage(BeanUtils.toBean(sendReqVO, KeFuMessageSendReqVO.class))); + } + + @PutMapping("/update-read-status") + @Operation(summary = "更新客服消息已读状态") + @Parameter(name = "conversationId", description = "会话编号", required = true) + @PreAuthenticated + public CommonResult updateKefuMessageReadStatus(@RequestParam("conversationId") Long conversationId) { + kefuMessageService.updateKefuMessageReadStatus(conversationId, getLoginUserId()); + return success(true); + } + + @GetMapping("/page") + @Operation(summary = "获得客服消息分页") + @PreAuthenticated + public CommonResult> getKefuMessagePage(@Valid KeFuMessagePageReqVO pageReqVO) { + PageResult pageResult = kefuMessageService.getKefuMessagePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, KeFuMessageRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/conversation/AppKeFuConversationRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/conversation/AppKeFuConversationRespVO.java new file mode 100644 index 0000000000..39a295dc15 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/conversation/AppKeFuConversationRespVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.conversation; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; + +@Schema(description = "用户 App - 客服会话 Response VO") +@Data +public class AppKeFuConversationRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24988") + private Long id; + + @Schema(description = "会话所属用户", requiredMode = Schema.RequiredMode.REQUIRED, example = "8300") + private Long userId; + + @Schema(description = "最后聊天时间", requiredMode = Schema.RequiredMode.REQUIRED,example = "2024-01-01 00:00:00") + private LocalDateTime lastMessageTime; + + @Schema(description = "最后聊天内容", requiredMode = Schema.RequiredMode.REQUIRED,example = "嗨,您好啊") + private String lastMessageContent; + + @Schema(description = "最后发送的消息类型", requiredMode = Schema.RequiredMode.REQUIRED,example = "1") + private Integer lastMessageContentType; + + @Schema(description = "管理端置顶", requiredMode = Schema.RequiredMode.REQUIRED,example = "false") + private Boolean adminPinned; + + @Schema(description = "用户是否可见", requiredMode = Schema.RequiredMode.REQUIRED,example = "true") + private Boolean userDeleted; + + @Schema(description = "管理员是否可见", requiredMode = Schema.RequiredMode.REQUIRED,example = "true") + private Boolean adminDeleted; + + @Schema(description = "管理员未读消息数", requiredMode = Schema.RequiredMode.REQUIRED,example = "6") + private Integer adminUnreadMessageCount; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED,example = "2024-01-01 00:00:00") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessagePageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessagePageReqVO.java new file mode 100644 index 0000000000..a332d34add --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessagePageReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.message; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "用户 App - 客服消息分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AppKeFuMessagePageReqVO extends PageParam { + + @Schema(description = "会话编号", example = "12580") + private Long conversationId; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageRespVO.java new file mode 100644 index 0000000000..fb7331afc8 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageRespVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "用户 App - 客服消息 Response VO") +@Data +public class AppKeFuMessageRespVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23202") + private Long id; + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12580") + private Long conversationId; + + @Schema(description = "发送人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24571") + private Long senderId; + + @Schema(description = "发送人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer senderType; + + @Schema(description = "接收人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29124") + private Long receiverId; + + @Schema(description = "接收人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private Integer receiverType; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer contentType; + + @Schema(description = "消息", requiredMode = Schema.RequiredMode.REQUIRED) + private String content; + + @Schema(description = "是否已读", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Boolean readStatus; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageSendReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageSendReqVO.java new file mode 100644 index 0000000000..f2de632dad --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessageSendReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.promotion.controller.app.kefu.vo.message; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "用户 App - 发送客服消息 Request VO") +@Data +public class AppKeFuMessageSendReqVO { + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23202") + private Long id; + + @Schema(description = "会话编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12580") + @NotNull(message = "会话编号不能为空") + private Long conversationId; + + @Schema(description = "发送人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24571") + @NotNull(message = "发送人编号不能为空") + private Long senderId; + + @Schema(description = "发送人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "发送人类型不能为空") + private Integer senderType; + + @Schema(description = "接收人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29124") + @NotNull(message = "接收人编号不能为空") + private Long receiverId; + + @Schema(description = "接收人类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "接收人类型不能为空") + private Integer receiverType; + + @Schema(description = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "消息类型不能为空") + private Integer contentType; + + @Schema(description = "消息", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "消息不能为空") + private String content; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java index 04432eebe6..e9a73284f7 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/kefu/KeFuConversationDO.java @@ -61,15 +61,15 @@ public class KeFuConversationDO extends BaseDO { /** * 用户是否可见 * - * true - 可见,默认值 - * false - 不可见,用户删除时设置为 false + * false - 可见,默认值 + * true - 不可见,用户删除时设置为 true */ private Boolean userDeleted; /** * 管理员是否可见 * - * true - 可见,默认值 - * false - 不可见,管理员删除时设置为 false + * false - 可见,默认值 + * true - 不可见,管理员删除时设置为 true */ private Boolean adminDeleted; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuConversationMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuConversationMapper.java new file mode 100644 index 0000000000..eae9b74013 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuConversationMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.promotion.dal.mysql.kefu; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuConversationDO; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 客服会话 Mapper + * + * @author HUIHUI + */ +@Mapper +public interface KeFuConversationMapper extends BaseMapperX { + + default List selectListWithSort() { + return selectList(new LambdaQueryWrapperX() + .eq(KeFuConversationDO::getAdminDeleted, Boolean.FALSE) + .orderByDesc(KeFuConversationDO::getAdminPinned) // 置顶优先 + .orderByDesc(KeFuConversationDO::getCreateTime)); + } + + default void updateAdminUnreadMessageCountByConversationId(Long id, Integer count) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(KeFuConversationDO::getId, id); + if (count != null && count > 0) { // 情况一:会员发送消息时增加管理员的未读消息数 + updateWrapper.setSql("admin_unread_message_count = admin_unread_message_count + 1"); + } else { // 情况二:管理员已读后重置 + updateWrapper.set(KeFuConversationDO::getAdminUnreadMessageCount, 0); + } + + update(updateWrapper); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java new file mode 100644 index 0000000000..5ec0a6cd9a --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.promotion.dal.mysql.kefu; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessagePageReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuMessageDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.Collection; +import java.util.List; + +/** + * 客服消息 Mapper + * + * @author HUIHUI + */ +@Mapper +public interface KeFuMessageMapper extends BaseMapperX { + + default PageResult selectPage(KeFuMessagePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(KeFuMessageDO::getConversationId, reqVO.getConversationId()) + .orderByDesc(KeFuMessageDO::getId)); + } + + default List selectListByConversationIdAndReceiverIdAndReadStatus(Long conversationId, Long receiverId, Boolean readStatus) { + return selectList(new LambdaQueryWrapper() + .eq(KeFuMessageDO::getConversationId, conversationId) + .eq(KeFuMessageDO::getReceiverId, receiverId) + .eq(KeFuMessageDO::getReadStatus, readStatus)); + } + + default void updateReadStstusBatchByIds(Collection ids, Boolean readStatus) { + update(new LambdaUpdateWrapper() + .in(KeFuMessageDO::getId, ids) + .set(KeFuMessageDO::getReadStatus, readStatus)); + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationService.java new file mode 100644 index 0000000000..828626310d --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationService.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.promotion.service.kefu; + +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation.KeFuConversationUpdatePinnedReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuConversationDO; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * 客服会话 Service 接口 + * + * @author HUIHUI + */ +public interface KeFuConversationService { + + /** + * 删除客服会话 + * + * @param id 编号 + */ + void deleteKefuConversation(Long id); + + /** + * 客服会话置顶 + * + * @param updateReqVO 请求 + */ + void updatePinned(KeFuConversationUpdatePinnedReqVO updateReqVO); + + /** + * 更新会话客服消息冗余信息 + * + * @param id 编号 + * @param lastMessageTime 最后聊天时间 + * @param lastMessageContent 最后聊天内容 + * @param lastMessageContentType 最后聊天内容类型 + */ + void updateConversationMessage(Long id, LocalDateTime lastMessageTime, String lastMessageContent, Integer lastMessageContentType); + + /** + * 更新管理员未读消息数 + * + * @param id 编号 + * @param count 数量:0 则重置 1 则消息数加一 + */ + void updateAdminUnreadMessageCountByConversationId(Long id, Integer count); + + /** + * 更新会话对于管理员是否可见 + * + * @param adminDeleted 管理员是否可见 + */ + void updateConversationAdminDeleted(Long id, Boolean adminDeleted); + + /** + * 获得客服会话列表 + * + * @return 会话列表 + */ + List getKefuConversationList(); + + /** + * 获得或创建会话 + * + * @param userId 用户编号 + * @return 客服会话 + */ + KeFuConversationDO getOrCreateConversation(Long userId); + + /** + * 校验客服会话是否存在 + * + * @param id 编号 + * @return 客服会话 + */ + KeFuConversationDO validateKefuConversationExists(Long id); + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationServiceImpl.java new file mode 100644 index 0000000000..416e613ffb --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuConversationServiceImpl.java @@ -0,0 +1,88 @@ +package cn.iocoder.yudao.module.promotion.service.kefu; + +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.conversation.KeFuConversationUpdatePinnedReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuConversationDO; +import cn.iocoder.yudao.module.promotion.dal.mysql.kefu.KeFuConversationMapper; +import cn.iocoder.yudao.module.promotion.enums.kehu.KeFuMessageContentTypeEnum; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.KEFU_CONVERSATION_NOT_EXISTS; + +/** + * 客服会话 Service 实现类 + * + * @author HUIHUI + */ +@Service +@Validated +public class KeFuConversationServiceImpl implements KeFuConversationService { + + @Resource + private KeFuConversationMapper conversationMapper; + + @Override + public void deleteKefuConversation(Long id) { + // 校验存在 + validateKefuConversationExists(id); + + // 只有管理员端可以删除会话,也不真的删,只是管理员端看不到啦 + conversationMapper.updateById(new KeFuConversationDO().setId(id).setAdminDeleted(Boolean.TRUE)); + } + + @Override + public void updatePinned(KeFuConversationUpdatePinnedReqVO updateReqVO) { + // 只有管理员端可以置顶会话 + conversationMapper.updateById(new KeFuConversationDO().setId(updateReqVO.getId()).setAdminPinned(updateReqVO.getAdminPinned())); + } + + @Override + public void updateConversationMessage(Long id, LocalDateTime lastMessageTime, String lastMessageContent, Integer lastMessageContentType) { + conversationMapper.updateById(new KeFuConversationDO().setId(id).setLastMessageTime(lastMessageTime) + .setLastMessageContent(lastMessageContent).setLastMessageContentType(lastMessageContentType)); + } + + @Override + public void updateAdminUnreadMessageCountByConversationId(Long id, Integer count) { + conversationMapper.updateAdminUnreadMessageCountByConversationId(id, count); + } + + @Override + public void updateConversationAdminDeleted(Long id, Boolean adminDeleted) { + conversationMapper.updateById(new KeFuConversationDO().setId(id).setAdminDeleted(adminDeleted)); + } + + @Override + public List getKefuConversationList() { + return conversationMapper.selectListWithSort(); + } + + @Override + public KeFuConversationDO getOrCreateConversation(Long userId) { + KeFuConversationDO conversation = conversationMapper.selectOne(KeFuConversationDO::getUserId, userId); + if (conversation == null) { // 没有历史会话则初始化一个新会话 + conversation = new KeFuConversationDO().setUserId(userId).setLastMessageTime(LocalDateTime.now()) + .setLastMessageContent("").setLastMessageContentType(KeFuMessageContentTypeEnum.TEXT.getType()) + .setAdminPinned(Boolean.FALSE).setUserDeleted(Boolean.FALSE).setAdminDeleted(Boolean.FALSE) + .setAdminUnreadMessageCount(0); + conversationMapper.insert(conversation); + } + return conversation; + } + + @Override + public KeFuConversationDO validateKefuConversationExists(Long id) { + KeFuConversationDO conversationDO = conversationMapper.selectById(id); + if (conversationDO == null) { + throw exception(KEFU_CONVERSATION_NOT_EXISTS); + } + + return conversationDO; + } + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageService.java new file mode 100644 index 0000000000..10d5aca328 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageService.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.promotion.service.kefu; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessagePageReqVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageSendReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuMessageDO; +import jakarta.validation.Valid; + +/** + * 客服消息 Service 接口 + * + * @author HUIHUI + */ +public interface KeFuMessageService { + + /** + * 发送客服消息 + * + * @param sendReqVO 信息 + * @return 编号 + */ + Long sendKefuMessage(@Valid KeFuMessageSendReqVO sendReqVO); + + /** + * 更新消息已读状态 + * + * @param conversationId 会话编号 + * @param receiverId 用户编号 + */ + void updateKefuMessageReadStatus(Long conversationId, Long receiverId); + + /** + * 获得客服消息分页 + * + * @param pageReqVO 分页查询 + * @return 客服消息分页 + */ + PageResult getKefuMessagePage(KeFuMessagePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java new file mode 100644 index 0000000000..ff6224407a --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.module.promotion.service.kefu; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.extra.spring.SpringUtil; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.infra.api.websocket.WebSocketSenderApi; +import cn.iocoder.yudao.module.member.api.user.MemberUserApi; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessagePageReqVO; +import cn.iocoder.yudao.module.promotion.controller.admin.kefu.vo.message.KeFuMessageSendReqVO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuConversationDO; +import cn.iocoder.yudao.module.promotion.dal.dataobject.kefu.KeFuMessageDO; +import cn.iocoder.yudao.module.promotion.dal.mysql.kefu.KeFuMessageMapper; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import jakarta.annotation.Resource; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.getFirst; + +/** + * 客服消息 Service 实现类 + * + * @author HUIHUI + */ +@Service +@Validated +public class KeFuMessageServiceImpl implements KeFuMessageService { + + private static final String KEFU_MESSAGE_TYPE = "kefu_message_type"; // 客服消息类型 + + @Resource + private KeFuMessageMapper messageMapper; + @Resource + private KeFuConversationService conversationService; + @Resource + private AdminUserApi adminUserApi; + @Resource + private MemberUserApi memberUserApi; + @Resource + private WebSocketSenderApi webSocketSenderApi; + + @Override + @Transactional(rollbackFor = Exception.class) + public Long sendKefuMessage(KeFuMessageSendReqVO sendReqVO) { + // 1.1 校验会话是否存在 + KeFuConversationDO conversation = conversationService.validateKefuConversationExists(sendReqVO.getConversationId()); + // 1.2 校验接收人是否存在 + validateReceiverExist(sendReqVO.getReceiverId(), sendReqVO.getReceiverType()); + + // 2.1 保存消息 + KeFuMessageDO kefuMessage = BeanUtils.toBean(sendReqVO, KeFuMessageDO.class); + messageMapper.insert(kefuMessage); + // 2.2 更新会话消息冗余 + conversationService.updateConversationMessage(kefuMessage.getConversationId(), LocalDateTime.now(), + kefuMessage.getContent(), kefuMessage.getContentType()); + // 2.3 更新管理员未读消息数 + if (UserTypeEnum.ADMIN.getValue().equals(kefuMessage.getReceiverType())) { + conversationService.updateAdminUnreadMessageCountByConversationId(kefuMessage.getConversationId(), 1); + } + // 2.4 会员用户发送消息时,如果管理员删除过会话则进行恢复 + if (UserTypeEnum.MEMBER.getValue().equals(kefuMessage.getSenderType()) && Boolean.TRUE.equals(conversation.getAdminDeleted())) { + conversationService.updateConversationAdminDeleted(kefuMessage.getConversationId(), Boolean.FALSE); + } + + // 3. 发送消息 + getSelf().sendAsyncMessage(sendReqVO.getReceiverType(), sendReqVO.getReceiverId(), kefuMessage); + + // 返回 + return kefuMessage.getId(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateKefuMessageReadStatus(Long conversationId, Long receiverId) { + // 1.1 校验会话是否存在 + conversationService.validateKefuConversationExists(conversationId); + // 1.2 查询接收人所有的未读消息 + List messageList = messageMapper.selectListByConversationIdAndReceiverIdAndReadStatus( + conversationId, receiverId, Boolean.FALSE); + // 1.3 情况一:没有未读消息 + if (CollUtil.isEmpty(messageList)) { + return; + } + + // 2.1 情况二:更新未读消息状态为已读 + messageMapper.updateReadStstusBatchByIds(convertSet(messageList, KeFuMessageDO::getId), Boolean.TRUE); + // 2.2 更新管理员未读消息数 + KeFuMessageDO message = getFirst(messageList); + assert message != null; + if (UserTypeEnum.ADMIN.getValue().equals(message.getReceiverType())) { + conversationService.updateAdminUnreadMessageCountByConversationId(conversationId, 0); + } + // 2.3 发送消息通知发送者,接收者已读 -> 发送者更新发送的消息状态 + getSelf().sendAsyncMessage(message.getSenderType(), message.getSenderId(), "keFuMessageReadStatusChange"); + } + + private void validateReceiverExist(Long receiverId, Integer receiverType) { + if (UserTypeEnum.ADMIN.getValue().equals(receiverType)) { + adminUserApi.validateUser(receiverId); + } + if (UserTypeEnum.MEMBER.getValue().equals(receiverType)) { + memberUserApi.validateUser(receiverId); + } + } + + @Async + public void sendAsyncMessage(Integer userType, Long userId, Object content) { + webSocketSenderApi.sendObject(userType, userId, KEFU_MESSAGE_TYPE, content); + } + + @Override + public PageResult getKefuMessagePage(KeFuMessagePageReqVO pageReqVO) { + return messageMapper.selectPage(pageReqVO); + } + + private KeFuMessageServiceImpl getSelf() { + return SpringUtil.getBean(getClass()); + } + +} \ No newline at end of file diff --git a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApi.java b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApi.java index c9fb801007..da74aaa920 100644 --- a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApi.java +++ b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApi.java @@ -57,4 +57,12 @@ public interface MemberUserApi { * @return 用户信息 */ MemberUserRespDTO getUserByMobile(String mobile); + + /** + * 校验用户是否存在 + * + * @param id 用户编号 + */ + void validateUser(Long id); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java index 659c39b577..960930ddca 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java @@ -11,6 +11,9 @@ import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.USER_MOBILE_NOT_EXISTS; + /** * 会员用户的 API 实现类 * @@ -44,4 +47,12 @@ public class MemberUserApiImpl implements MemberUserApi { return MemberUserConvert.INSTANCE.convert2(userService.getUserByMobile(mobile)); } + @Override + public void validateUser(Long id) { + MemberUserDO user = userService.getUser(id); + if (user == null) { + throw exception(USER_MOBILE_NOT_EXISTS); + } + } + } -- Gitee From 56e8707e387736294cf431425e978fdc2575bd3a Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 17:05:28 +0800 Subject: [PATCH 0665/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91M?= =?UTF-8?q?idjourney=20Proxy=20=E5=9B=9E=E8=B0=83=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tifyVO.java => MidjourneyNotifyReqVO.java} | 5 +- .../admin/image/AiImageController.java | 8 +-- .../ai/dal/dataobject/image/AiImageDO.java | 3 + .../ai/dal/mysql/image/AiImageMapper.java | 11 ++- .../ai/service/image/AiImageService.java | 9 +++ .../ai/service/image/AiImageServiceImpl.java | 71 ++++++++++--------- 6 files changed, 67 insertions(+), 40 deletions(-) rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/{MidjourneyNotifyVO.java => MidjourneyNotifyReqVO.java} (92%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java similarity index 92% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java index c2a934331e..3cc92c7194 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java @@ -11,7 +11,10 @@ import lombok.Data; * @since 1.0 */ @Data -public class MidjourneyNotifyVO { +public class MidjourneyNotifyReqVO { + + @Schema(description = "job id") + private String id; @Schema(description = "任务类型") private MidjourneyTaskActionEnum action; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index bef20fe145..1ffe4f1c86 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; @@ -13,7 +14,6 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -74,9 +74,9 @@ public class AiImageController { return success(aiImageService.deleteIdMy(id, getLoginUserId())); } - @Operation(summary = "删除【我的】绘画记录") + @Operation(summary = "midjourney proxy - 回调通知") @RequestMapping("/midjourney-notify") - public CommonResult midjourneyNotify(HttpServletRequest request) { - return success(true); + public CommonResult midjourneyNotify(MidjourneyNotifyReqVO notifyReqVO) { + return success(aiImageService.midjourneyNotify(getLoginUserId(), notifyReqVO)); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 259215cdc1..0f6282a279 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -28,6 +28,9 @@ public class AiImageDO extends BaseDO { @Schema(description = "用户编号") private Long userId; + @Schema(description = "midjourney proxy 关联的 job id") + private String jobId; + @Schema(description = "提示词") private String prompt; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index f60668d218..af37a29376 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; /** * AI 绘图 Mapper @@ -26,4 +25,14 @@ public interface AiImageMapper extends BaseMapperX { return; } + /** + * 查询 - 根据 job id + * + * @param id + * @return + */ + default AiImageDO selectByJobId(String id) { + return this.selectOne(new LambdaQueryWrapperX().eq(AiImageDO::getJobId, id)); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index b07ba7dd8c..05ad0ed287 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; @@ -65,4 +66,12 @@ public interface AiImageService { */ Boolean deleteIdMy(Long id, Long loginUserId); + /** + * midjourney proxy - 回调通知 + * + * @param loginUserId + * @param notifyReqVO + * @return + */ + Boolean midjourneyNotify(Long loginUserId, MidjourneyNotifyReqVO notifyReqVO); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index bef3b600bb..16887045f6 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.ai.service.image; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; @@ -14,9 +16,14 @@ import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; import cn.iocoder.yudao.module.ai.client.enums.MidjourneyModelEnum; import cn.iocoder.yudao.module.ai.client.enums.MidjourneySubmitCodeEnum; +import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskStatusEnum; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; +import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.*; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperateReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImagePublicStatusEnum; @@ -36,15 +43,9 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -// TODO @fan:注释优化下哈 - /** * AI 绘画(接入 dall2/dall3、midjourney) * @@ -56,9 +57,6 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU @Slf4j public class AiImageServiceImpl implements AiImageService { - // TODO @fan:使用 @Resource 注入 - - // TODO @fan:imageMapper @Resource private AiImageMapper imageMapper; @Resource @@ -173,19 +171,16 @@ public class AiImageServiceImpl implements AiImageService { // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) String updateStatus = null; String errorMessage = null; - Map drawResponse = new HashMap<>(); if (!MidjourneySubmitCodeEnum.SUCCESS_CODES.contains(submitRespVO.getCode())) { updateStatus = AiImageStatusEnum.FAIL.getStatus(); errorMessage = submitRespVO.getDescription(); - } else { - drawResponse.put("jobId", submitRespVO.getResult()); } imageMapper.updateById(new AiImageDO() .setId(aiImageDO.getId()) .setStatus(updateStatus) .setErrorMessage(errorMessage) - .setDrawResponse(drawResponse) + .setJobId(submitRespVO.getResult()) ); return aiImageDO.getId(); } @@ -228,28 +223,36 @@ public class AiImageServiceImpl implements AiImageService { return imageMapper.deleteById(id) > 0; } - private void validateMessageId(String mjMessageId, String messageId) { - if (!mjMessageId.equals(messageId)) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_MESSAGE_ID_INCORRECT); + @Override + public Boolean midjourneyNotify(Long loginUserId, MidjourneyNotifyReqVO notifyReqVO) { + // 1、根据 job id 查询关联的 image + AiImageDO image = imageMapper.selectByJobId(notifyReqVO.getId()); + if (image == null) { + log.warn("midjourneyNotify 回调的 jobId 不存在! jobId: {}", notifyReqVO.getId()); + return false; } - } - - private AiImageMidjourneyOperationsVO validateMidjourneyOperationsExists(List midjourneyOperations, String operateId) { - for (AiImageMidjourneyOperationsVO midjourneyOperation : midjourneyOperations) { - if (midjourneyOperation.getCustom_id().equals(operateId)) { - return midjourneyOperation; - } + // + String imageStatus = null; + if (MidjourneyTaskStatusEnum.SUCCESS == notifyReqVO.getStatus()) { + imageStatus = AiImageStatusEnum.COMPLETE.getStatus(); + } else if (MidjourneyTaskStatusEnum.FAILURE == notifyReqVO.getStatus()) { + imageStatus = AiImageStatusEnum.FAIL.getStatus(); } - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_OPERATION_NOT_EXISTS); - } - - - private List getMidjourneyOperations(AiImageDO aiImageDO) { -// if (StrUtil.isBlank(aiImageDO.getMjOperations())) { -// return Collections.emptyList(); -// } -// return JsonUtils.parseArray(aiImageDO.getMjOperations(), AiImageMidjourneyOperationsVO.class); - return null; + // 2、上传图片 + String filePath = null; + if (!StrUtil.isBlank(notifyReqVO.getImageUrl())) { + filePath = fileApi.createFile(HttpUtil.downloadBytes(notifyReqVO.getImageUrl())); + } + // 2、更新 image 状态 + imageMapper.updateById( + new AiImageDO() + .setId(image.getId()) + .setStatus(imageStatus) + .setPicUrl(filePath) + .setOriginalPicUrl(notifyReqVO.getImageUrl()) + .setDrawResponse(BeanUtil.beanToMap(notifyReqVO)) + ); + return true; } private AiImageDO validateExists(Long id) { -- Gitee From c1f2e490663a337fe87eeaa6d3fc870003acb21d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 31 May 2024 17:06:41 +0800 Subject: [PATCH 0666/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=20midjourney=20=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/image/AiImageController.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 1ffe4f1c86..1c5b40fc59 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -61,12 +61,6 @@ public class AiImageController { return success(aiImageService.dall(getLoginUserId(), req)); } - @Operation(summary = "midjourney-imagine 绘画", description = "...") - @PostMapping("/midjourney/imagine") - public CommonResult midjourneyImagine(@Validated @RequestBody AiImageMidjourneyImagineReqVO req) { - return success(aiImageService.midjourneyImagine(getLoginUserId(), req)); - } - @Operation(summary = "删除【我的】绘画记录") @DeleteMapping("/delete-id-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") @@ -74,6 +68,14 @@ public class AiImageController { return success(aiImageService.deleteIdMy(id, getLoginUserId())); } + // ================ midjourney 接口 + + @Operation(summary = "midjourney-imagine 绘画", description = "...") + @PostMapping("/midjourney/imagine") + public CommonResult midjourneyImagine(@Validated @RequestBody AiImageMidjourneyImagineReqVO req) { + return success(aiImageService.midjourneyImagine(getLoginUserId(), req)); + } + @Operation(summary = "midjourney proxy - 回调通知") @RequestMapping("/midjourney-notify") public CommonResult midjourneyNotify(MidjourneyNotifyReqVO notifyReqVO) { -- Gitee From 458f5acdf0c0929fc942bda031338237913ecad1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 31 May 2024 21:47:48 +0800 Subject: [PATCH 0667/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91AI=EF=BC=9AImage=20=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9A=84=E5=88=97=E8=A1=A8=E3=80=81=E8=AF=A6=E6=83=85=E7=AD=89?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/AiImageController.java | 49 +++++------ .../admin/image/vo/AiImageListReqVO.java | 18 ---- .../admin/image/vo/AiImageMidjourneyRes.java | 16 ---- ...gePageMyRespVO.java => AiImageRespVO.java} | 14 +-- .../ai/dal/mysql/image/AiImageMapper.java | 8 ++ .../ai/service/image/AiImageService.java | 40 ++++----- .../ai/service/image/AiImageServiceImpl.java | 88 +++++++------------ 7 files changed, 83 insertions(+), 150 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java rename yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/{AiImagePageMyRespVO.java => AiImageRespVO.java} (84%) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 1c5b40fc59..15e4304e65 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -1,13 +1,14 @@ package cn.iocoder.yudao.module.ai.controller.admin.image; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImagePageMyRespVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.service.image.AiImageService; import io.swagger.v3.oas.annotations.Operation; @@ -21,35 +22,30 @@ import org.springframework.web.bind.annotation.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Tag(name = "管理后台 - Ai 绘画") +@Tag(name = "管理后台 - AI 绘画") @RestController @RequestMapping("/ai/image") @Slf4j public class AiImageController { @Resource - private AiImageService aiImageService; + private AiImageService imageService; @Operation(summary = "获取【我的】绘图分页") @GetMapping("/my-page") - public CommonResult> getImagePageMy(@Validated AiImageListReqVO req) { - // 转换 resp - PageResult pageResult = aiImageService.getImagePageMy(getLoginUserId(), req); - // 转换 PageResult 返回 - PageResult result = new PageResult<>(); - result.setTotal(pageResult.getTotal()); - result.setList(BeanUtils.toBean(pageResult.getList(), AiImagePageMyRespVO.class)); - return success(result); + public CommonResult> getImagePageMy(@Validated PageParam pageReqVO) { + PageResult pageResult = imageService.getImagePageMy(getLoginUserId(), pageReqVO); + return success(BeanUtils.toBean(pageResult, AiImageRespVO.class)); } - // TODO @fan:类似 /my-page 的建议 - @Operation(summary = "获取【我的】绘图记录", description = "...") + @Operation(summary = "获取【我的】绘图记录") @GetMapping("/get-my") - public CommonResult getMy(@RequestParam("id") Long id) { - // 获取 image 信息 - AiImageDO imageDO = aiImageService.getMy(id); - // 转 resp 并返回 - return CommonResult.success(BeanUtils.toBean(imageDO, AiImagePageMyRespVO.class)); + public CommonResult getImageMy(@RequestParam("id") Long id) { + AiImageDO image = imageService.getImage(id); + if (image == null || ObjUtil.notEqual(getLoginUserId(), image.getUserId())) { + return success(null); + } + return success(BeanUtils.toBean(image, AiImageRespVO.class)); } // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 @@ -58,14 +54,15 @@ public class AiImageController { @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") @PostMapping("/dall") public CommonResult dall(@Validated @RequestBody AiImageDallReqVO req) { - return success(aiImageService.dall(getLoginUserId(), req)); + return success(imageService.dall(getLoginUserId(), req)); } @Operation(summary = "删除【我的】绘画记录") - @DeleteMapping("/delete-id-my") + @DeleteMapping("/delete-my") @Parameter(name = "id", required = true, description = "绘画编号", example = "1024") - public CommonResult deleteIdMy(@RequestParam("id") Long id) { - return success(aiImageService.deleteIdMy(id, getLoginUserId())); + public CommonResult deleteImageMy(@RequestParam("id") Long id) { + imageService.deleteImageMy(id, getLoginUserId()); + return success(true); } // ================ midjourney 接口 @@ -73,12 +70,14 @@ public class AiImageController { @Operation(summary = "midjourney-imagine 绘画", description = "...") @PostMapping("/midjourney/imagine") public CommonResult midjourneyImagine(@Validated @RequestBody AiImageMidjourneyImagineReqVO req) { - return success(aiImageService.midjourneyImagine(getLoginUserId(), req)); + return success(imageService.midjourneyImagine(getLoginUserId(), req)); } + // TODO @fan:可以考虑,复用 AiImageDallRespVO,统一成 AIImageRespVO @Operation(summary = "midjourney proxy - 回调通知") @RequestMapping("/midjourney-notify") public CommonResult midjourneyNotify(MidjourneyNotifyReqVO notifyReqVO) { - return success(aiImageService.midjourneyNotify(getLoginUserId(), notifyReqVO)); + return success(imageService.midjourneyNotify(getLoginUserId(), notifyReqVO)); } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java deleted file mode 100644 index 6af9803638..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageListReqVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.image.vo; - -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * AI Image 我的图片列表 req - * - * @author fansili - * @time 2024/4/28 17:42 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiImageListReqVO extends PageParam { - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java deleted file mode 100644 index 8d1a52e8c4..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyRes.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.image.vo; - -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * midjourney - * - * @author fansili - * @time 2024/4/28 17:42 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiImageMidjourneyRes { -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java similarity index 84% rename from yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java index e542879ca2..4d12f7f4bf 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePageMyRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java @@ -1,23 +1,13 @@ package cn.iocoder.yudao.module.ai.controller.admin.image.vo; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.experimental.Accessors; import java.util.Map; -// TODO @fan:可以考虑,复用 AiImageDallRespVO,统一成 AIImageRespVO -/** - * midjourney req - * - * @author fansili - * @time 2024/4/28 17:42 - * @since 1.0 - */ +// TODO @芋艿:完善 swagger 注解 @Data -@Accessors(chain = true) -public class AiImagePageMyRespVO extends PageParam { +public class AiImageRespVO { @Schema(description = "id编号", example = "1") private Long id; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index af37a29376..aada8a661d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.ai.dal.mysql.image; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; @@ -35,4 +37,10 @@ public interface AiImageMapper extends BaseMapperX { return this.selectOne(new LambdaQueryWrapperX().eq(AiImageDO::getJobId, id)); } + default PageResult selectPage(Long userId, PageParam pageReqVO) { + return selectPage(pageReqVO, new LambdaQueryWrapperX() + .eq(AiImageDO::getUserId, userId) + .orderByDesc(AiImageDO::getId)); + } + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 05ad0ed287..2442e79a9d 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -1,38 +1,35 @@ package cn.iocoder.yudao.module.ai.service.image; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperateReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; /** - * ai 作图 + * AI 绘图 Service 接口 * * @author fansili - * @time 2024/4/25 15:50 - * @since 1.0 */ public interface AiImageService { /** - * ai绘画 - 列表 + * 获取【我的】绘图分页 * - * @param loginUserId - * @param req - * @return + * @param userId 用户编号 + * @param pageReqVO 分页条件 + * @return 绘图分页 */ - PageResult getImagePageMy(Long loginUserId, AiImageListReqVO req); + PageResult getImagePageMy(Long userId, PageParam pageReqVO); /** - * 获取 - image 信息 + * 获得绘图记录 * - * @param id - * @return + * @param id 绘图编号 + * @return 绘图记录 */ - AiImageDO getMy(Long id); + AiImageDO getImage(Long id); /** * ai绘画 - dall2/dall3 绘画 @@ -52,19 +49,12 @@ public interface AiImageService { Long midjourneyImagine(Long loginUserId, AiImageMidjourneyImagineReqVO req); /** - * midjourney 操作(u1、u2、放大、换一批...) - * - * @param req - */ - void midjourneyOperate(AiImageMidjourneyOperateReqVO req); - - /** - * 删除 - image 记录 + * 删除【我的】绘画记录 * - * @param id - * @param loginUserId + * @param id 绘画编号 + * @param userId 用户编号 */ - Boolean deleteIdMy(Long id, Long loginUserId); + void deleteImageMy(Long id, Long userId); /** * midjourney proxy - 回调通知 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 16887045f6..2b4f7e6171 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -2,17 +2,17 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.ObjUtil; +import cn.hutool.extra.spring.SpringUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.core.exception.AiException; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.ai.AiCommonConstants; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; import cn.iocoder.yudao.module.ai.client.enums.MidjourneyModelEnum; import cn.iocoder.yudao.module.ai.client.enums.MidjourneySubmitCodeEnum; @@ -21,9 +21,7 @@ import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageListReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperateReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.AiImagePublicStatusEnum; @@ -46,12 +44,12 @@ import org.springframework.transaction.annotation.Transactional; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_IMAGE_NOT_EXISTS; + /** - * AI 绘画(接入 dall2/dall3、midjourney) + * AI 绘画 Service 实现类 * * @author fansili - * @time 2024/4/25 15:51 - * @since 1.0 */ @Service @Slf4j @@ -59,10 +57,13 @@ public class AiImageServiceImpl implements AiImageService { @Resource private AiImageMapper imageMapper; + @Resource private FileApi fileApi; + @Resource private OpenAiImageClient openAiImageClient; + @Autowired private MidjourneyProxyClient midjourneyProxyClient; @@ -70,16 +71,12 @@ public class AiImageServiceImpl implements AiImageService { private String midjourneyNotifyUrl; @Override - public PageResult getImagePageMy(Long loginUserId, AiImageListReqVO req) { - // 查询当前用户下所有的绘画记录 - return imageMapper.selectPage(req, - new LambdaQueryWrapperX() - .eq(AiImageDO::getUserId, loginUserId) - .orderByDesc(AiImageDO::getId)); + public PageResult getImagePageMy(Long userId, PageParam pageReqVO) { + return imageMapper.selectPage(userId, pageReqVO); } @Override - public AiImageDO getMy(Long id) { + public AiImageDO getImage(Long id) { return imageMapper.selectById(id); } @@ -95,7 +92,7 @@ public class AiImageServiceImpl implements AiImageService { .setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); imageMapper.insert(aiImageDO); // 异步执行 - doDall(aiImageDO, req); + getSelf().doDall(aiImageDO, req); // 转换 AiImageDallDrawingRespVO return aiImageDO.getId(); } @@ -185,42 +182,15 @@ public class AiImageServiceImpl implements AiImageService { return aiImageDO.getId(); } - @Transactional(rollbackFor = Exception.class) - @Override - public void midjourneyOperate(AiImageMidjourneyOperateReqVO req) { -// // 校验是否存在 -// AiImageDO aiImageDO = validateExists(req.getId()); -// // 获取 midjourneyOperations -// List midjourneyOperations = getMidjourneyOperations(aiImageDO); -// // 校验 OperateId 是否存在 -// AiImageMidjourneyOperationsVO midjourneyOperationsVO = validateMidjourneyOperationsExists(midjourneyOperations, req.getOperateId()); -// // 校验 messageId -// validateMessageId(aiImageDO.getMjNonceId(), req.getMessageId()); -// // 获取 mjOperationName -// String mjOperationName = midjourneyOperationsVO.getLabel(); -// // 保存一个 image 任务记录 -// // todo -//// doSave(aiImageDO.getPrompt(), aiImageDO.getSize(), aiImageDO.getModel(), -//// null, null, AiImageStatusEnum.SUBMIT, null, -//// req.getMessageId(), req.getOperateId(), mjOperationName); -// // 提交操作 -// midjourneyInteractionsApi.reRoll( -// new ReRollReq() -// .setCustomId(req.getOperateId()) -// .setMessageId(req.getMessageId()) -// ); - } - @Override - public Boolean deleteIdMy(Long id, Long userId) { - // 校验是否存在,并获取 image - AiImageDO image = validateExists(id); - // 是否属于当前用户 - if (!image.getUserId().equals(userId)) { - throw exception(ErrorCodeConstants.AI_IMAGE_NOT_EXISTS); + public void deleteImageMy(Long id, Long userId) { + // 1. 校验是否存在 + AiImageDO image = validateImageExists(id); + if (ObjUtil.notEqual(image.getUserId(), userId)) { + throw exception(AI_IMAGE_NOT_EXISTS); } // 删除记录 - return imageMapper.deleteById(id) > 0; + imageMapper.deleteById(id); } @Override @@ -255,11 +225,21 @@ public class AiImageServiceImpl implements AiImageService { return true; } - private AiImageDO validateExists(Long id) { - AiImageDO aiImageDO = imageMapper.selectById(id); - if (aiImageDO == null) { - throw ServiceExceptionUtil.exception(ErrorCodeConstants.AI_MIDJOURNEY_IMAGINE_FAIL); + private AiImageDO validateImageExists(Long id) { + AiImageDO image = imageMapper.selectById(id); + if (image == null) { + throw exception(AI_IMAGE_NOT_EXISTS); } - return aiImageDO; + return image; } + + /** + * 获得自身的代理对象,解决 AOP 生效问题 + * + * @return 自己 + */ + private AiImageServiceImpl getSelf() { + return SpringUtil.getBean(getClass()); + } + } -- Gitee From a6bee12fbc07ed2114c9389355e868bfaae5559b Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 31 May 2024 22:55:09 +0800 Subject: [PATCH 0668/1557] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E4=BA=BA?= =?UTF-8?q?=E5=A4=A7=E9=87=91=E4=BB=93=E6=95=B0KingbaseES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/kingbase/ruoyi-vue-pro.sql | 4723 +++++++++++++++++ sql/tools/README.md | 31 +- sql/tools/convertor.py | 40 +- sql/tools/docker-compose.yaml | 17 + .../src/main/resources/application-local.yaml | 1 + 5 files changed, 4807 insertions(+), 5 deletions(-) create mode 100644 sql/kingbase/ruoyi-vue-pro.sql diff --git a/sql/kingbase/ruoyi-vue-pro.sql b/sql/kingbase/ruoyi-vue-pro.sql new file mode 100644 index 0000000000..37f3b9b66a --- /dev/null +++ b/sql/kingbase/ruoyi-vue-pro.sql @@ -0,0 +1,4723 @@ +/* + Yudao Database Transfer Tool + + Source Server Type : MySQL + + Target Server Type : Kingbase + + Date: 2024-05-31 22:42:53 +*/ + + +-- ---------------------------- +-- Table structure for dual +-- ---------------------------- +DROP TABLE IF EXISTS dual; +CREATE TABLE dual +( + id int2 +); + +COMMENT ON TABLE dual IS '数据库连接的表'; + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1); +-- @formatter:on + +-- ---------------------------- +-- Table structure for infra_api_access_log +-- ---------------------------- +DROP TABLE IF EXISTS infra_api_access_log; +CREATE TABLE infra_api_access_log +( + id int8 NOT NULL, + trace_id varchar(64) NULL DEFAULT '', + user_id int8 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + application_name varchar(50) NOT NULL, + request_method varchar(16) NULL DEFAULT '', + request_url varchar(255) NULL DEFAULT '', + request_params text NULL, + response_body text NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + operate_module varchar(50) NULL DEFAULT NULL, + operate_name varchar(50) NULL DEFAULT NULL, + operate_type int2 NULL DEFAULT 0, + begin_time timestamp NOT NULL, + end_time timestamp NOT NULL, + duration int4 NOT NULL, + result_code int4 NOT NULL DEFAULT 0, + result_msg varchar(512) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_api_access_log + ADD CONSTRAINT pk_infra_api_access_log PRIMARY KEY (id); + +CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); + +COMMENT ON COLUMN infra_api_access_log.id IS '日志主键'; +COMMENT ON COLUMN infra_api_access_log.trace_id IS '链路追踪编号'; +COMMENT ON COLUMN infra_api_access_log.user_id IS '用户编号'; +COMMENT ON COLUMN infra_api_access_log.user_type IS '用户类型'; +COMMENT ON COLUMN infra_api_access_log.application_name IS '应用名'; +COMMENT ON COLUMN infra_api_access_log.request_method IS '请求方法名'; +COMMENT ON COLUMN infra_api_access_log.request_url IS '请求地址'; +COMMENT ON COLUMN infra_api_access_log.request_params IS '请求参数'; +COMMENT ON COLUMN infra_api_access_log.response_body IS '响应结果'; +COMMENT ON COLUMN infra_api_access_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN infra_api_access_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN infra_api_access_log.operate_module IS '操作模块'; +COMMENT ON COLUMN infra_api_access_log.operate_name IS '操作名'; +COMMENT ON COLUMN infra_api_access_log.operate_type IS '操作分类'; +COMMENT ON COLUMN infra_api_access_log.begin_time IS '开始请求时间'; +COMMENT ON COLUMN infra_api_access_log.end_time IS '结束请求时间'; +COMMENT ON COLUMN infra_api_access_log.duration IS '执行时长'; +COMMENT ON COLUMN infra_api_access_log.result_code IS '结果码'; +COMMENT ON COLUMN infra_api_access_log.result_msg IS '结果提示'; +COMMENT ON COLUMN infra_api_access_log.creator IS '创建者'; +COMMENT ON COLUMN infra_api_access_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_access_log.updater IS '更新者'; +COMMENT ON COLUMN infra_api_access_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除'; +COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; + +DROP SEQUENCE IF EXISTS infra_api_access_log_seq; +CREATE SEQUENCE infra_api_access_log_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_api_error_log +-- ---------------------------- +DROP TABLE IF EXISTS infra_api_error_log; +CREATE TABLE infra_api_error_log +( + id int4 NOT NULL, + trace_id varchar(64) NOT NULL, + user_id int4 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + application_name varchar(50) NOT NULL, + request_method varchar(16) NOT NULL, + request_url varchar(255) NOT NULL, + request_params varchar(8000) NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + exception_time timestamp NOT NULL, + exception_name varchar(128) NULL DEFAULT '', + exception_message text NOT NULL, + exception_root_cause_message text NOT NULL, + exception_stack_trace text NOT NULL, + exception_class_name varchar(512) NOT NULL, + exception_file_name varchar(512) NOT NULL, + exception_method_name varchar(512) NOT NULL, + exception_line_number int4 NOT NULL, + process_status int2 NOT NULL, + process_time timestamp NULL DEFAULT NULL, + process_user_id int4 NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_api_error_log + ADD CONSTRAINT pk_infra_api_error_log PRIMARY KEY (id); + +COMMENT ON COLUMN infra_api_error_log.id IS '编号'; +COMMENT ON COLUMN infra_api_error_log.trace_id IS '链路追踪编号 + * + * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。'; +COMMENT ON COLUMN infra_api_error_log.user_id IS '用户编号'; +COMMENT ON COLUMN infra_api_error_log.user_type IS '用户类型'; +COMMENT ON COLUMN infra_api_error_log.application_name IS '应用名 + * + * 目前读取 spring.application.name'; +COMMENT ON COLUMN infra_api_error_log.request_method IS '请求方法名'; +COMMENT ON COLUMN infra_api_error_log.request_url IS '请求地址'; +COMMENT ON COLUMN infra_api_error_log.request_params IS '请求参数'; +COMMENT ON COLUMN infra_api_error_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN infra_api_error_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN infra_api_error_log.exception_time IS '异常发生时间'; +COMMENT ON COLUMN infra_api_error_log.exception_name IS '异常名 + * + * {@link Throwable#getClass()} 的类全名'; +COMMENT ON COLUMN infra_api_error_log.exception_message IS '异常导致的消息 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getMessage(Throwable)}'; +COMMENT ON COLUMN infra_api_error_log.exception_root_cause_message IS '异常导致的根消息 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getRootCauseMessage(Throwable)}'; +COMMENT ON COLUMN infra_api_error_log.exception_stack_trace IS '异常的栈轨迹 + * + * {@link cn.iocoder.common.framework.util.ExceptionUtil#getServiceException(Exception)}'; +COMMENT ON COLUMN infra_api_error_log.exception_class_name IS '异常发生的类全名 + * + * {@link StackTraceElement#getClassName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_file_name IS '异常发生的类文件 + * + * {@link StackTraceElement#getFileName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_method_name IS '异常发生的方法名 + * + * {@link StackTraceElement#getMethodName()}'; +COMMENT ON COLUMN infra_api_error_log.exception_line_number IS '异常发生的方法所在行 + * + * {@link StackTraceElement#getLineNumber()}'; +COMMENT ON COLUMN infra_api_error_log.process_status IS '处理状态'; +COMMENT ON COLUMN infra_api_error_log.process_time IS '处理时间'; +COMMENT ON COLUMN infra_api_error_log.process_user_id IS '处理用户编号'; +COMMENT ON COLUMN infra_api_error_log.creator IS '创建者'; +COMMENT ON COLUMN infra_api_error_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_api_error_log.updater IS '更新者'; +COMMENT ON COLUMN infra_api_error_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除'; +COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; +COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; + +DROP SEQUENCE IF EXISTS infra_api_error_log_seq; +CREATE SEQUENCE infra_api_error_log_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_codegen_column +-- ---------------------------- +DROP TABLE IF EXISTS infra_codegen_column; +CREATE TABLE infra_codegen_column +( + id int8 NOT NULL, + table_id int8 NOT NULL, + column_name varchar(200) NOT NULL, + data_type varchar(100) NOT NULL, + column_comment varchar(500) NOT NULL, + nullable bool NOT NULL, + primary_key bool NOT NULL, + ordinal_position int4 NOT NULL, + java_type varchar(32) NOT NULL, + java_field varchar(64) NOT NULL, + dict_type varchar(200) NULL DEFAULT '', + example varchar(64) NULL DEFAULT NULL, + create_operation bool NOT NULL, + update_operation bool NOT NULL, + list_operation bool NOT NULL, + list_operation_condition varchar(32) NOT NULL DEFAULT '=', + list_operation_result bool NOT NULL, + html_type varchar(32) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_codegen_column + ADD CONSTRAINT pk_infra_codegen_column PRIMARY KEY (id); + +COMMENT ON COLUMN infra_codegen_column.id IS '编号'; +COMMENT ON COLUMN infra_codegen_column.table_id IS '表编号'; +COMMENT ON COLUMN infra_codegen_column.column_name IS '字段名'; +COMMENT ON COLUMN infra_codegen_column.data_type IS '字段类型'; +COMMENT ON COLUMN infra_codegen_column.column_comment IS '字段描述'; +COMMENT ON COLUMN infra_codegen_column.nullable IS '是否允许为空'; +COMMENT ON COLUMN infra_codegen_column.primary_key IS '是否主键'; +COMMENT ON COLUMN infra_codegen_column.ordinal_position IS '排序'; +COMMENT ON COLUMN infra_codegen_column.java_type IS 'Java 属性类型'; +COMMENT ON COLUMN infra_codegen_column.java_field IS 'Java 属性名'; +COMMENT ON COLUMN infra_codegen_column.dict_type IS '字典类型'; +COMMENT ON COLUMN infra_codegen_column.example IS '数据示例'; +COMMENT ON COLUMN infra_codegen_column.create_operation IS '是否为 Create 创建操作的字段'; +COMMENT ON COLUMN infra_codegen_column.update_operation IS '是否为 Update 更新操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation IS '是否为 List 查询操作的字段'; +COMMENT ON COLUMN infra_codegen_column.list_operation_condition IS 'List 查询操作的条件类型'; +COMMENT ON COLUMN infra_codegen_column.list_operation_result IS '是否为 List 查询操作的返回字段'; +COMMENT ON COLUMN infra_codegen_column.html_type IS '显示类型'; +COMMENT ON COLUMN infra_codegen_column.creator IS '创建者'; +COMMENT ON COLUMN infra_codegen_column.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_column.updater IS '更新者'; +COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除'; +COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; + +DROP SEQUENCE IF EXISTS infra_codegen_column_seq; +CREATE SEQUENCE infra_codegen_column_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_codegen_table +-- ---------------------------- +DROP TABLE IF EXISTS infra_codegen_table; +CREATE TABLE infra_codegen_table +( + id int8 NOT NULL, + data_source_config_id int8 NOT NULL, + scene int2 NOT NULL DEFAULT 1, + table_name varchar(200) NULL DEFAULT '', + table_comment varchar(500) NULL DEFAULT '', + remark varchar(500) NULL DEFAULT NULL, + module_name varchar(30) NOT NULL, + business_name varchar(30) NOT NULL, + class_name varchar(100) NULL DEFAULT '', + class_comment varchar(50) NOT NULL, + author varchar(50) NOT NULL, + template_type int2 NOT NULL DEFAULT 1, + front_type int2 NOT NULL, + parent_menu_id int8 NULL DEFAULT NULL, + master_table_id int8 NULL DEFAULT NULL, + sub_join_column_id int8 NULL DEFAULT NULL, + sub_join_many bool NULL DEFAULT NULL, + tree_parent_column_id int8 NULL DEFAULT NULL, + tree_name_column_id int8 NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_codegen_table + ADD CONSTRAINT pk_infra_codegen_table PRIMARY KEY (id); + +COMMENT ON COLUMN infra_codegen_table.id IS '编号'; +COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS '数据源配置的编号'; +COMMENT ON COLUMN infra_codegen_table.scene IS '生成场景'; +COMMENT ON COLUMN infra_codegen_table.table_name IS '表名称'; +COMMENT ON COLUMN infra_codegen_table.table_comment IS '表描述'; +COMMENT ON COLUMN infra_codegen_table.remark IS '备注'; +COMMENT ON COLUMN infra_codegen_table.module_name IS '模块名'; +COMMENT ON COLUMN infra_codegen_table.business_name IS '业务名'; +COMMENT ON COLUMN infra_codegen_table.class_name IS '类名称'; +COMMENT ON COLUMN infra_codegen_table.class_comment IS '类描述'; +COMMENT ON COLUMN infra_codegen_table.author IS '作者'; +COMMENT ON COLUMN infra_codegen_table.template_type IS '模板类型'; +COMMENT ON COLUMN infra_codegen_table.front_type IS '前端类型'; +COMMENT ON COLUMN infra_codegen_table.parent_menu_id IS '父菜单编号'; +COMMENT ON COLUMN infra_codegen_table.master_table_id IS '主表的编号'; +COMMENT ON COLUMN infra_codegen_table.sub_join_column_id IS '子表关联主表的字段编号'; +COMMENT ON COLUMN infra_codegen_table.sub_join_many IS '主表与子表是否一对多'; +COMMENT ON COLUMN infra_codegen_table.tree_parent_column_id IS '树表的父字段编号'; +COMMENT ON COLUMN infra_codegen_table.tree_name_column_id IS '树表的名字字段编号'; +COMMENT ON COLUMN infra_codegen_table.creator IS '创建者'; +COMMENT ON COLUMN infra_codegen_table.create_time IS '创建时间'; +COMMENT ON COLUMN infra_codegen_table.updater IS '更新者'; +COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; +COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除'; +COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; + +DROP SEQUENCE IF EXISTS infra_codegen_table_seq; +CREATE SEQUENCE infra_codegen_table_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_config +-- ---------------------------- +DROP TABLE IF EXISTS infra_config; +CREATE TABLE infra_config +( + id int4 NOT NULL, + category varchar(50) NOT NULL, + type int2 NOT NULL, + name varchar(100) NULL DEFAULT '', + config_key varchar(100) NULL DEFAULT '', + value varchar(500) NULL DEFAULT '', + visible bool NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_config + ADD CONSTRAINT pk_infra_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_config.id IS '参数主键'; +COMMENT ON COLUMN infra_config.category IS '参数分组'; +COMMENT ON COLUMN infra_config.type IS '参数类型'; +COMMENT ON COLUMN infra_config.name IS '参数名称'; +COMMENT ON COLUMN infra_config.config_key IS '参数键名'; +COMMENT ON COLUMN infra_config.value IS '参数键值'; +COMMENT ON COLUMN infra_config.visible IS '是否可见'; +COMMENT ON COLUMN infra_config.remark IS '备注'; +COMMENT ON COLUMN infra_config.creator IS '创建者'; +COMMENT ON COLUMN infra_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_config.updater IS '更新者'; +COMMENT ON COLUMN infra_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_config IS '参数配置表'; + +-- ---------------------------- +-- Records of infra_config +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', '0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-04-03 17:22:28', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:33:38', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 'url', 2, 'SkyWalking 监控的地址', 'url.skywalking', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:57:03', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 'url', 2, 'Spring Boot Admin 监控的地址', 'url.spring-boot-admin', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:52:07', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (10, 'url', 2, 'Swagger 接口文档的地址', 'url.swagger', '', '1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:59:00', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (11, 'ui', 2, '腾讯地图 key', 'tencent.lbs.key', 'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E', '1', '腾讯地图 key', '1', '2023-06-03 19:16:27', '1', '2023-06-03 19:16:27', '0'); +INSERT INTO infra_config (id, category, type, name, config_key, value, visible, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 'test2', 2, 'test3', 'test4', 'test5', '1', 'test6', '1', '2023-12-03 09:55:16', '1', '2023-12-03 09:55:27', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS infra_config_seq; +CREATE SEQUENCE infra_config_seq + START 13; + +-- ---------------------------- +-- Table structure for infra_data_source_config +-- ---------------------------- +DROP TABLE IF EXISTS infra_data_source_config; +CREATE TABLE infra_data_source_config +( + id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + url varchar(1024) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_data_source_config + ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_data_source_config.id IS '主键编号'; +COMMENT ON COLUMN infra_data_source_config.name IS '参数名称'; +COMMENT ON COLUMN infra_data_source_config.url IS '数据源连接'; +COMMENT ON COLUMN infra_data_source_config.username IS '用户名'; +COMMENT ON COLUMN infra_data_source_config.password IS '密码'; +COMMENT ON COLUMN infra_data_source_config.creator IS '创建者'; +COMMENT ON COLUMN infra_data_source_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_data_source_config.updater IS '更新者'; +COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; + +DROP SEQUENCE IF EXISTS infra_data_source_config_seq; +CREATE SEQUENCE infra_data_source_config_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_file +-- ---------------------------- +DROP TABLE IF EXISTS infra_file; +CREATE TABLE infra_file +( + id int8 NOT NULL, + config_id int8 NULL DEFAULT NULL, + name varchar(256) NULL DEFAULT NULL, + path varchar(512) NOT NULL, + url varchar(1024) NOT NULL, + type varchar(128) NULL DEFAULT NULL, + size int4 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_file + ADD CONSTRAINT pk_infra_file PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file.id IS '文件编号'; +COMMENT ON COLUMN infra_file.config_id IS '配置编号'; +COMMENT ON COLUMN infra_file.name IS '文件名'; +COMMENT ON COLUMN infra_file.path IS '文件路径'; +COMMENT ON COLUMN infra_file.url IS '文件 URL'; +COMMENT ON COLUMN infra_file.type IS '文件类型'; +COMMENT ON COLUMN infra_file.size IS '文件大小'; +COMMENT ON COLUMN infra_file.creator IS '创建者'; +COMMENT ON COLUMN infra_file.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file.updater IS '更新者'; +COMMENT ON COLUMN infra_file.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file.deleted IS '是否删除'; +COMMENT ON TABLE infra_file IS '文件表'; + +DROP SEQUENCE IF EXISTS infra_file_seq; +CREATE SEQUENCE infra_file_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_file_config +-- ---------------------------- +DROP TABLE IF EXISTS infra_file_config; +CREATE TABLE infra_file_config +( + id int8 NOT NULL, + name varchar(63) NOT NULL, + storage int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + master bool NOT NULL, + config varchar(4096) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_file_config + ADD CONSTRAINT pk_infra_file_config PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file_config.id IS '编号'; +COMMENT ON COLUMN infra_file_config.name IS '配置名'; +COMMENT ON COLUMN infra_file_config.storage IS '存储器'; +COMMENT ON COLUMN infra_file_config.remark IS '备注'; +COMMENT ON COLUMN infra_file_config.master IS '是否为主配置'; +COMMENT ON COLUMN infra_file_config.config IS '存储配置'; +COMMENT ON COLUMN infra_file_config.creator IS '创建者'; +COMMENT ON COLUMN infra_file_config.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_config.updater IS '更新者'; +COMMENT ON COLUMN infra_file_config.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_config.deleted IS '是否删除'; +COMMENT ON TABLE infra_file_config IS '文件配置表'; + +-- ---------------------------- +-- Records of infra_file_config +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库', 1, '我是数据库', '0', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig","domain":"http://127.0.0.1:48080"}', '1', '2022-03-15 23:56:24', '1', '2024-02-28 22:54:07', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器', 20, '', '1', '{"@class":"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig","endpoint":"s3.cn-south-1.qiniucs.com","domain":"http://test.yudao.iocoder.cn","bucket":"ruoyi-vue-pro","accessKey":"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS","accessSecret":"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY"}', '1', '2024-01-13 22:11:12', '1', '2024-04-03 19:38:34', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS infra_file_config_seq; +CREATE SEQUENCE infra_file_config_seq + START 23; + +-- ---------------------------- +-- Table structure for infra_file_content +-- ---------------------------- +DROP TABLE IF EXISTS infra_file_content; +CREATE TABLE infra_file_content +( + id int8 NOT NULL, + config_id int8 NOT NULL, + path varchar(512) NOT NULL, + content bytea NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_file_content + ADD CONSTRAINT pk_infra_file_content PRIMARY KEY (id); + +COMMENT ON COLUMN infra_file_content.id IS '编号'; +COMMENT ON COLUMN infra_file_content.config_id IS '配置编号'; +COMMENT ON COLUMN infra_file_content.path IS '文件路径'; +COMMENT ON COLUMN infra_file_content.content IS '文件内容'; +COMMENT ON COLUMN infra_file_content.creator IS '创建者'; +COMMENT ON COLUMN infra_file_content.create_time IS '创建时间'; +COMMENT ON COLUMN infra_file_content.updater IS '更新者'; +COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; +COMMENT ON COLUMN infra_file_content.deleted IS '是否删除'; +COMMENT ON TABLE infra_file_content IS '文件表'; + +DROP SEQUENCE IF EXISTS infra_file_content_seq; +CREATE SEQUENCE infra_file_content_seq + START 1; + +-- ---------------------------- +-- Table structure for infra_job +-- ---------------------------- +DROP TABLE IF EXISTS infra_job; +CREATE TABLE infra_job +( + id int8 NOT NULL, + name varchar(32) NOT NULL, + status int2 NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) NULL DEFAULT NULL, + cron_expression varchar(32) NOT NULL, + retry_count int4 NOT NULL DEFAULT 0, + retry_interval int4 NOT NULL DEFAULT 0, + monitor_timeout int4 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_job + ADD CONSTRAINT pk_infra_job PRIMARY KEY (id); + +COMMENT ON COLUMN infra_job.id IS '任务编号'; +COMMENT ON COLUMN infra_job.name IS '任务名称'; +COMMENT ON COLUMN infra_job.status IS '任务状态'; +COMMENT ON COLUMN infra_job.handler_name IS '处理器的名字'; +COMMENT ON COLUMN infra_job.handler_param IS '处理器的参数'; +COMMENT ON COLUMN infra_job.cron_expression IS 'CRON 表达式'; +COMMENT ON COLUMN infra_job.retry_count IS '重试次数'; +COMMENT ON COLUMN infra_job.retry_interval IS '重试间隔'; +COMMENT ON COLUMN infra_job.monitor_timeout IS '监控超时时间'; +COMMENT ON COLUMN infra_job.creator IS '创建者'; +COMMENT ON COLUMN infra_job.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job.updater IS '更新者'; +COMMENT ON COLUMN infra_job.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job.deleted IS '是否删除'; +COMMENT ON TABLE infra_job IS '定时任务表'; + +-- ---------------------------- +-- Records of infra_job +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', '2021-10-27 08:34:42', '1', '2023-07-09 20:51:41', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (19, '退款订单的同步 Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-23 21:03:44', '1', '2023-07-23 21:09:00', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (21, '交易订单的自动过期 Job', 2, 'tradeOrderAutoCancelJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-25 23:43:26', '1', '2023-09-26 19:23:30', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (22, '交易订单的自动收货 Job', 2, 'tradeOrderAutoReceiveJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 19:23:53', '1', '2023-09-26 23:38:08', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (23, '交易订单的自动评论 Job', 2, 'tradeOrderAutoCommentJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 23:38:29', '1', '2023-09-27 11:03:10', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (24, '佣金解冻 Job', 2, 'brokerageRecordUnfreezeJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-28 22:01:46', '1', '2023-09-28 22:01:56', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (25, '访问日志清理 Job', 2, 'accessLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 10:59:41', '1', '2023-10-03 11:01:10', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (26, '错误日志清理 Job', 2, 'errorLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:00:43', '1', '2023-10-03 11:01:12', '0'); +INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expression, retry_count, retry_interval, monitor_timeout, creator, create_time, updater, update_time, deleted) VALUES (27, '任务日志清理 Job', 2, 'jobLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:01:33', '1', '2023-10-03 11:01:42', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS infra_job_seq; +CREATE SEQUENCE infra_job_seq + START 28; + +-- ---------------------------- +-- Table structure for infra_job_log +-- ---------------------------- +DROP TABLE IF EXISTS infra_job_log; +CREATE TABLE infra_job_log +( + id int8 NOT NULL, + job_id int8 NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) NULL DEFAULT NULL, + execute_index int2 NOT NULL DEFAULT 1, + begin_time timestamp NOT NULL, + end_time timestamp NULL DEFAULT NULL, + duration int4 NULL DEFAULT NULL, + status int2 NOT NULL, + result varchar(4000) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE infra_job_log + ADD CONSTRAINT pk_infra_job_log PRIMARY KEY (id); + +COMMENT ON COLUMN infra_job_log.id IS '日志编号'; +COMMENT ON COLUMN infra_job_log.job_id IS '任务编号'; +COMMENT ON COLUMN infra_job_log.handler_name IS '处理器的名字'; +COMMENT ON COLUMN infra_job_log.handler_param IS '处理器的参数'; +COMMENT ON COLUMN infra_job_log.execute_index IS '第几次执行'; +COMMENT ON COLUMN infra_job_log.begin_time IS '开始执行时间'; +COMMENT ON COLUMN infra_job_log.end_time IS '结束执行时间'; +COMMENT ON COLUMN infra_job_log.duration IS '执行时长'; +COMMENT ON COLUMN infra_job_log.status IS '任务状态'; +COMMENT ON COLUMN infra_job_log.result IS '结果数据'; +COMMENT ON COLUMN infra_job_log.creator IS '创建者'; +COMMENT ON COLUMN infra_job_log.create_time IS '创建时间'; +COMMENT ON COLUMN infra_job_log.updater IS '更新者'; +COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; +COMMENT ON COLUMN infra_job_log.deleted IS '是否删除'; +COMMENT ON TABLE infra_job_log IS '定时任务日志表'; + +DROP SEQUENCE IF EXISTS infra_job_log_seq; +CREATE SEQUENCE infra_job_log_seq + START 1; + +-- ---------------------------- +-- Table structure for system_dept +-- ---------------------------- +DROP TABLE IF EXISTS system_dept; +CREATE TABLE system_dept +( + id int8 NOT NULL, + name varchar(30) NULL DEFAULT '', + parent_id int8 NOT NULL DEFAULT 0, + sort int4 NOT NULL DEFAULT 0, + leader_user_id int8 NULL DEFAULT NULL, + phone varchar(11) NULL DEFAULT NULL, + email varchar(50) NULL DEFAULT NULL, + status int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_dept + ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); + +COMMENT ON COLUMN system_dept.id IS '部门id'; +COMMENT ON COLUMN system_dept.name IS '部门名称'; +COMMENT ON COLUMN system_dept.parent_id IS '父部门id'; +COMMENT ON COLUMN system_dept.sort IS '显示顺序'; +COMMENT ON COLUMN system_dept.leader_user_id IS '负责人'; +COMMENT ON COLUMN system_dept.phone IS '联系电话'; +COMMENT ON COLUMN system_dept.email IS '邮箱'; +COMMENT ON COLUMN system_dept.status IS '部门状态(0正常 1停用)'; +COMMENT ON COLUMN system_dept.creator IS '创建者'; +COMMENT ON COLUMN system_dept.create_time IS '创建时间'; +COMMENT ON COLUMN system_dept.updater IS '更新者'; +COMMENT ON COLUMN system_dept.update_time IS '更新时间'; +COMMENT ON COLUMN system_dept.deleted IS '是否删除'; +COMMENT ON COLUMN system_dept.tenant_id IS '租户编号'; +COMMENT ON TABLE system_dept IS '部门表'; + +-- ---------------------------- +-- Records of system_dept +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, '芋道源码', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-11-14 23:30:36', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '深圳总公司', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:53:35', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (102, '长沙分公司', 100, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:40', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, '研发部门', 101, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2024-03-24 20:56:04', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, '市场部门', 101, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:38', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (105, '测试部门', 101, 3, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2022-05-16 20:25:15', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (106, '财务部门', 101, 4, 103, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '103', '2022-01-15 21:32:22', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, '运维部门', 101, 5, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:28:22', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, '市场部门', 102, 1, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2022-02-16 08:35:45', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '财务部门', 102, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:29', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, '新部门', 0, 1, NULL, NULL, NULL, 0, '110', '2022-02-23 20:46:30', '110', '2022-02-23 20:46:30', '0', 121); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '顶级部门', 0, 1, NULL, NULL, NULL, 0, '113', '2022-03-07 21:44:50', '113', '2022-03-07 21:44:50', '0', 122); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, '产品部门', 101, 100, 1, NULL, NULL, 1, '1', '2023-12-02 09:45:13', '1', '2023-12-02 09:45:31', '0', 1); +INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, '支持部门', 102, 3, 104, NULL, NULL, 1, '1', '2023-12-02 09:47:38', '1', '2023-12-02 09:47:38', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_dept_seq; +CREATE SEQUENCE system_dept_seq + START 114; + +-- ---------------------------- +-- Table structure for system_dict_data +-- ---------------------------- +DROP TABLE IF EXISTS system_dict_data; +CREATE TABLE system_dict_data +( + id int8 NOT NULL, + sort int4 NOT NULL DEFAULT 0, + label varchar(100) NULL DEFAULT '', + value varchar(100) NULL DEFAULT '', + dict_type varchar(100) NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + color_type varchar(100) NULL DEFAULT '', + css_class varchar(100) NULL DEFAULT '', + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_dict_data + ADD CONSTRAINT pk_system_dict_data PRIMARY KEY (id); + +COMMENT ON COLUMN system_dict_data.id IS '字典编码'; +COMMENT ON COLUMN system_dict_data.sort IS '字典排序'; +COMMENT ON COLUMN system_dict_data.label IS '字典标签'; +COMMENT ON COLUMN system_dict_data.value IS '字典键值'; +COMMENT ON COLUMN system_dict_data.dict_type IS '字典类型'; +COMMENT ON COLUMN system_dict_data.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_data.color_type IS '颜色类型'; +COMMENT ON COLUMN system_dict_data.css_class IS 'css 样式'; +COMMENT ON COLUMN system_dict_data.remark IS '备注'; +COMMENT ON COLUMN system_dict_data.creator IS '创建者'; +COMMENT ON COLUMN system_dict_data.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_data.updater IS '更新者'; +COMMENT ON COLUMN system_dict_data.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_data.deleted IS '是否删除'; +COMMENT ON TABLE system_dict_data IS '字典数据表'; + +-- ---------------------------- +-- Records of system_dict_data +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1, 1, '男', '1', 'system_user_sex', 0, 'default', 'A', '性别男', 'admin', '2021-01-05 17:03:48', '1', '2022-03-29 00:14:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2, 2, '女', '2', 'system_user_sex', 0, 'success', '', '性别女', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 23:30:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (8, 1, '正常', '1', 'infra_job_status', 0, 'success', '', '正常状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:33:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (9, 2, '暂停', '2', 'infra_job_status', 0, 'danger', '', '停用状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:33:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (12, 1, '系统内置', '1', 'infra_config_type', 0, 'danger', '', '参数类型 - 系统内置', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:06:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (13, 2, '自定义', '2', 'infra_config_type', 0, 'primary', '', '参数类型 - 自定义', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:06:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (14, 1, '通知', '1', 'system_notice_type', 0, 'success', '', '通知', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:05:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (15, 2, '公告', '2', 'system_notice_type', 0, 'info', '', '公告', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:06:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (16, 0, '其它', '0', 'infra_operate_type', 0, 'default', '', '其它操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (17, 1, '查询', '1', 'infra_operate_type', 0, 'info', '', '查询操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (18, 2, '新增', '2', 'infra_operate_type', 0, 'primary', '', '新增操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (19, 3, '修改', '3', 'infra_operate_type', 0, 'warning', '', '修改操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (20, 4, '删除', '4', 'infra_operate_type', 0, 'danger', '', '删除操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (22, 5, '导出', '5', 'infra_operate_type', 0, 'default', '', '导出操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (23, 6, '导入', '6', 'infra_operate_type', 0, 'default', '', '导入操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (27, 1, '开启', '0', 'common_status', 0, 'primary', '', '开启状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (28, 2, '关闭', '1', 'common_status', 0, 'info', '', '关闭状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (29, 1, '目录', '1', 'system_menu_type', 0, '', '', '目录', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (30, 2, '菜单', '2', 'system_menu_type', 0, '', '', '菜单', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (31, 3, '按钮', '3', 'system_menu_type', 0, '', '', '按钮', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (32, 1, '内置', '1', 'system_role_type', 0, 'danger', '', '内置角色', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:02:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (33, 2, '自定义', '2', 'system_role_type', 0, 'primary', '', '自定义角色', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:02:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (34, 1, '全部数据权限', '1', 'system_data_scope', 0, '', '', '全部数据权限', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (35, 2, '指定部门数据权限', '2', 'system_data_scope', 0, '', '', '指定部门数据权限', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (36, 3, '本部门数据权限', '3', 'system_data_scope', 0, '', '', '本部门数据权限', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (37, 4, '本部门及以下数据权限', '4', 'system_data_scope', 0, '', '', '本部门及以下数据权限', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (38, 5, '仅本人数据权限', '5', 'system_data_scope', 0, '', '', '仅本人数据权限', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:47:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (39, 0, '成功', '0', 'system_login_result', 0, 'success', '', '登陆结果 - 成功', '', '2021-01-18 06:17:36', '1', '2022-02-16 13:23:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (40, 10, '账号或密码不正确', '10', 'system_login_result', 0, 'primary', '', '登陆结果 - 账号或密码不正确', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (41, 20, '用户被禁用', '20', 'system_login_result', 0, 'warning', '', '登陆结果 - 用户被禁用', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:23:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (42, 30, '验证码不存在', '30', 'system_login_result', 0, 'info', '', '登陆结果 - 验证码不存在', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (43, 31, '验证码不正确', '31', 'system_login_result', 0, 'info', '', '登陆结果 - 验证码不正确', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (44, 100, '未知异常', '100', 'system_login_result', 0, 'danger', '', '登陆结果 - 未知异常', '', '2021-01-18 06:17:54', '1', '2022-02-16 13:24:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (45, 1, '是', 'true', 'infra_boolean_string', 0, 'danger', '', 'Boolean 是否类型 - 是', '', '2021-01-19 03:20:55', '1', '2022-03-15 23:01:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (46, 1, '否', 'false', 'infra_boolean_string', 0, 'info', '', 'Boolean 是否类型 - 否', '', '2021-01-19 03:20:55', '1', '2022-03-15 23:09:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (50, 1, '单表(增删改查)', '1', 'infra_codegen_template_type', 0, '', '', NULL, '', '2021-02-05 07:09:06', '', '2022-03-10 16:33:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (51, 2, '树表(增删改查)', '2', 'infra_codegen_template_type', 0, '', '', NULL, '', '2021-02-05 07:14:46', '', '2022-03-10 16:33:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (53, 0, '初始化中', '0', 'infra_job_status', 0, 'primary', '', NULL, '', '2021-02-07 07:46:49', '1', '2022-02-16 19:33:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (57, 0, '运行中', '0', 'infra_job_log_status', 0, 'primary', '', 'RUNNING', '', '2021-02-08 10:04:24', '1', '2022-02-16 19:07:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (58, 1, '成功', '1', 'infra_job_log_status', 0, 'success', '', NULL, '', '2021-02-08 10:06:57', '1', '2022-02-16 19:07:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (59, 2, '失败', '2', 'infra_job_log_status', 0, 'warning', '', '失败', '', '2021-02-08 10:07:38', '1', '2022-02-16 19:07:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (60, 1, '会员', '1', 'user_type', 0, 'primary', '', NULL, '', '2021-02-26 00:16:27', '1', '2022-02-16 10:22:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (61, 2, '管理员', '2', 'user_type', 0, 'success', '', NULL, '', '2021-02-26 00:16:34', '1', '2022-02-16 10:22:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (62, 0, '未处理', '0', 'infra_api_error_log_process_status', 0, 'primary', '', NULL, '', '2021-02-26 07:07:19', '1', '2022-02-16 20:14:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (63, 1, '已处理', '1', 'infra_api_error_log_process_status', 0, 'success', '', NULL, '', '2021-02-26 07:07:26', '1', '2022-02-16 20:14:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (64, 2, '已忽略', '2', 'infra_api_error_log_process_status', 0, 'danger', '', NULL, '', '2021-02-26 07:07:34', '1', '2022-02-16 20:14:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (66, 2, '阿里云', 'ALIYUN', 'system_sms_channel_code', 0, 'primary', '', NULL, '1', '2021-04-05 01:05:26', '1', '2022-02-16 10:09:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (67, 1, '验证码', '1', 'system_sms_template_type', 0, 'warning', '', NULL, '1', '2021-04-05 21:50:57', '1', '2022-02-16 12:48:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (68, 2, '通知', '2', 'system_sms_template_type', 0, 'primary', '', NULL, '1', '2021-04-05 21:51:08', '1', '2022-02-16 12:48:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (69, 0, '营销', '3', 'system_sms_template_type', 0, 'danger', '', NULL, '1', '2021-04-05 21:51:15', '1', '2022-02-16 12:48:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (70, 0, '初始化', '0', 'system_sms_send_status', 0, 'primary', '', NULL, '1', '2021-04-11 20:18:33', '1', '2022-02-16 10:26:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (71, 1, '发送成功', '10', 'system_sms_send_status', 0, 'success', '', NULL, '1', '2021-04-11 20:18:43', '1', '2022-02-16 10:25:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (72, 2, '发送失败', '20', 'system_sms_send_status', 0, 'danger', '', NULL, '1', '2021-04-11 20:18:49', '1', '2022-02-16 10:26:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (73, 3, '不发送', '30', 'system_sms_send_status', 0, 'info', '', NULL, '1', '2021-04-11 20:19:44', '1', '2022-02-16 10:26:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (74, 0, '等待结果', '0', 'system_sms_receive_status', 0, 'primary', '', NULL, '1', '2021-04-11 20:27:43', '1', '2022-02-16 10:28:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (75, 1, '接收成功', '10', 'system_sms_receive_status', 0, 'success', '', NULL, '1', '2021-04-11 20:29:25', '1', '2022-02-16 10:28:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (76, 2, '接收失败', '20', 'system_sms_receive_status', 0, 'danger', '', NULL, '1', '2021-04-11 20:29:31', '1', '2022-02-16 10:28:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (77, 0, '调试(钉钉)', 'DEBUG_DING_TALK', 'system_sms_channel_code', 0, 'info', '', NULL, '1', '2021-04-13 00:20:37', '1', '2022-02-16 10:10:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (80, 100, '账号登录', '100', 'system_login_type', 0, 'primary', '', '账号登录', '1', '2021-10-06 00:52:02', '1', '2022-02-16 13:11:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (81, 101, '社交登录', '101', 'system_login_type', 0, 'info', '', '社交登录', '1', '2021-10-06 00:52:17', '1', '2022-02-16 13:11:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (83, 200, '主动登出', '200', 'system_login_type', 0, 'primary', '', '主动登出', '1', '2021-10-06 00:52:58', '1', '2022-02-16 13:11:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (85, 202, '强制登出', '202', 'system_login_type', 0, 'danger', '', '强制退出', '1', '2021-10-06 00:53:41', '1', '2022-02-16 13:11:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (86, 0, '病假', '1', 'bpm_oa_leave_type', 0, 'primary', '', NULL, '1', '2021-09-21 22:35:28', '1', '2022-02-16 10:00:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (87, 1, '事假', '2', 'bpm_oa_leave_type', 0, 'info', '', NULL, '1', '2021-09-21 22:36:11', '1', '2022-02-16 10:00:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (88, 2, '婚假', '3', 'bpm_oa_leave_type', 0, 'warning', '', NULL, '1', '2021-09-21 22:36:38', '1', '2022-02-16 10:00:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (113, 1, '微信公众号支付', 'wx_pub', 'pay_channel_code', 0, 'success', '', '微信公众号支付', '1', '2021-12-03 10:40:24', '1', '2023-07-19 20:08:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (114, 2, '微信小程序支付', 'wx_lite', 'pay_channel_code', 0, 'success', '', '微信小程序支付', '1', '2021-12-03 10:41:06', '1', '2023-07-19 20:08:50', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (115, 3, '微信 App 支付', 'wx_app', 'pay_channel_code', 0, 'success', '', '微信 App 支付', '1', '2021-12-03 10:41:20', '1', '2023-07-19 20:08:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (116, 10, '支付宝 PC 网站支付', 'alipay_pc', 'pay_channel_code', 0, 'primary', '', '支付宝 PC 网站支付', '1', '2021-12-03 10:42:09', '1', '2023-07-19 20:09:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (117, 11, '支付宝 Wap 网站支付', 'alipay_wap', 'pay_channel_code', 0, 'primary', '', '支付宝 Wap 网站支付', '1', '2021-12-03 10:42:26', '1', '2023-07-19 20:09:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (118, 12, '支付宝 App 支付', 'alipay_app', 'pay_channel_code', 0, 'primary', '', '支付宝 App 支付', '1', '2021-12-03 10:42:55', '1', '2023-07-19 20:09:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (119, 14, '支付宝扫码支付', 'alipay_qr', 'pay_channel_code', 0, 'primary', '', '支付宝扫码支付', '1', '2021-12-03 10:43:10', '1', '2023-07-19 20:09:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (120, 10, '通知成功', '10', 'pay_notify_status', 0, 'success', '', '通知成功', '1', '2021-12-03 11:02:41', '1', '2023-07-19 10:08:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (121, 20, '通知失败', '20', 'pay_notify_status', 0, 'danger', '', '通知失败', '1', '2021-12-03 11:02:59', '1', '2023-07-19 10:08:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (122, 0, '等待通知', '0', 'pay_notify_status', 0, 'info', '', '未通知', '1', '2021-12-03 11:03:10', '1', '2023-07-19 10:08:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (123, 10, '支付成功', '10', 'pay_order_status', 0, 'success', '', '支付成功', '1', '2021-12-03 11:18:29', '1', '2023-07-19 18:04:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (124, 30, '支付关闭', '30', 'pay_order_status', 0, 'info', '', '支付关闭', '1', '2021-12-03 11:18:42', '1', '2023-07-19 18:05:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (125, 0, '等待支付', '0', 'pay_order_status', 0, 'info', '', '未支付', '1', '2021-12-03 11:18:18', '1', '2023-07-19 18:04:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (600, 5, '首页', '1', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (601, 4, '秒杀活动页', '2', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (602, 3, '砍价活动页', '3', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (603, 2, '限时折扣页', '4', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (604, 1, '满减送页', '5', 'promotion_banner_position', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1118, 0, '等待退款', '0', 'pay_refund_status', 0, 'info', '', '等待退款', '1', '2021-12-10 16:44:59', '1', '2023-07-19 10:14:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1119, 20, '退款失败', '20', 'pay_refund_status', 0, 'danger', '', '退款失败', '1', '2021-12-10 16:45:10', '1', '2023-07-19 10:15:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1124, 10, '退款成功', '10', 'pay_refund_status', 0, 'success', '', '退款成功', '1', '2021-12-10 16:46:26', '1', '2023-07-19 10:15:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1127, 1, '审批中', '1', 'bpm_process_instance_status', 0, 'default', '', '流程实例的状态 - 进行中', '1', '2022-01-07 23:47:22', '1', '2024-03-16 16:11:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1128, 2, '审批通过', '2', 'bpm_process_instance_status', 0, 'success', '', '流程实例的状态 - 已完成', '1', '2022-01-07 23:47:49', '1', '2024-03-16 16:11:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1129, 1, '审批中', '1', 'bpm_task_status', 0, 'primary', '', '流程实例的结果 - 处理中', '1', '2022-01-07 23:48:32', '1', '2024-03-08 22:41:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1130, 2, '审批通过', '2', 'bpm_task_status', 0, 'success', '', '流程实例的结果 - 通过', '1', '2022-01-07 23:48:45', '1', '2024-03-08 22:41:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1131, 3, '审批不通过', '3', 'bpm_task_status', 0, 'danger', '', '流程实例的结果 - 不通过', '1', '2022-01-07 23:48:55', '1', '2024-03-08 22:41:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1132, 4, '已取消', '4', 'bpm_task_status', 0, 'info', '', '流程实例的结果 - 撤销', '1', '2022-01-07 23:49:06', '1', '2024-03-08 22:41:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1133, 10, '流程表单', '10', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 流程表单', '103', '2022-01-11 23:51:30', '103', '2022-01-11 23:51:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1134, 20, '业务表单', '20', 'bpm_model_form_type', 0, '', '', '流程的表单类型 - 业务表单', '103', '2022-01-11 23:51:47', '103', '2022-01-11 23:51:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1135, 10, '角色', '10', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 角色', '103', '2022-01-12 23:21:22', '1', '2024-03-06 02:53:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1136, 20, '部门的成员', '20', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的成员', '103', '2022-01-12 23:21:47', '1', '2024-03-06 02:53:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1137, 21, '部门的负责人', '21', 'bpm_task_candidate_strategy', 0, 'primary', '', '任务分配规则的类型 - 部门的负责人', '103', '2022-01-12 23:33:36', '1', '2024-03-06 02:53:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1138, 30, '用户', '30', 'bpm_task_candidate_strategy', 0, 'info', '', '任务分配规则的类型 - 用户', '103', '2022-01-12 23:34:02', '1', '2024-03-06 02:53:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1139, 40, '用户组', '40', 'bpm_task_candidate_strategy', 0, 'warning', '', '任务分配规则的类型 - 用户组', '103', '2022-01-12 23:34:21', '1', '2024-03-06 02:53:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1140, 60, '流程表达式', '60', 'bpm_task_candidate_strategy', 0, 'danger', '', '任务分配规则的类型 - 流程表达式', '103', '2022-01-12 23:34:43', '1', '2024-03-06 02:53:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1141, 22, '岗位', '22', 'bpm_task_candidate_strategy', 0, 'success', '', '任务分配规则的类型 - 岗位', '103', '2022-01-14 18:41:55', '1', '2024-03-06 02:53:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1145, 1, '管理后台', '1', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 管理后台', '1', '2022-02-02 13:15:06', '1', '2022-03-10 16:32:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1146, 2, '用户 APP', '2', 'infra_codegen_scene', 0, '', '', '代码生成的场景枚举 - 用户 APP', '1', '2022-02-02 13:15:19', '1', '2022-03-10 16:33:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1150, 1, '数据库', '1', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:25:28', '1', '2022-03-15 00:25:28', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1151, 10, '本地磁盘', '10', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:25:41', '1', '2022-03-15 00:25:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1152, 11, 'FTP 服务器', '11', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:06', '1', '2022-03-15 00:26:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1153, 12, 'SFTP 服务器', '12', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:22', '1', '2022-03-15 00:26:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1154, 20, 'S3 对象存储', '20', 'infra_file_storage', 0, 'default', '', NULL, '1', '2022-03-15 00:26:31', '1', '2022-03-15 00:26:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1155, 103, '短信登录', '103', 'system_login_type', 0, 'default', '', NULL, '1', '2022-05-09 23:57:58', '1', '2022-05-09 23:58:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1156, 1, 'password', 'password', 'system_oauth2_grant_type', 0, 'default', '', '密码模式', '1', '2022-05-12 00:22:05', '1', '2022-05-11 16:26:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1157, 2, 'authorization_code', 'authorization_code', 'system_oauth2_grant_type', 0, 'primary', '', '授权码模式', '1', '2022-05-12 00:22:59', '1', '2022-05-11 16:26:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1158, 3, 'implicit', 'implicit', 'system_oauth2_grant_type', 0, 'success', '', '简化模式', '1', '2022-05-12 00:23:40', '1', '2022-05-11 16:26:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1159, 4, 'client_credentials', 'client_credentials', 'system_oauth2_grant_type', 0, 'default', '', '客户端模式', '1', '2022-05-12 00:23:51', '1', '2022-05-11 16:26:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1160, 5, 'refresh_token', 'refresh_token', 'system_oauth2_grant_type', 0, 'info', '', '刷新模式', '1', '2022-05-12 00:24:02', '1', '2022-05-11 16:26:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1162, 1, '销售中', '1', 'product_spu_status', 0, 'success', '', '商品 SPU 状态 - 销售中', '1', '2022-10-24 21:19:47', '1', '2022-10-24 21:20:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1163, 0, '仓库中', '0', 'product_spu_status', 0, 'info', '', '商品 SPU 状态 - 仓库中', '1', '2022-10-24 21:20:54', '1', '2022-10-24 21:21:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1164, 0, '回收站', '-1', 'product_spu_status', 0, 'default', '', '商品 SPU 状态 - 回收站', '1', '2022-10-24 21:21:11', '1', '2022-10-24 21:21:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1165, 1, '满减', '1', 'promotion_discount_type', 0, 'success', '', '优惠类型 - 满减', '1', '2022-11-01 12:46:41', '1', '2022-11-01 12:50:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1166, 2, '折扣', '2', 'promotion_discount_type', 0, 'primary', '', '优惠类型 - 折扣', '1', '2022-11-01 12:46:51', '1', '2022-11-01 12:50:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1167, 1, '固定日期', '1', 'promotion_coupon_template_validity_type', 0, 'default', '', '优惠劵模板的有限期类型 - 固定日期', '1', '2022-11-02 00:07:34', '1', '2022-11-04 00:07:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1168, 2, '领取之后', '2', 'promotion_coupon_template_validity_type', 0, 'default', '', '优惠劵模板的有限期类型 - 领取之后', '1', '2022-11-02 00:07:54', '1', '2022-11-04 00:07:52', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1169, 1, '通用劵', '1', 'promotion_product_scope', 0, 'default', '', '营销的商品范围 - 全部商品参与', '1', '2022-11-02 00:28:22', '1', '2023-09-28 00:27:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1170, 2, '商品劵', '2', 'promotion_product_scope', 0, 'default', '', '营销的商品范围 - 指定商品参与', '1', '2022-11-02 00:28:34', '1', '2023-09-28 00:27:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1171, 1, '未使用', '1', 'promotion_coupon_status', 0, 'primary', '', '优惠劵的状态 - 已领取', '1', '2022-11-04 00:15:08', '1', '2023-10-03 12:54:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1172, 2, '已使用', '2', 'promotion_coupon_status', 0, 'success', '', '优惠劵的状态 - 已使用', '1', '2022-11-04 00:15:21', '1', '2022-11-04 19:16:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1173, 3, '已过期', '3', 'promotion_coupon_status', 0, 'info', '', '优惠劵的状态 - 已过期', '1', '2022-11-04 00:15:43', '1', '2022-11-04 19:16:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1174, 1, '直接领取', '1', 'promotion_coupon_take_type', 0, 'primary', '', '优惠劵的领取方式 - 直接领取', '1', '2022-11-04 19:13:00', '1', '2022-11-04 19:13:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1175, 2, '指定发放', '2', 'promotion_coupon_take_type', 0, 'success', '', '优惠劵的领取方式 - 指定发放', '1', '2022-11-04 19:13:13', '1', '2022-11-04 19:14:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1176, 10, '未开始', '10', 'promotion_activity_status', 0, 'primary', '', '促销活动的状态枚举 - 未开始', '1', '2022-11-04 22:54:49', '1', '2022-11-04 22:55:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1177, 20, '进行中', '20', 'promotion_activity_status', 0, 'success', '', '促销活动的状态枚举 - 进行中', '1', '2022-11-04 22:55:06', '1', '2022-11-04 22:55:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1178, 30, '已结束', '30', 'promotion_activity_status', 0, 'info', '', '促销活动的状态枚举 - 已结束', '1', '2022-11-04 22:55:41', '1', '2022-11-04 22:55:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1179, 40, '已关闭', '40', 'promotion_activity_status', 0, 'warning', '', '促销活动的状态枚举 - 已关闭', '1', '2022-11-04 22:56:10', '1', '2022-11-04 22:56:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1180, 10, '满 N 元', '10', 'promotion_condition_type', 0, 'primary', '', '营销的条件类型 - 满 N 元', '1', '2022-11-04 22:59:45', '1', '2022-11-04 22:59:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1181, 20, '满 N 件', '20', 'promotion_condition_type', 0, 'success', '', '营销的条件类型 - 满 N 件', '1', '2022-11-04 23:00:02', '1', '2022-11-04 23:00:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1182, 10, '申请售后', '10', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 申请售后', '1', '2022-11-19 20:53:33', '1', '2022-11-19 20:54:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1183, 20, '商品待退货', '20', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 商品待退货', '1', '2022-11-19 20:54:36', '1', '2022-11-19 20:58:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1184, 30, '商家待收货', '30', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 商家待收货', '1', '2022-11-19 20:56:56', '1', '2022-11-19 20:59:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1185, 40, '等待退款', '40', 'trade_after_sale_status', 0, 'primary', '', '交易售后状态 - 等待退款', '1', '2022-11-19 20:59:54', '1', '2022-11-19 21:00:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1186, 50, '退款成功', '50', 'trade_after_sale_status', 0, 'default', '', '交易售后状态 - 退款成功', '1', '2022-11-19 21:00:33', '1', '2022-11-19 21:00:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1187, 61, '买家取消', '61', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 买家取消', '1', '2022-11-19 21:01:29', '1', '2022-11-19 21:01:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1188, 62, '商家拒绝', '62', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 商家拒绝', '1', '2022-11-19 21:02:17', '1', '2022-11-19 21:02:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1189, 63, '商家拒收货', '63', 'trade_after_sale_status', 0, 'info', '', '交易售后状态 - 商家拒收货', '1', '2022-11-19 21:02:37', '1', '2022-11-19 21:03:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1190, 10, '售中退款', '10', 'trade_after_sale_type', 0, 'success', '', '交易售后的类型 - 售中退款', '1', '2022-11-19 21:05:05', '1', '2022-11-19 21:38:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1191, 20, '售后退款', '20', 'trade_after_sale_type', 0, 'primary', '', '交易售后的类型 - 售后退款', '1', '2022-11-19 21:05:32', '1', '2022-11-19 21:38:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1192, 10, '仅退款', '10', 'trade_after_sale_way', 0, 'primary', '', '交易售后的方式 - 仅退款', '1', '2022-11-19 21:39:19', '1', '2022-11-19 21:39:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1193, 20, '退货退款', '20', 'trade_after_sale_way', 0, 'success', '', '交易售后的方式 - 退货退款', '1', '2022-11-19 21:39:38', '1', '2022-11-19 21:39:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1194, 10, '微信小程序', '10', 'terminal', 0, 'default', '', '终端 - 微信小程序', '1', '2022-12-10 10:51:11', '1', '2022-12-10 10:51:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1195, 20, 'H5 网页', '20', 'terminal', 0, 'default', '', '终端 - H5 网页', '1', '2022-12-10 10:51:30', '1', '2022-12-10 10:51:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1196, 11, '微信公众号', '11', 'terminal', 0, 'default', '', '终端 - 微信公众号', '1', '2022-12-10 10:54:16', '1', '2022-12-10 10:52:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1197, 31, '苹果 App', '31', 'terminal', 0, 'default', '', '终端 - 苹果 App', '1', '2022-12-10 10:54:42', '1', '2022-12-10 10:52:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1198, 32, '安卓 App', '32', 'terminal', 0, 'default', '', '终端 - 安卓 App', '1', '2022-12-10 10:55:02', '1', '2022-12-10 10:59:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1199, 0, '普通订单', '0', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 普通订单', '1', '2022-12-10 16:34:14', '1', '2022-12-10 16:34:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1200, 1, '秒杀订单', '1', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 秒杀订单', '1', '2022-12-10 16:34:26', '1', '2022-12-10 16:34:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1201, 2, '拼团订单', '2', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 拼团订单', '1', '2022-12-10 16:34:36', '1', '2022-12-10 16:34:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1202, 3, '砍价订单', '3', 'trade_order_type', 0, 'default', '', '交易订单的类型 - 砍价订单', '1', '2022-12-10 16:34:48', '1', '2022-12-10 16:34:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1203, 0, '待支付', '0', 'trade_order_status', 0, 'default', '', '交易订单状态 - 待支付', '1', '2022-12-10 16:49:29', '1', '2022-12-10 16:49:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1204, 10, '待发货', '10', 'trade_order_status', 0, 'primary', '', '交易订单状态 - 待发货', '1', '2022-12-10 16:49:53', '1', '2022-12-10 16:51:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1205, 20, '已发货', '20', 'trade_order_status', 0, 'primary', '', '交易订单状态 - 已发货', '1', '2022-12-10 16:50:13', '1', '2022-12-10 16:51:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1206, 30, '已完成', '30', 'trade_order_status', 0, 'success', '', '交易订单状态 - 已完成', '1', '2022-12-10 16:50:30', '1', '2022-12-10 16:51:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1207, 40, '已取消', '40', 'trade_order_status', 0, 'danger', '', '交易订单状态 - 已取消', '1', '2022-12-10 16:50:50', '1', '2022-12-10 16:51:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1208, 0, '未售后', '0', 'trade_order_item_after_sale_status', 0, 'info', '', '交易订单项的售后状态 - 未售后', '1', '2022-12-10 20:58:42', '1', '2022-12-10 20:59:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1209, 1, '售后中', '1', 'trade_order_item_after_sale_status', 0, 'primary', '', '交易订单项的售后状态 - 售后中', '1', '2022-12-10 20:59:21', '1', '2022-12-10 20:59:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1210, 2, '已退款', '2', 'trade_order_item_after_sale_status', 0, 'success', '', '交易订单项的售后状态 - 已退款', '1', '2022-12-10 20:59:46', '1', '2022-12-10 20:59:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1211, 1, '完全匹配', '1', 'mp_auto_reply_request_match', 0, 'primary', '', '公众号自动回复的请求关键字匹配模式 - 完全匹配', '1', '2023-01-16 23:30:39', '1', '2023-01-16 23:31:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1212, 2, '半匹配', '2', 'mp_auto_reply_request_match', 0, 'success', '', '公众号自动回复的请求关键字匹配模式 - 半匹配', '1', '2023-01-16 23:30:55', '1', '2023-01-16 23:31:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1213, 1, '文本', 'text', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 文本', '1', '2023-01-17 22:17:32', '1', '2023-01-17 22:17:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1214, 2, '图片', 'image', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 图片', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:19:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1215, 3, '语音', 'voice', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 语音', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:20:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1216, 4, '视频', 'video', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 视频', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:21:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1217, 5, '小视频', 'shortvideo', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 小视频', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:19:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1218, 6, '图文', 'news', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 图文', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:22:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1219, 7, '音乐', 'music', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 音乐', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:22:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1220, 8, '地理位置', 'location', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 地理位置', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:23:51', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1221, 9, '链接', 'link', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 链接', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1222, 10, '事件', 'event', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 事件', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1223, 0, '初始化', '0', 'system_mail_send_status', 0, 'primary', '', '邮件发送状态 - 初始化\n', '1', '2023-01-26 09:53:49', '1', '2023-01-26 16:36:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1224, 10, '发送成功', '10', 'system_mail_send_status', 0, 'success', '', '邮件发送状态 - 发送成功', '1', '2023-01-26 09:54:28', '1', '2023-01-26 16:36:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1225, 20, '发送失败', '20', 'system_mail_send_status', 0, 'danger', '', '邮件发送状态 - 发送失败', '1', '2023-01-26 09:54:50', '1', '2023-01-26 16:36:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1226, 30, '不发送', '30', 'system_mail_send_status', 0, 'info', '', '邮件发送状态 - 不发送', '1', '2023-01-26 09:55:06', '1', '2023-01-26 16:36:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1227, 1, '通知公告', '1', 'system_notify_template_type', 0, 'primary', '', '站内信模版的类型 - 通知公告', '1', '2023-01-28 10:35:59', '1', '2023-01-28 10:35:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1228, 2, '系统消息', '2', 'system_notify_template_type', 0, 'success', '', '站内信模版的类型 - 系统消息', '1', '2023-01-28 10:36:20', '1', '2023-01-28 10:36:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1230, 13, '支付宝条码支付', 'alipay_bar', 'pay_channel_code', 0, 'primary', '', '支付宝条码支付', '1', '2023-02-18 23:32:24', '1', '2023-07-19 20:09:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1231, 10, 'Vue2 Element UI 标准模版', '10', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:03:55', '1', '2023-04-13 00:03:55', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus 标准模版', '20', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:08', '1', '2023-04-13 00:04:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1233, 21, 'Vue3 Element Plus Schema 模版', '21', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vue3 vben 模版', '30', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2023-04-13 00:04:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1335, 11, '订单积分抵扣', '11', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:27', '1', '2023-10-11 07:41:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1336, 1, '签到', '1', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:48', '1', '2023-08-20 11:59:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1341, 20, '已退款', '20', 'pay_order_status', 0, 'danger', '', '已退款', '1', '2023-07-19 18:05:37', '1', '2023-07-19 18:05:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1342, 21, '请求成功,但是结果失败', '21', 'pay_notify_status', 0, 'warning', '', '请求成功,但是结果失败', '1', '2023-07-19 18:10:47', '1', '2023-07-19 18:11:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1343, 22, '请求失败', '22', 'pay_notify_status', 0, 'warning', '', NULL, '1', '2023-07-19 18:11:05', '1', '2023-07-19 18:11:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1344, 4, '微信扫码支付', 'wx_native', 'pay_channel_code', 0, 'success', '', '微信扫码支付', '1', '2023-07-19 20:07:47', '1', '2023-07-19 20:09:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1345, 5, '微信条码支付', 'wx_bar', 'pay_channel_code', 0, 'success', '', '微信条码支付\n', '1', '2023-07-19 20:08:06', '1', '2023-07-19 20:09:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1346, 1, '支付单', '1', 'pay_notify_type', 0, 'primary', '', '支付单', '1', '2023-07-20 12:23:17', '1', '2023-07-20 12:23:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1347, 2, '退款单', '2', 'pay_notify_type', 0, 'danger', '', NULL, '1', '2023-07-20 12:23:26', '1', '2023-07-20 12:23:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1348, 20, '模拟支付', 'mock', 'pay_channel_code', 0, 'default', '', '模拟支付', '1', '2023-07-29 11:10:51', '1', '2023-07-29 03:14:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1349, 12, '订单积分抵扣(整单取消)', '12', 'member_point_biz_type', 0, '', '', '', '1', '2023-08-20 12:00:03', '1', '2023-10-11 07:42:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1350, 0, '管理员调整', '0', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1351, 1, '邀新奖励', '1', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1352, 11, '下单奖励', '11', 'member_experience_biz_type', 0, 'success', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1353, 12, '下单奖励(整单取消)', '12', 'member_experience_biz_type', 0, 'warning', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1354, 4, '签到奖励', '4', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1355, 5, '抽奖奖励', '5', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1356, 1, '快递发货', '1', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:04:55', '1', '2023-08-23 00:04:55', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1357, 2, '用户自提', '2', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:05:05', '1', '2023-08-23 00:05:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1358, 3, '品类劵', '3', 'promotion_product_scope', 0, 'default', '', '', '1', '2023-09-01 23:43:07', '1', '2023-09-28 00:27:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1359, 1, '人人分销', '1', 'brokerage_enabled_condition', 0, '', '', '所有用户都可以分销', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1360, 2, '指定分销', '2', 'brokerage_enabled_condition', 0, '', '', '仅可后台手动设置推广员', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1361, 1, '首次绑定', '1', 'brokerage_bind_mode', 0, '', '', '只要用户没有推广人,随时都可以绑定推广关系', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1362, 2, '注册绑定', '2', 'brokerage_bind_mode', 0, '', '', '仅新用户注册时才能绑定推广关系', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1363, 3, '覆盖绑定', '3', 'brokerage_bind_mode', 0, '', '', '如果用户已经有推广人,推广人会被变更', '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1364, 1, '钱包', '1', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1365, 2, '银行卡', '2', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1366, 3, '微信', '3', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1367, 4, '支付宝', '4', 'brokerage_withdraw_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1368, 1, '订单返佣', '1', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1369, 2, '申请提现', '2', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1370, 3, '申请提现驳回', '3', 'brokerage_record_biz_type', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1371, 0, '待结算', '0', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1372, 1, '已结算', '1', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1373, 2, '已取消', '2', 'brokerage_record_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1374, 0, '审核中', '0', 'brokerage_withdraw_status', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1375, 10, '审核通过', '10', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1376, 11, '提现成功', '11', 'brokerage_withdraw_status', 0, 'success', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1377, 20, '审核不通过', '20', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1378, 21, '提现失败', '21', 'brokerage_withdraw_status', 0, 'danger', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1379, 0, '工商银行', '0', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1380, 1, '建设银行', '1', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1381, 2, '农业银行', '2', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1382, 3, '中国银行', '3', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1383, 4, '交通银行', '4', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1384, 5, '招商银行', '5', 'brokerage_bank_name', 0, '', '', NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1385, 21, '钱包', 'wallet', 'pay_channel_code', 0, 'primary', '', '', '1', '2023-10-01 21:46:19', '1', '2023-10-01 21:48:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1386, 1, '砍价中', '1', 'promotion_bargain_record_status', 0, 'default', '', '', '1', '2023-10-05 10:41:26', '1', '2023-10-05 10:41:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1387, 2, '砍价成功', '2', 'promotion_bargain_record_status', 0, 'success', '', '', '1', '2023-10-05 10:41:39', '1', '2023-10-05 10:41:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1388, 3, '砍价失败', '3', 'promotion_bargain_record_status', 0, 'warning', '', '', '1', '2023-10-05 10:41:57', '1', '2023-10-05 10:41:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1389, 1, '拼团中', '1', 'promotion_combination_record_status', 0, '', '', '', '1', '2023-10-08 07:24:44', '1', '2023-10-08 07:24:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1390, 2, '拼团成功', '2', 'promotion_combination_record_status', 0, 'success', '', '', '1', '2023-10-08 07:24:56', '1', '2023-10-08 07:24:56', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1391, 3, '拼团失败', '3', 'promotion_combination_record_status', 0, 'warning', '', '', '1', '2023-10-08 07:25:11', '1', '2023-10-08 07:25:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1392, 2, '管理员修改', '2', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:41:34', '1', '2023-10-11 07:41:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1393, 13, '订单积分抵扣(单个退款)', '13', 'member_point_biz_type', 0, '', '', '', '1', '2023-10-11 07:42:29', '1', '2023-10-11 07:42:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1394, 21, '订单积分奖励', '21', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:44', '1', '2023-10-11 07:42:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1395, 22, '订单积分奖励(整单取消)', '22', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:55', '1', '2023-10-11 07:43:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1396, 23, '订单积分奖励(单个退款)', '23', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:43:16', '1', '2023-10-11 07:43:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1397, 13, '下单奖励(单个退款)', '13', 'member_experience_biz_type', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1398, 5, '网上转账', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:24', '1', '2023-10-18 21:55:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1399, 6, '支付宝', '6', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:38', '1', '2023-10-18 21:55:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1400, 7, '微信支付', '7', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:53', '1', '2023-10-18 21:55:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1401, 8, '其他', '8', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:56:06', '1', '2023-10-18 21:56:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1402, 1, 'IT', '1', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:15', '1', '2024-02-18 23:30:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1403, 2, '金融业', '2', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:29', '1', '2024-02-18 23:30:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1404, 3, '房地产', '3', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:41', '1', '2024-02-18 23:30:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1405, 4, '商业服务', '4', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:02:54', '1', '2024-02-18 23:30:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1406, 5, '运输/物流', '5', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:03', '1', '2024-02-18 23:31:00', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1407, 6, '生产', '6', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:13', '1', '2024-02-18 23:31:08', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1408, 7, '政府', '7', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:27', '1', '2024-02-18 23:31:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1409, 8, '文化传媒', '8', 'crm_customer_industry', 0, 'default', '', '', '1', '2023-10-28 23:03:37', '1', '2024-02-18 23:31:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1422, 1, 'A (重点客户)', '1', 'crm_customer_level', 0, 'primary', '', '', '1', '2023-10-28 23:07:13', '1', '2023-10-28 23:07:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1423, 2, 'B (普通客户)', '2', 'crm_customer_level', 0, 'info', '', '', '1', '2023-10-28 23:07:35', '1', '2023-10-28 23:07:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1424, 3, 'C (非优先客户)', '3', 'crm_customer_level', 0, 'default', '', '', '1', '2023-10-28 23:07:53', '1', '2023-10-28 23:07:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1425, 1, '促销', '1', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:29', '1', '2023-10-28 23:08:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1426, 2, '搜索引擎', '2', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:39', '1', '2023-10-28 23:08:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1427, 3, '广告', '3', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:47', '1', '2023-10-28 23:08:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1428, 4, '转介绍', '4', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:08:58', '1', '2023-10-28 23:08:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1429, 5, '线上注册', '5', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:12', '1', '2023-10-28 23:09:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1430, 6, '线上咨询', '6', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:22', '1', '2023-10-28 23:09:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1431, 7, '预约上门', '7', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:09:39', '1', '2023-10-28 23:09:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1432, 8, '陌拜', '8', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:04', '1', '2023-10-28 23:10:04', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1433, 9, '电话咨询', '9', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:18', '1', '2023-10-28 23:10:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1434, 10, '邮件咨询', '10', 'crm_customer_source', 0, 'default', '', '', '1', '2023-10-28 23:10:33', '1', '2023-10-28 23:10:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1435, 10, 'Gitee', '10', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:04:42', '1', '2023-11-04 13:04:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1436, 20, '钉钉', '20', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:04:54', '1', '2023-11-04 13:04:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1437, 30, '企业微信', '30', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:09', '1', '2023-11-04 13:05:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1438, 31, '微信公众平台', '31', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:18', '1', '2023-11-04 13:05:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1439, 32, '微信开放平台', '32', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:30', '1', '2023-11-04 13:05:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1440, 34, '微信小程序', '34', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:38', '1', '2023-11-04 13:07:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1441, 1, '上架', '1', 'crm_product_status', 0, 'success', '', '', '1', '2023-10-30 21:49:34', '1', '2023-10-30 21:49:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1442, 0, '下架', '0', 'crm_product_status', 0, 'success', '', '', '1', '2023-10-30 21:49:13', '1', '2023-10-30 21:49:13', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1443, 15, '子表', '15', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-13 23:06:16', '1', '2023-11-13 23:06:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1444, 10, '主表(标准模式)', '10', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-14 12:32:49', '1', '2023-11-14 12:32:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1445, 11, '主表(ERP 模式)', '11', 'infra_codegen_template_type', 0, 'default', '', '', '1', '2023-11-14 12:33:05', '1', '2023-11-14 12:33:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1446, 12, '主表(内嵌模式)', '12', 'infra_codegen_template_type', 0, '', '', '', '1', '2023-11-14 12:33:31', '1', '2023-11-14 12:33:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1447, 1, '负责人', '1', 'crm_permission_level', 0, 'default', '', '', '1', '2023-11-30 09:53:12', '1', '2023-11-30 09:53:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1448, 2, '只读', '2', 'crm_permission_level', 0, '', '', '', '1', '2023-11-30 09:53:29', '1', '2023-11-30 09:53:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1449, 3, '读写', '3', 'crm_permission_level', 0, '', '', '', '1', '2023-11-30 09:53:36', '1', '2023-11-30 09:53:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1450, 0, '未提交', '0', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:56:59', '1', '2023-11-30 18:56:59', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1451, 10, '审批中', '10', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:10', '1', '2023-11-30 18:57:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1452, 20, '审核通过', '20', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:24', '1', '2023-11-30 18:57:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1453, 30, '审核不通过', '30', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:32', '1', '2023-11-30 18:57:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1454, 40, '已取消', '40', 'crm_audit_status', 0, '', '', '', '1', '2023-11-30 18:57:42', '1', '2023-11-30 18:57:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1456, 1, '支票', '1', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:29', '1', '2023-10-18 21:54:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1457, 2, '现金', '2', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:41', '1', '2023-10-18 21:54:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1458, 3, '邮政汇款', '3', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:54:53', '1', '2023-10-18 21:54:53', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1459, 4, '电汇', '4', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:07', '1', '2023-10-18 21:55:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1460, 5, '网上转账', '5', 'crm_receivable_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:24', '1', '2023-10-18 21:55:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1461, 1, '个', '1', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:26', '1', '2023-12-05 23:02:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1462, 2, '块', '2', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:34', '1', '2023-12-05 23:02:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1463, 3, '只', '3', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:02:57', '1', '2023-12-05 23:02:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1464, 4, '把', '4', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:05', '1', '2023-12-05 23:03:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1465, 5, '枚', '5', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:14', '1', '2023-12-05 23:03:14', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1466, 6, '瓶', '6', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:20', '1', '2023-12-05 23:03:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1467, 7, '盒', '7', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:30', '1', '2023-12-05 23:03:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1468, 8, '台', '8', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:41', '1', '2023-12-05 23:03:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1469, 9, '吨', '9', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:03:48', '1', '2023-12-05 23:03:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1470, 10, '千克', '10', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:03', '1', '2023-12-05 23:04:03', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1471, 11, '米', '11', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:12', '1', '2023-12-05 23:04:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1472, 12, '箱', '12', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:25', '1', '2023-12-05 23:04:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1473, 13, '套', '13', 'crm_product_unit', 0, '', '', '', '1', '2023-12-05 23:04:34', '1', '2023-12-05 23:04:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1474, 1, '打电话', '1', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:48:20', '1', '2024-01-15 20:48:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1475, 2, '发短信', '2', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:48:31', '1', '2024-01-15 20:48:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1476, 3, '上门拜访', '3', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:49:07', '1', '2024-01-15 20:49:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1477, 4, '微信沟通', '4', 'crm_follow_up_type', 0, '', '', '', '1', '2024-01-15 20:49:15', '1', '2024-01-15 20:49:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1478, 4, '钱包余额', '4', 'pay_transfer_type', 0, 'info', '', '', '1', '2023-10-28 16:28:37', '1', '2023-10-28 16:28:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1479, 3, '银行卡', '3', 'pay_transfer_type', 0, 'default', '', '', '1', '2023-10-28 16:28:21', '1', '2023-10-28 16:28:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1480, 2, '微信余额', '2', 'pay_transfer_type', 0, 'info', '', '', '1', '2023-10-28 16:28:07', '1', '2023-10-28 16:28:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1481, 1, '支付宝余额', '1', 'pay_transfer_type', 0, 'default', '', '', '1', '2023-10-28 16:27:44', '1', '2023-10-28 16:27:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1482, 4, '转账失败', '30', 'pay_transfer_status', 0, 'warning', '', '', '1', '2023-10-28 16:24:16', '1', '2023-10-28 16:24:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1483, 3, '转账成功', '20', 'pay_transfer_status', 0, 'success', '', '', '1', '2023-10-28 16:23:50', '1', '2023-10-28 16:23:50', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1484, 2, '转账进行中', '10', 'pay_transfer_status', 0, 'info', '', '', '1', '2023-10-28 16:23:12', '1', '2023-10-28 16:23:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1485, 1, '等待转账', '0', 'pay_transfer_status', 0, 'default', '', '', '1', '2023-10-28 16:21:43', '1', '2023-10-28 16:23:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1486, 10, '其它入库', '10', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-05 18:07:25', '1', '2024-02-05 18:07:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1487, 11, '其它入库(作废)', '11', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-05 18:08:07', '1', '2024-02-05 19:20:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1488, 20, '其它出库', '20', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-05 18:08:51', '1', '2024-02-05 18:08:51', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1489, 21, '其它出库(作废)', '21', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-05 18:09:00', '1', '2024-02-05 19:20:10', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1490, 10, '未审核', '10', 'erp_audit_status', 0, 'default', '', '', '1', '2024-02-06 00:00:21', '1', '2024-02-06 00:00:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1491, 20, '已审核', '20', 'erp_audit_status', 0, 'success', '', '', '1', '2024-02-06 00:00:35', '1', '2024-02-06 00:00:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1492, 30, '调拨入库', '30', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-07 20:34:19', '1', '2024-02-07 12:36:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1493, 31, '调拨入库(作废)', '31', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-07 20:34:29', '1', '2024-02-07 20:37:11', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1494, 32, '调拨出库', '32', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-07 20:34:38', '1', '2024-02-07 12:36:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1495, 33, '调拨出库(作废)', '33', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-07 20:34:49', '1', '2024-02-07 20:37:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1496, 40, '盘盈入库', '40', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-08 08:53:00', '1', '2024-02-08 08:53:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1497, 41, '盘盈入库(作废)', '41', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-08 08:53:39', '1', '2024-02-16 19:40:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1498, 42, '盘亏出库', '42', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-08 08:54:16', '1', '2024-02-08 08:54:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1499, 43, '盘亏出库(作废)', '43', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-08 08:54:31', '1', '2024-02-16 19:40:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1500, 50, '销售出库', '50', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-11 21:47:25', '1', '2024-02-11 21:50:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1501, 51, '销售出库(作废)', '51', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-11 21:47:37', '1', '2024-02-11 21:51:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1502, 60, '销售退货入库', '60', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-12 06:51:05', '1', '2024-02-12 06:51:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1503, 61, '销售退货入库(作废)', '61', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-12 06:51:18', '1', '2024-02-12 06:51:18', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1504, 70, '采购入库', '70', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-16 13:10:02', '1', '2024-02-16 13:10:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1505, 71, '采购入库(作废)', '71', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:10', '1', '2024-02-16 19:40:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1506, 80, '采购退货出库', '80', 'erp_stock_record_biz_type', 0, '', '', '', '1', '2024-02-16 13:10:17', '1', '2024-02-16 13:10:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1507, 81, '采购退货出库(作废)', '81', 'erp_stock_record_biz_type', 0, 'danger', '', '', '1', '2024-02-16 13:10:26', '1', '2024-02-16 19:40:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1509, 3, '审批不通过', '3', 'bpm_process_instance_status', 0, 'danger', '', '', '1', '2024-03-16 16:12:06', '1', '2024-03-16 16:12:06', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1510, 4, '已取消', '4', 'bpm_process_instance_status', 0, 'warning', '', '', '1', '2024-03-16 16:12:22', '1', '2024-03-16 16:12:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1511, 5, '已退回', '5', 'bpm_task_status', 0, 'warning', '', '', '1', '2024-03-16 19:10:46', '1', '2024-03-08 22:41:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1512, 6, '委派中', '6', 'bpm_task_status', 0, 'primary', '', '', '1', '2024-03-17 10:06:22', '1', '2024-03-08 22:41:40', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1513, 7, '审批通过中', '7', 'bpm_task_status', 0, 'success', '', '', '1', '2024-03-17 10:06:47', '1', '2024-03-08 22:41:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1514, 0, '待审批', '0', 'bpm_task_status', 0, 'info', '', '', '1', '2024-03-17 10:07:11', '1', '2024-03-08 22:41:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1515, 35, '发起人自选', '35', 'bpm_task_candidate_strategy', 0, '', '', '', '1', '2024-03-22 19:45:16', '1', '2024-03-22 19:45:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1516, 1, '执行监听器', 'execution', 'bpm_process_listener_type', 0, 'primary', '', '', '1', '2024-03-23 12:54:03', '1', '2024-03-23 19:14:19', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1517, 1, '任务监听器', 'task', 'bpm_process_listener_type', 0, 'success', '', '', '1', '2024-03-23 12:54:13', '1', '2024-03-23 19:14:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1526, 1, 'Java 类', 'class', 'bpm_process_listener_value_type', 0, 'primary', '', '', '1', '2024-03-23 15:08:45', '1', '2024-03-23 19:14:32', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1527, 2, '表达式', 'expression', 'bpm_process_listener_value_type', 0, 'success', '', '', '1', '2024-03-23 15:09:06', '1', '2024-03-23 19:14:38', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1528, 3, '代理表达式', 'delegateExpression', 'bpm_process_listener_value_type', 0, 'info', '', '', '1', '2024-03-23 15:11:23', '1', '2024-03-23 19:14:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1529, 1, '天', '1', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:26', '1', '2024-03-29 22:50:26', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1530, 2, '周', '2', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:36', '1', '2024-03-29 22:50:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1531, 3, '月', '3', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:46', '1', '2024-03-29 22:50:54', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1532, 4, '季度', '4', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:01', '1', '2024-03-29 22:51:01', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1533, 5, '年', '5', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:07', '1', '2024-03-29 22:51:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1534, 1, '赢单', '1', 'crm_business_end_status_type', 0, 'success', '', '', '1', '2024-04-13 23:26:57', '1', '2024-04-13 23:26:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1535, 2, '输单', '2', 'crm_business_end_status_type', 0, 'primary', '', '', '1', '2024-04-13 23:27:31', '1', '2024-04-13 23:27:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1536, 3, '无效', '3', 'crm_business_end_status_type', 0, 'info', '', '', '1', '2024-04-13 23:27:59', '1', '2024-04-13 23:27:59', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_dict_data_seq; +CREATE SEQUENCE system_dict_data_seq + START 1537; + +-- ---------------------------- +-- Table structure for system_dict_type +-- ---------------------------- +DROP TABLE IF EXISTS system_dict_type; +CREATE TABLE system_dict_type +( + id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + type varchar(100) NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + deleted_time timestamp NULL DEFAULT NULL +); + +ALTER TABLE system_dict_type + ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); + +COMMENT ON COLUMN system_dict_type.id IS '字典主键'; +COMMENT ON COLUMN system_dict_type.name IS '字典名称'; +COMMENT ON COLUMN system_dict_type.type IS '字典类型'; +COMMENT ON COLUMN system_dict_type.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_dict_type.remark IS '备注'; +COMMENT ON COLUMN system_dict_type.creator IS '创建者'; +COMMENT ON COLUMN system_dict_type.create_time IS '创建时间'; +COMMENT ON COLUMN system_dict_type.updater IS '更新者'; +COMMENT ON COLUMN system_dict_type.update_time IS '更新时间'; +COMMENT ON COLUMN system_dict_type.deleted IS '是否删除'; +COMMENT ON COLUMN system_dict_type.deleted_time IS '删除时间'; +COMMENT ON TABLE system_dict_type IS '字典类型表'; + +-- ---------------------------- +-- Records of system_dict_type +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1, '用户性别', 'system_user_sex', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2022-05-16 20:29:32', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (6, '参数类型', 'infra_config_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:36:54', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (7, '通知类型', 'system_notice_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:35:26', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (9, '操作类型', 'infra_operate_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (10, '系统状态', 'common_status', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:21:28', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (11, 'Boolean 是否类型', 'infra_boolean_string', 0, 'boolean 转是否', '', '2021-01-19 03:20:08', '', '2022-02-01 16:37:10', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (104, '登陆结果', 'system_login_result', 0, '登陆结果', '', '2021-01-18 06:17:11', '', '2022-02-01 16:36:00', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (106, '代码生成模板类型', 'infra_codegen_template_type', 0, NULL, '', '2021-02-05 07:08:06', '1', '2022-05-16 20:26:50', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (107, '定时任务状态', 'infra_job_status', 0, NULL, '', '2021-02-07 07:44:16', '', '2022-02-01 16:51:11', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (108, '定时任务日志状态', 'infra_job_log_status', 0, NULL, '', '2021-02-08 10:03:51', '', '2022-02-01 16:50:43', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (109, '用户类型', 'user_type', 0, NULL, '', '2021-02-26 00:15:51', '', '2021-02-26 00:15:51', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (110, 'API 异常数据的处理状态', 'infra_api_error_log_process_status', 0, NULL, '', '2021-02-26 07:07:01', '', '2022-02-01 16:50:53', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (111, '短信渠道编码', 'system_sms_channel_code', 0, NULL, '1', '2021-04-05 01:04:50', '1', '2022-02-16 02:09:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (112, '短信模板的类型', 'system_sms_template_type', 0, NULL, '1', '2021-04-05 21:50:43', '1', '2022-02-01 16:35:06', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (113, '短信发送状态', 'system_sms_send_status', 0, NULL, '1', '2021-04-11 20:18:03', '1', '2022-02-01 16:35:09', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (114, '短信接收状态', 'system_sms_receive_status', 0, NULL, '1', '2021-04-11 20:27:14', '1', '2022-02-01 16:35:14', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (116, '登陆日志的类型', 'system_login_type', 0, '登陆日志的类型', '1', '2021-10-06 00:50:46', '1', '2022-02-01 16:35:56', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (117, 'OA 请假类型', 'bpm_oa_leave_type', 0, NULL, '1', '2021-09-21 22:34:33', '1', '2022-01-22 10:41:37', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (130, '支付渠道编码类型', 'pay_channel_code', 0, '支付渠道的编码', '1', '2021-12-03 10:35:08', '1', '2023-07-10 10:11:39', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (131, '支付回调状态', 'pay_notify_status', 0, '支付回调状态(包括退款回调)', '1', '2021-12-03 10:53:29', '1', '2023-07-19 18:09:43', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (132, '支付订单状态', 'pay_order_status', 0, '支付订单状态', '1', '2021-12-03 11:17:50', '1', '2021-12-03 11:17:50', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (134, '退款订单状态', 'pay_refund_status', 0, '退款订单状态', '1', '2021-12-10 16:42:50', '1', '2023-07-19 10:13:17', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (139, '流程实例的状态', 'bpm_process_instance_status', 0, '流程实例的状态', '1', '2022-01-07 23:46:42', '1', '2022-01-07 23:46:42', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (140, '流程实例的结果', 'bpm_task_status', 0, '流程实例的结果', '1', '2022-01-07 23:48:10', '1', '2024-03-08 22:42:03', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (141, '流程的表单类型', 'bpm_model_form_type', 0, '流程的表单类型', '103', '2022-01-11 23:50:45', '103', '2022-01-11 23:50:45', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (142, '任务分配规则的类型', 'bpm_task_candidate_strategy', 0, 'BPM 任务的候选人的策略', '103', '2022-01-12 23:21:04', '103', '2024-03-06 02:53:59', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (144, '代码生成的场景枚举', 'infra_codegen_scene', 0, '代码生成的场景枚举', '1', '2022-02-02 13:14:45', '1', '2022-03-10 16:33:46', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (145, '角色类型', 'system_role_type', 0, '角色类型', '1', '2022-02-16 13:01:46', '1', '2022-02-16 13:01:46', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (146, '文件存储器', 'infra_file_storage', 0, '文件存储器', '1', '2022-03-15 00:24:38', '1', '2022-03-15 00:24:38', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (147, 'OAuth 2.0 授权类型', 'system_oauth2_grant_type', 0, 'OAuth 2.0 授权类型(模式)', '1', '2022-05-12 00:20:52', '1', '2022-05-11 16:25:49', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (149, '商品 SPU 状态', 'product_spu_status', 0, '商品 SPU 状态', '1', '2022-10-24 21:19:04', '1', '2022-10-24 21:19:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (150, '优惠类型', 'promotion_discount_type', 0, '优惠类型', '1', '2022-11-01 12:46:06', '1', '2022-11-01 12:46:06', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (151, '优惠劵模板的有限期类型', 'promotion_coupon_template_validity_type', 0, '优惠劵模板的有限期类型', '1', '2022-11-02 00:06:20', '1', '2022-11-04 00:08:26', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (152, '营销的商品范围', 'promotion_product_scope', 0, '营销的商品范围', '1', '2022-11-02 00:28:01', '1', '2022-11-02 00:28:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (153, '优惠劵的状态', 'promotion_coupon_status', 0, '优惠劵的状态', '1', '2022-11-04 00:14:49', '1', '2022-11-04 00:14:49', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (154, '优惠劵的领取方式', 'promotion_coupon_take_type', 0, '优惠劵的领取方式', '1', '2022-11-04 19:12:27', '1', '2022-11-04 19:12:27', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (155, '促销活动的状态', 'promotion_activity_status', 0, '促销活动的状态', '1', '2022-11-04 22:54:23', '1', '2022-11-04 22:54:23', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (156, '营销的条件类型', 'promotion_condition_type', 0, '营销的条件类型', '1', '2022-11-04 22:59:23', '1', '2022-11-04 22:59:23', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (157, '交易售后状态', 'trade_after_sale_status', 0, '交易售后状态', '1', '2022-11-19 20:52:56', '1', '2022-11-19 20:52:56', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (158, '交易售后的类型', 'trade_after_sale_type', 0, '交易售后的类型', '1', '2022-11-19 21:04:09', '1', '2022-11-19 21:04:09', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (159, '交易售后的方式', 'trade_after_sale_way', 0, '交易售后的方式', '1', '2022-11-19 21:39:04', '1', '2022-11-19 21:39:04', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (160, '终端', 'terminal', 0, '终端', '1', '2022-12-10 10:50:50', '1', '2022-12-10 10:53:11', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (161, '交易订单的类型', 'trade_order_type', 0, '交易订单的类型', '1', '2022-12-10 16:33:54', '1', '2022-12-10 16:33:54', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (162, '交易订单的状态', 'trade_order_status', 0, '交易订单的状态', '1', '2022-12-10 16:48:44', '1', '2022-12-10 16:48:44', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (163, '交易订单项的售后状态', 'trade_order_item_after_sale_status', 0, '交易订单项的售后状态', '1', '2022-12-10 20:58:08', '1', '2022-12-10 20:58:08', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (164, '公众号自动回复的请求关键字匹配模式', 'mp_auto_reply_request_match', 0, '公众号自动回复的请求关键字匹配模式', '1', '2023-01-16 23:29:56', '1', '2023-01-16 23:29:56', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (165, '公众号的消息类型', 'mp_message_type', 0, '公众号的消息类型', '1', '2023-01-17 22:17:09', '1', '2023-01-17 22:17:09', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (166, '邮件发送状态', 'system_mail_send_status', 0, '邮件发送状态', '1', '2023-01-26 09:53:13', '1', '2023-01-26 09:53:13', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (167, '站内信模版的类型', 'system_notify_template_type', 0, '站内信模版的类型', '1', '2023-01-28 10:35:10', '1', '2023-01-28 10:35:10', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (168, '代码生成的前端类型', 'infra_codegen_front_type', 0, '', '1', '2023-04-12 23:57:52', '1', '2023-04-12 23:57:52', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (170, '快递计费方式', 'trade_delivery_express_charge_mode', 0, '用于商城交易模块配送管理', '1', '2023-05-21 22:45:03', '1', '2023-05-21 22:45:03', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (171, '积分业务类型', 'member_point_biz_type', 0, '', '1', '2023-06-10 12:15:00', '1', '2023-06-28 13:48:20', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (173, '支付通知类型', 'pay_notify_type', 0, NULL, '1', '2023-07-20 12:23:03', '1', '2023-07-20 12:23:03', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (174, '会员经验业务类型', 'member_experience_biz_type', 0, NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (175, '交易配送类型', 'trade_delivery_type', 0, '', '1', '2023-08-23 00:03:14', '1', '2023-08-23 00:03:14', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (176, '分佣模式', 'brokerage_enabled_condition', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (177, '分销关系绑定模式', 'brokerage_bind_mode', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (178, '佣金提现类型', 'brokerage_withdraw_type', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (179, '佣金记录业务类型', 'brokerage_record_biz_type', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (180, '佣金记录状态', 'brokerage_record_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (181, '佣金提现状态', 'brokerage_withdraw_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (182, '佣金提现银行', 'brokerage_bank_name', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (183, '砍价记录的状态', 'promotion_bargain_record_status', 0, '', '1', '2023-10-05 10:41:08', '1', '2023-10-05 10:41:08', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (184, '拼团记录的状态', 'promotion_combination_record_status', 0, '', '1', '2023-10-08 07:24:25', '1', '2023-10-08 07:24:25', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (185, '回款-回款方式', 'crm_receivable_return_type', 0, '回款-回款方式', '1', '2023-10-18 21:54:10', '1', '2023-10-18 21:54:10', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (186, 'CRM 客户行业', 'crm_customer_industry', 0, 'CRM 客户所属行业', '1', '2023-10-28 22:57:07', '1', '2024-02-18 23:30:22', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (187, '客户等级', 'crm_customer_level', 0, 'CRM 客户等级', '1', '2023-10-28 22:59:12', '1', '2023-10-28 15:11:16', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (188, '客户来源', 'crm_customer_source', 0, 'CRM 客户来源', '1', '2023-10-28 23:00:34', '1', '2023-10-28 15:11:16', '0', NULL); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (600, 'Banner 位置', 'promotion_banner_position', 0, '', '1', '2023-10-08 07:24:25', '1', '2023-11-04 13:04:02', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (601, '社交类型', 'system_social_type', 0, '', '1', '2023-11-04 13:03:54', '1', '2023-11-04 13:03:54', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (604, '产品状态', 'crm_product_status', 0, '', '1', '2023-10-30 21:47:59', '1', '2023-10-30 21:48:45', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (605, 'CRM 数据权限的级别', 'crm_permission_level', 0, '', '1', '2023-11-30 09:51:59', '1', '2023-11-30 09:51:59', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (606, 'CRM 审批状态', 'crm_audit_status', 0, '', '1', '2023-11-30 18:56:23', '1', '2023-11-30 18:56:23', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (607, 'CRM 产品单位', 'crm_product_unit', 0, '', '1', '2023-12-05 23:01:51', '1', '2023-12-05 23:01:51', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (608, 'CRM 跟进方式', 'crm_follow_up_type', 0, '', '1', '2024-01-15 20:48:05', '1', '2024-01-15 20:48:05', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (609, '支付转账类型', 'pay_transfer_type', 0, '', '1', '2023-10-28 16:27:18', '1', '2023-10-28 16:27:18', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (610, '转账订单状态', 'pay_transfer_status', 0, '', '1', '2023-10-28 16:18:32', '1', '2023-10-28 16:18:32', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (611, 'ERP 库存明细的业务类型', 'erp_stock_record_biz_type', 0, 'ERP 库存明细的业务类型', '1', '2024-02-05 18:07:02', '1', '2024-02-05 18:07:02', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (612, 'ERP 审批状态', 'erp_audit_status', 0, '', '1', '2024-02-06 00:00:07', '1', '2024-02-06 00:00:07', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (613, 'BPM 监听器类型', 'bpm_process_listener_type', 0, '', '1', '2024-03-23 12:52:24', '1', '2024-03-09 15:54:28', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (616, '时间间隔', 'date_interval', 0, '', '1', '2024-03-29 22:50:09', '1', '2024-03-29 22:50:09', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (619, 'CRM 商机结束状态类型', 'crm_business_end_status_type', 0, '', '1', '2024-04-13 23:23:00', '1', '2024-04-13 23:23:00', '0', '1970-01-01 00:00:00'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_dict_type_seq; +CREATE SEQUENCE system_dict_type_seq + START 620; + +-- ---------------------------- +-- Table structure for system_login_log +-- ---------------------------- +DROP TABLE IF EXISTS system_login_log; +CREATE TABLE system_login_log +( + id int8 NOT NULL, + log_type int8 NOT NULL, + trace_id varchar(64) NULL DEFAULT '', + user_id int8 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + username varchar(50) NULL DEFAULT '', + result int2 NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_login_log + ADD CONSTRAINT pk_system_login_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_login_log.id IS '访问ID'; +COMMENT ON COLUMN system_login_log.log_type IS '日志类型'; +COMMENT ON COLUMN system_login_log.trace_id IS '链路追踪编号'; +COMMENT ON COLUMN system_login_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_login_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_login_log.username IS '用户账号'; +COMMENT ON COLUMN system_login_log.result IS '登陆结果'; +COMMENT ON COLUMN system_login_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN system_login_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_login_log.creator IS '创建者'; +COMMENT ON COLUMN system_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_login_log.updater IS '更新者'; +COMMENT ON COLUMN system_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_login_log.deleted IS '是否删除'; +COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_login_log IS '系统访问记录'; + +DROP SEQUENCE IF EXISTS system_login_log_seq; +CREATE SEQUENCE system_login_log_seq + START 1; + +-- ---------------------------- +-- Table structure for system_mail_account +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_account; +CREATE TABLE system_mail_account +( + id int8 NOT NULL, + mail varchar(255) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) NOT NULL, + host varchar(255) NOT NULL, + port int4 NOT NULL, + ssl_enable bool NOT NULL DEFAULT '0', + starttls_enable bool NOT NULL DEFAULT '0', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_mail_account + ADD CONSTRAINT pk_system_mail_account PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_account.id IS '主键'; +COMMENT ON COLUMN system_mail_account.mail IS '邮箱'; +COMMENT ON COLUMN system_mail_account.username IS '用户名'; +COMMENT ON COLUMN system_mail_account.password IS '密码'; +COMMENT ON COLUMN system_mail_account.host IS 'SMTP 服务器域名'; +COMMENT ON COLUMN system_mail_account.port IS 'SMTP 服务器端口'; +COMMENT ON COLUMN system_mail_account.ssl_enable IS '是否开启 SSL'; +COMMENT ON COLUMN system_mail_account.starttls_enable IS '是否开启 STARTTLS'; +COMMENT ON COLUMN system_mail_account.creator IS '创建者'; +COMMENT ON COLUMN system_mail_account.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_account.updater IS '更新者'; +COMMENT ON COLUMN system_mail_account.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_account.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_account IS '邮箱账号表'; + +-- ---------------------------- +-- Records of system_mail_account +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', '2023-01-25 17:39:52', '1', '2024-04-24 09:13:56', '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', '2023-01-26 01:26:03', '1', '2023-04-12 22:39:38', '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, '0', '0', '1', '2023-01-27 15:06:38', '1', '2023-01-27 07:08:36', '1'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, '7685413x@qq.com', '2', '3', '4', 5, '1', '0', '1', '2023-04-12 23:05:06', '1', '2023-04-12 15:05:11', '1'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_mail_account_seq; +CREATE SEQUENCE system_mail_account_seq + START 5; + +-- ---------------------------- +-- Table structure for system_mail_log +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_log; +CREATE TABLE system_mail_log +( + id int8 NOT NULL, + user_id int8 NULL DEFAULT NULL, + user_type int2 NULL DEFAULT NULL, + to_mail varchar(255) NOT NULL, + account_id int8 NOT NULL, + from_mail varchar(255) NOT NULL, + template_id int8 NOT NULL, + template_code varchar(63) NOT NULL, + template_nickname varchar(255) NULL DEFAULT NULL, + template_title varchar(255) NOT NULL, + template_content varchar(10240) NOT NULL, + template_params varchar(255) NOT NULL, + send_status int2 NOT NULL DEFAULT 0, + send_time timestamp NULL DEFAULT NULL, + send_message_id varchar(255) NULL DEFAULT NULL, + send_exception varchar(4096) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_mail_log + ADD CONSTRAINT pk_system_mail_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_log.id IS '编号'; +COMMENT ON COLUMN system_mail_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_mail_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_mail_log.to_mail IS '接收邮箱地址'; +COMMENT ON COLUMN system_mail_log.account_id IS '邮箱账号编号'; +COMMENT ON COLUMN system_mail_log.from_mail IS '发送邮箱地址'; +COMMENT ON COLUMN system_mail_log.template_id IS '模板编号'; +COMMENT ON COLUMN system_mail_log.template_code IS '模板编码'; +COMMENT ON COLUMN system_mail_log.template_nickname IS '模版发送人名称'; +COMMENT ON COLUMN system_mail_log.template_title IS '邮件标题'; +COMMENT ON COLUMN system_mail_log.template_content IS '邮件内容'; +COMMENT ON COLUMN system_mail_log.template_params IS '邮件参数'; +COMMENT ON COLUMN system_mail_log.send_status IS '发送状态'; +COMMENT ON COLUMN system_mail_log.send_time IS '发送时间'; +COMMENT ON COLUMN system_mail_log.send_message_id IS '发送返回的消息 ID'; +COMMENT ON COLUMN system_mail_log.send_exception IS '发送异常'; +COMMENT ON COLUMN system_mail_log.creator IS '创建者'; +COMMENT ON COLUMN system_mail_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_log.updater IS '更新者'; +COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_log.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_log IS '邮件日志表'; + +DROP SEQUENCE IF EXISTS system_mail_log_seq; +CREATE SEQUENCE system_mail_log_seq + START 1; + +-- ---------------------------- +-- Table structure for system_mail_template +-- ---------------------------- +DROP TABLE IF EXISTS system_mail_template; +CREATE TABLE system_mail_template +( + id int8 NOT NULL, + name varchar(63) NOT NULL, + code varchar(63) NOT NULL, + account_id int8 NOT NULL, + nickname varchar(255) NULL DEFAULT NULL, + title varchar(255) NOT NULL, + content varchar(10240) NOT NULL, + params varchar(255) NOT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_mail_template + ADD CONSTRAINT pk_system_mail_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_mail_template.id IS '编号'; +COMMENT ON COLUMN system_mail_template.name IS '模板名称'; +COMMENT ON COLUMN system_mail_template.code IS '模板编码'; +COMMENT ON COLUMN system_mail_template.account_id IS '发送的邮箱账号编号'; +COMMENT ON COLUMN system_mail_template.nickname IS '发送人名称'; +COMMENT ON COLUMN system_mail_template.title IS '模板标题'; +COMMENT ON COLUMN system_mail_template.content IS '模板内容'; +COMMENT ON COLUMN system_mail_template.params IS '参数数组'; +COMMENT ON COLUMN system_mail_template.status IS '开启状态'; +COMMENT ON COLUMN system_mail_template.remark IS '备注'; +COMMENT ON COLUMN system_mail_template.creator IS '创建者'; +COMMENT ON COLUMN system_mail_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_mail_template.updater IS '更新者'; +COMMENT ON COLUMN system_mail_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_mail_template.deleted IS '是否删除'; +COMMENT ON TABLE system_mail_template IS '邮件模版表'; + +-- ---------------------------- +-- Records of system_mail_template +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '

您的验证码是{code},名字是{name}

', '["code","name"]', 0, '3', '1', '2021-10-11 08:10:00', '1', '2023-12-02 19:51:14', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2023-01-27 10:32:16', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2023-01-27 16:34:49', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_mail_template_seq; +CREATE SEQUENCE system_mail_template_seq + START 16; + +-- ---------------------------- +-- Table structure for system_menu +-- ---------------------------- +DROP TABLE IF EXISTS system_menu; +CREATE TABLE system_menu +( + id int8 NOT NULL, + name varchar(50) NOT NULL, + permission varchar(100) NULL DEFAULT '', + type int2 NOT NULL, + sort int4 NOT NULL DEFAULT 0, + parent_id int8 NOT NULL DEFAULT 0, + path varchar(200) NULL DEFAULT '', + icon varchar(100) NULL DEFAULT '#', + component varchar(255) NULL DEFAULT NULL, + component_name varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL DEFAULT 0, + visible bool NOT NULL DEFAULT '1', + keep_alive bool NOT NULL DEFAULT '1', + always_show bool NOT NULL DEFAULT '1', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_menu + ADD CONSTRAINT pk_system_menu PRIMARY KEY (id); + +COMMENT ON COLUMN system_menu.id IS '菜单ID'; +COMMENT ON COLUMN system_menu.name IS '菜单名称'; +COMMENT ON COLUMN system_menu.permission IS '权限标识'; +COMMENT ON COLUMN system_menu.type IS '菜单类型'; +COMMENT ON COLUMN system_menu.sort IS '显示顺序'; +COMMENT ON COLUMN system_menu.parent_id IS '父菜单ID'; +COMMENT ON COLUMN system_menu.path IS '路由地址'; +COMMENT ON COLUMN system_menu.icon IS '菜单图标'; +COMMENT ON COLUMN system_menu.component IS '组件路径'; +COMMENT ON COLUMN system_menu.component_name IS '组件名'; +COMMENT ON COLUMN system_menu.status IS '菜单状态'; +COMMENT ON COLUMN system_menu.visible IS '是否可见'; +COMMENT ON COLUMN system_menu.keep_alive IS '是否缓存'; +COMMENT ON COLUMN system_menu.always_show IS '是否总是显示'; +COMMENT ON COLUMN system_menu.creator IS '创建者'; +COMMENT ON COLUMN system_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_menu.updater IS '更新者'; +COMMENT ON COLUMN system_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_menu.deleted IS '是否删除'; +COMMENT ON TABLE system_menu IS '菜单权限表'; + +-- ---------------------------- +-- Records of system_menu +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1, '系统管理', '', 1, 10, 0, '/system', 'ep:tools', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:04:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2, '基础设施', '', 1, 20, 0, '/infra', 'ep:monitor', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-03-01 08:28:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5, 'OA 示例', '', 1, 40, 1185, 'oa', 'fa:road', NULL, NULL, 0, '1', '1', '1', 'admin', '2021-09-20 16:26:19', '1', '2024-02-29 12:38:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (100, '用户管理', 'system:user:list', 2, 1, 1, 'user', 'ep:avatar', 'system/user/index', 'SystemUser', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:02:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (101, '角色管理', '', 2, 2, 1, 'role', 'ep:user', 'system/role/index', 'SystemRole', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (102, '菜单管理', '', 2, 3, 1, 'menu', 'ep:menu', 'system/menu/index', 'SystemMenu', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:03:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (103, '部门管理', '', 2, 4, 1, 'dept', 'fa:address-card', 'system/dept/index', 'SystemDept', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (104, '岗位管理', '', 2, 5, 1, 'post', 'fa:address-book-o', 'system/post/index', 'SystemPost', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:06:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (105, '字典管理', '', 2, 6, 1, 'dict', 'ep:collection', 'system/dict/index', 'SystemDictType', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:07:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (106, '配置管理', '', 2, 8, 2, 'config', 'fa:connectdevelop', 'infra/config/index', 'InfraConfig', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:02:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (107, '通知公告', '', 2, 4, 2739, 'notice', 'ep:takeaway-box', 'system/notice/index', 'SystemNotice', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-22 23:56:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (108, '审计日志', '', 1, 9, 1, 'log', 'ep:document-copy', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:08:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (109, '令牌管理', '', 2, 2, 1261, 'token', 'fa:key', 'system/oauth2/token/index', 'SystemTokenClient', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:13:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (110, '定时任务', '', 2, 7, 2, 'job', 'fa-solid:tasks', 'infra/job/index', 'InfraJob', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:57:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (111, 'MySQL 监控', '', 2, 1, 2740, 'druid', 'fa-solid:box', 'infra/druid/index', 'InfraDruid', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:05:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (112, 'Java 监控', '', 2, 3, 2740, 'admin-server', 'ep:coffee-cup', 'infra/server/index', 'InfraAdminServer', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:06:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (113, 'Redis 监控', '', 2, 2, 2740, 'redis', 'fa:reddit-square', 'infra/redis/index', 'InfraRedis', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:06:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (114, '表单构建', 'infra:build:list', 2, 2, 2, 'build', 'fa:wpforms', 'infra/build/index', 'InfraBuild', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:51:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (115, '代码生成', 'infra:codegen:query', 2, 1, 2, 'codegen', 'ep:document-copy', 'infra/codegen/index', 'InfraCodegen', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 08:51:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (116, 'API 接口', 'infra:swagger:list', 2, 3, 2, 'swagger', 'fa:fighter-jet', 'infra/swagger/index', 'InfraSwagger', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-04-23 00:01:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (500, '操作日志', '', 2, 1, 108, 'operate-log', 'ep:position', 'system/operatelog/index', 'SystemOperateLog', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:09:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (501, '登录日志', '', 2, 2, 108, 'login-log', 'ep:promotion', 'system/loginlog/index', 'SystemLoginLog', 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2024-02-29 01:10:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1001, '用户查询', 'system:user:query', 3, 1, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1002, '用户新增', 'system:user:create', 3, 2, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1003, '用户修改', 'system:user:update', 3, 3, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1004, '用户删除', 'system:user:delete', 3, 4, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1005, '用户导出', 'system:user:export', 3, 5, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1006, '用户导入', 'system:user:import', 3, 6, 100, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1007, '重置密码', 'system:user:update-password', 3, 7, 100, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1008, '角色查询', 'system:role:query', 3, 1, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1009, '角色新增', 'system:role:create', 3, 2, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1010, '角色修改', 'system:role:update', 3, 3, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1011, '角色删除', 'system:role:delete', 3, 4, 101, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1012, '角色导出', 'system:role:export', 3, 5, 101, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1013, '菜单查询', 'system:menu:query', 3, 1, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1014, '菜单新增', 'system:menu:create', 3, 2, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1015, '菜单修改', 'system:menu:update', 3, 3, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1016, '菜单删除', 'system:menu:delete', 3, 4, 102, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1017, '部门查询', 'system:dept:query', 3, 1, 103, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1018, '部门新增', 'system:dept:create', 3, 2, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1019, '部门修改', 'system:dept:update', 3, 3, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1020, '部门删除', 'system:dept:delete', 3, 4, 103, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1021, '岗位查询', 'system:post:query', 3, 1, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1022, '岗位新增', 'system:post:create', 3, 2, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1023, '岗位修改', 'system:post:update', 3, 3, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1024, '岗位删除', 'system:post:delete', 3, 4, 104, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1025, '岗位导出', 'system:post:export', 3, 5, 104, '', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1026, '字典查询', 'system:dict:query', 3, 1, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1027, '字典新增', 'system:dict:create', 3, 2, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1028, '字典修改', 'system:dict:update', 3, 3, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1029, '字典删除', 'system:dict:delete', 3, 4, 105, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1030, '字典导出', 'system:dict:export', 3, 5, 105, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1031, '配置查询', 'infra:config:query', 3, 1, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1032, '配置新增', 'infra:config:create', 3, 2, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1033, '配置修改', 'infra:config:update', 3, 3, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1034, '配置删除', 'infra:config:delete', 3, 4, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1035, '配置导出', 'infra:config:export', 3, 5, 106, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1036, '公告查询', 'system:notice:query', 3, 1, 107, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1037, '公告新增', 'system:notice:create', 3, 2, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1038, '公告修改', 'system:notice:update', 3, 3, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1039, '公告删除', 'system:notice:delete', 3, 4, 107, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1040, '操作查询', 'system:operate-log:query', 3, 1, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1042, '日志导出', 'system:operate-log:export', 3, 2, 500, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1043, '登录查询', 'system:login-log:query', 3, 1, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1045, '日志导出', 'system:login-log:export', 3, 3, 501, '#', '#', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1046, '令牌列表', 'system:oauth2-token:page', 3, 1, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-05-09 23:54:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1048, '令牌删除', 'system:oauth2-token:delete', 3, 2, 109, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-05-09 23:54:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1050, '任务新增', 'infra:job:create', 3, 2, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1051, '任务修改', 'infra:job:update', 3, 3, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1052, '任务删除', 'infra:job:delete', 3, 4, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1053, '状态修改', 'infra:job:update', 3, 5, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1054, '任务导出', 'infra:job:export', 3, 7, 110, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1056, '生成修改', 'infra:codegen:update', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1057, '生成删除', 'infra:codegen:delete', 3, 3, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1058, '导入代码', 'infra:codegen:create', 3, 2, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1059, '预览代码', 'infra:codegen:preview', 3, 4, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1060, '生成代码', 'infra:codegen:download', 3, 5, 115, '', '', '', NULL, 0, '1', '1', '1', 'admin', '2021-01-05 17:03:48', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1063, '设置角色菜单权限', 'system:permission:assign-role-menu', 3, 6, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-06 17:53:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1064, '设置角色数据权限', 'system:permission:assign-role-data-scope', 3, 7, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-06 17:56:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1065, '设置用户角色', 'system:permission:assign-user-role', 3, 8, 101, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-07 10:23:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1066, '获得 Redis 监控信息', 'infra:redis:get-monitor-info', 3, 1, 113, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-26 01:02:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1067, '获得 Redis Key 列表', 'infra:redis:get-key-list', 3, 2, 113, '', '', '', NULL, 0, '1', '1', '1', '', '2021-01-26 01:02:52', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1070, '代码生成案例', '', 1, 1, 2, 'demo', 'ep:aim', 'infra/testDemo/index', NULL, 0, '1', '1', '1', '', '2021-02-06 12:42:49', '1', '2023-11-15 23:45:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1075, '任务触发', 'infra:job:trigger', 3, 8, 110, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-07 13:03:10', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1077, '链路追踪', '', 2, 4, 2740, 'skywalking', 'fa:eye', 'infra/skywalking/index', 'InfraSkyWalking', 0, '1', '1', '1', '', '2021-02-08 20:41:31', '1', '2024-04-23 00:07:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1078, '访问日志', '', 2, 1, 1083, 'api-access-log', 'ep:place', 'infra/apiAccessLog/index', 'InfraApiAccessLog', 0, '1', '1', '1', '', '2021-02-26 01:32:59', '1', '2024-02-29 08:54:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1082, '日志导出', 'infra:api-access-log:export', 3, 2, 1078, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 01:32:59', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1083, 'API 日志', '', 2, 4, 2, 'log', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '', '2021-02-26 02:18:24', '1', '2024-04-22 23:58:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1084, '错误日志', 'infra:api-error-log:query', 2, 2, 1083, 'api-error-log', 'ep:warning-filled', 'infra/apiErrorLog/index', 'InfraApiErrorLog', 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2024-02-29 08:55:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1085, '日志处理', 'infra:api-error-log:update-status', 3, 2, 1084, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1086, '日志导出', 'infra:api-error-log:export', 3, 3, 1084, '', '', '', NULL, 0, '1', '1', '1', '', '2021-02-26 07:53:20', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1087, '任务查询', 'infra:job:query', 3, 1, 110, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:26:19', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1088, '日志查询', 'infra:api-access-log:query', 3, 1, 1078, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:28:04', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1089, '日志查询', 'infra:api-error-log:query', 3, 1, 1084, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-03-10 01:29:09', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1090, '文件列表', '', 2, 5, 1243, 'file', 'ep:upload-filled', 'infra/file/index', 'InfraFile', 0, '1', '1', '1', '', '2021-03-12 20:16:20', '1', '2024-02-29 08:53:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1091, '文件查询', 'infra:file:query', 3, 1, 1090, '', '', '', NULL, 0, '1', '1', '1', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1092, '文件删除', 'infra:file:delete', 3, 4, 1090, '', '', '', NULL, 0, '1', '1', '1', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1093, '短信管理', '', 1, 1, 2739, 'sms', 'ep:message', NULL, NULL, 0, '1', '1', '1', '1', '2021-04-05 01:10:16', '1', '2024-04-22 23:56:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1094, '短信渠道', '', 2, 0, 1093, 'sms-channel', 'fa:stack-exchange', 'system/sms/channel/index', 'SystemSmsChannel', 0, '1', '1', '1', '', '2021-04-01 11:07:15', '1', '2024-02-29 01:15:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1095, '短信渠道查询', 'system:sms-channel:query', 3, 1, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1096, '短信渠道创建', 'system:sms-channel:create', 3, 2, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1097, '短信渠道更新', 'system:sms-channel:update', 3, 3, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1098, '短信渠道删除', 'system:sms-channel:delete', 3, 4, 1094, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1100, '短信模板', '', 2, 1, 1093, 'sms-template', 'ep:connection', 'system/sms/template/index', 'SystemSmsTemplate', 0, '1', '1', '1', '', '2021-04-01 17:35:17', '1', '2024-02-29 01:16:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1101, '短信模板查询', 'system:sms-template:query', 3, 1, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1102, '短信模板创建', 'system:sms-template:create', 3, 2, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1103, '短信模板更新', 'system:sms-template:update', 3, 3, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1104, '短信模板删除', 'system:sms-template:delete', 3, 4, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1105, '短信模板导出', 'system:sms-template:export', 3, 5, 1100, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1106, '发送测试短信', 'system:sms-template:send-sms', 3, 6, 1100, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-04-11 00:26:40', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1107, '短信日志', '', 2, 2, 1093, 'sms-log', 'fa:edit', 'system/sms/log/index', 'SystemSmsLog', 0, '1', '1', '1', '', '2021-04-11 08:37:05', '1', '2024-02-29 08:49:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1108, '短信日志查询', 'system:sms-log:query', 3, 1, 1107, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1109, '短信日志导出', 'system:sms-log:export', 3, 5, 1107, '', '', '', NULL, 0, '1', '1', '1', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1117, '支付管理', '', 1, 30, 0, '/pay', 'ep:money', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-25 16:43:41', '1', '2024-02-29 08:58:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1118, '请假查询', '', 2, 0, 5, 'leave', 'fa:leanpub', 'bpm/oa/leave/index', 'BpmOALeave', 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2024-02-29 12:38:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1119, '请假申请查询', 'bpm:oa-leave:query', 3, 1, 1118, '', '', '', NULL, 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1120, '请假申请创建', 'bpm:oa-leave:create', 3, 2, 1118, '', '', '', NULL, 0, '1', '1', '1', '', '2021-09-20 08:51:03', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1126, '应用信息', '', 2, 1, 1117, 'app', 'fa:apple', 'pay/app/index', 'PayApp', 0, '1', '1', '1', '', '2021-11-10 01:13:30', '1', '2024-02-29 08:59:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1127, '支付应用信息查询', 'pay:app:query', 3, 1, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1128, '支付应用信息创建', 'pay:app:create', 3, 2, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1129, '支付应用信息更新', 'pay:app:update', 3, 3, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1130, '支付应用信息删除', 'pay:app:delete', 3, 4, 1126, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:31', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1132, '秘钥解析', 'pay:channel:parsing', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-11-08 15:15:47', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1133, '支付商户信息查询', 'pay:merchant:query', 3, 1, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1134, '支付商户信息创建', 'pay:merchant:create', 3, 2, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1135, '支付商户信息更新', 'pay:merchant:update', 3, 3, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1136, '支付商户信息删除', 'pay:merchant:delete', 3, 4, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1137, '支付商户信息导出', 'pay:merchant:export', 3, 5, 1132, '', '', '', NULL, 0, '1', '1', '1', '', '2021-11-10 01:13:41', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1138, '租户列表', '', 2, 0, 1224, 'list', 'ep:house', 'system/tenant/index', 'SystemTenant', 0, '1', '1', '1', '', '2021-12-14 12:31:43', '1', '2024-02-29 01:01:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1139, '租户查询', 'system:tenant:query', 3, 1, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1140, '租户创建', 'system:tenant:create', 3, 2, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1141, '租户更新', 'system:tenant:update', 3, 3, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1142, '租户删除', 'system:tenant:delete', 3, 4, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1143, '租户导出', 'system:tenant:export', 3, 5, 1138, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-14 12:31:44', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1150, '秘钥解析', '', 3, 6, 1129, '', '', '', NULL, 0, '1', '1', '1', '1', '2021-11-08 15:15:47', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1161, '退款订单', '', 2, 3, 1117, 'refund', 'fa:registered', 'pay/refund/index', 'PayRefund', 0, '1', '1', '1', '', '2021-12-25 08:29:07', '1', '2024-02-29 08:59:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1162, '退款订单查询', 'pay:refund:query', 3, 1, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1163, '退款订单创建', 'pay:refund:create', 3, 2, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1164, '退款订单更新', 'pay:refund:update', 3, 3, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1165, '退款订单删除', 'pay:refund:delete', 3, 4, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1166, '退款订单导出', 'pay:refund:export', 3, 5, 1161, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:29:07', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1173, '支付订单', '', 2, 2, 1117, 'order', 'fa:cc-paypal', 'pay/order/index', 'PayOrder', 0, '1', '1', '1', '', '2021-12-25 08:49:43', '1', '2024-02-29 08:59:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1174, '支付订单查询', 'pay:order:query', 3, 1, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1175, '支付订单创建', 'pay:order:create', 3, 2, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1176, '支付订单更新', 'pay:order:update', 3, 3, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1177, '支付订单删除', 'pay:order:delete', 3, 4, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1178, '支付订单导出', 'pay:order:export', 3, 5, 1173, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-25 08:49:43', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1185, '工作流程', '', 1, 50, 0, '/bpm', 'fa:medium', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-30 20:26:36', '1', '2024-02-29 12:43:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1186, '流程管理', '', 1, 10, 1185, 'manager', 'fa:dedent', NULL, NULL, 0, '1', '1', '1', '1', '2021-12-30 20:28:30', '1', '2024-02-29 12:36:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1187, '流程表单', '', 2, 2, 1186, 'form', 'fa:hdd-o', 'bpm/form/index', 'BpmForm', 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2024-03-19 12:25:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1188, '表单查询', 'bpm:form:query', 3, 1, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1189, '表单创建', 'bpm:form:create', 3, 2, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1190, '表单更新', 'bpm:form:update', 3, 3, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1191, '表单删除', 'bpm:form:delete', 3, 4, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1192, '表单导出', 'bpm:form:export', 3, 5, 1187, '', '', '', NULL, 0, '1', '1', '1', '', '2021-12-30 12:38:22', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1193, '流程模型', '', 2, 1, 1186, 'model', 'fa-solid:project-diagram', 'bpm/model/index', 'BpmModel', 0, '1', '1', '1', '1', '2021-12-31 23:24:58', '1', '2024-03-19 12:25:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1194, '模型查询', 'bpm:model:query', 3, 1, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:10', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1195, '模型创建', 'bpm:model:create', 3, 2, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1196, '模型导入', 'bpm:model:import', 3, 3, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:01:35', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1197, '模型更新', 'bpm:model:update', 3, 4, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:02:28', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1198, '模型删除', 'bpm:model:delete', 3, 5, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:02:43', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1199, '模型发布', 'bpm:model:deploy', 3, 6, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-03 19:03:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1200, '审批中心', '', 2, 20, 1185, 'task', 'fa:tasks', NULL, NULL, 0, '1', '1', '1', '1', '2022-01-07 23:51:48', '1', '2024-03-21 00:33:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1201, '我的流程', '', 2, 1, 1200, 'my', 'fa-solid:book', 'bpm/processInstance/index', 'BpmProcessInstanceMy', 0, '1', '1', '1', '', '2022-01-07 15:53:44', '1', '2024-03-21 23:52:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1202, '流程实例的查询', 'bpm:process-instance:query', 3, 1, 1201, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-07 15:53:44', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1207, '待办任务', '', 2, 10, 1200, 'todo', 'fa:slack', 'bpm/task/todo/index', 'BpmTodoTask', 0, '1', '1', '1', '1', '2022-01-08 10:33:37', '1', '2024-02-29 12:37:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1208, '已办任务', '', 2, 20, 1200, 'done', 'fa:delicious', 'bpm/task/done/index', 'BpmDoneTask', 0, '1', '1', '1', '1', '2022-01-08 10:34:13', '1', '2024-02-29 12:37:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1209, '用户分组', '', 2, 4, 1186, 'user-group', 'fa:user-secret', 'bpm/group/index', 'BpmUserGroup', 0, '1', '1', '1', '', '2022-01-14 02:14:20', '1', '2024-03-21 23:55:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1210, '用户组查询', 'bpm:user-group:query', 3, 1, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1211, '用户组创建', 'bpm:user-group:create', 3, 2, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1212, '用户组更新', 'bpm:user-group:update', 3, 3, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1213, '用户组删除', 'bpm:user-group:delete', 3, 4, 1209, '', '', '', NULL, 0, '1', '1', '1', '', '2022-01-14 02:14:20', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1215, '流程定义查询', 'bpm:process-definition:query', 3, 10, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:21:43', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1216, '流程任务分配规则查询', 'bpm:task-assign-rule:query', 3, 20, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:26:53', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1217, '流程任务分配规则创建', 'bpm:task-assign-rule:create', 3, 21, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:28:15', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1218, '流程任务分配规则更新', 'bpm:task-assign-rule:update', 3, 22, 1193, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:28:41', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1219, '流程实例的创建', 'bpm:process-instance:create', 3, 2, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:36:15', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1220, '流程实例的取消', 'bpm:process-instance:cancel', 3, 3, 1201, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:36:33', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1221, '流程任务的查询', 'bpm:task:query', 3, 1, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:38:52', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1222, '流程任务的更新', 'bpm:task:update', 3, 2, 1207, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-01-23 00:39:24', '1', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1224, '租户管理', '', 2, 0, 1, 'tenant', 'fa-solid:house-user', NULL, NULL, 0, '1', '1', '1', '1', '2022-02-20 01:41:13', '1', '2024-02-29 00:59:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1225, '租户套餐', '', 2, 0, 1224, 'package', 'fa:bars', 'system/tenantPackage/index', 'SystemTenantPackage', 0, '1', '1', '1', '', '2022-02-19 17:44:06', '1', '2024-02-29 01:01:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1226, '租户套餐查询', 'system:tenant-package:query', 3, 1, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1227, '租户套餐创建', 'system:tenant-package:create', 3, 2, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1228, '租户套餐更新', 'system:tenant-package:update', 3, 3, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1229, '租户套餐删除', 'system:tenant-package:delete', 3, 4, 1225, '', '', '', NULL, 0, '1', '1', '1', '', '2022-02-19 17:44:06', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1237, '文件配置', '', 2, 0, 1243, 'file-config', 'fa-solid:file-signature', 'infra/fileConfig/index', 'InfraFileConfig', 0, '1', '1', '1', '', '2022-03-15 14:35:28', '1', '2024-02-29 08:52:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1238, '文件配置查询', 'infra:file-config:query', 3, 1, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1239, '文件配置创建', 'infra:file-config:create', 3, 2, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1240, '文件配置更新', 'infra:file-config:update', 3, 3, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1241, '文件配置删除', 'infra:file-config:delete', 3, 4, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1242, '文件配置导出', 'infra:file-config:export', 3, 5, 1237, '', '', '', NULL, 0, '1', '1', '1', '', '2022-03-15 14:35:28', '', '2022-04-20 17:03:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1243, '文件管理', '', 2, 6, 2, 'file', 'ep:files', NULL, '', 0, '1', '1', '1', '1', '2022-03-16 23:47:40', '1', '2024-04-23 00:02:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1254, '作者动态', '', 1, 0, 0, 'https://www.iocoder.cn', 'ep:avatar', NULL, NULL, 0, '1', '1', '1', '1', '2022-04-23 01:03:15', '1', '2023-12-08 23:40:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1255, '数据源配置', '', 2, 1, 2, 'data-source-config', 'ep:data-analysis', 'infra/dataSourceConfig/index', 'InfraDataSourceConfig', 0, '1', '1', '1', '', '2022-04-27 14:37:32', '1', '2024-02-29 08:51:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1256, '数据源配置查询', 'infra:data-source-config:query', 3, 1, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1257, '数据源配置创建', 'infra:data-source-config:create', 3, 2, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1258, '数据源配置更新', 'infra:data-source-config:update', 3, 3, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1259, '数据源配置删除', 'infra:data-source-config:delete', 3, 4, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1260, '数据源配置导出', 'infra:data-source-config:export', 3, 5, 1255, '', '', '', NULL, 0, '1', '1', '1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1261, 'OAuth 2.0', '', 2, 10, 1, 'oauth2', 'fa:dashcube', NULL, NULL, 0, '1', '1', '1', '1', '2022-05-09 23:38:17', '1', '2024-02-29 01:12:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1263, '应用管理', '', 2, 0, 1261, 'oauth2/application', 'fa:hdd-o', 'system/oauth2/client/index', 'SystemOAuth2Client', 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2024-02-29 01:13:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1264, '客户端查询', 'system:oauth2-client:query', 3, 1, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1265, '客户端创建', 'system:oauth2-client:create', 3, 2, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1266, '客户端更新', 'system:oauth2-client:update', 3, 3, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1267, '客户端删除', 'system:oauth2-client:delete', 3, 4, 1263, '', '', '', NULL, 0, '1', '1', '1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1281, '报表管理', '', 2, 40, 0, '/report', 'ep:pie-chart', NULL, NULL, 0, '1', '1', '1', '1', '2022-07-10 20:22:15', '1', '2024-02-29 12:33:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (1282, '报表设计器', '', 2, 1, 1281, 'jimu-report', 'ep:trend-charts', 'report/jmreport/index', 'GoView', 0, '1', '1', '1', '1', '2022-07-10 20:26:36', '1', '2024-02-29 12:33:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2000, '商品中心', '', 1, 60, 2362, 'product', 'fa:product-hunt', NULL, NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '1', '2023-09-30 11:52:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'ep:cellphone', 'mall/product/category/index', 'ProductCategory', 0, '1', '1', '1', '', '2022-07-29 15:53:53', '1', '2023-08-21 10:27:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2008, '商品品牌', '', 2, 3, 2000, 'brand', 'ep:chicken', 'mall/product/brand/index', 'ProductBrand', 0, '1', '1', '1', '', '2022-07-30 13:52:44', '1', '2023-08-21 10:27:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, '1', '1', '1', '', '2022-07-30 14:22:58', '1', '2023-08-21 10:27:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2019, '商品属性', '', 2, 4, 2000, 'property', 'ep:cold-drink', 'mall/product/property/index', 'ProductProperty', 0, '1', '1', '1', '', '2022-08-01 14:55:35', '1', '2023-08-26 11:01:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', NULL, 0, '1', '1', '1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2025, 'Banner', '', 2, 100, 2387, 'banner', 'fa:bandcamp', 'mall/promotion/banner/index', NULL, 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2026, 'Banner查询', 'promotion:banner:query', 3, 1, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2027, 'Banner创建', 'promotion:banner:create', 3, 2, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2028, 'Banner更新', 'promotion:banner:update', 3, 3, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2029, 'Banner删除', 'promotion:banner:delete', 3, 4, 2025, '', '', '', '', 0, '1', '1', '1', '', '2022-08-01 14:56:14', '1', '2023-10-24 20:20:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2030, '营销中心', '', 1, 70, 2362, 'promotion', 'ep:present', NULL, NULL, 0, '1', '1', '1', '1', '2022-10-31 21:25:09', '1', '2023-09-30 11:54:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2032, '优惠劵列表', '', 2, 1, 2365, 'template', 'ep:discount', 'mall/promotion/coupon/template/index', 'PromotionCouponTemplate', 0, '1', '1', '1', '', '2022-10-31 22:27:14', '1', '2023-10-03 12:40:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2033, '优惠劵模板查询', 'promotion:coupon-template:query', 3, 1, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2034, '优惠劵模板创建', 'promotion:coupon-template:create', 3, 2, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2035, '优惠劵模板更新', 'promotion:coupon-template:update', 3, 3, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2036, '优惠劵模板删除', 'promotion:coupon-template:delete', 3, 4, 2032, '', '', '', NULL, 0, '1', '1', '1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2038, '领取记录', '', 2, 2, 2365, 'list', 'ep:collection-tag', 'mall/promotion/coupon/index', 'PromotionCoupon', 0, '1', '1', '1', '', '2022-11-03 23:21:31', '1', '2023-10-03 12:55:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2039, '优惠劵查询', 'promotion:coupon:query', 3, 1, 2038, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2040, '优惠劵删除', 'promotion:coupon:delete', 3, 4, 2038, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2041, '满减送', '', 2, 10, 2390, 'reward-activity', 'ep:goblet-square-full', 'mall/promotion/rewardActivity/index', 'PromotionRewardActivity', 0, '1', '1', '1', '', '2022-11-04 23:47:49', '1', '2023-10-21 19:24:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2042, '满减送活动查询', 'promotion:reward-activity:query', 3, 1, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2043, '满减送活动创建', 'promotion:reward-activity:create', 3, 2, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2044, '满减送活动更新', 'promotion:reward-activity:update', 3, 3, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2045, '满减送活动删除', 'promotion:reward-activity:delete', 3, 4, 2041, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2046, '满减送活动关闭', 'promotion:reward-activity:close', 3, 5, 2041, '', '', '', NULL, 0, '1', '1', '1', '1', '2022-11-05 10:42:53', '1', '2022-11-05 10:42:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2047, '限时折扣', '', 2, 7, 2390, 'discount-activity', 'ep:timer', 'mall/promotion/discountActivity/index', 'PromotionDiscountActivity', 0, '1', '1', '1', '', '2022-11-05 17:12:15', '1', '2023-10-21 19:24:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2048, '限时折扣活动查询', 'promotion:discount-activity:query', 3, 1, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2049, '限时折扣活动创建', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2050, '限时折扣活动更新', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2051, '限时折扣活动删除', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2052, '限时折扣活动关闭', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2059, '秒杀商品', '', 2, 2, 2209, 'activity', 'ep:basketball', 'mall/promotion/seckill/activity/index', 'PromotionSeckillActivity', 0, '1', '1', '1', '', '2022-11-06 22:24:49', '1', '2023-06-24 18:57:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2060, '秒杀活动查询', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2061, '秒杀活动创建', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2062, '秒杀活动更新', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2063, '秒杀活动删除', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2066, '秒杀时段', '', 2, 1, 2209, 'config', 'ep:baseball', 'mall/promotion/seckill/config/index', 'PromotionSeckillConfig', 0, '1', '1', '1', '', '2022-11-15 19:46:50', '1', '2023-06-24 18:57:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2067, '秒杀时段查询', 'promotion:seckill-config:query', 3, 1, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2068, '秒杀时段创建', 'promotion:seckill-config:create', 3, 2, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:48:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2069, '秒杀时段更新', 'promotion:seckill-config:update', 3, 3, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2070, '秒杀时段删除', 'promotion:seckill-config:delete', 3, 4, 2066, '', '', '', '', 0, '1', '1', '1', '', '2022-11-15 19:46:51', '1', '2023-06-24 17:50:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2072, '订单中心', '', 1, 65, 2362, 'trade', 'ep:eleme', NULL, NULL, 0, '1', '1', '1', '1', '2022-11-19 18:57:19', '1', '2023-09-30 11:54:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2073, '售后退款', '', 2, 2, 2072, 'after-sale', 'ep:refrigerator', 'mall/trade/afterSale/index', 'TradeAfterSale', 0, '1', '1', '1', '', '2022-11-19 20:15:32', '1', '2023-10-01 21:42:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2074, '售后查询', 'trade:after-sale:query', 3, 1, 2073, '', '', '', NULL, 0, '1', '1', '1', '', '2022-11-19 20:15:33', '1', '2022-12-10 21:04:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2075, '秒杀活动关闭', 'promotion:seckill-activity:close', 3, 5, 2059, '', '', '', '', 0, '1', '1', '1', '1', '2022-11-28 20:20:15', '1', '2023-10-03 18:34:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2076, '订单列表', '', 2, 1, 2072, 'order', 'ep:list', 'mall/trade/order/index', 'TradeOrder', 0, '1', '1', '1', '1', '2022-12-10 21:05:44', '1', '2023-10-01 21:42:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2083, '地区管理', '', 2, 14, 1, 'area', 'fa:map-marker', 'system/area/index', 'SystemArea', 0, '1', '1', '1', '1', '2022-12-23 17:35:05', '1', '2024-02-29 08:50:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2084, '公众号管理', '', 1, 100, 0, '/mp', 'ep:compass', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-01 20:11:04', '1', '2024-02-29 12:39:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2085, '账号管理', '', 2, 1, 2084, 'account', 'fa:user', 'mp/account/index', 'MpAccount', 0, '1', '1', '1', '1', '2023-01-01 20:13:31', '1', '2024-02-29 12:42:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2086, '新增账号', 'mp:account:create', 3, 1, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-01 20:21:40', '1', '2023-01-07 17:32:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2087, '修改账号', 'mp:account:update', 3, 2, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:32:46', '1', '2023-01-07 17:32:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2088, '查询账号', 'mp:account:query', 3, 0, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:07', '1', '2023-01-07 17:33:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2089, '删除账号', 'mp:account:delete', 3, 3, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:21', '1', '2023-01-07 17:33:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2090, '生成二维码', 'mp:account:qr-code', 3, 4, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 17:33:58', '1', '2023-01-07 17:33:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2091, '清空 API 配额', 'mp:account:clear-quota', 3, 5, 2085, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-07 18:20:32', '1', '2023-01-07 18:20:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2092, '数据统计', 'mp:statistics:query', 2, 2, 2084, 'statistics', 'ep:trend-charts', 'mp/statistics/index', 'MpStatistics', 0, '1', '1', '1', '1', '2023-01-07 20:17:36', '1', '2024-02-29 12:42:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2093, '标签管理', '', 2, 3, 2084, 'tag', 'ep:collection-tag', 'mp/tag/index', 'MpTag', 0, '1', '1', '1', '1', '2023-01-08 11:37:32', '1', '2024-02-29 12:42:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2094, '查询标签', 'mp:tag:query', 3, 0, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:03', '1', '2023-01-08 11:59:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2095, '新增标签', 'mp:tag:create', 3, 1, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:23', '1', '2023-01-08 11:59:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2096, '修改标签', 'mp:tag:update', 3, 2, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 11:59:41', '1', '2023-01-08 11:59:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2097, '删除标签', 'mp:tag:delete', 3, 3, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 12:00:04', '1', '2023-01-08 12:00:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2098, '同步标签', 'mp:tag:sync', 3, 4, 2093, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 12:00:29', '1', '2023-01-08 12:00:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2099, '粉丝管理', '', 2, 4, 2084, 'user', 'fa:user-secret', 'mp/user/index', 'MpUser', 0, '1', '1', '1', '1', '2023-01-08 16:51:20', '1', '2024-02-29 12:42:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2100, '查询粉丝', 'mp:user:query', 3, 0, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:16:59', '1', '2023-01-08 17:17:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2101, '修改粉丝', 'mp:user:update', 3, 1, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:17:11', '1', '2023-01-08 17:17:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2102, '同步粉丝', 'mp:user:sync', 3, 2, 2099, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-08 17:17:40', '1', '2023-01-08 17:17:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2103, '消息管理', '', 2, 5, 2084, 'message', 'ep:message', 'mp/message/index', 'MpMessage', 0, '1', '1', '1', '1', '2023-01-08 18:44:19', '1', '2024-02-29 12:42:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2104, '图文发表记录', '', 2, 10, 2084, 'free-publish', 'ep:edit-pen', 'mp/freePublish/index', 'MpFreePublish', 0, '1', '1', '1', '1', '2023-01-13 00:30:50', '1', '2024-02-29 12:43:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2105, '查询发布列表', 'mp:free-publish:query', 3, 1, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:19:17', '1', '2023-01-13 07:19:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2106, '发布草稿', 'mp:free-publish:submit', 3, 2, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:19:46', '1', '2023-01-13 07:19:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2107, '删除发布记录', 'mp:free-publish:delete', 3, 3, 2104, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 07:20:01', '1', '2023-01-13 07:20:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2108, '图文草稿箱', '', 2, 9, 2084, 'draft', 'ep:edit', 'mp/draft/index', 'MpDraft', 0, '1', '1', '1', '1', '2023-01-13 07:40:21', '1', '2024-02-29 12:43:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2109, '新建草稿', 'mp:draft:create', 3, 1, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-13 23:15:30', '1', '2023-01-13 23:15:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2110, '修改草稿', 'mp:draft:update', 3, 2, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:08:47', '1', '2023-01-14 10:08:47', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2111, '查询草稿', 'mp:draft:query', 3, 0, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:09:01', '1', '2023-01-14 10:09:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2112, '删除草稿', 'mp:draft:delete', 3, 3, 2108, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 10:09:19', '1', '2023-01-14 10:09:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2113, '素材管理', '', 2, 8, 2084, 'material', 'ep:basketball', 'mp/material/index', 'MpMaterial', 0, '1', '1', '1', '1', '2023-01-14 14:12:07', '1', '2024-02-29 12:43:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2114, '上传临时素材', 'mp:material:upload-temporary', 3, 1, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:33:55', '1', '2023-01-14 15:33:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2115, '上传永久素材', 'mp:material:upload-permanent', 3, 2, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:34:14', '1', '2023-01-14 15:34:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2116, '删除素材', 'mp:material:delete', 3, 3, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:35:37', '1', '2023-01-14 15:35:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2117, '上传图文图片', 'mp:material:upload-news-image', 3, 4, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:36:31', '1', '2023-01-14 15:36:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2118, '查询素材', 'mp:material:query', 3, 5, 2113, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-14 15:39:22', '1', '2023-01-14 15:39:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2119, '菜单管理', '', 2, 6, 2084, 'menu', 'ep:menu', 'mp/menu/index', 'MpMenu', 0, '1', '1', '1', '1', '2023-01-14 17:43:54', '1', '2024-02-29 12:42:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2120, '自动回复', '', 2, 7, 2084, 'auto-reply', 'fa-solid:republican', 'mp/autoReply/index', 'MpAutoReply', 0, '1', '1', '1', '1', '2023-01-15 22:13:09', '1', '2024-02-29 12:43:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2121, '查询回复', 'mp:auto-reply:query', 3, 0, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:28:41', '1', '2023-01-16 22:28:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2122, '新增回复', 'mp:auto-reply:create', 3, 1, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:28:54', '1', '2023-01-16 22:28:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2123, '修改回复', 'mp:auto-reply:update', 3, 2, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:29:05', '1', '2023-01-16 22:29:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2124, '删除回复', 'mp:auto-reply:delete', 3, 3, 2120, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-16 22:29:34', '1', '2023-01-16 22:29:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2125, '查询菜单', 'mp:menu:query', 3, 0, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:05:41', '1', '2023-01-17 23:05:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2126, '保存菜单', 'mp:menu:save', 3, 1, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:06:01', '1', '2023-01-17 23:06:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2127, '删除菜单', 'mp:menu:delete', 3, 2, 2119, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:06:16', '1', '2023-01-17 23:06:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2128, '查询消息', 'mp:message:query', 3, 0, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:07:14', '1', '2023-01-17 23:07:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2129, '发送消息', 'mp:message:send', 3, 1, 2103, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-17 23:07:26', '1', '2023-01-17 23:07:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2130, '邮箱管理', '', 2, 2, 2739, 'mail', 'fa-solid:mail-bulk', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-25 17:27:44', '1', '2024-04-22 23:56:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2131, '邮箱账号', '', 2, 0, 2130, 'mail-account', 'fa:universal-access', 'system/mail/account/index', 'SystemMailAccount', 0, '1', '1', '1', '', '2023-01-25 09:33:48', '1', '2024-02-29 08:48:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2132, '账号查询', 'system:mail-account:query', 3, 1, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2133, '账号创建', 'system:mail-account:create', 3, 2, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2134, '账号更新', 'system:mail-account:update', 3, 3, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2135, '账号删除', 'system:mail-account:delete', 3, 4, 2131, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2136, '邮件模版', '', 2, 0, 2130, 'mail-template', 'fa:tag', 'system/mail/template/index', 'SystemMailTemplate', 0, '1', '1', '1', '', '2023-01-25 12:05:31', '1', '2024-02-29 08:48:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2137, '模版查询', 'system:mail-template:query', 3, 1, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2138, '模版创建', 'system:mail-template:create', 3, 2, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2139, '模版更新', 'system:mail-template:update', 3, 3, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2140, '模版删除', 'system:mail-template:delete', 3, 4, 2136, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2141, '邮件记录', '', 2, 0, 2130, 'mail-log', 'fa:edit', 'system/mail/log/index', 'SystemMailLog', 0, '1', '1', '1', '', '2023-01-26 02:16:50', '1', '2024-02-29 08:48:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2142, '日志查询', 'system:mail-log:query', 3, 1, 2141, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-26 02:16:50', '', '2023-01-26 02:16:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2143, '发送测试邮件', 'system:mail-template:send-mail', 3, 5, 2136, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-26 23:29:15', '1', '2023-01-26 23:29:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2144, '站内信管理', '', 1, 3, 2739, 'notify', 'ep:message-box', NULL, NULL, 0, '1', '1', '1', '1', '2023-01-28 10:25:18', '1', '2024-04-22 23:56:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2145, '模板管理', '', 2, 0, 2144, 'notify-template', 'fa:archive', 'system/notify/template/index', 'SystemNotifyTemplate', 0, '1', '1', '1', '', '2023-01-28 02:26:42', '1', '2024-02-29 08:49:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2146, '站内信模板查询', 'system:notify-template:query', 3, 1, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2147, '站内信模板创建', 'system:notify-template:create', 3, 2, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2148, '站内信模板更新', 'system:notify-template:update', 3, 3, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2149, '站内信模板删除', 'system:notify-template:delete', 3, 4, 2145, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2150, '发送测试站内信', 'system:notify-template:send-notify', 3, 5, 2145, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-01-28 10:54:43', '1', '2023-01-28 10:54:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2151, '消息记录', '', 2, 0, 2144, 'notify-message', 'fa:edit', 'system/notify/message/index', 'SystemNotifyMessage', 0, '1', '1', '1', '', '2023-01-28 04:28:22', '1', '2024-02-29 08:49:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2152, '站内信消息查询', 'system:notify-message:query', 3, 1, 2151, '', '', '', NULL, 0, '1', '1', '1', '', '2023-01-28 04:28:22', '', '2023-01-28 04:28:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2153, '大屏设计器', '', 2, 2, 1281, 'go-view', 'fa:area-chart', 'report/goview/index', 'JimuReport', 0, '1', '1', '1', '1', '2023-02-07 00:03:19', '1', '2024-02-29 12:34:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2154, '创建项目', 'report:go-view-project:create', 3, 1, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:25:14', '1', '2023-02-07 19:25:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2155, '更新项目', 'report:go-view-project:update', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', '2023-02-07 19:25:34', '1', '2024-04-24 20:01:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2156, '查询项目', 'report:go-view-project:query', 3, 0, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:25:53', '1', '2023-02-07 19:25:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2157, '使用 SQL 查询数据', 'report:go-view-data:get-by-sql', 3, 3, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:26:15', '1', '2023-02-07 19:26:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2158, '使用 HTTP 查询数据', 'report:go-view-data:get-by-http', 3, 4, 2153, '', '', '', NULL, 0, '1', '1', '1', '1', '2023-02-07 19:26:35', '1', '2023-02-07 19:26:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2159, 'Boot 开发文档', '', 1, 1, 0, 'https://doc.iocoder.cn/', 'ep:document', NULL, NULL, 0, '1', '1', '1', '1', '2023-02-10 22:46:28', '1', '2023-12-02 21:32:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2160, 'Cloud 开发文档', '', 1, 2, 0, 'https://cloud.iocoder.cn', 'ep:document-copy', NULL, NULL, 0, '1', '1', '1', '1', '2023-02-10 22:47:07', '1', '2023-12-02 21:32:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2161, '接入示例', '', 1, 99, 1117, 'demo', 'fa-solid:dragon', 'pay/demo/index', NULL, 0, '1', '1', '1', '', '2023-02-11 14:21:42', '1', '2024-01-18 23:50:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2162, '商品导出', 'product:spu:export', 3, 5, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2164, '配送管理', '', 1, 3, 2072, 'delivery', 'ep:shopping-cart', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:18:02', '1', '2023-09-28 10:58:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2165, '快递发货', '', 1, 0, 2164, 'express', 'ep:bicycle', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:22:06', '1', '2023-08-30 21:02:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2166, '门店自提', '', 1, 1, 2164, 'pick-up-store', 'ep:add-location', '', '', 0, '1', '1', '1', '1', '2023-05-18 09:23:14', '1', '2023-08-30 21:03:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2167, '快递公司', '', 2, 0, 2165, 'express', 'ep:compass', 'mall/trade/delivery/express/index', 'Express', 0, '1', '1', '1', '1', '2023-05-18 09:27:21', '1', '2023-08-30 21:02:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2168, '快递公司查询', 'trade:delivery:express:query', 3, 1, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2169, '快递公司创建', 'trade:delivery:express:create', 3, 2, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2170, '快递公司更新', 'trade:delivery:express:update', 3, 3, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2171, '快递公司删除', 'trade:delivery:express:delete', 3, 4, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2172, '快递公司导出', 'trade:delivery:express:export', 3, 5, 2167, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2173, '运费模版', 'trade:delivery:express-template:query', 2, 1, 2165, 'express-template', 'ep:coordinate', 'mall/trade/delivery/expressTemplate/index', 'ExpressTemplate', 0, '1', '1', '1', '1', '2023-05-20 06:48:10', '1', '2023-08-30 21:03:13', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2174, '快递运费模板查询', 'trade:delivery:express-template:query', 3, 1, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2175, '快递运费模板创建', 'trade:delivery:express-template:create', 3, 2, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2176, '快递运费模板更新', 'trade:delivery:express-template:update', 3, 3, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2177, '快递运费模板删除', 'trade:delivery:express-template:delete', 3, 4, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2178, '快递运费模板导出', 'trade:delivery:express-template:export', 3, 5, 2173, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2179, '门店管理', '', 2, 1, 2166, 'pick-up-store', 'ep:basketball', 'mall/trade/delivery/pickUpStore/index', 'PickUpStore', 0, '1', '1', '1', '1', '2023-05-25 10:50:00', '1', '2023-08-30 21:03:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2180, '自提门店查询', 'trade:delivery:pick-up-store:query', 3, 1, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2181, '自提门店创建', 'trade:delivery:pick-up-store:create', 3, 2, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2182, '自提门店更新', 'trade:delivery:pick-up-store:update', 3, 3, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2183, '自提门店删除', 'trade:delivery:pick-up-store:delete', 3, 4, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2184, '自提门店导出', 'trade:delivery:pick-up-store:export', 3, 5, 2179, '', '', '', NULL, 0, '1', '1', '1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2209, '秒杀活动', '', 2, 3, 2030, 'seckill', 'ep:place', '', '', 0, '1', '1', '1', '1', '2023-06-24 17:39:13', '1', '2023-06-24 18:55:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2262, '会员中心', '', 1, 55, 0, '/member', 'ep:bicycle', NULL, NULL, 0, '1', '1', '1', '1', '2023-06-10 00:42:03', '1', '2023-08-20 09:23:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2275, '会员配置', '', 2, 0, 2262, 'config', 'fa:archive', 'member/config/index', 'MemberConfig', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2023-10-01 23:41:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2276, '会员配置查询', 'member:config:query', 3, 1, 2275, '', '', '', '', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2024-04-24 19:48:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2277, '会员配置保存', 'member:config:save', 3, 2, 2275, '', '', '', '', 0, '1', '1', '1', '', '2023-06-10 02:07:44', '1', '2024-04-24 19:49:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2281, '签到配置', '', 2, 2, 2300, 'config', 'ep:calendar', 'member/signin/config/index', 'SignInConfig', 0, '1', '1', '1', '', '2023-06-10 03:26:12', '1', '2023-08-20 19:25:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2282, '积分签到规则查询', 'point:sign-in-config:query', 3, 1, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2283, '积分签到规则创建', 'point:sign-in-config:create', 3, 2, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2284, '积分签到规则更新', 'point:sign-in-config:update', 3, 3, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2285, '积分签到规则删除', 'point:sign-in-config:delete', 3, 4, 2281, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 03:26:12', '', '2023-06-10 03:26:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2287, '会员积分', '', 2, 10, 2262, 'record', 'fa:asterisk', 'member/point/record/index', 'PointRecord', 0, '1', '1', '1', '', '2023-06-10 04:18:50', '1', '2023-10-01 23:42:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2288, '用户积分记录查询', 'point:record:query', 3, 1, 2287, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:18:50', '', '2023-06-10 04:18:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2293, '签到记录', '', 2, 3, 2300, 'record', 'ep:chicken', 'member/signin/record/index', 'SignInRecord', 0, '1', '1', '1', '', '2023-06-10 04:48:22', '1', '2023-08-20 19:26:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2294, '用户签到积分查询', 'point:sign-in-record:query', 3, 1, 2293, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2297, '用户签到积分删除', 'point:sign-in-record:delete', 3, 4, 2293, '', '', '', NULL, 0, '1', '1', '1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2300, '会员签到', '', 1, 11, 2262, 'signin', 'ep:alarm-clock', '', '', 0, '1', '1', '1', '1', '2023-06-27 22:49:53', '1', '2023-08-20 09:23:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2301, '回调通知', '', 2, 5, 1117, 'notify', 'ep:mute-notification', 'pay/notify/index', 'PayNotify', 0, '1', '1', '1', '', '2023-07-20 04:41:32', '1', '2024-01-18 23:56:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2302, '支付通知查询', 'pay:notify:query', 3, 1, 2301, '', '', '', NULL, 0, '1', '1', '1', '', '2023-07-20 04:41:32', '', '2023-07-20 04:41:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2303, '拼团活动', '', 2, 3, 2030, 'combination', 'fa:group', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:19:54', '1', '2023-08-12 17:20:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2304, '拼团商品', '', 2, 1, 2303, 'acitivity', 'ep:apple', 'mall/promotion/combination/activity/index', 'PromotionCombinationActivity', 0, '1', '1', '1', '1', '2023-08-12 17:22:03', '1', '2023-08-12 17:22:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2305, '拼团活动查询', 'promotion:combination-activity:query', 3, 1, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:54:32', '1', '2023-11-24 11:57:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2306, '拼团活动创建', 'promotion:combination-activity:create', 3, 2, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:54:49', '1', '2023-08-12 17:54:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2307, '拼团活动更新', 'promotion:combination-activity:update', 3, 3, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:04', '1', '2023-08-12 17:55:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2308, '拼团活动删除', 'promotion:combination-activity:delete', 3, 4, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:23', '1', '2023-08-12 17:55:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2309, '拼团活动关闭', 'promotion:combination-activity:close', 3, 5, 2304, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-12 17:55:37', '1', '2023-10-06 10:51:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2310, '砍价活动', '', 2, 4, 2030, 'bargain', 'ep:box', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:27:25', '1', '2023-08-13 00:27:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2311, '砍价商品', '', 2, 1, 2310, 'activity', 'ep:burger', 'mall/promotion/bargain/activity/index', 'PromotionBargainActivity', 0, '1', '1', '1', '1', '2023-08-13 00:28:49', '1', '2023-10-05 01:16:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2312, '砍价活动查询', 'promotion:bargain-activity:query', 3, 1, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:30', '1', '2023-08-13 00:32:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2313, '砍价活动创建', 'promotion:bargain-activity:create', 3, 2, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:44', '1', '2023-08-13 00:32:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2314, '砍价活动更新', 'promotion:bargain-activity:update', 3, 3, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:32:55', '1', '2023-08-13 00:32:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2315, '砍价活动删除', 'promotion:bargain-activity:delete', 3, 4, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:34:50', '1', '2023-08-13 00:34:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2316, '砍价活动关闭', 'promotion:bargain-activity:close', 3, 5, 2311, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-13 00:35:02', '1', '2023-08-13 00:35:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2317, '会员管理', '', 2, 0, 2262, 'user', 'ep:avatar', 'member/user/index', 'MemberUser', 0, '1', '1', '1', '', '2023-08-19 04:12:15', '1', '2023-08-24 00:50:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2318, '会员用户查询', 'member:user:query', 3, 1, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-19 04:12:15', '', '2023-08-19 04:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2319, '会员用户更新', 'member:user:update', 3, 3, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-19 04:12:15', '', '2023-08-19 04:12:15', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2320, '会员标签', '', 2, 1, 2262, 'tag', 'ep:collection-tag', 'member/tag/index', 'MemberTag', 0, '1', '1', '1', '', '2023-08-20 01:03:08', '1', '2023-08-20 09:23:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2321, '会员标签查询', 'member:tag:query', 3, 1, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2322, '会员标签创建', 'member:tag:create', 3, 2, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2323, '会员标签更新', 'member:tag:update', 3, 3, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2324, '会员标签删除', 'member:tag:delete', 3, 4, 2320, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-20 01:03:08', '', '2023-08-20 01:03:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2325, '会员等级', '', 2, 2, 2262, 'level', 'fa:level-up', 'member/level/index', 'MemberLevel', 0, '1', '1', '1', '', '2023-08-22 12:41:01', '1', '2023-08-22 21:47:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2326, '会员等级查询', 'member:level:query', 3, 1, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2327, '会员等级创建', 'member:level:create', 3, 2, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2328, '会员等级更新', 'member:level:update', 3, 3, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2329, '会员等级删除', 'member:level:delete', 3, 4, 2325, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 12:41:02', '', '2023-08-22 12:41:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2330, '会员分组', '', 2, 3, 2262, 'group', 'fa:group', 'member/group/index', 'MemberGroup', 0, '1', '1', '1', '', '2023-08-22 13:50:06', '1', '2023-10-01 23:42:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2331, '用户分组查询', 'member:group:query', 3, 1, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2332, '用户分组创建', 'member:group:create', 3, 2, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2333, '用户分组更新', 'member:group:update', 3, 3, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2334, '用户分组删除', 'member:group:delete', 3, 4, 2330, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-22 13:50:06', '', '2023-08-22 13:50:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2335, '用户等级修改', 'member:user:update-level', 3, 5, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-08-23 16:49:05', '', '2023-08-23 16:50:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2336, '商品评论', '', 2, 5, 2000, 'comment', 'ep:comment', 'mall/product/comment/index', 'ProductComment', 0, '1', '1', '1', '1', '2023-08-26 11:03:00', '1', '2023-08-26 11:03:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2337, '评论查询', 'product:comment:query', 3, 1, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:01', '1', '2023-08-26 11:04:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2338, '添加自评', 'product:comment:create', 3, 2, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:23', '1', '2023-08-26 11:08:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2339, '商家回复', 'product:comment:update', 3, 3, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:37', '1', '2023-08-26 11:04:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2340, '显隐评论', 'product:comment:update', 3, 4, 2336, '', '', '', '', 0, '1', '1', '1', '1', '2023-08-26 11:04:55', '1', '2023-08-26 11:04:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2341, '优惠劵发送', 'promotion:coupon:send', 3, 2, 2038, '', '', '', '', 0, '1', '1', '1', '1', '2023-09-02 00:03:14', '1', '2023-09-02 00:03:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2342, '交易配置', '', 2, 0, 2072, 'config', 'ep:setting', 'mall/trade/config/index', 'TradeConfig', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:30:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2343, '交易中心配置查询', 'trade:config:query', 3, 1, 2342, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2344, '交易中心配置保存', 'trade:config:save', 3, 2, 2342, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2345, '分销管理', '', 1, 4, 2072, 'brokerage', 'fa-solid:project-diagram', '', '', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2023-09-28 10:58:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2346, '分销用户', '', 2, 0, 2345, 'brokerage-user', 'fa-solid:user-tie', 'mall/trade/brokerage/user/index', 'TradeBrokerageUser', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2347, '分销用户查询', 'trade:brokerage-user:query', 3, 1, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2348, '分销用户推广人查询', 'trade:brokerage-user:user-query', 3, 2, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2349, '分销用户推广订单查询', 'trade:brokerage-user:order-query', 3, 3, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2350, '分销用户修改推广资格', 'trade:brokerage-user:update-brokerage-enable', 3, 4, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2351, '分销用户修改推广员', 'trade:brokerage-user:update-bind-user', 3, 5, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2352, '分销用户清除推广员', 'trade:brokerage-user:clear-bind-user', 3, 6, 2346, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2353, '佣金记录', '', 2, 1, 2345, 'brokerage-record', 'fa:money', 'mall/trade/brokerage/record/index', 'TradeBrokerageRecord', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2354, '佣金记录查询', 'trade:brokerage-record:query', 3, 1, 2353, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2355, '佣金提现', '', 2, 2, 2345, 'brokerage-withdraw', 'fa:credit-card', 'mall/trade/brokerage/withdraw/index', 'TradeBrokerageWithdraw', 0, '1', '1', '1', '', '2023-09-28 02:46:22', '1', '2024-02-26 20:33:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2356, '佣金提现查询', 'trade:brokerage-withdraw:query', 3, 1, 2355, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2357, '佣金提现审核', 'trade:brokerage-withdraw:audit', 3, 2, 2355, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-28 02:46:22', '', '2023-09-28 02:46:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2358, '统计中心', '', 1, 75, 2362, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '', '2023-09-30 03:22:40', '1', '2023-09-30 11:54:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2359, '交易统计', '', 2, 4, 2358, 'trade', 'fa-solid:credit-card', 'mall/statistics/trade/index', 'TradeStatistics', 0, '1', '1', '1', '', '2023-09-30 03:22:40', '1', '2024-02-26 20:42:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2360, '交易统计查询', 'statistics:trade:query', 3, 1, 2359, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-30 03:22:40', '', '2023-09-30 03:22:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2361, '交易统计导出', 'statistics:trade:export', 3, 2, 2359, '', '', '', NULL, 0, '1', '1', '1', '', '2023-09-30 03:22:40', '', '2023-09-30 03:22:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2362, '商城系统', '', 1, 59, 0, '/mall', 'ep:shop', '', '', 0, '1', '1', '1', '1', '2023-09-30 11:52:02', '1', '2023-09-30 11:52:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2363, '用户积分修改', 'member:user:update-point', 3, 6, 2317, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-01 14:39:43', '', '2023-10-01 14:39:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2364, '用户余额修改', 'member:user:update-balance', 3, 7, 2317, '', '', '', '', 0, '1', '1', '1', '', '2023-10-01 14:39:43', '1', '2023-10-01 22:42:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2365, '优惠劵', '', 1, 2, 2030, 'coupon', 'fa-solid:disease', '', '', 0, '1', '1', '1', '1', '2023-10-03 12:39:15', '1', '2023-10-05 00:16:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2366, '砍价记录', '', 2, 2, 2310, 'record', 'ep:list', 'mall/promotion/bargain/record/index', 'PromotionBargainRecord', 0, '1', '1', '1', '', '2023-10-05 02:49:06', '1', '2023-10-05 10:50:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2367, '砍价记录查询', 'promotion:bargain-record:query', 3, 1, 2366, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-05 02:49:06', '', '2023-10-05 02:49:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2368, '助力记录查询', 'promotion:bargain-help:query', 3, 2, 2366, '', '', '', '', 0, '1', '1', '1', '1', '2023-10-05 12:27:49', '1', '2023-10-05 12:27:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2369, '拼团记录', 'promotion:combination-record:query', 2, 2, 2303, 'record', 'ep:avatar', 'mall/promotion/combination/record/index.vue', 'PromotionCombinationRecord', 0, '1', '1', '1', '1', '2023-10-08 07:10:22', '1', '2023-10-08 07:34:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2374, '会员统计', '', 2, 2, 2358, 'member', 'ep:avatar', 'mall/statistics/member/index', 'MemberStatistics', 0, '1', '1', '1', '', '2023-10-11 04:39:24', '1', '2024-02-26 20:41:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2375, '会员统计查询', 'statistics:member:query', 3, 1, 2374, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-11 04:39:24', '', '2023-10-11 04:39:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2376, '订单核销', 'trade:order:pick-up', 3, 10, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2023-10-14 17:11:58', '1', '2023-10-14 17:11:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2377, '文章分类', '', 2, 0, 2387, 'article/category', 'fa:certificate', 'mall/promotion/article/category/index', 'ArticleCategory', 0, '1', '1', '1', '', '2023-10-16 01:26:18', '1', '2023-10-16 09:38:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2378, '分类查询', 'promotion:article-category:query', 3, 1, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2379, '分类创建', 'promotion:article-category:create', 3, 2, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2380, '分类更新', 'promotion:article-category:update', 3, 3, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2381, '分类删除', 'promotion:article-category:delete', 3, 4, 2377, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2382, '文章列表', '', 2, 2, 2387, 'article', 'ep:connection', 'mall/promotion/article/index', 'Article', 0, '1', '1', '1', '', '2023-10-16 01:26:18', '1', '2023-10-16 09:41:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2383, '文章管理查询', 'promotion:article:query', 3, 1, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2384, '文章管理创建', 'promotion:article:create', 3, 2, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2385, '文章管理更新', 'promotion:article:update', 3, 3, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2386, '文章管理删除', 'promotion:article:delete', 3, 4, 2382, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-16 01:26:18', '', '2023-10-16 01:26:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2387, '内容管理', '', 1, 1, 2030, 'content', 'ep:collection', '', '', 0, '1', '1', '1', '1', '2023-10-16 09:37:31', '1', '2023-10-16 09:37:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2388, '商城首页', '', 2, 1, 2362, 'home', 'ep:home-filled', 'mall/home/index', 'MallHome', 0, '1', '1', '1', '', '2023-10-16 12:10:33', '', '2023-10-16 12:10:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2389, '核销订单', '', 2, 2, 2166, 'pick-up-order', 'ep:list', 'mall/trade/delivery/pickUpOrder/index', 'PickUpOrder', 0, '1', '1', '1', '', '2023-10-19 16:09:51', '', '2023-10-19 16:09:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2390, '优惠活动', '', 1, 99, 2030, 'youhui', 'ep:aim', '', '', 0, '1', '1', '1', '1', '2023-10-21 19:23:49', '1', '2023-10-21 19:23:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2391, '客户管理', '', 2, 10, 2397, 'customer', 'fa:address-book-o', 'crm/customer/index', 'CrmCustomer', 0, '1', '1', '1', '', '2023-10-29 09:04:21', '1', '2024-02-17 17:13:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2392, '客户查询', 'crm:customer:query', 3, 1, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2393, '客户创建', 'crm:customer:create', 3, 2, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2394, '客户更新', 'crm:customer:update', 3, 3, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2395, '客户删除', 'crm:customer:delete', 3, 4, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2396, '客户导出', 'crm:customer:export', 3, 5, 2391, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 09:04:21', '', '2023-10-29 09:04:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2397, 'CRM 系统', '', 1, 200, 0, '/crm', 'ep:avatar', '', '', 0, '1', '1', '1', '1', '2023-10-29 17:08:30', '1', '2024-02-04 15:37:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2398, '合同管理', '', 2, 50, 2397, 'contract', 'ep:notebook', 'crm/contract/index', 'CrmContract', 0, '1', '1', '1', '', '2023-10-29 10:50:41', '1', '2024-02-17 17:15:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2399, '合同查询', 'crm:contract:query', 3, 1, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2400, '合同创建', 'crm:contract:create', 3, 2, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2401, '合同更新', 'crm:contract:update', 3, 3, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2402, '合同删除', 'crm:contract:delete', 3, 4, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2403, '合同导出', 'crm:contract:export', 3, 5, 2398, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 10:50:41', '', '2023-10-29 10:50:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2404, '线索管理', '', 2, 8, 2397, 'clue', 'fa:pagelines', 'crm/clue/index', 'CrmClue', 0, '1', '1', '1', '', '2023-10-29 11:06:29', '1', '2024-02-17 17:15:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2405, '线索查询', 'crm:clue:query', 3, 1, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2406, '线索创建', 'crm:clue:create', 3, 2, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2407, '线索更新', 'crm:clue:update', 3, 3, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2408, '线索删除', 'crm:clue:delete', 3, 4, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2409, '线索导出', 'crm:clue:export', 3, 5, 2404, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:06:29', '', '2023-10-29 11:06:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2410, '商机管理', '', 2, 40, 2397, 'business', 'fa:bus', 'crm/business/index', 'CrmBusiness', 0, '1', '1', '1', '', '2023-10-29 11:12:35', '1', '2024-02-17 17:14:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2411, '商机查询', 'crm:business:query', 3, 1, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2412, '商机创建', 'crm:business:create', 3, 2, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2413, '商机更新', 'crm:business:update', 3, 3, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2414, '商机删除', 'crm:business:delete', 3, 4, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2415, '商机导出', 'crm:business:export', 3, 5, 2410, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:12:35', '', '2023-10-29 11:12:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2416, '联系人管理', '', 2, 20, 2397, 'contact', 'fa:address-book-o', 'crm/contact/index', 'CrmContact', 0, '1', '1', '1', '', '2023-10-29 11:14:56', '1', '2024-02-17 17:13:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2417, '联系人查询', 'crm:contact:query', 3, 1, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2418, '联系人创建', 'crm:contact:create', 3, 2, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2419, '联系人更新', 'crm:contact:update', 3, 3, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2420, '联系人删除', 'crm:contact:delete', 3, 4, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2421, '联系人导出', 'crm:contact:export', 3, 5, 2416, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:14:56', '', '2023-10-29 11:14:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2422, '回款管理', '', 2, 60, 2397, 'receivable', 'ep:money', 'crm/receivable/index', 'CrmReceivable', 0, '1', '1', '1', '', '2023-10-29 11:18:09', '1', '2024-02-17 17:16:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2423, '回款管理查询', 'crm:receivable:query', 3, 1, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2424, '回款管理创建', 'crm:receivable:create', 3, 2, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2425, '回款管理更新', 'crm:receivable:update', 3, 3, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2426, '回款管理删除', 'crm:receivable:delete', 3, 4, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2427, '回款管理导出', 'crm:receivable:export', 3, 5, 2422, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2428, '回款计划', '', 2, 61, 2397, 'receivable-plan', 'fa:money', 'crm/receivable/plan/index', 'CrmReceivablePlan', 0, '1', '1', '1', '', '2023-10-29 11:18:09', '1', '2024-02-17 17:16:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2429, '回款计划查询', 'crm:receivable-plan:query', 3, 1, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2430, '回款计划创建', 'crm:receivable-plan:create', 3, 2, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2431, '回款计划更新', 'crm:receivable-plan:update', 3, 3, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2432, '回款计划删除', 'crm:receivable-plan:delete', 3, 4, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2433, '回款计划导出', 'crm:receivable-plan:export', 3, 5, 2428, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 11:18:09', '', '2023-10-29 11:18:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2435, '商城装修', '', 2, 20, 2030, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2436, '装修模板', '', 2, 1, 2435, 'diy-template', 'fa6-solid:brush', 'mall/promotion/diy/template/index', 'DiyTemplate', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2437, '装修模板查询', 'promotion:diy-template:query', 3, 1, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2438, '装修模板创建', 'promotion:diy-template:create', 3, 2, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2439, '装修模板更新', 'promotion:diy-template:update', 3, 3, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2440, '装修模板删除', 'promotion:diy-template:delete', 3, 4, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2441, '装修模板使用', 'promotion:diy-template:use', 3, 5, 2436, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2442, '装修页面', '', 2, 2, 2435, 'diy-page', 'foundation:page-edit', 'mall/promotion/diy/page/index', 'DiyPage', 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2443, '装修页面查询', 'promotion:diy-page:query', 3, 1, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:25', '', '2023-10-29 14:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2444, '装修页面创建', 'promotion:diy-page:create', 3, 2, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2445, '装修页面更新', 'promotion:diy-page:update', 3, 3, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2446, '装修页面删除', 'promotion:diy-page:delete', 3, 4, 2442, '', '', '', NULL, 0, '1', '1', '1', '', '2023-10-29 14:19:26', '', '2023-10-29 14:19:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2447, '三方登录', '', 1, 10, 1, 'social', 'fa:rocket', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:12:01', '1', '2024-02-29 01:14:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2448, '三方应用', '', 2, 1, 2447, 'client', 'ep:set-up', 'views/system/social/client/index.vue', 'SocialClient', 0, '1', '1', '1', '1', '2023-11-04 12:17:19', '1', '2023-11-04 12:17:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2449, '三方应用查询', 'system:social-client:query', 3, 1, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:43:12', '1', '2023-11-04 12:43:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2450, '三方应用创建', 'system:social-client:create', 3, 2, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:43:58', '1', '2023-11-04 12:43:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2451, '三方应用更新', 'system:social-client:update', 3, 3, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:44:27', '1', '2023-11-04 12:44:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2452, '三方应用删除', 'system:social-client:delete', 3, 4, 2448, '', '', '', '', 0, '1', '1', '1', '1', '2023-11-04 12:44:43', '1', '2023-11-04 12:44:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2453, '三方用户', 'system:social-user:query', 2, 2, 2447, 'user', 'ep:avatar', 'system/social/user/index.vue', 'SocialUser', 0, '1', '1', '1', '1', '2023-11-04 14:01:05', '1', '2023-11-04 14:01:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2472, '主子表(内嵌)', '', 2, 12, 1070, 'demo03-inner', 'fa:power-off', 'infra/demo/demo03/inner/index', 'Demo03StudentInner', 0, '1', '1', '1', '', '2023-11-13 04:39:51', '1', '2023-11-16 23:53:46', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2478, '单表(增删改查)', '', 2, 1, 1070, 'demo01-contact', 'ep:bicycle', 'infra/demo/demo01/index', 'Demo01Contact', 0, '1', '1', '1', '', '2023-11-15 14:42:30', '1', '2023-11-16 20:34:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2479, '示例联系人查询', 'infra:demo01-contact:query', 3, 1, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2480, '示例联系人创建', 'infra:demo01-contact:create', 3, 2, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2481, '示例联系人更新', 'infra:demo01-contact:update', 3, 3, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2482, '示例联系人删除', 'infra:demo01-contact:delete', 3, 4, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2483, '示例联系人导出', 'infra:demo01-contact:export', 3, 5, 2478, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-15 14:42:30', '', '2023-11-15 14:42:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2484, '树表(增删改查)', '', 2, 2, 1070, 'demo02-category', 'fa:tree', 'infra/demo/demo02/index', 'Demo02Category', 0, '1', '1', '1', '', '2023-11-16 12:18:27', '1', '2023-11-16 20:35:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2485, '示例分类查询', 'infra:demo02-category:query', 3, 1, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2486, '示例分类创建', 'infra:demo02-category:create', 3, 2, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2487, '示例分类更新', 'infra:demo02-category:update', 3, 3, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2488, '示例分类删除', 'infra:demo02-category:delete', 3, 4, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2489, '示例分类导出', 'infra:demo02-category:export', 3, 5, 2484, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:18:27', '', '2023-11-16 12:18:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2490, '主子表(标准)', '', 2, 10, 1070, 'demo03-normal', 'fa:battery-3', 'infra/demo/demo03/normal/index', 'Demo03StudentNormal', 0, '1', '1', '1', '', '2023-11-16 12:53:37', '1', '2023-11-16 23:10:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2491, '学生查询', 'infra:demo03-student:query', 3, 1, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2492, '学生创建', 'infra:demo03-student:create', 3, 2, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2493, '学生更新', 'infra:demo03-student:update', 3, 3, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2494, '学生删除', 'infra:demo03-student:delete', 3, 4, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2495, '学生导出', 'infra:demo03-student:export', 3, 5, 2490, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-16 12:53:37', '', '2023-11-16 12:53:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2497, '主子表(ERP)', '', 2, 11, 1070, 'demo03-erp', 'ep:calendar', 'infra/demo/demo03/erp/index', 'Demo03StudentERP', 0, '1', '1', '1', '', '2023-11-16 15:50:59', '1', '2023-11-17 13:19:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2516, '客户公海配置', '', 2, 0, 2524, 'customer-pool-config', 'ep:data-analysis', 'crm/customer/poolConfig/index', 'CrmCustomerPoolConfig', 0, '1', '1', '1', '', '2023-11-18 13:33:31', '1', '2024-01-03 19:52:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2517, '客户公海配置保存', 'crm:customer-pool-config:update', 3, 1, 2516, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:31', '', '2023-11-18 13:33:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2518, '客户限制配置', '', 2, 1, 2524, 'customer-limit-config', 'ep:avatar', 'crm/customer/limitConfig/index', 'CrmCustomerLimitConfig', 0, '1', '1', '1', '', '2023-11-18 13:33:53', '1', '2024-02-24 16:43:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2519, '客户限制配置查询', 'crm:customer-limit-config:query', 3, 1, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2520, '客户限制配置创建', 'crm:customer-limit-config:create', 3, 2, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2521, '客户限制配置更新', 'crm:customer-limit-config:update', 3, 3, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2522, '客户限制配置删除', 'crm:customer-limit-config:delete', 3, 4, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2523, '客户限制配置导出', 'crm:customer-limit-config:export', 3, 5, 2518, '', '', '', NULL, 0, '1', '1', '1', '', '2023-11-18 13:33:53', '', '2023-11-18 13:33:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2524, '系统配置', '', 1, 999, 2397, 'config', 'ep:connection', '', '', 0, '1', '1', '1', '1', '2023-11-18 21:58:00', '1', '2024-02-17 17:14:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2525, 'WebSocket', '', 2, 5, 2, 'websocket', 'ep:connection', 'infra/webSocket/index', 'InfraWebSocket', 0, '1', '1', '1', '1', '2023-11-23 19:41:55', '1', '2024-04-23 00:02:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2526, '产品管理', '', 2, 80, 2397, 'product', 'fa:product-hunt', 'crm/product/index', 'CrmProduct', 0, '1', '1', '1', '1', '2023-12-05 22:45:26', '1', '2024-02-20 20:36:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2527, '产品查询', 'crm:product:query', 3, 1, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:47:16', '1', '2023-12-05 22:47:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2528, '产品创建', 'crm:product:create', 3, 2, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:47:41', '1', '2023-12-05 22:47:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2529, '产品更新', 'crm:product:update', 3, 3, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:03', '1', '2023-12-05 22:48:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2530, '产品删除', 'crm:product:delete', 3, 4, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:17', '1', '2023-12-05 22:48:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2531, '产品导出', 'crm:product:export', 3, 5, 2526, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-05 22:48:29', '1', '2023-12-05 22:48:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2532, '产品分类配置', '', 2, 3, 2524, 'product/category', 'fa-solid:window-restore', 'crm/product/category/index', 'CrmProductCategory', 0, '1', '1', '1', '1', '2023-12-06 12:52:36', '1', '2023-12-06 12:52:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2533, '产品分类查询', 'crm:product-category:query', 3, 1, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:23', '1', '2023-12-06 12:53:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2534, '产品分类创建', 'crm:product-category:create', 3, 2, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:41', '1', '2023-12-06 12:53:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2535, '产品分类更新', 'crm:product-category:update', 3, 3, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:53:59', '1', '2023-12-06 12:53:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2536, '产品分类删除', 'crm:product-category:delete', 3, 4, 2532, '', '', '', '', 0, '1', '1', '1', '1', '2023-12-06 12:54:14', '1', '2023-12-06 12:54:14', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2543, '关联商机', 'crm:contact:create-business', 3, 10, 2416, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-02 17:28:25', '1', '2024-01-02 17:28:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2544, '取关商机', 'crm:contact:delete-business', 3, 11, 2416, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-02 17:28:43', '1', '2024-01-02 17:28:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2545, '商品统计', '', 2, 3, 2358, 'product', 'fa:product-hunt', 'mall/statistics/product/index', 'ProductStatistics', 0, '1', '1', '1', '', '2023-12-15 18:54:28', '1', '2024-02-26 20:41:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2546, '客户公海', '', 2, 30, 2397, 'customer/pool', 'fa-solid:swimming-pool', 'crm/customer/pool/index', 'CrmCustomerPool', 0, '1', '1', '1', '1', '2024-01-15 21:29:34', '1', '2024-02-17 17:14:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2547, '订单查询', 'trade:order:query', 3, 1, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-16 08:52:00', '1', '2024-01-16 08:52:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2548, '订单更新', 'trade:order:update', 3, 2, 2076, '', '', '', '', 0, '1', '1', '1', '1', '2024-01-16 08:52:21', '1', '2024-01-16 08:52:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2549, '支付&退款案例', '', 2, 1, 2161, 'order', 'fa:paypal', 'pay/demo/order/index', '', 0, '1', '1', '1', '1', '2024-01-18 23:45:00', '1', '2024-01-18 23:47:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2550, '转账案例', '', 2, 2, 2161, 'transfer', 'fa:transgender-alt', 'pay/demo/transfer/index', '', 0, '1', '1', '1', '1', '2024-01-18 23:51:16', '1', '2024-01-18 23:51:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2551, '钱包管理', '', 1, 4, 1117, 'wallet', 'ep:wallet', '', '', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '1', '2024-02-29 08:58:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2552, '充值套餐', '', 2, 2, 2551, 'wallet-recharge-package', 'fa:leaf', 'pay/wallet/rechargePackage/index', 'WalletRechargePackage', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2553, '钱包充值套餐查询', 'pay:wallet-recharge-package:query', 3, 1, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2554, '钱包充值套餐创建', 'pay:wallet-recharge-package:create', 3, 2, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2555, '钱包充值套餐更新', 'pay:wallet-recharge-package:update', 3, 3, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2556, '钱包充值套餐删除', 'pay:wallet-recharge-package:delete', 3, 4, 2552, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2557, '钱包余额', '', 2, 1, 2551, 'wallet-balance', 'fa:leaf', 'pay/wallet/balance/index', 'WalletBalance', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2558, '钱包余额查询', 'pay:wallet:query', 3, 1, 2557, '', '', '', NULL, 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2559, '转账订单', '', 2, 3, 1117, 'transfer', 'ep:credit-card', 'pay/transfer/index', 'PayTransfer', 0, '1', '1', '1', '', '2023-12-29 02:32:54', '', '2023-12-29 02:32:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2560, '数据统计', '', 1, 200, 2397, 'statistics', 'ep:data-line', '', '', 0, '1', '1', '1', '1', '2024-01-26 22:50:35', '1', '2024-02-24 20:10:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2561, '排行榜', 'crm:statistics-rank:query', 2, 1, 2560, 'ranking', 'fa:area-chart', 'crm/statistics/rank/index', 'CrmStatisticsRank', 0, '1', '1', '1', '1', '2024-01-26 22:52:09', '1', '2024-04-24 19:39:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2562, '客户导入', 'crm:customer:import', 3, 6, 2391, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-01 13:09:00', '1', '2024-02-01 13:09:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2563, 'ERP 系统', '', 1, 300, 0, '/erp', 'fa-solid:store', '', '', 0, '1', '1', '1', '1', '2024-02-04 15:37:25', '1', '2024-02-04 15:37:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2564, '产品管理', '', 1, 40, 2563, 'product', 'fa:product-hunt', '', '', 0, '1', '1', '1', '1', '2024-02-04 15:38:43', '1', '2024-02-04 15:38:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2565, '产品信息', '', 2, 0, 2564, 'product', 'fa-solid:apple-alt', 'erp/product/product/index', 'ErpProduct', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-05 14:42:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2566, '产品查询', 'erp:product:query', 3, 1, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:21:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2567, '产品创建', 'erp:product:create', 3, 2, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2568, '产品更新', 'erp:product:update', 3, 3, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2569, '产品删除', 'erp:product:delete', 3, 4, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:22', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2570, '产品导出', 'erp:product:export', 3, 5, 2565, '', '', '', '', 0, '1', '1', '1', '', '2024-02-04 07:52:15', '1', '2024-02-04 17:22:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2571, '产品分类', '', 2, 1, 2564, 'product-category', 'fa:certificate', 'erp/product/category/index', 'ErpProductCategory', 0, '1', '1', '1', '', '2024-02-04 09:21:04', '1', '2024-02-04 17:24:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2572, '分类查询', 'erp:product-category:query', 3, 1, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2573, '分类创建', 'erp:product-category:create', 3, 2, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2574, '分类更新', 'erp:product-category:update', 3, 3, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2575, '分类删除', 'erp:product-category:delete', 3, 4, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2576, '分类导出', 'erp:product-category:export', 3, 5, 2571, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 09:21:04', '', '2024-02-04 09:21:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2577, '产品单位', '', 2, 2, 2564, 'unit', 'ep:opportunity', 'erp/product/unit/index', 'ErpProductUnit', 0, '1', '1', '1', '', '2024-02-04 11:54:08', '1', '2024-02-04 19:54:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2578, '单位查询', 'erp:product-unit:query', 3, 1, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2579, '单位创建', 'erp:product-unit:create', 3, 2, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2580, '单位更新', 'erp:product-unit:update', 3, 3, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2581, '单位删除', 'erp:product-unit:delete', 3, 4, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2582, '单位导出', 'erp:product-unit:export', 3, 5, 2577, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 11:54:08', '', '2024-02-04 11:54:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2583, '库存管理', '', 1, 30, 2563, 'stock', 'fa:window-restore', '', '', 0, '1', '1', '1', '1', '2024-02-05 00:29:37', '1', '2024-02-05 00:29:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2584, '仓库信息', '', 2, 0, 2583, 'warehouse', 'ep:house', 'erp/stock/warehouse/index', 'ErpWarehouse', 0, '1', '1', '1', '', '2024-02-04 17:12:09', '1', '2024-02-05 01:12:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2585, '仓库查询', 'erp:warehouse:query', 3, 1, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2586, '仓库创建', 'erp:warehouse:create', 3, 2, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2587, '仓库更新', 'erp:warehouse:update', 3, 3, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2588, '仓库删除', 'erp:warehouse:delete', 3, 4, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2589, '仓库导出', 'erp:warehouse:export', 3, 5, 2584, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-04 17:12:09', '', '2024-02-04 17:12:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2590, '产品库存', '', 2, 1, 2583, 'stock', 'ep:coffee', 'erp/stock/stock/index', 'ErpStock', 0, '1', '1', '1', '', '2024-02-05 06:40:50', '1', '2024-02-05 14:42:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2591, '库存查询', 'erp:stock:query', 3, 1, 2590, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 06:40:50', '', '2024-02-05 06:40:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2592, '库存导出', 'erp:stock:export', 3, 5, 2590, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 06:40:50', '', '2024-02-05 06:40:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2593, '出入库明细', '', 2, 2, 2583, 'record', 'fa-solid:blog', 'erp/stock/record/index', 'ErpStockRecord', 0, '1', '1', '1', '', '2024-02-05 10:27:21', '1', '2024-02-06 17:26:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2594, '库存明细查询', 'erp:stock-record:query', 3, 1, 2593, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 10:27:21', '', '2024-02-05 10:27:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2595, '库存明细导出', 'erp:stock-record:export', 3, 5, 2593, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 10:27:21', '', '2024-02-05 10:27:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2596, '其它入库', '', 2, 3, 2583, 'in', 'ep:zoom-in', 'erp/stock/in/index', 'ErpStockIn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-07 19:06:51', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2597, '其它入库单查询', 'erp:stock-in:query', 3, 1, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2598, '其它入库单创建', 'erp:stock-in:create', 3, 2, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2599, '其它入库单更新', 'erp:stock-in:update', 3, 3, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2600, '其它入库单删除', 'erp:stock-in:delete', 3, 4, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2601, '其它入库单导出', 'erp:stock-in:export', 3, 5, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2602, '采购管理', '', 1, 10, 2563, 'purchase', 'fa:buysellads', '', '', 0, '1', '1', '1', '1', '2024-02-06 16:01:01', '1', '2024-02-06 16:01:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2603, '供应商信息', '', 2, 4, 2602, 'supplier', 'fa:superpowers', 'erp/purchase/supplier/index', 'ErpSupplier', 0, '1', '1', '1', '', '2024-02-06 08:21:55', '1', '2024-02-06 16:22:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2604, '供应商查询', 'erp:supplier:query', 3, 1, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2605, '供应商创建', 'erp:supplier:create', 3, 2, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2606, '供应商更新', 'erp:supplier:update', 3, 3, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2607, '供应商删除', 'erp:supplier:delete', 3, 4, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2608, '供应商导出', 'erp:supplier:export', 3, 5, 2603, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-06 08:21:55', '', '2024-02-06 08:21:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2609, '其它入库单审批', 'erp:stock-in:update-status', 3, 6, 2596, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-05 16:08:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2610, '其它出库', '', 2, 4, 2583, 'out', 'ep:zoom-out', 'erp/stock/out/index', 'ErpStockOut', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-07 19:06:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2611, '其它出库单查询', 'erp:stock-out:query', 3, 1, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2612, '其它出库单创建', 'erp:stock-out:create', 3, 2, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2613, '其它出库单更新', 'erp:stock-out:update', 3, 3, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2614, '其它出库单删除', 'erp:stock-out:delete', 3, 4, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2615, '其它出库单导出', 'erp:stock-out:export', 3, 5, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2616, '其它出库单审批', 'erp:stock-out:update-status', 3, 6, 2610, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 06:43:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2617, '销售管理', '', 1, 20, 2563, 'sale', 'fa:sellsy', '', '', 0, '1', '1', '1', '1', '2024-02-07 15:12:32', '1', '2024-02-07 15:12:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2618, '客户信息', '', 2, 4, 2617, 'customer', 'ep:avatar', 'erp/sale/customer/index', 'ErpCustomer', 0, '1', '1', '1', '', '2024-02-07 07:21:45', '1', '2024-02-07 15:22:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2619, '客户查询', 'erp:customer:query', 3, 1, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2620, '客户创建', 'erp:customer:create', 3, 2, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2621, '客户更新', 'erp:customer:update', 3, 3, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2622, '客户删除', 'erp:customer:delete', 3, 4, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2623, '客户导出', 'erp:customer:export', 3, 5, 2618, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-07 07:21:45', '', '2024-02-07 07:21:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2624, '库存调拨', '', 2, 5, 2583, 'move', 'ep:folder-remove', 'erp/stock/move/index', 'ErpStockMove', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-16 18:53:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2625, '库存调度单查询', 'erp:stock-move:query', 3, 1, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2626, '库存调度单创建', 'erp:stock-move:create', 3, 2, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2627, '库存调度单更新', 'erp:stock-move:update', 3, 3, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2628, '库存调度单删除', 'erp:stock-move:delete', 3, 4, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2629, '库存调度单导出', 'erp:stock-move:export', 3, 5, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2630, '库存调度单审批', 'erp:stock-move:update-status', 3, 6, 2624, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2631, '库存盘点', '', 2, 6, 2583, 'check', 'ep:circle-check-filled', 'erp/stock/check/index', 'ErpStockCheck', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-08 08:31:09', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2632, '库存盘点单查询', 'erp:stock-check:query', 3, 1, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2633, '库存盘点单创建', 'erp:stock-check:create', 3, 2, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2634, '库存盘点单更新', 'erp:stock-check:update', 3, 3, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2635, '库存盘点单删除', 'erp:stock-check:delete', 3, 4, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2636, '库存盘点单导出', 'erp:stock-check:export', 3, 5, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2637, '库存盘点单审批', 'erp:stock-check:update-status', 3, 6, 2631, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2638, '销售订单', '', 2, 1, 2617, 'order', 'fa:first-order', 'erp/sale/order/index', 'ErpSaleOrder', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-10 21:59:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2639, '销售订单查询', 'erp:sale-order:query', 3, 1, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2640, '销售订单创建', 'erp:sale-order:create', 3, 2, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2641, '销售订单更新', 'erp:sale-order:update', 3, 3, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2642, '销售订单删除', 'erp:sale-order:delete', 3, 4, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2643, '销售订单导出', 'erp:sale-order:export', 3, 5, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2644, '销售订单审批', 'erp:sale-order:update-status', 3, 6, 2638, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2645, '财务管理', '', 1, 50, 2563, 'finance', 'ep:money', '', '', 0, '1', '1', '1', '1', '2024-02-10 08:05:58', '1', '2024-02-10 08:06:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2646, '结算账户', '', 2, 10, 2645, 'account', 'fa:universal-access', 'erp/finance/account/index', 'ErpAccount', 0, '1', '1', '1', '', '2024-02-10 00:15:07', '1', '2024-02-14 08:24:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2647, '结算账户查询', 'erp:account:query', 3, 1, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2648, '结算账户创建', 'erp:account:create', 3, 2, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2649, '结算账户更新', 'erp:account:update', 3, 3, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2650, '结算账户删除', 'erp:account:delete', 3, 4, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2651, '结算账户导出', 'erp:account:export', 3, 5, 2646, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-10 00:15:07', '', '2024-02-10 00:15:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2652, '销售出库', '', 2, 2, 2617, 'out', 'ep:sold-out', 'erp/sale/out/index', 'ErpSaleOut', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-10 22:02:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2653, '销售出库查询', 'erp:sale-out:query', 3, 1, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2654, '销售出库创建', 'erp:sale-out:create', 3, 2, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2655, '销售出库更新', 'erp:sale-out:update', 3, 3, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2656, '销售出库删除', 'erp:sale-out:delete', 3, 4, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2657, '销售出库导出', 'erp:sale-out:export', 3, 5, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2658, '销售出库审批', 'erp:sale-out:update-status', 3, 6, 2652, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2659, '销售退货', '', 2, 3, 2617, 'return', 'fa-solid:bone', 'erp/sale/return/index', 'ErpSaleReturn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 06:12:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2660, '销售退货查询', 'erp:sale-return:query', 3, 1, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2661, '销售退货创建', 'erp:sale-return:create', 3, 2, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2662, '销售退货更新', 'erp:sale-return:update', 3, 3, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2663, '销售退货删除', 'erp:sale-return:delete', 3, 4, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2664, '销售退货导出', 'erp:sale-return:export', 3, 5, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:12:59', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2665, '销售退货审批', 'erp:sale-return:update-status', 3, 6, 2659, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-07 11:13:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2666, '采购订单', '', 2, 1, 2602, 'order', 'fa-solid:border-all', 'erp/purchase/order/index', 'ErpPurchaseOrder', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 08:51:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2667, '采购订单查询', 'erp:purchase-order:query', 3, 1, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2668, '采购订单创建', 'erp:purchase-order:create', 3, 2, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2669, '采购订单更新', 'erp:purchase-order:update', 3, 3, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2670, '采购订单删除', 'erp:purchase-order:delete', 3, 4, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2671, '采购订单导出', 'erp:purchase-order:export', 3, 5, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2672, '采购订单审批', 'erp:purchase-order:update-status', 3, 6, 2666, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2673, '采购入库', '', 2, 2, 2602, 'in', 'fa-solid:gopuram', 'erp/purchase/in/index', 'ErpPurchaseIn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 11:19:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2674, '采购入库查询', 'erp:purchase-in:query', 3, 1, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2675, '采购入库创建', 'erp:purchase-in:create', 3, 2, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2676, '采购入库更新', 'erp:purchase-in:update', 3, 3, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2677, '采购入库删除', 'erp:purchase-in:delete', 3, 4, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2678, '采购入库导出', 'erp:purchase-in:export', 3, 5, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2679, '采购入库审批', 'erp:purchase-in:update-status', 3, 6, 2673, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2680, '采购退货', '', 2, 3, 2602, 'return', 'ep:minus', 'erp/purchase/return/index', 'ErpPurchaseReturn', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-12 20:51:02', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2681, '采购退货查询', 'erp:purchase-return:query', 3, 1, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2682, '采购退货创建', 'erp:purchase-return:create', 3, 2, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2683, '采购退货更新', 'erp:purchase-return:update', 3, 3, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2684, '采购退货删除', 'erp:purchase-return:delete', 3, 4, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2685, '采购退货导出', 'erp:purchase-return:export', 3, 5, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2686, '采购退货审批', 'erp:purchase-return:update-status', 3, 6, 2680, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2687, '付款单', '', 2, 1, 2645, 'payment', 'ep:caret-right', 'erp/finance/payment/index', 'ErpFinancePayment', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-14 08:24:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2688, '付款单查询', 'erp:finance-payment:query', 3, 1, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2689, '付款单创建', 'erp:finance-payment:create', 3, 2, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2690, '付款单更新', 'erp:finance-payment:update', 3, 3, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2691, '付款单删除', 'erp:finance-payment:delete', 3, 4, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2692, '付款单导出', 'erp:finance-payment:export', 3, 5, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2693, '付款单审批', 'erp:finance-payment:update-status', 3, 6, 2687, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2694, '收款单', '', 2, 2, 2645, 'receipt', 'ep:expand', 'erp/finance/receipt/index', 'ErpFinanceReceipt', 0, '1', '1', '1', '', '2024-02-05 16:08:56', '1', '2024-02-15 19:35:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2695, '收款单查询', 'erp:finance-receipt:query', 3, 1, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2696, '收款单创建', 'erp:finance-receipt:create', 3, 2, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:54', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2697, '收款单更新', 'erp:finance-receipt:update', 3, 3, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:44:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2698, '收款单删除', 'erp:finance-receipt:delete', 3, 4, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2699, '收款单导出', 'erp:finance-receipt:export', 3, 5, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2700, '收款单审批', 'erp:finance-receipt:update-status', 3, 6, 2694, '', '', '', NULL, 0, '1', '1', '1', '', '2024-02-05 16:08:56', '', '2024-02-12 00:45:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2701, '待办事项', '', 2, 0, 2397, 'backlog', 'fa-solid:tasks', 'crm/backlog/index', 'CrmBacklog', 0, '1', '1', '1', '1', '2024-02-17 17:17:11', '1', '2024-02-17 17:17:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2702, 'ERP 首页', 'erp:statistics:query', 2, 0, 2563, 'home', 'ep:home-filled', 'erp/home/index.vue', 'ErpHome', 0, '1', '1', '1', '1', '2024-02-18 16:49:40', '1', '2024-02-26 21:12:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2703, '商机状态配置', '', 2, 4, 2524, 'business-status', 'fa-solid:charging-station', 'crm/business/status/index', 'CrmBusinessStatus', 0, '1', '1', '1', '1', '2024-02-21 20:15:17', '1', '2024-02-21 20:15:17', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2704, '商机状态查询', 'crm:business-status:query', 3, 1, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:35:36', '1', '2024-02-21 20:36:06', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2705, '商机状态创建', 'crm:business-status:create', 3, 2, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:35:57', '1', '2024-02-21 20:35:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2706, '商机状态更新', 'crm:business-status:update', 3, 3, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:36:21', '1', '2024-02-21 20:36:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2707, '商机状态删除', 'crm:business-status:delete', 3, 4, 2703, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-21 20:36:36', '1', '2024-02-21 20:36:36', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2708, '合同配置', '', 2, 5, 2524, 'contract-config', 'ep:connection', 'crm/contract/config/index', 'CrmContractConfig', 0, '1', '1', '1', '1', '2024-02-24 16:44:40', '1', '2024-02-24 16:44:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2709, '客户公海配置查询', 'crm:customer-pool-config:query', 3, 2, 2516, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:45:19', '1', '2024-02-24 16:45:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2710, '合同配置更新', 'crm:contract-config:update', 3, 1, 2708, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:45:56', '1', '2024-02-24 16:45:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2711, '合同配置查询', 'crm:contract-config:query', 3, 2, 2708, '', '', '', '', 0, '1', '1', '1', '1', '2024-02-24 16:46:16', '1', '2024-02-24 16:46:16', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2712, '客户分析', 'crm:statistics-customer:query', 2, 0, 2560, 'customer', 'ep:avatar', 'views/crm/statistics/customer/index.vue', 'CrmStatisticsCustomer', 0, '1', '1', '1', '1', '2024-03-09 16:43:56', '1', '2024-04-24 19:42:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2713, '抄送我的', 'bpm:process-instance-cc:query', 2, 30, 1200, 'copy', 'ep:copy-document', 'bpm/task/copy/index', 'BpmProcessInstanceCopy', 0, '1', '1', '1', '1', '2024-03-17 21:50:23', '1', '2024-04-24 19:55:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2714, '流程分类', '', 2, 3, 1186, 'category', 'fa:object-ungroup', 'bpm/category/index', 'BpmCategory', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-21 23:51:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2715, '分类查询', 'bpm:category:query', 3, 1, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2716, '分类创建', 'bpm:category:create', 3, 2, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2717, '分类更新', 'bpm:category:update', 3, 3, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2718, '分类删除', 'bpm:category:delete', 3, 4, 2714, '', '', '', '', 0, '1', '1', '1', '', '2024-03-08 02:00:51', '1', '2024-03-19 14:36:41', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2720, '发起流程', '', 2, 0, 1200, 'create', 'fa-solid:grin-stars', 'bpm/processInstance/create/index', 'BpmProcessInstanceCreate', 0, '1', '0', '1', '1', '2024-03-19 19:46:05', '1', '2024-03-23 19:03:42', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2721, '流程实例', '', 2, 10, 1186, 'process-instance/manager', 'fa:square', 'bpm/processInstance/manager/index', 'BpmProcessInstanceManager', 0, '1', '1', '1', '1', '2024-03-21 23:57:30', '1', '2024-03-21 23:57:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2722, '流程实例的查询(管理员)', 'bpm:process-instance:manager-query', 3, 1, 2721, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:18:27', '1', '2024-03-22 08:19:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2723, '流程实例的取消(管理员)', 'bpm:process-instance:cancel-by-admin', 3, 2, 2721, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:19:25', '1', '2024-03-22 08:19:25', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2724, '流程任务', '', 2, 11, 1186, 'process-tasnk', 'ep:collection-tag', 'bpm/task/manager/index', 'BpmManagerTask', 0, '1', '1', '1', '1', '2024-03-22 08:43:22', '1', '2024-03-22 08:43:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2725, '流程任务的查询(管理员)', 'bpm:task:mananger-query', 3, 1, 2724, '', '', '', '', 0, '1', '1', '1', '1', '2024-03-22 08:43:49', '1', '2024-03-22 08:43:49', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2726, '流程监听器', '', 2, 5, 1186, 'process-listener', 'fa:assistive-listening-systems', 'bpm/processListener/index', 'BpmProcessListener', 0, '1', '1', '1', '', '2024-03-09 16:05:34', '1', '2024-03-23 13:13:38', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2727, '流程监听器查询', 'bpm:process-listener:query', 3, 1, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2728, '流程监听器创建', 'bpm:process-listener:create', 3, 2, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2729, '流程监听器更新', 'bpm:process-listener:update', 3, 3, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2730, '流程监听器删除', 'bpm:process-listener:delete', 3, 4, 2726, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 16:05:34', '', '2024-03-09 16:05:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2731, '流程表达式', '', 2, 6, 1186, 'process-expression', 'fa:wpexplorer', 'bpm/processExpression/index', 'BpmProcessExpression', 0, '1', '1', '1', '', '2024-03-09 22:35:08', '1', '2024-03-23 19:43:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2732, '流程表达式查询', 'bpm:process-expression:query', 3, 1, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2733, '流程表达式创建', 'bpm:process-expression:create', 3, 2, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2734, '流程表达式更新', 'bpm:process-expression:update', 3, 3, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2735, '流程表达式删除', 'bpm:process-expression:delete', 3, 4, 2731, '', '', '', NULL, 0, '1', '1', '1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2736, '员工业绩', 'crm:statistics-performance:query', 2, 3, 2560, 'performance', 'ep:dish-dot', 'crm/statistics/performance/index', 'CrmStatisticsPerformance', 0, '1', '1', '1', '1', '2024-04-05 13:49:20', '1', '2024-04-24 19:42:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2737, '客户画像', 'crm:statistics-portrait:query', 2, 4, 2560, 'portrait', 'ep:picture', 'crm/statistics/portrait/index', 'CrmStatisticsPortrait', 0, '1', '1', '1', '1', '2024-04-05 13:57:40', '1', '2024-04-24 19:42:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2738, '销售漏斗', 'crm:statistics-funnel:query', 2, 5, 2560, 'funnel', 'ep:grape', 'crm/statistics/funnel/index', 'CrmStatisticsFunnel', 0, '1', '1', '1', '1', '2024-04-13 10:53:26', '1', '2024-04-24 19:39:33', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2739, '消息中心', '', 1, 7, 1, 'messages', 'ep:chat-dot-round', '', '', 0, '1', '1', '1', '1', '2024-04-22 23:54:30', '1', '2024-04-23 09:36:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2740, '监控中心', '', 1, 10, 2, 'monitors', 'ep:monitor', '', '', 0, '1', '1', '1', '1', '2024-04-23 00:04:44', '1', '2024-04-23 00:04:44', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2741, '领取公海客户', 'crm:customer:receive', 3, 1, 2546, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:47:45', '1', '2024-04-24 19:47:45', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2742, '分配公海客户', 'crm:customer:distribute', 3, 2, 2546, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:48:05', '1', '2024-04-24 19:48:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2743, '商品统计查询', 'statistics:product:query', 3, 1, 2545, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:50:05', '1', '2024-04-24 19:50:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2744, '商品统计导出', 'statistics:product:export', 3, 2, 2545, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:50:26', '1', '2024-04-24 19:50:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2745, '支付渠道查询', 'pay:channel:query', 3, 10, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:01', '1', '2024-04-24 19:53:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2746, '支付渠道创建', 'pay:channel:create', 3, 11, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:18', '1', '2024-04-24 19:53:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2747, '支付渠道更新', 'pay:channel:update', 3, 12, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:53:32', '1', '2024-04-24 19:53:58', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2748, '支付渠道删除', 'pay:channel:delete', 3, 13, 1126, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:54:34', '1', '2024-04-24 19:54:34', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2749, '商品收藏查询', 'product:favorite:query', 3, 10, 2014, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:55:47', '1', '2024-04-24 19:55:47', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2750, '商品浏览查询', 'product:browse-history:query', 3, 20, 2014, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:57:43', '1', '2024-04-24 19:57:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2751, '售后同意', 'trade:after-sale:agree', 3, 2, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:58:40', '1', '2024-04-24 19:58:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2752, '售后不同意', 'trade:after-sale:disagree', 3, 3, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 19:59:03', '1', '2024-04-24 19:59:03', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2753, '售后确认退货', 'trade:after-sale:receive', 3, 4, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:00:07', '1', '2024-04-24 20:00:07', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2754, '售后确认退款', 'trade:after-sale:refund', 3, 5, 2073, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:00:24', '1', '2024-04-24 20:00:24', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2755, '删除项目', 'report:go-view-project:delete', 3, 2, 2153, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:01:37', '1', '2024-04-24 20:01:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2756, '会员等级记录查询', 'member:level-record:query', 3, 10, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:32', '1', '2024-04-24 20:02:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2757, '会员经验记录查询', 'member:experience-record:query', 3, 11, 2325, '', '', '', '', 0, '1', '1', '1', '1', '2024-04-24 20:02:51', '1', '2024-04-24 20:02:51', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_menu_seq; +CREATE SEQUENCE system_menu_seq + START 2758; + +-- ---------------------------- +-- Table structure for system_notice +-- ---------------------------- +DROP TABLE IF EXISTS system_notice; +CREATE TABLE system_notice +( + id int8 NOT NULL, + title varchar(50) NOT NULL, + content text NOT NULL, + type int2 NOT NULL, + status int2 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_notice + ADD CONSTRAINT pk_system_notice PRIMARY KEY (id); + +COMMENT ON COLUMN system_notice.id IS '公告ID'; +COMMENT ON COLUMN system_notice.title IS '公告标题'; +COMMENT ON COLUMN system_notice.content IS '公告内容'; +COMMENT ON COLUMN system_notice.type IS '公告类型(1通知 2公告)'; +COMMENT ON COLUMN system_notice.status IS '公告状态(0正常 1关闭)'; +COMMENT ON COLUMN system_notice.creator IS '创建者'; +COMMENT ON COLUMN system_notice.create_time IS '创建时间'; +COMMENT ON COLUMN system_notice.updater IS '更新者'; +COMMENT ON COLUMN system_notice.update_time IS '更新时间'; +COMMENT ON COLUMN system_notice.deleted IS '是否删除'; +COMMENT ON COLUMN system_notice.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notice IS '通知公告表'; + +-- ---------------------------- +-- Records of system_notice +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133

', 1, 0, 'admin', '2021-01-05 17:03:48', '1', '2022-05-04 21:00:20', '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '

11112222

', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 20:07:26', '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '我是测试标题', '

哈哈哈哈123

', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', '0', 121); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_notice_seq; +CREATE SEQUENCE system_notice_seq + START 5; + +-- ---------------------------- +-- Table structure for system_notify_message +-- ---------------------------- +DROP TABLE IF EXISTS system_notify_message; +CREATE TABLE system_notify_message +( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + template_id int8 NOT NULL, + template_code varchar(64) NOT NULL, + template_nickname varchar(63) NOT NULL, + template_content varchar(1024) NOT NULL, + template_type int4 NOT NULL, + template_params varchar(255) NOT NULL, + read_status bool NOT NULL, + read_time timestamp NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_notify_message + ADD CONSTRAINT pk_system_notify_message PRIMARY KEY (id); + +COMMENT ON COLUMN system_notify_message.id IS '用户ID'; +COMMENT ON COLUMN system_notify_message.user_id IS '用户id'; +COMMENT ON COLUMN system_notify_message.user_type IS '用户类型'; +COMMENT ON COLUMN system_notify_message.template_id IS '模版编号'; +COMMENT ON COLUMN system_notify_message.template_code IS '模板编码'; +COMMENT ON COLUMN system_notify_message.template_nickname IS '模版发送人名称'; +COMMENT ON COLUMN system_notify_message.template_content IS '模版内容'; +COMMENT ON COLUMN system_notify_message.template_type IS '模版类型'; +COMMENT ON COLUMN system_notify_message.template_params IS '模版参数'; +COMMENT ON COLUMN system_notify_message.read_status IS '是否已读'; +COMMENT ON COLUMN system_notify_message.read_time IS '阅读时间'; +COMMENT ON COLUMN system_notify_message.creator IS '创建者'; +COMMENT ON COLUMN system_notify_message.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_message.updater IS '更新者'; +COMMENT ON COLUMN system_notify_message.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_message.deleted IS '是否删除'; +COMMENT ON COLUMN system_notify_message.tenant_id IS '租户编号'; +COMMENT ON TABLE system_notify_message IS '站内信消息表'; + +-- ---------------------------- +-- Records of system_notify_message +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:44:08', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{"name":"1","what":"2"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 11:45:04', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 103, 2, 2, 'register', '系统消息', '你好,欢迎 哈哈 加入大家庭!', 2, '{"name":"哈哈"}', '0', NULL, '1', '2023-01-28 21:02:20', '1', '2023-01-28 21:02:20', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{"name":"芋艿","what":"写代码"}', '1', '2023-02-10 00:47:04', '1', '2023-01-28 22:21:42', '1', '2023-02-10 00:47:04', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{"name":"芋艿","what":"写代码"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 22:22:07', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 1, 2, 1, 'test', '123', '我是 2,我开始 3 了', 1, '{"name":"2","what":"3"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 23:45:21', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 1, 2, 2, 'register', '系统消息', '你好,欢迎 123 加入大家庭!', 2, '{"name":"123"}', '1', '2023-01-29 10:52:06', '1', '2023-01-28 23:50:21', '1', '2023-01-29 10:52:06', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-28 08:35:46提现¥0.09元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-28 08:35:46","price":"0.09"}', '0', NULL, '1', '2023-09-28 16:36:22', '1', '2023-09-28 16:36:22', '0', 1); +INSERT INTO system_notify_message (id, user_id, user_type, template_id, template_code, template_nickname, template_content, template_type, template_params, read_status, read_time, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 247, 1, 4, 'brokerage_withdraw_audit_approve', 'system', '您在2023-09-30 20:59:40提现¥1.00元的申请已通过审核', 2, '{"reason":null,"createTime":"2023-09-30 20:59:40","price":"1.00"}', '0', NULL, '1', '2023-10-03 12:11:34', '1', '2023-10-03 12:11:34', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_notify_message_seq; +CREATE SEQUENCE system_notify_message_seq + START 11; + +-- ---------------------------- +-- Table structure for system_notify_template +-- ---------------------------- +DROP TABLE IF EXISTS system_notify_template; +CREATE TABLE system_notify_template +( + id int8 NOT NULL, + name varchar(63) NOT NULL, + code varchar(64) NOT NULL, + nickname varchar(255) NOT NULL, + content varchar(1024) NOT NULL, + type int2 NOT NULL, + params varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_notify_template + ADD CONSTRAINT pk_system_notify_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_notify_template.id IS '主键'; +COMMENT ON COLUMN system_notify_template.name IS '模板名称'; +COMMENT ON COLUMN system_notify_template.code IS '模版编码'; +COMMENT ON COLUMN system_notify_template.nickname IS '发送人名称'; +COMMENT ON COLUMN system_notify_template.content IS '模版内容'; +COMMENT ON COLUMN system_notify_template.type IS '类型'; +COMMENT ON COLUMN system_notify_template.params IS '参数数组'; +COMMENT ON COLUMN system_notify_template.status IS '状态'; +COMMENT ON COLUMN system_notify_template.remark IS '备注'; +COMMENT ON COLUMN system_notify_template.creator IS '创建者'; +COMMENT ON COLUMN system_notify_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_notify_template.updater IS '更新者'; +COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_notify_template.deleted IS '是否删除'; +COMMENT ON TABLE system_notify_template IS '站内信模板表'; + +DROP SEQUENCE IF EXISTS system_notify_template_seq; +CREATE SEQUENCE system_notify_template_seq + START 1; + +-- ---------------------------- +-- Table structure for system_oauth2_access_token +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_access_token; +CREATE TABLE system_oauth2_access_token +( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + user_info varchar(512) NOT NULL, + access_token varchar(255) NOT NULL, + refresh_token varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_oauth2_access_token + ADD CONSTRAINT pk_system_oauth2_access_token PRIMARY KEY (id); + +CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token); +CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token); + +COMMENT ON COLUMN system_oauth2_access_token.id IS '编号'; +COMMENT ON COLUMN system_oauth2_access_token.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_access_token.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_access_token.user_info IS '用户信息'; +COMMENT ON COLUMN system_oauth2_access_token.access_token IS '访问令牌'; +COMMENT ON COLUMN system_oauth2_access_token.refresh_token IS '刷新令牌'; +COMMENT ON COLUMN system_oauth2_access_token.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_access_token.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_access_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_access_token.creator IS '创建者'; +COMMENT ON COLUMN system_oauth2_access_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_access_token.updater IS '更新者'; +COMMENT ON COLUMN system_oauth2_access_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除'; +COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; + +DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq; +CREATE SEQUENCE system_oauth2_access_token_seq + START 1; + +-- ---------------------------- +-- Table structure for system_oauth2_approve +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_approve; +CREATE TABLE system_oauth2_approve +( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + scope varchar(255) NULL DEFAULT '', + approved bool NOT NULL DEFAULT '0', + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_oauth2_approve + ADD CONSTRAINT pk_system_oauth2_approve PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_approve.id IS '编号'; +COMMENT ON COLUMN system_oauth2_approve.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_approve.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_approve.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_approve.scope IS '授权范围'; +COMMENT ON COLUMN system_oauth2_approve.approved IS '是否接受'; +COMMENT ON COLUMN system_oauth2_approve.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_approve.creator IS '创建者'; +COMMENT ON COLUMN system_oauth2_approve.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_approve.updater IS '更新者'; +COMMENT ON COLUMN system_oauth2_approve.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除'; +COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; + +DROP SEQUENCE IF EXISTS system_oauth2_approve_seq; +CREATE SEQUENCE system_oauth2_approve_seq + START 1; + +-- ---------------------------- +-- Table structure for system_oauth2_client +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_client; +CREATE TABLE system_oauth2_client +( + id int8 NOT NULL, + client_id varchar(255) NOT NULL, + secret varchar(255) NOT NULL, + name varchar(255) NOT NULL, + logo varchar(255) NOT NULL, + description varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + access_token_validity_seconds int4 NOT NULL, + refresh_token_validity_seconds int4 NOT NULL, + redirect_uris varchar(255) NOT NULL, + authorized_grant_types varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + auto_approve_scopes varchar(255) NULL DEFAULT NULL, + authorities varchar(255) NULL DEFAULT NULL, + resource_ids varchar(255) NULL DEFAULT NULL, + additional_information varchar(4096) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_oauth2_client + ADD CONSTRAINT pk_system_oauth2_client PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_client.id IS '编号'; +COMMENT ON COLUMN system_oauth2_client.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_client.secret IS '客户端密钥'; +COMMENT ON COLUMN system_oauth2_client.name IS '应用名'; +COMMENT ON COLUMN system_oauth2_client.logo IS '应用图标'; +COMMENT ON COLUMN system_oauth2_client.description IS '应用描述'; +COMMENT ON COLUMN system_oauth2_client.status IS '状态'; +COMMENT ON COLUMN system_oauth2_client.access_token_validity_seconds IS '访问令牌的有效期'; +COMMENT ON COLUMN system_oauth2_client.refresh_token_validity_seconds IS '刷新令牌的有效期'; +COMMENT ON COLUMN system_oauth2_client.redirect_uris IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_client.authorized_grant_types IS '授权类型'; +COMMENT ON COLUMN system_oauth2_client.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_client.auto_approve_scopes IS '自动通过的授权范围'; +COMMENT ON COLUMN system_oauth2_client.authorities IS '权限'; +COMMENT ON COLUMN system_oauth2_client.resource_ids IS '资源'; +COMMENT ON COLUMN system_oauth2_client.additional_information IS '附加信息'; +COMMENT ON COLUMN system_oauth2_client.creator IS '创建者'; +COMMENT ON COLUMN system_oauth2_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_client.updater IS '更新者'; +COMMENT ON COLUMN system_oauth2_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_client.deleted IS '是否删除'; +COMMENT ON TABLE system_oauth2_client IS 'OAuth2 客户端表'; + +-- ---------------------------- +-- Records of system_oauth2_client +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 1800, 2592000, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '["password","authorization_code","implicit","refresh_token"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2024-02-22 16:31:52', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', '啦啦啦啦', 0, 1800, 43200, '["https://www.iocoder.cn"]', '["password","authorization_code","implicit"]', '["user_info","projects"]', '["user_info"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2023-12-02 21:01:01', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (41, 'yudao-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/fe4ed36596adad5120036ef61a6d0153654544d44af8dd4ad3ffe8f759933d6f.png', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["authorization_code","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2022-09-29 13:28:31', '0'); +INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description, status, access_token_validity_seconds, refresh_token_validity_seconds, redirect_uris, authorized_grant_types, scopes, auto_approve_scopes, authorities, resource_ids, additional_information, creator, create_time, updater, update_time, deleted) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '["http://127.0.0.1:18080"]', '["password","refresh_token"]', '["user.read","user.write"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2022-10-04 20:31:21', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_oauth2_client_seq; +CREATE SEQUENCE system_oauth2_client_seq + START 43; + +-- ---------------------------- +-- Table structure for system_oauth2_code +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_code; +CREATE TABLE system_oauth2_code +( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + code varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT '', + expires_time timestamp NOT NULL, + redirect_uri varchar(255) NULL DEFAULT NULL, + state varchar(255) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_oauth2_code + ADD CONSTRAINT pk_system_oauth2_code PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_code.id IS '编号'; +COMMENT ON COLUMN system_oauth2_code.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_code.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_code.code IS '授权码'; +COMMENT ON COLUMN system_oauth2_code.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_code.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_code.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_code.redirect_uri IS '可重定向的 URI 地址'; +COMMENT ON COLUMN system_oauth2_code.state IS '状态'; +COMMENT ON COLUMN system_oauth2_code.creator IS '创建者'; +COMMENT ON COLUMN system_oauth2_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_code.updater IS '更新者'; +COMMENT ON COLUMN system_oauth2_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除'; +COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; + +DROP SEQUENCE IF EXISTS system_oauth2_code_seq; +CREATE SEQUENCE system_oauth2_code_seq + START 1; + +-- ---------------------------- +-- Table structure for system_oauth2_refresh_token +-- ---------------------------- +DROP TABLE IF EXISTS system_oauth2_refresh_token; +CREATE TABLE system_oauth2_refresh_token +( + id int8 NOT NULL, + user_id int8 NOT NULL, + refresh_token varchar(32) NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_oauth2_refresh_token + ADD CONSTRAINT pk_system_oauth2_refresh_token PRIMARY KEY (id); + +COMMENT ON COLUMN system_oauth2_refresh_token.id IS '编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.user_id IS '用户编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.refresh_token IS '刷新令牌'; +COMMENT ON COLUMN system_oauth2_refresh_token.user_type IS '用户类型'; +COMMENT ON COLUMN system_oauth2_refresh_token.client_id IS '客户端编号'; +COMMENT ON COLUMN system_oauth2_refresh_token.scopes IS '授权范围'; +COMMENT ON COLUMN system_oauth2_refresh_token.expires_time IS '过期时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.creator IS '创建者'; +COMMENT ON COLUMN system_oauth2_refresh_token.create_time IS '创建时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.updater IS '更新者'; +COMMENT ON COLUMN system_oauth2_refresh_token.update_time IS '更新时间'; +COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除'; +COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; +COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; + +DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq; +CREATE SEQUENCE system_oauth2_refresh_token_seq + START 1; + +-- ---------------------------- +-- Table structure for system_operate_log +-- ---------------------------- +DROP TABLE IF EXISTS system_operate_log; +CREATE TABLE system_operate_log +( + id int8 NOT NULL, + trace_id varchar(64) NULL DEFAULT '', + user_id int8 NOT NULL, + user_type int2 NOT NULL DEFAULT 0, + type varchar(50) NOT NULL, + sub_type varchar(50) NOT NULL, + biz_id int8 NOT NULL, + action varchar(2000) NULL DEFAULT '', + extra varchar(2000) NULL DEFAULT '', + request_method varchar(16) NULL DEFAULT '', + request_url varchar(255) NULL DEFAULT '', + user_ip varchar(50) NULL DEFAULT NULL, + user_agent varchar(200) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_operate_log + ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_operate_log.id IS '日志主键'; +COMMENT ON COLUMN system_operate_log.trace_id IS '链路追踪编号'; +COMMENT ON COLUMN system_operate_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_operate_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_operate_log.type IS '操作模块类型'; +COMMENT ON COLUMN system_operate_log.sub_type IS '操作名'; +COMMENT ON COLUMN system_operate_log.biz_id IS '操作数据模块编号'; +COMMENT ON COLUMN system_operate_log.action IS '操作内容'; +COMMENT ON COLUMN system_operate_log.extra IS '拓展字段'; +COMMENT ON COLUMN system_operate_log.request_method IS '请求方法名'; +COMMENT ON COLUMN system_operate_log.request_url IS '请求地址'; +COMMENT ON COLUMN system_operate_log.user_ip IS '用户 IP'; +COMMENT ON COLUMN system_operate_log.user_agent IS '浏览器 UA'; +COMMENT ON COLUMN system_operate_log.creator IS '创建者'; +COMMENT ON COLUMN system_operate_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_operate_log.updater IS '更新者'; +COMMENT ON COLUMN system_operate_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_operate_log.deleted IS '是否删除'; +COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; +COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; + +DROP SEQUENCE IF EXISTS system_operate_log_seq; +CREATE SEQUENCE system_operate_log_seq + START 1; + +-- ---------------------------- +-- Table structure for system_post +-- ---------------------------- +DROP TABLE IF EXISTS system_post; +CREATE TABLE system_post +( + id int8 NOT NULL, + code varchar(64) NOT NULL, + name varchar(50) NOT NULL, + sort int4 NOT NULL, + status int2 NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_post + ADD CONSTRAINT pk_system_post PRIMARY KEY (id); + +COMMENT ON COLUMN system_post.id IS '岗位ID'; +COMMENT ON COLUMN system_post.code IS '岗位编码'; +COMMENT ON COLUMN system_post.name IS '岗位名称'; +COMMENT ON COLUMN system_post.sort IS '显示顺序'; +COMMENT ON COLUMN system_post.status IS '状态(0正常 1停用)'; +COMMENT ON COLUMN system_post.remark IS '备注'; +COMMENT ON COLUMN system_post.creator IS '创建者'; +COMMENT ON COLUMN system_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_post.updater IS '更新者'; +COMMENT ON COLUMN system_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_post.deleted IS '是否删除'; +COMMENT ON COLUMN system_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_post IS '岗位信息表'; + +-- ---------------------------- +-- Records of system_post +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', '2021-01-06 17:03:48', '1', '2023-02-11 15:19:04', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 09:18:20', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 'user', '普通员工', 4, 0, '111', 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 10:04:37', '0', 1); +INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 'HR', '人力资源', 5, 0, '', '1', '2024-03-24 20:45:40', '1', '2024-03-24 20:45:40', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_post_seq; +CREATE SEQUENCE system_post_seq + START 6; + +-- ---------------------------- +-- Table structure for system_role +-- ---------------------------- +DROP TABLE IF EXISTS system_role; +CREATE TABLE system_role +( + id int8 NOT NULL, + name varchar(30) NOT NULL, + code varchar(100) NOT NULL, + sort int4 NOT NULL, + data_scope int2 NOT NULL DEFAULT 1, + data_scope_dept_ids varchar(500) NULL DEFAULT '', + status int2 NOT NULL, + type int2 NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_role + ADD CONSTRAINT pk_system_role PRIMARY KEY (id); + +COMMENT ON COLUMN system_role.id IS '角色ID'; +COMMENT ON COLUMN system_role.name IS '角色名称'; +COMMENT ON COLUMN system_role.code IS '角色权限字符串'; +COMMENT ON COLUMN system_role.sort IS '显示顺序'; +COMMENT ON COLUMN system_role.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; +COMMENT ON COLUMN system_role.data_scope_dept_ids IS '数据范围(指定部门数组)'; +COMMENT ON COLUMN system_role.status IS '角色状态(0正常 1停用)'; +COMMENT ON COLUMN system_role.type IS '角色类型'; +COMMENT ON COLUMN system_role.remark IS '备注'; +COMMENT ON COLUMN system_role.creator IS '创建者'; +COMMENT ON COLUMN system_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_role.updater IS '更新者'; +COMMENT ON COLUMN system_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_role.deleted IS '是否删除'; +COMMENT ON COLUMN system_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role IS '角色信息表'; + +-- ---------------------------- +-- Records of system_role +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:21', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:20', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', '2024-02-24 10:51:13', '1', '2024-02-24 02:51:32', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', '2021-01-06 13:49:35', '1', '2024-03-24 22:22:45', '0', 1); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_role_seq; +CREATE SEQUENCE system_role_seq + START 112; + +-- ---------------------------- +-- Table structure for system_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS system_role_menu; +CREATE TABLE system_role_menu +( + id int8 NOT NULL, + role_id int8 NOT NULL, + menu_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_role_menu + ADD CONSTRAINT pk_system_role_menu PRIMARY KEY (id); + +COMMENT ON COLUMN system_role_menu.id IS '自增编号'; +COMMENT ON COLUMN system_role_menu.role_id IS '角色ID'; +COMMENT ON COLUMN system_role_menu.menu_id IS '菜单ID'; +COMMENT ON COLUMN system_role_menu.creator IS '创建者'; +COMMENT ON COLUMN system_role_menu.create_time IS '创建时间'; +COMMENT ON COLUMN system_role_menu.updater IS '更新者'; +COMMENT ON COLUMN system_role_menu.update_time IS '更新时间'; +COMMENT ON COLUMN system_role_menu.deleted IS '是否删除'; +COMMENT ON COLUMN system_role_menu.tenant_id IS '租户编号'; +COMMENT ON TABLE system_role_menu IS '角色和菜单关联表'; + +-- ---------------------------- +-- Records of system_role_menu +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (263, 109, 1, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (434, 2, 1, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (454, 2, 1093, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (455, 2, 1094, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (460, 2, 1100, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (467, 2, 1107, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (476, 2, 1117, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (477, 2, 100, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (478, 2, 101, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (479, 2, 102, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (480, 2, 1126, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (481, 2, 103, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (483, 2, 104, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (485, 2, 105, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (488, 2, 107, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (490, 2, 108, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (492, 2, 109, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (498, 2, 1138, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (523, 2, 1224, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (524, 2, 1225, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (541, 2, 500, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (543, 2, 501, '1', '2022-02-22 13:09:12', '1', '2022-02-22 13:09:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (675, 2, 2, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (689, 2, 1077, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (690, 2, 1078, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (692, 2, 1083, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (693, 2, 1084, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (699, 2, 1090, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (703, 2, 106, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (704, 2, 110, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (705, 2, 111, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (706, 2, 112, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', '2022-02-23 00:23:55', '110', '2022-02-23 00:23:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1606, 101, 1218, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1607, 101, 1219, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1608, 101, 1220, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1609, 101, 1221, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1610, 101, 5, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1611, 101, 1222, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1612, 101, 1118, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1613, 101, 1119, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1614, 101, 1120, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1615, 101, 1185, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1616, 101, 1186, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1617, 101, 1187, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1618, 101, 1188, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1619, 101, 1189, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1620, 101, 1190, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1621, 101, 1191, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1622, 101, 1192, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1623, 101, 1193, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1624, 101, 1194, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1625, 101, 1195, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1626, 101, 1196, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1627, 101, 1197, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1628, 101, 1198, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1629, 101, 1199, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1630, 101, 1200, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1631, 101, 1201, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1632, 101, 1202, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1633, 101, 1207, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1634, 101, 1208, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1635, 101, 1209, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1636, 101, 1210, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1637, 101, 1211, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1638, 101, 1212, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1639, 101, 1213, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1640, 101, 1215, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1641, 101, 2, '1', '2022-04-01 22:21:24', '1', '2022-04-01 22:21:24', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1642, 101, 1031, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1643, 101, 1032, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1644, 101, 1033, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1645, 101, 1034, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1646, 101, 1035, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1647, 101, 1050, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1648, 101, 1051, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1649, 101, 1052, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1650, 101, 1053, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1651, 101, 1054, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1652, 101, 1056, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1653, 101, 1057, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1654, 101, 1058, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1655, 101, 1059, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1656, 101, 1060, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1657, 101, 1066, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1658, 101, 1067, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1659, 101, 1070, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1664, 101, 1075, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1666, 101, 1077, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1667, 101, 1078, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1668, 101, 1082, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1669, 101, 1083, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1670, 101, 1084, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1671, 101, 1085, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1672, 101, 1086, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1673, 101, 1087, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1674, 101, 1088, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1675, 101, 1089, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1679, 101, 1237, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1680, 101, 1238, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1681, 101, 1239, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1682, 101, 1240, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1683, 101, 1241, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1684, 101, 1242, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1685, 101, 1243, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1687, 101, 106, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1688, 101, 110, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1689, 101, 111, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1690, 101, 112, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1691, 101, 113, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1732, 109, 1064, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1733, 109, 1001, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1734, 109, 1065, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1735, 109, 1002, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1736, 109, 1003, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1737, 109, 1004, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1738, 109, 1005, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1739, 109, 1006, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1740, 109, 1007, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1741, 109, 1008, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1742, 109, 1009, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1743, 109, 1010, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1744, 109, 1011, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1745, 109, 1012, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1746, 111, 100, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1747, 111, 101, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1748, 111, 1063, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1749, 111, 1064, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1750, 111, 1001, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1751, 111, 1065, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1752, 111, 1002, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1753, 111, 1003, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1754, 111, 1004, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1755, 111, 1005, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1756, 111, 1006, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1757, 111, 1007, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1758, 111, 1008, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1759, 111, 1009, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1760, 111, 1010, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1761, 111, 1011, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1762, 111, 1012, '1', '2022-09-21 22:08:52', '1', '2022-09-21 22:08:52', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1763, 109, 100, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1764, 109, 101, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1765, 109, 1063, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1766, 109, 1064, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1767, 109, 1001, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1768, 109, 1065, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1769, 109, 1002, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1770, 109, 1003, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1771, 109, 1004, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1772, 109, 1005, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1773, 109, 1006, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1774, 109, 1007, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1775, 109, 1008, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1776, 109, 1009, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1777, 109, 1010, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1778, 109, 1011, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1779, 109, 1012, '1', '2022-09-21 22:08:53', '1', '2022-09-21 22:08:53', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1780, 111, 100, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1781, 111, 101, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1782, 111, 1063, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1783, 111, 1064, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1784, 111, 1001, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1785, 111, 1065, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1786, 111, 1002, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1787, 111, 1003, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1788, 111, 1004, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1789, 111, 1005, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1790, 111, 1006, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1791, 111, 1007, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1792, 111, 1008, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1793, 111, 1009, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1794, 111, 1010, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1795, 111, 1011, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1796, 111, 1012, '1', '2022-09-21 22:08:54', '1', '2022-09-21 22:08:54', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1797, 109, 100, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1798, 109, 101, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1799, 109, 1063, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1800, 109, 1064, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1801, 109, 1001, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1802, 109, 1065, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1803, 109, 1002, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1804, 109, 1003, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1805, 109, 1004, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1806, 109, 1005, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1807, 109, 1006, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1808, 109, 1007, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1809, 109, 1008, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1810, 109, 1009, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1811, 109, 1010, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1812, 109, 1011, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1813, 109, 1012, '1', '2022-09-21 22:08:55', '1', '2022-09-21 22:08:55', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1814, 111, 100, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1815, 111, 101, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1816, 111, 1063, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1817, 111, 1064, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1818, 111, 1001, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1819, 111, 1065, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1820, 111, 1002, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1821, 111, 1003, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1822, 111, 1004, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1823, 111, 1005, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1824, 111, 1006, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1825, 111, 1007, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1826, 111, 1008, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1827, 111, 1009, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1828, 111, 1010, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1829, 111, 1011, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1830, 111, 1012, '1', '2022-09-21 22:08:56', '1', '2022-09-21 22:08:56', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1831, 109, 103, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1832, 109, 1017, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1833, 109, 1018, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1834, 109, 1019, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1835, 109, 1020, '1', '2022-09-21 22:43:23', '1', '2022-09-21 22:43:23', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1836, 111, 103, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1837, 111, 1017, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1838, 111, 1018, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1839, 111, 1019, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1840, 111, 1020, '1', '2022-09-21 22:43:24', '1', '2022-09-21 22:43:24', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1841, 109, 1036, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1842, 109, 1037, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1843, 109, 1038, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1844, 109, 1039, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1845, 109, 107, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1846, 111, 1036, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1847, 111, 1037, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1848, 111, 1038, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1849, 111, 1039, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1850, 111, 107, '1', '2022-09-21 22:48:13', '1', '2022-09-21 22:48:13', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1991, 2, 1024, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1992, 2, 1025, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1993, 2, 1026, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1994, 2, 1027, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1995, 2, 1028, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1996, 2, 1029, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1997, 2, 1030, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1998, 2, 1031, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1999, 2, 1032, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2000, 2, 1033, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2001, 2, 1034, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2002, 2, 1035, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2003, 2, 1036, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2004, 2, 1037, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2005, 2, 1038, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2006, 2, 1039, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2007, 2, 1040, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2008, 2, 1042, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2009, 2, 1043, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2010, 2, 1045, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2011, 2, 1046, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2012, 2, 1048, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2013, 2, 1050, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2014, 2, 1051, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2015, 2, 1052, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2016, 2, 1053, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2017, 2, 1054, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2018, 2, 1056, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2019, 2, 1057, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2020, 2, 1058, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2021, 2, 2083, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2022, 2, 1059, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2023, 2, 1060, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2024, 2, 1063, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2025, 2, 1064, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2026, 2, 1065, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2027, 2, 1066, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2028, 2, 1067, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2029, 2, 1070, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2034, 2, 1075, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2036, 2, 1082, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2037, 2, 1085, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2038, 2, 1086, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2039, 2, 1087, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2040, 2, 1088, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2041, 2, 1089, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2042, 2, 1091, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2043, 2, 1092, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2044, 2, 1095, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2045, 2, 1096, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2046, 2, 1097, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2047, 2, 1098, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2048, 2, 1101, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2049, 2, 1102, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2050, 2, 1103, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2051, 2, 1104, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2052, 2, 1105, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2053, 2, 1106, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2054, 2, 1108, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2055, 2, 1109, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2061, 2, 1127, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2062, 2, 1128, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2063, 2, 1129, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2064, 2, 1130, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2066, 2, 1132, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2067, 2, 1133, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2068, 2, 1134, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2069, 2, 1135, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2070, 2, 1136, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2071, 2, 1137, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2072, 2, 114, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2073, 2, 1139, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2074, 2, 115, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2075, 2, 1140, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2076, 2, 116, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2077, 2, 1141, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2078, 2, 1142, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2079, 2, 1143, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2080, 2, 1150, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2081, 2, 1161, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2082, 2, 1162, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2083, 2, 1163, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2084, 2, 1164, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2085, 2, 1165, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2086, 2, 1166, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2087, 2, 1173, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2088, 2, 1174, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2089, 2, 1175, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2090, 2, 1176, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2091, 2, 1177, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2092, 2, 1178, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2099, 2, 1226, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2100, 2, 1227, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2101, 2, 1228, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2102, 2, 1229, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2103, 2, 1237, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2104, 2, 1238, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2105, 2, 1239, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2106, 2, 1240, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2107, 2, 1241, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2108, 2, 1242, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2109, 2, 1243, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2116, 2, 1254, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2117, 2, 1255, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2118, 2, 1256, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2119, 2, 1257, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2120, 2, 1258, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2121, 2, 1259, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2122, 2, 1260, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2123, 2, 1261, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2124, 2, 1263, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2125, 2, 1264, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2126, 2, 1265, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2127, 2, 1266, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2128, 2, 1267, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2129, 2, 1001, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2130, 2, 1002, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2131, 2, 1003, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2132, 2, 1004, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2133, 2, 1005, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2134, 2, 1006, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2135, 2, 1007, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2136, 2, 1008, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2137, 2, 1009, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2138, 2, 1010, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2139, 2, 1011, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2140, 2, 1012, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2141, 2, 1013, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2142, 2, 1014, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2143, 2, 1015, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2144, 2, 1016, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2145, 2, 1017, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2146, 2, 1018, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2147, 2, 1019, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2148, 2, 1020, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2149, 2, 1021, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2150, 2, 1022, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2151, 2, 1023, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2152, 2, 1281, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2153, 2, 1282, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2154, 2, 2000, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2155, 2, 2002, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2156, 2, 2003, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2157, 2, 2004, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2158, 2, 2005, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2159, 2, 2006, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2160, 2, 2008, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2161, 2, 2009, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2162, 2, 2010, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2163, 2, 2011, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2164, 2, 2012, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2170, 2, 2019, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2171, 2, 2020, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2172, 2, 2021, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2173, 2, 2022, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2174, 2, 2023, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2175, 2, 2025, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2177, 2, 2027, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2178, 2, 2028, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2179, 2, 2029, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2180, 2, 2014, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2181, 2, 2015, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2182, 2, 2016, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2183, 2, 2017, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2184, 2, 2018, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2188, 101, 1024, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2189, 101, 1, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2190, 101, 1025, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2191, 101, 1026, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2192, 101, 1027, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2193, 101, 1028, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2194, 101, 1029, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2195, 101, 1030, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2196, 101, 1036, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2197, 101, 1037, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2198, 101, 1038, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2199, 101, 1039, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2200, 101, 1040, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2201, 101, 1042, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2202, 101, 1043, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2203, 101, 1045, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2204, 101, 1046, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2205, 101, 1048, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2206, 101, 2083, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2207, 101, 1063, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2208, 101, 1064, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2209, 101, 1065, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2210, 101, 1093, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2211, 101, 1094, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2212, 101, 1095, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2213, 101, 1096, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2214, 101, 1097, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2215, 101, 1098, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2216, 101, 1100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2217, 101, 1101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2218, 101, 1102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2219, 101, 1103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2220, 101, 1104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2221, 101, 1105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2222, 101, 1106, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2223, 101, 2130, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2224, 101, 1107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2225, 101, 2131, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2226, 101, 1108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2227, 101, 2132, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2228, 101, 1109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2229, 101, 2133, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2230, 101, 2134, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2232, 101, 2135, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2234, 101, 2136, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2236, 101, 2137, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2238, 101, 2138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2240, 101, 2139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2242, 101, 2140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2243, 101, 2141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2244, 101, 2142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2245, 101, 2143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2246, 101, 2144, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2247, 101, 2145, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2248, 101, 2146, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2249, 101, 2147, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2250, 101, 100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2251, 101, 2148, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2252, 101, 101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2253, 101, 2149, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2254, 101, 102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2255, 101, 2150, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2256, 101, 103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2257, 101, 2151, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2258, 101, 104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2259, 101, 2152, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2260, 101, 105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2261, 101, 107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2262, 101, 108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2263, 101, 109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2264, 101, 1138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2265, 101, 1139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2266, 101, 1140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2267, 101, 1141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2268, 101, 1142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2269, 101, 1143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2270, 101, 1224, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2271, 101, 1225, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2272, 101, 1226, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2273, 101, 1227, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2274, 101, 1228, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2275, 101, 1229, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2282, 101, 1261, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2283, 101, 1263, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2284, 101, 1264, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2285, 101, 1265, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2286, 101, 1266, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2287, 101, 1267, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2288, 101, 1001, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2289, 101, 1002, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2290, 101, 1003, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2291, 101, 1004, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2292, 101, 1005, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2293, 101, 1006, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2294, 101, 1007, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2295, 101, 1008, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2296, 101, 1009, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2297, 101, 1010, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2298, 101, 1011, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2299, 101, 1012, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2300, 101, 500, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2301, 101, 1013, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2302, 101, 501, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2303, 101, 1014, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2304, 101, 1015, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2305, 101, 1016, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2306, 101, 1017, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2307, 101, 1018, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2308, 101, 1019, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2309, 101, 1020, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2932, 109, 1227, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2933, 109, 1228, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2934, 109, 1229, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2935, 109, 1138, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2936, 109, 1139, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2937, 109, 1140, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2938, 109, 1141, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2939, 109, 1142, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2940, 109, 1143, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2941, 111, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2942, 111, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2943, 111, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2944, 111, 1227, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2945, 111, 1228, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2946, 111, 1229, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2947, 111, 1138, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2948, 111, 1139, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2949, 111, 1140, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2950, 111, 1141, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2951, 111, 1142, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2952, 111, 1143, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2993, 109, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2994, 109, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2995, 109, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2996, 109, 1033, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2997, 109, 1034, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2998, 109, 1035, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2999, 109, 1050, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3000, 109, 1051, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3001, 109, 1052, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3002, 109, 1053, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3003, 109, 1054, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3004, 109, 1056, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3005, 109, 1057, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3006, 109, 1058, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3007, 109, 1059, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3008, 109, 1060, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3009, 109, 1066, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3010, 109, 1067, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3011, 109, 1070, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3012, 109, 1075, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3013, 109, 1076, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3014, 109, 1077, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3015, 109, 1078, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3016, 109, 1082, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3017, 109, 1083, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3018, 109, 1084, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3019, 109, 1085, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3020, 109, 1086, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3021, 109, 1087, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3022, 109, 1088, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3023, 109, 1089, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3024, 109, 1090, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3025, 109, 1091, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3026, 109, 1092, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3027, 109, 106, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3028, 109, 110, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3029, 109, 111, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3030, 109, 112, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3031, 109, 113, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3032, 109, 114, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3033, 109, 115, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3034, 109, 116, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3035, 109, 2472, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3036, 109, 2478, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3037, 109, 2479, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3038, 109, 2480, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3039, 109, 2481, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3040, 109, 2482, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3041, 109, 2483, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3042, 109, 2484, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3043, 109, 2485, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3044, 109, 2486, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3045, 109, 2487, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3046, 109, 2488, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3047, 109, 2489, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3048, 109, 2490, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3049, 109, 2491, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3050, 109, 2492, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3051, 109, 2493, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3052, 109, 2494, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3053, 109, 2495, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3054, 109, 2497, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3055, 109, 1237, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3056, 109, 1238, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3057, 109, 1239, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3058, 109, 1240, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3059, 109, 1241, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3060, 109, 1242, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3061, 109, 1243, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3062, 109, 2525, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3063, 109, 1255, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3064, 109, 1256, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3065, 109, 1257, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3066, 109, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3067, 109, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3068, 109, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3069, 111, 2, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3070, 111, 1031, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3071, 111, 1032, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3072, 111, 1033, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3073, 111, 1034, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3074, 111, 1035, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3075, 111, 1050, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3076, 111, 1051, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3077, 111, 1052, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3078, 111, 1053, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3079, 111, 1054, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3080, 111, 1056, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3081, 111, 1057, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3082, 111, 1058, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3083, 111, 1059, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3084, 111, 1060, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3085, 111, 1066, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3086, 111, 1067, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3087, 111, 1070, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3088, 111, 1075, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3089, 111, 1076, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3090, 111, 1077, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3091, 111, 1078, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3092, 111, 1082, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3093, 111, 1083, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3094, 111, 1084, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3095, 111, 1085, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3096, 111, 1086, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3097, 111, 1087, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3098, 111, 1088, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3099, 111, 1089, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3100, 111, 1090, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3101, 111, 1091, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3102, 111, 1092, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3103, 111, 106, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3104, 111, 110, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3105, 111, 111, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3106, 111, 112, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3107, 111, 113, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3108, 111, 114, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3109, 111, 115, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3110, 111, 116, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3111, 111, 2472, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3112, 111, 2478, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3113, 111, 2479, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3114, 111, 2480, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3115, 111, 2481, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3116, 111, 2482, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3117, 111, 2483, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3118, 111, 2484, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3119, 111, 2485, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3120, 111, 2486, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3121, 111, 2487, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3122, 111, 2488, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3123, 111, 2489, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3124, 111, 2490, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3125, 111, 2491, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3126, 111, 2492, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3127, 111, 2493, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3128, 111, 2494, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3129, 111, 2495, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3130, 111, 2497, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3131, 111, 1237, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3132, 111, 1238, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3133, 111, 1239, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3134, 111, 1240, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3135, 111, 1241, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3136, 111, 1242, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3137, 111, 1243, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3138, 111, 2525, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3139, 111, 1255, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3140, 111, 1256, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3141, 111, 1257, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3142, 111, 1258, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3143, 111, 1259, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3144, 111, 1260, '1', '2023-12-02 23:41:02', '1', '2023-12-02 23:41:02', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3221, 109, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3222, 109, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3223, 109, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3224, 109, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3225, 109, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3226, 111, 102, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3227, 111, 1013, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3228, 111, 1014, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3229, 111, 1015, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3230, 111, 1016, '1', '2023-12-30 11:42:36', '1', '2023-12-30 11:42:36', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4163, 109, 5, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4164, 109, 1118, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4165, 109, 1119, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4166, 109, 1120, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4167, 109, 2713, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4168, 109, 2714, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4169, 109, 2715, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4170, 109, 2716, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4171, 109, 2717, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4172, 109, 2718, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4173, 109, 2720, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4174, 109, 1185, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4175, 109, 2721, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4176, 109, 1186, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4177, 109, 2722, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4178, 109, 1187, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4179, 109, 2723, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4180, 109, 1188, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4181, 109, 2724, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4182, 109, 1189, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4183, 109, 2725, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4184, 109, 1190, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4185, 109, 2726, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4186, 109, 1191, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4187, 109, 2727, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4188, 109, 1192, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4189, 109, 2728, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4190, 109, 1193, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4191, 109, 2729, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4192, 109, 1194, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4193, 109, 2730, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4194, 109, 1195, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4195, 109, 2731, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4196, 109, 1196, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4197, 109, 2732, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4198, 109, 1197, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4199, 109, 2733, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4200, 109, 1198, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4201, 109, 2734, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4202, 109, 1199, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4203, 109, 2735, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4204, 109, 1200, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4205, 109, 1201, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4206, 109, 1202, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4207, 109, 1207, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4208, 109, 1208, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4209, 109, 1209, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4210, 109, 1210, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4211, 109, 1211, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4212, 109, 1212, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4213, 109, 1213, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4214, 109, 1215, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4215, 109, 1216, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4216, 109, 1217, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4217, 109, 1218, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4218, 109, 1219, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4219, 109, 1220, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4220, 109, 1221, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4221, 109, 1222, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4222, 111, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4223, 111, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4224, 111, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4225, 111, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4226, 111, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4227, 111, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4228, 111, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4229, 111, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4230, 111, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4231, 111, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4232, 111, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4233, 111, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4234, 111, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4235, 111, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4236, 111, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4237, 111, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4238, 111, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4239, 111, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4240, 111, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4241, 111, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4242, 111, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4243, 111, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4244, 111, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4245, 111, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4246, 111, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4247, 111, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4248, 111, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4249, 111, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4250, 111, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4251, 111, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4252, 111, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4253, 111, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4254, 111, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4255, 111, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4256, 111, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4257, 111, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4258, 111, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4259, 111, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4260, 111, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4261, 111, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4262, 111, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4263, 111, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4264, 111, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4265, 111, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4266, 111, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4267, 111, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4268, 111, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4269, 111, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4270, 111, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4271, 111, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4272, 111, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4273, 111, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4274, 111, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4275, 111, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4276, 111, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4277, 111, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_role_menu_seq; +CREATE SEQUENCE system_role_menu_seq + START 5779; + +-- ---------------------------- +-- Table structure for system_sms_channel +-- ---------------------------- +DROP TABLE IF EXISTS system_sms_channel; +CREATE TABLE system_sms_channel +( + id int8 NOT NULL, + signature varchar(12) NOT NULL, + code varchar(63) NOT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + api_key varchar(128) NOT NULL, + api_secret varchar(128) NULL DEFAULT NULL, + callback_url varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_sms_channel + ADD CONSTRAINT pk_system_sms_channel PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_channel.id IS '编号'; +COMMENT ON COLUMN system_sms_channel.signature IS '短信签名'; +COMMENT ON COLUMN system_sms_channel.code IS '渠道编码'; +COMMENT ON COLUMN system_sms_channel.status IS '开启状态'; +COMMENT ON COLUMN system_sms_channel.remark IS '备注'; +COMMENT ON COLUMN system_sms_channel.api_key IS '短信 API 的账号'; +COMMENT ON COLUMN system_sms_channel.api_secret IS '短信 API 的秘钥'; +COMMENT ON COLUMN system_sms_channel.callback_url IS '短信发送回调 URL'; +COMMENT ON COLUMN system_sms_channel.creator IS '创建者'; +COMMENT ON COLUMN system_sms_channel.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_channel.updater IS '更新者'; +COMMENT ON COLUMN system_sms_channel.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_channel.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_channel IS '短信渠道'; + +-- ---------------------------- +-- Records of system_sms_channel +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (2, 'Ballcat', 'ALIYUN', 0, '你要改哦,只有我可以用!!!!', 'LTAI5tCnKso2uG3kJ5gRav88', 'fGJ5SNXL7P1NHNRmJ7DJaMJGPyE55C', NULL, '', '2021-03-31 11:53:10', '1', '2023-12-02 22:10:17', '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (4, '测试渠道', 'DEBUG_DING_TALK', 0, '123', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2021-04-13 00:23:14', '1', '2022-03-27 20:29:49', '0'); +INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, api_secret, callback_url, creator, create_time, updater, update_time, deleted) VALUES (6, '测试演示', 'DEBUG_DING_TALK', 0, '仅测试', '696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859', 'SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67', NULL, '1', '2022-04-10 23:07:59', '1', '2023-12-02 22:10:08', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_sms_channel_seq; +CREATE SEQUENCE system_sms_channel_seq + START 7; + +-- ---------------------------- +-- Table structure for system_sms_code +-- ---------------------------- +DROP TABLE IF EXISTS system_sms_code; +CREATE TABLE system_sms_code +( + id int8 NOT NULL, + mobile varchar(11) NOT NULL, + code varchar(6) NOT NULL, + create_ip varchar(15) NOT NULL, + scene int2 NOT NULL, + today_index int2 NOT NULL, + used int2 NOT NULL, + used_time timestamp NULL DEFAULT NULL, + used_ip varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_sms_code + ADD CONSTRAINT pk_system_sms_code PRIMARY KEY (id); + +CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile); + +COMMENT ON COLUMN system_sms_code.id IS '编号'; +COMMENT ON COLUMN system_sms_code.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_code.code IS '验证码'; +COMMENT ON COLUMN system_sms_code.create_ip IS '创建 IP'; +COMMENT ON COLUMN system_sms_code.scene IS '发送场景'; +COMMENT ON COLUMN system_sms_code.today_index IS '今日发送的第几条'; +COMMENT ON COLUMN system_sms_code.used IS '是否使用'; +COMMENT ON COLUMN system_sms_code.used_time IS '使用时间'; +COMMENT ON COLUMN system_sms_code.used_ip IS '使用 IP'; +COMMENT ON COLUMN system_sms_code.creator IS '创建者'; +COMMENT ON COLUMN system_sms_code.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_code.updater IS '更新者'; +COMMENT ON COLUMN system_sms_code.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; +COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; +COMMENT ON TABLE system_sms_code IS '手机验证码'; + +DROP SEQUENCE IF EXISTS system_sms_code_seq; +CREATE SEQUENCE system_sms_code_seq + START 1; + +-- ---------------------------- +-- Table structure for system_sms_log +-- ---------------------------- +DROP TABLE IF EXISTS system_sms_log; +CREATE TABLE system_sms_log +( + id int8 NOT NULL, + channel_id int8 NOT NULL, + channel_code varchar(63) NOT NULL, + template_id int8 NOT NULL, + template_code varchar(63) NOT NULL, + template_type int2 NOT NULL, + template_content varchar(255) NOT NULL, + template_params varchar(255) NOT NULL, + api_template_id varchar(63) NOT NULL, + mobile varchar(11) NOT NULL, + user_id int8 NULL DEFAULT NULL, + user_type int2 NULL DEFAULT NULL, + send_status int2 NOT NULL DEFAULT 0, + send_time timestamp NULL DEFAULT NULL, + api_send_code varchar(63) NULL DEFAULT NULL, + api_send_msg varchar(255) NULL DEFAULT NULL, + api_request_id varchar(255) NULL DEFAULT NULL, + api_serial_no varchar(255) NULL DEFAULT NULL, + receive_status int2 NOT NULL DEFAULT 0, + receive_time timestamp NULL DEFAULT NULL, + api_receive_code varchar(63) NULL DEFAULT NULL, + api_receive_msg varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_sms_log + ADD CONSTRAINT pk_system_sms_log PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_log.id IS '编号'; +COMMENT ON COLUMN system_sms_log.channel_id IS '短信渠道编号'; +COMMENT ON COLUMN system_sms_log.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_log.template_id IS '模板编号'; +COMMENT ON COLUMN system_sms_log.template_code IS '模板编码'; +COMMENT ON COLUMN system_sms_log.template_type IS '短信类型'; +COMMENT ON COLUMN system_sms_log.template_content IS '短信内容'; +COMMENT ON COLUMN system_sms_log.template_params IS '短信参数'; +COMMENT ON COLUMN system_sms_log.api_template_id IS '短信 API 的模板编号'; +COMMENT ON COLUMN system_sms_log.mobile IS '手机号'; +COMMENT ON COLUMN system_sms_log.user_id IS '用户编号'; +COMMENT ON COLUMN system_sms_log.user_type IS '用户类型'; +COMMENT ON COLUMN system_sms_log.send_status IS '发送状态'; +COMMENT ON COLUMN system_sms_log.send_time IS '发送时间'; +COMMENT ON COLUMN system_sms_log.api_send_code IS '短信 API 发送结果的编码'; +COMMENT ON COLUMN system_sms_log.api_send_msg IS '短信 API 发送失败的提示'; +COMMENT ON COLUMN system_sms_log.api_request_id IS '短信 API 发送返回的唯一请求 ID'; +COMMENT ON COLUMN system_sms_log.api_serial_no IS '短信 API 发送返回的序号'; +COMMENT ON COLUMN system_sms_log.receive_status IS '接收状态'; +COMMENT ON COLUMN system_sms_log.receive_time IS '接收时间'; +COMMENT ON COLUMN system_sms_log.api_receive_code IS 'API 接收结果的编码'; +COMMENT ON COLUMN system_sms_log.api_receive_msg IS 'API 接收结果的说明'; +COMMENT ON COLUMN system_sms_log.creator IS '创建者'; +COMMENT ON COLUMN system_sms_log.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_log.updater IS '更新者'; +COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_log.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_log IS '短信日志'; + +DROP SEQUENCE IF EXISTS system_sms_log_seq; +CREATE SEQUENCE system_sms_log_seq + START 1; + +-- ---------------------------- +-- Table structure for system_sms_template +-- ---------------------------- +DROP TABLE IF EXISTS system_sms_template; +CREATE TABLE system_sms_template +( + id int8 NOT NULL, + type int2 NOT NULL, + status int2 NOT NULL, + code varchar(63) NOT NULL, + name varchar(63) NOT NULL, + content varchar(255) NOT NULL, + params varchar(255) NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + api_template_id varchar(63) NOT NULL, + channel_id int8 NOT NULL, + channel_code varchar(63) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_sms_template + ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); + +COMMENT ON COLUMN system_sms_template.id IS '编号'; +COMMENT ON COLUMN system_sms_template.type IS '模板类型'; +COMMENT ON COLUMN system_sms_template.status IS '开启状态'; +COMMENT ON COLUMN system_sms_template.code IS '模板编码'; +COMMENT ON COLUMN system_sms_template.name IS '模板名称'; +COMMENT ON COLUMN system_sms_template.content IS '模板内容'; +COMMENT ON COLUMN system_sms_template.params IS '参数数组'; +COMMENT ON COLUMN system_sms_template.remark IS '备注'; +COMMENT ON COLUMN system_sms_template.api_template_id IS '短信 API 的模板编号'; +COMMENT ON COLUMN system_sms_template.channel_id IS '短信渠道编号'; +COMMENT ON COLUMN system_sms_template.channel_code IS '短信渠道编码'; +COMMENT ON COLUMN system_sms_template.creator IS '创建者'; +COMMENT ON COLUMN system_sms_template.create_time IS '创建时间'; +COMMENT ON COLUMN system_sms_template.updater IS '更新者'; +COMMENT ON COLUMN system_sms_template.update_time IS '更新时间'; +COMMENT ON COLUMN system_sms_template.deleted IS '是否删除'; +COMMENT ON TABLE system_sms_template IS '短信模板'; + +-- ---------------------------- +-- Records of system_sms_template +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (2, 1, 0, 'test_01', '测试验证码短信', '正在进行登录操作{operation},您的验证码是{code}', '["operation","code"]', '测试备注', '4383920', 6, 'DEBUG_DING_TALK', '', '2021-03-31 10:49:38', '1', '2023-12-02 22:32:47', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (3, 1, 0, 'test_02', '公告通知', '您的验证码{code},该验证码5分钟内有效,请勿泄漏于他人!', '["code"]', NULL, 'SMS_207945135', 2, 'ALIYUN', '', '2021-03-31 11:56:30', '1', '2021-04-10 01:22:02', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (6, 3, 0, 'test-01', '测试模板', '哈哈哈 {name}', '["name"]', 'f哈哈哈', '4383920', 6, 'DEBUG_DING_TALK', '1', '2021-04-10 01:07:21', '1', '2022-12-10 21:26:09', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (7, 3, 0, 'test-04', '测试下', '老鸡{name},牛逼{code}', '["name","code"]', '哈哈哈哈', 'suibian', 4, 'DEBUG_DING_TALK', '1', '2021-04-13 00:29:53', '1', '2023-12-02 22:35:34', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (8, 1, 0, 'user-sms-login', '前台用户短信登录', '您的验证码是{code}', '["code"]', NULL, '4372216', 6, 'DEBUG_DING_TALK', '1', '2021-10-11 08:10:00', '1', '2022-12-10 21:25:59', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (9, 2, 0, 'bpm_task_assigned', '【工作流】任务被分配', '您收到了一条新的待办任务:{processInstanceName}-{taskName},申请人:{startUserNickname},处理链接:{detailUrl}', '["processInstanceName","taskName","startUserNickname","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-21 22:31:19', '1', '2022-01-22 00:03:36', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (10, 2, 0, 'bpm_process_instance_reject', '【工作流】流程被不通过', '您的流程被审批不通过:{processInstanceName},原因:{reason},查看链接:{detailUrl}', '["processInstanceName","reason","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-22 00:03:31', '1', '2022-05-01 12:33:14', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (11, 2, 0, 'bpm_process_instance_approve', '【工作流】流程被通过', '您的流程被审批通过:{processInstanceName},查看链接:{detailUrl}', '["processInstanceName","detailUrl"]', NULL, 'suibian', 4, 'DEBUG_DING_TALK', '1', '2022-01-22 00:04:31', '1', '2022-03-27 20:32:21', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (12, 2, 0, 'demo', '演示模板', '我就是测试一下下', '[]', NULL, 'biubiubiu', 6, 'DEBUG_DING_TALK', '1', '2022-04-10 23:22:49', '1', '2023-03-24 23:45:07', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (14, 1, 0, 'user-update-mobile', '会员用户 - 修改手机', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:04', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (15, 1, 0, 'user-update-password', '会员用户 - 修改密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-08-19 11:34:18', '0'); +INSERT INTO system_sms_template (id, type, status, code, name, content, params, remark, api_template_id, channel_id, channel_code, creator, create_time, updater, update_time, deleted) VALUES (16, 1, 0, 'user-reset-password', '会员用户 - 重置密码', '您的验证码{code},该验证码 5 分钟内有效,请勿泄漏于他人!', '["code"]', '', 'null', 4, 'DEBUG_DING_TALK', '1', '2023-08-19 18:58:01', '1', '2023-12-02 22:35:27', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_sms_template_seq; +CREATE SEQUENCE system_sms_template_seq + START 17; + +-- ---------------------------- +-- Table structure for system_social_client +-- ---------------------------- +DROP TABLE IF EXISTS system_social_client; +CREATE TABLE system_social_client +( + id int8 NOT NULL, + name varchar(255) NOT NULL, + social_type int2 NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + client_secret varchar(255) NOT NULL, + agent_id varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_social_client + ADD CONSTRAINT pk_system_social_client PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_client.id IS '编号'; +COMMENT ON COLUMN system_social_client.name IS '应用名'; +COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_client.user_type IS '用户类型'; +COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; +COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; +COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; +COMMENT ON COLUMN system_social_client.status IS '状态'; +COMMENT ON COLUMN system_social_client.creator IS '创建者'; +COMMENT ON COLUMN system_social_client.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_client.updater IS '更新者'; +COMMENT ON COLUMN system_social_client.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_client.deleted IS '是否删除'; +COMMENT ON COLUMN system_social_client.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_client IS '社交客户端表'; + +-- ---------------------------- +-- Records of system_social_client +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '钉钉', 20, 2, 'dingvrnreaje3yqvzhxg', 'i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI', NULL, 0, '', '2023-10-18 11:21:18', '1', '2023-12-20 21:28:26', '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '钉钉(王土豆)', 20, 2, 'dingtsu9hpepjkbmthhw', 'FP_bnSq_HAHKCSncmJjw5hxhnzs6vaVDSZZn3egj6rdqTQ_hu5tQVJyLMpgCakdP', NULL, 0, '', '2023-10-18 11:21:18', '', '2023-12-20 21:28:26', '1', 121); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '微信公众号', 31, 1, 'wx5b23ba7a5589ecbb', '2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, '', '2023-10-18 16:07:46', '1', '2023-12-20 21:28:23', '1', 1); +INSERT INTO system_social_client (id, name, social_type, user_type, client_id, client_secret, agent_id, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (43, '微信小程序', 34, 1, 'wx63c280fe3248a3e7', '6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, '', '2023-10-19 13:37:41', '1', '2023-12-20 21:28:25', '1', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_social_client_seq; +CREATE SEQUENCE system_social_client_seq + START 44; + +-- ---------------------------- +-- Table structure for system_social_user +-- ---------------------------- +DROP TABLE IF EXISTS system_social_user; +CREATE TABLE system_social_user +( + id int8 NOT NULL, + type int2 NOT NULL, + openid varchar(32) NOT NULL, + token varchar(256) NULL DEFAULT NULL, + raw_token_info varchar(1024) NOT NULL, + nickname varchar(32) NOT NULL, + avatar varchar(255) NULL DEFAULT NULL, + raw_user_info varchar(1024) NOT NULL, + code varchar(256) NOT NULL, + state varchar(256) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_social_user + ADD CONSTRAINT pk_system_social_user PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_user.id IS '主键(自增策略)'; +COMMENT ON COLUMN system_social_user.type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_user.openid IS '社交 openid'; +COMMENT ON COLUMN system_social_user.token IS '社交 token'; +COMMENT ON COLUMN system_social_user.raw_token_info IS '原始 Token 数据,一般是 JSON 格式'; +COMMENT ON COLUMN system_social_user.nickname IS '用户昵称'; +COMMENT ON COLUMN system_social_user.avatar IS '用户头像'; +COMMENT ON COLUMN system_social_user.raw_user_info IS '原始用户数据,一般是 JSON 格式'; +COMMENT ON COLUMN system_social_user.code IS '最后一次的认证 code'; +COMMENT ON COLUMN system_social_user.state IS '最后一次的认证 state'; +COMMENT ON COLUMN system_social_user.creator IS '创建者'; +COMMENT ON COLUMN system_social_user.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user.updater IS '更新者'; +COMMENT ON COLUMN system_social_user.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user.deleted IS '是否删除'; +COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user IS '社交用户表'; + +DROP SEQUENCE IF EXISTS system_social_user_seq; +CREATE SEQUENCE system_social_user_seq + START 1; + +-- ---------------------------- +-- Table structure for system_social_user_bind +-- ---------------------------- +DROP TABLE IF EXISTS system_social_user_bind; +CREATE TABLE system_social_user_bind +( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + social_type int2 NOT NULL, + social_user_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_social_user_bind + ADD CONSTRAINT pk_system_social_user_bind PRIMARY KEY (id); + +COMMENT ON COLUMN system_social_user_bind.id IS '主键(自增策略)'; +COMMENT ON COLUMN system_social_user_bind.user_id IS '用户编号'; +COMMENT ON COLUMN system_social_user_bind.user_type IS '用户类型'; +COMMENT ON COLUMN system_social_user_bind.social_type IS '社交平台的类型'; +COMMENT ON COLUMN system_social_user_bind.social_user_id IS '社交用户的编号'; +COMMENT ON COLUMN system_social_user_bind.creator IS '创建者'; +COMMENT ON COLUMN system_social_user_bind.create_time IS '创建时间'; +COMMENT ON COLUMN system_social_user_bind.updater IS '更新者'; +COMMENT ON COLUMN system_social_user_bind.update_time IS '更新时间'; +COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除'; +COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; +COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; + +DROP SEQUENCE IF EXISTS system_social_user_bind_seq; +CREATE SEQUENCE system_social_user_bind_seq + START 1; + +-- ---------------------------- +-- Table structure for system_tenant +-- ---------------------------- +DROP TABLE IF EXISTS system_tenant; +CREATE TABLE system_tenant +( + id int8 NOT NULL, + name varchar(30) NOT NULL, + contact_user_id int8 NULL DEFAULT NULL, + contact_name varchar(30) NOT NULL, + contact_mobile varchar(500) NULL DEFAULT NULL, + status int2 NOT NULL DEFAULT 0, + website varchar(256) NULL DEFAULT '', + package_id int8 NOT NULL, + expire_time timestamp NOT NULL, + account_count int4 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_tenant + ADD CONSTRAINT pk_system_tenant PRIMARY KEY (id); + +COMMENT ON COLUMN system_tenant.id IS '租户编号'; +COMMENT ON COLUMN system_tenant.name IS '租户名'; +COMMENT ON COLUMN system_tenant.contact_user_id IS '联系人的用户编号'; +COMMENT ON COLUMN system_tenant.contact_name IS '联系人'; +COMMENT ON COLUMN system_tenant.contact_mobile IS '联系手机'; +COMMENT ON COLUMN system_tenant.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant.website IS '绑定域名'; +COMMENT ON COLUMN system_tenant.package_id IS '租户套餐编号'; +COMMENT ON COLUMN system_tenant.expire_time IS '过期时间'; +COMMENT ON COLUMN system_tenant.account_count IS '账号数量'; +COMMENT ON COLUMN system_tenant.creator IS '创建者'; +COMMENT ON COLUMN system_tenant.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant.updater IS '更新者'; +COMMENT ON COLUMN system_tenant.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant.deleted IS '是否删除'; +COMMENT ON TABLE system_tenant IS '租户表'; + +-- ---------------------------- +-- Records of system_tenant +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2023-11-06 11:41:41', '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-11-06 11:41:47', '0'); +INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobile, status, website, package_id, expire_time, account_count, creator, create_time, updater, update_time, deleted) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-11-06 11:41:53', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_tenant_seq; +CREATE SEQUENCE system_tenant_seq + START 123; + +-- ---------------------------- +-- Table structure for system_tenant_package +-- ---------------------------- +DROP TABLE IF EXISTS system_tenant_package; +CREATE TABLE system_tenant_package +( + id int8 NOT NULL, + name varchar(30) NOT NULL, + status int2 NOT NULL DEFAULT 0, + remark varchar(256) NULL DEFAULT '', + menu_ids varchar(4096) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_tenant_package + ADD CONSTRAINT pk_system_tenant_package PRIMARY KEY (id); + +COMMENT ON COLUMN system_tenant_package.id IS '套餐编号'; +COMMENT ON COLUMN system_tenant_package.name IS '套餐名'; +COMMENT ON COLUMN system_tenant_package.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant_package.remark IS '备注'; +COMMENT ON COLUMN system_tenant_package.menu_ids IS '关联的菜单编号'; +COMMENT ON COLUMN system_tenant_package.creator IS '创建者'; +COMMENT ON COLUMN system_tenant_package.create_time IS '创建时间'; +COMMENT ON COLUMN system_tenant_package.updater IS '更新者'; +COMMENT ON COLUMN system_tenant_package.update_time IS '更新时间'; +COMMENT ON COLUMN system_tenant_package.deleted IS '是否删除'; +COMMENT ON TABLE system_tenant_package IS '租户套餐表'; + +-- ---------------------------- +-- Records of system_tenant_package +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2024-03-30 17:53:17', '0'); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_tenant_package_seq; +CREATE SEQUENCE system_tenant_package_seq + START 112; + +-- ---------------------------- +-- Table structure for system_user_post +-- ---------------------------- +DROP TABLE IF EXISTS system_user_post; +CREATE TABLE system_user_post +( + id int8 NOT NULL, + user_id int8 NOT NULL DEFAULT 0, + post_id int8 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_user_post + ADD CONSTRAINT pk_system_user_post PRIMARY KEY (id); + +COMMENT ON COLUMN system_user_post.id IS 'id'; +COMMENT ON COLUMN system_user_post.user_id IS '用户ID'; +COMMENT ON COLUMN system_user_post.post_id IS '岗位ID'; +COMMENT ON COLUMN system_user_post.creator IS '创建者'; +COMMENT ON COLUMN system_user_post.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_post.updater IS '更新者'; +COMMENT ON COLUMN system_user_post.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_post.deleted IS '是否删除'; +COMMENT ON COLUMN system_user_post.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_post IS '用户岗位表'; + +-- ---------------------------- +-- Records of system_user_post +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 1, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 100, 1, 'admin', '2022-05-02 07:25:24', 'admin', '2022-05-02 07:25:24', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 104, 1, '1', '2022-05-16 19:36:28', '1', '2022-05-16 19:36:28', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (116, 117, 2, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 118, 1, '1', '2022-07-09 17:44:44', '1', '2022-07-09 17:44:44', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (119, 114, 5, '1', '2024-03-24 20:45:51', '1', '2024-03-24 20:45:51', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (123, 115, 1, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); +INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (124, 115, 2, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_user_post_seq; +CREATE SEQUENCE system_user_post_seq + START 125; + +-- ---------------------------- +-- Table structure for system_user_role +-- ---------------------------- +DROP TABLE IF EXISTS system_user_role; +CREATE TABLE system_user_role +( + id int8 NOT NULL, + user_id int8 NOT NULL, + role_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_user_role + ADD CONSTRAINT pk_system_user_role PRIMARY KEY (id); + +COMMENT ON COLUMN system_user_role.id IS '自增编号'; +COMMENT ON COLUMN system_user_role.user_id IS '用户ID'; +COMMENT ON COLUMN system_user_role.role_id IS '角色ID'; +COMMENT ON COLUMN system_user_role.creator IS '创建者'; +COMMENT ON COLUMN system_user_role.create_time IS '创建时间'; +COMMENT ON COLUMN system_user_role.updater IS '更新者'; +COMMENT ON COLUMN system_user_role.update_time IS '更新时间'; +COMMENT ON COLUMN system_user_role.deleted IS '是否删除'; +COMMENT ON COLUMN system_user_role.tenant_id IS '租户编号'; +COMMENT ON TABLE system_user_role IS '用户和角色关联表'; + +-- ---------------------------- +-- Records of system_user_role +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:17', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:12', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:11', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', '2022-01-11 13:19:45', '1', '2022-01-11 13:19:45', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (14, 110, 109, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (15, 111, 110, '110', '2022-02-23 13:14:38', '110', '2022-02-23 13:14:38', '0', 121); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (16, 113, 111, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (18, 1, 2, '1', '2022-05-12 20:39:29', '1', '2022-05-12 20:39:29', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (20, 104, 101, '1', '2022-05-28 15:43:57', '1', '2022-05-28 15:43:57', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', '2022-07-21 22:08:30', '1', '2022-07-21 22:08:30', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', '0', 1); +INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', '2024-03-24 22:23:03', '1', '2024-03-24 22:23:03', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_user_role_seq; +CREATE SEQUENCE system_user_role_seq + START 39; + +-- ---------------------------- +-- Table structure for system_users +-- ---------------------------- +DROP TABLE IF EXISTS system_users; +CREATE TABLE system_users +( + id int8 NOT NULL, + username varchar(30) NOT NULL, + password varchar(100) NULL DEFAULT '', + nickname varchar(30) NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + dept_id int8 NULL DEFAULT NULL, + post_ids varchar(255) NULL DEFAULT NULL, + email varchar(50) NULL DEFAULT '', + mobile varchar(11) NULL DEFAULT '', + sex int2 NULL DEFAULT 0, + avatar varchar(512) NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + login_ip varchar(50) NULL DEFAULT '', + login_date timestamp NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE system_users + ADD CONSTRAINT pk_system_users PRIMARY KEY (id); + +COMMENT ON COLUMN system_users.id IS '用户ID'; +COMMENT ON COLUMN system_users.username IS '用户账号'; +COMMENT ON COLUMN system_users.password IS '密码'; +COMMENT ON COLUMN system_users.nickname IS '用户昵称'; +COMMENT ON COLUMN system_users.remark IS '备注'; +COMMENT ON COLUMN system_users.dept_id IS '部门ID'; +COMMENT ON COLUMN system_users.post_ids IS '岗位编号数组'; +COMMENT ON COLUMN system_users.email IS '用户邮箱'; +COMMENT ON COLUMN system_users.mobile IS '手机号码'; +COMMENT ON COLUMN system_users.sex IS '用户性别'; +COMMENT ON COLUMN system_users.avatar IS '头像地址'; +COMMENT ON COLUMN system_users.status IS '帐号状态(0正常 1停用)'; +COMMENT ON COLUMN system_users.login_ip IS '最后登录IP'; +COMMENT ON COLUMN system_users.login_date IS '最后登录时间'; +COMMENT ON COLUMN system_users.creator IS '创建者'; +COMMENT ON COLUMN system_users.create_time IS '创建时间'; +COMMENT ON COLUMN system_users.updater IS '更新者'; +COMMENT ON COLUMN system_users.update_time IS '更新时间'; +COMMENT ON COLUMN system_users.deleted IS '是否删除'; +COMMENT ON COLUMN system_users.tenant_id IS '租户编号'; +COMMENT ON TABLE system_users IS '用户信息表'; + +-- ---------------------------- +-- Records of system_users +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-29 21:50:32', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-29 21:50:32', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', '0', 118); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', '0', 119); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', '0', 120); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (110, 'admin110', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '小王', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-09-25 22:47:33', '1', '2022-02-22 00:56:14', NULL, '2022-09-25 22:47:33', '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (111, 'test', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '测试用户', NULL, NULL, '[]', '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:42:17', '110', '2022-02-23 13:14:33', NULL, '2023-12-30 11:42:17', '0', 121); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (112, 'newobject', '$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', '新对象', NULL, 100, '[]', '', '15601691235', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-16 23:11:38', '1', '2022-02-23 19:08:03', NULL, '2024-03-16 23:11:38', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', NULL, '2022-03-19 18:38:51', '0', 122); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-24 22:21:05', '1', '2022-03-19 21:50:58', NULL, '2024-03-24 22:21:05', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-04-04 09:37:14', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', '1', '2024-04-04 09:48:05', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, 'hh', '$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', '呵呵', NULL, 100, '[]', '777@qq.com', '15601882312', 1, '', 0, '', NULL, '1', '2024-04-27 08:45:56', '1', '2024-04-27 08:45:56', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS system_users_seq; +CREATE SEQUENCE system_users_seq + START 132; + +-- ---------------------------- +-- Table structure for yudao_demo01_contact +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo01_contact; +CREATE TABLE yudao_demo01_contact +( + id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + avatar varchar(512) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo01_contact + ADD CONSTRAINT pk_yudao_demo01_contact PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo01_contact.id IS '编号'; +COMMENT ON COLUMN yudao_demo01_contact.name IS '名字'; +COMMENT ON COLUMN yudao_demo01_contact.sex IS '性别'; +COMMENT ON COLUMN yudao_demo01_contact.birthday IS '出生年'; +COMMENT ON COLUMN yudao_demo01_contact.description IS '简介'; +COMMENT ON COLUMN yudao_demo01_contact.avatar IS '头像'; +COMMENT ON COLUMN yudao_demo01_contact.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo01_contact.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo01_contact.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo01_contact.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo01_contact.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo01_contact.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo01_contact IS '示例联系人表'; + +-- ---------------------------- +-- Records of yudao_demo01_contact +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 2, '2023-11-07 00:00:00', '

天蚕土豆!呀

', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq; +CREATE SEQUENCE yudao_demo01_contact_seq + START 2; + +-- ---------------------------- +-- Table structure for yudao_demo02_category +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo02_category; +CREATE TABLE yudao_demo02_category +( + id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + parent_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo02_category + ADD CONSTRAINT pk_yudao_demo02_category PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo02_category.id IS '编号'; +COMMENT ON COLUMN yudao_demo02_category.name IS '名字'; +COMMENT ON COLUMN yudao_demo02_category.parent_id IS '父级编号'; +COMMENT ON COLUMN yudao_demo02_category.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo02_category.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo02_category.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo02_category.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo02_category.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo02_category.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo02_category IS '示例分类表'; + +-- ---------------------------- +-- Records of yudao_demo02_category +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '土豆', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '番茄', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, '怪怪', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', '0', 1); +INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo02_category_seq; +CREATE SEQUENCE yudao_demo02_category_seq + START 7; + +-- ---------------------------- +-- Table structure for yudao_demo03_course +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_course; +CREATE TABLE yudao_demo03_course +( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + score int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_course + ADD CONSTRAINT pk_yudao_demo03_course PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_course.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_course.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_course.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_course.score IS '分数'; +COMMENT ON COLUMN yudao_demo03_course.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_course.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_course.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_course.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_course.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_course.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_course IS '学生课程表'; + +-- ---------------------------- +-- Records of yudao_demo03_course +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (3, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (11, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (12, 2, '电脑', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', '1', 1); +INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (13, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2023-11-17 13:13:20', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_course_seq; +CREATE SEQUENCE yudao_demo03_course_seq + START 14; + +-- ---------------------------- +-- Table structure for yudao_demo03_grade +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_grade; +CREATE TABLE yudao_demo03_grade +( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + teacher varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_grade + ADD CONSTRAINT pk_yudao_demo03_grade PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_grade.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_grade.student_id IS '学生编号'; +COMMENT ON COLUMN yudao_demo03_grade.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_grade.teacher IS '班主任'; +COMMENT ON COLUMN yudao_demo03_grade.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_grade.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_grade.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_grade.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_grade.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_grade.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_grade IS '学生班级表'; + +-- ---------------------------- +-- Records of yudao_demo03_grade +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (7, 2, '三年 2 班', '周杰伦', '1', '2023-11-16 23:21:49', '1', '2023-11-16 23:21:49', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (8, 5, '华为', '遥遥领先', '1', '2023-11-16 23:22:46', '1', '2023-11-16 23:47:10', '0', 1); +INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, 9, '小图', '小娃111', '1', '2023-11-17 13:10:23', '1', '2023-11-17 13:10:23', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq; +CREATE SEQUENCE yudao_demo03_grade_seq + START 10; + +-- ---------------------------- +-- Table structure for yudao_demo03_student +-- ---------------------------- +DROP TABLE IF EXISTS yudao_demo03_student; +CREATE TABLE yudao_demo03_student +( + id int8 NOT NULL, + name varchar(100) NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 +); + +ALTER TABLE yudao_demo03_student + ADD CONSTRAINT pk_yudao_demo03_student PRIMARY KEY (id); + +COMMENT ON COLUMN yudao_demo03_student.id IS '编号'; +COMMENT ON COLUMN yudao_demo03_student.name IS '名字'; +COMMENT ON COLUMN yudao_demo03_student.sex IS '性别'; +COMMENT ON COLUMN yudao_demo03_student.birthday IS '出生日期'; +COMMENT ON COLUMN yudao_demo03_student.description IS '简介'; +COMMENT ON COLUMN yudao_demo03_student.creator IS '创建者'; +COMMENT ON COLUMN yudao_demo03_student.create_time IS '创建时间'; +COMMENT ON COLUMN yudao_demo03_student.updater IS '更新者'; +COMMENT ON COLUMN yudao_demo03_student.update_time IS '更新时间'; +COMMENT ON COLUMN yudao_demo03_student.deleted IS '是否删除'; +COMMENT ON COLUMN yudao_demo03_student.tenant_id IS '租户编号'; +COMMENT ON TABLE yudao_demo03_student IS '学生表'; + +-- ---------------------------- +-- Records of yudao_demo03_student +-- ---------------------------- +-- @formatter:off +BEGIN; +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '小白', 1, '2023-11-16 00:00:00', '

厉害

', '1', '2023-11-16 23:21:49', '1', '2023-11-17 16:49:06', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, '大黑', 2, '2023-11-13 00:00:00', '

你在教我做事?

', '1', '2023-11-16 23:22:46', '1', '2023-11-17 16:49:07', '0', 1); +INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (9, '小花', 1, '2023-11-07 00:00:00', '

哈哈哈

', '1', '2023-11-17 00:04:47', '1', '2023-11-17 16:49:08', '0', 1); +COMMIT; +-- @formatter:on + +DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; +CREATE SEQUENCE yudao_demo03_student_seq + START 10; + diff --git a/sql/tools/README.md b/sql/tools/README.md index 852ebaf736..06eed8bc4e 100644 --- a/sql/tools/README.md +++ b/sql/tools/README.md @@ -48,7 +48,7 @@ docker compose exec sqlserver bash /tmp/create_schema.sh ```Bash docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar -```` +``` ③ 在项目 `sql/tools` 目录下运行: @@ -63,6 +63,29 @@ exit 暂不支持 MacBook Apple Silicon,因为 达梦 官方没有提供 Apple Silicon 版本的 Docker 镜像。 +### 1.6 KingbaseES 人大金仓 + +① 下载人大金仓 Docker 镜像: + +> x86_64版本: https://kingbase.oss-cn-beijing.aliyuncs.com/KESV8R3/V009R001C001B0025-安装包-docker/x86_64/kdb_x86_64_V009R001C001B0025.tar +> aarch64版本:https://kingbase.oss-cn-beijing.aliyuncs.com/KESV8R3/V009R001C001B0025-安装包-docker/aarch64/kdb_aarch64_V009R001C001B0025.tar + +② 加载镜像文件,在镜像 tar 文件所在目录运行: + +```Bash +docker load -i x86_64/kdb_x86_64_V009R001C001B0025.tar +``` + +③ 在项目 `sql/tools` 目录下运行: + +```Bash +docker compose up -d kingbase +# 注意:启动完 dm 后,需要手动再执行如下命令,因为 dm 不支持初始化脚本 +docker compose exec kingbase bash -c "exec ksql -Uroot -d test -f /tmp/schema.sql" +``` + +**注意**: MyBatis, MyBatis Plus 目前不兼容人大金仓,推荐直接使用PostgreSQL JDBC 驱动,已经 url 配置方式连接数据库。 + ## 1.X 容器的销毁重建 开发测试过程中,有时候需要创建全新干净的数据库。由于测试数据 Docker 容器采用数据卷 Volume 挂载数据库实例的数据目录,因此销毁数据需要停止容器后,删除数据卷,然后再重新创建容器。 @@ -78,7 +101,7 @@ docker volume rm ruoyi-vue-pro_postgres ### 2.1 实现原理 -通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server 等数据库的脚本。 +通过读取 MySQL 的 `sql/mysql/ruoyi-vue-pro.sql` 数据库文件,转换成 Oracle、PostgreSQL、SQL Server、达梦、人大金仓 等数据库的脚本。 ### 2.2 使用方法 @@ -89,7 +112,7 @@ pip install simple-ddl-parser # pip3 install simple-ddl-parser ``` -② 执行如下命令打印生成 postgres 的脚本内容,其他可选参数有:`oracle`、`sqlserver`、`dm8`: +② 执行如下命令打印生成 postgres 的脚本内容,其他可选参数有:`oracle`、`sqlserver`、`dm8`、`kingbase`: ```Bash python3 convertor.py postgres @@ -98,4 +121,4 @@ python3 convertor.py postgres 程序将 SQL 脚本打印到终端,可以重定向到临时文件 `tmp.sql`。 -确认无误后,可以利用 IDEA 进行格式化。当然,也可以直接导入到数据库中。 \ No newline at end of file +确认无误后,可以利用 IDEA 进行格式化。当然,也可以直接导入到数据库中。 diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index 100e656065..4cab22ddfd 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -768,13 +768,49 @@ SET IDENTITY_INSERT {table_name.lower()} OFF; return script +class KingbaseConvertor(PostgreSQLConvertor): + def __init__(self, src): + super().__init__(src) + self.db_type = "Kingbase" + + def gen_create(self, ddl: Dict) -> str: + """生成 create""" + + def _generate_column(col): + name = col["name"].lower() + if name == "deleted": + return "deleted int2 NOT NULL DEFAULT 0" + + type = col["type"].lower() + full_type = self.translate_type(type, col["size"]) + nullable = "NULL" if col["nullable"] else "NOT NULL" + default = f"DEFAULT {col['default']}" if col["default"] is not None else "" + return f"{name} {full_type} {nullable} {default}" + + table_name = ddl["table_name"].lower() + columns = [f"{_generate_column(col).strip()}" for col in ddl["columns"]] + filed_def_list = ",\n ".join(columns) + script = f"""-- ---------------------------- +-- Table structure for {table_name} +-- ---------------------------- +DROP TABLE IF EXISTS {table_name}; +CREATE TABLE {table_name} ( + {filed_def_list} +);""" + + # Kingbase INSERT '' 不能通过 NOT NULL 校验 + script = script.replace("NOT NULL DEFAULT ''", "NULL DEFAULT ''") + + return script + + def main(): parser = argparse.ArgumentParser(description="芋道系统数据库转换工具") parser.add_argument( "type", type=str, help="目标数据库类型", - choices=["postgres", "oracle", "sqlserver", "dm8"], + choices=["postgres", "oracle", "sqlserver", "dm8", "kingbase"], ) args = parser.parse_args() @@ -788,6 +824,8 @@ def main(): convertor = SQLServerConvertor(sql_file) elif args.type == "dm8": convertor = DM8Convertor(sql_file) + elif args.type == "kingbase": + convertor = KingbaseConvertor(sql_file) else: raise NotImplementedError(f"不支持目标数据库类型: {args.type}") diff --git a/sql/tools/docker-compose.yaml b/sql/tools/docker-compose.yaml index 6be209e058..d2f27288b5 100644 --- a/sql/tools/docker-compose.yaml +++ b/sql/tools/docker-compose.yaml @@ -5,6 +5,7 @@ volumes: postgres: { } sqlserver: { } dm8: { } + kingbase: { } services: mysql: @@ -92,3 +93,19 @@ services: - dm8:/opt/dmdbms/data - ../dm/ruoyi-vue-pro-dm8.sql:/tmp/schema.sql:ro # docker compose exec dm8 bash -c "exec /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 \`/tmp/schema.sql" + + kingbase: + # x86_64: https://kingbase.oss-cn-beijing.aliyuncs.com/KESV8R3/V009R001C001B0025-安装包-docker/x86_64/kdb_x86_64_V009R001C001B0025.tar + # aarch64: https://kingbase.oss-cn-beijing.aliyuncs.com/KESV8R3/V009R001C001B0025-安装包-docker/aarch64/kdb_aarch64_V009R001C001B0025.tar + # docker load -i kdb_x86_64_V009R001C001B0025.tar + image: kingbase_v009r001c001b0025_single_x86:v1 + restart: unless-stopped + environment: + DB_USER: root + DB_PASSWORD: 123456 + ports: + - "54321:54321" + volumes: + - kingbase:/home/kingbase/userdata/ + - ../kingbase/ruoyi-vue-pro.sql:/tmp/schema.sql:ro + # docker compose exec kingbase bash -c "exec ksql -Uroot -d test -f /tmp/schema.sql" \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index f5912f690a..eec316ff76 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -52,6 +52,7 @@ spring: # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例 # url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 + # url: jdbc:postgresql://127.0.0.1:54321/test # KingbaseES 人大金仓 连接的示例, MyBatis不兼容官方驱动 username: root password: 123456 # username: sa # SQL Server 连接的示例 -- Gitee From 0563503102c6f1aa9106b926cc8653aa1e6a8a74 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Jun 2024 11:24:39 +0800 Subject: [PATCH 0669/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E4=BD=BF=E7=94=A8=20DALL=20=E7=BB=98=E5=9B=BE?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=BD=BF=E7=94=A8=20b64=5Fjson=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/image/vo/AiImageDallReqVO.java | 9 +- .../ai/dal/dataobject/image/AiImageDO.java | 5 +- .../ai/service/image/AiImageServiceImpl.java | 97 ++++----- .../src/main/resources/ai_image.sql | 61 ------ .../src/main/resources/chat.sql | 187 ------------------ .../yudao-spring-boot-starter-ai/pom.xml | 5 + .../ai/core/enums/AiPlatformEnum.java | 3 +- .../ai/core/enums/OpenAiImageModelEnum.java | 1 + .../ai/core/enums/OpenAiImageStyleEnum.java | 1 + .../ai/core/factory/AiClientFactory.java | 11 ++ .../ai/core/factory/AiClientFactoryImpl.java | 12 ++ .../src/main/resources/application.yaml | 31 +-- 12 files changed, 109 insertions(+), 314 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java index ad4512832d..1bfe489437 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java @@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.Data; -import lombok.experimental.Accessors; /** * dall2/dall2 绘画 @@ -14,9 +13,11 @@ import lombok.experimental.Accessors; * @since 1.0 */ @Data -@Accessors(chain = true) public class AiImageDallReqVO { + @Schema(description = "模型平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private String platform; // 参见 AiPlatformEnum 枚举 + @Schema(description = "提示词") @NotNull(message = "提示词不能为空!") @Size(max = 1200, message = "提示词最大1200") @@ -31,10 +32,10 @@ public class AiImageDallReqVO { @Schema(description = "图片高度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") @NotNull(message = "图片高度不能为空!") - private String height; + private Integer height; @Schema(description = "图片宽度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") @NotNull(message = "图片宽度不能为空!") - private String width; + private Integer width; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 0f6282a279..b21b2f8d84 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -41,10 +41,10 @@ public class AiImageDO extends BaseDO { private String model; @Schema(description = "图片宽度") - private String width; + private Integer width; @Schema(description = "图片高度") - private String height; + private Integer height; // TODO @fan:这种就注释绘画状态,然后枚举类关联下就好啦 @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") @@ -56,6 +56,7 @@ public class AiImageDO extends BaseDO { @Schema(description = "图片地址(自己服务器)") private String picUrl; + // TODO @芋艿:可能要删除掉 @Schema(description = "绘画图片地址(绘画好的服务器)") private String originalPicUrl; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 2b4f7e6171..a9a084d650 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,14 +1,15 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.util.StrUtil; +import cn.hutool.core.codec.Base64; import cn.hutool.core.util.ObjUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; -import cn.iocoder.yudao.framework.ai.core.exception.AiException; +import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -30,11 +31,9 @@ import cn.iocoder.yudao.module.infra.api.file.FileApi; import com.google.common.collect.ImmutableMap; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.springframework.ai.image.ImageGeneration; -import org.springframework.ai.image.ImagePrompt; -import org.springframework.ai.image.ImageResponse; -import org.springframework.ai.openai.OpenAiImageClient; +import org.springframework.ai.image.*; import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.stabilityai.api.StabilityAiImageOptions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; @@ -42,8 +41,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - - import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_IMAGE_NOT_EXISTS; /** @@ -62,7 +59,7 @@ public class AiImageServiceImpl implements AiImageService { private FileApi fileApi; @Resource - private OpenAiImageClient openAiImageClient; + private AiClientFactory aiClientFactory; @Autowired private MidjourneyProxyClient midjourneyProxyClient; @@ -81,48 +78,58 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public Long dall(Long loginUserId, AiImageDallReqVO req) { - // 保存数据库 - AiImageDO aiImageDO = BeanUtils.toBean(req, AiImageDO.class) - .setUserId(loginUserId) - .setWidth(req.getWidth()) - .setHeight(req.getHeight()) + public Long dall(Long userId, AiImageDallReqVO req) { + req.setPlatform("dall"); // TODO 芋艿:临时写死 + // 1. 保存数据库 + AiImageDO image = BeanUtils.toBean(req, AiImageDO.class) + .setUserId(userId).setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()) + .setWidth(req.getWidth()).setHeight(req.getHeight()) .setDrawRequest(ImmutableMap.of(AiCommonConstants.DRAW_REQ_KEY_STYLE, req.getStyle())) - .setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()) - .setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); - imageMapper.insert(aiImageDO); - // 异步执行 - getSelf().doDall(aiImageDO, req); - // 转换 AiImageDallDrawingRespVO - return aiImageDO.getId(); + .setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()); + imageMapper.insert(image); + // 2. 异步绘制,后续前端通过返回的 id 进行伦旭 + getSelf().doDall(image, req); + return image.getId(); } @Async - public void doDall(AiImageDO aiImageDO, AiImageDallReqVO req) { + public void doDall(AiImageDO image, AiImageDallReqVO req) { try { - // 获取 model - OpenAiImageModelEnum openAiImageModelEnum = OpenAiImageModelEnum.valueOfModel(req.getModel()); - OpenAiImageStyleEnum openAiImageStyleEnum = OpenAiImageStyleEnum.valueOfStyle(req.getStyle()); - - // 转换openai 参数 - // TODO @fan:需要考虑,不同平台,参数不同; - OpenAiImageOptions openAiImageOptions = new OpenAiImageOptions(); - openAiImageOptions.setModel(openAiImageModelEnum.getModel()); - openAiImageOptions.setStyle(openAiImageStyleEnum.getStyle()); - openAiImageOptions.setSize(String.format(AiCommonConstants.DALL_SIZE_TEMPLATE, req.getWidth(), req.getHeight())); - ImageResponse imageResponse = openAiImageClient.call(new ImagePrompt(req.getPrompt(), openAiImageOptions)); - // 发送 - ImageGeneration imageGeneration = imageResponse.getResult(); - // 图片保存到服务器 - String filePath = fileApi.createFile(HttpUtil.downloadBytes(imageGeneration.getOutput().getUrl())); - // 更新数据库 - imageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) - .setPicUrl(filePath).setOriginalPicUrl(imageGeneration.getOutput().getUrl())); - } catch (AiException aiException) { - // TODO @fan:错误日志,也打印下哈;因为 aiException.getMessage() 比较精简; - imageMapper.updateById(new AiImageDO().setId(aiImageDO.getId()).setStatus(AiImageStatusEnum.FAIL.getStatus()) - .setErrorMessage(aiException.getMessage())); + // 1.1 构建请求 + ImageOptions request = buildImageOptions(req); + // 1.2 执行请求 + ImageClient imageClient = aiClientFactory.getDefaultImageClient(AiPlatformEnum.validatePlatform(req.getPlatform())); + ImageResponse response = imageClient.call(new ImagePrompt(req.getPrompt(), request)); + + // 2. 上传到文件服务 + byte[] fileContent = Base64.decode(response.getResult().getOutput().getB64Json()); + String filePath = fileApi.createFile(fileContent); + + // 3. 更新数据库 + imageMapper.updateById(new AiImageDO().setId(image.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) + .setPicUrl(filePath)); + } catch (Exception ex) { + log.error("[doDall][image({}) 生成异常]", image, ex); + imageMapper.updateById(new AiImageDO().setId(image.getId()) + .setStatus(AiImageStatusEnum.FAIL.getStatus()).setErrorMessage(ex.getMessage())); + } + } + + private static ImageOptions buildImageOptions(AiImageDallReqVO draw) { + if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.OPEN_AI_DALL.getPlatform())) { + OpenAiImageOptions request = new OpenAiImageOptions(); + request.setModel(OpenAiImageModelEnum.valueOfModel(draw.getModel()).getModel()); + request.setStyle(OpenAiImageStyleEnum.valueOfStyle(draw.getStyle()).getStyle()); + request.setSize(String.format(AiCommonConstants.DALL_SIZE_TEMPLATE, draw.getWidth(), draw.getHeight())); + request.setResponseFormat("b64_json"); + return request; + } else { + // https://platform.stability.ai/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1sd3/post + return StabilityAiImageOptions.builder().withModel(draw.getModel()) + .withHeight(draw.getHeight()).withWidth(draw.getWidth()) + .build(); } +// return null; } @Override diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql deleted file mode 100644 index 4de719235d..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/ai_image.sql +++ /dev/null @@ -1,61 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : localhost - Source Server Type : MySQL - Source Server Version : 80034 (8.0.34) - Source Host : localhost:3306 - Source Schema : ruoyi-vue-pro - - Target Server Type : MySQL - Target Server Version : 80034 (8.0.34) - File Encoding : 65001 - - Date: 30/05/2024 17:20:37 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for ai_image --- ---------------------------- -DROP TABLE IF EXISTS `ai_image`; -CREATE TABLE `ai_image` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `user_id` bigint DEFAULT NULL, - `prompt` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '提示词\n', - `platform` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '平台', - `model` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型 dall2/dall3、MJ、NIJI', - `width` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片宽度', - `height` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片高度', - `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画状态:提交、排队、绘画中、绘画完成、绘画失败\n', - `public_status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '是否发布', - `pic_url` varchar(512) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片地址', - `original_pic_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画图片地址\n', - `error_message` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '错误信息', - `draw_request` json DEFAULT NULL COMMENT '绘画request', - `draw_response` json DEFAULT NULL COMMENT '绘画response', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_image --- ---------------------------- -BEGIN; -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (91, 1, '北极企鹅', NULL, 'dall-e-2', '1024', '1024', '20', NULL, 'http://test.yudao.iocoder.cn/75b4d733222b60aafdbdcd0475562ff88149eaaff93a25c4e4c66a95bd07f01f.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-z4KBxbWtUpLBYmgaYPvWXjBh.png?st=2024-05-29T04%3A50%3A54Z&se=2024-05-29T06%3A50%3A54Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-28T23%3A21%3A22Z&ske=2024-05-29T23%3A21%3A22Z&sks=b&skv=2023-11-03&sig=jSw/hJfuPWJqQgjSoINtVrt4w61FsaQ6ed4pRCM8UUA%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-29 13:50:43', '2024-05-29 13:51:05', 1, 1, b'0'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (93, 1, '北极企鹅', NULL, 'dall-e-2', '1024', '1024', '20', 'private', 'http://test.yudao.iocoder.cn/ab326bbf3fae9a940770a5c36bbf39467ae539a5b94a030b6c6cc2f179d7dd31.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-CsJtCgLT9lTigTuBDJtPyO8X.png?st=2024-05-29T09%3A02%3A12Z&se=2024-05-29T11%3A02%3A12Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-28T23%3A21%3A54Z&ske=2024-05-29T23%3A21%3A54Z&sks=b&skv=2023-11-03&sig=tH6yFzHtcp3Dxwaua2crFYurCdE7B7%2BAXhyPNVVep1c%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-29 18:02:03', '2024-05-29 18:02:17', 1, 1, b'0'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (94, 1, '北极大熊猫', NULL, 'dall-e-2', '1024', '1024', '20', 'private', 'http://test.yudao.iocoder.cn/ed9d43a6c841c4a967700e211c998778994eeea60cff2dfeb1c3a88b0542ebdd.png', 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-FttVrm20iQRlsxxFE7BLEgkT/user-5p7zykU5aS1sYXCjczkTXn8I/img-GAwShv01C2408VY5lXvLTP4Q.png?st=2024-05-30T01%3A31%3A28Z&se=2024-05-30T03%3A31%3A28Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-29T23%3A39%3A20Z&ske=2024-05-30T23%3A39%3A20Z&sks=b&skv=2023-11-03&sig=n/rqAnD0qJDkhbh/Qm12lz1Se70PQSdXetarmwCKoMY%3D', NULL, '{\"style\": \"vivid\"}', NULL, '2024-05-30 10:31:18', '2024-05-30 10:31:34', 1, 1, b'1'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (102, 1, '女少侠', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:11:13', '2024-05-30 16:11:13', 1, 1, b'1'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (103, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:27:34', '2024-05-30 16:27:34', 1, 1, b'1'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (104, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:23', '2024-05-30 16:28:24', 1, 1, b'1'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (105, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:25', '2024-05-30 16:28:25', 1, 1, b'1'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `platform`, `model`, `width`, `height`, `status`, `public_status`, `pic_url`, `original_pic_url`, `error_message`, `draw_request`, `draw_response`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (106, 1, '123123', 'midjourney', NULL, NULL, NULL, '30', 'private', NULL, NULL, '无可用的账号实例', NULL, '{}', '2024-05-30 16:28:34', '2024-05-30 16:28:34', 1, 1, b'1'); -COMMIT; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql b/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql deleted file mode 100644 index a845056d76..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/chat.sql +++ /dev/null @@ -1,187 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : localhost - Source Server Type : MySQL - Source Server Version : 80034 (8.0.34) - Source Host : localhost:3306 - Source Schema : ruoyi-vue-pro - - Target Server Type : MySQL - Target Server Version : 80034 (8.0.34) - File Encoding : 65001 - - Date: 08/05/2024 18:10:05 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for ai_chat_conversation --- ---------------------------- -DROP TABLE IF EXISTS `ai_chat_conversation`; -CREATE TABLE `ai_chat_conversation` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `user_id` bigint DEFAULT NULL COMMENT '用户id', - `role_id` bigint DEFAULT NULL COMMENT '聊天角色', - `title` varchar(256) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '标题', - `type` varchar(16) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '对话类型', - `chat_count` int DEFAULT NULL COMMENT '聊天次数', - `model_id` bigint DEFAULT NULL COMMENT '模型id', - `model` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型', - `pinned` blob COMMENT '是否置顶', - `temperature` double DEFAULT NULL COMMENT '温度参数', - `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', - `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1781604279872581650 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_chat_conversation --- ---------------------------- -BEGIN; -INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581647, 1, NULL, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:20:06', '2024-05-07 16:20:06', 1, 1, b'1'); -INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581648, 1, 9, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:20:35', '2024-05-07 16:20:35', 1, 1, b'0'); -INSERT INTO `ai_chat_conversation` (`id`, `user_id`, `role_id`, `title`, `type`, `chat_count`, `model_id`, `model`, `pinned`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1781604279872581649, 1, NULL, '新增对话', NULL, NULL, 9, 'ERNIE-3.5-8K', 0x30, NULL, NULL, NULL, '2024-05-07 16:22:37', '2024-05-07 16:22:37', 1, 1, b'0'); -COMMIT; - --- ---------------------------- --- Table structure for ai_chat_message --- ---------------------------- -DROP TABLE IF EXISTS `ai_chat_message`; -CREATE TABLE `ai_chat_message` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `conversation_id` bigint DEFAULT NULL COMMENT '对话id', - `user_id` bigint DEFAULT NULL COMMENT '用户id', - `role_id` bigint DEFAULT NULL COMMENT '角色id', - `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '类型system、user、assistant\n', - `model` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型', - `model_id` bigint DEFAULT NULL COMMENT '模型id', - `content` varchar(2048) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '内容', - `tokens` int DEFAULT NULL COMMENT '消耗 Token 数量', - `temperature` double DEFAULT NULL COMMENT '用于调整生成回复的随机性和多样性程度', - `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', - `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_chat_message --- ---------------------------- -BEGIN; -INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (61, 1781604279872581649, 1, NULL, 'user', 'ERNIE-3.5-8K', 9, '苹果是什么颜色?', NULL, NULL, NULL, NULL, '2024-05-07 17:18:29', '2024-05-07 17:18:29', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (62, 1781604279872581649, 1, NULL, 'system', 'ERNIE-3.5-8K', 9, '苹果是一种水果,其颜色可以因品种和成熟度而异。常见的苹果颜色包括:\n\n1. 红色:许多苹果品种,如红富士、红元帅等,在成熟时会呈现出鲜艳的红色。\n2. 绿色:一些苹果品种,如青苹果、青香蕉等,在成熟时保持绿色或带有绿色条纹。\n3. 黄色:金苹果、黄元帅等品种在成熟时呈黄色。\n\n此外,还有一些苹果品种在成熟时会呈现出不同的颜色组合,如红绿相间、红黄相间等。因此,苹果的颜色并不是单一的,而是根据品种和成熟度而有所不同。', 8, NULL, NULL, NULL, '2024-05-07 17:18:38', '2024-05-07 17:18:38', NULL, NULL, b'0'); -INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (63, 1781604279872581649, 1, NULL, 'user', 'ERNIE-3.5-8K', 9, '中国好看吗?', NULL, NULL, NULL, NULL, '2024-05-07 17:18:53', '2024-05-07 17:18:53', 1, 1, b'0'); -INSERT INTO `ai_chat_message` (`id`, `conversation_id`, `user_id`, `role_id`, `type`, `model`, `model_id`, `content`, `tokens`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (64, 1781604279872581649, 1, NULL, 'system', 'ERNIE-3.5-8K', 9, '中国是一个拥有悠久历史、灿烂文化、广袤土地和多元民族的国家,自然景观和人文景观都非常丰富。从雄伟的长城、壮丽的黄山到神秘的西藏,从繁华的上海、历史悠久的北京到充满异域风情的云南,中国各地都有独特的魅力。\n\n此外,中国还拥有丰富多彩的非物质文化遗产,如京剧、川剧、皮影戏等传统艺术形式,以及中秋节、春节等传统节日。这些文化遗产反映了中国人民的智慧和创造力,也是中国文化的重要组成部分。\n\n因此,可以说中国非常美丽,值得人们去探索和发现它的魅力。无论是自然景观还是人文景观,中国都有着独特的魅力和吸引力。', 1, NULL, NULL, NULL, '2024-05-07 17:19:03', '2024-05-07 17:19:03', 1, 1, b'0'); -COMMIT; - --- ---------------------------- --- Table structure for ai_chat_model --- ---------------------------- -DROP TABLE IF EXISTS `ai_chat_model`; -CREATE TABLE `ai_chat_model` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `key_id` bigint DEFAULT NULL COMMENT 'API 秘钥编号', - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型名字\n', - `model` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型类型(自己定义qianwen、yiyan、xinghuo、openai)\n', - `platform` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '平台', - `sort` int DEFAULT NULL COMMENT '排序', - `status` tinyint DEFAULT NULL COMMENT '禁用 0、正常 1、禁用\n', - `temperature` double DEFAULT NULL COMMENT '温度参数', - `max_tokens` int DEFAULT NULL COMMENT '单条回复的最大 Token 数量', - `max_contexts` int DEFAULT NULL COMMENT '上下文的最大 Message 数量', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_chat_model --- ---------------------------- -BEGIN; -INSERT INTO `ai_chat_model` (`id`, `key_id`, `name`, `model`, `platform`, `sort`, `status`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (9, 1, '小红书Ai写作大模型3.5 8k', 'ERNIE-3.5-8K', 'yiyan', 100, 0, NULL, NULL, NULL, '2024-05-07 15:08:22', '2024-05-07 15:20:32', 1, 1, b'0'); -INSERT INTO `ai_chat_model` (`id`, `key_id`, `name`, `model`, `platform`, `sort`, `status`, `temperature`, `max_tokens`, `max_contexts`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (10, 1, '小红书Ai写作大模型4.0', 'ERNIE 4.0', 'yiyan', 100, 0, NULL, NULL, NULL, '2024-05-07 15:23:33', '2024-05-07 15:23:33', 1, 1, b'0'); -COMMIT; - --- ---------------------------- --- Table structure for ai_chat_role --- ---------------------------- -DROP TABLE IF EXISTS `ai_chat_role`; -CREATE TABLE `ai_chat_role` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `user_id` bigint DEFAULT NULL, - `model_id` bigint DEFAULT NULL COMMENT '模型编号', - `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色名,角色的显示名称\n', - `avatar` varchar(256) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '头像', - `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '分类,角色所属的类别,如娱乐、创作等\n', - `sort` int DEFAULT NULL COMMENT '排序', - `description` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色描述', - `welcome_message` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色欢迎语', - `system_message` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '角色设定(消息)', - `public_status` blob COMMENT '是否公开 true - 公开;false - 私有', - `status` tinyint DEFAULT NULL COMMENT '状态 0、开启 1、关闭', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_chat_role --- ---------------------------- -BEGIN; -INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `name`, `avatar`, `category`, `sort`, `description`, `welcome_message`, `system_message`, `public_status`, `status`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (8, 1, 9, '小红书写作v2', 'http://baidu.com', 'writing', 0, '采用gpt3.5模型,拥有小红书优质作者写作经验。', '欢迎使用小红书写作模型!', '你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。', 0x31, 0, '2024-05-07 15:30:30', '2024-05-07 15:35:54', 1, 1, b'1'); -INSERT INTO `ai_chat_role` (`id`, `user_id`, `model_id`, `name`, `avatar`, `category`, `sort`, `description`, `welcome_message`, `system_message`, `public_status`, `status`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (9, 1, 9, '小红书写作v1', 'http://baidu.com', 'writing', 0, '采用gpt3.5模型,拥有小红书优质作者写作经验。', '欢迎使用小红书写作模型!', '你是一名优秀的小红书人文、风光作者,你热爱旅游,每去往一个城市你都会用美妙的文字抒写着这座城市的大街小巷,描述着这座城市的美好。', 0x30, 0, '2024-05-07 15:36:40', '2024-05-07 15:36:40', 1, 1, b'0'); -COMMIT; - --- ---------------------------- --- Table structure for ai_image --- ---------------------------- -DROP TABLE IF EXISTS `ai_image`; -CREATE TABLE `ai_image` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `user_id` bigint DEFAULT NULL, - `prompt` varchar(2000) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '提示词\n', - `modal` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '模型\n', - `size` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。\n', - `drawing_status` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画状态:提交、排队、绘画中、绘画完成、绘画失败\n', - `drawing_image_url` varchar(512) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '绘画图片地址\n', - `drawing_error_message` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '错误信息', - `mj_message_id` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的消息编号(MJ返回)\n', - `mj_operation_id` varchar(128) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的操作编号(MJ返回)\n', - `mj_operation_name` varchar(32) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '用户操作的操作名字(MJ返回)\n', - `mj_operations` json DEFAULT NULL COMMENT 'mj图片生产成功保存的 components json 数组\n', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `creator` bigint DEFAULT NULL COMMENT '创建用户', - `updater` bigint DEFAULT NULL COMMENT '更新用户', - `deleted` bit(1) DEFAULT b'0' COMMENT '删除', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin; - --- ---------------------------- --- Records of ai_image --- ---------------------------- -BEGIN; -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (22, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'fail', NULL, 'You have reached the maximum allowed number of concurrent jobs. Don\'t worry, this job will start as soon as another one finishes!', NULL, NULL, NULL, NULL, '2024-05-08 17:26:01', '2024-05-08 17:26:04', 1, NULL, b'0'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (23, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'fail', NULL, 'Your job queue is full. Please wait for a job to finish first, then resubmit this one.', '1788144718477979648', NULL, NULL, NULL, '2024-05-08 17:51:38', '2024-05-08 17:51:39', 1, NULL, b'0'); -INSERT INTO `ai_image` (`id`, `user_id`, `prompt`, `modal`, `size`, `drawing_status`, `drawing_image_url`, `drawing_error_message`, `mj_message_id`, `mj_operation_id`, `mj_operation_name`, `mj_operations`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (24, 1, 'Cute cartoon style mobile game scene, a colorful camping car with an outdoor table and chairs next to it on the road in a spring forest, the simple structure of the camper van, soft lighting, C4D rendering, 3d model in the style of a cartoon, cute shape, a pastel color scheme, closeup view from the side angle, high resolution, bright colors, a happy atmosphere. --ar 1:2 --v 6.0', 'midjoureny', NULL, 'submit', NULL, NULL, '1788145293357699072', NULL, NULL, NULL, '2024-05-08 17:53:55', '2024-05-08 17:53:55', 1, 1, b'0'); -COMMIT; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml index 85f5fa63d3..bb0b18578e 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/pom.xml @@ -22,6 +22,11 @@ spring-ai-openai-spring-boot-starter 1.0.3
+ + io.springboot.ai + spring-ai-stability-ai + 1.0.3 + diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index 63b8834b87..d1fabd5f46 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -20,7 +20,8 @@ public enum AiPlatformEnum { QIAN_WEN("QianWen", "千问"), // 阿里 GEMIR ("gemir ", "gemir "), // 谷歌 - OPEN_AI_DALL("dall", "dall"), // TODO OpenAI 提供的绘图,接入中 + OPEN_AI_DALL("dall", "dall"), // TODO OpenAI 提供的绘图,接入中;TODO 要不要统一下?! + STABLE_DIFFUSION("StableDiffusion", "StableDiffusion"), // Stability AI MIDJOURNEY("midjourney", "midjourney"), // TODO MJ 提供的绘图,接入中 ; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java index ea2767fcd0..203f435cc4 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java @@ -13,6 +13,7 @@ import lombok.Getter; */ @AllArgsConstructor @Getter +@Deprecated public enum OpenAiImageModelEnum { DALL_E_2("dall-e-2", "dall-e-2"), diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java index 40cbdfc022..4476213914 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java @@ -13,6 +13,7 @@ import lombok.Getter; */ @AllArgsConstructor @Getter +@Deprecated public enum OpenAiImageStyleEnum { // 图像生成的风格。可为vivid(生动)或 natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java index 98707fdc84..cd46dee81d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.framework.ai.core.factory; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.image.ImageClient; /** * AI 客户端工厂的接口类 @@ -33,6 +34,16 @@ public interface AiClientFactory { */ StreamingChatClient getDefaultStreamingChatClient(AiPlatformEnum platform); + /** + * 基于默认配置,获得 ImageClient 对象 + * + * 默认配置,指的是在 application.yaml 配置文件中的 spring.ai 相关的配置 + * + * @param platform 平台 + * @return ImageClient 对象 + */ + ImageClient getDefaultImageClient(AiPlatformEnum platform); + /** * 创建 Chat 参数 * diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 99fef7436b..fa70af490f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -24,11 +24,13 @@ import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.prompt.ChatOptions; +import org.springframework.ai.image.ImageClient; import org.springframework.ai.ollama.OllamaChatClient; import org.springframework.ai.ollama.api.OllamaApi; import org.springframework.ai.ollama.api.OllamaOptions; import org.springframework.ai.openai.OpenAiChatClient; import org.springframework.ai.openai.OpenAiChatOptions; +import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; @@ -84,6 +86,16 @@ public class AiClientFactoryImpl implements AiClientFactory { } } + @Override + public ImageClient getDefaultImageClient(AiPlatformEnum platform) { + switch (platform) { + case OPEN_AI_DALL: + return SpringUtil.getBean(OpenAiImageClient.class); + + } + return null; + } + private static String buildClientCacheKey(Class clazz, Object... params) { if (ArrayUtil.isEmpty(params)) { return clazz.getName(); diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index f1b8f56f7d..f2f5ba44c7 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -144,19 +144,23 @@ spring: --- #################### AI 相关配置 #################### -spring.ai: - ollama: - base-url: http://127.0.0.1:11434 - chat: - model: llama3 - openai: - api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z - base-url: https://api.gptsapi.net - vertex: - ai: - gemini: - project-id: 1 # TODO 芋艿:缺配置 - location: 2 +spring: + ai: + ollama: + base-url: http://127.0.0.1:11434 + chat: + model: llama3 + openai: + api-key: sk-yzKea6d8e8212c3bdd99f9f44ced1cae37c097e5aa3BTS7z + base-url: https://api.gptsapi.net + stabilityai: + api-key: sk-e53UqbboF8QJCscYvzJscJxJXoFcFg4iJjl1oqgE7baJETmx + vertex: + ai: + gemini: + project-id: 1 # TODO 芋艿:缺配置 + location: 2 + yudao.ai: yiyan: @@ -202,7 +206,6 @@ yudao.ai: suno: enable: true token: 16b4356581984d538652354b60d69ff0 - --- #################### 芋道相关配置 #################### yudao: -- Gitee From 6856f5f192d4c726a67ef3b45c9e744a49c735ae Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Jun 2024 14:16:37 +0800 Subject: [PATCH 0670/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E8=BF=9B=E4=B8=80=E6=AD=A5=E7=BB=9F=E4=B8=80=20DALL?= =?UTF-8?q?=E3=80=81SD=20=E7=9A=84=E7=BB=98=E5=88=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/AiCommonConstants.java | 21 ----- .../yudao/module/ai/api/package-info.java | 4 + .../ai/enums/AiChatConversationTypeEnum.java | 37 -------- .../ai/enums/AiChatRoleCategoryEnum.java | 37 -------- .../ai/enums/AiImagePublicStatusEnum.java | 36 -------- .../ai/{ => enums}/ErrorCodeConstants.java | 2 +- .../enums/{ => image}/AiImageStatusEnum.java | 4 +- .../ai/enums/{ => model}/AiModelEnum.java | 2 +- .../admin/image/AiImageController.http} | 30 ++++-- .../admin/image/AiImageController.java | 17 ++-- .../admin/image/vo/AiImageDallReqVO.java | 41 --------- .../admin/image/vo/AiImageDrawReqVO.java | 52 +++++++++++ .../vo/AiImageMidjourneyOperateReqVO.java | 31 ------- .../admin/image/vo/AiImageRespVO.java | 59 ++++-------- .../dataobject/chat/AiChatConversationDO.java | 3 +- .../dal/dataobject/chat/AiChatMessageDO.java | 2 +- .../ai/dal/dataobject/image/AiImageDO.java | 92 +++++++++++-------- .../chat/AiChatConversationServiceImpl.java | 4 +- .../chat/AiChatMessageServiceImpl.java | 6 +- .../ai/service/image/AiImageService.java | 10 +- .../ai/service/image/AiImageServiceImpl.java | 73 ++++++--------- .../YuDaoMidjourneyMessageHandler.java | 5 +- .../vo/AiChatModalChatConfigVO.java | 35 ------- .../vo/AiChatModalConfigVO.java | 31 ------- .../vo/AiChatModalDallConfigVO.java | 41 --------- .../vo/AiChatModalMidjourneyConfigVO.java | 16 ---- .../ai/service/model/AiApiKeyServiceImpl.java | 2 +- .../service/model/AiChatModelServiceImpl.java | 2 +- .../service/model/AiChatRoleServiceImpl.java | 2 +- .../ai/config/YudaoAiProperties.java | 24 +---- .../ai/core/enums/AiPlatformEnum.java | 1 - .../ai/core/enums/OpenAiImageModelEnum.java | 37 -------- .../ai/core/enums/OpenAiImageStyleEnum.java | 38 -------- .../ai/core/factory/AiClientFactoryImpl.java | 10 +- 34 files changed, 220 insertions(+), 587 deletions(-) delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java create mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/api/package-info.java delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatConversationTypeEnum.java delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java delete mode 100644 yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/{ => enums}/ErrorCodeConstants.java (98%) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{ => image}/AiImageStatusEnum.java (90%) rename yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/{ => model}/AiModelEnum.java (98%) rename yudao-module-ai/yudao-module-ai-biz/src/main/{resources/http/image.http => java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.http} (52%) delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDrawReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java delete mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java delete mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java deleted file mode 100644 index 01b57733e0..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/AiCommonConstants.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.ai; - -/** - * ai 常用的常量 - * - * @author fansili - * @time 2024/5/7 09:29 - * @since 1.0 - */ -public class AiCommonConstants { - - /** - * 绘画 request - style - */ - public static final String DRAW_REQ_KEY_STYLE = "style"; - /** - * dall size - 模板(1024x1024) - */ - public static final String DALL_SIZE_TEMPLATE = "%sx%s"; - -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/api/package-info.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/api/package-info.java new file mode 100644 index 0000000000..4f94f23f8b --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/api/package-info.java @@ -0,0 +1,4 @@ +/** + * 占位,没有特别的作用 + */ +package cn.iocoder.yudao.module.ai.api; \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatConversationTypeEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatConversationTypeEnum.java deleted file mode 100644 index a91bed98d3..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatConversationTypeEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 对话类型 - * 创建对话、继续对话 - * - * @author fansili - * @time 2024/4/14 18:15 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatConversationTypeEnum { - - // roleChat、userChat - ROLE_CHAT("roleChat", "角色对话"), - USER_CHAT("userChat", "用户对话"), - - ; - - private String type; - - private String name; - - public static AiChatConversationTypeEnum valueOfType(String type) { - for (AiChatConversationTypeEnum itemEnum : AiChatConversationTypeEnum.values()) { - if (itemEnum.getType().equals(type)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + type); - } - -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java deleted file mode 100644 index 3ca923de97..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiChatRoleCategoryEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 聊天role 分类 - * - * @author fansili - * @time 2024/4/24 16:41 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiChatRoleCategoryEnum { - - WRITING("writing", "写作"), - - ENTERTAINMENT("entertainment", "娱乐"), - - ; - - - private String category; - - private String name; - - - public static AiChatRoleCategoryEnum valueOfCategory(String category) { - for (AiChatRoleCategoryEnum itemEnum : AiChatRoleCategoryEnum.values()) { - if (itemEnum.getCategory().equals(category)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + category); - } -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java deleted file mode 100644 index 3a7762bb7d..0000000000 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImagePublicStatusEnum.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.ai.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * ai绘画 public 状态 - * - * @author fansili - * @time 2024/4/28 17:05 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -public enum AiImagePublicStatusEnum { - - PRIVATE("private", "私有"), - PUBLIC("public", "公开"), - - ; - - // TODO @fan:final 一下 - private final String status; - - private final String name; - - - public static AiImagePublicStatusEnum valueOfStatus(String status) { - for (AiImagePublicStatusEnum itemEnum : AiImagePublicStatusEnum.values()) { - if (itemEnum.getStatus().equals(status)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + status); - } -} diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ErrorCodeConstants.java similarity index 98% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ErrorCodeConstants.java index f0833b71f5..be850e6e71 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/ErrorCodeConstants.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ErrorCodeConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai; +package cn.iocoder.yudao.module.ai.enums; import cn.iocoder.yudao.framework.common.exception.ErrorCode; diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/image/AiImageStatusEnum.java similarity index 90% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/image/AiImageStatusEnum.java index 39df7b1a8f..4fd942b391 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiImageStatusEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/image/AiImageStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.enums; +package cn.iocoder.yudao.module.ai.enums.image; import lombok.AllArgsConstructor; import lombok.Getter; @@ -13,7 +13,7 @@ import lombok.Getter; public enum AiImageStatusEnum { IN_PROGRESS("10", "进行中"), - COMPLETE("20", "完成"), + SUCCESS("20", "完成"), FAIL("30", "失败"); /** diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/model/AiModelEnum.java similarity index 98% rename from yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java rename to yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/model/AiModelEnum.java index 3d30d27cb4..12844959b3 100644 --- a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/AiModelEnum.java +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/model/AiModelEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.ai.enums; +package cn.iocoder.yudao.module.ai.enums.model; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.http similarity index 52% rename from yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http rename to yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.http index bf1165773d..4af24f792e 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/resources/http/image.http +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.http @@ -1,17 +1,33 @@ -### chat dallDrawing - -POST {{baseUrl}}/admin-api/ai/image/dallDrawing +### 生成图片:OpenAI(DALL) +POST {{baseUrl}}/ai/image/draw Content-Type: application/json Authorization: {{token}} { - "modal": "dall-e-3", - "size": "1024x1024", - "style": "vivid", - "prompt": "中国长城" + "platform": "OpenAI", + "prompt": "可爱的小喵星人", + "model": "dall-e-3", + "height": "1024", + "width": "1024", + "options": { + "style": "vivid" + } } +### 生成图片:StableDiffusion +POST {{baseUrl}}/ai/image/draw +Content-Type: application/json +Authorization: {{token}} + +{ + "platform": "StableDiffusion", + "prompt": "中国长城", + "model": "stable-diffusion-v1-6", + "height": "1024", + "width": "1024", + "style": "vivid" +} ### chat midjourney diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 15e4304e65..0f2116a0fa 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -6,7 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDrawReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageRespVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; @@ -48,13 +48,10 @@ public class AiImageController { return success(BeanUtils.toBean(image, AiImageRespVO.class)); } - // TODO @fan:建议把 dallDrawing、midjourney 融合成一个 draw 接口,异步绘制;然后返回一个 id 给前端;前端通过 get 接口轮询,直到获取到生成成功 - // TODO @芋艿: 参数差异较大 - // TODO @fan:直接参数平铺?写好注释,要么? - @Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!") - @PostMapping("/dall") - public CommonResult dall(@Validated @RequestBody AiImageDallReqVO req) { - return success(imageService.dall(getLoginUserId(), req)); + @Operation(summary = "生成图片") + @PostMapping("/draw") + public CommonResult drawImage(@Validated @RequestBody AiImageDrawReqVO drawReqVO) { + return success(imageService.drawImage(getLoginUserId(), drawReqVO)); } @Operation(summary = "删除【我的】绘画记录") @@ -73,11 +70,11 @@ public class AiImageController { return success(imageService.midjourneyImagine(getLoginUserId(), req)); } - // TODO @fan:可以考虑,复用 AiImageDallRespVO,统一成 AIImageRespVO + // TODO @芋艿:不拦截 @Operation(summary = "midjourney proxy - 回调通知") @RequestMapping("/midjourney-notify") public CommonResult midjourneyNotify(MidjourneyNotifyReqVO notifyReqVO) { return success(imageService.midjourneyNotify(getLoginUserId(), notifyReqVO)); } -} +} \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java deleted file mode 100644 index 1bfe489437..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDallReqVO.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.image.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; - -/** - * dall2/dall2 绘画 - * - * @author fansili - * @time 2024/4/25 16:24 - * @since 1.0 - */ -@Data -public class AiImageDallReqVO { - - @Schema(description = "模型平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private String platform; // 参见 AiPlatformEnum 枚举 - - @Schema(description = "提示词") - @NotNull(message = "提示词不能为空!") - @Size(max = 1200, message = "提示词最大1200") - private String prompt; - - @Schema(description = "模型(dall2、dall3)") - @NotNull(message = "模型不能为空") - private String model; - - @Schema(description = "图像生成的风格。可为vivid(生动)或natural(自然)") - private String style; - - @Schema(description = "图片高度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") - @NotNull(message = "图片高度不能为空!") - private Integer height; - - @Schema(description = "图片宽度。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。") - @NotNull(message = "图片宽度不能为空!") - private Integer width; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDrawReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDrawReqVO.java new file mode 100644 index 0000000000..1fd1323bff --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageDrawReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.ai.controller.admin.image.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; +import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.stabilityai.api.StabilityAiImageOptions; + +import java.util.Map; + +@Schema(description = "管理后台 - 绘画 Request VO") +@Data +public class AiImageDrawReqVO { + + @Schema(description = "模型平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") + private String platform; // 参见 AiPlatformEnum 枚举 + + @Schema(description = "提示词", requiredMode = Schema.RequiredMode.REQUIRED, example = "画一个长城") + @NotEmpty(message = "提示词不能为空") + @Size(max = 1200, message = "提示词最大 1200") + private String prompt; + + @Schema(description = "模型", requiredMode = Schema.RequiredMode.REQUIRED, example = "stable-diffusion-v1-6") + @NotEmpty(message = "模型不能为空") + private String model; + + /** + * 1. dall-e-2 模型:256x256、512x512、1024x1024 + * 2. dall-e-3 模型:1024x1024, 1792x1024, 或 1024x1792 + */ + @Schema(description = "图片高度") + @NotNull(message = "图片高度不能为空") + private Integer height; + + @Schema(description = "图片宽度") + @NotNull(message = "图片宽度不能为空") + private Integer width; + + // ========== 各平台绘画的拓展参数 ========== + + /** + * 绘制参数,不同 platform 的不同参数 + * + * 1. {@link OpenAiImageOptions} + * 2. {@link StabilityAiImageOptions} + */ + @Schema(description = "绘制参数") + private Map options; + +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java deleted file mode 100644 index 994c1c5f0b..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageMidjourneyOperateReqVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.ai.controller.admin.image.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * midjourney req - * - * @author fansili - * @time 2024/4/28 17:42 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiImageMidjourneyOperateReqVO { - - - @NotNull(message = "图片编号不能为空") - @Schema(description = "编号") - private Long id; - - @NotNull(message = "消息编号不能为空") - @Schema(description = "消息编号") - private String messageId; - - @NotNull(message = "操作编号不能为空") - @Schema(description = "操作编号") - private String operateId; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java index 4d12f7f4bf..92578ce0cc 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImageRespVO.java @@ -5,63 +5,44 @@ import lombok.Data; import java.util.Map; -// TODO @芋艿:完善 swagger 注解 +@Schema(description = "管理后台 - 绘画 Response VO") @Data public class AiImageRespVO { - @Schema(description = "id编号", example = "1") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long id; - @Schema(description = "用户id", example = "1") + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long userId; - @Schema(description = "提示词", example = "南极的小企鹅") - private String prompt; - - @Schema(description = "平台", example = "openai") - private String platform; + @Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") + private String platform; // 参见 AiPlatformEnum 枚举 - @Schema(description = "模型", example = "dall2") + @Schema(description = "模型", requiredMode = Schema.RequiredMode.REQUIRED, example = "stable-diffusion-v1-6") private String model; - @Schema(description = "图片宽度", example = "1024") - private String width; + @Schema(description = "提示词", requiredMode = Schema.RequiredMode.REQUIRED, example = "南极的小企鹅") + private String prompt; - @Schema(description = "图片高度", example = "1024") - private String height; + @Schema(description = "图片宽度", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private Integer width; - @Schema(description = "绘画状态:10 进行中、20 绘画完成、30 绘画失败", example = "10") - private String status; + @Schema(description = "图片高度", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + private Integer height; - @Schema(description = "是否发布", example = "public") - private String publicStatus; + @Schema(description = "绘画状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer status; - @Schema(description = "图片地址(自己服务器)", example = "http://") - private String picUrl; + @Schema(description = "是否发布", requiredMode = Schema.RequiredMode.REQUIRED, example = "public") + private Boolean publicStatus; - @Schema(description = "绘画图片地址(绘画好的服务器)", example = "http://") - private String originalPicUrl; + @Schema(description = "图片地址", example = "https://www.iocoder.cn/1.png") + private String picUrl; @Schema(description = "绘画错误信息", example = "图片错误信息") private String errorMessage; - // ============ 绘画请求参数 - - // todo @fan:下面的 style、mjNonceId 直接就不用注释啦,直接去看 DO 完事哈 - - /** - * - style - */ - @Schema(description = "绘画请求参数") - private Map drawRequest; - - /** - * - mjNonceId - * - mjOperationId - * - mjOperationName - * - mjOperations - */ - @Schema(description = "绘画请求响应参数") - private Map drawResponse; + @Schema(description = "绘制参数") + private Map options; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java index 8e582f621d..67cd490e57 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatConversationDO.java @@ -3,14 +3,13 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.chat; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import cn.iocoder.yudao.module.ai.enums.model.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import java.time.LocalDateTime; -import java.util.Date; /** * AI Chat 对话 DO diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java index 455a428a7a..61608b8cc3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/chat/AiChatMessageDO.java @@ -5,7 +5,7 @@ import org.springframework.ai.chat.messages.MessageType; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; -import cn.iocoder.yudao.module.ai.enums.AiModelEnum; +import cn.iocoder.yudao.module.ai.enums.model.AiModelEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index b21b2f8d84..b4fc6676a9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -1,13 +1,17 @@ package cn.iocoder.yudao.module.ai.dal.dataobject.image; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; +import cn.iocoder.yudao.module.ai.enums.image.AiImageStatusEnum; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import org.springframework.ai.openai.OpenAiImageOptions; +import org.springframework.ai.stabilityai.api.StabilityAiImageOptions; import java.util.Map; @@ -16,70 +20,86 @@ import java.util.Map; * * @author fansili */ -@TableName("ai_image") +@TableName(value = "ai_image", autoResultMap = true) @Data public class AiImageDO extends BaseDO { // TODO @fan:1)使用 java 注释哈,不要注解。2)关联、枚举字段,要关联到对应类,参考 AiChatMessageDO 的注释 + /** + * 编号 + */ @TableId(type = IdType.AUTO) private Long id; - @Schema(description = "用户编号") + /** + * 用户编号 + * + * 关联 {@link AdminUserRespDTO#getId()} + */ private Long userId; - @Schema(description = "midjourney proxy 关联的 job id") - private String jobId; - - @Schema(description = "提示词") + /** + * 提示词 + */ private String prompt; - @Schema(description = "平台") + /** + * 平台 + * + * 枚举 {@link cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum} + */ private String platform; - - @Schema(description = "模型") + /** + * 模型 + * + * 冗余 {@link AiChatModelDO#getModel()} + */ private String model; - @Schema(description = "图片宽度") + /** + * 图片宽度 + */ private Integer width; - - @Schema(description = "图片高度") + /** + * 图片高度 + */ private Integer height; // TODO @fan:这种就注释绘画状态,然后枚举类关联下就好啦 - @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") + /** + * 生成状态 + * + * 枚举 {@link AiImageStatusEnum} + */ private String status; - @Schema(description = "是否发布") - private String publicStatus; - - @Schema(description = "图片地址(自己服务器)") + /** + * 图片地址 + */ private String picUrl; - - // TODO @芋艿:可能要删除掉 - @Schema(description = "绘画图片地址(绘画好的服务器)") - private String originalPicUrl; - - // ============ 绘画请求参数 ============ - /** - * - style + * 是否公开 */ - @Schema(description = "绘画请求参数") - @TableField(typeHandler = JacksonTypeHandler.class) - private Map drawRequest; + private Boolean publicStatus; /** - * - mjNonceId - * - mjOperationId - * - mjOperationName - * - mjOperations + * 绘制参数,不同 platform 的不同参数 + * + * 1. {@link OpenAiImageOptions} + * 2. {@link StabilityAiImageOptions} */ - @Schema(description = "绘画请求响应参数") @TableField(typeHandler = JacksonTypeHandler.class) - private Map drawResponse; + private Map options; - @Schema(description = "绘画错误信息") + // TODO @芋艿:再瞅瞅 + /** + * midjourney proxy 关联的 job id + */ + private String jobId; + /** + * 绘画错误信息 + */ private String errorMessage; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 85349b7605..83dcd8dff7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -25,8 +25,8 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.CHAT_CONVERSATION_MODEL_ERROR; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; /** * AI 聊天对话 Service 实现类 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 93d8167cad..27dd154aef 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.ErrorCodeConstants; +import cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; @@ -39,8 +39,8 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.AI_CHAT_MESSAGE_NOT_EXIST; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.CHAT_CONVERSATION_NOT_EXISTS; /** * AI 聊天消息 Service 实现类 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 2442e79a9d..381a6ba170 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.ai.service.image; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDrawReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; @@ -32,12 +32,12 @@ public interface AiImageService { AiImageDO getImage(Long id); /** - * ai绘画 - dall2/dall3 绘画 + * 绘制图片 * - * @param loginUserId - * @param req + * @param userId 用户编号 + * @param drawReqVO 绘制请求 */ - Long dall(Long loginUserId, AiImageDallReqVO req); + Long drawImage(Long userId, AiImageDrawReqVO drawReqVO); /** * midjourney 图片生成 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index a9a084d650..b0c6750302 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -1,19 +1,16 @@ package cn.iocoder.yudao.module.ai.service.image; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.codec.Base64; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.AiCommonConstants; import cn.iocoder.yudao.module.ai.client.MidjourneyProxyClient; import cn.iocoder.yudao.module.ai.client.enums.MidjourneyModelEnum; import cn.iocoder.yudao.module.ai.client.enums.MidjourneySubmitCodeEnum; @@ -21,17 +18,18 @@ import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskStatusEnum; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyNotifyReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; -import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDallReqVO; +import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageDrawReqVO; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; -import cn.iocoder.yudao.module.ai.enums.AiImagePublicStatusEnum; -import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; +import cn.iocoder.yudao.module.ai.enums.image.AiImageStatusEnum; import cn.iocoder.yudao.module.infra.api.file.FileApi; -import com.google.common.collect.ImmutableMap; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import org.springframework.ai.image.*; +import org.springframework.ai.image.ImageClient; +import org.springframework.ai.image.ImageOptions; +import org.springframework.ai.image.ImagePrompt; +import org.springframework.ai.image.ImageResponse; import org.springframework.ai.openai.OpenAiImageOptions; import org.springframework.ai.stabilityai.api.StabilityAiImageOptions; import org.springframework.beans.factory.annotation.Autowired; @@ -41,7 +39,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.AI_IMAGE_NOT_EXISTS; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.AI_IMAGE_NOT_EXISTS; /** * AI 绘画 Service 实现类 @@ -78,22 +76,18 @@ public class AiImageServiceImpl implements AiImageService { } @Override - public Long dall(Long userId, AiImageDallReqVO req) { - req.setPlatform("dall"); // TODO 芋艿:临时写死 + public Long drawImage(Long userId, AiImageDrawReqVO drawReqVO) { // 1. 保存数据库 - AiImageDO image = BeanUtils.toBean(req, AiImageDO.class) - .setUserId(userId).setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()) - .setWidth(req.getWidth()).setHeight(req.getHeight()) - .setDrawRequest(ImmutableMap.of(AiCommonConstants.DRAW_REQ_KEY_STYLE, req.getStyle())) - .setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()); + AiImageDO image = BeanUtils.toBean(drawReqVO, AiImageDO.class).setUserId(userId).setPublicStatus(false) + .setWidth(drawReqVO.getWidth()).setHeight(drawReqVO.getHeight()).setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); imageMapper.insert(image); - // 2. 异步绘制,后续前端通过返回的 id 进行伦旭 - getSelf().doDall(image, req); + // 2. 异步绘制,后续前端通过返回的 id 进行轮询结果 + getSelf().doDall(image, drawReqVO); return image.getId(); } @Async - public void doDall(AiImageDO image, AiImageDallReqVO req) { + public void doDall(AiImageDO image, AiImageDrawReqVO req) { try { // 1.1 构建请求 ImageOptions request = buildImageOptions(req); @@ -106,7 +100,7 @@ public class AiImageServiceImpl implements AiImageService { String filePath = fileApi.createFile(fileContent); // 3. 更新数据库 - imageMapper.updateById(new AiImageDO().setId(image.getId()).setStatus(AiImageStatusEnum.COMPLETE.getStatus()) + imageMapper.updateById(new AiImageDO().setId(image.getId()).setStatus(AiImageStatusEnum.SUCCESS.getStatus()) .setPicUrl(filePath)); } catch (Exception ex) { log.error("[doDall][image({}) 生成异常]", image, ex); @@ -115,30 +109,28 @@ public class AiImageServiceImpl implements AiImageService { } } - private static ImageOptions buildImageOptions(AiImageDallReqVO draw) { - if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.OPEN_AI_DALL.getPlatform())) { - OpenAiImageOptions request = new OpenAiImageOptions(); - request.setModel(OpenAiImageModelEnum.valueOfModel(draw.getModel()).getModel()); - request.setStyle(OpenAiImageStyleEnum.valueOfStyle(draw.getStyle()).getStyle()); - request.setSize(String.format(AiCommonConstants.DALL_SIZE_TEMPLATE, draw.getWidth(), draw.getHeight())); - request.setResponseFormat("b64_json"); - return request; - } else { - // https://platform.stability.ai/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1sd3/post - return StabilityAiImageOptions.builder().withModel(draw.getModel()) + private static ImageOptions buildImageOptions(AiImageDrawReqVO draw) { + if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.OPENAI.getPlatform())) { + // https://platform.openai.com/docs/api-reference/images/create + return OpenAiImageOptions.builder().withModel(draw.getModel()) .withHeight(draw.getHeight()).withWidth(draw.getWidth()) + .withStyle(MapUtil.getStr(draw.getOptions(), "style")) // 风格 + .withResponseFormat("b64_json") + .build(); + } else if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.STABLE_DIFFUSION.getPlatform())) { + // https://platform.stability.ai/docs/api-reference#tag/Text-to-Image/operation/textToImage + return StabilityAiImageOptions.builder().withModel(draw.getModel()) + .withHeight(draw.getHeight()).withWidth(draw.getWidth()) // TODO @芋艿:各种参数 .build(); } -// return null; + throw new IllegalArgumentException("不支持的 AI 平台:" + draw.getPlatform()); } @Override @Transactional(rollbackFor = Exception.class) public Long midjourneyImagine(Long loginUserId, AiImageMidjourneyImagineReqVO req) { - // 1、构建 AiImageDO AiImageDO aiImageDO = new AiImageDO(); - aiImageDO.setId(null); aiImageDO.setUserId(loginUserId); aiImageDO.setPrompt(req.getPrompt()); aiImageDO.setPlatform(AiPlatformEnum.MIDJOURNEY.getPlatform()); @@ -147,12 +139,6 @@ public class AiImageServiceImpl implements AiImageService { aiImageDO.setWidth(null); aiImageDO.setHeight(null); aiImageDO.setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); - aiImageDO.setPublicStatus(AiImagePublicStatusEnum.PRIVATE.getStatus()); - aiImageDO.setPicUrl(null); - aiImageDO.setOriginalPicUrl(null); - aiImageDO.setDrawRequest(null); - aiImageDO.setDrawResponse(null); - aiImageDO.setErrorMessage(null); // 2、保存 image imageMapper.insert(aiImageDO); @@ -211,7 +197,7 @@ public class AiImageServiceImpl implements AiImageService { // String imageStatus = null; if (MidjourneyTaskStatusEnum.SUCCESS == notifyReqVO.getStatus()) { - imageStatus = AiImageStatusEnum.COMPLETE.getStatus(); + imageStatus = AiImageStatusEnum.SUCCESS.getStatus(); } else if (MidjourneyTaskStatusEnum.FAILURE == notifyReqVO.getStatus()) { imageStatus = AiImageStatusEnum.FAIL.getStatus(); } @@ -226,8 +212,7 @@ public class AiImageServiceImpl implements AiImageService { .setId(image.getId()) .setStatus(imageStatus) .setPicUrl(filePath) - .setOriginalPicUrl(notifyReqVO.getImageUrl()) - .setDrawResponse(BeanUtil.beanToMap(notifyReqVO)) +// .setOriginalPicUrl(notifyReqVO.getImageUrl()) TODO @fan:就不存原始的图片地址啦 ); return true; } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java index 0568bbec66..493d0cded7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/YuDaoMidjourneyMessageHandler.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyOperationsVO; import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; -import cn.iocoder.yudao.module.ai.enums.AiImageStatusEnum; +import cn.iocoder.yudao.module.ai.enums.image.AiImageStatusEnum; import com.alibaba.fastjson.JSON; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -89,7 +89,7 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { AiImageStatusEnum drawingStatusEnum = null; String generateStatus = midjourneyMessage.getGenerateStatus(); if (MidjourneyGennerateStatusEnum.COMPLETED.getStatus().equals(generateStatus)) { - drawingStatusEnum = AiImageStatusEnum.COMPLETE; + drawingStatusEnum = AiImageStatusEnum.SUCCESS; } else if (MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus().equals(generateStatus)) { drawingStatusEnum = AiImageStatusEnum.IN_PROGRESS; } @@ -101,7 +101,6 @@ public class YuDaoMidjourneyMessageHandler implements MidjourneyMessageHandler { // 更新数据库 aiImageMapper.updateByMjNonce(nonceId, new AiImageDO() - .setOriginalPicUrl(imageUrl) .setStatus(drawingStatusEnum == null ? null : drawingStatusEnum.getStatus()) // .setMjNonceId(midjourneyMessage.getId()) // .setMjOperations(JsonUtils.toJsonString(midjourneyOperations)) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java deleted file mode 100644 index c3d2b77cca..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalChatConfigVO.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * chat config - * - * @author fansili - * @time 2024/5/6 15:06 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalChatConfigVO extends AiChatModalConfigVO { - - @NotNull - @Schema(description = "在生成消息时采用的Top-K采样大小") - private Double topK; - - @NotNull - @Schema(description = "Top-P核采样方法的概率阈值") - private Double topP; - - @NotNull - @Schema(description = "温度参数,用于调整生成回复的随机性和多样性程度") - private Double temperature; - - @NotNull - @Schema(description = "最大 tokens") - private Integer maxTokens; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java deleted file mode 100644 index 426641a0d3..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalConfigVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; - -import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import lombok.Data; -import lombok.experimental.Accessors; -import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; - -/** - * modal config - * - * @author fansili - * @time 2024/5/6 15:06 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalConfigVO { - - /** - * 模型平台 (冗余,方便类型转换) - * 参考:{@link AiPlatformEnum} - */ - private String platform; - /** - * 模型类型(冗余,方便类型转换) - * {@link YiYanChatModel} - * {@link XingHuoChatModel} - */ - private String type; -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java deleted file mode 100644 index f07b446477..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalDallConfigVO.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; - -import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * dall - * - * @author fansili - * @time 2024/5/6 15:06 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalDallConfigVO extends AiChatModalConfigVO { - // 可选字段,默认为1 - // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 - private Integer n = 1; - - // 可选字段,默认为standard - // 设置生成图像的质量。hd质量将创建细节更丰富、图像整体一致性更高的图片。该参数仅对dall-e-3模型有效。 - private String quality = "standard"; - - // 可选字段,默认为url - // 返回生成图像的格式。必须是url或b64_json中的一种。URL链接的有效期是从生成图像后开始计算的60分钟内有效。 - private String responseFormat = "url"; - - // 可选字段,默认为1024x1024 - // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 - private String size = "1024x1024"; - - // 可选字段,默认为vivid - // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 - private OpenAiImageStyleEnum style = OpenAiImageStyleEnum.VIVID; - - // 可选字段 - // 代表您的终端用户的唯一标识符,有助于OpenAI监控并检测滥用行为。了解更多信息请参考官方文档。 - private String endUserId = "UID123456"; - -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java deleted file mode 100644 index 6c91ca6527..0000000000 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/midjourneyHandler/vo/AiChatModalMidjourneyConfigVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.ai.service.image.midjourneyHandler.vo; - -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * Midjourney Config - * - * @author fansili - * @time 2024/5/6 15:07 - * @since 1.0 - */ -@Data -@Accessors(chain = true) -public class AiChatModalMidjourneyConfigVO extends AiChatModalConfigVO { -} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java index e4db8125ba..41cce28f89 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -17,7 +17,7 @@ import org.springframework.validation.annotation.Validated; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.*; /** * AI API 密钥 Service 实现类 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java index 31d048c707..4b11602f54 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatModelServiceImpl.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.*; /** * AI 聊天模型 Service 实现类 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java index faee09d06c..4f358e473b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java @@ -21,7 +21,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -import static cn.iocoder.yudao.module.ai.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.*; /** * AI 聊天角色 Service 实现类 diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java index e0cfa05f93..e56a23996a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java @@ -3,10 +3,9 @@ package cn.iocoder.yudao.framework.ai.config; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanChatModel; -import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageModelEnum; -import cn.iocoder.yudao.framework.ai.core.enums.OpenAiImageStyleEnum; import lombok.Data; import lombok.experimental.Accessors; +import org.springframework.ai.autoconfigure.openai.OpenAiImageProperties; import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -92,27 +91,6 @@ public class YudaoAiProperties { private int refreshTokenSecondTime = 86400; } - @Data - @Accessors(chain = true) - public static class OpenAiImageProperties { - - private boolean enable = false; - - /** - * api key - */ - private String apiKey; - /** - * 模型 - */ - private OpenAiImageModelEnum model = OpenAiImageModelEnum.DALL_E_2; - /** - * 风格 - */ - private OpenAiImageStyleEnum style = OpenAiImageStyleEnum.VIVID; - - } - @Data @Accessors(chain = true) public static class MidjourneyProperties { diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index d1fabd5f46..d6513354e7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -20,7 +20,6 @@ public enum AiPlatformEnum { QIAN_WEN("QianWen", "千问"), // 阿里 GEMIR ("gemir ", "gemir "), // 谷歌 - OPEN_AI_DALL("dall", "dall"), // TODO OpenAI 提供的绘图,接入中;TODO 要不要统一下?! STABLE_DIFFUSION("StableDiffusion", "StableDiffusion"), // Stability AI MIDJOURNEY("midjourney", "midjourney"), // TODO MJ 提供的绘图,接入中 ; diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java deleted file mode 100644 index 203f435cc4..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageModelEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.iocoder.yudao.framework.ai.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -// TODO 芋艿:待梳理 -/** - * open ai - * - * @author fansili - * @time 2024/4/28 14:21 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -@Deprecated -public enum OpenAiImageModelEnum { - - DALL_E_2("dall-e-2", "dall-e-2"), - - DALL_E_3("dall-e-3", "dall-e-3") - - ; - - private String model; - - private String name; - - public static OpenAiImageModelEnum valueOfModel(String model) { - for (OpenAiImageModelEnum itemEnum : OpenAiImageModelEnum.values()) { - if (itemEnum.getModel().equals(model)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + model); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java deleted file mode 100644 index 4476213914..0000000000 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/OpenAiImageStyleEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.iocoder.yudao.framework.ai.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -// TODO 芋艿:待梳理 -/** - * open ai image style - * - * @author fansili - * @time 2024/4/28 16:15 - * @since 1.0 - */ -@AllArgsConstructor -@Getter -@Deprecated -public enum OpenAiImageStyleEnum { - - // 图像生成的风格。可为vivid(生动)或 natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 - - VIVID("vivid", "生动"), - NATURAL("natural", "自然"), - - ; - - private String style; - - private String name; - - public static OpenAiImageStyleEnum valueOfStyle(String style) { - for (OpenAiImageStyleEnum itemEnum : OpenAiImageStyleEnum.values()) { - if (itemEnum.getStyle().equals(style)) { - return itemEnum; - } - } - throw new IllegalArgumentException("Invalid MessageType value: " + style); - } -} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index fa70af490f..5c8248789f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -33,6 +33,7 @@ import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; +import org.springframework.ai.stabilityai.StabilityAiImageClient; import java.util.List; @@ -88,12 +89,15 @@ public class AiClientFactoryImpl implements AiClientFactory { @Override public ImageClient getDefaultImageClient(AiPlatformEnum platform) { + //noinspection EnhancedSwitchMigration switch (platform) { - case OPEN_AI_DALL: + case OPENAI: return SpringUtil.getBean(OpenAiImageClient.class); - + case STABLE_DIFFUSION: + return SpringUtil.getBean(StabilityAiImageClient.class); + default: + throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } - return null; } private static String buildClientCacheKey(Class clazz, Object... params) { -- Gitee From b7180d34818c7a7ff988c6c9fc74a25a1e20ebee Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Jun 2024 15:15:30 +0800 Subject: [PATCH 0671/1557] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E4=BC=9A=E8=AF=9D=E6=8E=A5=E5=85=A5=20API=20KEY=20?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/mysql/model/AiApiKeyMapper.java | 9 +++ .../chat/AiChatMessageServiceImpl.java | 40 +++++++++++--- .../ai/service/image/AiImageService.java | 1 + .../ai/service/image/AiImageServiceImpl.java | 10 ++-- .../ai/service/model/AiApiKeyService.java | 12 ++++ .../ai/service/model/AiApiKeyServiceImpl.java | 10 ++++ .../ai/core/factory/AiClientFactory.java | 14 ++--- .../ai/core/factory/AiClientFactoryImpl.java | 55 +++++++++---------- .../src/main/resources/application.yaml | 7 +-- 9 files changed, 104 insertions(+), 54 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java index fef4965b8c..0a2efe36f8 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/model/AiApiKeyMapper.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.ai.dal.mysql.model; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import org.apache.ibatis.annotations.Mapper; @@ -23,4 +24,12 @@ public interface AiApiKeyMapper extends BaseMapperX { .orderByDesc(AiApiKeyDO::getId)); } + default AiApiKeyDO selectFirstByPlatformAndStatus(String platform, Integer status) { + return selectOne(new QueryWrapperX() + .eq("platform", platform) + .eq("status", status) + .limitN(1) + .orderByAsc("id")); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java index 27dd154aef..566859abf2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java @@ -4,11 +4,13 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; +import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; +import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; +import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessagePageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageRespVO; import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.message.AiChatMessageSendReqVO; @@ -18,6 +20,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatModelDO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; import cn.iocoder.yudao.module.ai.dal.mysql.chat.AiChatMessageMapper; +import cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import cn.iocoder.yudao.module.ai.service.model.AiChatModelService; import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; @@ -28,6 +31,8 @@ import org.springframework.ai.chat.StreamingChatClient; import org.springframework.ai.chat.messages.*; import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.ollama.api.OllamaOptions; +import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import reactor.core.publisher.Flux; @@ -54,9 +59,6 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { @Resource private AiChatMessageMapper chatMessageMapper; - @Resource - private AiClientFactory clientFactory; - @Resource private AiChatConversationService chatConversationService; @Resource @@ -168,11 +170,33 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { // 2. 构建 ChatOptions 对象 AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform()); - ChatOptions chatOptions = clientFactory.buildChatOptions(platform, model.getModel(), + ChatOptions chatOptions = buildChatOptions(platform, model.getModel(), conversation.getTemperature(), conversation.getMaxTokens()); return new Prompt(chatMessages, chatOptions); } + private static ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens) { + Float temperatureF = temperature != null ? temperature.floatValue() : null; + //noinspection EnhancedSwitchMigration + switch (platform) { + case OPENAI: + return OpenAiChatOptions.builder().withModel(model).withTemperature(temperatureF).withMaxTokens(maxTokens).build(); + case OLLAMA: + return OllamaOptions.create().withModel(model).withTemperature(temperatureF).withNumPredict(maxTokens); + case YI_YAN: + // TODO @fan:增加一个 model + return new YiYanChatOptions().setTemperature(temperatureF).setMaxOutputTokens(maxTokens); + case XING_HUO: + return new XingHuoOptions().setChatModel(XingHuoChatModel.valueOfModel(model)).setTemperature(temperatureF) + .setMaxTokens(maxTokens); + case QIAN_WEN: + // TODO @fan:增加 model、temperature 参数 + return new QianWenOptions().setMaxTokens(maxTokens); + default: + throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); + } + } + /** * 从历史消息中,获得倒序的 n 组消息作为消息上下文 * @@ -183,7 +207,9 @@ public class AiChatMessageServiceImpl implements AiChatMessageService { * @param sendReqVO 发送请求 * @return 消息上下文 */ - private List filterContextMessages(List messages, AiChatConversationDO conversation, AiChatMessageSendReqVO sendReqVO) { + private List filterContextMessages(List messages, + AiChatConversationDO conversation, + AiChatMessageSendReqVO sendReqVO) { if (conversation.getMaxContexts() == null || ObjUtil.notEqual(sendReqVO.getUseContext(), Boolean.TRUE)) { return Collections.emptyList(); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java index 381a6ba170..8a30121be2 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageService.java @@ -64,4 +64,5 @@ public interface AiImageService { * @return */ Boolean midjourneyNotify(Long loginUserId, MidjourneyNotifyReqVO notifyReqVO); + } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index b0c6750302..ea52dd42b1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -7,7 +7,6 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; -import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; @@ -23,6 +22,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.image.vo.AiImageMidjourneyIma import cn.iocoder.yudao.module.ai.dal.dataobject.image.AiImageDO; import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper; import cn.iocoder.yudao.module.ai.enums.image.AiImageStatusEnum; +import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService; import cn.iocoder.yudao.module.infra.api.file.FileApi; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; @@ -57,7 +57,7 @@ public class AiImageServiceImpl implements AiImageService { private FileApi fileApi; @Resource - private AiClientFactory aiClientFactory; + private AiApiKeyService apiKeyService; @Autowired private MidjourneyProxyClient midjourneyProxyClient; @@ -82,17 +82,17 @@ public class AiImageServiceImpl implements AiImageService { .setWidth(drawReqVO.getWidth()).setHeight(drawReqVO.getHeight()).setStatus(AiImageStatusEnum.IN_PROGRESS.getStatus()); imageMapper.insert(image); // 2. 异步绘制,后续前端通过返回的 id 进行轮询结果 - getSelf().doDall(image, drawReqVO); + getSelf().executeDrawImage(image, drawReqVO); return image.getId(); } @Async - public void doDall(AiImageDO image, AiImageDrawReqVO req) { + public void executeDrawImage(AiImageDO image, AiImageDrawReqVO req) { try { // 1.1 构建请求 ImageOptions request = buildImageOptions(req); // 1.2 执行请求 - ImageClient imageClient = aiClientFactory.getDefaultImageClient(AiPlatformEnum.validatePlatform(req.getPlatform())); + ImageClient imageClient = apiKeyService.getImageClient(AiPlatformEnum.validatePlatform(req.getPlatform())); ImageResponse response = imageClient.call(new ImagePrompt(req.getPrompt(), request)); // 2. 上传到文件服务 diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java index 8056eab780..20cda18af4 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyService.java @@ -1,11 +1,13 @@ package cn.iocoder.yudao.module.ai.service.model; +import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeyPageReqVO; import cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey.AiApiKeySaveReqVO; import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import jakarta.validation.Valid; import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.image.ImageClient; import java.util.List; @@ -79,4 +81,14 @@ public interface AiApiKeyService { */ StreamingChatClient getStreamingChatClient(Long id); + /** + * 获得 ImageClient 对象 + * + * TODO 可优化点:目前默认获取 platform 对应的第一个开启的配置用于绘画;后续可以支持配置选择 + * + * @param platform 平台 + * @return ImageClient 对象 + */ + ImageClient getImageClient(AiPlatformEnum platform); + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java index 41cce28f89..14ea6d43e1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiApiKeyServiceImpl.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiApiKeyDO; import cn.iocoder.yudao.module.ai.dal.mysql.model.AiApiKeyMapper; import jakarta.annotation.Resource; import org.springframework.ai.chat.StreamingChatClient; +import org.springframework.ai.image.ImageClient; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -101,4 +102,13 @@ public class AiApiKeyServiceImpl implements AiApiKeyService { return clientFactory.getOrCreateStreamingChatClient(platform, apiKey.getApiKey(), apiKey.getUrl()); } + @Override + public ImageClient getImageClient(AiPlatformEnum platform) { + AiApiKeyDO apiKey = apiKeyMapper.selectFirstByPlatformAndStatus(platform.getName(), CommonStatusEnum.ENABLE.getStatus()); + if (apiKey == null) { + return null; + } + return clientFactory.getOrCreateImageClient(platform, apiKey.getApiKey(), apiKey.getUrl()); + } + } \ No newline at end of file diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java index cd46dee81d..ab7e7f9962 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactory.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.framework.ai.core.factory; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.image.ImageClient; /** @@ -45,14 +44,15 @@ public interface AiClientFactory { ImageClient getDefaultImageClient(AiPlatformEnum platform); /** - * 创建 Chat 参数 + * 基于指定配置,获得 ImageClient 对象 + * + * 如果不存在,则进行创建 * * @param platform 平台 - * @param model 模型 - * @param temperature 温度 - * @param maxTokens 生成的最大 Token - * @return Chat 参数 + * @param apiKey API KEY + * @param url API URL + * @return ImageClient 对象 */ - ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens); + ImageClient getOrCreateImageClient(AiPlatformEnum platform, String apiKey, String url); } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java index 5c8248789f..b54b348b15 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/factory/AiClientFactoryImpl.java @@ -11,29 +11,25 @@ import cn.iocoder.yudao.framework.ai.config.YudaoAiProperties; import cn.iocoder.yudao.framework.ai.core.enums.AiPlatformEnum; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; -import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; import cn.iocoder.yudao.framework.ai.core.model.tongyi.api.QianWenApi; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatClient; -import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoChatModel; -import cn.iocoder.yudao.framework.ai.core.model.xinghuo.XingHuoOptions; import cn.iocoder.yudao.framework.ai.core.model.xinghuo.api.XingHuoApi; import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatClient; -import cn.iocoder.yudao.framework.ai.core.model.yiyan.YiYanChatOptions; import cn.iocoder.yudao.framework.ai.core.model.yiyan.api.YiYanApi; import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration; import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration; import org.springframework.ai.chat.StreamingChatClient; -import org.springframework.ai.chat.prompt.ChatOptions; import org.springframework.ai.image.ImageClient; import org.springframework.ai.ollama.OllamaChatClient; import org.springframework.ai.ollama.api.OllamaApi; -import org.springframework.ai.ollama.api.OllamaOptions; import org.springframework.ai.openai.OpenAiChatClient; -import org.springframework.ai.openai.OpenAiChatOptions; import org.springframework.ai.openai.OpenAiImageClient; import org.springframework.ai.openai.api.ApiUtils; import org.springframework.ai.openai.api.OpenAiApi; +import org.springframework.ai.openai.api.OpenAiImageApi; import org.springframework.ai.stabilityai.StabilityAiImageClient; +import org.springframework.ai.stabilityai.api.StabilityAiApi; +import org.springframework.web.client.RestClient; import java.util.List; @@ -100,36 +96,26 @@ public class AiClientFactoryImpl implements AiClientFactory { } } - private static String buildClientCacheKey(Class clazz, Object... params) { - if (ArrayUtil.isEmpty(params)) { - return clazz.getName(); - } - return StrUtil.format("{}#{}", clazz.getName(), ArrayUtil.join(params, "_")); - } - @Override - public ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens) { - Float temperatureF = temperature != null ? temperature.floatValue() : null; + public ImageClient getOrCreateImageClient(AiPlatformEnum platform, String apiKey, String url) { //noinspection EnhancedSwitchMigration switch (platform) { case OPENAI: - return OpenAiChatOptions.builder().withModel(model).withTemperature(temperatureF).withMaxTokens(maxTokens).build(); - case OLLAMA: - return OllamaOptions.create().withModel(model).withTemperature(temperatureF).withNumPredict(maxTokens); - case YI_YAN: - // TODO @fan:增加一个 model - return new YiYanChatOptions().setTemperature(temperatureF).setMaxOutputTokens(maxTokens); - case XING_HUO: - return new XingHuoOptions().setChatModel(XingHuoChatModel.valueOfModel(model)).setTemperature(temperatureF) - .setMaxTokens(maxTokens); - case QIAN_WEN: - // TODO @fan:增加 model、temperature 参数 - return new QianWenOptions().setMaxTokens(maxTokens); + return buildOpenAiImageClient(apiKey, url); + case STABLE_DIFFUSION: + return buildStabilityAiImageClient(apiKey, url); default: throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); } } + private static String buildClientCacheKey(Class clazz, Object... params) { + if (ArrayUtil.isEmpty(params)) { + return clazz.getName(); + } + return StrUtil.format("{}#{}", clazz.getName(), ArrayUtil.join(params, "_")); + } + // ========== 各种创建 spring-ai 客户端的方法 ========== /** @@ -182,7 +168,6 @@ public class AiClientFactoryImpl implements AiClientFactory { return new QianWenChatClient(qianWenApi); } - // private static VertexAiGeminiChatClient buildGoogleGemir(String key) { // List keys = StrUtil.split(key, '|'); // Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式"); @@ -190,4 +175,16 @@ public class AiClientFactoryImpl implements AiClientFactory { // return new VertexAiGeminiChatClient(vertexApi); // } + private ImageClient buildOpenAiImageClient(String openAiToken, String url) { + url = StrUtil.blankToDefault(url, ApiUtils.DEFAULT_BASE_URL); + OpenAiImageApi openAiApi = new OpenAiImageApi(url, openAiToken, RestClient.builder()); + return new OpenAiImageClient(openAiApi); + } + + private ImageClient buildStabilityAiImageClient(String apiKey, String url) { + url = StrUtil.blankToDefault(url, StabilityAiApi.DEFAULT_BASE_URL); + StabilityAiApi stabilityAiApi = new StabilityAiApi(apiKey, StabilityAiApi.DEFAULT_IMAGE_MODEL, url); + return new StabilityAiImageClient(stabilityAiApi); + } + } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index f2f5ba44c7..0289298f00 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -161,7 +161,6 @@ spring: project-id: 1 # TODO 芋艿:缺配置 location: 2 - yudao.ai: yiyan: enable: true @@ -193,11 +192,6 @@ yudao.ai: topP: 0.8 topK: 0 api-key: sk-Zsd81gZYg7 - openAiImage: - enable: true - api-key: ${OPEN_AI_KEY} - model: dall_e_2 - style: vivid midjourney: enable: true token: MTE4MjE3MjY2MjkxNTY3ODIzOA.GEV1SG.c49F8lZoGCUHwsj8O0UdodmM6nyQHvuD2fXflw @@ -206,6 +200,7 @@ yudao.ai: suno: enable: true token: 16b4356581984d538652354b60d69ff0 + --- #################### 芋道相关配置 #################### yudao: -- Gitee From d9a2849ccec0613bf55365be1048b11cd55518c1 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 2 Jun 2024 18:11:10 +0800 Subject: [PATCH 0672/1557] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20code=20review=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82=E6=96=B0=E5=A2=9E=E5=B9=B6=E8=A1=8C=E5=88=86?= =?UTF-8?q?=E6=94=AF=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/BpmSimpleModelNodeType.java | 8 ++- .../flowable/core/util/SimpleModelUtils.java | 68 +++++++++++++------ 2 files changed, 51 insertions(+), 25 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java index 0f59baf5b7..85067269c1 100644 --- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java +++ b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeType.java @@ -25,12 +25,14 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { APPROVE_NODE(1, "审批人节点"), // TODO @jaosn:是不是这里从 10 开始好点;相当于说,0-9 给开始和结束;10-19 给各种节点;20-29 给各种条件; TODO 后面改改 COPY_NODE(2, "抄送人节点"), + CONDITION_NODE(3, "条件节点"), // 用于构建流转条件的表达式 CONDITION_BRANCH_NODE(4, "条件分支节点"), // TODO @jason:是不是改成叫 条件分支? - PARALLEL_BRANCH_FORK_NODE(5, "并行分支分叉节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? 后面是否去掉并行网关。只用包容网关 - PARALLEL_BRANCH_JOIN_NODE(6, "并行分支聚合节点"), + PARALLEL_BRANCH_NODE(5, "并行分支节点"), // TODO @jason:是不是一个 并行分支 ?就可以啦? 后面是否去掉并行网关。只用包容网关 +// PARALLEL_BRANCH_JOIN_NODE(6, "并行分支聚合节点"), INCLUSIVE_BRANCH_FORK_NODE(7, "包容网关分叉节点"), INCLUSIVE_BRANCH_JOIN_NODE(8, "包容网关聚合节点"), // TODO @jason:建议整合 join,最终只有 条件分支、并行分支、包容分支,三种~ + // TODO @芋艿。 感觉还是分开好理解一点,也好处理一点。前端结构中把聚合节点显示并传过来。 ; public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray(); @@ -45,7 +47,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable { */ public static boolean isBranchNode(Integer type) { return Objects.equals(CONDITION_BRANCH_NODE.getType(), type) - || Objects.equals(PARALLEL_BRANCH_FORK_NODE.getType(), type) + || Objects.equals(PARALLEL_BRANCH_NODE.getType(), type) || Objects.equals(INCLUSIVE_BRANCH_FORK_NODE.getType(), type) ; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index dc70962d2b..8901f63e78 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -38,6 +38,11 @@ import static org.flowable.bpmn.constants.BpmnXMLConstants.*; */ public class SimpleModelUtils { + /** + * 聚合网关节点 Id 后缀 + */ + public static final String JOIN_GATE_WAY_NODE_ID_SUFFIX = "_join"; + public static final String BPMN_SIMPLE_COPY_EXECUTION_SCRIPT = "#{bpmSimpleNodeService.copy(execution)}"; /** @@ -105,20 +110,20 @@ public class SimpleModelUtils { // } BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); + + if (nodeType == END_NODE) { + return; + } BpmSimpleModelNodeVO childNode = node.getChildNode(); // 2.1 普通节点 if (!BpmSimpleModelNodeType.isBranchNode(node.getType())) { - // 2.1.1 结束节点退出递归 - if (nodeType == END_NODE) { - return; - } if (!isValidNode(childNode)) { - // 2.1.2 普通节点且无孩子节点。分两种情况 + // 2.1.1 普通节点且无孩子节点。分两种情况 // a.结束节点 b. 条件分支的最后一个节点.与分支节点的孩子节点或聚合节点建立连线。 SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetNodeId, null, null, null); process.addFlowElement(sequenceFlow); } else { - // 2.1.3 普通节点且有孩子节点。建立连线 + // 2.1.2 普通节点且有孩子节点。建立连线 SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null, null); process.addFlowElement(sequenceFlow); // 递归调用后续节点 @@ -128,31 +133,48 @@ public class SimpleModelUtils { // 2.2 分支节点 List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空"); - // 4.1 分支节点,遍历分支节点. 如下情况: + // 分支终点节点 Id + String branchEndNodeId = null; + if (nodeType == CONDITION_BRANCH_NODE) { // 条件分支 + // 分两种情况 1. 分支节点有孩子节点为孩子节点 Id 2. 分支节点孩子为无效节点时 (分支嵌套且为分支最后一个节点) 为分支终点节点Id + branchEndNodeId = isValidNode(childNode) ? childNode.getId() : targetNodeId; + } else if (nodeType == PARALLEL_BRANCH_NODE) { // 并行分支 + // 分支节点:分支终点节点 Id 为程序创建的网关集合节点。目前不会从前端传入。 + branchEndNodeId = node.getId() + JOIN_GATE_WAY_NODE_ID_SUFFIX; + } + // TODO 包容网关待实现 + Assert.notEmpty(branchEndNodeId, "分支终点节点 Id 不能为空"); + // 3.1 遍历分支节点. 如下情况: // 分支1、A->B->C->D->E 和 分支2、A->D->E。 A为分支节点, D为A孩子节点 - // 分支终点节点, 1. 分支节点有孩子节点时为孩子节点 2. 当分支节点孩子为无效节点时。分支嵌套时并且为分支最后一个节点 - String branchEndNodeId = isValidNode(childNode) ? childNode.getId() : targetNodeId ; for (BpmSimpleModelNodeVO item : conditionNodes) { // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 - // 构建表达式 + // @芋艿 这个是啥意思。 这里的 item 的节点类型为 BpmSimpleModelNodeType.CONDITION_NODE 类型,没有对应的 bpmn 的节点。 仅仅用于构建条件表达式。 + Assert.isTrue(Objects.equals(item.getType(), CONDITION_NODE.getType()), "条件节点类型不符合"); + // 构建表达式,可以为空. 并行分支为空 String conditionExpression = buildConditionExpression(item); BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); - // 4.2 分支有后续节点, 分支1: A->B->C->D + // 3.2 分支有后续节点, 分支1: A->B->C->D if (isValidNode(nextNodeOnCondition)) { - // 4.2.1 建立 A->B + // 3.2.1 建立 A->B SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), item.getId(), item.getName(), conditionExpression); process.addFlowElement(sequenceFlow); - // 4.2.2 递归调用后续节点连线。 建立 B->C->D 的连线 + // 3.2.2 递归调用后续节点连线。 建立 B->C->D 的连线 traverseNodeToBuildSequenceFlow(process, nextNodeOnCondition, branchEndNodeId); } else { - // 4.3 分支无后续节点 建立 A->D + // 3.3 分支无后续节点 建立 A->D SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), branchEndNodeId, item.getId(), item.getName(), conditionExpression); process.addFlowElement(sequenceFlow); } } - // 递归调用后续节点 继续递归建立 D->E 的连线 + // 如果是并行分支。由于是程序创建的聚合网关。需要手工创建聚合网关和下一个节点的连线 + if (nodeType == PARALLEL_BRANCH_NODE) { + String nextNodeId = isValidNode(childNode) ? childNode.getId() : targetNodeId; + SequenceFlow sequenceFlow = buildBpmnSequenceFlow(branchEndNodeId, nextNodeId, null, null, null); + process.addFlowElement(sequenceFlow); + } + // 4.递归调用后续节点 继续递归建立 D->E 的连线 traverseNodeToBuildSequenceFlow(process, childNode, targetNodeId); } @@ -328,10 +350,9 @@ public class SimpleModelUtils { list.add(exclusiveGateway); break; } - case PARALLEL_BRANCH_FORK_NODE: - case PARALLEL_BRANCH_JOIN_NODE: { - ParallelGateway parallelGateway = convertParallelBranchNode(node); - list.add(parallelGateway); + case PARALLEL_BRANCH_NODE: { + List parallelGateways = convertParallelBranchNode(node); + list.addAll(parallelGateways); break; } @@ -392,14 +413,17 @@ public class SimpleModelUtils { return boundaryEvent; } - private static ParallelGateway convertParallelBranchNode(BpmSimpleModelNodeVO node) { + private static List convertParallelBranchNode(BpmSimpleModelNodeVO node) { ParallelGateway parallelGateway = new ParallelGateway(); parallelGateway.setId(node.getId()); // TODO @jason:setName // TODO @芋艿 + jason:合并网关;是不是要有条件啥的。微信讨论 - // @芋艿 貌似并行网关没有条件的 - return parallelGateway; + // @芋艿 感觉聚合网关(合并网关)还是从前端传过来好理解一点。 + // 并行聚合网关 + ParallelGateway joinParallelGateway = new ParallelGateway(); + joinParallelGateway.setId(node.getId() + JOIN_GATE_WAY_NODE_ID_SUFFIX); + return CollUtil.newArrayList(parallelGateway, joinParallelGateway); } private static ServiceTask convertCopyNode(BpmSimpleModelNodeVO node) { -- Gitee From 9152fbfdb727566ff9064ed4acbba9244167432d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 2 Jun 2024 18:44:12 +0800 Subject: [PATCH 0673/1557] =?UTF-8?q?=E3=80=90=E5=90=8C=E6=AD=A5=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E6=9C=80=E6=96=B0=20AI=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 48c8fb9ca1..d02bc102f1 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -11,7 +11,7 @@ Target Server Version : 80200 (8.2.0) File Encoding : 65001 - Date: 25/05/2024 13:29:34 + Date: 02/06/2024 18:43:50 */ SET NAMES utf8mb4; @@ -91,7 +91,7 @@ CREATE TABLE `infra_api_error_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 17651 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; +) ENGINE = InnoDB AUTO_INCREMENT = 17689 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; -- ---------------------------- -- Records of infra_api_error_log @@ -250,7 +250,7 @@ CREATE TABLE `infra_file` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1322 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1336 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; -- ---------------------------- -- Records of infra_file @@ -438,7 +438,7 @@ CREATE TABLE `system_dict_data` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1542 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; +) ENGINE = InnoDB AUTO_INCREMENT = 1543 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; -- ---------------------------- -- Records of system_dict_data @@ -814,6 +814,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1539, 3, '文心一言', 'YiYan', 'ai_platform', 0, '', '', '', '1', '2024-05-18 09:24:20', '1', '2024-05-18 09:29:01', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1540, 4, '讯飞星火', 'XingHuo', 'ai_platform', 0, '', '', '', '1', '2024-05-18 10:08:56', '1', '2024-05-18 10:08:56', b'0'); INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1541, 5, '通义千问', 'QianWen', 'ai_platform', 0, '', '', '', '1', '2024-05-18 10:32:29', '1', '2024-05-25 13:18:31', b'0'); +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1542, 6, 'StableDiffusion', 'StableDiffusion', 'ai_platform', 0, '', '', '', '1', '2024-06-01 15:09:31', '1', '2024-06-01 15:10:25', b'0'); COMMIT; -- ---------------------------- @@ -946,7 +947,7 @@ CREATE TABLE `system_login_log` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3152 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; +) ENGINE = InnoDB AUTO_INCREMENT = 3154 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; -- ---------------------------- -- Records of system_login_log @@ -1077,7 +1078,7 @@ CREATE TABLE `system_menu` ( `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2783 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; +) ENGINE = InnoDB AUTO_INCREMENT = 2784 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; -- ---------------------------- -- Records of system_menu @@ -1896,6 +1897,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2780, '会话删除', 'ai:chat-conversation:delete', 3, 2, 2778, '', '', '', '', 0, b'1', b'1', b'1', '', '2024-05-24 15:39:18', '1', '2024-05-25 08:38:40', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2781, '消息查询', 'ai:chat-message:query', 3, 11, 2778, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-05-25 08:38:56', '1', '2024-05-25 08:38:56', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2782, '消息删除', 'ai:chat-message:delete', 3, 12, 2778, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-05-25 08:39:10', '1', '2024-05-25 08:39:10', b'0'); +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2783, 'AI 绘画', '', 2, 2, 2758, 'image', 'ep:picture-rounded', 'ai/image/index.vue', 'AiImage', 0, b'1', b'1', b'1', '1', '2024-05-26 11:45:17', '1', '2024-05-26 11:45:26', b'0'); COMMIT; -- ---------------------------- @@ -2017,7 +2019,7 @@ CREATE TABLE `system_oauth2_access_token` ( PRIMARY KEY (`id`) USING BTREE, INDEX `idx_access_token`(`access_token` ASC) USING BTREE, INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 7123 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 7329 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; -- ---------------------------- -- Records of system_oauth2_access_token @@ -2139,7 +2141,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1521 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; +) ENGINE = InnoDB AUTO_INCREMENT = 1523 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; -- ---------------------------- -- Records of system_oauth2_refresh_token @@ -3479,7 +3481,7 @@ CREATE TABLE `system_users` ( -- Records of system_users -- ---------------------------- BEGIN; -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-05-19 11:11:07', 'admin', '2021-01-05 17:03:47', NULL, '2024-05-19 11:11:07', b'0', 1); +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-05-28 20:36:33', 'admin', '2021-01-05 17:03:47', NULL, '2024-05-28 20:36:33', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', b'0', 1); -- Gitee From 3ab218efc6c92a3109c9f197cde8e8e0256d738c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Mon, 3 Jun 2024 10:01:04 +0800 Subject: [PATCH 0674/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/core/enums/AiPlatformEnum.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java index d6513354e7..7ac341e46f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/enums/AiPlatformEnum.java @@ -33,18 +33,6 @@ public enum AiPlatformEnum { */ private final String name; -// public static List CHAT_PLATFORM_LIST = Lists.newArrayList( -// AiPlatformEnum.YI_YAN, -// AiPlatformEnum.QIAN_WEN, -// AiPlatformEnum.XING_HUO, -// AiPlatformEnum.OPENAI -// ); -// -// public static List IMAGE_PLATFORM_LIST = Lists.newArrayList( -// AiPlatformEnum.OPEN_AI_DALL, -// AiPlatformEnum.MIDJOURNEY -// ); - public static AiPlatformEnum validatePlatform(String platform) { for (AiPlatformEnum platformEnum : AiPlatformEnum.values()) { if (platformEnum.getPlatform().equals(platform)) { -- Gitee From c87bea5a7275779007f2959a247d6d6353414d99 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 3 Jun 2024 12:50:07 +0800 Subject: [PATCH 0675/1557] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9Areview=20simple=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E3=80=81seq=20=E8=BF=9E=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/model/simple/BpmSimpleModelNodeVO.java | 1 + .../flowable/core/util/SimpleModelUtils.java | 69 ++----------------- .../definition/BpmModelServiceImpl.java | 1 - 3 files changed, 7 insertions(+), 64 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java index a32449c21f..e13253e997 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java @@ -29,6 +29,7 @@ public class BpmSimpleModelNodeVO { private String name; // TODO @jason:要不改成 placeholder 和一般 Element-Plus 组件一致。占位符,用于展示。@芋艿。这个不是 placeholder 占位符的含义。节点配置后。节点展示的内容,不知道取什么名字好??? + // TODO @jason:【回复】占位文本(showText)是指当一个文本框没有被 focus 的时候显示的是提示文字,当他被点击之后就显示空白。。。虽然不是完全精准,但是 placeholder 相对正式点~ @Schema(description = "节点展示内容", example = "指定成员: 芋道源码") private String showText; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java index 8901f63e78..dcb829c16e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java @@ -95,27 +95,21 @@ public class SimpleModelUtils { return bpmnModel; } + // TODO @芋艿:在优化下这个注释 private static void traverseNodeToBuildSequenceFlow(Process process, BpmSimpleModelNodeVO node, String targetNodeId) { - // 1.无效节点返回 + // 1.1 无效节点返回 if (!isValidNode(node)) { return; } - - // 如果是网关分支节点. 后续节点可能为 null。但不是 END_EVENT 节点 - // TODO-DONE @芋艿:这个要不要挪到 START_NODE - INCLUSIVE_BRANCH_JOIN_NODE 待定;感觉 switch 那最终是分三个情况;branch、子节点、结束了;(每种情况的注释,需要写的更完整) -// if (!BpmSimpleModelNodeType.isBranchNode(node.getType()) && (childNode == null || childNode.getId() == null)) { -// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), targetNodeId, null, null, null); -// process.addFlowElement(sequenceFlow); -// return; -// } + // 1.2 END_NODE 直接返回 BpmSimpleModelNodeType nodeType = BpmSimpleModelNodeType.valueOf(node.getType()); Assert.notNull(nodeType, "模型节点类型不支持"); - if (nodeType == END_NODE) { return; } + + // 2.1 情况一:普通节点 BpmSimpleModelNodeVO childNode = node.getChildNode(); - // 2.1 普通节点 if (!BpmSimpleModelNodeType.isBranchNode(node.getType())) { if (!isValidNode(childNode)) { // 2.1.1 普通节点且无孩子节点。分两种情况 @@ -130,7 +124,7 @@ public class SimpleModelUtils { traverseNodeToBuildSequenceFlow(process, childNode, targetNodeId); } } else { - // 2.2 分支节点 + // 2.2 情况二:分支节点 List conditionNodes = node.getConditionNodes(); Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空"); // 分支终点节点 Id @@ -177,57 +171,6 @@ public class SimpleModelUtils { // 4.递归调用后续节点 继续递归建立 D->E 的连线 traverseNodeToBuildSequenceFlow(process, childNode, targetNodeId); } - - // TODO @jason:下面的 PARALLEL_BRANCH_FORK_NODE、CONDITION_BRANCH_NODE、INCLUSIVE_BRANCH_FORK_NODE 是不是就是 isBranchNode?如果是的话,貌似不用 swtich,而是 if else 分类处理呢。 -// switch (nodeType) { -// case START_NODE: -// case APPROVE_NODE: -// case COPY_NODE: -// case PARALLEL_BRANCH_JOIN_NODE: -// case INCLUSIVE_BRANCH_JOIN_NODE: { -// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), childNode.getId(), null, null, null); -// process.addFlowElement(sequenceFlow); -// // 递归调用后续节点 -// buildAndAddBpmnSequenceFlow(process, childNode, targetNodeId); -// break; -// } -// case PARALLEL_BRANCH_FORK_NODE: -// case CONDITION_BRANCH_NODE: -// case INCLUSIVE_BRANCH_FORK_NODE: { -// // TODO @jason:这里 sequenceFlowTargetId 不建议做这样的 default。万一可能有 bug 哈;直接弄到对应的 136- 146 会更安全一点。 -// String sequenceFlowTargetId = (childNode == null || childNode.getId() == null) ? targetNodeId : childNode.getId(); -// List conditionNodes = node.getConditionNodes(); -// Assert.notEmpty(conditionNodes, "网关节点的条件节点不能为空"); -// for (BpmSimpleModelNodeVO item : conditionNodes) { -// // 构建表达式 -// // TODO @jason:条件分支的情况下,需要分 item 搞的条件,和 conditionNodes 搞的条件 -// String conditionExpression = buildConditionExpression(item); -// -// BpmSimpleModelNodeVO nextNodeOnCondition = item.getChildNode(); -// // TODO @jason:isValidNode -// if (nextNodeOnCondition != null && nextNodeOnCondition.getId() != null) { -// // TODO @jason:会存在 item.name 未空的情况么?这个时候,要不要兜底处理拼接 -// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), nextNodeOnCondition.getId(), -// item.getId(), item.getName(), conditionExpression); -// process.addFlowElement(sequenceFlow); -// // 递归调用后续节点 -// // TODO @jason:最好也有个例子,嘿嘿;S4 -// buildAndAddBpmnSequenceFlow(process, nextNodeOnCondition, sequenceFlowTargetId); -// } else { -// SequenceFlow sequenceFlow = buildBpmnSequenceFlow(node.getId(), sequenceFlowTargetId, -// item.getId(), item.getName(), conditionExpression); -// process.addFlowElement(sequenceFlow); -// } -// } -// // 递归调用后续节点 TODO @jason:最好有个例子哈 -// buildAndAddBpmnSequenceFlow(process, childNode, targetNodeId); -// break; -// } -// default: { -// // TODO 其它节点类型的实现 -// } -// } - } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index ef421a2e31..b39ec72120 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -238,7 +238,6 @@ public class BpmModelServiceImpl implements BpmModelService { saveModelSimpleJson(model.getId(), JsonUtils.toJsonByte(reqVO.getSimpleModel())); } - /** * 校验流程表单已配置 * -- Gitee From 851c290c0d3240822272757cc0ef940fb2ebfb47 Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Mon, 3 Jun 2024 18:20:16 +0800 Subject: [PATCH 0676/1557] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91A?= =?UTF-8?q?I=EF=BC=9A=E4=BD=BF=E7=94=A8suno-api=E6=9C=8D=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=85=A5Suno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/music/vo/MusicDataVO.java | 4 +- .../controller/admin/music/vo/SunoRespVO.java | 4 +- .../ai/service/music/MusicServiceImpl.java | 6 +- .../ai/config/YudaoAiAutoConfiguration.java | 6 +- .../core/model/suno/api/AceDataSunoApi.java | 115 ++++++++++ .../ai/core/model/suno/api/SunoApi.java | 209 ++++++++++++------ .../yudao/framework/ai/suno/SunoTests.java | 43 +++- 7 files changed, 307 insertions(+), 80 deletions(-) create mode 100644 yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/AceDataSunoApi.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java index d4c4afa22c..f138d605ed 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/MusicDataVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.music.vo; -import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.AceDataSunoApi; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @@ -66,7 +66,7 @@ public class MusicDataVO { */ private String style; - public static List convertFrom(List musicDataList) { + public static List convertFrom(List musicDataList) { return musicDataList.stream().map(musicData -> { MusicDataVO musicDataVO = new MusicDataVO(); musicDataVO.setId(musicData.id()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java index b3d66363ff..5eed0b81d7 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/music/vo/SunoRespVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.controller.admin.music.vo; -import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.AceDataSunoApi; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @@ -29,7 +29,7 @@ public class SunoRespVO { //把 SunoResp转为本vo类 - public static SunoRespVO convertFrom(SunoApi.SunoResp sunoResp) { + public static SunoRespVO convertFrom(AceDataSunoApi.SunoResp sunoResp) { SunoRespVO sunoRespVO = new SunoRespVO(); sunoRespVO.setSuccess(sunoResp.success()); sunoRespVO.setTaskId(sunoResp.taskId()); diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java index 0673e59acc..f8b2a9d509 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/MusicServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.ai.service.music; -import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.AceDataSunoApi; import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoReqVO; import cn.iocoder.yudao.module.ai.controller.admin.music.vo.SunoRespVO; import lombok.RequiredArgsConstructor; @@ -14,11 +14,11 @@ import org.springframework.stereotype.Service; @RequiredArgsConstructor public class MusicServiceImpl implements MusicService { - private final SunoApi sunoApi; + private final AceDataSunoApi aceDataSunoApi; @Override public SunoRespVO musicGen(SunoReqVO sunoReqVO) { - SunoApi.SunoResp sunoResp = sunoApi.musicGen(new SunoApi.SunoReq( + AceDataSunoApi.SunoResp sunoResp = aceDataSunoApi.musicGen(new AceDataSunoApi.SunoReq( sunoReqVO.getPrompt(), sunoReqVO.getLyric(), sunoReqVO.isCustom(), diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 7285448a38..cd7512bf3a 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -4,7 +4,7 @@ import cn.hutool.core.io.IoUtil; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactory; import cn.iocoder.yudao.framework.ai.core.factory.AiClientFactoryImpl; import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; -import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; +import cn.iocoder.yudao.framework.ai.core.model.suno.api.AceDataSunoApi; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatClient; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenChatModal; import cn.iocoder.yudao.framework.ai.core.model.tongyi.QianWenOptions; @@ -150,8 +150,8 @@ public class YudaoAiAutoConfiguration { @Bean @ConditionalOnProperty(value = "yudao.ai.suno.enable", havingValue = "true") - public SunoApi sunoApi(YudaoAiProperties yudaoAiProperties) { - return new SunoApi(new SunoConfig(yudaoAiProperties.getSuno().getToken())); + public AceDataSunoApi sunoApi(YudaoAiProperties yudaoAiProperties) { + return new AceDataSunoApi(new SunoConfig(yudaoAiProperties.getSuno().getToken())); } private static @NotNull MidjourneyConfig getMidjourneyConfig(ApplicationContext applicationContext, diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/AceDataSunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/AceDataSunoApi.java new file mode 100644 index 0000000000..d50379d596 --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/AceDataSunoApi.java @@ -0,0 +1,115 @@ +package cn.iocoder.yudao.framework.ai.core.model.suno.api; + +import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.openai.api.ApiUtils; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * Suno API + *
+ * 文档地址:https://platform.acedata.cloud/documents/d016ee3f-421b-4b6e-989a-8beba8701701 + * + * @Author xiaoxin + * @Date 2024/5/27 + */ +@Slf4j +public class AceDataSunoApi { + + public static final String DEFAULT_BASE_URL = "https://api.acedata.cloud/suno"; + private final WebClient webClient; + + public AceDataSunoApi(SunoConfig config) { + this.webClient = WebClient.builder() + .baseUrl(DEFAULT_BASE_URL) + .defaultHeaders(ApiUtils.getJsonContentHeaders(config.getToken())) + .build(); + } + + // TODO @芋艿:方法名,要考虑下; + public SunoResp musicGen(SunoReq sunReq) { + return this.webClient.post() + .uri("/audios") + .body(Mono.just(sunReq), SunoReq.class) + .retrieve() + .onStatus(status -> !status.is2xxSuccessful(), + response -> response.bodyToMono(String.class) + .handle((respBody, sink) -> { + log.error("【Suno】调用失败!resp: 【{}】", respBody); + sink.error(new IllegalStateException("【Suno】调用失败!")); + })) + .bodyToMono(SunoResp.class) + .block(); + } + + /** + * 请求数据对象,用于生成音乐音频。 + * + * @param prompt 用于生成音乐音频的提示 + * @param lyric 用于生成音乐音频的歌词 + * @param custom 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 + * @param title 音乐音频的标题 + * @param style 音乐音频的风格 + * @param callbackUrl 音乐音频生成后回调的 URL + */ + @JsonInclude(value = JsonInclude.Include.NON_NULL) + public record SunoReq( + String prompt, + String lyric, + boolean custom, + String title, + String style, + String callbackUrl + ) { + public SunoReq(String prompt) { + this(prompt, null, false, null, null, null); + } + + } + + /** + * SunoAPI 响应的数据。 + * + * @param success 表示请求是否成功 + * @param taskId 任务 ID + * @param data 音乐数据列表 + */ + public record SunoResp( + boolean success, + @JsonProperty("task_id") String taskId, + List data + ) { + /** + * 单个音乐数据。 + * + * @param id 音乐数据的 ID + * @param title 音乐音频的标题 + * @param imageUrl 音乐音频的图片 URL + * @param lyric 音乐音频的歌词 + * @param audioUrl 音乐音频的 URL + * @param videoUrl 音乐视频的 URL + * @param createdAt 音乐音频的创建时间 + * @param model 使用的模型名称 + * @param prompt 生成音乐音频的提示 + * @param style 音乐音频的风格 + */ + public record MusicData( + String id, + String title, + @JsonProperty("image_url") String imageUrl, + String lyric, + @JsonProperty("audio_url") String audioUrl, + @JsonProperty("video_url") String videoUrl, + @JsonProperty("created_at") String createdAt, + String model, + String prompt, + String style + ) { + } + } +} diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java index 22435affdf..25ae04f511 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/suno/api/SunoApi.java @@ -1,115 +1,194 @@ package cn.iocoder.yudao.framework.ai.core.model.suno.api; -import cn.iocoder.yudao.framework.ai.core.model.suno.SunoConfig; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.extern.slf4j.Slf4j; -import org.springframework.ai.openai.api.ApiUtils; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; import java.util.List; +import java.util.function.Function; +import java.util.function.Predicate; /** * Suno API *
- * 文档地址:https://platform.acedata.cloud/documents/d016ee3f-421b-4b6e-989a-8beba8701701 + * 文档地址:https://github.com/status2xx/suno-api/blob/main/README_CN.md * * @Author xiaoxin - * @Date 2024/5/27 + * @Date 2024/6/3 */ @Slf4j public class SunoApi { - public static final String DEFAULT_BASE_URL = "https://api.acedata.cloud/suno"; + public static final String DEFAULT_BASE_URL = "https://suno-9323szg26-status2xxs-projects.vercel.app"; private final WebClient webClient; - public SunoApi(SunoConfig config) { + + private final Predicate STATUS_PREDICATE = status -> !status.is2xxSuccessful(); + private final Function> EXCEPTION_FUNCTION = response -> response.bodyToMono(String.class) + .handle((respBody, sink) -> { + log.error("【suno-api】调用失败!resp: 【{}】", respBody); + sink.error(new IllegalStateException("【suno-api】调用失败!")); + }); + + + public SunoApi() { this.webClient = WebClient.builder() .baseUrl(DEFAULT_BASE_URL) - .defaultHeaders(ApiUtils.getJsonContentHeaders(config.getToken())) + .defaultHeaders((headers) -> headers.setContentType(MediaType.APPLICATION_JSON)) .build(); } - // TODO @芋艿:方法名,要考虑下; - public SunoResp musicGen(SunoReq sunReq) { + public List generate(SunoApi.SunoReq sunReq) { + return this.webClient.post() + .uri("/api/generate") + .body(Mono.just(sunReq), SunoApi.SunoReq.class) + .retrieve() + .onStatus(STATUS_PREDICATE, EXCEPTION_FUNCTION) + .bodyToMono(new ParameterizedTypeReference>() { + }) + .block(); + } + + public List doChatCompletion(String prompt) { + return this.webClient.post() + .uri("/v1/chat/completions") + .body(Mono.just(new SunoReq(prompt)), SunoApi.SunoReq.class) + .retrieve() + .onStatus(STATUS_PREDICATE, EXCEPTION_FUNCTION) + .bodyToMono(new ParameterizedTypeReference>() { + }) + .block(); + } + + public LyricsData generateLyrics(String prompt) { return this.webClient.post() - .uri("/audios") - .body(Mono.just(sunReq), SunoReq.class) + .uri("/api/generate_lyrics") + .body(Mono.just(new SunoReq(prompt)), SunoApi.SunoReq.class) + .retrieve() + .onStatus(STATUS_PREDICATE, EXCEPTION_FUNCTION) + .bodyToMono(LyricsData.class) + .block(); + } + + + public List selectById(String ids) { + return this.webClient.get() + .uri(uriBuilder -> uriBuilder + .path("/api/get") + .queryParam("ids", ids) + .build()) .retrieve() - .onStatus(status -> !status.is2xxSuccessful(), - response -> response.bodyToMono(String.class) - .handle((respBody, sink) -> { - log.error("【Suno】调用失败!resp: 【{}】", respBody); - sink.error(new IllegalStateException("【Suno】调用失败!")); - })) - .bodyToMono(SunoResp.class) + .onStatus(STATUS_PREDICATE, EXCEPTION_FUNCTION) + .bodyToMono(new ParameterizedTypeReference>() { + }) .block(); } + + public LimitData selectLimit() { + return this.webClient.get() + .uri("/api/get_limit") + .retrieve() + .onStatus(STATUS_PREDICATE, EXCEPTION_FUNCTION) + .bodyToMono(LimitData.class) + .block(); + } + + /** - * 请求数据对象,用于生成音乐音频。 + * 根据提示生成音频 * - * @param prompt 用于生成音乐音频的提示 - * @param lyric 用于生成音乐音频的歌词 - * @param custom 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 - * @param title 音乐音频的标题 - * @param style 音乐音频的风格 - * @param callbackUrl 音乐音频生成后回调的 URL + * @param prompt 用于生成音乐音频的提示 + * @param tags 自定义模式才需要 + * @param title 自定义模式才需要 + * @param waitAudio false表示后台模式,仅返回音频任务信息,需要调用get API获取详细的音频信息。 + * true表示同步模式,API最多等待100s,音频生成完毕后直接返回音频链接等信息,建议在GPT等agent中使用。 + * @param makeInstrumental 指示音乐音频是否为定制,如果为 true,则从歌词生成,否则从提示生成 */ @JsonInclude(value = JsonInclude.Include.NON_NULL) public record SunoReq( String prompt, - String lyric, - boolean custom, + String tags, String title, - String style, - String callbackUrl + @JsonProperty("wait_audio") boolean waitAudio, + @JsonProperty("make_instrumental") boolean makeInstrumental ) { public SunoReq(String prompt) { - this(prompt, null, false, null, null, null); + this(prompt, null, null, false, false); } + public SunoReq(String prompt, String tags, String title) { + this(prompt, tags, title, false, false); + } } + /** - * SunoAPI 响应的数据。 + * SunoAPI 响应的音频数据。 * - * @param success 表示请求是否成功 - * @param taskId 任务 ID - * @param data 音乐数据列表 + * @param id 音乐数据的 ID + * @param title 音乐音频的标题 + * @param imageUrl 音乐音频的图片 URL + * @param lyric 音乐音频的歌词 + * @param audioUrl 音乐音频的 URL + * @param videoUrl 音乐视频的 URL + * @param createdAt 音乐音频的创建时间 + * @param modelName + * @param status + * @param gptDescriptionPrompt + * @param prompt 生成音乐音频的提示 + * @param type + * @param tags */ - public record SunoResp( - boolean success, - @JsonProperty("task_id") String taskId, - List data + public record MusicData( + String id, + String title, + @JsonProperty("image_url") String imageUrl, + String lyric, + @JsonProperty("audio_url") String audioUrl, + @JsonProperty("video_url") String videoUrl, + @JsonProperty("created_at") String createdAt, + @JsonProperty("model_name") String modelName, + String status, + @JsonProperty("gpt_description_prompt") String gptDescriptionPrompt, + String prompt, + String type, + String tags ) { - /** - * 单个音乐数据。 - * - * @param id 音乐数据的 ID - * @param title 音乐音频的标题 - * @param imageUrl 音乐音频的图片 URL - * @param lyric 音乐音频的歌词 - * @param audioUrl 音乐音频的 URL - * @param videoUrl 音乐视频的 URL - * @param createdAt 音乐音频的创建时间 - * @param model 使用的模型名称 - * @param prompt 生成音乐音频的提示 - * @param style 音乐音频的风格 - */ - public record MusicData( - String id, - String title, - @JsonProperty("image_url") String imageUrl, - String lyric, - @JsonProperty("audio_url") String audioUrl, - @JsonProperty("video_url") String videoUrl, - @JsonProperty("created_at") String createdAt, - String model, - String prompt, - String style - ) { - } } + + + /** + * SunoAPI 响应的歌词数据。 + * + * @param text 歌词 + * @param title 标题 + * @param status 状态 + */ + public record LyricsData( + String text, + String title, + String status + ) { + } + + + /** + * SunoAPI 响应的限额数据,目前每日免费50 + */ + public record LimitData( + @JsonProperty("credits_left") Long creditsLeft, + String period, + @JsonProperty("monthly_limit") Long monthlyLimit, + @JsonProperty("monthly_usage") Long monthlyUsage + ) { + } + + } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java index 36fc40b17a..39ac1ea9b7 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/suno/SunoTests.java @@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.ai.core.model.suno.api.SunoApi; import org.junit.Before; import org.junit.Test; +import java.util.List; + /** * @Author xiaoxin * @Date 2024/5/27 @@ -20,12 +22,43 @@ public class SunoTests { } @Test - public void generateMusic() { - SunoApi sunoApi = new SunoApi(sunoConfig); - SunoApi.SunoReq sunoReq = new SunoApi.SunoReq("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); + public void selectById() { + SunoApi sunoApi = new SunoApi(); + System.out.println(sunoApi.selectById("d460ddda-7c87-4f34-b751-419b08a590ca,ff90ea66-49cd-4fd2-b44c-44267dfd5551")); + + } + + @Test + public void generate() { + SunoApi sunoApi = new SunoApi(); + List generate = sunoApi.generate(new SunoApi.SunoReq("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。")); + System.out.println(generate); + } + + + @Test + public void doChatCompletion() { + SunoApi sunoApi = new SunoApi(); + List generate = sunoApi.doChatCompletion("创作一首带有轻松吉他旋律的流行歌曲,[verse] 描述夏日海滩的宁静,[chorus] 节奏加快,表达对自由的向往。"); + System.out.println(generate); + } + + + @Test + public void generateLyrics() { + SunoApi sunoApi = new SunoApi(); + SunoApi.LyricsData lyricsData = sunoApi.generateLyrics("A soothing lullaby"); + System.out.println(lyricsData); + } - SunoApi.SunoResp sunoResp = sunoApi.musicGen(sunoReq); - System.out.println(sunoResp); + + + @Test + public void selectLimit() { + SunoApi sunoApi = new SunoApi(); + SunoApi.LimitData limitData = sunoApi.selectLimit(); + System.out.println(limitData); } + } -- Gitee From dbe23cfe8ea14090daabf4edd3fd0d4d8faecf61 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 4 Jun 2024 14:50:27 +0800 Subject: [PATCH 0677/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=B0=83=E8=AF=95=20mj=20proxy=20=E9=80=9A=E7=9F=A5=E5=9B=9E?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/client/MidjourneyProxyClient.java | 12 +++++++++++- .../module/ai/client/vo/MidjourneyNotifyReqVO.java | 2 +- .../ai/controller/admin/image/AiImageController.java | 7 ++++--- .../module/ai/service/image/AiImageServiceImpl.java | 1 - .../src/main/resources/application-local.yaml | 7 +++++++ 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java index efba5234bb..b683107004 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/MidjourneyProxyClient.java @@ -1,10 +1,12 @@ package cn.iocoder.yudao.module.ai.client; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.ai.client.vo.MidjourneyImagineReqVO; import cn.iocoder.yudao.module.ai.client.vo.MidjourneySubmitRespVO; import jakarta.validation.constraints.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.*; import org.springframework.stereotype.Component; import org.springframework.validation.annotation.Validated; import org.springframework.web.client.RestTemplate; @@ -35,7 +37,15 @@ public class MidjourneyProxyClient { * @return */ public MidjourneySubmitRespVO imagine(@Validated @NotNull MidjourneyImagineReqVO imagineReqVO) { - return restTemplate.postForObject(url.concat(URI_IMAGINE), imagineReqVO, MidjourneySubmitRespVO.class); + // 创建 HttpHeaders 对象 + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.set("Authorization", "Bearer sk-c3qxUCVKsPfdQiYU8440E3Fc8dE5424d9cB124A4Ee2489E3"); + // 创建 HttpEntity 对象,将 HttpHeaders 和请求体传递给它 + HttpEntity requestEntity = new HttpEntity<>(JsonUtils.toJsonString(imagineReqVO), headers); + // 发送 post 请求 + ResponseEntity response = restTemplate.exchange(url.concat(URI_IMAGINE), HttpMethod.POST, requestEntity, String.class); + return JsonUtils.parseObject(response.getBody(), MidjourneySubmitRespVO.class); } } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java index 3cc92c7194..4398a82726 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java @@ -19,7 +19,7 @@ public class MidjourneyNotifyReqVO { @Schema(description = "任务类型") private MidjourneyTaskActionEnum action; @Schema(description = "任务状态") - private MidjourneyTaskStatusEnum status = MidjourneyTaskStatusEnum.NOT_START; + private MidjourneyTaskStatusEnum status; @Schema(description = "提示词") private String prompt; diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java index 0f2116a0fa..32e2e73fad 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/image/AiImageController.java @@ -15,6 +15,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -70,10 +71,10 @@ public class AiImageController { return success(imageService.midjourneyImagine(getLoginUserId(), req)); } - // TODO @芋艿:不拦截 @Operation(summary = "midjourney proxy - 回调通知") - @RequestMapping("/midjourney-notify") - public CommonResult midjourneyNotify(MidjourneyNotifyReqVO notifyReqVO) { + @PostMapping("/midjourney-notify") + @PermitAll + public CommonResult midjourneyNotify( @RequestBody MidjourneyNotifyReqVO notifyReqVO) { return success(imageService.midjourneyNotify(getLoginUserId(), notifyReqVO)); } diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index ea52dd42b1..208427bc08 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -212,7 +212,6 @@ public class AiImageServiceImpl implements AiImageService { .setId(image.getId()) .setStatus(imageStatus) .setPicUrl(filePath) -// .setOriginalPicUrl(notifyReqVO.getImageUrl()) TODO @fan:就不存原始的图片地址啦 ); return true; } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 99c888f31c..d4b7530d66 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -76,6 +76,13 @@ server: enabled: true charset: UTF-8 force: true +# ai +ai: + midjourney-proxy: + url: https://api.holdai.top/mj + notifyUrl: http://7b1aada4.r26.cpolar.top/admin-api/ai/image/midjourney-notify + + --- #################### 定时任务相关配置 #################### # Quartz 配置项,对应 QuartzProperties 配置类 -- Gitee From 95d26c9b8d63042af84fc84a661f6df48b03cd18 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 4 Jun 2024 17:38:36 +0800 Subject: [PATCH 0678/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20=20Midjourney=20proxy=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20enum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java index 3f432ce361..1158d1f7bd 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/enums/MidjourneySubmitCodeEnum.java @@ -20,7 +20,7 @@ public enum MidjourneySubmitCodeEnum { // 状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误) SUBMIT_SUCCESS("1", "提交成功"), - ALREADY_EXISTS("1", "已存在"), + ALREADY_EXISTS("21", "已存在"), QUEUING("22", "排队中"), ; -- Gitee From cea888b225021e5be845ee8af21cb6d672dc8f5c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 4 Jun 2024 17:39:02 +0800 Subject: [PATCH 0679/1557] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91M?= =?UTF-8?q?idjourneyNotifyReqVO=20action=20=E5=92=8C=20status=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=97=20=E6=94=B9=E4=B8=BA=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/client/vo/MidjourneyNotifyReqVO.java | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java index 4398a82726..2f8c280f3b 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/client/vo/MidjourneyNotifyReqVO.java @@ -1,11 +1,16 @@ package cn.iocoder.yudao.module.ai.client.vo; -import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskActionEnum; -import cn.iocoder.yudao.module.ai.client.enums.MidjourneyTaskStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + /** + * Midjourney Proxy 通知回调 + * + * - Midjourney Proxy:通知回调 bean 是 com.github.novicezk.midjourney.support.Task + * - 毫秒 api 通知回调文档地址:https://gpt-best.apifox.cn/doc-3530863 + * * @author fansili * @time 2024/5/31 10:37 * @since 1.0 @@ -16,10 +21,10 @@ public class MidjourneyNotifyReqVO { @Schema(description = "job id") private String id; - @Schema(description = "任务类型") - private MidjourneyTaskActionEnum action; - @Schema(description = "任务状态") - private MidjourneyTaskStatusEnum status; + @Schema(description = "任务类型 MidjourneyTaskActionEnum") + private String action; + @Schema(description = "任务状态 MidjourneyTaskStatusEnum") + private String status; @Schema(description = "提示词") private String prompt; @@ -46,4 +51,25 @@ public class MidjourneyNotifyReqVO { @Schema(description = "失败原因") private String failReason; + @Schema(description = "任务完成后的可执行按钮") + private List